ember-ebau-gwr 3.2.0 → 4.0.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.
- package/CHANGELOG.md +45 -0
- package/README.md +12 -31
- package/addon/components/import-modal/dwelling-data.hbs +10 -1
- package/addon/components/import-modal.hbs +1 -1
- package/addon/components/link-building-modal.hbs +3 -3
- package/addon/components/link-street.hbs +1 -1
- package/addon/components/link-street.js +1 -1
- package/addon/components/login-modal.hbs +3 -1
- package/addon/components/logout.hbs +1 -1
- package/addon/components/logout.js +1 -1
- package/addon/components/model-errors/header.hbs +1 -1
- package/addon/components/model-form/diff.hbs +2 -2
- package/addon/components/model-form/field.hbs +3 -3
- package/addon/components/model-form/header/actions.hbs +5 -2
- package/addon/components/model-form/header/actions.js +3 -0
- package/addon/components/model-form/header/status-selector/submit-parameters.hbs +5 -3
- package/addon/components/model-form/header/status-selector.hbs +5 -8
- package/addon/components/model-form/header/status-selector.js +5 -3
- package/addon/components/model-form/header/status.hbs +1 -0
- package/addon/components/model-form/header.hbs +1 -0
- package/addon/components/model-form/submit.hbs +1 -0
- package/addon/components/model-form.hbs +3 -3
- package/addon/components/model-form.js +1 -1
- package/addon/components/model-inview.js +1 -1
- package/addon/components/project-form/diff.hbs +2 -0
- package/addon/components/search/result-table/row/field.hbs +1 -1
- package/addon/components/sub-nav.hbs +1 -3
- package/addon/controllers/building/edit/dwelling/edit.js +2 -2
- package/addon/controllers/building/edit/dwellings.js +1 -1
- package/addon/controllers/building/edit/entrance/edit/index.js +2 -2
- package/addon/controllers/building/edit/entrance/edit/link-street.js +3 -2
- package/addon/controllers/building/edit/entrances.js +1 -1
- package/addon/controllers/building/edit/form.js +3 -2
- package/addon/controllers/import.js +13 -5
- package/addon/controllers/project/errors.js +1 -5
- package/addon/controllers/project/form.js +2 -2
- package/addon/controllers/project/linked-buildings.js +1 -1
- package/addon/controllers/project.js +5 -5
- package/addon/controllers/search-building.js +3 -2
- package/addon/controllers/search-project.js +5 -3
- package/addon/engine.js +0 -1
- package/addon/helpers/build-url.js +10 -0
- package/addon/models/construction-project.js +5 -10
- package/addon/models/options.js +10 -120
- package/addon/routes/building/edit/dwelling/new.js +1 -1
- package/addon/routes/building/edit/entrance/edit/link-street.js +3 -2
- package/addon/routes/building/edit/entrance/new.js +1 -1
- package/addon/routes/project/errors.js +1 -1
- package/addon/routes/project/form.js +1 -1
- package/addon/routes/project/new.js +6 -3
- package/addon/routes/project.js +1 -1
- package/addon/services/auth-fetch.js +12 -6
- package/addon/services/construction-project.js +5 -4
- package/addon/services/import-state.js +10 -0
- package/addon/templates/building/edit/dwelling/edit.hbs +13 -13
- package/addon/templates/building/edit/dwellings.hbs +1 -1
- package/addon/templates/building/edit/entrance/edit/index.hbs +6 -6
- package/addon/templates/building/edit/entrances.hbs +2 -2
- package/addon/templates/building/edit/form.hbs +13 -13
- package/addon/templates/project/errors.hbs +3 -3
- package/addon/templates/project/form.hbs +21 -21
- package/addon/templates/project/linked-buildings.hbs +1 -1
- package/addon/templates/project.hbs +8 -16
- package/app/helpers/build-url.js +1 -0
- package/app/styles/ember-ebau-gwr.scss +1 -1
- package/package.json +74 -64
- package/translations/building/de.yaml +1 -3
- package/translations/building/fr.yaml +281 -0
- package/translations/building-entrance/de.yaml +0 -1
- package/translations/building-entrance/fr.yaml +55 -0
- package/translations/construction-project/de.yaml +235 -234
- package/translations/construction-project/fr.yaml +431 -0
- package/translations/de.yaml +8 -5
- package/translations/dwelling/de.yaml +4 -6
- package/translations/dwelling/fr.yaml +87 -0
- package/translations/fr.yaml +339 -0
- package/translations/locality/fr.yaml +7 -0
- package/translations/street/fr.yaml +6 -0
- package/.dependabot/config.yml +0 -15
- package/.github/workflows/release.yml +0 -22
- package/.github/workflows/test.yml +0 -74
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
# [4.0.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v3.4.0...v4.0.0) (2022-01-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### chore
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependencies and remove deprecations ([6ae955a](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/6ae955ac007d3076073040aa80a3e1f0b79bb6d1))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **deps:** This drops support for node v10 and requires the host
|
|
12
|
+
app to use `ember-auto-import` v2. Also, the host app doesn't have to
|
|
13
|
+
inject the host router service into the engine anymore.
|
|
14
|
+
|
|
15
|
+
# [3.4.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v3.3.0...v3.4.0) (2021-12-29)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **ci:** make ember-release scenario optional ([3f665e9](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/3f665e9a1b950390927a831567a610fc609d9140))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **translations:** include French translation files ([a20d7b7](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/a20d7b7f7196655a1d324091dab2c78cb7d7b54c))
|
|
26
|
+
|
|
27
|
+
# [3.3.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v3.2.1...v3.3.0) (2021-11-04)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **import:** add error handling for failed data imports ([c9980c1](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/c9980c1b1fa4037f4101dc7485dea1af914b99f3))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
* **import:** show floor type/number in dwelling import modal ([cde49d1](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/cde49d1f7a94dfdd5c4bd758057ce3f801e561c9))
|
|
38
|
+
|
|
39
|
+
## [3.2.1](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v3.2.0...v3.2.1) (2021-10-22)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* **login:** remain on login page after failed login attempt ([0ef2728](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/0ef2728ce097b1b892f2a62f5cb69ef4d5f5a60c))
|
|
45
|
+
|
|
1
46
|
# [3.2.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v3.1.1...v3.2.0) (2021-10-18)
|
|
2
47
|
|
|
3
48
|
|
package/README.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
ember-ebau-gwr
|
|
2
|
-
|
|
1
|
+
# ember-ebau-gwr
|
|
2
|
+
|
|
3
3
|
Ember Engine for the [adfinis-sygroup/ebau-gwr](https://github.com/adfinis-sygroup/ebau-gwr) backend.
|
|
4
4
|
|
|
5
|
-
Development
|
|
6
|
-
------------------------------------------------------------------------------
|
|
5
|
+
## Development
|
|
7
6
|
|
|
8
7
|
```
|
|
9
8
|
# start a local CORS proxy
|
|
@@ -12,32 +11,19 @@ yarn proxy
|
|
|
12
11
|
yarn start
|
|
13
12
|
```
|
|
14
13
|
|
|
14
|
+
## Compatibility
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* Ember.js v3.16 or above
|
|
20
|
-
* Ember CLI v2.13 or above
|
|
21
|
-
* Node.js v10 or above
|
|
16
|
+
- Ember.js v3.24 or above
|
|
17
|
+
- Ember CLI v3.24 or above
|
|
18
|
+
- Node.js v12 or above
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
Installation
|
|
25
|
-
------------------------------------------------------------------------------
|
|
20
|
+
## Installation
|
|
26
21
|
|
|
27
22
|
```
|
|
28
23
|
ember install ember-ebau-gwr
|
|
29
24
|
```
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
Usage
|
|
33
|
-
------------------------------------------------------------------------------
|
|
34
|
-
|
|
35
|
-
> **Note**
|
|
36
|
-
> If this addon is used in `ember < 3.24.1` the project and buildings navigation
|
|
37
|
-
> won't work since ember does not yet support `@ember/routing/link-component`
|
|
38
|
-
> in engines (which the `uk-tab/link-item` component from `ember-uikit` extends).
|
|
39
|
-
>
|
|
40
|
-
> The normal workaround for this is to use the `ember-engines/components/link-to-component` if `ember-uikit` is used by an engine but since we would need to add `ember-engines` as dependency of `ember-uikit` this is still an open issue for now.
|
|
26
|
+
## Usage
|
|
41
27
|
|
|
42
28
|
Mount the engine in your router file. You can specify a param in the url which
|
|
43
29
|
will then be used to filter the `gwr-links` by their attribute `local_id`.
|
|
@@ -67,8 +53,7 @@ dependencies = {
|
|
|
67
53
|
"notification",
|
|
68
54
|
"dataImport",
|
|
69
55
|
"store",
|
|
70
|
-
"
|
|
71
|
-
session
|
|
56
|
+
"session",
|
|
72
57
|
],
|
|
73
58
|
};
|
|
74
59
|
```
|
|
@@ -97,14 +82,10 @@ The service should define a `fetchProject: async () -> Promise<Object>` function
|
|
|
97
82
|
We expect a `ember-simple-auth` session service which has the
|
|
98
83
|
`data.authenticated.access_token` set.
|
|
99
84
|
|
|
100
|
-
|
|
101
|
-
Contributing
|
|
102
|
-
------------------------------------------------------------------------------
|
|
85
|
+
## Contributing
|
|
103
86
|
|
|
104
87
|
See the [Contributing](CONTRIBUTING.md) guide for details.
|
|
105
88
|
|
|
106
|
-
|
|
107
|
-
License
|
|
108
|
-
------------------------------------------------------------------------------
|
|
89
|
+
## License
|
|
109
90
|
|
|
110
91
|
This project is licensed under the [AGPLv3](LICENSE.md).
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
<span class="uk-flex uk-child-width-1-2">
|
|
2
2
|
<span>{{t "ember-gwr.dwelling.floor"}}</span>
|
|
3
|
-
<span class="uk-text-muted">
|
|
3
|
+
<span class="uk-text-muted">
|
|
4
|
+
{{#if @model.floorType}}
|
|
5
|
+
{{concat
|
|
6
|
+
(if @model.floorNumber (concat @model.floorNumber ". "))
|
|
7
|
+
(t (concat "ember-gwr.dwelling.floorTypeOptions." @model.floorType))
|
|
8
|
+
}}
|
|
9
|
+
{{else}}
|
|
10
|
+
{{"-"}}
|
|
11
|
+
{{/if}}
|
|
12
|
+
</span>
|
|
4
13
|
</span>
|
|
5
14
|
<hr />
|
|
6
15
|
<span class="uk-flex uk-child-width-1-2">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<UkModal
|
|
2
2
|
@visible={{@visible}}
|
|
3
|
-
@
|
|
3
|
+
@onHide={{@close}}
|
|
4
4
|
@container={{this.config.modalContainer}}
|
|
5
5
|
as |Modal|
|
|
6
6
|
>
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
</Modal.body>
|
|
41
41
|
<Modal.footer class="uk-flex uk-flex-column">
|
|
42
42
|
<div class="uk-flex uk-flex-between">
|
|
43
|
-
<UkButton {{
|
|
43
|
+
<UkButton @onClick={{@close}}>
|
|
44
44
|
{{t "ember-gwr.components.linkBuildingModal.cancel"}}
|
|
45
45
|
</UkButton>
|
|
46
46
|
<UkButton
|
|
47
47
|
@color="primary"
|
|
48
48
|
@loading={{@isLoading}}
|
|
49
|
-
{{
|
|
49
|
+
@onClick={{fn @linkAction this.buildingWork}}
|
|
50
50
|
>
|
|
51
51
|
{{t "ember-gwr.components.linkBuildingModal.linkBuilding"}}
|
|
52
52
|
</UkButton>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inject as service } from "@ember/service";
|
|
2
2
|
import Component from "@glimmer/component";
|
|
3
|
-
import { task, lastValue } from "ember-concurrency
|
|
3
|
+
import { task, lastValue } from "ember-concurrency";
|
|
4
4
|
import Street from "ember-ebau-gwr/models/street";
|
|
5
5
|
|
|
6
6
|
export default class LinkStreetComponent extends Component {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
name="username"
|
|
16
16
|
class="uk-input"
|
|
17
17
|
placeholder={{t "ember-gwr.components.loginModal.username"}}
|
|
18
|
+
aria-label={{t "ember-gwr.components.loginModal.username"}}
|
|
18
19
|
value={{this.username}}
|
|
19
20
|
{{on "input" this.updateValue}}
|
|
20
21
|
/>
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
type="password"
|
|
26
27
|
class="uk-input"
|
|
27
28
|
placeholder={{t "ember-gwr.components.loginModal.password"}}
|
|
29
|
+
aria-label={{t "ember-gwr.components.loginModal.password"}}
|
|
28
30
|
value={{this.password}}
|
|
29
31
|
{{on "input" this.updateValue}}
|
|
30
32
|
/>
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
@color="primary"
|
|
57
59
|
@disabled={{not (and this.username this.password this.municipality)}}
|
|
58
60
|
@loading={{this.authFetch.housingStatToken.isRunning}}
|
|
59
|
-
{{
|
|
61
|
+
@onClick={{this.login}}
|
|
60
62
|
>
|
|
61
63
|
{{t "ember-gwr.components.loginModal.login"}}
|
|
62
64
|
</UkButton>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inject as service } from "@ember/service";
|
|
2
2
|
import Component from "@glimmer/component";
|
|
3
|
-
import { dropTask } from "ember-concurrency
|
|
3
|
+
import { dropTask } from "ember-concurrency";
|
|
4
4
|
|
|
5
5
|
export default class LogoutComponent extends Component {
|
|
6
6
|
@service authFetch;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<button
|
|
51
51
|
type="button"
|
|
52
52
|
class="uk-button uk-button-default uk-button-small"
|
|
53
|
-
{{on "click"
|
|
53
|
+
{{on "click" @updateModelField}}
|
|
54
54
|
>
|
|
55
55
|
{{t "ember-gwr.components.modelForm.diff.cancel"}}
|
|
56
56
|
</button>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
@inputComponent
|
|
62
62
|
value=this.newValue
|
|
63
63
|
includeBlank=false
|
|
64
|
-
on-update=
|
|
64
|
+
on-update=this.updateNewValue
|
|
65
65
|
}}
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
promptIsSelectable=true
|
|
35
35
|
on-update=(if
|
|
36
36
|
@on-update
|
|
37
|
-
(queue
|
|
38
|
-
|
|
37
|
+
(queue this.updateModelField @on-update)
|
|
38
|
+
this.updateModelField
|
|
39
39
|
)
|
|
40
40
|
renderComponent=(component
|
|
41
41
|
this.fieldComponent
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
@inputComponent={{InputComponent}}
|
|
53
53
|
@current={{this.value}}
|
|
54
54
|
@new={{this.importValue}}
|
|
55
|
-
@updateModelField={{
|
|
55
|
+
@updateModelField={{this.updateModelField}}
|
|
56
56
|
@horizontal={{this.isHorizontal}}
|
|
57
57
|
/>
|
|
58
58
|
{{else}}
|
|
@@ -78,12 +78,15 @@
|
|
|
78
78
|
{{#if @modelHasImport}}
|
|
79
79
|
<li>
|
|
80
80
|
<LinkTo
|
|
81
|
-
@disabled={{@import}}
|
|
81
|
+
@disabled={{or @import this.importState.hasError}}
|
|
82
82
|
@query={{hash import=true}}
|
|
83
83
|
class="uk-button uk-text-left uk-highlight-hover
|
|
84
|
-
{{if @import "uk-text-muted" "uk-text-secondary"}}
|
|
84
|
+
{{if (or @import this.importState.hasError) "uk-text-muted" "uk-text-secondary"}}
|
|
85
85
|
uk-width-1-1 uk-background-default uk-padding-remove"
|
|
86
86
|
{{on "click" (fn (mut this.showImportModal) true)}}
|
|
87
|
+
uk-tooltip="title: {{if this.importState.hasError
|
|
88
|
+
(t "ember-gwr.components.modelForm.importError")
|
|
89
|
+
}}; container: {{this.config.modalContainer}}"
|
|
87
90
|
>
|
|
88
91
|
{{t "ember-gwr.components.modelForm.importFromCaluma"}}
|
|
89
92
|
</LinkTo>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { inject as service } from "@ember/service";
|
|
1
2
|
import Component from "@glimmer/component";
|
|
2
3
|
import { tracked } from "@glimmer/tracking";
|
|
3
4
|
|
|
4
5
|
export default class ModelFormHeaderActionsComponent extends Component {
|
|
5
6
|
@tracked showImportModal = false;
|
|
7
|
+
@service importState;
|
|
8
|
+
@service config;
|
|
6
9
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@color={{if @isPrimary "primary" "default"}}
|
|
5
5
|
@loading={{and @loading (not @showDrop)}}
|
|
6
6
|
@disabled={{@disabled}}
|
|
7
|
-
{{
|
|
7
|
+
@onClick={{perform @onSubmit false @isChange}}
|
|
8
8
|
>
|
|
9
9
|
{{@submitLabel}}
|
|
10
10
|
</UkButton>
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
href="#ember-ebau-gwr-status-drop"
|
|
20
20
|
uk-toggle
|
|
21
21
|
uk-close
|
|
22
|
-
|
|
22
|
+
>
|
|
23
|
+
<span hidden>{{t "ebau-gwr.close"}}</span>
|
|
24
|
+
</a>
|
|
23
25
|
<ValidatedForm
|
|
24
26
|
class="validated-form"
|
|
25
27
|
@model={{@changeset}}
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
@type="button"
|
|
61
63
|
@color="primary"
|
|
62
64
|
@loading={{and @loading @showDrop}}
|
|
63
|
-
{{
|
|
65
|
+
@onClick={{perform @onSubmit true @isChange}}
|
|
64
66
|
>
|
|
65
67
|
{{@confirmLabel}}
|
|
66
68
|
</UkButton>
|
|
@@ -11,14 +11,11 @@
|
|
|
11
11
|
{{t "ember-gwr.components.header.statusSelector.statusLabel"}}
|
|
12
12
|
</div>
|
|
13
13
|
<form>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@optionLabelPath="label"
|
|
20
|
-
@update={{this.statusUpdate}}
|
|
21
|
-
/>
|
|
14
|
+
<select aria-label={{t "ember-gwr.components.header.statusSelector.statusLabel"}} class="uk-select" {{on "change" this.statusUpdate}}>
|
|
15
|
+
{{#each this.statusOptions as |opt|}}
|
|
16
|
+
<option value={{opt.status}} selected={{eq this.newStatus opt.status}}>{{opt.label}}</option>
|
|
17
|
+
{{/each}}
|
|
18
|
+
</select>
|
|
22
19
|
</form>
|
|
23
20
|
<small class="uk-text-muted uk-flex-inline uk-flex-column uk-width-large">
|
|
24
21
|
{{#if this.changeHint}}
|
|
@@ -4,7 +4,7 @@ import Component from "@glimmer/component";
|
|
|
4
4
|
import { tracked } from "@glimmer/tracking";
|
|
5
5
|
import { Changeset } from "ember-changeset";
|
|
6
6
|
import lookupValidator from "ember-changeset-validations";
|
|
7
|
-
import { dropTask } from "ember-concurrency
|
|
7
|
+
import { dropTask } from "ember-concurrency";
|
|
8
8
|
import { statusValidation } from "ember-ebau-gwr/validations/status";
|
|
9
9
|
|
|
10
10
|
export default class ModelFormHeaderStatusSelectorComponent extends Component {
|
|
@@ -42,9 +42,11 @@ export default class ModelFormHeaderStatusSelectorComponent extends Component {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@action
|
|
45
|
-
statusUpdate(
|
|
45
|
+
statusUpdate(event) {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
|
|
46
48
|
this.resetErrors();
|
|
47
|
-
this.newStatus = value;
|
|
49
|
+
this.newStatus = parseInt(event.target.value);
|
|
48
50
|
this.isCascading = false;
|
|
49
51
|
}
|
|
50
52
|
|
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
type="submit"
|
|
13
13
|
label=(t "ember-gwr.components.modelForm.save")
|
|
14
14
|
disabled=(or this.isSaving @disabled @import)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
)
|
|
15
|
+
loading=this.isSaving
|
|
16
|
+
buttonComponent=(component "model-form/submit" color="primary")
|
|
18
17
|
)
|
|
19
18
|
(component
|
|
20
19
|
"model-form/submit-errors"
|
|
@@ -26,6 +25,7 @@
|
|
|
26
25
|
)
|
|
27
26
|
as |Submit SubmitErrors|
|
|
28
27
|
}}
|
|
28
|
+
{{!-- template-lint-disable no-passed-in-event-handlers --}}
|
|
29
29
|
<ModelForm::Header
|
|
30
30
|
@model={{@headerModel}}
|
|
31
31
|
@modelId={{@headerModelId}}
|
|
@@ -2,7 +2,7 @@ import { action } from "@ember/object";
|
|
|
2
2
|
import { inject as service } from "@ember/service";
|
|
3
3
|
import Component from "@glimmer/component";
|
|
4
4
|
import { tracked } from "@glimmer/tracking";
|
|
5
|
-
import { dropTask } from "ember-concurrency
|
|
5
|
+
import { dropTask } from "ember-concurrency";
|
|
6
6
|
import { isIsoDate } from "ember-ebau-gwr/utils";
|
|
7
7
|
|
|
8
8
|
export default class ModelFormComponent extends Component {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from "@glimmer/component";
|
|
2
2
|
import { tracked } from "@glimmer/tracking";
|
|
3
|
-
import { task } from "ember-concurrency
|
|
3
|
+
import { task } from "ember-concurrency";
|
|
4
4
|
|
|
5
5
|
export default class ModelInviewComponent extends Component {
|
|
6
6
|
@tracked fetchedModel;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
</button>
|
|
14
14
|
</div>
|
|
15
15
|
<input
|
|
16
|
+
aria-label={{t "ember-gwr.components.projectForm.diff.existingData"}}
|
|
16
17
|
class="uk-width-1 uk-input"
|
|
17
18
|
disabled
|
|
18
19
|
readonly
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
</button>
|
|
34
35
|
</div>
|
|
35
36
|
<input
|
|
37
|
+
aria-label={{t "ember-gwr.components.projectForm.diff.importData"}}
|
|
36
38
|
class="uk-width-1 uk-input"
|
|
37
39
|
value={{this.newValue}}
|
|
38
40
|
{{on "input" this.updateNewValue}}
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
/>
|
|
7
7
|
<UkTab ...attributes as |Tab|>
|
|
8
8
|
{{#each @links as |link|}}
|
|
9
|
-
<Tab.
|
|
10
|
-
{{link.text}}
|
|
11
|
-
</Tab.link-item>
|
|
9
|
+
<Tab.item @href={{build-url link.route link.models}}>{{link.text}}</Tab.item>
|
|
12
10
|
{{/each}}
|
|
13
11
|
</UkTab>
|
|
14
12
|
{{/unless}}
|
|
@@ -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
|
|
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 Dwelling from "ember-ebau-gwr/models/dwelling";
|
|
@@ -97,7 +97,7 @@ export default class BuildingEditDwellingEditController extends ImportController
|
|
|
97
97
|
this.dwelling,
|
|
98
98
|
this.model.buildingId
|
|
99
99
|
);
|
|
100
|
-
this.
|
|
100
|
+
this.router.transitionTo("building.edit.dwelling.edit", dwelling.EWID);
|
|
101
101
|
} else {
|
|
102
102
|
yield this.dwellingAPI.update(this.dwelling, this.model.buildingId);
|
|
103
103
|
if (this.dwelling.oldEDID !== this.dwelling.EDID) {
|
|
@@ -1,7 +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 { task } from "ember-concurrency
|
|
4
|
+
import { task } from "ember-concurrency";
|
|
5
5
|
|
|
6
6
|
export default class BuildingEditDwellingsController extends Controller {
|
|
7
7
|
@service building;
|
|
@@ -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
|
|
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 BuildingEntranceValidations from "ember-ebau-gwr/validations/building-entrance";
|
|
@@ -58,7 +58,7 @@ export default class BuildingEditEntranceEditIndexController extends ImportContr
|
|
|
58
58
|
this.buildingEntrance,
|
|
59
59
|
this.model.buildingId
|
|
60
60
|
);
|
|
61
|
-
this.
|
|
61
|
+
this.router.transitionTo(
|
|
62
62
|
"building.edit.entrance.edit",
|
|
63
63
|
buildingEntrance.EDID
|
|
64
64
|
);
|
|
@@ -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, lastValue } from "ember-concurrency
|
|
5
|
+
import { task, lastValue } from "ember-concurrency";
|
|
6
6
|
import { languageOptions } from "ember-ebau-gwr/models/options";
|
|
7
7
|
|
|
8
8
|
export default class BuildingEditEntranceLinkStreetController extends Controller {
|
|
@@ -13,6 +13,7 @@ export default class BuildingEditEntranceLinkStreetController extends Controller
|
|
|
13
13
|
@service building;
|
|
14
14
|
@service notification;
|
|
15
15
|
@service intl;
|
|
16
|
+
@service router;
|
|
16
17
|
|
|
17
18
|
// A locality is uniquely described by either
|
|
18
19
|
// locality name + PLZ4 or PLZ4 + PLZ6
|
|
@@ -80,7 +81,7 @@ export default class BuildingEditEntranceLinkStreetController extends Controller
|
|
|
80
81
|
);
|
|
81
82
|
// Ensure building entrance list is updated
|
|
82
83
|
this.building.clearCache(this.model.buildingId);
|
|
83
|
-
this.
|
|
84
|
+
this.router.transitionTo(this.backRoute);
|
|
84
85
|
this.notification.success(
|
|
85
86
|
this.intl.t("ember-gwr.components.linkStreet.linkSuccess")
|
|
86
87
|
);
|
|
@@ -1,7 +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 { lastValue, task } from "ember-concurrency
|
|
4
|
+
import { lastValue, task } from "ember-concurrency";
|
|
5
5
|
import BuildingEntrance from "ember-ebau-gwr/models/building-entrance";
|
|
6
6
|
|
|
7
7
|
export default class BuildingEntrancesIndexController extends Controller {
|
|
@@ -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
|
|
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.
|
|
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
|
|
5
|
+
import { task, lastValue } from "ember-concurrency";
|
|
6
6
|
|
|
7
7
|
const IMPORT_MAP = {
|
|
8
8
|
project: "fetchProject",
|
|
@@ -20,6 +20,7 @@ export default class ImportController extends Controller {
|
|
|
20
20
|
];
|
|
21
21
|
|
|
22
22
|
@service dataImport;
|
|
23
|
+
@service importState;
|
|
23
24
|
|
|
24
25
|
@tracked showImport = false;
|
|
25
26
|
@tracked importIndex = undefined;
|
|
@@ -47,6 +48,7 @@ export default class ImportController extends Controller {
|
|
|
47
48
|
resetImport() {
|
|
48
49
|
this.showImport = false;
|
|
49
50
|
this.importIndex = null;
|
|
51
|
+
this.importState.error = null;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
@lastValue("fetchCalumaData") importData;
|
|
@@ -62,9 +64,15 @@ export default class ImportController extends Controller {
|
|
|
62
64
|
"Must set `instanceId` on model.",
|
|
63
65
|
this.model.instanceId !== null && this.model.instanceId !== undefined
|
|
64
66
|
);
|
|
65
|
-
|
|
66
|
-
this.
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
try {
|
|
68
|
+
return yield this.dataImport[IMPORT_MAP[this.importModelName]](
|
|
69
|
+
this.model.instanceId,
|
|
70
|
+
...args
|
|
71
|
+
);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error(error);
|
|
74
|
+
this.importState.error = error;
|
|
75
|
+
return error;
|
|
76
|
+
}
|
|
69
77
|
}
|
|
70
78
|
}
|