diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php index b8b6fa685..7ed1454ed 100755 --- a/application/controllers/Cis/Profil.php +++ b/application/controllers/Cis/Profil.php @@ -246,7 +246,7 @@ class Profil extends Auth_Controller if ($nation == "A") { if (isset($zip) && $zip > 999 && $zip < 32000) { - $gemeinde_res = $this->GemeindeModel->loadWhere(['ortschaftskennziffer' => $zip]); + $gemeinde_res = $this->GemeindeModel->loadWhere(['plz' => $zip]); if (isError($gemeinde_res)) { show_error("error while trying to query bis.tbl_gemeinde"); } diff --git a/public/js/apps/Cis/Profil.js b/public/js/apps/Cis/Profil.js index c8219eb94..d0ffacbb8 100755 --- a/public/js/apps/Cis/Profil.js +++ b/public/js/apps/Cis/Profil.js @@ -148,11 +148,36 @@ const profilApp = Vue.createApp({ return null; } + return this.data.kontakte.filter(kontakt => { return kontakt.zustellung; }).map(kon =>{ return kon.kontakt_id; }); + + //TODO counting the zustellKontakte/Adresse does not work correctly + /* let kontakteArray = []; + + if(this.data.profilUpdates.length){ + kontakteArray = kontakteArray.concat(this.data.profilUpdates.filter((update)=> + { + + return update.requested_change.zustellung; + }).map((kontant)=>{ + return kontant.requested_change.kontakt_id + })) + + } + + if(!this.data.profilUpdates.length || !this.data.kontakte.every(kontakt=> this.data.profilUpdates.some(update=>update.requested_change.kontakt_id == kontakt.kontakt_id))){ + kontakteArray = kontakteArray.concat(this.data.kontakte.filter(kontakt => { + return kontakt.zustellung; + }).map(kon =>{ + return kon.kontakt_id; + })); + } + + return [...(new Set(kontakteArray))]; */ }, }, computed:{ @@ -234,13 +259,13 @@ const profilApp = Vue.createApp({ data:kontakt }}) }, - Password_Change : { - title:"Passwort Ändern", - view:"ChangePassword", - data:{ - test:"testvalue", - } - }, + // Password_Change : { + // title:"Passwort Ändern", + // view:"ChangePassword", + // data:{ + // test:"testvalue", + // } + // }, }, }; diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index aa4467ce8..5b851b654 100755 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -174,7 +174,6 @@ export default { fetchProfilUpdates: function(){ Vue.$fhcapi.ProfilUpdate.selectProfilRequest().then((res)=>{ - if(!res.error){ this.data.profilUpdates = res.data?.length ? res.data.sort(this.sortProfilUpdates) : null ; } @@ -240,6 +239,7 @@ export default { template: /*html*/`
|
-
+
|
diff --git a/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js b/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js
index 8ddc12fe2..840f23c4b 100755
--- a/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js
+++ b/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js
@@ -54,6 +54,8 @@ export default {
}
this.$emit('profilUpdate',this.isChanged?this.data:null);
+ // update the zustellAdressen count
+ this.zustellAdressenCount = this.getZustelladressenCount();
},
},
@@ -95,7 +97,6 @@ export default {
template:/*html*/`