diff --git a/package.json b/package.json index fe9fc7e2..29fe5570 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,8 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-vue": "^9.27.0", "prettier": "^3.3.3", - "typescript": "^5.5.4" + "typescript": "^5.5.4", + "vue-component-type-helpers": "^2.1.10" }, "engines": { "node": "^24 || ^22 || ^20 || ^18", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b0e6897..20a9899a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,6 +123,9 @@ importers: typescript: specifier: ^5.5.4 version: 5.5.4 + vue-component-type-helpers: + specifier: ^2.1.10 + version: 2.1.10 packages: @@ -3516,6 +3519,9 @@ packages: vm-browserify@1.1.2: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + vue-component-type-helpers@2.1.10: + resolution: {integrity: sha512-lfgdSLQKrUmADiSV6PbBvYgQ33KF3Ztv6gP85MfGaGaSGMTXORVaHT1EHfsqCgzRNBstPKYDmvAV9Do5CmJ07A==} + vue-demi@0.14.10: resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} engines: {node: '>=12'} @@ -7445,6 +7451,8 @@ snapshots: vm-browserify@1.1.2: {} + vue-component-type-helpers@2.1.10: {} + vue-demi@0.14.10(vue@3.4.38(typescript@5.5.4)): dependencies: vue: 3.4.38(typescript@5.5.4) diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index 8b4407da..71f59f38 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -2,6 +2,7 @@ import { ref, watch } from 'vue'; import { QTableProps, QTableSlots } from 'quasar'; import { storeToRefs } from 'pinia'; +import { baseUrl } from 'stores/utils'; import WorkerItem from './WorkerItem.vue'; import DeleteButton from '../button/DeleteButton.vue'; @@ -81,19 +82,19 @@ const columns = [ { name: 'code', align: 'left', - label: 'general.code', + label: 'productService.product.code', field: (v) => v.product.code, }, { name: 'name', align: 'center', - label: 'productService.service.list', + label: 'quotation.productList', field: (v) => v.product.name, }, { name: 'amount', align: 'center', - label: 'general.amount', + label: 'taskOrder.amountOfEmployee', field: 'amount', }, { @@ -115,15 +116,15 @@ const columns = [ field: 'priceBeforeVat', }, { - name: 'tax', + name: 'vat', align: 'center', label: 'general.vat', - field: 'tax', + field: 'vat', }, { name: 'sumPrice', align: 'right', - label: 'quotation.sumPrice', + label: 'quotation.totalPriceBaht', field: 'sumPrice', }, ] satisfies QTableProps['columns']; @@ -335,14 +336,22 @@ watch( " > - {{ props.row.product.code }} + {{ props.row.product.code }} - + + + {{ props.row.product.name }} @@ -366,7 +375,6 @@ watch( /> - {{ formatNumberDecimal( props.row.pricePerUnit + diff --git a/src/components/05_quotation/QuotationCard.vue b/src/components/05_quotation/QuotationCard.vue index 387110d7..604afb7d 100644 --- a/src/components/05_quotation/QuotationCard.vue +++ b/src/components/05_quotation/QuotationCard.vue @@ -22,6 +22,7 @@ defineProps<{ badgeColor?: string; hideKebabView?: boolean; hideKebabEdit?: boolean; + hideAction?: boolean; customData?: { label: string; @@ -88,6 +89,7 @@ const rand = Math.random(); @click.stop="$emit('view')" />