ember-ebau-gwr 6.0.0 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/addon/components/model-form/submit-errors.hbs +1 -0
- package/addon/components/quarterly-closure/close-survey-button.js +1 -1
- package/addon/components/quarterly-closure/status.hbs +6 -5
- package/addon/components/search.js +12 -2
- package/addon/controllers/search-building.js +3 -0
- package/addon/controllers/search-project.js +8 -3
- package/addon/services/gwr.js +2 -2
- package/addon/services/quarterly-closure.js +3 -4
- package/addon/templates/global-landing-page.hbs +4 -4
- package/addon/templates/search-building.hbs +2 -0
- package/addon/templates/search-project.hbs +2 -0
- package/addon/validations/extended-search-fields.js +1 -16
- package/addon/validations/search-building.js +10 -0
- package/addon/validations/search-project.js +10 -0
- package/app/styles/ember-ebau-gwr.scss +2 -3
- package/package.json +1 -1
- package/translations/quarterly-closure/de.yaml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [6.0.2](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v6.0.1...v6.0.2) (2022-09-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **global:** minor ui change ([524b789](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/524b78955f723ba24f17547136afe02a82dc09ed))
|
|
7
|
+
* **projects:** fix instance link querying by eproid ([e1fff2e](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/e1fff2ed40b5b33b9ed3d8b1aea41b688749a59b))
|
|
8
|
+
* **quarterly-closure:** fix fetching of status after closure ([4f19d91](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/4f19d91b797c34631d7741e5dcbb698dc7cb427c))
|
|
9
|
+
* **search:** make search pagination optional ([3e883e9](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/3e883e96bb9d624c90b57029db44346d15902047))
|
|
10
|
+
* **status:** fix lifecycle error links for global views ([801936b](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/801936bdf11c40a67fdcd5f5024a5edfa9ff1365))
|
|
11
|
+
|
|
12
|
+
## [6.0.1](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v6.0.0...v6.0.1) (2022-09-19)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **search:** separate project and building search validations ([0510045](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/0510045b6d2f09615afcc241f1a61aaa4ddd95eb))
|
|
18
|
+
|
|
1
19
|
# [6.0.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v5.0.4...v6.0.0) (2022-09-16)
|
|
2
20
|
|
|
3
21
|
|
|
@@ -33,7 +33,7 @@ export default class QuarterlyClosureStatus extends Component {
|
|
|
33
33
|
|
|
34
34
|
const notificationType =
|
|
35
35
|
NOTIFICATION_TYPES[this.quarterlyClosure.status.type];
|
|
36
|
-
this.notification[notificationType](
|
|
36
|
+
this.notification[notificationType]?.(
|
|
37
37
|
this.quarterlyClosure.status.shortLabel
|
|
38
38
|
);
|
|
39
39
|
} catch (error) {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
<div>
|
|
1
|
+
<div class="ember-ebau-gwr-quarterly-closure-status">
|
|
2
2
|
<div class="uk-flex uk-flex-middle">
|
|
3
|
-
<
|
|
3
|
+
<div
|
|
4
|
+
class="uk-text-bold uk-text-meta uk-text-emphasis uk-text-uppercase margin-right-xs"
|
|
5
|
+
>
|
|
4
6
|
{{t "ember-gwr.quarterlyClosure.status.label"}}
|
|
5
|
-
</
|
|
7
|
+
</div>
|
|
6
8
|
<FaIcon class={{this.statusClass.text}}
|
|
7
9
|
@icon={{this.statusClass.icon}}
|
|
8
10
|
@prefix={{this.statusClass.prefix}}
|
|
9
|
-
@fixedWidth={{true}}
|
|
10
11
|
@size="sm"
|
|
11
12
|
/>
|
|
12
13
|
</div>
|
|
13
|
-
<div>
|
|
14
|
+
<div class="uk-text-meta uk-text-emphasis">
|
|
14
15
|
{{this.quarterlyClosure.status.label}}
|
|
15
16
|
</div>
|
|
16
17
|
</div>
|
|
@@ -10,6 +10,7 @@ export default class SearchComponent extends Component {
|
|
|
10
10
|
@tracked page = 1;
|
|
11
11
|
@tracked searchResults = null;
|
|
12
12
|
@tracked hasMoreResults = false;
|
|
13
|
+
@tracked rawQuery = {};
|
|
13
14
|
|
|
14
15
|
@service notification;
|
|
15
16
|
@service intl;
|
|
@@ -53,6 +54,11 @@ export default class SearchComponent extends Component {
|
|
|
53
54
|
lookupValidator(validations),
|
|
54
55
|
validations
|
|
55
56
|
);
|
|
57
|
+
|
|
58
|
+
this.rawQuery = baseQuery;
|
|
59
|
+
if (this.args.paginate) {
|
|
60
|
+
this.onSubmit.perform();
|
|
61
|
+
}
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
@dropTask
|
|
@@ -61,11 +67,15 @@ export default class SearchComponent extends Component {
|
|
|
61
67
|
this.rawQuery = {
|
|
62
68
|
...this.rawQuery,
|
|
63
69
|
..._query?.pendingData,
|
|
64
|
-
page: this.page,
|
|
70
|
+
...(this.args.paginate ? { page: this.page } : {}),
|
|
65
71
|
};
|
|
66
72
|
|
|
67
73
|
const _results = yield this.args.service.search(this.rawQuery);
|
|
68
|
-
if (
|
|
74
|
+
if (
|
|
75
|
+
!this.args.paginate ||
|
|
76
|
+
!_results ||
|
|
77
|
+
_results.length < this.config.pageSize
|
|
78
|
+
) {
|
|
69
79
|
this.hasMoreResults = false;
|
|
70
80
|
} else {
|
|
71
81
|
this.hasMoreResults = true;
|
|
@@ -4,6 +4,7 @@ import { inject as service } from "@ember/service";
|
|
|
4
4
|
import { tracked } from "@glimmer/tracking";
|
|
5
5
|
import { task, dropTask, lastValue } from "ember-concurrency";
|
|
6
6
|
import { periodOfConstructionOptions } from "ember-ebau-gwr/models/options";
|
|
7
|
+
import SearchBuildingValidations from "ember-ebau-gwr/validations/search-building";
|
|
7
8
|
|
|
8
9
|
export default class SearchBuildingController extends Controller {
|
|
9
10
|
@service constructionProject;
|
|
@@ -20,6 +21,8 @@ export default class SearchBuildingController extends Controller {
|
|
|
20
21
|
queryParams = ["projectId"];
|
|
21
22
|
@tracked projectId = null;
|
|
22
23
|
|
|
24
|
+
validations = SearchBuildingValidations;
|
|
25
|
+
|
|
23
26
|
get baseQuery() {
|
|
24
27
|
return {
|
|
25
28
|
streetLang: this.street?.language,
|
|
@@ -3,6 +3,7 @@ import { action } from "@ember/object";
|
|
|
3
3
|
import { inject as service } from "@ember/service";
|
|
4
4
|
import { dropTask, lastValue } from "ember-concurrency";
|
|
5
5
|
import { projectStatusOptions } from "ember-ebau-gwr/models/options";
|
|
6
|
+
import SearchProjectValidations from "ember-ebau-gwr/validations/search-project";
|
|
6
7
|
|
|
7
8
|
export default class SearchProjectController extends Controller {
|
|
8
9
|
@service constructionProject;
|
|
@@ -12,6 +13,8 @@ export default class SearchProjectController extends Controller {
|
|
|
12
13
|
@service notification;
|
|
13
14
|
@service config;
|
|
14
15
|
|
|
16
|
+
validations = SearchProjectValidations;
|
|
17
|
+
|
|
15
18
|
get baseQuery() {
|
|
16
19
|
return {
|
|
17
20
|
constructionSurveyDeptNumber:
|
|
@@ -33,10 +36,12 @@ export default class SearchProjectController extends Controller {
|
|
|
33
36
|
@lastValue("fetchInstanceLinks") links;
|
|
34
37
|
@dropTask
|
|
35
38
|
*fetchInstanceLinks(projects) {
|
|
39
|
+
if (!projects) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
|
|
36
43
|
const links = yield this.store.query("gwr-link", {
|
|
37
|
-
|
|
38
|
-
eproid: projects.map(({ EPROID }) => EPROID),
|
|
39
|
-
},
|
|
44
|
+
eproid__in: projects.map(({ EPROID }) => EPROID).join(","),
|
|
40
45
|
});
|
|
41
46
|
const instanceLinks = yield this.config.fetchInstanceLinks(
|
|
42
47
|
links.map(({ localId }) => localId)
|
package/addon/services/gwr.js
CHANGED
|
@@ -155,8 +155,7 @@ export default class GwrService extends Service {
|
|
|
155
155
|
? "building.edit.dwelling.edit"
|
|
156
156
|
: "building.edit.form",
|
|
157
157
|
linkToModels: [
|
|
158
|
-
instanceId,
|
|
159
|
-
projectId,
|
|
158
|
+
...(instanceId ? [instanceId] : []),
|
|
160
159
|
buildingId,
|
|
161
160
|
...(dwellingId ? [dwellingId] : []),
|
|
162
161
|
],
|
|
@@ -172,6 +171,7 @@ export default class GwrService extends Service {
|
|
|
172
171
|
linkToTextAfter: this.intl.t(`ember-gwr.lifeCycles.statusError`, {
|
|
173
172
|
states: this.concatStates(states),
|
|
174
173
|
}),
|
|
174
|
+
linkToQuery: projectId ? { projectId } : {},
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -119,13 +119,12 @@ export default class QuarterlyClosureService extends Service {
|
|
|
119
119
|
return null;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
await this.authFetch.fetch(
|
|
123
123
|
`/constructionsurveydepts/${this.constructionSurveyDeptNumber}/closeQuarterlySurvey`,
|
|
124
124
|
{ method: "put" }
|
|
125
125
|
);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
);
|
|
126
|
+
|
|
127
|
+
await this.pollProgressStatus();
|
|
129
128
|
}
|
|
130
129
|
|
|
131
130
|
async checkQuarterlySurveyDept() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<div class="uk-padding">
|
|
2
|
-
<h1
|
|
1
|
+
<div class="uk-padding-large">
|
|
2
|
+
<h1>
|
|
3
3
|
{{t "ember-gwr.globalLandingPage.heading"}}
|
|
4
4
|
</h1>
|
|
5
|
-
<h4 class="uk-
|
|
5
|
+
<h4 class="uk-margin-remove-top uk-margin-medium-bottom">
|
|
6
6
|
{{t "ember-gwr.globalLandingPage.infoText"}}
|
|
7
7
|
</h4>
|
|
8
8
|
|
|
9
|
-
<div uk-grid class="uk-child-width-1-1 uk-child-width-1-3@m">
|
|
9
|
+
<div uk-grid class="uk-child-width-1-1 uk-child-width-1-3@m uk-padding-remove-left">
|
|
10
10
|
<TitleCard
|
|
11
11
|
@title={{t "ember-gwr.globalLandingPage.searchProject"}}
|
|
12
12
|
@route="search-project"
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
validatePresence,
|
|
3
|
-
validateNumber,
|
|
4
|
-
} from "ember-changeset-validations/validators";
|
|
1
|
+
import { validatePresence } from "ember-changeset-validations/validators";
|
|
5
2
|
|
|
6
3
|
import { realestateIdentificationValidation } from "./realestate-identification";
|
|
7
4
|
|
|
8
5
|
export default {
|
|
9
|
-
EPROID: validateNumber({
|
|
10
|
-
integer: true,
|
|
11
|
-
gte: 1,
|
|
12
|
-
lte: 900000000,
|
|
13
|
-
allowBlank: true,
|
|
14
|
-
}),
|
|
15
|
-
EGID: validateNumber({
|
|
16
|
-
integer: true,
|
|
17
|
-
gte: 1,
|
|
18
|
-
lte: 900000000,
|
|
19
|
-
allowBlank: true,
|
|
20
|
-
}),
|
|
21
6
|
...realestateIdentificationValidation(),
|
|
22
7
|
createDate: {
|
|
23
8
|
dateTo: validatePresence({
|
|
@@ -114,11 +114,10 @@ $ember-ebau-gwr-required-color: $alert-danger-color !default;
|
|
|
114
114
|
margin-top: 100px;
|
|
115
115
|
|
|
116
116
|
.title-card-text {
|
|
117
|
-
@extend .uk-text-
|
|
117
|
+
@extend .uk-text-large, .uk-text-light;
|
|
118
118
|
white-space: pre-line;
|
|
119
119
|
line-height: 1.5;
|
|
120
|
-
margin-top:
|
|
121
|
-
font-weight: 400;
|
|
120
|
+
margin-top: 10px;
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ ember-gwr:
|
|
|
34
34
|
690: Kopieren der Daten in den Snapshot
|
|
35
35
|
691: Erzwungener Abschluss von BFS
|
|
36
36
|
short:
|
|
37
|
-
processing:
|
|
37
|
+
processing: Anfrage noch nicht verarbeitet
|
|
38
38
|
610: Quartalsabschluss initialisiert
|
|
39
39
|
620: Abschluss erforderlich
|
|
40
40
|
630: Fehler müssen korrigiert werden
|