ember-ebau-gwr 3.1.1 → 3.4.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 (56) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/addon/components/back-route.hbs +10 -0
  3. package/addon/components/import-modal/dwelling-data.hbs +10 -1
  4. package/addon/components/linked-models.hbs +11 -5
  5. package/addon/components/model-errors/error-indicator.hbs +3 -1
  6. package/addon/components/model-errors/header.hbs +4 -2
  7. package/addon/components/model-errors.hbs +1 -0
  8. package/addon/components/model-form/field.js +5 -2
  9. package/addon/components/model-form/header/actions.hbs +10 -5
  10. package/addon/components/model-form/header/actions.js +3 -0
  11. package/addon/components/model-form.js +9 -1
  12. package/addon/components/model-inview.hbs +8 -0
  13. package/addon/components/model-inview.js +12 -0
  14. package/addon/components/sub-nav.hbs +5 -10
  15. package/addon/controllers/building/edit/dwelling/edit.js +2 -2
  16. package/addon/controllers/building/edit/form.js +0 -5
  17. package/addon/controllers/import.js +12 -4
  18. package/addon/controllers/project/errors.js +25 -29
  19. package/addon/controllers/project/form.js +25 -5
  20. package/addon/controllers/project.js +1 -1
  21. package/addon/helpers/housing-stat-link.js +13 -0
  22. package/addon/helpers/show-model-field.js +13 -0
  23. package/addon/models/building.js +1 -1
  24. package/addon/models/construction-project.js +1 -1
  25. package/addon/models/options.js +251 -1
  26. package/addon/services/auth-fetch.js +11 -5
  27. package/addon/services/building.js +182 -192
  28. package/addon/services/construction-project.js +134 -145
  29. package/addon/services/gwr.js +4 -0
  30. package/addon/services/import-state.js +10 -0
  31. package/addon/templates/building/edit/dwelling/edit.hbs +25 -22
  32. package/addon/templates/building/edit/entrance/edit/index.hbs +1 -2
  33. package/addon/templates/building/edit/form.hbs +38 -16
  34. package/addon/templates/project/errors.hbs +121 -132
  35. package/addon/templates/project/form.hbs +87 -53
  36. package/addon/templates/project/linked-buildings.hbs +13 -20
  37. package/addon/templates/project.hbs +23 -17
  38. package/addon/templates/search-building.hbs +6 -0
  39. package/addon/templates/search-project.hbs +6 -0
  40. package/addon/utils.js +8 -0
  41. package/addon/validations/building-work.js +2 -0
  42. package/addon/validations/dwelling.js +0 -5
  43. package/app/styles/ember-ebau-gwr.scss +9 -1
  44. package/config/environment.js +3 -0
  45. package/package.json +1 -1
  46. package/translations/building/de.yaml +4 -8
  47. package/translations/building/fr.yaml +281 -0
  48. package/translations/building-entrance/fr.yaml +56 -0
  49. package/translations/construction-project/de.yaml +256 -4
  50. package/translations/construction-project/fr.yaml +430 -0
  51. package/translations/de.yaml +22 -3
  52. package/translations/dwelling/de.yaml +3 -2
  53. package/translations/dwelling/fr.yaml +88 -0
  54. package/translations/fr.yaml +337 -0
  55. package/translations/locality/fr.yaml +7 -0
  56. package/translations/street/fr.yaml +6 -0
@@ -116,7 +116,257 @@ export const projectStatusOptions = [
116
116
  6709,
117
117
  ];
118
118
 
119
- export const countryOptions = ["ch", "de"];
119
+ export const countryOptions = [
120
+ "af",
121
+ "eg",
122
+ "ax",
123
+ "al",
124
+ "dz",
125
+ "as",
126
+ "ad",
127
+ "ao",
128
+ "ai",
129
+ "aq",
130
+ "ag",
131
+ "gq",
132
+ "ar",
133
+ "am",
134
+ "aw",
135
+ "az",
136
+ "et",
137
+ "au",
138
+ "bs",
139
+ "bh",
140
+ "bd",
141
+ "bb",
142
+ "by",
143
+ "be",
144
+ "bz",
145
+ "bj",
146
+ "bm",
147
+ "bt",
148
+ "bo",
149
+ "bq",
150
+ "ba",
151
+ "bw",
152
+ "bv",
153
+ "br",
154
+ "io",
155
+ "bn",
156
+ "bg",
157
+ "bf",
158
+ "bi",
159
+ "cl",
160
+ "cn",
161
+ "ck",
162
+ "cr",
163
+ "cw",
164
+ "dk",
165
+ "cd",
166
+ "de",
167
+ "dm",
168
+ "do",
169
+ "dj",
170
+ "ec",
171
+ "ci",
172
+ "sv",
173
+ "er",
174
+ "ee",
175
+ "sz",
176
+ "fk",
177
+ "fo",
178
+ "fj",
179
+ "fi",
180
+ "fr",
181
+ "tf",
182
+ "gf",
183
+ "pf",
184
+ "ga",
185
+ "gm",
186
+ "ge",
187
+ "gh",
188
+ "gi",
189
+ "gd",
190
+ "gr",
191
+ "gl",
192
+ "gp",
193
+ "gu",
194
+ "gt",
195
+ "gg",
196
+ "gw",
197
+ "gn",
198
+ "gy",
199
+ "ht",
200
+ "hm",
201
+ "hn",
202
+ "hk",
203
+ "in",
204
+ "id",
205
+ "im",
206
+ "iq",
207
+ "ir",
208
+ "ie",
209
+ "is",
210
+ "il",
211
+ "it",
212
+ "jm",
213
+ "jp",
214
+ "ye",
215
+ "je",
216
+ "jo",
217
+ "vg",
218
+ "vi",
219
+ "ky",
220
+ "kh",
221
+ "cm",
222
+ "ca",
223
+ "cv",
224
+ "kz",
225
+ "qa",
226
+ "ke",
227
+ "kg",
228
+ "ki",
229
+ "cc",
230
+ "co",
231
+ "km",
232
+ "xk",
233
+ "hr",
234
+ "cu",
235
+ "kw",
236
+ "la",
237
+ "ls",
238
+ "lv",
239
+ "lb",
240
+ "lr",
241
+ "ly",
242
+ "li",
243
+ "lt",
244
+ "lu",
245
+ "mo",
246
+ "mg",
247
+ "mw",
248
+ "my",
249
+ "mv",
250
+ "ml",
251
+ "mt",
252
+ "ma",
253
+ "mh",
254
+ "mq",
255
+ "mr",
256
+ "mu",
257
+ "yt",
258
+ "mx",
259
+ "fm",
260
+ "md",
261
+ "mc",
262
+ "mn",
263
+ "me",
264
+ "ms",
265
+ "mz",
266
+ "mm",
267
+ "na",
268
+ "nr",
269
+ "np",
270
+ "nc",
271
+ "nz",
272
+ "ni",
273
+ "nl",
274
+ "ng",
275
+ "ne",
276
+ "nu",
277
+ "kp",
278
+ "mp",
279
+ "mk",
280
+ "nf",
281
+ "no",
282
+ "om",
283
+ "at",
284
+ "tl",
285
+ "pk",
286
+ "ps",
287
+ "pw",
288
+ "pa",
289
+ "pg",
290
+ "py",
291
+ "pe",
292
+ "ph",
293
+ "pn",
294
+ "pl",
295
+ "pt",
296
+ "pr",
297
+ "cg",
298
+ "re",
299
+ "rw",
300
+ "ro",
301
+ "ru",
302
+ "mf",
303
+ "sb",
304
+ "zm",
305
+ "ws",
306
+ "bl",
307
+ "sm",
308
+ "st",
309
+ "sa",
310
+ "se",
311
+ "ch",
312
+ "sn",
313
+ "rs",
314
+ "sc",
315
+ "sl",
316
+ "zw",
317
+ "sg",
318
+ "sx",
319
+ "sk",
320
+ "si",
321
+ "so",
322
+ "es",
323
+ "lk",
324
+ "sh",
325
+ "kn",
326
+ "lc",
327
+ "pm",
328
+ "vc",
329
+ "za",
330
+ "sd",
331
+ "gs",
332
+ "kr",
333
+ "ss",
334
+ "sr",
335
+ "sj",
336
+ "sy",
337
+ "tj",
338
+ "tw",
339
+ "tz",
340
+ "th",
341
+ "tg",
342
+ "tk",
343
+ "to",
344
+ "tt",
345
+ "td",
346
+ "cz",
347
+ "tn",
348
+ "tr",
349
+ "tm",
350
+ "tc",
351
+ "tv",
352
+ "ug",
353
+ "ua",
354
+ "hu",
355
+ "uy",
356
+ "uz",
357
+ "vu",
358
+ "va",
359
+ "ve",
360
+ "ae",
361
+ "gb",
362
+ "us",
363
+ "vn",
364
+ "wf",
365
+ "cx",
366
+ "eh",
367
+ "cf",
368
+ "cy",
369
+ ];
120
370
 
121
371
  export const languageOptions = { de: 9901, fr: 9903, it: 9904 };
122
372
 
@@ -17,6 +17,12 @@ export default class AuthFetchService extends Service {
17
17
  this.housingStatToken.perform();
18
18
  }
19
19
 
20
+ showLogin() {
21
+ this.showAuthModal = true;
22
+ this.token = undefined;
23
+ this.municipality = undefined;
24
+ }
25
+
20
26
  @task
21
27
  *housingStatToken(username, password, municipality) {
22
28
  if (
@@ -48,15 +54,17 @@ export default class AuthFetchService extends Service {
48
54
 
49
55
  if (!response.ok) {
50
56
  if (json["400"]?.source === "internal") {
51
- this.showAuthModal = true;
57
+ this.showLogin();
52
58
  }
53
59
 
54
60
  if (json["401"]?.source === "external") {
55
61
  this.notification.danger(
56
62
  this.intl.t("ember-gwr.generalErrors.loginError")
57
63
  );
58
- this.showAuthModal = true;
64
+ this.showLogin();
59
65
  }
66
+
67
+ return;
60
68
  }
61
69
 
62
70
  this.token = json.token;
@@ -76,9 +84,7 @@ export default class AuthFetchService extends Service {
76
84
  });
77
85
 
78
86
  if (response.ok || (!response.ok && response.status === 401)) {
79
- this.showAuthModal = true;
80
- this.token = undefined;
81
- this.municipality = undefined;
87
+ this.showLogin();
82
88
  } else {
83
89
  this.notification.danger(
84
90
  this.intl.t("ember-gwr.generalErrors.logoutError")