mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-30 17:54:04 +00:00
69 lines
1.9 KiB
Vue
69 lines
1.9 KiB
Vue
<template>
|
|
<div>
|
|
<b-modal :id="'contract-template-obligation-dependency-delete-modal'" size="lg" scrollable @shown="getExistDataList" @hidden="resetData">
|
|
<template v-slot:modal-title>
|
|
<h4 class="modal-title">Contract Template Obligation Dependency Delete</h4>
|
|
</template>
|
|
<p class="text-center">Are you sure want to delete?</p>
|
|
<template v-slot:modal-footer>
|
|
<form @submit.prevent="onSubmit">
|
|
<v-btn
|
|
:loading="loading"
|
|
:disabled="loading"
|
|
type="submit"
|
|
color="primary"
|
|
class="white--text"
|
|
@click="loader = 'loading'"
|
|
>
|
|
Submit
|
|
</v-btn>
|
|
</form>
|
|
</template>
|
|
</b-modal>
|
|
</div>
|
|
</template>
|
|
<script type="text/javascript">
|
|
|
|
export default {
|
|
props: {
|
|
this_contract_template_obligation_dependency: Object,
|
|
},
|
|
data() {
|
|
let vm = this;
|
|
return {
|
|
form: new Form({}),
|
|
loader: null,
|
|
loading: false
|
|
}
|
|
},
|
|
methods: {
|
|
getExistDataList() {
|
|
let vm = this;
|
|
},
|
|
resetData() {
|
|
let vm = this;
|
|
vm.loader = null;
|
|
vm.loading = false;
|
|
},
|
|
onSubmit() {
|
|
let vm = this;
|
|
const l = vm.loader
|
|
vm[l] = !vm[l];
|
|
let method = 'delete';
|
|
let url = 'contract-template-obligation-dependency/delete/' + vm.this_contract_template_obligation_dependency.hash_id;
|
|
General.onComplete(url, vm.form, method, true)
|
|
.then(data => {
|
|
vm[l] = false
|
|
vm.loader = null;
|
|
vm.$bvModal.hide('contract-template-obligation-dependency-delete-modal');
|
|
vm.$emit('refresh');
|
|
General.toastedMessage('delete', 'Contract Template Obligation Dependency', data.data.hash_id);
|
|
})
|
|
.catch(function (error) {
|
|
vm[l] = false
|
|
vm.loader = null;
|
|
});
|
|
},
|
|
}
|
|
}
|
|
</script> |