ember-ebau-gwr 5.0.1 → 5.0.4

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 CHANGED
@@ -1,3 +1,27 @@
1
+ ## [5.0.4](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v5.0.3...v5.0.4) (2022-09-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **search:** handle missing building status in preview title ([5809eb4](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/5809eb47e31b79d27ba7e1b1cb970fb64b814c50))
7
+ * **search:** include gwr-config service for modal container ([c89288e](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/c89288ec11675db7d2d016441f53e6f1dc4d39d7))
8
+ * **search:** reset projectId query-params on route exit ([736a70e](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/736a70e0179c1011e668285cc122bc7d31e40628))
9
+ * **status:** include status actions in project context ([9a22571](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/9a225714572a9fb9afbbffe6d9d9db27ffb94d07))
10
+
11
+ ## [5.0.3](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v5.0.2...v5.0.3) (2022-09-02)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **ember-resources:** update to prevent integration issue into camac-ng ([24b1d63](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/24b1d63854e9ea85d6bcbeabe7cc51eb07596943))
17
+
18
+ ## [5.0.2](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v5.0.1...v5.0.2) (2022-09-02)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **ember-engines-router-service:** downgrade to 0.3.0 since 0.4.0 has an issue ([bfbd79d](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/bfbd79da91195778ec11391aebf11dec9db2c9e0))
24
+
1
25
  ## [5.0.1](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v5.0.0...v5.0.1) (2022-09-02)
2
26
 
3
27
 
@@ -0,0 +1,7 @@
1
+ import Controller from "@ember/controller";
2
+ import { tracked } from "@glimmer/tracking";
3
+
4
+ export default class BuildingController extends Controller {
5
+ queryParams = ["projectId"];
6
+ @tracked projectId = null;
7
+ }
@@ -11,8 +11,8 @@ export default class ImportController extends Controller {
11
11
  return Boolean(this.model.instanceId && this._showImport);
12
12
  }
13
13
 
14
- get hasInstanceContext() {
15
- return Boolean(this.model.instanceId);
14
+ get hasProjectContext() {
15
+ return Boolean(this.model.projectId);
16
16
  }
17
17
 
18
18
  resetImportQueryParams() {
@@ -12,10 +12,14 @@ export default class SearchBuildingController extends Controller {
12
12
  @service intl;
13
13
  @service notification;
14
14
  @service router;
15
+ @service config;
15
16
 
16
17
  @tracked activeBuilding;
17
18
  @tracked errors;
18
19
 
20
+ queryParams = ["projectId"];
21
+ @tracked projectId = null;
22
+
19
23
  get baseQuery() {
20
24
  return {
21
25
  streetLang: this.street?.language,
@@ -9,4 +9,10 @@ export default class BuildingRoute extends Route {
9
9
  model({ projectId }) {
10
10
  return projectId;
11
11
  }
12
+
13
+ resetController(controller, isExiting) {
14
+ if (isExiting) {
15
+ controller.projectId = null;
16
+ }
17
+ }
12
18
  }
@@ -9,4 +9,10 @@ export default class SearchBuildingRoute extends Route {
9
9
  model({ projectId }) {
10
10
  return projectId;
11
11
  }
12
+
13
+ resetController(controller, isExiting) {
14
+ if (isExiting) {
15
+ controller.projectId = null;
16
+ }
17
+ }
12
18
  }
@@ -16,7 +16,7 @@
16
16
  @headerModelId={{this.dwelling.EWID}}
17
17
  @projectId={{this.router.externalRouter.currentRoute.attributes.projectId}}
18
18
  @modelName="dwelling"
19
- @showStatusActions={{this.hasInstanceContext}}
19
+ @showStatusActions={{this.hasProjectContext}}
20
20
  @showImport={{this.showImport}}
21
21
  @importIndex={{this.importIndex}}
22
22
  @modelStatusOptions={{this.dwellingStatusOptions}}
@@ -27,7 +27,7 @@
27
27
  @headerModelId={{this.building.EGID}}
28
28
  @projectId={{this.model.projectId}}
29
29
  @modelName="building"
30
- @showStatusActions={{this.hasInstanceContext}}
30
+ @showStatusActions={{this.hasProjectContext}}
31
31
  @showImport={{this.showImport}}
32
32
  @importIndex={{this.importIndex}}
33
33
  @modelStatusOptions={{this.buildingStatusOptions}}
@@ -18,7 +18,7 @@
18
18
  @headerModelId={{this.project.EPROID}}
19
19
  @projectId={{this.project.EPROID}}
20
20
  @modelName="project"
21
- @showStatusActions={{this.hasInstanceContext}}
21
+ @showStatusActions={{true}}
22
22
  @modelStatusOptions={{this.choiceOptions.projectStatusOptions}}
23
23
  @nextValidStates={{this.nextValidStates}}
24
24
  @onStatusChange={{this.transitionState}}
@@ -189,10 +189,12 @@
189
189
  {{t
190
190
  "ember-gwr.building.title"
191
191
  id=this.previewBuilding.EGID
192
- status=(t
193
- (concat
194
- "ember-gwr.building.buildingStatusOptions."
195
- this.previewBuilding.buildingStatus
192
+ status=(if this.previewBuilding.buildingStatus
193
+ (t
194
+ (concat
195
+ "ember-gwr.building.buildingStatusOptions."
196
+ this.previewBuilding.buildingStatus
197
+ )
196
198
  )
197
199
  )
198
200
  }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-ebau-gwr",
3
- "version": "5.0.1",
3
+ "version": "5.0.4",
4
4
  "description": "Ember engine to integrate ebau-gwr into an ember app.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -44,11 +44,11 @@
44
44
  "ember-cli-htmlbars": "^6.0.1",
45
45
  "ember-composable-helpers": "^5.0.0",
46
46
  "ember-concurrency": "^2.3.2",
47
- "ember-engines-router-service": "^0.4.0",
47
+ "ember-engines-router-service": "0.3.0",
48
48
  "ember-intl": "^5.7.2",
49
49
  "ember-pikaday": "^4.0.0",
50
50
  "ember-power-select": "^6.0.1",
51
- "ember-resources": "^5.2.1",
51
+ "ember-resources": "^5.3.1",
52
52
  "ember-truth-helpers": "^3.1.1",
53
53
  "ember-uikit": "^6.0.0",
54
54
  "ember-validated-form": "^5.3.1",
@@ -20,7 +20,7 @@ ember-gwr:
20
20
 
21
21
  building:
22
22
  building: Gebäude
23
- title: Gebäude {id} - {status}
23
+ title: Gebäude {id} {status, select, undefined {} other {- {status}}}
24
24
  createNewBuilding: Neues Gebäude erfassen
25
25
 
26
26
  backToProject: Zurück zum Bauprojekt
@@ -20,7 +20,7 @@ ember-gwr:
20
20
 
21
21
  building:
22
22
  building: Bâtiment
23
- title: Bâtiment {id} - {status}
23
+ title: Bâtiment {id} {status, select, undefined {} other {- {status}}}
24
24
  createNewBuilding: Saisir un nouveau bâtiment
25
25
 
26
26
  backToProject: Retour au projet de construction