ember-ebau-gwr 3.4.0 → 4.0.3
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 +35 -0
- package/README.md +12 -31
- 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/date.hbs +28 -14
- package/addon/components/model-form/date.js +30 -7
- package/addon/components/model-form/diff.hbs +3 -3
- package/addon/components/model-form/field.hbs +4 -4
- 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 +1 -1
- 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/modifiers/pikaday.js +2 -0
- 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 +1 -1
- package/addon/services/construction-project.js +5 -4
- 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/addon/xml/helpers.js +3 -3
- package/app/helpers/build-url.js +1 -0
- package/package.json +74 -65
- package/translations/building/fr.yaml +8 -8
- package/translations/building-entrance/de.yaml +0 -1
- package/translations/building-entrance/fr.yaml +2 -3
- package/translations/construction-project/de.yaml +235 -234
- package/translations/construction-project/fr.yaml +245 -244
- package/translations/de.yaml +9 -5
- package/translations/dwelling/de.yaml +4 -5
- package/translations/dwelling/fr.yaml +1 -2
- package/translations/fr.yaml +27 -23
- 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,38 @@
|
|
|
1
|
+
## [4.0.3](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.2...v4.0.3) (2022-02-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **date:** pikaday use monday as first day of week ([d5617b2](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/d5617b2c01b24905cbc3e2b62cd1269347339c75))
|
|
7
|
+
|
|
8
|
+
## [4.0.2](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.1...v4.0.2) (2022-02-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update ember-pikaday and remove moment and dayjs ([1acbffc](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/1acbffca9eff26f32fdad9df1856d8bf936edf7b))
|
|
14
|
+
|
|
15
|
+
## [4.0.1](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v4.0.0...v4.0.1) (2022-01-25)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **deprecations:** fix all self-inflicted deprecations ([3481dbf](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/3481dbf7aa9598474ef733de0326150c01bf79cd))
|
|
21
|
+
|
|
22
|
+
# [4.0.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v3.4.0...v4.0.0) (2022-01-25)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### chore
|
|
26
|
+
|
|
27
|
+
* **deps:** update dependencies and remove deprecations ([6ae955a](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/6ae955ac007d3076073040aa80a3e1f0b79bb6d1))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### BREAKING CHANGES
|
|
31
|
+
|
|
32
|
+
* **deps:** This drops support for node v10 and requires the host
|
|
33
|
+
app to use `ember-auto-import` v2. Also, the host app doesn't have to
|
|
34
|
+
inject the host router service into the engine anymore.
|
|
35
|
+
|
|
1
36
|
# [3.4.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v3.3.0...v3.4.0) (2021-12-29)
|
|
2
37
|
|
|
3
38
|
|
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,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;
|
|
@@ -2,20 +2,34 @@
|
|
|
2
2
|
<div class="{{if @horizontal "uk-margin-left uk-flex-last"}}">
|
|
3
3
|
{{component @labelComponent}}
|
|
4
4
|
</div>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
{{#if @disabled}}
|
|
6
|
+
<input
|
|
7
|
+
type="text"
|
|
8
|
+
class="uk-input uk-width-1 {{if @isInvalid "uk-form-danger"}} {{if @isValid "uk-form-success"}}"
|
|
9
|
+
name={{@name}}
|
|
10
|
+
value={{format-date @value day="2-digit" month="2-digit" year="numeric"}}
|
|
11
|
+
placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
|
|
12
|
+
disabled
|
|
13
|
+
...attributes
|
|
14
|
+
>
|
|
15
|
+
{{else}}
|
|
16
|
+
<input
|
|
17
|
+
type="text"
|
|
18
|
+
class="uk-input uk-width-1 {{if @isInvalid "uk-form-danger"}} {{if @isValid "uk-form-success"}}"
|
|
19
|
+
name={{@name}}
|
|
20
|
+
required={{@required}}
|
|
21
|
+
placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
|
|
22
|
+
...attributes
|
|
23
|
+
{{pikaday
|
|
24
|
+
value=@value
|
|
25
|
+
yearRange=this.yearRange
|
|
26
|
+
onSelect=@update
|
|
27
|
+
toString=this.formatDate
|
|
28
|
+
firstDay=1
|
|
29
|
+
i18n=this.pikadayTranslations
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
{{/if}}
|
|
19
33
|
</div>
|
|
20
34
|
{{component @hintComponent}}
|
|
21
35
|
{{component @errorComponent}}
|
|
@@ -1,13 +1,36 @@
|
|
|
1
|
+
import { action } from "@ember/object";
|
|
2
|
+
import { inject as service } from "@ember/service";
|
|
1
3
|
import Component from "@glimmer/component";
|
|
4
|
+
import { Info } from "luxon";
|
|
5
|
+
|
|
6
|
+
// put the last element to the front of the array
|
|
7
|
+
const shift = (array) => [...array.slice(-1), ...array.slice(0, -1)];
|
|
2
8
|
|
|
3
|
-
// TODO: remove file once two-way binding issue of value is resolved in ember-pikaday
|
|
4
|
-
// https://github.com/adopted-ember-addons/ember-pikaday/issues/212
|
|
5
9
|
export default class ModelFormDateComponent extends Component {
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
@service intl;
|
|
11
|
+
|
|
12
|
+
get pikadayTranslations() {
|
|
13
|
+
const locale = this.intl.primaryLocale;
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
previousMonth: this.intl.t("ember-gwr.previousMonth"),
|
|
17
|
+
nextMonth: this.intl.t("ember-gwr.nextMonth"),
|
|
18
|
+
months: Info.months("long", { locale }),
|
|
19
|
+
weekdays: shift(Info.weekdays("long", { locale })),
|
|
20
|
+
weekdaysShort: shift(Info.weekdays("short", { locale })),
|
|
21
|
+
};
|
|
8
22
|
}
|
|
9
23
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
get yearRange() {
|
|
25
|
+
return [2000, new Date().getFullYear()];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@action
|
|
29
|
+
formatDate(value) {
|
|
30
|
+
return this.intl.formatDate(value, {
|
|
31
|
+
day: "2-digit",
|
|
32
|
+
month: "2-digit",
|
|
33
|
+
year: "numeric",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
13
36
|
}
|
|
@@ -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>
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
{{component
|
|
61
61
|
@inputComponent
|
|
62
62
|
value=this.newValue
|
|
63
|
-
|
|
64
|
-
on-update=
|
|
63
|
+
prompt=false
|
|
64
|
+
on-update=this.updateNewValue
|
|
65
65
|
}}
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
optionLabelPath=(if @gwrEnumOptions "label" @optionLabelPath)
|
|
26
26
|
optionTargetPath=(if @gwrEnumOptions "value" @optionTargetPath)
|
|
27
27
|
optionValuePath=@optionValuePath
|
|
28
|
-
|
|
28
|
+
prompt=(unless
|
|
29
29
|
@noPlaceholder
|
|
30
30
|
(t
|
|
31
31
|
(concat (or @label (concat @translationBase "." @attr)) "Placeholder")
|
|
@@ -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}}
|
|
@@ -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;
|