changes the zustellungs warning for the Profil Adressen/Kontakte

This commit is contained in:
SimonGschnell
2024-08-07 09:53:37 +02:00
parent f0db878623
commit 47a4b63172
4 changed files with 20 additions and 17 deletions
@@ -56,9 +56,6 @@ export default {
async submitProfilChange() {
//todo delete this debugging line
console.log("this is a test")
//? check if data is valid before making a request
if (this.topic && this.profilUpdate) {
//? if profil update contains any attachment
@@ -34,10 +34,6 @@ export default {
},
methods: {
test: function () {
console.log(this.gemeinden, "this are the gemeinden");
console.log(this.ortschaftnamen, "this are the ortschaftsnamen");
},
autocompleteSearchGemeinden: function (event) {
this.gemeinden = this.gemeinden.map((gemeinde) => gemeinde);
@@ -97,6 +93,11 @@ export default {
computed: {
showZustellAdressenWarning: function () {
// if the address was already a zustellungsadresse when editing the address, then the warning will not be shown and the zustellungsadresse will just be overwritten
if (JSON.parse(this.originalValue).zustelladresse){
return false;
}
// if zustellAdressenCount is not 0 and the own kontakt has the flag zustellung set to true
if (!this.zustellAdressenCount.includes(this.data.adresse_id)) {
return this.data.zustelladresse && this.zustellAdressenCount.length;
@@ -135,7 +136,7 @@ export default {
<div v-if="showZustellAdressenWarning" class="col-12 ">
<div class="card bg-danger mx-2">
<div class="card-body text-white ">
<span>{{$p.t('profilUpdate','zustelladresseWarning')}}</span>
<span>{{$p.t('profilUpdate','zustell_adressen_warning')}}</span>
</div>
</div>
</div>
@@ -27,6 +27,10 @@ export default {
computed: {
showZustellKontakteWarning: function () {
// if the kontakt is already a zustellungskontakt when the user is editing the kontakt, then no warning is shown and the zustellung will be overwritten
if (JSON.parse(this.originalValue).zustellung) {
return false;
}
// if zustellKontakteCount is not 0 and the own kontakt has the flag zustellung set to true
if (!this.zustellKontakteCount.includes(this.data.kontakt_id)) {
return this.data.zustellung && this.zustellKontakteCount.length;
@@ -50,14 +54,14 @@ export default {
template:
/*html*/
`
<div class="gy-3 row align-items-center justify-content-center">
<div class="gy-3 row align-items-center justify-content-center">
<!-- warning message for too many zustellungs Kontakte -->
<div v-if="showZustellKontakteWarning" class="col-12 ">
<div class="card bg-danger mx-2">
<div class="card-body text-white ">
<span>{{$p.t('profilUpdate','zustellkontakteWarning')}}</span>
<span>{{$p.t('profilUpdate','zustell_kontakte_warning')}}</span>
</div>
</div>
</div>
+7 -6
View File
@@ -25868,18 +25868,18 @@ array(
array(
'app' => 'core',
'category' => 'profilUpdate',
'phrase' => 'zustelladresseWarning',
'phrase' => 'zustell_adressen_warning',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => '!Achtung: Eine Ihrer Adressen ist bereits als Zustelladresse gespeichert, sind sie sicher, dass sie die aktuelle Adresse stattdessen als Zustelladresse speichern wollen?',
'text' => 'Einer ihrer Adressen wird bereits zur Zustellung verwendet, möchten sie diese Adressen als Zustellungsadresse übernehmen?',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => '!Attention: One of your addresses is already saved as a delivery address, are you sure you want to save the current address as a delivery address instead?',
'text' => 'One of your addresses is already used as a contact address, would you like to use this address as your new contact address?',
'description' => '',
'insertvon' => 'system'
)
@@ -25888,23 +25888,24 @@ array(
array(
'app' => 'core',
'category' => 'profilUpdate',
'phrase' => 'zustellkontakteWarning',
'phrase' => 'zustell_kontakte_warning',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => '!Achtung: Eine deiner Kontakte ist bereits als Zustellungskontakt gespeichert, sind sie sicher, dass sie den aktuellen Kontakt stattdessen als Zustellkontakt speichern wollen?',
'text' => 'Einer ihrer Kontakte wird bereits zur Zustellung verwendet, möchten sie diesen Kontakt als Zustellungskontakt übernehmen?',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => '!Attention: One of your contacts is already saved as a delivery contact, are you sure you want to save the current contact as a delivery contact instead?',
'text' => 'One of your contacts is already used as a communication mean, would you like to use this contact as your new communication mean?',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'profilUpdate',