diff --git a/addon/components/link-street.hbs b/addon/components/link-street.hbs index f34705d1..66b0c82a 100644 --- a/addon/components/link-street.hbs +++ b/addon/components/link-street.hbs @@ -1,7 +1,5 @@ {{#if this.fetchStreet.isRunning}} -
- -
+ {{else}} {{#let @fieldComponent as |Field|}} {{#unless @buildingEntrance.street.isNew}} @@ -74,7 +72,10 @@
{{t (if @@ -102,4 +103,4 @@
{{/let}} -{{/if}} \ No newline at end of file +{{/if}} diff --git a/addon/components/loading.hbs b/addon/components/loading.hbs new file mode 100644 index 00000000..f59e032c --- /dev/null +++ b/addon/components/loading.hbs @@ -0,0 +1,3 @@ +
+ +
diff --git a/addon/components/login-modal.hbs b/addon/components/login-modal.hbs index 0d28b9e4..1d84ed89 100644 --- a/addon/components/login-modal.hbs +++ b/addon/components/login-modal.hbs @@ -1,83 +1,88 @@ -{{#if this.authFetch.showAuthModal}} - - -

- {{t "ember-gwr.components.loginModal.header"}} -

-
- -
-
- -
-
- -
-
- - {{municipality.name}} - -
-
-
- - - {{t "ember-gwr.components.loginModal.login"}} - - -
+{{#if this.authFetch.housingStatToken.isRunning}} + {{else}} -
- - {{t - "ember-gwr.components.loginModal.loginInfo" - user=this.authFetch.username - municipality=(get - (find-by "id" this.authFetch.municipality this.municipalities) "name" - ) - }} - - -
- {{yield}} + {{#if this.authFetch.showAuthModal}} + + {{else}} +
+ + {{t + "ember-gwr.components.loginModal.loginInfo" + user=this.authFetch.username + municipality=(get + (find-by "id" this.authFetch.municipality this.municipalities) + "name" + ) + }} + + +
+ {{yield}} + {{/if}} {{/if}} diff --git a/addon/components/project-nav.hbs b/addon/components/project-nav.hbs index 6497cad1..1235e55f 100644 --- a/addon/components/project-nav.hbs +++ b/addon/components/project-nav.hbs @@ -1,8 +1,6 @@
{{#if this.constructionProject.all.isRunning}} -
- -
+ {{else}} {{#if this.displayLandingPage}} diff --git a/addon/services/auth-fetch.js b/addon/services/auth-fetch.js index bab78494..f75b63d7 100644 --- a/addon/services/auth-fetch.js +++ b/addon/services/auth-fetch.js @@ -26,13 +26,6 @@ export default class AuthFetchService extends Service { @task *housingStatToken(username, password, municipality) { - if ( - this.config.username && - this.config.password && - this.config.municipality - ) { - ({ username, password, municipality } = this.config); - } const response = yield fetch(`/api/v1/housing-stat-token`, { method: "post", headers: { diff --git a/addon/templates/building/edit/dwelling/edit.hbs b/addon/templates/building/edit/dwelling/edit.hbs index 5c1f0562..9574cb95 100644 --- a/addon/templates/building/edit/dwelling/edit.hbs +++ b/addon/templates/building/edit/dwelling/edit.hbs @@ -1,8 +1,6 @@
{{#if this.fetchDwelling.isRunning}} -
- -
+ {{else}} - {{#if (or - (eq changeset.floorType 3101) - (eq changeset.floorType 3401) - (and this.import this.import.data.floorNumber) - )}} - + {{#if + (or + (eq changeset.floorType 3101) + (eq changeset.floorType 3401) + (and this.import this.import.data.floorNumber) + ) + }} + {{/if}} diff --git a/addon/templates/building/edit/dwellings.hbs b/addon/templates/building/edit/dwellings.hbs index 79d74aa9..ddcf8838 100644 --- a/addon/templates/building/edit/dwellings.hbs +++ b/addon/templates/building/edit/dwellings.hbs @@ -1,8 +1,6 @@
{{#if this.fetchDwellings.isRunning}} -
- -
+ {{else}} @@ -50,4 +49,4 @@ {{/if}} -
\ No newline at end of file +
diff --git a/addon/templates/building/edit/entrance/edit/index.hbs b/addon/templates/building/edit/entrance/edit/index.hbs index 7857028f..45797d46 100644 --- a/addon/templates/building/edit/entrance/edit/index.hbs +++ b/addon/templates/building/edit/entrance/edit/index.hbs @@ -1,8 +1,6 @@
{{#if this.fetchBuildingEntrance.isRunning}} -
- -
+ {{else}} {{/unless}} - {{!-- API rejects any modification of the buildingEntranceNo or isOfficial - fields on building entrances that are not linked to a street. --}} + {{! API rejects any modification of the buildingEntranceNo or isOfficial + fields on building entrances that are not linked to a street. }}
- + {{/if}} -
\ No newline at end of file +
diff --git a/addon/templates/building/edit/entrances.hbs b/addon/templates/building/edit/entrances.hbs index 5d667ec6..2cb4dac5 100644 --- a/addon/templates/building/edit/entrances.hbs +++ b/addon/templates/building/edit/entrances.hbs @@ -1,20 +1,18 @@
{{#if this.fetchEntrances.isRunning}} -
- -
+ {{else}} diff --git a/addon/templates/building/edit/form.hbs b/addon/templates/building/edit/form.hbs index 124178e9..0e755051 100644 --- a/addon/templates/building/edit/form.hbs +++ b/addon/templates/building/edit/form.hbs @@ -12,9 +12,7 @@ {{/if}}
{{#if (or this.fetchBuildingWork.isRunning this.fetchBuilding.isRunning)}} -
- -
+ {{else}} {{#if this.fetchProject.isRunning}} -
- -
+ {{else}} @@ -65,8 +66,10 @@ @hint={{if (eq this.typeOfConstructionProject 6010) (t "ember-gwr.linkedBuildings.buildingDisabledForInfrastructure") - (if (eq this.typeOfConstructionProject 6011) - (t "ember-gwr.linkedBuildings.superstructureInfo")) + (if + (eq this.typeOfConstructionProject 6011) + (t "ember-gwr.linkedBuildings.superstructureInfo") + ) }} /> @@ -155,8 +158,8 @@ class="uk-flex uk-flex-wrap {{if this.import - "uk-child-width-1-1" - "uk-child-width-1-4@l uk-child-width-1-3@m uk-child-width-1-2@s" + 'uk-child-width-1-1' + 'uk-child-width-1-4@l uk-child-width-1-3@m uk-child-width-1-2@s' }}" > {{#let @@ -175,63 +178,96 @@
-
-
-
-
-
-
{{/let}}
- {{#if (or - (not this.project.isNew) - (show-model-field - "durationOfConstructionPhase" changeset this.import) + {{#if + (or + (not this.project.isNew) + (show-model-field "durationOfConstructionPhase" changeset this.import) ) }} {{#if (compute this.isClientMismatch changeset)}} -
+
{{t "ember-gwr.constructionProject.fields.typeOfClientAlert"}}
{{/if}} @@ -302,7 +338,7 @@
{{/if}} -
+
@@ -315,12 +351,20 @@
- {{#if (or - (eq changeset.client.address.country.countryNameShort "ch") - (and this.import this.import.data.client.address.swissZipCode) - )}} -
-
+ {{#if + (or + (eq changeset.client.address.country.countryNameShort "ch") + (and this.import this.import.data.client.address.swissZipCode) + ) + }} +
+
+ {{/if}} {{#if this.fetchBuildings.isRunning}} -
- -
+ {{else}} {{t - (concat - "ember-gwr.buildingWork.kindOfWorkOptions." model.kindOfWork - ) + (concat "ember-gwr.buildingWork.kindOfWorkOptions." model.kindOfWork) }}
- +
{{t "ember-gwr.components.linkedModels.buildingInfo"}}