mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
Delete action in Tab Contact and Status: primeVueAlert instead of BSModal
This commit is contained in:
@@ -205,8 +205,15 @@ export default{
|
||||
if(this.addressData.adresse_id)
|
||||
if(this.addressData.heimatadresse)
|
||||
this.$fhcAlert.alertError(this.$p.t('person', 'error_deleteHomeAdress'));
|
||||
else
|
||||
this.$refs.deleteAdressModal.show();
|
||||
else {
|
||||
this.$fhcAlert
|
||||
.confirmDelete()
|
||||
.then(result => result
|
||||
? adress_id
|
||||
: Promise.reject({handled: true}))
|
||||
.then(this.deleteAddress)
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
});
|
||||
},
|
||||
addNewAddress(addressData) {
|
||||
@@ -254,7 +261,6 @@ export default{
|
||||
}).catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(()=> {
|
||||
window.scrollTo(0, 0);
|
||||
this.hideModal('deleteAdressModal');
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
@@ -559,18 +565,6 @@ export default{
|
||||
<button v-else type="button" class="btn btn-primary" @click="updateAddress(addressData.adresse_id)">OK</button>
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
<!--Modal: deleteAdressModal-->
|
||||
<bs-modal ref="deleteAdressModal">
|
||||
<template #title>{{$p.t('person', 'adresse_delete')}}</template>
|
||||
<template #default>
|
||||
<p>{{$p.t('person', 'adresse_confirm_delete')}}</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{$p.t('ui', 'abbrechen')}}</button>
|
||||
<button type="button" class="btn btn-primary" @click="deleteAddress(addressData.adresse_id)">OK</button>
|
||||
</template>
|
||||
</bs-modal>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
|
||||
@@ -141,8 +141,13 @@ export default{
|
||||
},
|
||||
actionDeleteBankverbindung(bankverbindung_id){
|
||||
this.loadBankverbindung(bankverbindung_id).then(() => {
|
||||
if(this.bankverbindungData.bankverbindung_id)
|
||||
this.$refs.deleteBankverbindungModal.show();
|
||||
this.$fhcAlert
|
||||
.confirmDelete()
|
||||
.then(result => result
|
||||
? bankverbindung_id
|
||||
: Promise.reject({handled: true}))
|
||||
.then(this.deleteBankverbindung)
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
});
|
||||
},
|
||||
addNewBankverbindung(bankverbindungData) {
|
||||
@@ -188,7 +193,6 @@ export default{
|
||||
}).catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(()=> {
|
||||
window.scrollTo(0, 0);
|
||||
this.hideModal('deleteBankverbindungModal');
|
||||
this.resetModal();
|
||||
this.reload();
|
||||
});
|
||||
@@ -315,230 +319,7 @@ export default{
|
||||
</template>
|
||||
|
||||
</BsModal>
|
||||
|
||||
<!--Modal: Add Bankverbindung-->
|
||||
<!-- <BsModal title="Bankverbindung anlegen" ref="newBankverbindungModal">
|
||||
|
||||
<template #title>{{$p.t('person', 'bankvb_new')}}</template>
|
||||
<form-form class="row g-3" ref="bankverbindungData">
|
||||
<div class="row mb-3">
|
||||
<label for="name" class="form-label col-sm-4">Name</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="name"
|
||||
v-model="bankverbindungData.name"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="anschrift" class="form-label col-sm-4">{{$p.t('person', 'anschrift')}}</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="anschrift"
|
||||
v-model="bankverbindungData.anschrift"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="iban" class="form-label col-sm-4">IBAN<sup>*</sup></label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="iban"
|
||||
v-model="bankverbindungData.iban"
|
||||
required
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bic" class="form-label col-sm-4">BIC</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="bic"
|
||||
v-model="bankverbindungData.bic"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="kontonr" class="form-label col-sm-4">{{$p.t('person', 'kontonr')}}</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="kontonr"
|
||||
v-model="bankverbindungData.kontonr"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="blz" class="form-label col-sm-4">{{$p.t('person', 'blz')}}</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="blz"
|
||||
v-model="bankverbindungData.blz"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="typ" class="form-label col-sm-4">{{$p.t('global', 'typ')}}<sup>*</sup></label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
name="typ"
|
||||
v-model="bankverbindungData.typ"
|
||||
required
|
||||
>
|
||||
<option value="p">{{$p.t('person', 'privatkonto')}}</option>
|
||||
<option value="f">{{$p.t('person', 'firmenkonto')}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="verrechnung" class="form-label col-sm-4">{{$p.t('person', 'verrechnung')}}</label>
|
||||
<div class="col-sm-4">
|
||||
<form-input
|
||||
container-class="form-check"
|
||||
type="checkbox"
|
||||
name="verrechnung"
|
||||
v-model="bankverbindungData.verrechnung"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
</form-form>
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{$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>{{$p.t('person', 'bankvb_edit')}}</template>
|
||||
<form-form class="row g-3" ref="bankverbindungData">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="name" class="form-label col-sm-4">Name</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="name"
|
||||
v-model="bankverbindungData.name"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="anschrift" class="form-label col-sm-4">{{$p.t('person', 'anschrift')}}</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="anschrift"
|
||||
v-model="bankverbindungData.anschrift"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="iban" class="form-label col-sm-4">IBAN<sup>*</sup></label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="iban"
|
||||
v-model="bankverbindungData.iban"
|
||||
required
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="bic" class="form-label col-sm-4">BIC</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="bic"
|
||||
v-model="bankverbindungData.bic"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="kontonr" class="form-label col-sm-4">{{$p.t('person', 'kontonr')}}</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="kontonr"
|
||||
v-model="bankverbindungData.kontonr"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="blz" class="form-label col-sm-4">{{$p.t('person', 'blz')}}</label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="text"
|
||||
name="blz"
|
||||
v-model="bankverbindungData.blz"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="typ" class="form-label col-sm-4">{{$p.t('global', 'typ')}}<sup>*</sup></label>
|
||||
<div class="col-sm-6">
|
||||
<form-input
|
||||
type="select"
|
||||
name="typ"
|
||||
v-model="bankverbindungData.typ"
|
||||
required
|
||||
>
|
||||
<option value="p">{{$p.t('person', 'privatkonto')}}</option>
|
||||
<option value="f">{{$p.t('person', 'firmenkonto')}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="verrechnung" class="form-label col-sm-4">{{$p.t('person', 'verrechnung')}}</label>
|
||||
<div class="col-sm-4">
|
||||
<form-input
|
||||
container-class="form-check"
|
||||
type="checkbox"
|
||||
name="verrechnung"
|
||||
v-model="bankverbindungData.verrechnung"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
</form-form>
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{$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>{{$p.t('person', 'bankvb_delete')}}</template>
|
||||
<template #default>
|
||||
<p>{{$p.t('person', 'bankvb_confirm_delete')}}</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{$p.t('ui', 'abbrechen')}}</button>
|
||||
<button ref="Close" type="button" class="btn btn-primary" @click="deleteBankverbindung(bankverbindungData.bankverbindung_id)">OK</button>
|
||||
</template>
|
||||
</BsModal>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
|
||||
@@ -146,7 +146,14 @@ export default{
|
||||
},
|
||||
actionDeleteContact(contact_id){
|
||||
this.loadContact(contact_id);
|
||||
this.$refs.deleteContactModal.show();
|
||||
|
||||
this.$fhcAlert
|
||||
.confirmDelete()
|
||||
.then(result => result
|
||||
? contact_id
|
||||
: Promise.reject({handled: true}))
|
||||
.then(this.deleteContact)
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
addNewContact(formData) {
|
||||
this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewContact/' + this.uid,
|
||||
@@ -181,7 +188,6 @@ export default{
|
||||
.catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(()=> {
|
||||
window.scrollTo(0, 0);
|
||||
this.hideModal('deleteContactModal');
|
||||
this.resetModal();
|
||||
this.reload();
|
||||
});
|
||||
@@ -378,19 +384,7 @@ export default{
|
||||
<button v-else type="button" class="btn btn-primary" @click="updateContact(contactData.kontakt_id)">OK</button>
|
||||
</template>
|
||||
</BsModal>
|
||||
|
||||
<!--Modal: Delete Contact-->
|
||||
<BsModal ref="deleteContactModal">
|
||||
<template #title>{{$p.t('person', 'kontakt_delete')}}</template>
|
||||
<template #default>
|
||||
<p>{{$p.t('person', 'kontakt_confirm_delete')}}</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="resetModal">{{$p.t('ui', 'abbrechen')}}</button>
|
||||
<button ref="Close" type="button" class="btn btn-primary" @click="deleteContact(contactData.kontakt_id)">OK</button>
|
||||
</template>
|
||||
</BsModal>
|
||||
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
|
||||
@@ -327,8 +327,17 @@ export default{
|
||||
|
||||
this.loadStatus(this.statusId).then(() => {
|
||||
if(this.statusData)
|
||||
this.$refs.deleteStatusModal.show();
|
||||
{
|
||||
this.$fhcAlert
|
||||
.confirmDelete()
|
||||
.then(result => result
|
||||
? this.statusId
|
||||
: Promise.reject({handled: true}))
|
||||
.then(this.deleteStatus)
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
actionAdvanceStatus(status, stdsem, ausbildungssemester){
|
||||
this.statusId = {
|
||||
@@ -355,7 +364,6 @@ export default{
|
||||
});
|
||||
},
|
||||
actionConfirmDialogue(data, statusgrund, statusText){
|
||||
// this.hideModal('addMultiStatus');
|
||||
this.actionButton = statusgrund;
|
||||
this.actionStatusText = statusText;
|
||||
|
||||
@@ -426,8 +434,6 @@ export default{
|
||||
};
|
||||
|
||||
this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData, ausbildungssemester: this.actionSem}));
|
||||
|
||||
console.log("in changeStatusToWiederholer" + prestudentIds);
|
||||
this.addNewStatus(prestudentIds);
|
||||
},
|
||||
changeStatusToDiplomand(prestudentIds){
|
||||
@@ -440,9 +446,6 @@ export default{
|
||||
};
|
||||
|
||||
this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData}));
|
||||
|
||||
/* console.log("in changeStatusToDiplomand" + prestudentIds);
|
||||
this.hideModal('addMultiStatus');*/
|
||||
this.addNewStatus(prestudentIds);
|
||||
},
|
||||
changeStatusToAbsolvent(prestudentIds){
|
||||
@@ -455,9 +458,6 @@ export default{
|
||||
};
|
||||
|
||||
this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData}));
|
||||
|
||||
/* console.log("in changeStatusToAbsolvent" + prestudentIds);
|
||||
this.hideModal('addMultiStatus');*/
|
||||
this.addNewStatus(prestudentIds);
|
||||
},
|
||||
turnIntoStudent(prestudentIds){
|
||||
@@ -502,7 +502,6 @@ export default{
|
||||
else
|
||||
{
|
||||
console.log(prestudentId + ": isersterStudent: " + this.isErsterStudent + " Add New Status");
|
||||
|
||||
changeData = this.newArray.find(item => item.prestudent_id === prestudentId);
|
||||
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/status/addNewStatus/' + prestudentId,
|
||||
@@ -537,7 +536,6 @@ export default{
|
||||
/* if (this.modelValue.prestudent_id) {
|
||||
this.reload();
|
||||
//TODO(manu) reload Detailtab after Abbrecher to see current status activ, verband and gruppe
|
||||
//TODO(manu) reload Tab STatus after turned Into Student to see new status
|
||||
}*/
|
||||
if(this.isErsterStudent) {
|
||||
this.reload();
|
||||
@@ -652,7 +650,6 @@ export default{
|
||||
.then(
|
||||
result => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
|
||||
this.hideModal('deleteStatusModal');
|
||||
this.resetModal();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError)
|
||||
@@ -924,24 +921,7 @@ export default{
|
||||
</template>
|
||||
|
||||
</BsModal>
|
||||
|
||||
<!--Modal: Delete Status-->
|
||||
<BsModal ref="deleteStatusModal">
|
||||
<template #title>{{$p.t('lehre', 'status_edit')}}</template>
|
||||
<template #default>
|
||||
<div v-if="isLastStatus == 1">
|
||||
<p>{{$p.t('lehre', 'last_status_confirm_delete')}}</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p>{{$p.t('lehre', 'status_confirm_delete')}}</p>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<template #footer>
|
||||
<button ref="Close" type="button" class="btn btn-primary" @click="deleteStatus(statusId)">OK</button>
|
||||
</template>
|
||||
</BsModal>
|
||||
|
||||
|
||||
<!--Modal: Confirm Abbruch-->
|
||||
<BsModal ref="confirmStatusAction">
|
||||
<template #title>{{$p.t('lehre', 'status_edit')}}</template>
|
||||
|
||||
Reference in New Issue
Block a user