ember-ebau-gwr 5.0.4 → 6.0.0
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 +33 -0
- package/README.md +1 -1
- package/addon/components/instance-link.hbs +16 -0
- package/addon/components/linked-models.hbs +45 -41
- package/addon/components/linked-models.js +1 -0
- package/addon/components/linked-projects.hbs +7 -2
- package/addon/components/linked-projects.js +2 -1
- package/addon/components/login-modal.hbs +1 -0
- package/addon/components/model-errors/list.hbs +5 -3
- package/addon/components/model-form/date.hbs +30 -19
- package/addon/components/model-form/date.js +6 -0
- package/addon/components/model-form/field.js +1 -5
- package/addon/components/model-form/header/actions.hbs +2 -2
- package/addon/components/model-form/header/status-selector.hbs +96 -85
- package/addon/components/model-form/header.hbs +5 -4
- package/addon/components/model-form.hbs +4 -3
- package/addon/components/model-form.js +2 -1
- package/addon/components/project-landing-page.hbs +16 -12
- package/addon/components/project-landing-page.js +6 -0
- package/addon/components/quarterly-closure/card-status.hbs +2 -2
- package/addon/components/quarterly-closure/card-status.js +2 -36
- package/addon/components/quarterly-closure/close-survey-button.hbs +11 -1
- package/addon/components/quarterly-closure/disabled-form-alert.hbs +3 -0
- package/addon/components/quarterly-closure/disabled-form-info.hbs +3 -3
- package/addon/components/quarterly-closure/error-list/project-errors.hbs +1 -1
- package/addon/components/quarterly-closure/error-list/survey-department-errors.hbs +6 -2
- package/addon/components/quarterly-closure/status.hbs +13 -5
- package/addon/components/quarterly-closure/status.js +30 -1
- package/addon/components/quarterly-closure/title.hbs +13 -10
- package/addon/components/quarterly-closure.hbs +3 -2
- package/addon/components/search/filters.hbs +11 -5
- package/addon/components/search/result-table/load-more.hbs +7 -5
- package/addon/components/search/result-table/row/field.hbs +1 -1
- package/addon/components/search.js +2 -0
- package/addon/components/title-card.hbs +1 -2
- package/addon/controllers/building/edit/dwelling/edit.js +4 -0
- package/addon/controllers/building/edit/form.js +4 -0
- package/addon/controllers/import.js +2 -2
- package/addon/controllers/project/form.js +4 -0
- package/addon/controllers/project.js +10 -5
- package/addon/controllers/search-building.js +2 -0
- package/addon/controllers/search-project.js +35 -3
- package/addon/helpers/current-quarter.js +24 -3
- package/addon/resources/import.js +9 -0
- package/addon/services/auth-fetch.js +18 -13
- package/addon/services/gwr.js +16 -3
- package/addon/services/quarterly-closure.js +5 -2
- package/addon/templates/building/edit/dwelling/edit.hbs +4 -4
- package/addon/templates/building/edit/entrance/edit/index.hbs +10 -10
- package/addon/templates/building/edit/form.hbs +4 -4
- package/addon/templates/global-landing-page.hbs +1 -1
- package/addon/templates/project/form.hbs +4 -4
- package/addon/templates/quarterly-closure.hbs +4 -0
- package/addon/templates/search-project.hbs +5 -0
- package/addon/validations/extended-search-fields.js +16 -1
- package/app/styles/ember-ebau-gwr.scss +4 -0
- package/config/environment.js +0 -11
- package/config/icons.js +1 -0
- package/index.js +10 -0
- package/package.json +13 -13
- package/translations/de.yaml +6 -3
- package/translations/quarterly-closure/de.yaml +10 -4
- package/translations/validation-errors/de.yaml +35 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
# [6.0.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v5.0.4...v6.0.0) (2022-09-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **date:** update validated form and allow date to be cleared ([006653a](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/006653a1246343a934a306b4402dd957867200cd))
|
|
7
|
+
* **forms:** disable object links during quarterly closure ([b9d054f](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/b9d054f8bf756bcc742639ff84f8d4fa20166572))
|
|
8
|
+
* **global:** display both status change and correction in global view ([256b7d8](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/256b7d814ae68a6fd2465450b723deeeab9fa762))
|
|
9
|
+
* **global:** minor layout fixes ([295d6cb](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/295d6cb9ddac13095ab6fb636fde11bd5ddf7e62))
|
|
10
|
+
* **global:** minor ui fixes ([b9b1abd](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/b9b1abdd9f1f7cc0b0c48cd92bbce4372b379865))
|
|
11
|
+
* **import:** fix access to import resource after it was destroyed ([08830ef](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/08830ef43a13dc8de24e045dbe2f35e4276e5746))
|
|
12
|
+
* **login:** prevent requests if no token is returned from gwr api ([ad2b9b8](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/ad2b9b8bf59715250827b267467368fb3a334375))
|
|
13
|
+
* **projects:** ensure linked projects are recomputed correctly ([e018a29](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/e018a29d9f6450af5bb19ca9287be7543cda751f))
|
|
14
|
+
* **quarterly-closure:** display quarter according to bfs ([7fdfde4](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/7fdfde485a6b04cf1680d43c53ed8f85b99c12a1))
|
|
15
|
+
* **search:** minor table styling fixes ([d451149](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/d4511497b0645be9f148e56cfb5b2e5178726441))
|
|
16
|
+
* **search:** validate building and search id in search ([8b731ea](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/8b731ea8d878219599263735cdea98034f466233))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Documentation
|
|
20
|
+
|
|
21
|
+
* **readme:** update supported node version ([94af4da](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/94af4daf66d3c2db1d16ee6267862909d957fe01))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **search:** include instance links for linked projects ([2f8d348](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/2f8d348410dc95dc3e2ae4e5a1f525e2241be7ae))
|
|
27
|
+
* **search:** sort results by descending modification date ([8b0d46e](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/8b0d46eac8a28adc49dbcfbb53f5ebd8e9b41c7e))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### BREAKING CHANGES
|
|
31
|
+
|
|
32
|
+
* **readme:** Drop node v12 support.
|
|
33
|
+
|
|
1
34
|
## [5.0.4](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v5.0.3...v5.0.4) (2022-09-05)
|
|
2
35
|
|
|
3
36
|
|
package/README.md
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{{#if @links.length}}
|
|
2
|
+
<div class="uk-flex uk-flex-inline uk-flex-middle">
|
|
3
|
+
<UkIcon @icon="link" class="uk-text-emphasis" />
|
|
4
|
+
{{#each @links as |link index|}}
|
|
5
|
+
{{#if index}}
|
|
6
|
+
<span class="margin-right-xs">,</span>
|
|
7
|
+
{{/if}}
|
|
8
|
+
<a
|
|
9
|
+
class="uk-button uk-button-link"
|
|
10
|
+
href={{concat link.hostLink link.localLink}}
|
|
11
|
+
>
|
|
12
|
+
{{link.identifier}}
|
|
13
|
+
</a>
|
|
14
|
+
{{/each}}
|
|
15
|
+
</div>
|
|
16
|
+
{{/if}}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{{#each @models as |model|}}
|
|
22
22
|
<tr>
|
|
23
23
|
{{yield model}}
|
|
24
|
-
{{#if @removeLink}}
|
|
24
|
+
{{#if (and (not this.quarterlyClosure.formsDisabled) @removeLink)}}
|
|
25
25
|
<td class="uk-table-shrink">
|
|
26
26
|
<button
|
|
27
27
|
type="button"
|
|
@@ -49,49 +49,53 @@
|
|
|
49
49
|
<tfoot>
|
|
50
50
|
<tr>
|
|
51
51
|
<td colspan="99" class="uk-text-center">
|
|
52
|
-
{{#if
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{{
|
|
60
|
-
|
|
52
|
+
{{#if this.quarterlyClosure.formsDisabled}}
|
|
53
|
+
<QuarterlyClosure::DisabledFormInfo />
|
|
54
|
+
{{else}}
|
|
55
|
+
{{#if @searchRoute}}
|
|
56
|
+
<LinkTo
|
|
57
|
+
@route={{@searchRoute}}
|
|
58
|
+
@models={{or @searchModels (array)}}
|
|
59
|
+
@query={{or @searchQuery (hash)}}
|
|
60
|
+
>
|
|
61
|
+
{{#if (eq @modelName "building")}}
|
|
62
|
+
{{t "ember-gwr.components.linkedModels.linkExistingBuilding"}}
|
|
63
|
+
{{else}}
|
|
64
|
+
{{t
|
|
65
|
+
"ember-gwr.components.linkedModels.linkEntry"
|
|
66
|
+
modelName=modelName
|
|
67
|
+
}}
|
|
68
|
+
{{/if}}
|
|
69
|
+
</LinkTo>
|
|
70
|
+
{{/if}}
|
|
71
|
+
{{#if (and @searchRoute @newRoute)}}
|
|
72
|
+
{{t "ember-gwr.components.linkedModels.or"}}
|
|
73
|
+
{{/if}}
|
|
74
|
+
{{#if @newRoute}}
|
|
75
|
+
<LinkTo
|
|
76
|
+
@route={{@newRoute}}
|
|
77
|
+
@models={{or @newModels (array)}}
|
|
78
|
+
@query={{or @newQuery (hash)}}
|
|
79
|
+
>
|
|
61
80
|
{{t
|
|
62
|
-
"ember-gwr.components.linkedModels.
|
|
81
|
+
"ember-gwr.components.linkedModels.createEntry"
|
|
63
82
|
modelName=modelName
|
|
83
|
+
model=@modelName
|
|
64
84
|
}}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
modelName=modelName
|
|
80
|
-
model=@modelName
|
|
81
|
-
}}
|
|
82
|
-
</LinkTo>
|
|
83
|
-
{{else if @addLink}}
|
|
84
|
-
<button
|
|
85
|
-
type="button"
|
|
86
|
-
class="uk-button uk-button-link"
|
|
87
|
-
{{on "click" @addLink}}
|
|
88
|
-
>
|
|
89
|
-
{{t
|
|
90
|
-
"ember-gwr.components.linkedModels.createEntry"
|
|
91
|
-
modelName=modelName
|
|
92
|
-
model=@modelName
|
|
93
|
-
}}
|
|
94
|
-
</button>
|
|
85
|
+
</LinkTo>
|
|
86
|
+
{{else if @addLink}}
|
|
87
|
+
<button
|
|
88
|
+
type="button"
|
|
89
|
+
class="uk-button uk-button-link"
|
|
90
|
+
{{on "click" @addLink}}
|
|
91
|
+
>
|
|
92
|
+
{{t
|
|
93
|
+
"ember-gwr.components.linkedModels.createEntry"
|
|
94
|
+
modelName=modelName
|
|
95
|
+
model=@modelName
|
|
96
|
+
}}
|
|
97
|
+
</button>
|
|
98
|
+
{{/if}}
|
|
95
99
|
{{/if}}
|
|
96
100
|
</td>
|
|
97
101
|
</tr>
|
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
{{project.constructionProjectDescription}}
|
|
21
21
|
</td>
|
|
22
22
|
<td class="uk-table-shrink">
|
|
23
|
-
{{#if
|
|
23
|
+
{{#if
|
|
24
|
+
(and
|
|
25
|
+
(eq @activeProjectId project.EPROID)
|
|
26
|
+
(not this.quarterlyClosure.formsDisabled)
|
|
27
|
+
)
|
|
28
|
+
}}
|
|
24
29
|
<button
|
|
25
30
|
type="button"
|
|
26
31
|
class="uk-icon-button"
|
|
@@ -33,4 +38,4 @@
|
|
|
33
38
|
</button>
|
|
34
39
|
{{/if}}
|
|
35
40
|
</td>
|
|
36
|
-
</LinkedModels>
|
|
41
|
+
</LinkedModels>
|
|
@@ -7,6 +7,7 @@ export default class LinkedProjectsComponent extends Component {
|
|
|
7
7
|
@service router;
|
|
8
8
|
@service store;
|
|
9
9
|
@service constructionProject;
|
|
10
|
+
@service quarterlyClosure;
|
|
10
11
|
|
|
11
12
|
@action
|
|
12
13
|
async removeProjectLink() {
|
|
@@ -14,6 +15,6 @@ export default class LinkedProjectsComponent extends Component {
|
|
|
14
15
|
.peekAll("gwr-link")
|
|
15
16
|
.find(({ eproid }) => Number(eproid) === this.args.activeProjectId);
|
|
16
17
|
await link.destroyRecord();
|
|
17
|
-
|
|
18
|
+
this.router.transitionTo("project.index");
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -24,9 +24,11 @@
|
|
|
24
24
|
</li>
|
|
25
25
|
{{else}}
|
|
26
26
|
<li>
|
|
27
|
-
<div class="uk-text-success">
|
|
28
|
-
<FaIcon @icon="circle-check" @fixedWidth={{true}} />
|
|
29
|
-
|
|
27
|
+
<div class="uk-text-success uk-flex uk-flex-middle">
|
|
28
|
+
<FaIcon @icon="circle-check" @fixedWidth={{true}} class="margin-right-xs" @size="sm" />
|
|
29
|
+
<div>
|
|
30
|
+
{{t "ember-gwr.components.modelErrors.empty"}}
|
|
31
|
+
</div>
|
|
30
32
|
</div>
|
|
31
33
|
</li>
|
|
32
34
|
{{/each}}
|
|
@@ -15,25 +15,36 @@
|
|
|
15
15
|
...attributes
|
|
16
16
|
/>
|
|
17
17
|
{{else}}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
|
|
19
|
+
<div class="uk-inline uk-width-1-1">
|
|
20
|
+
{{#if @value}}
|
|
21
|
+
<button
|
|
22
|
+
type="button"
|
|
23
|
+
class="uk-form-icon uk-form-icon-flip"
|
|
24
|
+
uk-icon="icon: close; ratio: 0.7"
|
|
25
|
+
{{on "click" this.clearDate}}
|
|
26
|
+
/>
|
|
27
|
+
{{/if}}
|
|
28
|
+
<input
|
|
29
|
+
type="text"
|
|
30
|
+
class="uk-input uk-width-1
|
|
31
|
+
{{if @isInvalid 'uk-form-danger'}}
|
|
32
|
+
{{if @isValid 'uk-form-success'}}"
|
|
33
|
+
name={{@name}}
|
|
34
|
+
required={{@required}}
|
|
35
|
+
placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
|
|
36
|
+
...attributes
|
|
37
|
+
{{pikaday
|
|
38
|
+
value=@value
|
|
39
|
+
yearRange=this.yearRange
|
|
40
|
+
onSelect=@update
|
|
41
|
+
toString=this.formatDate
|
|
42
|
+
firstDay=1
|
|
43
|
+
i18n=this.pikadayTranslations
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
36
47
|
{{/if}}
|
|
37
48
|
</div>
|
|
38
49
|
{{component @hintComponent}}
|
|
39
|
-
{{component @errorComponent}}
|
|
50
|
+
{{component @errorComponent}}
|
|
@@ -70,11 +70,7 @@ export default class ModelFormFieldComponent extends Component {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
get fieldComponent() {
|
|
73
|
-
return this.isStep
|
|
74
|
-
? "model-form/step"
|
|
75
|
-
: this.isDate
|
|
76
|
-
? "model-form/date"
|
|
77
|
-
: "validated-input/render";
|
|
73
|
+
return this.isStep ? "model-form/step" : "validated-input/render";
|
|
78
74
|
}
|
|
79
75
|
|
|
80
76
|
get options() {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{{#let @submit as |Submit|}}
|
|
60
60
|
<Submit />
|
|
61
61
|
{{/let}}
|
|
62
|
-
{{#if (or @modelHasImport @
|
|
62
|
+
{{#if (or @modelHasImport @statusConfiguration)}}
|
|
63
63
|
<button
|
|
64
64
|
class="uk-button uk-button-default uk-flex-none uk-padding-small uk-padding-remove-vertical"
|
|
65
65
|
type="button"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
</LinkTo>
|
|
96
96
|
</li>
|
|
97
97
|
{{/if}}
|
|
98
|
-
{{#if @
|
|
98
|
+
{{#if @statusConfiguration}}
|
|
99
99
|
<li>
|
|
100
100
|
<a
|
|
101
101
|
href="#ember-ebau-gwr-status"
|
|
@@ -58,96 +58,107 @@
|
|
|
58
58
|
>
|
|
59
59
|
{{t "ember-gwr.components.header.statusSelector.actionInfo"}}
|
|
60
60
|
</div>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
61
|
+
{{#if @statusConfiguration.correction}}
|
|
62
|
+
<ModelForm::Header::StatusSelector::SubmitParameters
|
|
63
|
+
@submitLabel={{t
|
|
64
|
+
"ember-gwr.components.header.statusSelector.submitCorrectionLabel"
|
|
65
|
+
}}
|
|
66
|
+
@loading={{and this.submit.isRunning (not this.isChange)}}
|
|
67
|
+
@isPrimary={{false}}
|
|
68
|
+
@dropTitle={{t
|
|
69
|
+
"ember-gwr.components.header.statusSelector.correctionDropTitle"
|
|
70
|
+
}}
|
|
71
|
+
@confirmLabel={{t
|
|
72
|
+
"ember-gwr.components.header.statusSelector.confirmCorrection"
|
|
73
|
+
}}
|
|
74
|
+
@parameters={{this.correctionParameters}}
|
|
75
|
+
@onSubmit={{this.submit}}
|
|
76
|
+
@changeset={{this.changesetCorrection}}
|
|
77
|
+
@errors={{this.correctionErrors}}
|
|
78
|
+
@showDrop={{this.correctionParameters.length}}
|
|
79
|
+
@isChange={{false}}
|
|
80
|
+
@translationBase={{@translationBase}}
|
|
81
|
+
/>
|
|
82
|
+
{{/if}}
|
|
83
|
+
{{#if @statusConfiguration.change}}
|
|
84
|
+
<ModelForm::Header::StatusSelector::SubmitParameters
|
|
85
|
+
@submitLabel={{t
|
|
86
|
+
"ember-gwr.components.header.statusSelector.submitChangeLabel"
|
|
87
|
+
}}
|
|
88
|
+
@loading={{and this.submit.isRunning this.isChange}}
|
|
89
|
+
@disabled={{not this.isValidStatusChange}}
|
|
90
|
+
@isPrimary={{true}}
|
|
91
|
+
@dropTitle={{t
|
|
92
|
+
"ember-gwr.components.header.statusSelector.changeDropTitle"
|
|
93
|
+
}}
|
|
94
|
+
@confirmLabel={{t
|
|
95
|
+
"ember-gwr.components.header.statusSelector.confirmChange"
|
|
96
|
+
}}
|
|
97
|
+
@parameters={{this.changeParameters}}
|
|
98
|
+
@onSubmit={{this.submit}}
|
|
99
|
+
@changeset={{this.changesetChange}}
|
|
100
|
+
@errors={{this.changeErrors}}
|
|
101
|
+
@showDrop={{and (not this.errors) this.changeParameters.length}}
|
|
102
|
+
@isChange={{true}}
|
|
103
|
+
@translationBase={{@translationBase}}
|
|
104
|
+
/>
|
|
105
|
+
{{/if}}
|
|
102
106
|
</div>
|
|
103
107
|
</div>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<div class="uk-flex-inline uk-flex-
|
|
115
|
-
<div class="uk-
|
|
116
|
-
|
|
108
|
+
{{#if @statusConfiguration.change}}
|
|
109
|
+
<div
|
|
110
|
+
class="uk-flex uk-flex-nowrap uk-flex-between uk-child-width-1-2 uk-flex-top uk-margin-remove-bottom uk-margin-top"
|
|
111
|
+
>
|
|
112
|
+
{{#if this.modelStatus}}
|
|
113
|
+
<div
|
|
114
|
+
class="uk-flex-inline uk-text-small uk-margin-remove-bottom uk-margin-large-right"
|
|
115
|
+
uk-alert
|
|
116
|
+
>
|
|
117
|
+
<div class="uk-margin-right uk-flex-none" uk-icon="icon: info"></div>
|
|
118
|
+
<div class="uk-flex-inline uk-flex-column">
|
|
119
|
+
<div class="uk-flex-inline uk-flex-top">
|
|
120
|
+
<div class="uk-margin-right uk-flex-none">
|
|
121
|
+
{{t "ember-gwr.components.header.statusSelector.statusInfo"}}
|
|
122
|
+
</div>
|
|
117
123
|
</div>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
<div
|
|
125
|
+
class="uk-flex-inline uk-flex-wrap uk-width-expand uk-margin-small-top"
|
|
126
|
+
>
|
|
127
|
+
{{#each @nextValidStates as |state index|}}
|
|
128
|
+
<div class="uk-flex-inline uk-flex-middle">
|
|
129
|
+
<div>
|
|
130
|
+
{{t
|
|
131
|
+
(concat
|
|
132
|
+
"ember-gwr.lifeCycles."
|
|
133
|
+
@modelName
|
|
134
|
+
".statusOptions."
|
|
135
|
+
state
|
|
136
|
+
)
|
|
137
|
+
}}
|
|
138
|
+
</div>
|
|
139
|
+
{{#if (not (eq index (dec @nextValidStates.length)))}}
|
|
140
|
+
<div class="uk-margin-small-left uk-margin-small-right">
|
|
141
|
+
|
|
|
142
|
+
</div>
|
|
143
|
+
{{/if}}
|
|
144
|
+
</div>
|
|
145
|
+
{{/each}}
|
|
146
|
+
{{#unless @nextValidStates.length}}
|
|
147
|
+
<div class="uk-flex-inline uk-flex-middle">
|
|
125
148
|
{{t
|
|
126
|
-
|
|
127
|
-
"ember-gwr.lifeCycles." @modelName ".statusOptions." state
|
|
128
|
-
)
|
|
149
|
+
"ember-gwr.components.header.statusSelector.noNextStates"
|
|
129
150
|
}}
|
|
130
151
|
</div>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
|
134
|
-
</div>
|
|
135
|
-
{{/if}}
|
|
136
|
-
</div>
|
|
137
|
-
{{/each}}
|
|
138
|
-
{{#unless @nextValidStates.length}}
|
|
139
|
-
<div class="uk-flex-inline uk-flex-middle">
|
|
140
|
-
{{t "ember-gwr.components.header.statusSelector.noNextStates"}}
|
|
141
|
-
</div>
|
|
142
|
-
{{/unless}}
|
|
152
|
+
{{/unless}}
|
|
153
|
+
</div>
|
|
143
154
|
</div>
|
|
144
155
|
</div>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</div>
|
|
156
|
+
{{/if}}
|
|
157
|
+
{{#if (or this.errors.length this.errors.linkToRoute)}}
|
|
158
|
+
<div class="uk-flex-inline">
|
|
159
|
+
<ModelForm::SubmitErrors @errors={{this.errors}} />
|
|
160
|
+
</div>
|
|
161
|
+
{{/if}}
|
|
162
|
+
</div>
|
|
163
|
+
{{/if}}
|
|
164
|
+
</div>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<ModelForm::Header::Actions
|
|
10
10
|
@submit={{@submit}}
|
|
11
11
|
@submitErrors={{@submitErrors}}
|
|
12
|
-
@
|
|
12
|
+
@statusConfiguration={{and @statusConfiguration @model (not @model.isNew)}}
|
|
13
13
|
@modelHasImport={{@modelHasImport}}
|
|
14
14
|
@import={{@import}}
|
|
15
15
|
@importAllData={{@importAllData}}
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
{{#let (t (concat "ember-gwr.models." @modelName) count=1) as |modelName|}}
|
|
25
25
|
<div
|
|
26
26
|
class="uk-flex uk-margin-top
|
|
27
|
-
{{if @
|
|
27
|
+
{{if @statusConfiguration 'uk-flex-between' 'uk-flex-right'}}
|
|
28
28
|
uk-flex-bottom uk-flex-wrap uk-flex-wrap-around"
|
|
29
29
|
>
|
|
30
|
-
{{#if @
|
|
30
|
+
{{#if @statusConfiguration}}
|
|
31
31
|
<ModelForm::Header::Status
|
|
32
32
|
@model={{@model}}
|
|
33
33
|
@modelName={{@modelName}}
|
|
@@ -54,8 +54,9 @@
|
|
|
54
54
|
@getChangeHint={{@getChangeHint}}
|
|
55
55
|
@modelStatusField={{@modelStatusField}}
|
|
56
56
|
@translationBase={{or @translationBaseHeader @translationBase}}
|
|
57
|
+
@statusConfiguration={{@statusConfiguration}}
|
|
57
58
|
/>
|
|
58
59
|
{{/if}}
|
|
59
60
|
{{/let}}
|
|
60
61
|
<hr class="uk-margin-small-top" />
|
|
61
|
-
{{/if}}
|
|
62
|
+
{{/if}}
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
<ValidatedForm
|
|
31
31
|
@model={{if @validations (changeset @model @validations) @model}}
|
|
32
32
|
@on-submit={{perform this.submit}}
|
|
33
|
+
@on-invalid-submit={{fn (mut this.invalidSubmit) true}}
|
|
33
34
|
@validateBeforeSubmit={{true}}
|
|
34
35
|
class="validated-form"
|
|
35
36
|
...attributes
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
(component
|
|
48
49
|
"model-form/submit-errors"
|
|
49
50
|
errors=(if
|
|
50
|
-
(and f.model.isInvalid f.model.isDirty)
|
|
51
|
+
(and f.model.isInvalid f.model.isDirty this.invalidSubmit)
|
|
51
52
|
(array (t "ember-gwr.components.modelForm.validationError"))
|
|
52
53
|
@errors
|
|
53
54
|
)
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
@projectId={{@projectId}}
|
|
62
63
|
@modelName={{@modelName}}
|
|
63
64
|
@modelDescription={{@headerModelDescription}}
|
|
64
|
-
@
|
|
65
|
+
@statusConfiguration={{@statusConfiguration}}
|
|
65
66
|
@import={{this.importData}}
|
|
66
67
|
@modelHasImport={{this.modelHasImport}}
|
|
67
68
|
@importAllData={{this.importAllData}}
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
{{t "ember-gwr.components.modelForm.cancelImport"}}
|
|
104
105
|
</LinkTo>
|
|
105
106
|
{{/if}}
|
|
106
|
-
{{#if (or (and f.model.isInvalid f.model.isDirty) @errors)}}
|
|
107
|
+
{{#if (or (and f.model.isInvalid f.model.isDirty this.invalidSubmit) @errors)}}
|
|
107
108
|
<div class="uk-margin-left uk-flex-inline">
|
|
108
109
|
<SubmitErrors />
|
|
109
110
|
</div>
|
|
@@ -16,8 +16,9 @@ export default class ModelFormComponent extends Component {
|
|
|
16
16
|
// so we can transition out of the import once the array is empty.
|
|
17
17
|
// All diff state tracking is done in field.js
|
|
18
18
|
@tracked diffs = [];
|
|
19
|
+
@tracked invalidSubmit = false;
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
import = ImportResource.from(this, () => ({
|
|
21
22
|
instanceId: this.args.instanceId,
|
|
22
23
|
showImport: this.args.showImport,
|
|
23
24
|
importModelName: this.args.importModelName ?? this.args.modelName,
|
|
@@ -9,18 +9,22 @@
|
|
|
9
9
|
{{t "ember-gwr.projectLandingPage.infoText"}}
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
{{#if this.quarterlyClosure.formsDisabled}}
|
|
13
|
+
<QuarterlyClosure::DisabledFormAlert />
|
|
14
|
+
{{else}}
|
|
15
|
+
<div class="uk-flex uk-flex-between">
|
|
16
|
+
<div class="uk-margin-large-right">
|
|
17
|
+
<LinkTo @route="project.new" class="uk-button uk-button-primary">
|
|
18
|
+
{{t "ember-gwr.projectLandingPage.createNewProject"}}
|
|
19
|
+
</LinkTo>
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<LinkTo @route="search-project" class="uk-button uk-button-primary">
|
|
23
|
+
{{t "ember-gwr.projectLandingPage.linkExistingProject"}}
|
|
24
|
+
</LinkTo>
|
|
25
|
+
</div>
|
|
17
26
|
</div>
|
|
18
|
-
|
|
19
|
-
<LinkTo @route="search-project" class="uk-button uk-button-primary">
|
|
20
|
-
{{t "ember-gwr.projectLandingPage.linkExistingProject"}}
|
|
21
|
-
</LinkTo>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
27
|
+
{{/if}}
|
|
24
28
|
</div>
|
|
25
29
|
</div>
|
|
26
|
-
</div>
|
|
30
|
+
</div>
|