refactor: view image dialog

This commit is contained in:
puriphatt 2024-12-24 13:24:15 +07:00
parent bfe5da2565
commit 718a28642d
3 changed files with 126 additions and 1 deletions

View file

@ -6,7 +6,11 @@ import { storeToRefs } from 'pinia';
import WorkerItem from './WorkerItem.vue';
import DeleteButton from '../button/DeleteButton.vue';
import { precisionRound } from 'src/utils/arithmetic';
import { ProductServiceList, QuotationPayload } from 'stores/quotations/types';
import {
ProductRelation,
ProductServiceList,
QuotationPayload,
} from 'stores/quotations/types';
import { formatNumberDecimal, commaInput } from 'stores/utils';
import { useConfigStore } from 'stores/config';
@ -29,6 +33,7 @@ const props = defineProps<{
}>();
defineEmits<{
(e: 'viewFile', data: ProductRelation): void;
(e: 'delete', index: number): void;
(
e: 'updateTable',
@ -449,6 +454,7 @@ watch(
background-color: hsla(var(--positive-bg) / 0.1);
color: hsl(var(--positive-bg));
"
@click="$emit('viewFile', props.row.product)"
/>
<DeleteButton
v-if="!readonly"