ember-ebau-gwr 2.7.1 → 3.2.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.
Files changed (116) hide show
  1. package/.github/workflows/release.yml +2 -0
  2. package/CHANGELOG.md +95 -0
  3. package/addon/components/back-route.hbs +10 -0
  4. package/addon/components/import-modal/building-data.hbs +64 -0
  5. package/addon/components/import-modal/dwelling-data.hbs +30 -0
  6. package/addon/components/import-modal/entrance-data.hbs +14 -0
  7. package/addon/components/import-modal.hbs +54 -0
  8. package/addon/components/import-modal.js +6 -0
  9. package/addon/components/link-building-modal.hbs +1 -1
  10. package/addon/components/link-building-modal.js +2 -0
  11. package/addon/components/link-street.hbs +105 -0
  12. package/addon/components/link-street.js +24 -0
  13. package/addon/components/linked-models.hbs +12 -6
  14. package/addon/components/linked-models.js +6 -0
  15. package/addon/components/linked-projects.hbs +1 -1
  16. package/addon/components/linked-projects.js +6 -0
  17. package/addon/components/model-errors/error-indicator.hbs +3 -1
  18. package/addon/components/model-errors/header.hbs +4 -2
  19. package/addon/components/model-errors.hbs +1 -0
  20. package/addon/components/model-form/date.hbs +1 -0
  21. package/addon/components/model-form/date.js +6 -6
  22. package/addon/components/model-form/diff.hbs +40 -27
  23. package/addon/components/model-form/field.hbs +13 -8
  24. package/addon/components/model-form/field.js +36 -9
  25. package/addon/components/model-form/header/actions.hbs +70 -36
  26. package/addon/components/model-form/header/actions.js +6 -0
  27. package/addon/components/model-form/header/status-selector/submit-parameters.hbs +1 -1
  28. package/addon/components/model-form/header/status-selector.hbs +1 -1
  29. package/addon/components/model-form/header.hbs +4 -2
  30. package/addon/components/model-form/submit-errors.hbs +41 -23
  31. package/addon/components/model-form.hbs +6 -5
  32. package/addon/components/model-form.js +25 -5
  33. package/addon/components/model-inview.hbs +8 -0
  34. package/addon/components/model-inview.js +12 -0
  35. package/addon/components/project-form/date.hbs +1 -1
  36. package/addon/components/project-form/field.hbs +1 -1
  37. package/addon/components/project-form/field.js +5 -1
  38. package/addon/components/search/filters.hbs +0 -5
  39. package/addon/components/search/filters.js +1 -3
  40. package/addon/components/sub-nav.hbs +5 -10
  41. package/addon/controllers/building/edit/dwelling/edit.js +27 -32
  42. package/addon/controllers/building/edit/dwellings.js +1 -1
  43. package/addon/controllers/building/edit/entrance/edit/index.js +26 -13
  44. package/addon/controllers/building/edit/entrance/edit/link-street.js +45 -20
  45. package/addon/controllers/building/edit/entrances.js +18 -2
  46. package/addon/controllers/building/edit/form.js +29 -44
  47. package/addon/controllers/import.js +70 -0
  48. package/addon/controllers/project/errors.js +25 -29
  49. package/addon/controllers/project/form.js +35 -48
  50. package/addon/controllers/project.js +2 -1
  51. package/addon/helpers/housing-stat-link.js +13 -0
  52. package/addon/helpers/is-unset.js +7 -0
  53. package/addon/helpers/show-model-field.js +13 -0
  54. package/addon/models/address.js +39 -9
  55. package/addon/models/building-entrance.js +17 -7
  56. package/addon/models/building.js +74 -75
  57. package/addon/models/client.js +1 -1
  58. package/addon/models/construction-project.js +18 -16
  59. package/addon/models/date-partially-known.js +1 -1
  60. package/addon/models/dwelling.js +28 -1
  61. package/addon/models/heating.js +1 -1
  62. package/addon/models/identification.js +2 -1
  63. package/addon/models/options.js +251 -1
  64. package/addon/models/organisation-identification.js +6 -3
  65. package/addon/models/realestate-identification.js +0 -6
  66. package/addon/models/street.js +2 -0
  67. package/addon/models/xml-model.js +18 -7
  68. package/addon/models.js +2 -1
  69. package/addon/routes/building/edit/entrance/edit/index.js +0 -2
  70. package/addon/routes/building/edit/entrance/edit/link-street.js +10 -1
  71. package/addon/routes/building/edit/entrance/new.js +9 -16
  72. package/addon/routes/building/edit/index.js +8 -1
  73. package/addon/routes/building/new.js +10 -1
  74. package/addon/routes/project/form.js +5 -0
  75. package/addon/routes/project/new.js +3 -2
  76. package/addon/services/building-entrance.js +13 -9
  77. package/addon/services/building.js +195 -193
  78. package/addon/services/construction-project.js +140 -152
  79. package/addon/services/gwr.js +47 -2
  80. package/addon/services/street.js +10 -0
  81. package/addon/templates/building/edit/dwelling/edit.hbs +29 -6
  82. package/addon/templates/building/edit/dwellings.hbs +7 -4
  83. package/addon/templates/building/edit/entrance/edit/index.hbs +49 -84
  84. package/addon/templates/building/edit/entrance/edit/link-street.hbs +41 -12
  85. package/addon/templates/building/edit/entrances.hbs +6 -3
  86. package/addon/templates/building/edit/form.hbs +75 -21
  87. package/addon/templates/project/errors.hbs +121 -132
  88. package/addon/templates/project/form.hbs +126 -97
  89. package/addon/templates/project/linked-buildings.hbs +13 -20
  90. package/addon/templates/project.hbs +29 -19
  91. package/addon/templates/search-building.hbs +6 -0
  92. package/addon/templates/search-project.hbs +6 -0
  93. package/addon/utils.js +8 -0
  94. package/addon/validations/building-entrance.js +6 -4
  95. package/addon/validations/building-work.js +131 -11
  96. package/addon/validations/construction-project.js +154 -6
  97. package/addon/validations/coordinates.js +2 -2
  98. package/addon/validations/dwelling.js +61 -6
  99. package/addon/validations/realestate-identification.js +9 -9
  100. package/addon/validations/status/status-project-change.js +1 -1
  101. package/addon/validations/status/status-project-correction.js +1 -1
  102. package/addon/validators/range-state.js +27 -0
  103. package/addon/xml/helpers.js +4 -0
  104. package/addon/xml/templates/building-entrance.js +0 -14
  105. package/addon/xml/templates/building.js +0 -6
  106. package/addon/xml/templates/construction-project.js +2 -9
  107. package/addon/xml/templates/street.js +1 -7
  108. package/app/styles/ember-ebau-gwr.scss +32 -5
  109. package/config/environment.js +3 -0
  110. package/package.json +2 -2
  111. package/translations/building/de.yaml +13 -8
  112. package/translations/building-entrance/de.yaml +4 -10
  113. package/translations/construction-project/de.yaml +270 -15
  114. package/translations/de.yaml +46 -13
  115. package/translations/dwelling/de.yaml +14 -0
  116. package/translations/locality/de.yaml +2 -0
@@ -24,138 +24,127 @@
24
24
  @linkModels={{array this.project.EPROID}}
25
25
  @modelDescription={{this.project.constructionProjectDescription}}
26
26
  />
27
- {{#let (filter-by "building.isNew" false this.project.work) as |work|}}
28
- {{#if work.length}}
29
- <h3 class="uk-margin-top">
30
- {{t "ember-gwr.nav.linkedBuildings"}}
31
- </h3>
32
- <div
33
- uk-scrollspy="cls: uk-animation-fade; target: .inview-trigger; offset-top: 300"
34
- >
35
- <ul class="uk-list uk-list-divider uk-list-large">
36
- {{#each (map-by "building" work) as |building|}}
37
- <div
38
- class="inview-trigger"
39
- {{on "inview" (perform this.fetchModel building.EGID)}}
27
+ {{#if this.workBuildings.length}}
28
+ <h3 class="uk-margin-top">
29
+ {{t "ember-gwr.nav.linkedBuildings"}}
30
+ </h3>
31
+ <div
32
+ uk-scrollspy="cls: uk-animation-fade; target: .inview-trigger; offset-top: 300"
33
+ >
34
+ <ul class="uk-list uk-list-divider uk-list-large">
35
+ {{#each this.workBuildings as |building|}}
36
+ <ModelInview
37
+ @model={{building.EGID}}
38
+ @fetchModel={{perform this.fetchModel}}
39
+ as |inview|
40
+ >
41
+ {{#let inview.model as |inviewModel|}}
42
+ <ModelErrors
43
+ @model={{building}}
44
+ @modelId={{building.EGID}}
45
+ @errorModel={{inviewModel.buildingWithErrors}}
46
+ @linkRoute="building.edit.form"
47
+ @linkModels={{array this.project.EPROID building.EGID}}
48
+ @modelDescription={{building.fullAddressTexts
49
+ }} as |BuildingErrorList|
40
50
  >
41
- {{#let
42
- (get (get this.buildings building.EGID) "building")
43
- (get (get this.buildings building.EGID) "entrances")
44
- (get
45
- (get this.buildings building.EGID) "dwellings"
46
- ) as |buildingWithErrors entrancesWithErrors dwellingsWithErrors|
47
- }}
48
- <ModelErrors
49
- @model={{building}}
50
- @modelId={{building.EGID}}
51
- @errorModel={{buildingWithErrors}}
52
- @linkRoute="building.edit.form"
53
- @linkModels={{array this.project.EPROID building.EGID}}
54
- @modelDescription={{building.fullAddressTexts
55
- }} as |BuildingErrorList|
51
+ {{#if inviewModel.buildingWithErrors}}
52
+ <UkSwitcher
53
+ class="uk-margin-small-top uk-animation-fade" as |switcher|
56
54
  >
57
- {{#if buildingWithErrors}}
58
- <UkSwitcher
59
- class="uk-margin-small-top uk-animation-fade" as |switcher|
60
- >
61
- <switcher.nav @type="subnav" as |nav|>
62
- <nav.component uk-switcher @divider={{true}} as |tab|>
63
- {{#if buildingWithErrors.errorList.length}}
64
- <tab.item>
65
- {{t "ember-gwr.issues.switcher.issues"}}
66
- </tab.item>
67
- {{/if}}
68
- {{#if entrancesWithErrors.length}}
69
- <tab.item>
70
- <div class="uk-flex-inline uk-flex-middle">
71
- {{t "ember-gwr.issues.switcher.entrances"}}
72
- <ModelErrors::ErrorIndicator
73
- @errorCount={{get
74
- this.entranceErrorCount
75
- building.EGID
76
- }}
77
- />
78
- </div>
79
- </tab.item>
80
- {{/if}}
81
- {{#if dwellingsWithErrors.length}}
82
- <tab.item>
83
- <div class="uk-flex-inline uk-flex-middle">
84
- {{t "ember-gwr.issues.switcher.dwellings"}}
85
- <ModelErrors::ErrorIndicator
86
- @errorCount={{get
87
- this.dwellingErrorCount
88
- building.EGID
89
- }}
90
- />
91
- </div>
92
- </tab.item>
93
- {{/if}}
94
- </nav.component>
95
- </switcher.nav>
96
- <switcher.content as |content|>
97
- {{#if buildingWithErrors.errorList.length}}
98
- <content.item>
99
- <li>
100
- <BuildingErrorList />
101
- </li>
102
- </content.item>
103
- {{/if}}
104
- {{#if entrancesWithErrors.length}}
105
- <content.item>
106
- <ul class="uk-list uk-list-divider uk-list-large">
107
- {{#each entrancesWithErrors as |entrance|}}
108
- <ModelErrors
109
- @model={{entrance}}
110
- @modelId={{entrance.EDID}}
111
- @errorModel={{entrance}}
112
- @linkRoute="building.edit.entrance.edit"
113
- @linkModels={{array
114
- this.project.EPROID
115
- building.EGID
116
- entrance.EDID
117
- }}
118
- @modelDescription={{entrance.fullAddressText}}
119
- />
120
- {{/each}}
121
- </ul>
122
- </content.item>
123
- {{/if}}
124
- {{#if dwellingsWithErrors.length}}
125
- <content.item>
126
- <ul class="uk-list uk-list-divider uk-list-large">
127
- {{#each dwellingsWithErrors as |dwelling|}}
128
- <ModelErrors
129
- @model={{dwelling.dwelling}}
130
- @modelId={{dwelling.dwelling.EWID}}
131
- @errorModel={{dwelling.dwelling}}
132
- @linkRoute="building.edit.dwelling.edit"
133
- @linkModels={{array
134
- this.project.EPROID
135
- building.EGID
136
- dwelling.dwelling.EWID
137
- }}
138
- @modelDescription={{concat
139
- (t "ember-gwr.models.entrance" count=1)
140
- " "
141
- dwelling.EDID
142
- }}
143
- />
144
- {{/each}}
145
- </ul>
146
- </content.item>
147
- {{/if}}
148
- </switcher.content>
149
- </UkSwitcher>
150
- {{else}}
151
- <ModelErrors::Skeleton />
152
- {{/if}}
153
- </ModelErrors>
154
- {{/let}}
155
- </div>
156
- {{/each}}
157
- </ul>
158
- </div>
159
- {{/if}}
160
- {{/let}}
55
+ <switcher.nav @type="subnav" as |nav|>
56
+ <nav.component uk-switcher @divider={{true}} as |tab|>
57
+ {{#if inviewModel.buildingWithErrors.errorList.length}}
58
+ <tab.item>
59
+ {{t "ember-gwr.issues.switcher.issues"}}
60
+ </tab.item>
61
+ {{/if}}
62
+ {{#if inviewModel.entrancesWithErrors.length}}
63
+ <tab.item>
64
+ <div class="uk-flex-inline uk-flex-middle">
65
+ {{t "ember-gwr.issues.switcher.entrances"}}
66
+ <ModelErrors::ErrorIndicator
67
+ @errorCount={{inviewModel.entranceErrorCount}}
68
+ />
69
+ </div>
70
+ </tab.item>
71
+ {{/if}}
72
+ {{#if inviewModel.dwellingsWithErrors.length}}
73
+ <tab.item>
74
+ <div class="uk-flex-inline uk-flex-middle">
75
+ {{t "ember-gwr.issues.switcher.dwellings"}}
76
+ <ModelErrors::ErrorIndicator
77
+ @errorCount={{inviewModel.dwellingErrorCount}}
78
+ />
79
+ </div>
80
+ </tab.item>
81
+ {{/if}}
82
+ </nav.component>
83
+ </switcher.nav>
84
+ <switcher.content as |content|>
85
+ {{#if inviewModel.buildingWithErrors.errorList.length}}
86
+ <content.item>
87
+ <li>
88
+ <BuildingErrorList />
89
+ </li>
90
+ </content.item>
91
+ {{/if}}
92
+ {{#if inviewModel.entrancesWithErrors.length}}
93
+ <content.item>
94
+ <ul class="uk-list uk-list-divider uk-list-large">
95
+ {{#each inviewModel.entrancesWithErrors as |entrance|}}
96
+ <ModelErrors
97
+ @model={{entrance}}
98
+ @modelId={{entrance.EDID}}
99
+ @errorModel={{entrance}}
100
+ @linkRoute="building.edit.entrance.edit"
101
+ @linkModels={{array
102
+ this.project.EPROID
103
+ building.EGID
104
+ entrance.EDID
105
+ }}
106
+ @modelDescription={{entrance.fullAddressText}}
107
+ @smallHeaderIdWidth={{true}}
108
+ />
109
+ {{/each}}
110
+ </ul>
111
+ </content.item>
112
+ {{/if}}
113
+ {{#if inviewModel.dwellingsWithErrors.length}}
114
+ <content.item>
115
+ <ul class="uk-list uk-list-divider uk-list-large">
116
+ {{#each inviewModel.dwellingsWithErrors as |dwelling|}}
117
+ <ModelErrors
118
+ @model={{dwelling.dwelling}}
119
+ @modelId={{dwelling.dwelling.EWID}}
120
+ @errorModel={{dwelling.dwelling}}
121
+ @linkRoute="building.edit.dwelling.edit"
122
+ @linkModels={{array
123
+ this.project.EPROID
124
+ building.EGID
125
+ dwelling.dwelling.EWID
126
+ }}
127
+ @modelDescription={{concat
128
+ (t "ember-gwr.models.entrance" count=1)
129
+ " "
130
+ dwelling.EDID
131
+ }}
132
+ @smallHeaderIdWidth={{true}}
133
+ />
134
+ {{/each}}
135
+ </ul>
136
+ </content.item>
137
+ {{/if}}
138
+ </switcher.content>
139
+ </UkSwitcher>
140
+ {{else}}
141
+ <ModelErrors::Skeleton />
142
+ {{/if}}
143
+ </ModelErrors>
144
+ {{/let}}
145
+ </ModelInview>
146
+ {{/each}}
147
+ </ul>
148
+ </div>
149
+ {{/if}}
161
150
  {{/if}}
@@ -1,7 +1,4 @@
1
- <div
2
- {{did-insert (perform this.fetchProject)}}
3
- {{did-update (perform this.fetchProject) @model.projectId}}
4
- >
1
+ <div>
5
2
  {{#if this.fetchProject.isRunning}}
6
3
  <div class="uk-flex uk-flex-center uk-flex-middle uk-margin-large-top">
7
4
  <UkSpinner @ratio="3" />
@@ -10,13 +7,10 @@
10
7
  <ModelForm
11
8
  @model={{this.project}}
12
9
  @validations={{this.ConstructionProjectValidations}}
13
- @importData={{if this.import this.importData}}
14
10
  @onSubmit={{this.saveProject}}
15
11
  @errors={{this.errors}}
16
12
  @translationBase="ember-gwr.constructionProject.fields"
17
- @hasImport={{true}}
18
13
  @import={{this.import}}
19
- @importAllData={{this.importAllData}}
20
14
  @headerModel={{this.project}}
21
15
  @headerModelId={{this.project.EPROID}}
22
16
  @projectId={{this.project.EPROID}}
@@ -28,9 +22,8 @@
28
22
  @onStatusCorrection={{this.correctState}}
29
23
  @getChangeParameters={{this.getChangeParameters}}
30
24
  @getCorrectionParameters={{this.getCorrectionParameters}}
31
- @getChangeHint={{this.getChangeHint}}
25
+ @getChangeHint={{fn this.gwr.getChangeHint this.constructionProject.cacheClass}}
32
26
  @modelStatusField="projectStatus"
33
- {{did-insert (perform this.fetchCalumaData)}}
34
27
  as |Field changeset|
35
28
  >
36
29
  {{#unless this.project.isNew}}
@@ -69,13 +62,18 @@
69
62
  @attr="typeOfConstructionProject"
70
63
  @gwrEnumOptions={{this.choiceOptions.typeOfConstructionProjectOptions}}
71
64
  @on-update={{fn (mut this.typeOfConstructionProject)}}
72
- @hint={{"Für Tiefbauprojekte sind keine Gebäude zugelassen."}}
65
+ @hint={{if
66
+ (eq this.typeOfConstructionProject 6010)
67
+ (t "ember-gwr.linkedBuildings.buildingDisabledForInfrastructure")
68
+ (if (eq this.typeOfConstructionProject 6011)
69
+ (t "ember-gwr.linkedBuildings.superstructureInfo"))
70
+ }}
73
71
  />
74
72
 
75
73
  {{#if (eq this.typeOfConstructionProject 6010)}}
76
74
  <LinkedModels
77
75
  @models={{this.workWithoutBuildings}}
78
- @modelName="building-work"
76
+ @modelName="building-work-infrastructure"
79
77
  @removeLink={{if (gt this.project.work.length 1) this.removeWorkLink}}
80
78
  @addLink={{this.addWorkLink}}
81
79
  as |model|
@@ -101,12 +99,19 @@
101
99
  />
102
100
  </div>
103
101
  {{else}}
104
- <div class="uk-width-medium uk-margin-large-right uk-flex-inline uk-flex-middle">
102
+ <div
103
+ class="uk-width-medium uk-margin-large-right uk-flex-inline uk-flex-middle"
104
+ >
105
105
  <div class="uk-form-label uk-margin-small-right">
106
106
  {{t "ember-gwr.buildingWork.kindOfWork"}}:
107
107
  </div>
108
108
  <div>
109
- {{t (concat "ember-gwr.buildingWork.kindOfWorkOptions." model.kindOfWork)}}
109
+ {{t
110
+ (concat
111
+ "ember-gwr.buildingWork.kindOfWorkOptions."
112
+ model.kindOfWork
113
+ )
114
+ }}
110
115
  </div>
111
116
  </div>
112
117
  <div class="uk-flex-inline uk-flex-middle">
@@ -168,49 +173,67 @@
168
173
  @required={{true}}
169
174
  />
170
175
  </div>
171
- {{#if this.project.buildingPermitIssueDate}}
172
- <div class={{spacingClass}}>
173
- <Field @inputType="date" @attr="buildingPermitIssueDate" />
174
- </div>
175
- {{/if}}
176
- {{#unless this.project.isNew}}
177
- {{#if this.project.projectStartDate}}
178
- <div class={{spacingClass}}>
179
- <Field @inputType="date" @attr="projectStartDate" />
180
- </div>
181
- {{/if}}
182
- {{#if this.project.projectCompletionDate}}
183
- <div class={{spacingClass}}>
184
- <Field @inputType="date" @attr="projectCompletionDate" />
185
- </div>
186
- {{/if}}
187
- {{#if this.project.projectSuspensionDate}}
188
- <div class={{spacingClass}}>
189
- <Field @inputType="date" @attr="projectSuspensionDate" />
190
- </div>
191
- {{/if}}
192
- {{#if this.project.constructionAuthorisationDeniedDate}}
193
- <div class={{spacingClass}}>
194
- <Field
195
- @inputType="date"
196
- @attr="constructionAuthorisationDeniedDate"
197
- />
198
- </div>
199
- {{/if}}
200
- {{#if this.project.nonRealisationDate}}
201
- <div class={{spacingClass}}>
202
- <Field @inputType="date" @attr="nonRealisationDate" />
203
- </div>
204
- {{/if}}
205
- {{#if this.project.withdrawalDate}}
206
- <div class={{spacingClass}}>
207
- <Field @inputType="date" @attr="withdrawalDate" />
208
- </div>
209
- {{/if}}
210
- {{/unless}}
176
+ <div
177
+ class="{{spacingClass}}
178
+ {{if (not (show-model-field
179
+ "buildingPermitIssueDate" changeset this.import
180
+ )) "uk-hidden"}}"
181
+ >
182
+ <Field @inputType="date" @attr="buildingPermitIssueDate" />
183
+ </div>
184
+ <div class="{{spacingClass}}
185
+ {{if (not (show-model-field
186
+ "projectStartDate" changeset this.import
187
+ )) "uk-hidden"}}"
188
+ >
189
+ <Field @inputType="date" @attr="projectStartDate" />
190
+ </div>
191
+ <div class="{{spacingClass}}
192
+ {{if (not (show-model-field
193
+ "projectCompletionDate" changeset this.import
194
+ )) "uk-hidden"}}"
195
+ >
196
+ <Field @inputType="date" @attr="projectCompletionDate" />
197
+ </div>
198
+ <div class="{{spacingClass}}
199
+ {{if (not (show-model-field
200
+ "projectSuspensionDate" changeset this.import
201
+ )) "uk-hidden"}}"
202
+ >
203
+ <Field @inputType="date" @attr="projectSuspensionDate" />
204
+ </div>
205
+ <div class="{{spacingClass}}
206
+ {{if (not (show-model-field
207
+ "constructionAuthorisationDeniedDate" changeset this.import
208
+ )) "uk-hidden"}}"
209
+ >
210
+ <Field
211
+ @inputType="date"
212
+ @attr="constructionAuthorisationDeniedDate"
213
+ />
214
+ </div>
215
+ <div class="{{spacingClass}}
216
+ {{if (not (show-model-field
217
+ "cancellationDate" changeset this.import
218
+ )) "uk-hidden"}}"
219
+ >
220
+ <Field @inputType="date" @attr="cancellationDate" />
221
+ </div>
222
+ <div class="{{spacingClass}}
223
+ {{if (not (show-model-field
224
+ "withdrawalDate" changeset this.import
225
+ )) "uk-hidden"}}"
226
+ >
227
+ <Field @inputType="date" @attr="withdrawalDate" />
228
+ </div>
211
229
  {{/let}}
212
230
  </div>
213
- {{#unless this.project.isNew}}
231
+ {{#if (or
232
+ (not this.project.isNew)
233
+ (show-model-field
234
+ "durationOfConstructionPhase" changeset this.import)
235
+ )
236
+ }}
214
237
  <Field
215
238
  @type="number"
216
239
  @attr="durationOfConstructionPhase"
@@ -218,15 +241,13 @@
218
241
  "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint"
219
242
  }}
220
243
  />
221
- {{/unless}}
244
+ {{/if}}
222
245
  <h3>
223
246
  {{t "ember-gwr.components.modelForm.realEstateHeading"}}
224
247
  </h3>
225
248
  <Field @attr="realestateIdentification.number" />
226
- <Field @attr="realestateIdentification.numberSuffix" />
227
249
  <Field @attr="realestateIdentification.EGRID" />
228
250
  <Field @type="number" @attr="realestateIdentification.subDistrict" />
229
- <Field @attr="realestateIdentification.lot" />
230
251
  <h3>
231
252
  {{t "ember-gwr.components.modelForm.clientHeading"}}
232
253
  </h3>
@@ -237,41 +258,31 @@
237
258
  @attr="typeOfClient"
238
259
  @gwrEnumOptions={{this.choiceOptions.typeOfClientOptions}}
239
260
  />
261
+ {{#if (compute this.isClientMismatch changeset)}}
262
+ <div class="uk-alert uk-alert-danger" >
263
+ {{t "ember-gwr.constructionProject.fields.typeOfClientAlert"}}
264
+ </div>
265
+ {{/if}}
240
266
  {{#if
241
267
  (or
242
- (not-eq changeset.typeOfClient 6161)
268
+ (eq changeset.typeOfClient 6161)
243
269
  (and
244
270
  this.import
245
- this.importData.client.identification.organisationIdentification.organisationName
271
+ this.import.data.client.identification.personIdentification.officialName
246
272
  )
247
273
  )
248
274
  }}
249
275
  <div class="uk-flex uk-margin">
250
276
  <div class="uk-width-1-2 uk-margin-small-right">
251
277
  <Field
252
- @attr="client.identification.organisationIdentification.organisationName"
278
+ @attr="client.identification.personIdentification.officialName"
253
279
  @noMargin={{true}}
254
280
  />
255
281
  </div>
256
282
  <div class="uk-width-1-2">
257
283
  <Field
258
- @attr="client.identification.organisationIdentification.organisationAdditionalName"
259
- @noMargin={{true}}
260
- />
261
- </div>
262
- </div>
263
- <div class="uk-flex uk-margin">
264
- <div class="uk-width-1-6">
265
- <Field
266
- @attr="client.identification.organisationIdentification.localOrganisationId.organisationIdCategory"
267
- @noMargin={{true}}
268
- />
269
- </div>
270
- <div class="uk-width-5-6 uk-margin-small-left">
271
- <Field
272
- @attr="client.identification.organisationIdentification.localOrganisationId.organisationId"
284
+ @attr="client.identification.personIdentification.firstName"
273
285
  @noMargin={{true}}
274
- @placeholder="100.200.300"
275
286
  />
276
287
  </div>
277
288
  </div>
@@ -279,13 +290,13 @@
279
290
  <div class="uk-flex uk-margin">
280
291
  <div class="uk-width-1-2 uk-margin-small-right">
281
292
  <Field
282
- @attr="client.identification.personIdentification.officialName"
293
+ @attr="client.identification.organisationIdentification.organisationName"
283
294
  @noMargin={{true}}
284
295
  />
285
296
  </div>
286
297
  <div class="uk-width-1-2">
287
298
  <Field
288
- @attr="client.identification.personIdentification.firstName"
299
+ @attr="client.identification.organisationIdentification.organisationAdditionalName"
289
300
  @noMargin={{true}}
290
301
  />
291
302
  </div>
@@ -303,21 +314,39 @@
303
314
  />
304
315
  </div>
305
316
  </div>
306
- <div class="{{unless this.import "uk-flex"}} uk-margin">
307
- <div class={{if this.import "uk-margin" "uk-width-1-6"}}>
308
- <Field
309
- @type="number"
310
- @attr="client.address.swissZipCode"
311
- @noMargin={{true}}
312
- />
313
- </div>
314
- <div class={{unless this.import "uk-width-5-6 uk-margin-small-left"}}>
315
- <Field @attr="client.address.town" @noMargin={{true}} />
317
+ <Field @attr="client.address.addressLine2" />
318
+ {{#if (or
319
+ (eq changeset.client.address.country.countryNameShort "ch")
320
+ (and this.import this.import.data.client.address.swissZipCode)
321
+ )}}
322
+ <div class="{{unless this.import "uk-flex"}} uk-margin">
323
+ <div class={{if this.import "uk-margin" "uk-width-1-2 uk-margin-small-right"}}>
324
+ <Field
325
+ @type="number"
326
+ @attr="client.address.swissZipCode"
327
+ @noMargin={{true}}
328
+ />
329
+ </div>
330
+ <div class={{if this.import "uk-margin" "uk-width-1-2"}}>
331
+ <Field
332
+ @type="number"
333
+ @attr="client.address.swissZipCodeAddOn"
334
+ @noMargin={{true}}
335
+ />
336
+ </div>
316
337
  </div>
317
- </div>
338
+ {{else if (or
339
+ changeset.client.address.country.countryNameShort
340
+ (and this.import this.import.data.client.address.foreignZipCode)
341
+ )}}
342
+ <Field
343
+ @type="number"
344
+ @attr="client.address.foreignZipCode"
345
+ />
346
+ {{/if}}
318
347
  <Field
319
348
  @inputType="select"
320
- @attr="client.address.country"
349
+ @attr="client.address.country.countryNameShort"
321
350
  @gwrEnumOptions={{this.choiceOptions.countryOptions}}
322
351
  />
323
352
 
@@ -331,11 +360,12 @@
331
360
  {{/if}}
332
361
  </div>
333
362
 
334
- <UkModal
363
+ <UkModal
335
364
  @visible={{this.showConfirmationDialog}}
336
365
  @btnClose={{false}}
337
366
  @bgClose={{false}}
338
367
  @escClose={{false}}
368
+ @container={{this.config.modalContainer}}
339
369
  as |modal|
340
370
  >
341
371
  <modal.header>
@@ -351,16 +381,15 @@
351
381
  {{/if}}
352
382
  </modal.body>
353
383
  <modal.footer @class="uk-text-right">
354
- <UkButton
355
- @color="default"
356
- @label={{t "ember-gwr.components.modelForm.project.confirmationContinue"}}
384
+ <UkButton
385
+ @color="default"
386
+ @label={{t "ember-gwr.components.modelForm.project.confirmationContinue"}}
357
387
  {{on "click" (perform this.processTypeOfConstructionProjectChange)}}
358
388
  />
359
- <UkButton
360
- @color="primary"
389
+ <UkButton
390
+ @color="primary"
361
391
  @label={{t "ember-gwr.components.modelForm.project.confirmationCancel"}}
362
392
  {{on "click" this.cancelTypeOfConstructionProjectChange}}
363
393
  />
364
394
  </modal.footer>
365
395
  </UkModal>
366
-