2
0
mirror of https://github.com/frappe/books.git synced 2025-01-23 15:18:24 +00:00

fix: resolve warnings and refactor POS

This commit is contained in:
AbleKSaju 2024-11-04 16:42:58 +05:30
parent 87c3884299
commit fe75b3addf
3 changed files with 21 additions and 6 deletions

View File

@ -85,6 +85,7 @@ export default defineComponent({
isExapanded: false,
};
},
emits: ['toggleModal'],
computed: {
ratio() {
return [0.1, 0.8, 0.4, 0.8, 0.8, 0.3];
@ -138,7 +139,7 @@ export default defineComponent({
},
methods: {
handleToggleModal(modal: string) {
this.$emit('toggle-modal', modal);
this.$emit('toggleModal', modal);
},
async runSinvFormulas() {
await this.sinvDoc.runFormulas();

View File

@ -107,7 +107,15 @@
/>
<div class="flex fixed bottom-0 p-1 mb-7 gap-x-3">
<POSQuickActions />
<POSQuickActions
:sinv-doc="sinvDoc"
:loyalty-points="loyaltyPoints"
:loyalty-program="loyaltyProgram"
:applied-coupons-count="appliedCouponsCount"
@toggle-view="toggleView"
@toggle-modal="toggleModal"
@emit-route-to-sinv-list="emitRouteToSinvList"
/>
</div>
</div>
</div>
@ -395,6 +403,9 @@ export default defineComponent({
setTransferRefNo(ref: string) {
this.transferRefNo = ref;
},
emitRouteToSinvList() {
this.$emit('routeToSinvList');
},
toggleView() {
this.tableView = !this.tableView;
},

View File

@ -257,10 +257,10 @@
<div class="flex fixed bottom-0 p-1 ml-3 mb-7 gap-x-3">
<POSQuickActions
:sinv-doc="sinvDoc"
:loyalty-points="loyaltyPoints"
:loyalty-program="loyaltyProgram"
:applied-coupons-count="appliedCouponsCount"
:sinv-doc="sinvDoc"
@toggle-view="toggleView"
@toggle-modal="toggleModal"
@emit-route-to-sinv-list="emitRouteToSinvList"
@ -337,7 +337,6 @@ export default defineComponent({
disablePayButton: Boolean,
openPaymentModal: Boolean,
openKeyboardModal: Boolean,
coupons: AppliedCouponCodes,
openCouponCodeModal: Boolean,
openShiftCloseModal: Boolean,
openSavedInvoiceModal: Boolean,
@ -355,10 +354,14 @@ export default defineComponent({
type: Number,
default: 0,
},
sinvDoc: {
type: SalesInvoice || undefined,
coupons: {
type: Object as PropType<AppliedCouponCodes>,
default: () => ({}),
},
sinvDoc: {
type: Object as PropType<SalesInvoice | undefined>,
default: undefined,
},
itemQuantityMap: {
type: Object as PropType<ItemQtyMap>,
default: () => ({}),