mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
75 lines
3.1 KiB
Vue
75 lines
3.1 KiB
Vue
<template>
|
|
<div class="row">
|
|
<div class="col">
|
|
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
|
|
<div class="row justify-content-center" v-show="!isLoading">
|
|
<div class="col">
|
|
<div class="row m-b-20">
|
|
<div class="col">
|
|
<h3 class="all-caps">Are you Sure?</h3>
|
|
<div class="fs-11">{{ contentText }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col p-r-5">
|
|
<div class="btn btn-sm btn-default btn-block bg-master-lighter" data-dismiss="modal">Cancel</div>
|
|
</div>
|
|
<div class="col p-l-5">
|
|
<div class="btn btn-sm btn-block b-rad-none" :class="[{'btn-danger': modalType !== 'confirm'}, {'btn-success': modalType === 'confirm'}]" @click="submitForm()">{{ buttonText }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import componentHandler from '../../../general/mixins/componentHandler';
|
|
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
|
|
export default {
|
|
props: {
|
|
contentText: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
params: {
|
|
type: Object,
|
|
required: false
|
|
},
|
|
modalType: {
|
|
type: String,
|
|
default: 'confirm'
|
|
},
|
|
buttonText: {
|
|
type: String,
|
|
default: 'Confirm'
|
|
},
|
|
apiRoute: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
apiMethod: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
},
|
|
methods: {
|
|
submitForm() {
|
|
if (this.params) this.parameters = this.params;
|
|
return this.submit(this.apiRoute, this.apiMethod, this.section, true, true);
|
|
},
|
|
successHandler(){
|
|
this.closeModal();
|
|
this.formHandler();
|
|
if (this.section && (this.section === 'paymentInProgressBillGroupList' || this.section === 'paymentVerificationBillGroupList' || this.section === 'paidBillGroupList')) {
|
|
this.$store.dispatch('toggleSection', {name: 'paymentInProgressBillGroupList', status: !this.$store.getters.isShowing('paymentInProgressBillGroupList')});
|
|
this.$store.dispatch('toggleSection', {name: 'paymentVerificationBillGroupList', status: !this.$store.getters.isShowing('paymentVerificationBillGroupList')});
|
|
this.$store.dispatch('toggleSection', {name: 'paidBillGroupList', status: !this.$store.getters.isShowing('paidBillGroupList')});
|
|
}
|
|
},
|
|
},
|
|
mixins: [componentHandler, ModalFormHandler]
|
|
|
|
}
|
|
</script>
|