ember-ebau-gwr 4.0.7 → 5.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 +312 -299
- package/README.md +25 -8
- package/addon/components/building-preview.hbs +53 -0
- package/addon/components/housing-stat-link.hbs +8 -0
- package/addon/components/import-modal/building-data.hbs +1 -55
- package/addon/components/import-modal/dwelling-data.hbs +3 -3
- package/addon/components/import-modal/entrance-data.hbs +1 -1
- package/addon/components/import-modal.hbs +1 -4
- package/addon/components/link-building-modal.hbs +38 -24
- package/addon/components/link-building-modal.js +13 -5
- package/addon/components/link-street.hbs +33 -31
- package/addon/components/linked-models.hbs +13 -6
- package/addon/components/linked-projects.hbs +8 -6
- package/addon/components/linked-projects.js +13 -0
- package/addon/components/loading.hbs +3 -0
- package/addon/components/login-modal.hbs +86 -68
- package/addon/components/model-errors/error-indicator.hbs +1 -2
- package/addon/components/model-errors/header.hbs +6 -2
- package/addon/components/model-errors/list.hbs +13 -4
- package/addon/components/model-errors/skeleton-errors.hbs +14 -0
- package/addon/components/model-errors/skeleton.hbs +1 -16
- package/addon/components/model-errors.hbs +14 -16
- package/addon/components/model-form/date.hbs +10 -6
- package/addon/components/model-form/diff.hbs +8 -8
- package/addon/components/model-form/field.hbs +3 -2
- package/addon/components/model-form/field.js +7 -5
- package/addon/components/model-form/header/actions.hbs +25 -22
- package/addon/components/model-form/header/actions.js +6 -3
- package/addon/components/model-form/header/errors.hbs +16 -16
- package/addon/components/model-form/header/status-selector/submit-parameters.hbs +2 -1
- package/addon/components/model-form/header/status-selector.hbs +15 -3
- package/addon/components/model-form/header/status.hbs +2 -1
- package/addon/components/model-form/header.hbs +6 -5
- package/addon/components/model-form/step.hbs +5 -5
- package/addon/components/model-form/submit.hbs +1 -0
- package/addon/components/model-form.hbs +110 -77
- package/addon/components/model-form.js +38 -2
- package/addon/components/model-inview.hbs +2 -7
- package/addon/components/project-landing-page.hbs +26 -0
- package/addon/components/project-nav.hbs +65 -0
- package/addon/components/project-nav.js +27 -0
- package/addon/components/quarterly-closure/card-status.hbs +11 -0
- package/addon/components/quarterly-closure/card-status.js +36 -0
- package/addon/components/quarterly-closure/close-survey-button.hbs +10 -0
- package/addon/components/quarterly-closure/close-survey-button.js +46 -0
- package/addon/components/quarterly-closure/disabled-form-info.hbs +4 -0
- package/addon/components/quarterly-closure/error-list/project-errors.hbs +22 -0
- package/addon/components/quarterly-closure/error-list/project-errors.js +41 -0
- package/addon/components/quarterly-closure/error-list/survey-department-errors.hbs +22 -0
- package/addon/components/quarterly-closure/error-list/survey-department-errors.js +28 -0
- package/addon/components/quarterly-closure/error-list.hbs +4 -0
- package/addon/components/quarterly-closure/status.hbs +8 -0
- package/addon/components/quarterly-closure/status.js +6 -0
- package/addon/components/quarterly-closure/title.hbs +15 -0
- package/addon/components/quarterly-closure/title.js +11 -0
- package/addon/components/quarterly-closure.hbs +9 -0
- package/addon/components/quarterly-closure.js +6 -0
- package/addon/components/search/filters.hbs +128 -106
- package/addon/components/search/filters.js +13 -59
- package/addon/components/search/result-table/head/header.hbs +1 -1
- package/addon/components/search/result-table/head.hbs +1 -1
- package/addon/components/search/result-table/load-more.hbs +5 -0
- package/addon/components/search/result-table/row/field.hbs +1 -1
- package/addon/components/search/result-table/row.hbs +12 -13
- package/addon/components/search/result-table.hbs +3 -2
- package/addon/components/search.hbs +29 -0
- package/addon/components/search.js +96 -0
- package/addon/components/soon-available.hbs +7 -0
- package/addon/components/sub-nav.hbs +5 -8
- package/addon/components/title-card.hbs +28 -0
- package/addon/components/validated-form-error.hbs +4 -0
- package/addon/components/validated-form-error.js +14 -0
- package/addon/controllers/building/edit/dwelling/edit.js +2 -3
- package/addon/controllers/building/edit/entrance/edit/index.js +2 -3
- package/addon/controllers/building/edit/entrance/edit/link-street.js +4 -1
- package/addon/controllers/building/edit/form.js +57 -39
- package/addon/controllers/import.js +8 -64
- package/addon/controllers/project/form.js +3 -4
- package/addon/controllers/project.js +22 -44
- package/addon/controllers/search-building.js +39 -14
- package/addon/controllers/search-project.js +24 -19
- package/addon/helpers/current-quarter.js +8 -0
- package/addon/helpers/current-route-is-not.js +7 -0
- package/addon/helpers/current-route-is.js +15 -0
- package/addon/helpers/is-set.js +9 -0
- package/addon/helpers/is-unset.js +4 -4
- package/addon/helpers/show-model-field.js +4 -4
- package/addon/models/check-construction-project-response.js +20 -0
- package/addon/models/check-survey-department-response.js +20 -0
- package/addon/models/quarterly-closure-status.js +52 -0
- package/addon/modifiers/in-viewport.js +14 -0
- package/addon/modifiers/inverse-background.js +21 -0
- package/addon/resources/import.js +69 -0
- package/addon/routes/building/edit.js +1 -1
- package/addon/routes/building/new.js +1 -1
- package/addon/routes/building.js +7 -2
- package/addon/routes/global-landing-page.js +9 -0
- package/addon/routes/project/errors.js +1 -1
- package/addon/routes/project/form.js +1 -1
- package/addon/routes/project/new.js +1 -1
- package/addon/routes/project.js +1 -1
- package/addon/routes/quarterly-closure.js +3 -0
- package/addon/routes/search-building.js +7 -2
- package/addon/routes.js +7 -3
- package/addon/services/auth-fetch.js +6 -7
- package/addon/services/construction-project.js +10 -0
- package/addon/services/gwr.js +19 -7
- package/addon/services/quarterly-closure.js +147 -0
- package/addon/templates/building/edit/dwelling/edit.hbs +22 -19
- package/addon/templates/building/edit/dwelling/new.hbs +1 -1
- package/addon/templates/building/edit/dwelling.hbs +1 -1
- package/addon/templates/building/edit/dwellings.hbs +3 -4
- package/addon/templates/building/edit/entrance/edit/index.hbs +32 -18
- package/addon/templates/building/edit/entrance/edit/link-street.hbs +79 -75
- package/addon/templates/building/edit/entrance/edit.hbs +1 -1
- package/addon/templates/building/edit/entrance/new.hbs +1 -1
- package/addon/templates/building/edit/entrance.hbs +6 -5
- package/addon/templates/building/edit/entrances.hbs +4 -6
- package/addon/templates/building/edit/form.hbs +127 -112
- package/addon/templates/building/edit/index.hbs +1 -1
- package/addon/templates/building/edit.hbs +33 -23
- package/addon/templates/building.hbs +1 -1
- package/addon/templates/global-landing-page.hbs +34 -0
- package/addon/templates/project/errors.hbs +116 -109
- package/addon/templates/project/form.hbs +96 -63
- package/addon/templates/project/index.hbs +0 -1
- package/addon/templates/project/linked-buildings.hbs +7 -10
- package/addon/templates/project.hbs +12 -73
- package/addon/templates/quarterly-closure.hbs +1 -0
- package/addon/templates/search-building.hbs +202 -134
- package/addon/templates/search-project.hbs +98 -85
- package/addon/validations/building-work.js +106 -97
- package/addon/validations/extended-search-fields.js +27 -0
- package/addon/validations/realestate-identification.js +1 -0
- package/addon/xml/helpers.js +3 -0
- package/addon/xml/templates/building.js +1 -1
- package/addon/xml/templates/construction-project.js +1 -1
- package/app/styles/ember-ebau-gwr.scss +19 -0
- package/config/environment.js +4 -0
- package/config/icons.js +15 -0
- package/package.json +19 -15
- package/translations/de.yaml +29 -26
- package/translations/fr.yaml +11 -19
- package/translations/quarterly-closure/de.yaml +59 -0
- package/translations/validation-errors/de.yaml +37 -0
- package/addon/components/landing-page.hbs +0 -24
- package/addon/components/project-form/checkbox.hbs +0 -11
- package/addon/components/project-form/checkbox.js +0 -9
- package/addon/components/project-form/date.hbs +0 -10
- package/addon/components/project-form/diff.hbs +0 -43
- package/addon/components/project-form/diff.js +0 -18
- package/addon/components/project-form/field.hbs +0 -32
- package/addon/components/project-form/field.js +0 -59
- package/addon/components/project-form/input.hbs +0 -7
- package/addon/components/project-form/label.hbs +0 -17
- package/addon/components/project-form/select.hbs +0 -17
- package/addon/components/project-form/textarea.hbs +0 -7
- package/addon/components/project-form.hbs +0 -19
- package/addon/components/project-form.js +0 -14
- package/addon/components/sub-nav.js +0 -18
- package/addon/services/import-state.js +0 -10
|
@@ -1,70 +1,88 @@
|
|
|
1
|
-
{{#if this.authFetch.
|
|
2
|
-
<
|
|
3
|
-
@color="default"
|
|
4
|
-
class="ember-ebau-gwr-login uk-width-2xlarge uk-margin-auto" as |card|
|
|
5
|
-
>
|
|
6
|
-
<card.header>
|
|
7
|
-
<h2 class="uk-modal-title">
|
|
8
|
-
{{t "ember-gwr.components.loginModal.header"}}
|
|
9
|
-
</h2>
|
|
10
|
-
</card.header>
|
|
11
|
-
<card.body>
|
|
12
|
-
<div class="uk-grid-small" uk-grid>
|
|
13
|
-
<div class="uk-width-1-2">
|
|
14
|
-
<input
|
|
15
|
-
name="username"
|
|
16
|
-
class="uk-input"
|
|
17
|
-
placeholder={{t "ember-gwr.components.loginModal.username"}}
|
|
18
|
-
aria-label={{t "ember-gwr.components.loginModal.username"}}
|
|
19
|
-
value={{this.username}}
|
|
20
|
-
{{on "input" this.updateValue}}
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="uk-width-1-2">
|
|
24
|
-
<input
|
|
25
|
-
name="password"
|
|
26
|
-
type="password"
|
|
27
|
-
class="uk-input"
|
|
28
|
-
placeholder={{t "ember-gwr.components.loginModal.password"}}
|
|
29
|
-
aria-label={{t "ember-gwr.components.loginModal.password"}}
|
|
30
|
-
value={{this.password}}
|
|
31
|
-
{{on "input" this.updateValue}}
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="uk-width-1">
|
|
35
|
-
<PowerSelect
|
|
36
|
-
@renderInPlace={{true}}
|
|
37
|
-
@triggerClass="uk-select"
|
|
38
|
-
@options={{this.sortedMunicipalities}}
|
|
39
|
-
@selected={{find-by "id" this.municipality this.municipalities}}
|
|
40
|
-
@placeholder={{t "ember-gwr.components.loginModal.municipality"}}
|
|
41
|
-
@searchEnabled={{true}}
|
|
42
|
-
@searchField="name"
|
|
43
|
-
@searchPlaceholder={{t
|
|
44
|
-
"ember-gwr.components.loginModal.municipalitySearch"
|
|
45
|
-
}}
|
|
46
|
-
@noMatchesMessage={{t
|
|
47
|
-
"ember-gwr.components.loginModal.municipalityNoneFound"
|
|
48
|
-
}}
|
|
49
|
-
@onChange={{this.updateMunicipality}} as |municipality|
|
|
50
|
-
>
|
|
51
|
-
{{municipality.name}}
|
|
52
|
-
</PowerSelect>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</card.body>
|
|
56
|
-
<card.footer class="uk-text-right">
|
|
57
|
-
<UkButton
|
|
58
|
-
@color="primary"
|
|
59
|
-
@disabled={{not (and this.username this.password this.municipality)}}
|
|
60
|
-
@loading={{this.authFetch.housingStatToken.isRunning}}
|
|
61
|
-
@onClick={{this.login}}
|
|
62
|
-
>
|
|
63
|
-
{{t "ember-gwr.components.loginModal.login"}}
|
|
64
|
-
</UkButton>
|
|
65
|
-
</card.footer>
|
|
66
|
-
</UkCard>
|
|
1
|
+
{{#if this.authFetch.housingStatToken.isRunning}}
|
|
2
|
+
<Loading />
|
|
67
3
|
{{else}}
|
|
68
|
-
|
|
69
|
-
|
|
4
|
+
{{#if this.authFetch.showAuthModal}}
|
|
5
|
+
<UkCard
|
|
6
|
+
@color="default"
|
|
7
|
+
class="ember-ebau-gwr-login uk-width-2xlarge uk-margin-auto"
|
|
8
|
+
as |card|
|
|
9
|
+
>
|
|
10
|
+
<card.header>
|
|
11
|
+
<h2 class="uk-modal-title">
|
|
12
|
+
{{t "ember-gwr.components.loginModal.header"}}
|
|
13
|
+
</h2>
|
|
14
|
+
</card.header>
|
|
15
|
+
<card.body>
|
|
16
|
+
<div class="uk-grid-small" uk-grid>
|
|
17
|
+
<div class="uk-width-1-2">
|
|
18
|
+
<input
|
|
19
|
+
name="username"
|
|
20
|
+
class="uk-input"
|
|
21
|
+
placeholder={{t "ember-gwr.components.loginModal.username"}}
|
|
22
|
+
aria-label={{t "ember-gwr.components.loginModal.username"}}
|
|
23
|
+
value={{this.username}}
|
|
24
|
+
{{on "input" this.updateValue}}
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="uk-width-1-2">
|
|
28
|
+
<input
|
|
29
|
+
name="password"
|
|
30
|
+
type="password"
|
|
31
|
+
class="uk-input"
|
|
32
|
+
placeholder={{t "ember-gwr.components.loginModal.password"}}
|
|
33
|
+
aria-label={{t "ember-gwr.components.loginModal.password"}}
|
|
34
|
+
value={{this.password}}
|
|
35
|
+
{{on "input" this.updateValue}}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="uk-width-1">
|
|
39
|
+
<PowerSelect
|
|
40
|
+
@renderInPlace={{true}}
|
|
41
|
+
@triggerClass="uk-select"
|
|
42
|
+
@options={{this.sortedMunicipalities}}
|
|
43
|
+
@selected={{find-by "id" this.municipality this.municipalities}}
|
|
44
|
+
@placeholder={{t "ember-gwr.components.loginModal.municipality"}}
|
|
45
|
+
@searchEnabled={{true}}
|
|
46
|
+
@searchField="name"
|
|
47
|
+
@searchPlaceholder={{t
|
|
48
|
+
"ember-gwr.components.loginModal.municipalitySearch"
|
|
49
|
+
}}
|
|
50
|
+
@noMatchesMessage={{t
|
|
51
|
+
"ember-gwr.components.loginModal.municipalityNoneFound"
|
|
52
|
+
}}
|
|
53
|
+
@onChange={{this.updateMunicipality}}
|
|
54
|
+
as |municipality|
|
|
55
|
+
>
|
|
56
|
+
{{municipality.name}}
|
|
57
|
+
</PowerSelect>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</card.body>
|
|
61
|
+
<card.footer class="uk-text-right">
|
|
62
|
+
<UkButton
|
|
63
|
+
@color="primary"
|
|
64
|
+
@disabled={{not (and this.username this.password this.municipality)}}
|
|
65
|
+
@loading={{this.authFetch.housingStatToken.isRunning}}
|
|
66
|
+
@onClick={{this.login}}
|
|
67
|
+
>
|
|
68
|
+
{{t "ember-gwr.components.loginModal.login"}}
|
|
69
|
+
</UkButton>
|
|
70
|
+
</card.footer>
|
|
71
|
+
</UkCard>
|
|
72
|
+
{{else}}
|
|
73
|
+
<div class="uk-flex uk-flex-middle uk-flex-right">
|
|
74
|
+
<span class="uk-margin-right">
|
|
75
|
+
{{t
|
|
76
|
+
"ember-gwr.components.loginModal.loginInfo"
|
|
77
|
+
user=this.authFetch.username
|
|
78
|
+
municipality=(get
|
|
79
|
+
(find-by "id" this.authFetch.municipality this.municipalities)
|
|
80
|
+
"name"
|
|
81
|
+
)
|
|
82
|
+
}}
|
|
83
|
+
</span>
|
|
84
|
+
<Logout />
|
|
85
|
+
</div>
|
|
86
|
+
{{yield}}
|
|
87
|
+
{{/if}}
|
|
70
88
|
{{/if}}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{{#if @errorCount}}
|
|
2
2
|
<div
|
|
3
|
-
class="uk-label uk-label-danger uk-margin-small-left uk-flex-inline
|
|
4
|
-
uk-flex-middle uk-flex-center uk-flex-none uk-text-small uk-text-bold"
|
|
3
|
+
class="uk-label uk-label-danger uk-margin-small-left uk-flex-inline uk-flex-middle uk-flex-center uk-flex-none uk-text-small uk-text-bold"
|
|
5
4
|
>
|
|
6
5
|
<small>
|
|
7
6
|
{{@errorCount}}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{{#unless @noHeader}}
|
|
2
2
|
<div class="uk-flex-inline uk-flex-top uk-width-expand">
|
|
3
3
|
<div
|
|
4
|
-
class="uk-flex-none ember-ebau-gwr-model-id-width-{{if
|
|
4
|
+
class="uk-flex-none ember-ebau-gwr-model-id-width-{{if
|
|
5
|
+
@smallHeaderIdWidth
|
|
6
|
+
'small'
|
|
7
|
+
'large'
|
|
8
|
+
}}"
|
|
5
9
|
>
|
|
6
10
|
<LinkTo
|
|
7
11
|
class="uk-text-bold"
|
|
@@ -12,7 +16,7 @@
|
|
|
12
16
|
</LinkTo>
|
|
13
17
|
</div>
|
|
14
18
|
<div class="uk-margin-small-left uk-flex uk-width-expand uk-flex-column">
|
|
15
|
-
<div class="uk-flex-inline uk-flex-middle">
|
|
19
|
+
<div class="uk-flex-inline uk-flex-middle uk-flex-between">
|
|
16
20
|
<div class="uk-text-bold">
|
|
17
21
|
{{@modelDescription}}
|
|
18
22
|
</div>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
{{#if
|
|
1
|
+
{{#if @isRunning}}
|
|
2
|
+
<ModelErrors::SkeletonErrors />
|
|
3
|
+
{{else}}
|
|
2
4
|
<ul class="uk-list uk-list-divider">
|
|
3
5
|
{{#each @errors as |error|}}
|
|
4
6
|
<li>
|
|
@@ -8,8 +10,8 @@
|
|
|
8
10
|
class="uk-label uk-text-small uk-text-center
|
|
9
11
|
{{if
|
|
10
12
|
(eq error.action this.options.errorActionOptions.refused)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
'ember-ebau-gwr-label-color-danger'
|
|
14
|
+
'ember-ebau-gwr-label-color-warning'
|
|
13
15
|
}}"
|
|
14
16
|
>
|
|
15
17
|
{{error.action}}
|
|
@@ -20,6 +22,13 @@
|
|
|
20
22
|
</div>
|
|
21
23
|
</div>
|
|
22
24
|
</li>
|
|
25
|
+
{{else}}
|
|
26
|
+
<li>
|
|
27
|
+
<div class="uk-text-success">
|
|
28
|
+
<FaIcon @icon="circle-check" @fixedWidth={{true}} />
|
|
29
|
+
{{t "ember-gwr.components.modelErrors.empty"}}
|
|
30
|
+
</div>
|
|
31
|
+
</li>
|
|
23
32
|
{{/each}}
|
|
24
33
|
</ul>
|
|
25
|
-
{{/if}}
|
|
34
|
+
{{/if}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<ul class="uk-list uk-list-divider uk-margin-small-top">
|
|
2
|
+
{{#each (repeat 3)}}
|
|
3
|
+
<li>
|
|
4
|
+
<div class="uk-flex uk-flex-left uk-flex-top">
|
|
5
|
+
<div
|
|
6
|
+
class="ember-ebau-gwr-label-width ember-ebau-gwr-label-height uk-background-muted"
|
|
7
|
+
></div>
|
|
8
|
+
<div
|
|
9
|
+
class="uk-margin-left uk-width-expand ember-ebau-gwr-label-height uk-background-muted"
|
|
10
|
+
></div>
|
|
11
|
+
</div>
|
|
12
|
+
</li>
|
|
13
|
+
{{/each}}
|
|
14
|
+
</ul>
|
|
@@ -13,22 +13,7 @@
|
|
|
13
13
|
<switcher.content as |content|>
|
|
14
14
|
{{#each (repeat 3)}}
|
|
15
15
|
<content.item>
|
|
16
|
-
<
|
|
17
|
-
class="uk-list uk-list-divider uk-margin-small-top"
|
|
18
|
-
>
|
|
19
|
-
{{#each (repeat 3)}}
|
|
20
|
-
<li>
|
|
21
|
-
<div class="uk-flex uk-flex-left uk-flex-top">
|
|
22
|
-
<div
|
|
23
|
-
class="ember-ebau-gwr-label-width ember-ebau-gwr-label-height uk-background-muted"
|
|
24
|
-
></div>
|
|
25
|
-
<div
|
|
26
|
-
class="uk-margin-left uk-width-expand ember-ebau-gwr-label-height uk-background-muted"
|
|
27
|
-
></div>
|
|
28
|
-
</div>
|
|
29
|
-
</li>
|
|
30
|
-
{{/each}}
|
|
31
|
-
</ul>
|
|
16
|
+
<ModelErrors::SkeletonErrors />
|
|
32
17
|
</content.item>
|
|
33
18
|
{{/each}}
|
|
34
19
|
</switcher.content>
|
|
@@ -9,20 +9,18 @@
|
|
|
9
9
|
@modelDescription={{@modelDescription}}
|
|
10
10
|
@smallHeaderIdWidth={{@smallHeaderIdWidth}}
|
|
11
11
|
>
|
|
12
|
-
{{#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/>
|
|
27
|
-
{{/if}}
|
|
12
|
+
{{#let
|
|
13
|
+
(component
|
|
14
|
+
"model-errors/list"
|
|
15
|
+
errors=@errorModel.errorList
|
|
16
|
+
isRunning=(not @errorModel)
|
|
17
|
+
)
|
|
18
|
+
as |List|
|
|
19
|
+
}}
|
|
20
|
+
{{#if (has-block)}}
|
|
21
|
+
{{yield List}}
|
|
22
|
+
{{else}}
|
|
23
|
+
<List />
|
|
24
|
+
{{/if}}
|
|
25
|
+
{{/let}}
|
|
28
26
|
</ModelErrors::Header>
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
<div class="{{if @horizontal
|
|
2
|
-
<div class="{{if @horizontal
|
|
1
|
+
<div class="{{if @horizontal 'uk-flex'}}">
|
|
2
|
+
<div class="{{if @horizontal 'uk-margin-left uk-flex-last'}}">
|
|
3
3
|
{{component @labelComponent}}
|
|
4
4
|
</div>
|
|
5
5
|
{{#if @disabled}}
|
|
6
6
|
<input
|
|
7
7
|
type="text"
|
|
8
|
-
class="uk-input uk-width-1
|
|
8
|
+
class="uk-input uk-width-1
|
|
9
|
+
{{if @isInvalid 'uk-form-danger'}}
|
|
10
|
+
{{if @isValid 'uk-form-success'}}"
|
|
9
11
|
name={{@name}}
|
|
10
12
|
value={{format-date @value day="2-digit" month="2-digit" year="numeric"}}
|
|
11
13
|
placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
|
|
12
14
|
disabled
|
|
13
15
|
...attributes
|
|
14
|
-
|
|
16
|
+
/>
|
|
15
17
|
{{else}}
|
|
16
18
|
<input
|
|
17
19
|
type="text"
|
|
18
|
-
class="uk-input uk-width-1
|
|
20
|
+
class="uk-input uk-width-1
|
|
21
|
+
{{if @isInvalid 'uk-form-danger'}}
|
|
22
|
+
{{if @isValid 'uk-form-success'}}"
|
|
19
23
|
name={{@name}}
|
|
20
24
|
required={{@required}}
|
|
21
25
|
placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
|
|
@@ -32,4 +36,4 @@
|
|
|
32
36
|
{{/if}}
|
|
33
37
|
</div>
|
|
34
38
|
{{component @hintComponent}}
|
|
35
|
-
{{component @errorComponent}}
|
|
39
|
+
{{component @errorComponent}}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<div class="{{if @horizontal
|
|
2
|
-
<div class="uk-text-bold {{if @horizontal
|
|
1
|
+
<div class="{{if @horizontal 'uk-flex'}}">
|
|
2
|
+
<div class="uk-text-bold {{if @horizontal 'uk-margin-left uk-flex-last'}}">
|
|
3
3
|
{{component @labelComponent}}
|
|
4
4
|
</div>
|
|
5
5
|
<div
|
|
6
6
|
class="uk-box-shadow-small uk-padding-small uk-width-1-1
|
|
7
|
-
{{if @isInvalid
|
|
8
|
-
{{if @isValid
|
|
7
|
+
{{if @isInvalid 'uk-form-danger'}}
|
|
8
|
+
{{if @isValid 'uk-form-success'}}"
|
|
9
9
|
>
|
|
10
10
|
{{#if @current}}
|
|
11
11
|
<div class="uk-margin">
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
</span>
|
|
18
18
|
<button
|
|
19
19
|
type="button"
|
|
20
|
-
class="uk-button uk-button-default uk-button-small"
|
|
20
|
+
class="uk-button uk-button-default uk-button-small uk-width-small"
|
|
21
21
|
{{on "click" (fn @updateModelField @current)}}
|
|
22
22
|
>
|
|
23
|
-
{{t "ember-gwr.components.modelForm.diff.
|
|
23
|
+
{{t "ember-gwr.components.modelForm.diff.cancel"}}
|
|
24
24
|
</button>
|
|
25
25
|
</div>
|
|
26
26
|
{{#let
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
class="uk-flex uk-flex-between uk-flex-bottom uk-margin-small-bottom"
|
|
37
37
|
>
|
|
38
38
|
<span>
|
|
39
|
-
{{t "ember-gwr.components.modelForm.diff.
|
|
39
|
+
{{t "ember-gwr.components.modelForm.diff.importedData"}}
|
|
40
40
|
</span>
|
|
41
41
|
<div>
|
|
42
42
|
<button
|
|
43
43
|
type="button"
|
|
44
|
-
class="uk-button uk-button-primary uk-button-small"
|
|
44
|
+
class="uk-button uk-button-primary uk-button-small uk-width-small"
|
|
45
45
|
{{on "click" (fn @updateModelField this.newValue)}}
|
|
46
46
|
>
|
|
47
47
|
{{t "ember-gwr.components.modelForm.diff.apply"}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="{{unless @noMargin
|
|
3
|
-
{{did-update this.initializeImport @
|
|
2
|
+
class="{{unless @noMargin 'uk-margin'}}"
|
|
3
|
+
{{did-update this.initializeImport @importedData @model @attr}}
|
|
4
4
|
>
|
|
5
5
|
{{#let
|
|
6
6
|
(component
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
min=@min
|
|
45
45
|
max=@max
|
|
46
46
|
)
|
|
47
|
+
errorComponent=(component "validated-form-error")
|
|
47
48
|
)
|
|
48
49
|
as |InputComponent|
|
|
49
50
|
}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { action, get } from "@ember/object";
|
|
2
2
|
import { inject as service } from "@ember/service";
|
|
3
3
|
import Component from "@glimmer/component";
|
|
4
4
|
import { tracked } from "@glimmer/tracking";
|
|
@@ -22,6 +22,7 @@ export default class ModelFormFieldComponent extends Component {
|
|
|
22
22
|
get value() {
|
|
23
23
|
return (
|
|
24
24
|
this.args.value ??
|
|
25
|
+
// Using get here since `attr` can be a property path.
|
|
25
26
|
get(this.args.model, this.args.attr) ??
|
|
26
27
|
// for zero values get returns undefined instead of 0
|
|
27
28
|
this.args.model?.[this.args.attr]
|
|
@@ -29,11 +30,12 @@ export default class ModelFormFieldComponent extends Component {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
get importValue() {
|
|
32
|
-
|
|
33
|
+
// Using get here since `attr` can be a property path.
|
|
34
|
+
return get(this.args.importedData?.data, this.args.attr);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
get showDiff() {
|
|
36
|
-
if (this.args.
|
|
38
|
+
if (this.args.importedData) {
|
|
37
39
|
return (
|
|
38
40
|
!this.diffResolved &&
|
|
39
41
|
this.importValue !== null &&
|
|
@@ -45,7 +47,7 @@ export default class ModelFormFieldComponent extends Component {
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
get disableInput() {
|
|
48
|
-
return this.args.
|
|
50
|
+
return this.args.importedData && !this.showDiff;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
get isStep() {
|
|
@@ -106,7 +108,7 @@ export default class ModelFormFieldComponent extends Component {
|
|
|
106
108
|
// Date casts necessary for import
|
|
107
109
|
this.args.model.set(attr, isIsoDate(value) ? new Date(value) : value);
|
|
108
110
|
|
|
109
|
-
if (this.args.
|
|
111
|
+
if (this.args.importedData) {
|
|
110
112
|
this.diffResolved = true;
|
|
111
113
|
this.args.resolveDiff(this.args.attr);
|
|
112
114
|
}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
<div class="uk-flex uk-flex-column uk-flex-right">
|
|
2
2
|
<ImportModal
|
|
3
|
-
@visible={{
|
|
4
|
-
@close={{fn (mut this.showImportModal) false}}
|
|
3
|
+
@visible={{this.showImportModal}}
|
|
5
4
|
@import={{@import}}
|
|
6
5
|
@modelName={{@modelName}}
|
|
7
6
|
/>
|
|
8
7
|
<div class="uk-flex-inline uk-flex-right uk-flex-middle">
|
|
9
8
|
{{#if (and @modelHasImport @import)}}
|
|
10
9
|
{{#if (and @import.originalData.length (is-unset @import.index))}}
|
|
11
|
-
<
|
|
10
|
+
<LinkTo
|
|
12
11
|
class="uk-button uk-button-default uk-margin-small-right uk-flex-none"
|
|
13
|
-
|
|
14
|
-
{{on "click" (fn (mut this.showImportModal) true)}}
|
|
12
|
+
@query={{hash index=null}}
|
|
15
13
|
>
|
|
16
14
|
{{t "ember-gwr.components.importModal.selectImportData"}}
|
|
17
|
-
</
|
|
15
|
+
</LinkTo>
|
|
18
16
|
{{else}}
|
|
19
17
|
<button
|
|
20
18
|
class="uk-button uk-button-default uk-flex-none
|
|
21
|
-
{{if (is-unset @import.index)
|
|
19
|
+
{{if (is-unset @import.index) 'uk-margin-small-right'}}"
|
|
22
20
|
type="button"
|
|
23
21
|
{{on "click" @importAllData}}
|
|
24
22
|
>
|
|
@@ -28,6 +26,7 @@
|
|
|
28
26
|
<button
|
|
29
27
|
class="uk-button uk-button-default uk-flex-none uk-padding-small uk-padding-remove-vertical uk-margin-small-right"
|
|
30
28
|
type="button"
|
|
29
|
+
disabled={{@disabled}}
|
|
31
30
|
>
|
|
32
31
|
<span class="uk-icon" uk-icon="more-vertical"></span>
|
|
33
32
|
</button>
|
|
@@ -39,13 +38,12 @@
|
|
|
39
38
|
class="uk-nav uk-dropdown-nav uk-list uk-list-divider uk-list-collapse"
|
|
40
39
|
>
|
|
41
40
|
<li>
|
|
42
|
-
<
|
|
41
|
+
<LinkTo
|
|
43
42
|
class="uk-button uk-text-left uk-highlight-hover uk-text-secondary uk-width-1-1 uk-background-default uk-padding-remove"
|
|
44
|
-
|
|
45
|
-
{{on "click" (fn (mut this.showImportModal) true)}}
|
|
43
|
+
@query={{hash index=null}}
|
|
46
44
|
>
|
|
47
45
|
{{t "ember-gwr.components.importModal.selectImportData"}}
|
|
48
|
-
</
|
|
46
|
+
</LinkTo>
|
|
49
47
|
</li>
|
|
50
48
|
</ul>
|
|
51
49
|
</div>
|
|
@@ -61,10 +59,11 @@
|
|
|
61
59
|
{{#let @submit as |Submit|}}
|
|
62
60
|
<Submit />
|
|
63
61
|
{{/let}}
|
|
64
|
-
{{#if (or @modelHasImport @
|
|
62
|
+
{{#if (or @modelHasImport @showStatusActions)}}
|
|
65
63
|
<button
|
|
66
64
|
class="uk-button uk-button-default uk-flex-none uk-padding-small uk-padding-remove-vertical"
|
|
67
65
|
type="button"
|
|
66
|
+
disabled={{@disabled}}
|
|
68
67
|
>
|
|
69
68
|
<span class="uk-icon" uk-icon="more-vertical"></span>
|
|
70
69
|
</button>
|
|
@@ -78,25 +77,29 @@
|
|
|
78
77
|
{{#if @modelHasImport}}
|
|
79
78
|
<li>
|
|
80
79
|
<LinkTo
|
|
81
|
-
@disabled={{or @import
|
|
80
|
+
@disabled={{or @import @import.error}}
|
|
82
81
|
@query={{hash import=true}}
|
|
83
82
|
class="uk-button uk-text-left uk-highlight-hover
|
|
84
|
-
{{if
|
|
83
|
+
{{if
|
|
84
|
+
(or @import this.importState.hasError)
|
|
85
|
+
'uk-text-muted'
|
|
86
|
+
'uk-text-secondary'
|
|
87
|
+
}}
|
|
85
88
|
uk-width-1-1 uk-background-default uk-padding-remove"
|
|
86
|
-
{{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
uk-tooltip="title: {{if
|
|
90
|
+
@import.error
|
|
91
|
+
(t 'ember-gwr.components.modelForm.importError')
|
|
92
|
+
}}; container: {{this.config.modalContainer}}"
|
|
90
93
|
>
|
|
91
94
|
{{t "ember-gwr.components.modelForm.importFromCaluma"}}
|
|
92
95
|
</LinkTo>
|
|
93
96
|
</li>
|
|
94
97
|
{{/if}}
|
|
95
|
-
{{#if @
|
|
98
|
+
{{#if @showStatusActions}}
|
|
96
99
|
<li>
|
|
97
|
-
<a
|
|
98
|
-
href="#ember-ebau-gwr-status"
|
|
99
|
-
uk-scroll
|
|
100
|
+
<a
|
|
101
|
+
href="#ember-ebau-gwr-status"
|
|
102
|
+
uk-scroll
|
|
100
103
|
class="uk-button uk-text-left uk-highlight-hover uk-text-secondary uk-width-1-1 uk-background-default uk-padding-remove"
|
|
101
104
|
{{on "click" @openStatus}}
|
|
102
105
|
>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { inject as service } from "@ember/service";
|
|
2
2
|
import Component from "@glimmer/component";
|
|
3
|
-
import { tracked } from "@glimmer/tracking";
|
|
4
3
|
|
|
5
4
|
export default class ModelFormHeaderActionsComponent extends Component {
|
|
6
|
-
@tracked showImportModal = false;
|
|
7
|
-
@service importState;
|
|
8
5
|
@service config;
|
|
6
|
+
|
|
7
|
+
get showImportModal() {
|
|
8
|
+
return (
|
|
9
|
+
this.args.import?.originalData?.length && isNaN(this.args.import?.index)
|
|
10
|
+
);
|
|
11
|
+
}
|
|
9
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{{#unless @model.isNew}}
|
|
2
2
|
<div
|
|
3
3
|
uk-alert
|
|
4
|
-
class="{{if this.errorCount
|
|
4
|
+
class="{{if this.errorCount 'uk-alert-warning' 'uk-alert-success'}}
|
|
5
5
|
uk-margin-remove-top uk-margin-small-bottom uk-padding-small uk-flex-inline uk-flex-middle"
|
|
6
6
|
>
|
|
7
7
|
<div
|
|
8
8
|
class="uk-label
|
|
9
|
-
{{if this.errorCount
|
|
9
|
+
{{if this.errorCount 'uk-label-warning' 'uk-label-success'}}"
|
|
10
10
|
>
|
|
11
11
|
{{this.errorCount}}
|
|
12
12
|
</div>
|
|
@@ -27,23 +27,23 @@
|
|
|
27
27
|
{{@modelName}}
|
|
28
28
|
{{@modelId}}
|
|
29
29
|
</h3>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
{{#if @projectId}}
|
|
31
|
+
<LinkTo
|
|
32
|
+
@route="project.errors"
|
|
33
|
+
@model={{@projectId}}
|
|
34
|
+
class="uk-link-muted uk-text-small"
|
|
35
|
+
>
|
|
36
|
+
<span>
|
|
37
|
+
{{t "ember-gwr.components.header.linkIssues" projectId=@projectId}}
|
|
38
|
+
</span>
|
|
39
|
+
<span uk-icon="icon: arrow-right"></span>
|
|
40
|
+
</LinkTo>
|
|
41
|
+
{{/if}}
|
|
40
42
|
<hr class="uk-margin-small-bottom" />
|
|
41
43
|
{{#if this.errorCount}}
|
|
42
44
|
<ModelErrors::List @errors={{@model.errorList}} />
|
|
43
45
|
{{else}}
|
|
44
|
-
<div
|
|
45
|
-
class="uk-margin-medium-bottom"
|
|
46
|
-
>
|
|
46
|
+
<div class="uk-margin-medium-bottom">
|
|
47
47
|
{{t
|
|
48
48
|
"ember-gwr.components.header.noIssues"
|
|
49
49
|
modelName=@modelName
|
|
@@ -52,4 +52,4 @@
|
|
|
52
52
|
</div>
|
|
53
53
|
{{/if}}
|
|
54
54
|
</div>
|
|
55
|
-
{{/unless}}
|
|
55
|
+
{{/unless}}
|
|
@@ -11,9 +11,18 @@
|
|
|
11
11
|
{{t "ember-gwr.components.header.statusSelector.statusLabel"}}
|
|
12
12
|
</div>
|
|
13
13
|
<form>
|
|
14
|
-
<select
|
|
14
|
+
<select
|
|
15
|
+
aria-label={{t
|
|
16
|
+
"ember-gwr.components.header.statusSelector.statusLabel"
|
|
17
|
+
}}
|
|
18
|
+
class="uk-select"
|
|
19
|
+
{{on "change" this.statusUpdate}}
|
|
20
|
+
>
|
|
15
21
|
{{#each this.statusOptions as |opt|}}
|
|
16
|
-
<option
|
|
22
|
+
<option
|
|
23
|
+
value={{opt.status}}
|
|
24
|
+
selected={{eq this.newStatus opt.status}}
|
|
25
|
+
>{{opt.label}}</option>
|
|
17
26
|
{{/each}}
|
|
18
27
|
</select>
|
|
19
28
|
</form>
|
|
@@ -39,7 +48,10 @@
|
|
|
39
48
|
</small>
|
|
40
49
|
</div>
|
|
41
50
|
<div class="uk-flex-inline uk-flex-middle uk-flex-right">
|
|
42
|
-
<div
|
|
51
|
+
<div
|
|
52
|
+
class="uk-margin-small-right uk-flex-none"
|
|
53
|
+
uk-icon="icon: question"
|
|
54
|
+
></div>
|
|
43
55
|
<div
|
|
44
56
|
class="uk-width-large"
|
|
45
57
|
uk-dropdown="mode: hover; pos: bottom-left; delay-show: 500; offset: 20"
|