ember-ebau-gwr 3.3.0 → 4.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +12 -31
  3. package/addon/components/import-modal.hbs +1 -1
  4. package/addon/components/link-building-modal.hbs +3 -3
  5. package/addon/components/link-street.hbs +1 -1
  6. package/addon/components/link-street.js +1 -1
  7. package/addon/components/login-modal.hbs +3 -1
  8. package/addon/components/logout.hbs +1 -1
  9. package/addon/components/logout.js +1 -1
  10. package/addon/components/model-errors/header.hbs +1 -1
  11. package/addon/components/model-form/date.hbs +27 -14
  12. package/addon/components/model-form/date.js +27 -7
  13. package/addon/components/model-form/diff.hbs +3 -3
  14. package/addon/components/model-form/field.hbs +4 -4
  15. package/addon/components/model-form/header/status-selector/submit-parameters.hbs +5 -3
  16. package/addon/components/model-form/header/status-selector.hbs +5 -8
  17. package/addon/components/model-form/header/status-selector.js +5 -3
  18. package/addon/components/model-form/header/status.hbs +1 -0
  19. package/addon/components/model-form/header.hbs +1 -0
  20. package/addon/components/model-form/submit.hbs +1 -0
  21. package/addon/components/model-form.hbs +3 -3
  22. package/addon/components/model-form.js +1 -1
  23. package/addon/components/model-inview.js +1 -1
  24. package/addon/components/project-form/diff.hbs +2 -0
  25. package/addon/components/search/result-table/row/field.hbs +1 -1
  26. package/addon/components/sub-nav.hbs +1 -3
  27. package/addon/controllers/building/edit/dwelling/edit.js +2 -2
  28. package/addon/controllers/building/edit/dwellings.js +1 -1
  29. package/addon/controllers/building/edit/entrance/edit/index.js +2 -2
  30. package/addon/controllers/building/edit/entrance/edit/link-street.js +3 -2
  31. package/addon/controllers/building/edit/entrances.js +1 -1
  32. package/addon/controllers/building/edit/form.js +3 -2
  33. package/addon/controllers/import.js +1 -1
  34. package/addon/controllers/project/errors.js +1 -5
  35. package/addon/controllers/project/form.js +2 -2
  36. package/addon/controllers/project/linked-buildings.js +1 -1
  37. package/addon/controllers/project.js +5 -5
  38. package/addon/controllers/search-building.js +3 -2
  39. package/addon/controllers/search-project.js +5 -3
  40. package/addon/engine.js +0 -1
  41. package/addon/helpers/build-url.js +10 -0
  42. package/addon/models/construction-project.js +5 -10
  43. package/addon/models/options.js +10 -120
  44. package/addon/modifiers/pikaday.js +2 -0
  45. package/addon/routes/building/edit/dwelling/new.js +1 -1
  46. package/addon/routes/building/edit/entrance/edit/link-street.js +3 -2
  47. package/addon/routes/building/edit/entrance/new.js +1 -1
  48. package/addon/routes/project/errors.js +1 -1
  49. package/addon/routes/project/form.js +1 -1
  50. package/addon/routes/project/new.js +6 -3
  51. package/addon/routes/project.js +1 -1
  52. package/addon/services/auth-fetch.js +1 -1
  53. package/addon/services/construction-project.js +5 -4
  54. package/addon/templates/building/edit/dwelling/edit.hbs +13 -13
  55. package/addon/templates/building/edit/dwellings.hbs +1 -1
  56. package/addon/templates/building/edit/entrance/edit/index.hbs +6 -6
  57. package/addon/templates/building/edit/entrances.hbs +2 -2
  58. package/addon/templates/building/edit/form.hbs +13 -13
  59. package/addon/templates/project/errors.hbs +3 -3
  60. package/addon/templates/project/form.hbs +21 -21
  61. package/addon/templates/project/linked-buildings.hbs +1 -1
  62. package/addon/templates/project.hbs +8 -16
  63. package/addon/xml/helpers.js +3 -3
  64. package/app/helpers/build-url.js +1 -0
  65. package/package.json +74 -65
  66. package/translations/building/de.yaml +1 -3
  67. package/translations/building/fr.yaml +281 -0
  68. package/translations/building-entrance/de.yaml +0 -1
  69. package/translations/building-entrance/fr.yaml +55 -0
  70. package/translations/construction-project/de.yaml +235 -234
  71. package/translations/construction-project/fr.yaml +431 -0
  72. package/translations/de.yaml +9 -5
  73. package/translations/dwelling/de.yaml +4 -6
  74. package/translations/dwelling/fr.yaml +87 -0
  75. package/translations/fr.yaml +341 -0
  76. package/translations/locality/fr.yaml +7 -0
  77. package/translations/street/fr.yaml +6 -0
  78. package/.dependabot/config.yml +0 -15
  79. package/.github/workflows/release.yml +0 -22
  80. package/.github/workflows/test.yml +0 -74
@@ -1,7 +1,7 @@
1
1
  import { action } from "@ember/object";
2
2
  import { inject as service } from "@ember/service";
3
3
  import { tracked } from "@glimmer/tracking";
4
- import { task, dropTask, lastValue } from "ember-concurrency-decorators";
4
+ import { task, dropTask, lastValue } from "ember-concurrency";
5
5
  import ImportController from "ember-ebau-gwr/controllers/import";
6
6
  import Models from "ember-ebau-gwr/models";
7
7
  import Building from "ember-ebau-gwr/models/building";
@@ -18,6 +18,7 @@ export default class BuildingFormController extends ImportController {
18
18
  @service gwr;
19
19
  @service intl;
20
20
  @service notification;
21
+ @service router;
21
22
 
22
23
  @tracked BuildingWorkValidations;
23
24
  @tracked errors;
@@ -126,7 +127,7 @@ export default class BuildingFormController extends ImportController {
126
127
  this.constructionProject.clearCache(this.model.projectId);
127
128
  this.buildingAPI.clearCache(this.model.buildingId);
128
129
  this.errors = [];
129
- this.transitionToRoute("building.edit.form", EGID);
130
+ this.router.transitionTo("building.edit.form", EGID);
130
131
  this.notification.success(this.intl.t("ember-gwr.building.saveSuccess"));
131
132
  } catch (error) {
132
133
  this.errors = error;
@@ -2,7 +2,7 @@ import Controller from "@ember/controller";
2
2
  import { assert } from "@ember/debug";
3
3
  import { inject as service } from "@ember/service";
4
4
  import { tracked } from "@glimmer/tracking";
5
- import { task, lastValue } from "ember-concurrency-decorators";
5
+ import { task, lastValue } from "ember-concurrency";
6
6
 
7
7
  const IMPORT_MAP = {
8
8
  project: "fetchProject",
@@ -1,11 +1,7 @@
1
1
  import Controller from "@ember/controller";
2
2
  import { inject as service } from "@ember/service";
3
3
  import { tracked } from "@glimmer/tracking";
4
- import {
5
- lastValue,
6
- restartableTask,
7
- enqueueTask,
8
- } from "ember-concurrency-decorators";
4
+ import { lastValue, restartableTask, enqueueTask } from "ember-concurrency";
9
5
 
10
6
  export default class ProjectErrorsController extends Controller {
11
7
  @service constructionProject;
@@ -1,7 +1,7 @@
1
1
  import { action } from "@ember/object";
2
2
  import { inject as service } from "@ember/service";
3
3
  import { tracked } from "@glimmer/tracking";
4
- import { task, dropTask, lastValue } from "ember-concurrency-decorators";
4
+ import { task, dropTask, lastValue } from "ember-concurrency";
5
5
  import ImportController from "ember-ebau-gwr/controllers/import";
6
6
  import BuildingWork from "ember-ebau-gwr/models/building-work";
7
7
  import ConstructionProject from "ember-ebau-gwr/models/construction-project";
@@ -78,7 +78,7 @@ export default class ProjectFormController extends ImportController {
78
78
  yield link.save();
79
79
  // Reload the overview table to display the new project
80
80
  yield this.constructionProject.all.perform(this.model.instanceId);
81
- this.transitionToRoute("project.form", project.EPROID);
81
+ this.router.transitionTo("project.form", project.EPROID);
82
82
  } else {
83
83
  if (
84
84
  (this.typeOfConstructionProject === 6010 &&
@@ -2,7 +2,7 @@ import Controller from "@ember/controller";
2
2
  import { action } from "@ember/object";
3
3
  import { inject as service } from "@ember/service";
4
4
  import { tracked } from "@glimmer/tracking";
5
- import { task } from "ember-concurrency-decorators";
5
+ import { task } from "ember-concurrency";
6
6
 
7
7
  export default class ProjectLinkedBuildingsController extends Controller {
8
8
  @service constructionProject;
@@ -12,8 +12,8 @@ export default class ProjectController extends Controller {
12
12
  get displayLandingPage() {
13
13
  return (
14
14
  !this.projects.length &&
15
- this.router.currentRoute.localName !== "new" &&
16
- this.router.currentRoute.localName !== "errors"
15
+ this.router.externalRouter.currentRoute.localName !== "new" &&
16
+ this.router.externalRouter.currentRoute.localName !== "errors"
17
17
  );
18
18
  }
19
19
 
@@ -35,7 +35,7 @@ export default class ProjectController extends Controller {
35
35
  }
36
36
 
37
37
  get activeProject() {
38
- return Number(this.router.currentRoute.params.project_id);
38
+ return Number(this.router.externalRouter.currentRoute.params.project_id);
39
39
  }
40
40
 
41
41
  get projects() {
@@ -51,11 +51,11 @@ export default class ProjectController extends Controller {
51
51
  // Load the first project in the list if none is selected so we always display a project.
52
52
  if (
53
53
  !["form", "new", "linked-buildings", "errors"].includes(
54
- this.router.currentRoute.localName
54
+ this.router.externalRouter.currentRoute.localName
55
55
  ) &&
56
56
  projects.length
57
57
  ) {
58
- this.transitionToRoute("project.form", projects[0].EPROID);
58
+ this.router.transitionTo("project.form", projects[0].EPROID);
59
59
  }
60
60
  }
61
61
 
@@ -2,7 +2,7 @@ import Controller from "@ember/controller";
2
2
  import { action } from "@ember/object";
3
3
  import { inject as service } from "@ember/service";
4
4
  import { tracked } from "@glimmer/tracking";
5
- import { task, dropTask, lastValue } from "ember-concurrency-decorators";
5
+ import { task, dropTask, lastValue } from "ember-concurrency";
6
6
  import {
7
7
  languageOptions,
8
8
  periodOfConstructionOptions,
@@ -13,6 +13,7 @@ export default class SearchBuildingController extends Controller {
13
13
  @service constructionProject;
14
14
  @service intl;
15
15
  @service notification;
16
+ @service router;
16
17
 
17
18
  @tracked activeBuilding;
18
19
  @tracked errors;
@@ -57,7 +58,7 @@ export default class SearchBuildingController extends Controller {
57
58
  );
58
59
 
59
60
  this.activeBuilding = null;
60
- this.transitionToRoute("project.linked-buildings", this.model);
61
+ this.router.transitionTo("project.linked-buildings", this.model);
61
62
  this.notification.success(
62
63
  this.intl.t("ember-gwr.searchBuilding.linkSuccess")
63
64
  );
@@ -2,13 +2,14 @@ import Controller from "@ember/controller";
2
2
  import { action } from "@ember/object";
3
3
  import { inject as service } from "@ember/service";
4
4
  import { tracked } from "@glimmer/tracking";
5
- import { task, lastValue } from "ember-concurrency-decorators";
5
+ import { task, lastValue } from "ember-concurrency";
6
6
  import { projectStatusOptions } from "ember-ebau-gwr/models/options";
7
7
 
8
8
  export default class SearchProjectController extends Controller {
9
9
  @service constructionProject;
10
10
  @service intl;
11
11
  @service store;
12
+ @service router;
12
13
 
13
14
  @tracked extendedSearch = false;
14
15
  @tracked validationErrors = {};
@@ -18,7 +19,8 @@ export default class SearchProjectController extends Controller {
18
19
  @lastValue("search") searchResults;
19
20
  @task
20
21
  *search(query = {}) {
21
- query.constructionSurveyDeptNumber = this.constructionProject.constructionSurveyDeptNumber;
22
+ query.constructionSurveyDeptNumber =
23
+ this.constructionProject.constructionSurveyDeptNumber;
22
24
  return yield this.constructionProject.search(query);
23
25
  }
24
26
 
@@ -29,6 +31,6 @@ export default class SearchProjectController extends Controller {
29
31
  localId: this.model.id,
30
32
  });
31
33
  link.save();
32
- this.transitionToRoute("project.index");
34
+ this.router.transitionTo("project.index");
33
35
  }
34
36
  }
package/addon/engine.js CHANGED
@@ -16,7 +16,6 @@ export default class EmberGWREngine extends Engine {
16
16
  "notification",
17
17
  "dataImport",
18
18
  "store",
19
- "router",
20
19
  "session",
21
20
  ],
22
21
  };
@@ -0,0 +1,10 @@
1
+ import Helper from "@ember/component/helper";
2
+ import { inject as service } from "@ember/service";
3
+
4
+ export default class BuildUrl extends Helper {
5
+ @service router;
6
+
7
+ compute([routeName, models = []]) {
8
+ return this.router.urlFor(routeName, ...models);
9
+ }
10
+ }
@@ -265,8 +265,7 @@ export default class ConstructionProject extends XMLModel {
265
265
  field: "durationOfConstructionPhase",
266
266
  type: "number",
267
267
  required: true,
268
- hint:
269
- "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
268
+ hint: "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
270
269
  },
271
270
  ],
272
271
  setToCompletedConstructionProject: [
@@ -309,8 +308,7 @@ export default class ConstructionProject extends XMLModel {
309
308
  field: "durationOfConstructionPhase",
310
309
  type: "number",
311
310
  required: true,
312
- hint:
313
- "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
311
+ hint: "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
314
312
  },
315
313
  ],
316
314
  [this.STATUS_COMPLETED]: [
@@ -321,8 +319,7 @@ export default class ConstructionProject extends XMLModel {
321
319
  field: "durationOfConstructionPhase",
322
320
  type: "number",
323
321
  required: true,
324
- hint:
325
- "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
322
+ hint: "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
326
323
  },
327
324
  { field: "projectCompletionDate", type: "date", required: true },
328
325
  ],
@@ -339,16 +336,14 @@ export default class ConstructionProject extends XMLModel {
339
336
  type: "date",
340
337
  required: false,
341
338
  on: "durationOfConstructionPhase",
342
- hint:
343
- "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
339
+ hint: "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
344
340
  },
345
341
  {
346
342
  field: "durationOfConstructionPhase",
347
343
  type: "number",
348
344
  required: false,
349
345
  on: "projectStartDate",
350
- hint:
351
- "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
346
+ hint: "ember-gwr.constructionProject.fields.durationOfConstructionPhase.hint",
352
347
  },
353
348
  { field: "projectSuspensionDate", type: "date", required: true },
354
349
  ],
@@ -1,119 +1,21 @@
1
1
  export const typeOfClientOptions = [
2
- 6101,
3
- 6103,
4
- 6104,
5
- 6105,
6
- 6107,
7
- 6108,
8
- 6110,
9
- 6111,
10
- 6115,
11
- 6116,
12
- 6121,
13
- 6122,
14
- 6123,
15
- 6124,
16
- 6131,
17
- 6132,
18
- 6133,
19
- 6141,
20
- 6142,
21
- 6143,
22
- 6161,
23
- 6151,
24
- 6152,
25
- 6162,
26
- 6163,
2
+ 6101, 6103, 6104, 6105, 6107, 6108, 6110, 6111, 6115, 6116, 6121, 6122, 6123,
3
+ 6124, 6131, 6132, 6133, 6141, 6142, 6143, 6161, 6151, 6152, 6162, 6163,
27
4
  ];
28
5
  export const typeOfConstructionOptions = [
29
- 6211,
30
- 6212,
31
- 6213,
32
- 6214,
33
- 6219,
34
- 6221,
35
- 6222,
36
- 6223,
37
- 6231,
38
- 6232,
39
- 6233,
40
- 6234,
41
- 6235,
42
- 6241,
43
- 6242,
44
- 6243,
45
- 6244,
46
- 6245,
47
- 6249,
48
- 6251,
49
- 6252,
50
- 6253,
51
- 6254,
52
- 6255,
53
- 6256,
54
- 6257,
55
- 6258,
56
- 6259,
57
- 6261,
58
- 6262,
59
- 6269,
60
- 6271,
61
- 6272,
62
- 6273,
63
- 6274,
64
- 6276,
65
- 6278,
66
- 6279,
67
- 6281,
68
- 6282,
69
- 6283,
70
- 6291,
71
- 6292,
72
- 6293,
73
- 6294,
74
- 6295,
75
- 6296,
76
- 6299,
6
+ 6211, 6212, 6213, 6214, 6219, 6221, 6222, 6223, 6231, 6232, 6233, 6234, 6235,
7
+ 6241, 6242, 6243, 6244, 6245, 6249, 6251, 6252, 6253, 6254, 6255, 6256, 6257,
8
+ 6258, 6259, 6261, 6262, 6269, 6271, 6272, 6273, 6274, 6276, 6278, 6279, 6281,
9
+ 6282, 6283, 6291, 6292, 6293, 6294, 6295, 6296, 6299,
77
10
  ];
78
11
  export const typeOfConstructionProjectOptions = [6010, 6011];
79
12
  export const typeOfPermitOptions = [
80
- 5000,
81
- 5001,
82
- 5002,
83
- 5003,
84
- 5004,
85
- 5005,
86
- 5006,
87
- 5007,
88
- 5008,
89
- 5009,
90
- 5011,
91
- 5012,
92
- 5015,
93
- 5021,
94
- 5022,
95
- 5023,
96
- 5031,
97
- 5041,
98
- 5043,
99
- 5044,
100
- 5051,
101
- 5061,
102
- 5062,
103
- 5064,
104
- 5063,
105
- 5071,
13
+ 5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5011, 5012, 5015,
14
+ 5021, 5022, 5023, 5031, 5041, 5043, 5044, 5051, 5061, 5062, 5064, 5063, 5071,
106
15
  ];
107
16
 
108
17
  export const projectStatusOptions = [
109
- 6701,
110
- 6702,
111
- 6703,
112
- 6704,
113
- 6706,
114
- 6707,
115
- 6708,
116
- 6709,
18
+ 6701, 6702, 6703, 6704, 6706, 6707, 6708, 6709,
117
19
  ];
118
20
 
119
21
  export const countryOptions = [
@@ -371,19 +273,7 @@ export const countryOptions = [
371
273
  export const languageOptions = { de: 9901, fr: 9903, it: 9904 };
372
274
 
373
275
  export const periodOfConstructionOptions = [
374
- 8011,
375
- 8012,
376
- 8013,
377
- 8014,
378
- 8015,
379
- 8016,
380
- 8017,
381
- 8018,
382
- 8019,
383
- 8020,
384
- 8021,
385
- 8022,
386
- 8023,
276
+ 8011, 8012, 8013, 8014, 8015, 8016, 8017, 8018, 8019, 8020, 8021, 8022, 8023,
387
277
  ];
388
278
 
389
279
  export const errorActionOptions = {
@@ -0,0 +1,2 @@
1
+ import "ember-pikaday/pikaday.css";
2
+ export { default } from "ember-pikaday/modifiers/pikaday";
@@ -8,7 +8,7 @@ export default class BuildingEditDwellingNewRoute extends DwellingEditRoute {
8
8
  templateName = "building.edit.dwelling.edit";
9
9
  controllerName = "building.edit.dwelling.edit";
10
10
 
11
- async model() {
11
+ model() {
12
12
  const model = this.modelFor("building.edit");
13
13
  const dwelling = new Dwelling();
14
14
  dwelling.dwellingStatus = DWELLING_PROJECTED;
@@ -4,6 +4,7 @@ import { inject as service } from "@ember/service";
4
4
  export default class BuildingEditEntranceLinkStreetRoute extends Route {
5
5
  @service buildingEntrance;
6
6
  @service building;
7
+ @service router;
7
8
 
8
9
  model() {
9
10
  return this.modelFor("building.edit.entrance.edit");
@@ -11,9 +12,9 @@ export default class BuildingEditEntranceLinkStreetRoute extends Route {
11
12
 
12
13
  afterModel(model) {
13
14
  if (model.buildingId === "new") {
14
- this.transitionTo("building.new");
15
+ this.router.transitionTo("building.new");
15
16
  } else if (model.entranceId === "new" && model.buildingId !== "new") {
16
- this.transitionTo("building.edit.entrance.new");
17
+ this.router.transitionTo("building.edit.entrance.new");
17
18
  }
18
19
  }
19
20
 
@@ -11,7 +11,7 @@ export default class BuildingEditEntranceNewRoute extends IndexRoute {
11
11
  templateName = "building.edit.entrance.edit.index";
12
12
  controllerName = "building.edit.entrance.edit.index";
13
13
 
14
- async model() {
14
+ model() {
15
15
  const model = this.modelFor("building.edit");
16
16
 
17
17
  const buildingEntrance = new BuildingEntrance();
@@ -1,7 +1,7 @@
1
1
  import Route from "@ember/routing/route";
2
2
 
3
3
  export default class ProjectErrorsRoute extends Route {
4
- async model({ project_id: projectId }) {
4
+ model({ project_id: projectId }) {
5
5
  return {
6
6
  projectId,
7
7
  instanceId: this.modelFor("application").id,
@@ -1,7 +1,7 @@
1
1
  import Route from "@ember/routing/route";
2
2
 
3
3
  export default class ProjectFormRoute extends Route {
4
- async model({ project_id: projectId }) {
4
+ model({ project_id: projectId }) {
5
5
  return {
6
6
  projectId,
7
7
  instanceId: this.modelFor("application").id,
@@ -13,9 +13,12 @@ export default class ProjectNewRoute extends FormRoute {
13
13
  async model() {
14
14
  const project = new ConstructionProject();
15
15
  await this.constructionProject.authFetch.housingStatToken.lastRunning;
16
- project.constructionLocalisation.municipalityId = this.constructionProject.municipality;
17
- project.constructionLocalisation.cantonAbbreviation = this.config.cantonAbbreviation;
18
- project.constructionSurveyDeptNumber = this.constructionProject.constructionSurveyDeptNumber;
16
+ project.constructionLocalisation.municipalityId =
17
+ this.constructionProject.municipality;
18
+ project.constructionLocalisation.cantonAbbreviation =
19
+ this.config.cantonAbbreviation;
20
+ project.constructionSurveyDeptNumber =
21
+ this.constructionProject.constructionSurveyDeptNumber;
19
22
  return { project, instanceId: this.modelFor("application").id };
20
23
  }
21
24
  }
@@ -1,7 +1,7 @@
1
1
  import Route from "@ember/routing/route";
2
2
 
3
3
  export default class ProjectRoute extends Route {
4
- async model() {
4
+ model() {
5
5
  return this.modelFor("application").id;
6
6
  }
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import Service, { inject as service } from "@ember/service";
2
2
  import { tracked } from "@glimmer/tracking";
3
- import { task, dropTask } from "ember-concurrency-decorators";
3
+ import { task, dropTask } from "ember-concurrency";
4
4
 
5
5
  export default class AuthFetchService extends Service {
6
6
  @service config;
@@ -1,5 +1,5 @@
1
1
  import { inject as service } from "@ember/service";
2
- import { task, lastValue } from "ember-concurrency-decorators";
2
+ import { task, lastValue } from "ember-concurrency";
3
3
  import Building from "ember-ebau-gwr/models/building";
4
4
  import BuildingWork from "ember-ebau-gwr/models/building-work";
5
5
  import ConstructionProject from "ember-ebau-gwr/models/construction-project";
@@ -756,9 +756,10 @@ export default class ConstructionProjectService extends GwrService {
756
756
  }
757
757
 
758
758
  correctStatus(project, newStatus) {
759
- const necessaryParameters = ConstructionProject.projectTransitionParametersMapping[
760
- newStatus
761
- ].map((param) => param.field);
759
+ const necessaryParameters =
760
+ ConstructionProject.projectTransitionParametersMapping[newStatus].map(
761
+ (param) => param.field
762
+ );
762
763
  ConstructionProject.statusParameters.forEach((parameter) => {
763
764
  if (project[parameter] && !necessaryParameters.includes(parameter)) {
764
765
  project[parameter] = "9999-01-01";
@@ -1,7 +1,7 @@
1
1
  <div>
2
2
  {{#if this.fetchDwelling.isRunning}}
3
3
  <div class="uk-flex uk-flex-center uk-flex-middle uk-margin-large-top">
4
- <UkSpinner @ratio="3" />
4
+ <UkSpinner @ratio={{3}} />
5
5
  </div>
6
6
  {{else}}
7
7
  <ModelForm
@@ -12,7 +12,7 @@
12
12
  @translationBase="ember-gwr.dwelling"
13
13
  @headerModel={{this.dwelling}}
14
14
  @headerModelId={{this.dwelling.EWID}}
15
- @projectId={{this.router.currentRoute.attributes.projectId}}
15
+ @projectId={{this.router.externalRouter.currentRoute.attributes.projectId}}
16
16
  @headerModelName="dwelling"
17
17
  @hasStatus={{true}}
18
18
  @import={{this.import}}
@@ -34,23 +34,23 @@
34
34
  @noPlaceholder={{true}}
35
35
  @required={{true}}
36
36
  />
37
-
37
+
38
38
  <Field
39
- @attr="floorType"
40
- @type="select" @required={{true}}
41
- @gwrEnumOptions={{this.Models.Dwelling.floorTypeOptions}}
39
+ @attr="floorType"
40
+ @type="select" @required={{true}}
41
+ @gwrEnumOptions={{this.Models.Dwelling.floorTypeOptions}}
42
42
  @hint={{t "ember-gwr.dwelling.floorHint"}}
43
43
  />
44
-
45
- {{#if (or
46
- (eq changeset.floorType 3101)
47
- (eq changeset.floorType 3401)
44
+
45
+ {{#if (or
46
+ (eq changeset.floorType 3101)
47
+ (eq changeset.floorType 3401)
48
48
  (and this.import this.import.data.floorNumber)
49
49
  )}}
50
50
  <Field
51
- @attr="floorNumber"
52
- @type="number"
53
- @required={{true}}
51
+ @attr="floorNumber"
52
+ @type="number"
53
+ @required={{true}}
54
54
  />
55
55
  {{/if}}
56
56
 
@@ -1,7 +1,7 @@
1
1
  <div>
2
2
  {{#if this.fetchDwellings.isRunning}}
3
3
  <div class="uk-flex uk-flex-center uk-flex-middle uk-margin-large-top">
4
- <UkSpinner @ratio="3" />
4
+ <UkSpinner @ratio={{3}} />
5
5
  </div>
6
6
  {{else}}
7
7
  <LinkedModels
@@ -1,7 +1,7 @@
1
1
  <div>
2
2
  {{#if this.fetchBuildingEntrance.isRunning}}
3
3
  <div class="uk-flex uk-flex-center uk-flex-middle uk-margin-large-top">
4
- <UkSpinner @ratio="3" />
4
+ <UkSpinner @ratio={{3}} />
5
5
  </div>
6
6
  {{else}}
7
7
  <ModelForm
@@ -13,7 +13,7 @@
13
13
  @headerModel={{this.buildingEntrance}}
14
14
  @headerModelId={{this.buildingEntrance.EDID}}
15
15
  @headerModelDescription={{this.buildingEntrance.fullAddressText}}
16
- @projectId={{this.router.currentRoute.attributes.projectId}}
16
+ @projectId={{this.router.externalRouter.currentRoute.attributes.projectId}}
17
17
  @headerModelName="entrance"
18
18
  @hasStatus={{false}}
19
19
  @import={{this.import}}
@@ -55,10 +55,10 @@
55
55
  @attr="buildingEntranceNo"
56
56
  @disabled={{this.hasNoStreet}}
57
57
  />
58
- <Field
59
- @attr="isOfficialAddress"
60
- @type="checkbox"
61
- @disabled={{this.hasNoStreet}}
58
+ <Field
59
+ @attr="isOfficialAddress"
60
+ @type="checkbox"
61
+ @disabled={{this.hasNoStreet}}
62
62
  />
63
63
  </div>
64
64
  {{#unless this.buildingEntrance.isNew}}
@@ -1,7 +1,7 @@
1
1
  <div>
2
2
  {{#if this.fetchEntrances.isRunning}}
3
3
  <div class="uk-flex uk-flex-center uk-flex-middle uk-margin-large-top">
4
- <UkSpinner @ratio="3" />
4
+ <UkSpinner @ratio={{3}} />
5
5
  </div>
6
6
  {{else}}
7
7
  <LinkedModels
@@ -11,7 +11,7 @@
11
11
  {{!--
12
12
  TODO removing a entrance is not allowed if there is still a dwelling attached to it
13
13
  We also cannot remove an entrance if there is only one. This only applies for active
14
- instances of dwellings and building entrances. Since building entrance deactivation
14
+ instances of dwellings and building entrances. Since building entrance deactivation
15
15
  is an asynchronous process, we should check the mutation status of deactivated
16
16
  building entrances and dwellings, to ensure that the requirements hold.
17
17
  --}}