add cancel bill group function

This commit is contained in:
Jia Sheng
2024-06-18 23:25:55 +08:00
parent 4e33069574
commit 3f6dde7462
5 changed files with 104 additions and 1 deletions
@@ -50,6 +50,22 @@
</general-confirmation-form-component>
</modal-component>
</div>
<div class="col-auto position-static no-padding requestModal" data-type="cancelBillGroup" v-if="section === 'paidBillGroupList'">
<div class="btn btn-xs btn-outline-danger">
Cancel
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" type="cancelBillGroup">
<general-confirmation-form-component
contentText="Are you sure you want to cancel this Bill Group?"
modalType="delete"
class="text-center"
:apiRoute="route('api.transaction.group.bill.cancel', item.id)"
apiMethod="put"
:section="section"
>
</general-confirmation-form-component>
</modal-component>
</div>
<div class="col-auto no-padding">
<div class="btn btn-sm btn-default b-rad-none no-border" @click="expanded = !expanded">
<i class="fa fa-fw" :class="[{'fa-angle-up': expanded}, {'fa-angle-down': !expanded}]"></i>
@@ -61,7 +61,7 @@
successHandler(){
this.closeModal();
this.formHandler();
if (this.section && (this.section === 'paymentInProgressBillGroupList' || this.section === 'paymentVerificationBillGroupList')) {
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')});