insert Phrasen to Modals and Tables in Tab Kontakt

This commit is contained in:
ma0068
2024-01-26 14:02:34 +01:00
parent 4653e070b1
commit c49a36e9ca
5 changed files with 805 additions and 77 deletions
@@ -23,17 +23,17 @@ export default {
template: `
<div class="stv-details-details h-100 pb-3">
<fieldset class="overflow-hidden">
<legend>Adressen</legend>
<legend>{{this.$p.t('person', 'adressen')}}</legend>
<address-list ref="adressList" :uid="modelValue.person_id"></address-list>
</fieldset>
<br>
<fieldset class="overflow-hidden">
<legend>Kontakt</legend>
<legend>{{this.$p.t('global', 'kontakt')}}</legend>
<contact-list ref="contactList" :uid="modelValue.person_id"></contact-list>
</fieldset>
<br>
<fieldset class="overflow-hidden">
<legend>Bankverbindungen</legend>
<legend>{{this.$p.t('person', 'bankverbindungen')}}</legend>
<bankaccount-list ref="bankaccountList" :uid="modelValue.person_id"></bankaccount-list>
</fieldset>
</div>`
@@ -41,9 +41,9 @@ export default{
}
},
{title:"Abweich.Empf", field:"co_name"},
{title:"Name", field:"name"},
{title:"Firma", field:"firmenname"},
{title:"Firma_id", field:"firma_id", visible:false},
{title:"Name", field:"name"},
{title:"Adresse_id", field:"adresse_id", visible:false},
{title:"Person_id", field:"person_id", visible:false},
{title:"Name", field:"name", visible:false},
@@ -263,15 +263,60 @@ export default{
console.error(err.response.data || err.message);
});
},
async mounted() {
await this.$p.loadCategory(['notiz','global','person']);
let cm = this.$refs.table.tabulator.columnManager;
cm.getColumnByField('bezeichnung').component.updateDefinition({
title: this.$p.t('global', 'typ')
});
cm.getColumnByField('strasse').component.updateDefinition({
title: this.$p.t('person', 'strasse')
});
cm.getColumnByField('plz').component.updateDefinition({
title: this.$p.t('person', 'plz')
});
cm.getColumnByField('ort').component.updateDefinition({
title: this.$p.t('person', 'ort')
});
cm.getColumnByField('gemeinde').component.updateDefinition({
title: this.$p.t('person', 'gemeinde')
});
cm.getColumnByField('nation').component.updateDefinition({
title: this.$p.t('person', 'nation')
});
cm.getColumnByField('heimatadresse').component.updateDefinition({
title: this.$p.t('person', 'heimatadresse')
});
cm.getColumnByField('co_name').component.updateDefinition({
title: this.$p.t('person', 'co_name')
});
cm.getColumnByField('name').component.updateDefinition({
title: this.$p.t('person', 'firma_zusatz')
});
cm.getColumnByField('firmenname').component.updateDefinition({
title: this.$p.t('person', 'firma')
});
cm.getColumnByField('updateamum').component.updateDefinition({
title: this.$p.t('notiz', 'letzte_aenderung')
});
cm.getColumnByField('rechnungsadresse').component.updateDefinition({
title: this.$p.t('person', 'rechnungsadresse')
});
cm.getColumnByField('anmerkung').component.updateDefinition({
title: this.$p.t('notiz', 'document')
});
},
template: `
<div class="stv-list h-100 pt-3">
<!--Modal: Add Address-->
<BsModal ref="newAdressModal">
<template #title>Adresse anlegen</template>
<template #title>{{this.$p.t('person', 'adresse_new')}}</template>
<form class="row g-3" ref="addressData">
<div class="row mb-3">
<label for="adressentyp" class="form-label col-sm-4">Typ</label>
<label for="adressentyp" class="form-label col-sm-4">{{this.$p.t('global', 'typ')}}</label>
<div class="col-sm-6">
<select id="adressentyp" class="form-select" v-model="addressData.typ">
<option v-for="typ in adressentypen" :key="typ.adressentyp_kurzbz" :value="typ.adressentyp_kurzbz" >{{typ.bezeichnung}}</option>
@@ -279,14 +324,14 @@ export default{
</div>
</div>
<div class="row mb-3">
<label for="strasse" class="form-label col-sm-4">Strasse</label>
<label for="strasse" class="form-label col-sm-4">{{this.$p.t('person', 'strasse')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="strasse" v-model="addressData['strasse']">
</div>
</div>
<div class="row mb-3">
<label for="nation" class="form-label col-sm-4">Nation</label>
<label for="nation" class="form-label col-sm-4">{{this.$p.t('person', 'nation')}}</label>
<div class="col-sm-6">
<select id="nation" class="form-select" v-model="addressData.nation">
<option v-for="nation in nations" :key="nation.nation_code" :value="nation.nation_code" :disabled="nation.sperre">{{nation.kurztext}}</option>
@@ -295,14 +340,14 @@ export default{
</div>
<div class="row mb-3">
<label for="plz" class="required form-label col-sm-4" >PLZ</label>
<label for="plz" class="required form-label col-sm-4" >{{this.$p.t('person', 'plz')}}</label>
<div class="col-sm-6">
<input type="text" class="form-control" required v-model="addressData['plz']" @input="loadPlaces" >
</div>
</div>
<div class="row mb-3">
<label :for="gemeinde" class="form-label col-sm-4">Gemeinde</label>
<label :for="gemeinde" class="form-label col-sm-4">{{this.$p.t('person', 'gemeinde')}}</label>
<div class="col-sm-6">
<select v-if="addressData['nation'] == 'A'" name="addressData[gemeinde]" class="form-select" v-model="addressData['gemeinde']">
<option v-if="!gemeinden.length" disabled>Bitte gültige PLZ wählen</option>
@@ -313,7 +358,7 @@ export default{
</div>
<div class="row mb-3">
<label :for="Ort" class="form-label col-sm-4">Ort</label>
<label :for="Ort" class="form-label col-sm-4">{{this.$p.t('person', 'ort')}}</label>
<div class="col-sm-6">
<select v-if="addressData['nation'] == 'A'" name="address[ort]" class="form-select" v-model="addressData['ort']">
<option v-if="!orte.length" disabled>Bitte gültige Gemeinde wählen</option>
@@ -324,7 +369,7 @@ export default{
</div>
<div class="row mb-3">
<label for="heimatadresse" class="form-label col-sm-4">Heimatadresse</label>
<label for="heimatadresse" class="form-label col-sm-4">{{this.$p.t('person', 'heimatadresse')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="heimatadresse" type="checkbox" class="form-check-input" value="1" v-model="addressData['heimatadresse']">
@@ -333,7 +378,7 @@ export default{
</div>
<div class="row mb-3">
<label for="zustelladresse" class="form-label col-sm-4">Zustelladresse</label>
<label for="zustelladresse" class="form-label col-sm-4">{{this.$p.t('person', 'zustelladresse')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="zustelladresse" type="checkbox" class="form-check-input" value="1" v-model="addressData['zustelladresse']">
@@ -342,14 +387,14 @@ export default{
</div>
<div class="row mb-3">
<label for="co_name" class="form-label col-sm-4">Abweich.Empfänger. (c/o)</label>
<label for="co_name" class="form-label col-sm-4">{{this.$p.t('person', 'co_name')}}</label>
<div class="col-sm-6">
<input type="text" id="co_name" class="form-control" v-model="addressData['co_name']">
</div>
</div>
<div class="row mb-3">
<label for="rechnungsadresse" class="form-label col-sm-4">Rechnungsadresse</label>
<label for="rechnungsadresse" class="form-label col-sm-4">{{this.$p.t('person', 'rechnungsadresse')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="rechnungsadresse" type="checkbox" class="form-check-input" v-model="addressData['rechnungsadresse']">
@@ -358,37 +403,37 @@ export default{
</div>
<div class="row mb-3">
<label for="firma_name" class="form-label col-sm-4">Firma</label>
<label for="firma_name" class="form-label col-sm-4">{{this.$p.t('person', 'firma')}}</label>
<div class="col-sm-3">
<PvAutoComplete v-model="addressData['firma']" optionLabel="name" :suggestions="filteredFirmen" @complete="search" minLength="3"/>
</div>
</div>
<div class="row mb-3">
<label for="name" class="form-label col-sm-4">Name</label>
<label for="name" class="form-label col-sm-4">{{this.$p.t('person', 'firma_zusatz')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="name" v-model="addressData['name']">
</div>
</div>
<div class="row mb-3">
<label for="anmerkung" class="form-label col-sm-4">Anmerkung</label>
<label for="anmerkung" class="form-label col-sm-4">{{this.$p.t('global', 'anmerkung')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="anmerkung" v-model="addressData['anmerkung']">
</div>
</div>
</form>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button type="button" class="btn btn-primary" @click="addNewAddress()">OK</button>
</template>
</BsModal>
<!--Modal: Edit Address-->
<BsModal ref="editAdressModal">
<template #title>Adresse bearbeiten</template>
<template #title>{{this.$p.t('person', 'adresse_edit')}}</template>
<form class="row g-3" ref="addressData">
<div class="row mb-3">
<label for="adressentyp" class="form-label col-sm-4">Typ</label>
<label for="adressentyp" class="form-label col-sm-4">{{this.$p.t('global', 'typ')}}</label>
<div class="col-sm-6">
<select id="adressentyp" class="form-control" v-model="addressData.typ">
<option v-for="typ in adressentypen" :key="typ.adressentyp_kurzbz" :value="typ.adressentyp_kurzbz" >{{typ.bezeichnung}}</option>
@@ -397,14 +442,14 @@ export default{
</div>
<div class="row mb-3">
<label for="strasse" class="form-label col-sm-4">Strasse</label>
<label for="strasse" class="form-label col-sm-4">{{this.$p.t('person', 'strasse')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="strasse" v-model="addressData.strasse">
</div>
</div>
<div class="row mb-3">
<label for="nation" class="form-label col-sm-4">Nation</label>
<label for="nation" class="form-label col-sm-4">{{this.$p.t('person', 'nation')}}</label>
<div class="col-sm-6">
<select id="nation" class="form-select" v-model="addressData.nation">
<option v-for="nation in nations" :key="nation.nation_code" :value="nation.nation_code" :disabled="nation.sperre">{{nation.kurztext}}</option>
@@ -413,39 +458,39 @@ export default{
</div>
<div class="row mb-3">
<label for="plz" class="required form-label col-sm-4" >PLZ</label>
<label for="plz" class="required form-label col-sm-4" >{{this.$p.t('person', 'plz')}}</label>
<div class="col-sm-6">
<input type="text" class="form-control" required v-model="addressData['plz']" @input="loadPlaces">
</div>
</div>
<div class="row mb-3">
<label :for="gemeinde" class="form-label col-sm-4">Gemeinde</label>
<label :for="gemeinde" class="form-label col-sm-4">{{this.$p.t('person', 'gemeinde')}}</label>
<div v-if="addressData['gemeinde']" class="col-sm-6">
<input type="text" class="form-control" v-model="addressData['gemeinde']">
</div>
<div v-else class="col-sm-6">
<select v-if="addressData['nation'] == 'A'" name="addressData[gemeinde]" class="form-select" v-model="addressData['gemeinde']">
<option v-if="!gemeinden.length" disabled>Bitte gültige PLZ wählen</option>
<option v-if="!gemeinden.length" disabled>{{this.$p.t('person', 'plz_waehlen')}}</option>
<option v-for="gemeinde in gemeinden" :key="gemeinde.name" :value="gemeinde.name">{{gemeinde.name}}</option>
</select>
</div>
</div>
<div class="row mb-3">
<label :for="Ort" class="form-label col-sm-4">Ort</label>
<label :for="Ort" class="form-label col-sm-4">{{this.$p.t('person', 'ort')}}</label>
<div v-if="addressData['ort']" class="col-sm-6">
<input type="text" name="ort" class="form-control" v-model="addressData['ort']">
</div>
<div v-else class="col-sm-6">
<select v-if="addressData['nation'] == 'A'" name="address[ort]" class="form-select" v-model="addressData['ort']">
<option v-if="!orte.length" disabled>Bitte gültige Gemeinde wählen</option>
<option v-if="!orte.length" disabled>{{this.$p.t('person', 'gemeinde_waehlen')}}</option>
<option v-for="ort in orte" :key="ort.ortschaftsname" :value="ort.ortschaftsname">{{ort.ortschaftsname}}</option>
</select>
</div>
</div>
<div class="row mb-3">
<label for="heimatadresse" class="form-label col-sm-4">Heimatadresse</label>
<label for="heimatadresse" class="form-label col-sm-4">{{this.$p.t('person', 'heimatadresse')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="heimatadresse" type="checkbox" class="form-check-input" value="1" v-model="addressData['heimatadresse']">
@@ -454,7 +499,7 @@ export default{
</div>
<div class="row mb-3">
<label for="zustelladresse" class="form-label col-sm-4">Zustelladresse</label>
<label for="zustelladresse" class="form-label col-sm-4">{{this.$p.t('person', 'zustelladresse')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="zustelladresse" type="checkbox" class="form-check-input" value="1" v-model="addressData['zustelladresse']">
@@ -463,14 +508,14 @@ export default{
</div>
<div class="row mb-3">
<label for="co_name" class="form-label col-sm-4">Abweich.Empfänger. (c/o)</label>
<label for="co_name" class="form-label col-sm-4">{{this.$p.t('person', 'co_name')}}</label>
<div class="col-sm-6">
<input type="text" id="co_name" class="form-control" v-model="addressData['co_name']">
</div>
</div>
<div class="row mb-3">
<label for="rechnungsadresse" class="form-label col-sm-4">Rechnungsadresse</label>
<label for="rechnungsadresse" class="form-label col-sm-4">{{this.$p.t('person', 'rechnungsadresse')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="rechnungsadresse" type="checkbox" class="form-check-input" v-model="addressData['rechnungsadresse']">
@@ -479,7 +524,7 @@ export default{
</div>
<div class="row mb-3">
<label for="firma_name" class="form-label col-sm-4">Firma</label>
<label for="firma_name" class="form-label col-sm-4">{{this.$p.t('person', 'firma')}}</label>
<div v-if="addressData.firmenname" class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="name" v-model="addressData.firmenname">
</div>
@@ -493,14 +538,14 @@ export default{
</div>
<div class="row mb-3">
<label for="name" class="form-label col-sm-4">Name</label>
<label for="name" class="form-label col-sm-4">{{this.$p.t('person', 'firma_zusatz')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="name" v-model="addressData['name']">
</div>
</div>
<div class="row mb-3">
<label for="anmerkung" class="form-label col-sm-4">Anmerkung</label>
<label for="anmerkung" class="form-label col-sm-4">{{this.$p.t('global', 'anmerkung')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="anmerkung" v-model="addressData['anmerkung']">
</div>
@@ -508,19 +553,19 @@ export default{
</form>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button ref="Close" type="button" class="btn btn-primary" @click="updateAddress(addressData.adresse_id)">OK</button>
</template>
</BsModal>
<!--Modal: deleteAdressModal-->
<BsModal ref="deleteAdressModal">
<template #title>Adresse löschen</template>
<template #title>{{this.$p.t('person', 'adresse_delete')}}</template>
<template #default>
<p>Adresse wirklich löschen?</p>
<p>{{this.$p.t('person', 'adresse_confirm_delete')}}</p>
</template>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button ref="Close" type="button" class="btn btn-primary" @click="deleteAddress(addressData.adresse_id)">OK</button>
</template>
</BsModal>
@@ -184,12 +184,33 @@ export default{
this.bankverbindungData = this.initData;
},
},
async mounted() {
await this.$p.loadCategory(['global','person']);
let cm = this.$refs.table.tabulator.columnManager;
cm.getColumnByField('anschrift').component.updateDefinition({
title: this.$p.t('person', 'anschrift')
});
cm.getColumnByField('kontonr').component.updateDefinition({
title: this.$p.t('person', 'kontonr')
});
cm.getColumnByField('blz').component.updateDefinition({
title: this.$p.t('person', 'blz')
});
cm.getColumnByField('typ').component.updateDefinition({
title: this.$p.t('global', 'typ')
});
cm.getColumnByField('verrechnung').component.updateDefinition({
title: this.$p.t('person', 'verrechnung')
});
},
template: `
<div class="stv-list h-100 pt-3">
<!--Modal: Add Bankverbindung-->
<BsModal title="Bankverbindung anlegen" ref="newBankverbindungModal">
<template #title>Bankverbindung anlegen</template>
<template #title>{{this.$p.t('person', 'bankvb_new')}}</template>
<form class="row g-3" ref="bankverbindungData">
<div class="row mb-3">
<label for="name" class="form-label col-sm-4">Name</label>
@@ -198,7 +219,7 @@ export default{
</div>
</div>
<div class="row mb-3">
<label for="anschrift" class="form-label col-sm-4">Anschrift</label>
<label for="anschrift" class="form-label col-sm-4">{{this.$p.t('person', 'anschrift')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="anschrift" v-model="bankverbindungData['anschrift']">
</div>
@@ -217,28 +238,28 @@ export default{
</div>
</div>
<div class="row mb-3">
<label for="kontonr" class="form-label col-sm-4">Kontonummer</label>
<label for="kontonr" class="form-label col-sm-4">{{this.$p.t('person', 'kontonr')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="kontonr" v-model="bankverbindungData['kontonr']">
</div>
</div>
<div class="row mb-3">
<label for="blz" class="form-label col-sm-4">BLZ</label>
<label for="blz" class="form-label col-sm-4">{{this.$p.t('person', 'blz')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="blz" v-model="bankverbindungData['blz']">
</div>
</div>
<div class="row mb-3">
<label for="typ" class="form-label col-sm-4">Typ</label>
<label for="typ" class="form-label col-sm-4">{{this.$p.t('global', 'typ')}}</label>
<div class="col-sm-6">
<select id="typ" class="form-select" required v-model="bankverbindungData['typ']">
<option value="p">Privatkonto</option>
<option value="f">Firmenkonto</option>
<option value="p">{{this.$p.t('person', 'privatkonto')}}</option>
<option value="f">{{this.$p.t('person', 'firmenkonto')}}</option>
</select>
</div>
</div>
<div class="row mb-3">
<label for="verrechnung" class="form-label col-sm-4">Verrechnung</label>
<label for="verrechnung" class="form-label col-sm-4">{{this.$p.t('person', 'verrechnung')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="verrechnung" type="checkbox" class="form-check-input" value="1" v-model="bankverbindungData['verrechnung']">
@@ -247,14 +268,14 @@ export default{
</div>
</form>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button type="button" class="btn btn-primary" @click="addNewBankverbindung()">OK</button>
</template>
</BsModal>
<!--Modal: Edit Bankverbindung-->
<BsModal ref="editBankverbindungModal">
<template #title>Bankverbindung bearbeiten</template>
<template #title>{{this.$p.t('person', 'bankvb_edit')}}</template>
<form class="row g-3" ref="bankverbindungData">
<div class="row mb-3">
@@ -264,7 +285,7 @@ export default{
</div>
</div>
<div class="row mb-3">
<label for="anschrift" class="form-label col-sm-4">Anschrift</label>
<label for="anschrift" class="form-label col-sm-4">{{this.$p.t('person', 'anschrift')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="anschrift" v-model="bankverbindungData['anschrift']">
</div>
@@ -282,28 +303,28 @@ export default{
</div>
</div>
<div class="row mb-3">
<label for="kontonr" class="form-label col-sm-4">Kontonummer</label>
<label for="kontonr" class="form-label col-sm-4">{{this.$p.t('person', 'kontonr')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="kontonr" v-model="bankverbindungData['kontonr']">
</div>
</div>
<div class="row mb-3">
<label for="blz" class="form-label col-sm-4">BLZ</label>
<label for="blz" class="form-label col-sm-4">{{this.$p.t('person', 'blz')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="blz" v-model="bankverbindungData['blz']">
</div>
</div>
<div class="row mb-3">
<label for="typ" class="form-label col-sm-4">Typ</label>
<label for="typ" class="form-label col-sm-4">{{this.$p.t('global', 'typ')}}</label>
<div class="col-sm-6">
<select id="typ" class="form-select" required v-model="bankverbindungData['typ']">
<option value="p">Privatkonto</option>
<option value="f">Firmenkonto</option>
<option value="p">{{this.$p.t('person', 'privatkonto')}}</option>
<option value="f">{{this.$p.t('person', 'firmenkonto')}}</option>
</select>
</div>
</div>
<div class="row mb-3">
<label for="verrechnung" class="form-label col-sm-4">Verrechnung</label>
<label for="verrechnung" class="form-label col-sm-4">{{this.$p.t('person', 'verrechnung')}}</label>
<div class="col-sm-3">
<div class="form-check">
<input id="verrechnung" type="checkbox" class="form-check-input" value="1" v-model="bankverbindungData['verrechnung']">
@@ -312,19 +333,19 @@ export default{
</div>
</form>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button ref="Close" type="button" class="btn btn-primary" @click="updateBankverbindung(bankverbindungData.bankverbindung_id)">OK</button>
</template>
</BsModal>
<!--Modal: Delete Bankverbindung-->
<BsModal ref="deleteBankverbindungModal">
<template #title>Bankverbindung löschen</template>
<template #title>{{this.$p.t('person', 'bankvb_delete')}}</template>
<template #default>
<p>Bankverbindung wirklich löschen?</p>
<p>{{this.$p.t('person', 'bankvb_confirm_delete')}}</p>
</template>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button ref="Close" type="button" class="btn btn-primary" @click="deleteBankverbindung(bankverbindungData.bankverbindung_id)">OK</button>
</template>
</BsModal>
@@ -187,16 +187,40 @@ export default{
console.error(err.response.data || err.message);
});
},
async mounted() {
await this.$p.loadCategory(['notiz','global','person']);
let cm = this.$refs.table.tabulator.columnManager;
cm.getColumnByField('kontakttyp').component.updateDefinition({
title: this.$p.t('global', 'typ')
});
cm.getColumnByField('kontakt').component.updateDefinition({
title: this.$p.t('global', 'kontakt')
});
cm.getColumnByField('zustellung').component.updateDefinition({
title: this.$p.t('person', 'zustellung')
});
cm.getColumnByField('anmerkung').component.updateDefinition({
title: this.$p.t('global', 'anmerkung')
});
cm.getColumnByField('kurz_bz').component.updateDefinition({
title: this.$p.t('person', 'firma')
});
cm.getColumnByField('updateamum').component.updateDefinition({
title: this.$p.t('notiz', 'letzte_aenderung')
});
},
template: `
<div class="stv-list h-100 pt-3">
<!--Modal: new Contact-->
<BsModal ref="newContactModal">
<template #title>Kontakt anlegen</template>
<template #title>{{this.$p.t('person', 'kontakt_new')}}</template>
<form class="row g-3" ref="contactData">
<div class="row mb-3">
<label for="kontakttyp" class="form-label col-sm-4">Typ</label>
<label for="kontakttyp" class="form-label col-sm-4">{{this.$p.t('global', 'typ')}}</label>
<div class="col-sm-6">
<select id="kontakttyp" class="form-control" v-model="contactData.kontakttyp">
<option value="">keine Auswahl</option>
@@ -205,20 +229,20 @@ export default{
</div>
</div>
<div class="row mb-3">
<label for="kontakt" class="form-label col-sm-4">Kontakt</label>
<label for="kontakt" class="form-label col-sm-4">{{this.$p.t('global', 'kontakt')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="kontakt" v-model="contactData['kontakt']">
</div>
</div>
<div class="row mb-3">
<label for="anmerkung" class="form-label col-sm-4">Anmerkung</label>
<label for="anmerkung" class="form-label col-sm-4">{{this.$p.t('global', 'anmerkung')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="anmerkung" v-model="contactData['anmerkung']">
</div>
</div>
<div class="row mb-3">
<label for="zustellung" class="form-label col-sm-4">Zustellung</label>
<label for="zustellung" class="form-label col-sm-4">{{this.$p.t('person', 'zustellung')}}</label>
<div class="col-sm-6">
<div class="form-check">
<input id="zustellung" type="checkbox" class="form-check-input" value="1" v-model="contactData['zustellung']">
@@ -227,24 +251,24 @@ export default{
</div>
<div class="row mb-3">
<label for="firma_name" class="form-label col-sm-4">Firma / Standort</label>
<label for="firma_name" class="form-label col-sm-4">{{this.$p.t('person', 'firma')}} / {{this.$p.t('person', 'standort')}}</label>
<div class="col-sm-6">
<PvAutoComplete v-model="contactData['standort']" optionLabel="kurzbz" :suggestions="filteredStandorte" @complete="search" minLength="3"/>
</div>
</div>
</form>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button type="button" class="btn btn-primary" @click="addNewContact()">OK</button>
</template>
</BsModal>
<!--Modal: Edit Contact-->
<BsModal ref="editContactModal">
<template #title>Kontakt bearbeiten</template>
<template #title>{{this.$p.t('person', 'kontakt_edit')}}</template>
<form class="row g-3" ref="contactData">
<div class="row mb-3">
<label for="kontakttyp" class="form-label col-sm-4">Typ</label>
<label for="kontakttyp" class="form-label col-sm-4">{{this.$p.t('global', 'typ')}}</label>
<div class="col-sm-6">
<select id="kontakttyp" class="form-control" v-model="contactData.kontakttyp">
<option value="">-- keine Auswahl --</option>
@@ -253,19 +277,19 @@ export default{
</div>
</div>
<div class="row mb-3">
<label for="kontakt" class="form-label col-sm-4">Kontakt</label>
<label for="kontakt" class="form-label col-sm-4">{{this.$p.t('global', 'kontakt')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="kontakt" v-model="contactData['kontakt']">
</div>
</div>
<div class="row mb-3">
<label for="anmerkung" class="form-label col-sm-4">Anmerkung</label>
<label for="anmerkung" class="form-label col-sm-4">{{this.$p.t('global', 'anmerkung')}}</label>
<div class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="anmerkung" v-model="contactData['anmerkung']">
</div>
</div>
<div class="row mb-3">
<label for="zustellung" class="form-label col-sm-4">Zustellung</label>
<label for="zustellung" class="form-label col-sm-4">{{this.$p.t('person', 'zustellung')}}</label>
<div class="col-sm-6">
<div class="form-check">
<input id="zustellung" type="checkbox" class="form-check-input" value="1" v-model="contactData['zustellung']">
@@ -277,7 +301,7 @@ export default{
</div>
<div class="row mb-3">
<label for="standort" class="form-label col-sm-4">Firma / Standort</label>
<label for="standort" class="form-label col-sm-4">{{this.$p.t('person', 'firma')}} / {{this.$p.t('person', 'standort')}}</label>
<div v-if="contactData.kurzbz" class="col-sm-6">
<input type="text" :readonly="readonly" class="form-control" id="name" v-model="contactData.kurzbz">
</div>
@@ -287,19 +311,19 @@ export default{
</div>
</form>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button type="button" class="btn btn-primary" @click="updateContact(contactData.kontakt_id)">OK</button>
</template>
</BsModal>
<!--Modal: Delete Contact-->
<BsModal ref="deleteContactModal">
<template #title>Kontakt löschen</template>
<template #title>{{this.$p.t('person', 'kontakt_delete')}}</template>
<template #default>
<p>Kontakt wirklich löschen?</p>
<p>{{this.$p.t('person', 'kontakt_confirm_delete')}}</p>
</template>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">Abbrechen</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{this.$p.t('ui', 'abbrechen')}}</button>
<button ref="Close" type="button" class="btn btn-primary" @click="deleteContact(contactData.kontakt_id)">OK</button>
</template>
</BsModal>
+638
View File
@@ -2081,6 +2081,166 @@ $phrases = array(
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'adressen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Adressen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'addresses',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'bankverbindungen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bankverbindungen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'bank details',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'rechnungsadresse',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Rechnungsadresse',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'billing address',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'heimatadresse',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Heimatadresse',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'home address',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'co_name',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'abweichender Empfänger',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'c/o',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'gemeinde',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Gemeinde',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'municipality',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'gemeinde_waehlen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte gültige Gemeinde wählen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Please select a valid municipality',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'plz_waehlen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte gültige PLZ wählen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Please select a valid zip code',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
@@ -2121,6 +2281,26 @@ $phrases = array(
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'plz',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'plz',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'code',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
@@ -2141,6 +2321,26 @@ $phrases = array(
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'zustellung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Zustellung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'delivery',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
@@ -21915,6 +22115,444 @@ array(
)
)
),
array(
'app' => 'core',
'category' => 'notiz',
'phrase' => 'error_fieldRequired',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Das Eingabefeld {field} ist erforderlich',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'The Input Field {field} is required',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'notiz',
'phrase' => 'error_textFieldRequired',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Das Eingabefeld textField ist erforderlich',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'The Field textField is required',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'firma_zusatz',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Firmenzusatz',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'add.company info',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'firma',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Firma',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'company',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'standort',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Standort',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'location',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'adresse_new',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Adresse anlegen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'create address',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'adresse_edit',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Adresse bearbeiten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'edit address',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'adresse_delete',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Adresse löschen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'delete address',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'adresse_confirm_delete',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Adresse wirklich löschen?',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Really delete address?',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'kontakt_new',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Kontakt anlegen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'create contact data',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'kontakt_edit',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Kontakt bearbeiten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'edit contact data',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'kontakt_delete',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Kontakt löschen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'delete contact data',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'kontakt_confirm_delete',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Kontakt wirklich löschen?',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Really delete contact data?',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'kontonr',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Kontonummer',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Address',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'anschrift',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Anschrift',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Bank account number',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'verrechnung',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Verrechnung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Billing',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'blz',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'BLZ',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Bank code',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'privatkonto',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Privatkonto',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Private account',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'firmenkonto',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Firmenkonto',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Company Account',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'bankvb_new',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bankverbindung anlegen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'create bank details',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'bankvb_edit',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bankverbindung bearbeiten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'edit bank details',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'bankvb_delete',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bankverbindung löschen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'delete bank details',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'bankvb_confirm_delete',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bankverbindung wirklich löschen?',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Really delete bank details?',
'description' => '',
'insertvon' => 'system'
)
)
),
);