2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 10:58:59 +00:00

chore: code cleanup

This commit is contained in:
akshayitzme 2024-11-27 11:25:27 +05:30
parent 0241bb8d81
commit 4ac7142262
7 changed files with 28 additions and 48 deletions

View File

@ -18,9 +18,9 @@
<!-- Items Grid -->
<div
class="
gap-2
w-full
grid grid-cols-1
gap-2
w-full
grid grid-cols-1
sm:grid-cols-2
md:grid-cols-4
lg:grid-cols-6
@ -29,7 +29,7 @@
>
<div
class="
p-1
p-1
border border-gray-300
dark:border-gray-800
flex flex-col
@ -67,10 +67,10 @@
</div>
<p
class="
w-6
h-6
top-1
right-1
w-6
h-6
top-1
right-1
absolute
rounded-full
flex

View File

@ -7,12 +7,12 @@
<Row
:ratio="ratio"
class="
mt-2
px-2
w-full
flex
items-center
border
mt-2
px-2
w-full
flex
items-center
border
rounded-t-md
text-gray-600
dark:border-gray-800 dark:text-gray-400
@ -36,8 +36,8 @@
:ratio="ratio"
:border="true"
class="
px-2
w-full
px-2
w-full
border-b border-x
flex
items-center
@ -45,8 +45,7 @@
group
h-row-mid
hover:bg-gray-25
dark:border-gray-800
dark:bg-gray-890
dark:border-gray-800 dark:bg-gray-890
"
@click="handleChange(row)"
>
@ -68,13 +67,13 @@
<Row
:ratio="ratio"
class="
mt-2
px-2
w-full
flex
items-center
border
rounded-t-md
mt-2
px-2
w-full
flex
items-center
border
rounded-t-md
text-gray-600
dark:border-gray-800 dark:text-gray-400
"
@ -96,8 +95,8 @@
:ratio="ratio"
:border="true"
class="
px-2
w-full
px-2
w-full
border-b border-x
flex
items-center

View File

@ -270,7 +270,6 @@
<script lang="ts">
import { Money } from 'pesa';
import { fyo } from 'src/initFyo';
import { routeTo } from 'src/utils/ui';
import { getItem } from 'src/utils/pos';
import AlertModal from './AlertModal.vue';
import PaymentModal from './PaymentModal.vue';
@ -438,7 +437,6 @@ export default defineComponent({
this.toggleModal('CouponCode', true);
}
},
routeTo,
getItem,
},
});

View File

@ -344,7 +344,7 @@ export default defineComponent({
},
data() {
return {
selectedValue: '' as string,
selectedValue: '',
};
},
watch: {

View File

@ -279,7 +279,6 @@ import { Money } from 'pesa';
import { PropType } from 'vue';
import { fyo } from 'src/initFyo';
import { defineComponent } from 'vue';
import { routeTo } from 'src/utils/ui';
import { getItem } from 'src/utils/pos';
import AlertModal from './AlertModal.vue';
import PaymentModal from './PaymentModal.vue';
@ -457,7 +456,6 @@ export default defineComponent({
this.toggleModal('CouponCode', true);
}
},
routeTo,
getItem,
},
});

View File

@ -1,12 +1,6 @@
<template>
<div class="flex-col">
<PageHeader
:title="
fyo.singles.POSSettings?.posUI === 'Classic'
? t`Point of Sale`
: t`Point of Sale`
"
>
<PageHeader :title="t`Point of Sale`">
<slot>
<Button
class="bg-red-500 dark:bg-red-700"
@ -106,7 +100,6 @@ import { SalesInvoice } from 'models/baseModels/SalesInvoice/SalesInvoice';
import { SalesInvoiceItem } from 'models/baseModels/SalesInvoiceItem/SalesInvoiceItem';
import { AppliedCouponCodes } from 'models/baseModels/AppliedCouponCodes/AppliedCouponCodes';
import {
getItem,
validateSinv,
getItemQtyMap,
getItemDiscounts,
@ -235,7 +228,6 @@ export default defineComponent({
async setCustomer(value: string) {
if (!value) {
this.sinvDoc.party = '';
return;
}
@ -344,7 +336,6 @@ export default defineComponent({
},
async setLoyaltyPoints(value: number) {
this.appliedLoyaltyPoints = value;
this.sinvDoc.redeemLoyaltyPoints = true;
const totalLotaltyAmount = await getAddedLPWithGrandTotal(
@ -379,7 +370,6 @@ export default defineComponent({
},
async addItem(item: POSItem | Item | undefined) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
await this.sinvDoc.runFormulas();
if (!item) {
@ -656,7 +646,6 @@ export default defineComponent({
await this.saveOrder();
},
routeTo,
getItem,
},
});
</script>

View File

@ -253,8 +253,6 @@
<script lang="ts">
import { fyo } from 'src/initFyo';
import { routeTo } from 'src/utils/ui';
import { getItem } from 'src/utils/pos';
import { defineComponent, PropType } from 'vue';
import { ModalName } from 'src/components/POS/types';
import { Payment } from 'models/baseModels/Payment/Payment';
@ -317,8 +315,6 @@ export default defineComponent({
this.toggleModal('CouponCode', true);
}
},
routeTo,
getItem,
},
});
</script>