Merge branch 'dillon/46.11-warehouse-storage-related-fixes' into 'master'

Fix multipe interface user experience (UX) problem originally reported by Yien

See merge request CIEFWorldwideSdnBhd/shipping-portal!216
This commit is contained in:
Dillon Ngo
2024-05-07 16:15:11 +00:00
3 changed files with 24 additions and 7 deletions
@@ -68,10 +68,10 @@
<i class="fa fa-repeat"></i>
</span>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="regenerateInvoice">
<general-confirmation-form-component
contentText="Are you sure you want to regenerate this Invoice?"
modalType="delete"
buttonText="Regenerate"
<general-confirmation-form-component
contentText="Are you sure you want to regenerate this Invoice?"
modalType="delete"
buttonText="Regenerate"
class="text-center"
:apiRoute="route('api.transaction.invoice.regenerate', item.id)"
apiMethod="post"
@@ -179,7 +179,7 @@
<div class="font-heading fs-12">MYR {{(Math.round((item.outstanding + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}</div>
</div>
</div>
<div class="row m-t-20" v-if="item.outstanding - item.floating > 0.009">
<div class="row m-t-20" v-if="item.outstanding - item.floating > 0.009 && !paymentPending">
<div class="col">
<div class="btn btn-sm all-caps b-rad-none btn-success btn-block requestModal" data-type="makePayment">Make Payment</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="makePayment">
@@ -238,6 +238,17 @@
latestComment() {
let questions = this.item.remarks;
return questions.slice().reverse()[0];
},
paymentPending(){
if (Array.isArray(this.item.transactions)) {
for (let i = 0; i < this.item.transactions.length; i++) {
const status = this.item.transactions[i].status;
if (status === 1) {
return true;
}
}
}
return false;
}
},
created(){
@@ -157,6 +157,7 @@
this.error = response.payload.data.message;
}
else{
this.closeModal();
this.updateList();
}
}
@@ -76,9 +76,14 @@
files: this.files
};
this.submit(this.route('api.transaction.payment.verification.create', this.data.id), 'post', this.section, true, true)
}
},
successHandler(response){
this.closeModal();
this.formHandler();
window.location.reload();
},
},
mixins: [ModalFromHandler]
}
</script>
</script>