refactor: handle mode

This commit is contained in:
Thanaphon Frappet 2024-10-10 13:40:26 +07:00
parent 5f852b977b
commit e3210abbd7

View file

@ -14,6 +14,7 @@ import { QuotationPayload } from 'stores/quotations/types';
import { formatNumberDecimal } from 'stores/utils';
import { useConfigStore } from 'stores/config';
import { Product, Service, Work } from 'src/stores/product-service/types';
import { read } from 'fs';
defineProps<{
readonly?: boolean;
@ -319,9 +320,10 @@ watch(
</q-td>
<q-td align="center">
<q-input
:readonly="readonly"
dense
outlined
type="number"
:type="readonly ? 'text' : 'number'"
style="width: 70px"
min="0"
v-model="props.row.amount"
@ -338,11 +340,12 @@ watch(
</q-td>
<q-td align="center">
<q-input
:readonly="readonly"
dense
min="0"
outlined
input-class="text-right"
type="number"
:type="readonly ? 'text' : 'number'"
style="width: 90px"
v-model="props.row.discount"
/>