ember-ebau-gwr 8.1.3 → 9.0.1
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 +27 -0
- package/addon/components/building-preview.hbs +3 -6
- package/addon/components/import-modal/building-data.hbs +1 -1
- package/addon/components/import-modal.hbs +1 -1
- package/addon/components/instance-link.hbs +11 -11
- package/addon/components/link-building-modal.hbs +1 -1
- package/addon/components/linked-models.hbs +1 -1
- package/addon/components/linked-projects.hbs +1 -1
- package/addon/components/login-modal.hbs +1 -2
- package/addon/components/model-errors/list.hbs +7 -2
- package/addon/components/model-form/date.hbs +1 -1
- package/addon/components/model-form/diff.hbs +1 -1
- package/addon/components/model-form/header/actions.hbs +94 -94
- package/addon/components/model-form/header/errors.hbs +1 -1
- package/addon/components/model-form/header/status-selector.hbs +1 -1
- package/addon/components/model-form/header.hbs +4 -2
- package/addon/components/model-form.hbs +5 -1
- package/addon/components/project-landing-page.hbs +1 -1
- package/addon/components/quarterly-closure/card-status.hbs +2 -1
- package/addon/components/quarterly-closure/error-list/project-errors.hbs +3 -1
- package/addon/components/quarterly-closure/error-list/survey-department-errors.hbs +1 -3
- package/addon/components/quarterly-closure/status.hbs +2 -1
- package/addon/components/quarterly-closure/title.hbs +2 -2
- package/addon/components/remove-modal.hbs +38 -0
- package/addon/components/remove-modal.js +9 -0
- package/addon/components/search/filters.hbs +1 -1
- package/addon/components/search.hbs +1 -1
- package/addon/components/sub-nav.hbs +1 -1
- package/addon/components/validated-form-error.hbs +1 -1
- package/addon/controllers/building/edit/dwellings.js +16 -2
- package/addon/services/dwelling.js +2 -6
- package/addon/templates/building/edit/dwelling/edit.hbs +12 -4
- package/addon/templates/building/edit/dwelling.hbs +1 -1
- package/addon/templates/building/edit/dwellings.hbs +11 -1
- package/addon/templates/building/edit/entrance/edit/index.hbs +1 -3
- package/addon/templates/building/edit/entrance/edit/link-street.hbs +10 -4
- package/addon/templates/building/edit/entrance.hbs +1 -1
- package/addon/templates/building/edit/entrances.hbs +1 -1
- package/addon/templates/building/edit/form.hbs +4 -1
- package/addon/templates/building/edit.hbs +1 -1
- package/addon/templates/global-landing-page.hbs +5 -2
- package/addon/templates/project/errors.hbs +1 -1
- package/addon/templates/project/form.hbs +7 -2
- package/addon/templates/project/linked-buildings.hbs +1 -1
- package/addon/templates/quarterly-closure.hbs +2 -2
- package/addon/templates/search-building.hbs +3 -2
- package/addon/templates/search-project.hbs +1 -1
- package/addon/validations/dwelling.js +18 -5
- package/addon/validations/realestate-identification.js +6 -1
- package/addon/validations/remove-modal.js +22 -0
- package/package.json +5 -3
- package/translations/building/de.yaml +4 -0
- package/translations/building/fr.yaml +4 -0
- package/translations/building/it.yaml +5 -1
- package/translations/construction-project/de.yaml +1 -0
- package/translations/construction-project/fr.yaml +1 -0
- package/translations/construction-project/it.yaml +1 -0
- package/translations/de.yaml +8 -5
- package/translations/dwelling/de.yaml +2 -0
- package/translations/dwelling/fr.yaml +2 -0
- package/translations/dwelling/it.yaml +4 -2
- package/translations/fr.yaml +7 -4
- package/translations/it.yaml +9 -7
- package/translations/quarterly-closure/it.yaml +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## [9.0.1](https://github.com/inosca/ember-ebau-gwr/compare/v9.0.0...v9.0.1) (2026-10-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **dwellings:** add validation for apartment number ([0993844](https://github.com/inosca/ember-ebau-gwr/commit/099384488d22449aad4fce853ab8958527e5b4c6))
|
|
7
|
+
* **project:** add validation for realestateIdentification number ([945e413](https://github.com/inosca/ember-ebau-gwr/commit/945e41323826db72765c193df780b4eedbd0b52c))
|
|
8
|
+
|
|
9
|
+
# [9.0.0](https://github.com/inosca/ember-ebau-gwr/compare/v8.1.3...v9.0.0) (2026-08-19)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### chore
|
|
13
|
+
|
|
14
|
+
* bump minimum required node version to 20 ([ade5dfe](https://github.com/inosca/ember-ebau-gwr/commit/ade5dfec812de6e0f4baa2448eb8324d4bcafa85))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **dwellings:** add character length validation with whitespace cleanup ([7088e99](https://github.com/inosca/ember-ebau-gwr/commit/7088e99195912813de37a21c88322e908b607949))
|
|
20
|
+
* **dwellings:** add mandatory reason for removing dwellings ([40b9a86](https://github.com/inosca/ember-ebau-gwr/commit/40b9a86bf4895cc3a13cc47b6280f6c941c0f6a5))
|
|
21
|
+
* **translations:** use global translations for common modal terms ([6c2929d](https://github.com/inosca/ember-ebau-gwr/commit/6c2929d2f783ee6e93e1b563735b235eb35a1509))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### BREAKING CHANGES
|
|
25
|
+
|
|
26
|
+
* bump required node version to v20
|
|
27
|
+
|
|
1
28
|
## [8.1.3](https://github.com/inosca/ember-ebau-gwr/compare/v8.1.2...v8.1.3) (2026-06-09)
|
|
2
29
|
|
|
3
30
|
|
|
@@ -23,8 +23,7 @@
|
|
|
23
23
|
@model.buildingCategory
|
|
24
24
|
(t
|
|
25
25
|
(concat
|
|
26
|
-
"ember-gwr.building.buildingCategoryOptions."
|
|
27
|
-
@model.buildingCategory
|
|
26
|
+
"ember-gwr.building.buildingCategoryOptions." @model.buildingCategory
|
|
28
27
|
)
|
|
29
28
|
)
|
|
30
29
|
"-"
|
|
@@ -38,9 +37,7 @@
|
|
|
38
37
|
{{if
|
|
39
38
|
@model.buildingClass
|
|
40
39
|
(t
|
|
41
|
-
(concat
|
|
42
|
-
"ember-gwr.building.buildingClassOptions." @model.buildingClass
|
|
43
|
-
)
|
|
40
|
+
(concat "ember-gwr.building.buildingClassOptions." @model.buildingClass)
|
|
44
41
|
)
|
|
45
42
|
"-"
|
|
46
43
|
}}
|
|
@@ -50,4 +47,4 @@
|
|
|
50
47
|
<span class="uk-flex uk-child-width-1-2">
|
|
51
48
|
<span>{{t "ember-gwr.building.numberOfFloors"}}</span>
|
|
52
49
|
<span class="uk-text-muted">{{or @model.numberOfFloors "-"}}</span>
|
|
53
|
-
</span>
|
|
50
|
+
</span>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{{#if @links.length}}
|
|
2
|
-
|
|
2
|
+
<div class="uk-flex uk-flex-inline uk-flex-middle">
|
|
3
3
|
<UkIcon @icon="link" class="uk-text-emphasis" />
|
|
4
4
|
{{#each @links as |link index|}}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
14
|
{{/each}}
|
|
15
|
-
|
|
15
|
+
</div>
|
|
16
16
|
{{/if}}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<Modal.footer class="uk-flex uk-flex-column">
|
|
56
56
|
<div class="uk-flex uk-flex-between">
|
|
57
57
|
<UkButton @onClick={{@close}}>
|
|
58
|
-
{{t "ember-gwr.components.
|
|
58
|
+
{{t "ember-gwr.components.modal.cancel"}}
|
|
59
59
|
</UkButton>
|
|
60
60
|
<UkButton
|
|
61
61
|
@color="primary"
|
|
@@ -25,7 +25,12 @@
|
|
|
25
25
|
{{else}}
|
|
26
26
|
<li>
|
|
27
27
|
<div class="uk-text-success uk-flex uk-flex-middle">
|
|
28
|
-
<FaIcon
|
|
28
|
+
<FaIcon
|
|
29
|
+
@icon="circle-check"
|
|
30
|
+
@fixedWidth={{true}}
|
|
31
|
+
class="margin-right-xs"
|
|
32
|
+
@size="sm"
|
|
33
|
+
/>
|
|
29
34
|
<div>
|
|
30
35
|
{{t "ember-gwr.components.modelErrors.empty"}}
|
|
31
36
|
</div>
|
|
@@ -33,4 +38,4 @@
|
|
|
33
38
|
</li>
|
|
34
39
|
{{/each}}
|
|
35
40
|
</ul>
|
|
36
|
-
{{/if}}
|
|
41
|
+
{{/if}}
|
|
@@ -6,113 +6,113 @@
|
|
|
6
6
|
/>
|
|
7
7
|
<div class="uk-flex uk-flex-bottom uk-flex-column-reverse">
|
|
8
8
|
{{#if (and @modelHasImport @import)}}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
<div class="uk-flex uk-flex-wrap uk-flex-right">
|
|
10
|
+
{{#if (and @import.originalData.length (is-unset @import.index))}}
|
|
11
|
+
<LinkTo
|
|
12
|
+
class="uk-button uk-button-default uk-flex-none"
|
|
13
|
+
@query={{hash index=null}}
|
|
14
|
+
>
|
|
15
|
+
{{t "ember-gwr.components.importModal.selectImportData"}}
|
|
16
|
+
</LinkTo>
|
|
17
|
+
{{else}}
|
|
18
|
+
<button
|
|
19
|
+
class="uk-button uk-button-default uk-flex-none uk-margin-small-left
|
|
20
|
+
{{if (is-unset @import.index) 'uk-margin-small-right'}}"
|
|
21
|
+
type="button"
|
|
22
|
+
{{on "click" @importAllData}}
|
|
23
|
+
>
|
|
24
|
+
{{t "ember-gwr.components.modelForm.applyAll"}}
|
|
25
|
+
</button>
|
|
26
|
+
{{#if (and @import @import.originalData.length)}}
|
|
27
|
+
<button
|
|
28
|
+
class="uk-button uk-button-default uk-flex-none uk-padding-small uk-padding-remove-vertical"
|
|
29
|
+
type="button"
|
|
30
|
+
disabled={{@disabled}}
|
|
31
|
+
>
|
|
32
|
+
<span class="uk-icon" uk-icon="more-vertical"></span>
|
|
33
|
+
</button>
|
|
34
|
+
<div
|
|
35
|
+
uk-dropdown="mode: click; pos: bottom-right; offset: 20"
|
|
36
|
+
class="uk-padding-small"
|
|
37
|
+
>
|
|
38
|
+
<ul
|
|
39
|
+
class="uk-nav uk-dropdown-nav uk-list uk-list-divider uk-list-collapse"
|
|
40
|
+
>
|
|
41
|
+
<li>
|
|
42
|
+
<LinkTo
|
|
43
|
+
class="uk-button uk-text-left uk-highlight-hover uk-text-secondary uk-width-1-1 uk-background-default uk-padding-remove"
|
|
44
|
+
@query={{hash index=null}}
|
|
45
|
+
>
|
|
46
|
+
{{t "ember-gwr.components.importModal.selectImportData"}}
|
|
47
|
+
</LinkTo>
|
|
48
|
+
</li>
|
|
49
|
+
</ul>
|
|
50
|
+
</div>
|
|
51
|
+
{{/if}}
|
|
52
|
+
{{/if}}
|
|
11
53
|
<LinkTo
|
|
12
|
-
|
|
13
|
-
|
|
54
|
+
@query={{hash import=false index=undefined}}
|
|
55
|
+
class="uk-button uk-button-default uk-flex-none uk-margin-small-left"
|
|
14
56
|
>
|
|
15
|
-
{{t "ember-gwr.components.
|
|
57
|
+
{{t "ember-gwr.components.modelForm.cancelImport"}}
|
|
16
58
|
</LinkTo>
|
|
17
|
-
|
|
59
|
+
</div>
|
|
60
|
+
{{/if}}
|
|
61
|
+
<div class="uk-margin-small-bottom uk-margin-small-left">
|
|
62
|
+
{{#let @submit as |Submit|}}
|
|
63
|
+
<Submit />
|
|
64
|
+
{{/let}}
|
|
65
|
+
{{#if (or @modelHasImport @statusConfiguration)}}
|
|
18
66
|
<button
|
|
19
|
-
class="uk-button uk-button-default uk-flex-none uk-
|
|
20
|
-
{{if (is-unset @import.index) 'uk-margin-small-right'}}"
|
|
67
|
+
class="uk-button uk-button-default uk-flex-none uk-padding-small uk-padding-remove-vertical"
|
|
21
68
|
type="button"
|
|
22
|
-
{{
|
|
69
|
+
disabled={{@disabled}}
|
|
23
70
|
>
|
|
24
|
-
|
|
71
|
+
<span class="uk-icon" uk-icon="more-vertical"></span>
|
|
25
72
|
</button>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<span class="uk-icon" uk-icon="more-vertical"></span>
|
|
33
|
-
</button>
|
|
34
|
-
<div
|
|
35
|
-
uk-dropdown="mode: click; pos: bottom-right; offset: 20"
|
|
36
|
-
class="uk-padding-small"
|
|
73
|
+
<div
|
|
74
|
+
uk-dropdown="mode: click; pos: bottom-right; offset: 20"
|
|
75
|
+
class="uk-padding-small"
|
|
76
|
+
>
|
|
77
|
+
<ul
|
|
78
|
+
class="uk-nav uk-dropdown-nav uk-list uk-list-divider uk-list-collapse"
|
|
37
79
|
>
|
|
38
|
-
|
|
39
|
-
class="uk-nav uk-dropdown-nav uk-list uk-list-divider uk-list-collapse"
|
|
40
|
-
>
|
|
80
|
+
{{#if @modelHasImport}}
|
|
41
81
|
<li>
|
|
42
82
|
<LinkTo
|
|
43
|
-
|
|
44
|
-
@query={{hash
|
|
83
|
+
@disabled={{or @import @import.error}}
|
|
84
|
+
@query={{hash import=true}}
|
|
85
|
+
class="uk-button uk-text-left uk-highlight-hover
|
|
86
|
+
{{if
|
|
87
|
+
(or @import this.importState.hasError)
|
|
88
|
+
'uk-text-muted'
|
|
89
|
+
'uk-text-secondary'
|
|
90
|
+
}}
|
|
91
|
+
uk-width-1-1 uk-background-default uk-padding-remove"
|
|
92
|
+
uk-tooltip="title: {{if
|
|
93
|
+
@import.error
|
|
94
|
+
(t 'ember-gwr.components.modelForm.importError')
|
|
95
|
+
}}; container: {{this.config.modalContainer}}"
|
|
45
96
|
>
|
|
46
|
-
{{t "ember-gwr.components.
|
|
97
|
+
{{t "ember-gwr.components.modelForm.importFromCaluma"}}
|
|
47
98
|
</LinkTo>
|
|
48
99
|
</li>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
100
|
+
{{/if}}
|
|
101
|
+
{{#if @statusConfiguration}}
|
|
102
|
+
<li>
|
|
103
|
+
<a
|
|
104
|
+
href="#ember-ebau-gwr-status"
|
|
105
|
+
uk-scroll
|
|
106
|
+
class="uk-button uk-text-left uk-highlight-hover uk-text-secondary uk-width-1-1 uk-background-default uk-padding-remove"
|
|
107
|
+
{{on "click" @openStatus}}
|
|
108
|
+
>
|
|
109
|
+
{{t "ember-gwr.components.modelForm.changeStatus"}}
|
|
110
|
+
</a>
|
|
111
|
+
</li>
|
|
112
|
+
{{/if}}
|
|
113
|
+
</ul>
|
|
114
|
+
</div>
|
|
52
115
|
{{/if}}
|
|
53
|
-
<LinkTo
|
|
54
|
-
@query={{hash import=false index=undefined}}
|
|
55
|
-
class="uk-button uk-button-default uk-flex-none uk-margin-small-left"
|
|
56
|
-
>
|
|
57
|
-
{{t "ember-gwr.components.modelForm.cancelImport"}}
|
|
58
|
-
</LinkTo>
|
|
59
|
-
</div>
|
|
60
|
-
{{/if}}
|
|
61
|
-
<div class="uk-margin-small-bottom uk-margin-small-left">
|
|
62
|
-
{{#let @submit as |Submit|}}
|
|
63
|
-
<Submit />
|
|
64
|
-
{{/let}}
|
|
65
|
-
{{#if (or @modelHasImport @statusConfiguration)}}
|
|
66
|
-
<button
|
|
67
|
-
class="uk-button uk-button-default uk-flex-none uk-padding-small uk-padding-remove-vertical"
|
|
68
|
-
type="button"
|
|
69
|
-
disabled={{@disabled}}
|
|
70
|
-
>
|
|
71
|
-
<span class="uk-icon" uk-icon="more-vertical"></span>
|
|
72
|
-
</button>
|
|
73
|
-
<div
|
|
74
|
-
uk-dropdown="mode: click; pos: bottom-right; offset: 20"
|
|
75
|
-
class="uk-padding-small"
|
|
76
|
-
>
|
|
77
|
-
<ul
|
|
78
|
-
class="uk-nav uk-dropdown-nav uk-list uk-list-divider uk-list-collapse"
|
|
79
|
-
>
|
|
80
|
-
{{#if @modelHasImport}}
|
|
81
|
-
<li>
|
|
82
|
-
<LinkTo
|
|
83
|
-
@disabled={{or @import @import.error}}
|
|
84
|
-
@query={{hash import=true}}
|
|
85
|
-
class="uk-button uk-text-left uk-highlight-hover
|
|
86
|
-
{{if
|
|
87
|
-
(or @import this.importState.hasError)
|
|
88
|
-
'uk-text-muted'
|
|
89
|
-
'uk-text-secondary'
|
|
90
|
-
}}
|
|
91
|
-
uk-width-1-1 uk-background-default uk-padding-remove"
|
|
92
|
-
uk-tooltip="title: {{if
|
|
93
|
-
@import.error
|
|
94
|
-
(t 'ember-gwr.components.modelForm.importError')
|
|
95
|
-
}}; container: {{this.config.modalContainer}}"
|
|
96
|
-
>
|
|
97
|
-
{{t "ember-gwr.components.modelForm.importFromCaluma"}}
|
|
98
|
-
</LinkTo>
|
|
99
|
-
</li>
|
|
100
|
-
{{/if}}
|
|
101
|
-
{{#if @statusConfiguration}}
|
|
102
|
-
<li>
|
|
103
|
-
<a
|
|
104
|
-
href="#ember-ebau-gwr-status"
|
|
105
|
-
uk-scroll
|
|
106
|
-
class="uk-button uk-text-left uk-highlight-hover uk-text-secondary uk-width-1-1 uk-background-default uk-padding-remove"
|
|
107
|
-
{{on "click" @openStatus}}
|
|
108
|
-
>
|
|
109
|
-
{{t "ember-gwr.components.modelForm.changeStatus"}}
|
|
110
|
-
</a>
|
|
111
|
-
</li>
|
|
112
|
-
{{/if}}
|
|
113
|
-
</ul>
|
|
114
|
-
</div>
|
|
115
|
-
{{/if}}
|
|
116
116
|
</div>
|
|
117
117
|
</div>
|
|
118
118
|
<div class="uk-margin-small-top uk-flex uk-flex-right">
|
|
@@ -120,4 +120,4 @@
|
|
|
120
120
|
<SubmitErrors />
|
|
121
121
|
{{/let}}
|
|
122
122
|
</div>
|
|
123
|
-
</div>
|
|
123
|
+
</div>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<div
|
|
1
|
+
<div
|
|
2
|
+
class="uk-flex uk-flex-between uk-flex-top uk-margin-top uk-child-width-1-2"
|
|
3
|
+
>
|
|
2
4
|
<ModelForm::Header::Title
|
|
3
5
|
@model={{@model}}
|
|
4
6
|
@modelId={{@modelId}}
|
|
@@ -59,4 +61,4 @@
|
|
|
59
61
|
{{/if}}
|
|
60
62
|
{{/let}}
|
|
61
63
|
<hr class="uk-margin-small-top" />
|
|
62
|
-
{{/if}}
|
|
64
|
+
{{/if}}
|
|
@@ -104,7 +104,11 @@
|
|
|
104
104
|
{{t "ember-gwr.components.modelForm.cancelImport"}}
|
|
105
105
|
</LinkTo>
|
|
106
106
|
{{/if}}
|
|
107
|
-
{{#if
|
|
107
|
+
{{#if
|
|
108
|
+
(or
|
|
109
|
+
(and f.model.isInvalid f.model.isDirty this.invalidSubmit) @errors
|
|
110
|
+
)
|
|
111
|
+
}}
|
|
108
112
|
<div class="uk-margin-left uk-flex-inline">
|
|
109
113
|
<SubmitErrors />
|
|
110
114
|
</div>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<h3>{{t "ember-gwr.quarterlyClosure.components.projectErrors.title"}}</h3>
|
|
2
|
-
<div class="uk-margin-bottom">{{t
|
|
2
|
+
<div class="uk-margin-bottom">{{t
|
|
3
|
+
"ember-gwr.quarterlyClosure.components.projectErrors.infoText"
|
|
4
|
+
}}</div>
|
|
3
5
|
|
|
4
6
|
<div id="scroll-container uk-overflow-auto">
|
|
5
7
|
{{#each this.errors.value as |project|}}
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
</UkFlex>
|
|
15
15
|
{{/if}}
|
|
16
16
|
|
|
17
|
-
<div
|
|
18
|
-
class={{if this.errors.value.errorList.length "uk-margin-bottom"}}
|
|
19
|
-
>
|
|
17
|
+
<div class={{if this.errors.value.errorList.length "uk-margin-bottom"}}>
|
|
20
18
|
{{t "ember-gwr.quarterlyClosure.components.departmentErrors.infoText"}}
|
|
21
19
|
</div>
|
|
22
20
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<UkModal
|
|
2
|
+
@visible={{@visible}}
|
|
3
|
+
@onHide={{@onHide}}
|
|
4
|
+
@container={{this.config.modalContainer}}
|
|
5
|
+
as |Modal|
|
|
6
|
+
>
|
|
7
|
+
<ValidatedForm
|
|
8
|
+
@model={{changeset @model this.RemoveModalValidations}}
|
|
9
|
+
@on-submit={{@on-submit}}
|
|
10
|
+
@on-invalid-submit={{@on-invalid-submit}}
|
|
11
|
+
...attributes
|
|
12
|
+
as |Form|
|
|
13
|
+
>
|
|
14
|
+
<Modal.header>
|
|
15
|
+
<h2 class="uk-modal-title">
|
|
16
|
+
{{@title}}
|
|
17
|
+
</h2>
|
|
18
|
+
</Modal.header>
|
|
19
|
+
<Modal.body class="uk-overflow-auto">
|
|
20
|
+
<Form.input
|
|
21
|
+
@type="textarea"
|
|
22
|
+
@label={{@label}}
|
|
23
|
+
@name="removeReason"
|
|
24
|
+
@rows="10"
|
|
25
|
+
@required={{true}}
|
|
26
|
+
@hint={{@hint}}
|
|
27
|
+
@errorComponent={{component "validated-form-error"}}
|
|
28
|
+
/>
|
|
29
|
+
</Modal.body>
|
|
30
|
+
<Modal.footer class="uk-text-right">
|
|
31
|
+
<Form.button
|
|
32
|
+
@label={{t "ember-gwr.components.modal.cancel"}}
|
|
33
|
+
class="uk-modal-close"
|
|
34
|
+
/>
|
|
35
|
+
<Form.submit @label={{t "ember-gwr.components.modal.save"}} />
|
|
36
|
+
</Modal.footer>
|
|
37
|
+
</ValidatedForm>
|
|
38
|
+
</UkModal>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { service } from "@ember/service";
|
|
2
|
+
import Component from "@glimmer/component";
|
|
3
|
+
import RemoveModalValidations from "ember-ebau-gwr/validations/remove-modal";
|
|
4
|
+
|
|
5
|
+
export default class RemoveModalComponent extends Component {
|
|
6
|
+
RemoveModalValidations = RemoveModalValidations;
|
|
7
|
+
|
|
8
|
+
@service config;
|
|
9
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Controller from "@ember/controller";
|
|
2
2
|
import { action } from "@ember/object";
|
|
3
3
|
import { inject as service } from "@ember/service";
|
|
4
|
+
import { tracked } from "@glimmer/tracking";
|
|
4
5
|
import { task } from "ember-concurrency";
|
|
5
6
|
|
|
6
7
|
export default class BuildingEditDwellingsController extends Controller {
|
|
@@ -9,6 +10,8 @@ export default class BuildingEditDwellingsController extends Controller {
|
|
|
9
10
|
@service intl;
|
|
10
11
|
@service notification;
|
|
11
12
|
|
|
13
|
+
@tracked dwellingToRemove;
|
|
14
|
+
|
|
12
15
|
@task
|
|
13
16
|
*fetchDwellings() {
|
|
14
17
|
try {
|
|
@@ -28,13 +31,24 @@ export default class BuildingEditDwellingsController extends Controller {
|
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
@action
|
|
31
|
-
|
|
34
|
+
confirmRemoveDwelling(dwelling) {
|
|
35
|
+
this.dwellingToRemove = dwelling.EWID;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@action
|
|
39
|
+
async removeDwelling(formValues) {
|
|
32
40
|
try {
|
|
33
|
-
await this.dwelling.deactivate(
|
|
41
|
+
await this.dwelling.deactivate(
|
|
42
|
+
this.model,
|
|
43
|
+
this.dwellingToRemove,
|
|
44
|
+
formValues.get("removeReason"),
|
|
45
|
+
);
|
|
34
46
|
await this.fetchDwellings.perform();
|
|
35
47
|
this.notification.success(
|
|
36
48
|
this.intl.t("ember-gwr.building.dwellings.removeLinkSuccess"),
|
|
37
49
|
);
|
|
50
|
+
// Closes modal on success
|
|
51
|
+
this.dwellingToRemove = null;
|
|
38
52
|
} catch (error) {
|
|
39
53
|
console.error(error);
|
|
40
54
|
this.notification.danger(
|
|
@@ -108,12 +108,8 @@ export default class DwellingService extends GwrService {
|
|
|
108
108
|
return this.createAndCache(xml);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
async deactivate(EGID, EWID) {
|
|
112
|
-
const body = this.xml.buildXMLRequest(
|
|
113
|
-
"deactivateDwelling",
|
|
114
|
-
null,
|
|
115
|
-
"Remove Dwelling",
|
|
116
|
-
);
|
|
111
|
+
async deactivate(EGID, EWID, reason) {
|
|
112
|
+
const body = this.xml.buildXMLRequest("deactivateDwelling", null, reason);
|
|
117
113
|
const response = await this.authFetch.fetch(
|
|
118
114
|
`/buildings/${EGID}/dwellings/${EWID}`,
|
|
119
115
|
{
|
|
@@ -54,8 +54,14 @@
|
|
|
54
54
|
{{/if}}
|
|
55
55
|
|
|
56
56
|
<Field @attr="multipleFloor" @type="checkbox" @required={{true}} />
|
|
57
|
-
<Field
|
|
58
|
-
|
|
57
|
+
<Field
|
|
58
|
+
@attr="physicalDwellingNo"
|
|
59
|
+
@hint={{t "ember-gwr.dwelling.physicalDwellingNo.hint"}}
|
|
60
|
+
/>
|
|
61
|
+
<Field
|
|
62
|
+
@attr="administrativeDwellingNo"
|
|
63
|
+
@hint={{t "ember-gwr.dwelling.administrativeDwellingNo.hint"}}
|
|
64
|
+
/>
|
|
59
65
|
<Field @attr="noOfHabitableRooms" @type="number" @min="1" />
|
|
60
66
|
<Field @attr="locationOfDwellingOnFloor" />
|
|
61
67
|
<Field
|
|
@@ -99,7 +105,9 @@
|
|
|
99
105
|
/>
|
|
100
106
|
<div uk-alert>
|
|
101
107
|
<div class="uk-text-bold">
|
|
102
|
-
{{t
|
|
108
|
+
{{t
|
|
109
|
+
"ember-gwr.dwelling.dwellingUsage.mainAndSecondaryResidenceInfoHeading"
|
|
110
|
+
}}
|
|
103
111
|
</div>
|
|
104
112
|
<div>
|
|
105
113
|
{{t "ember-gwr.dwelling.dwellingUsage.mainAndSecondaryResidenceInfo"}}
|
|
@@ -121,4 +129,4 @@
|
|
|
121
129
|
|
|
122
130
|
</ModelForm>
|
|
123
131
|
{{/if}}
|
|
124
|
-
</div>
|
|
132
|
+
</div>
|