From 896e1ba360e2ebc79e9b30970de9b7aa1e1990c8 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:09:44 +0700 Subject: [PATCH] feat: add disabled display field product service --- .../shared/table/TableProductAndService.vue | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/components/shared/table/TableProductAndService.vue b/src/components/shared/table/TableProductAndService.vue index e209eade..d5273a49 100644 --- a/src/components/shared/table/TableProductAndService.vue +++ b/src/components/shared/table/TableProductAndService.vue @@ -45,6 +45,8 @@ type ExclusiveProps = { type: 'service' | 'product'; grid?: boolean; disabledWorkerId?: string[]; + disabledProductFields?: (typeof columnsProduct)[number]['name'][]; + disabledServiceFields?: (typeof columnsService)[number]['name'][]; rows: Product[]; }; @@ -76,7 +78,7 @@ const columnsProduct = [ label: 'productService.product.priceInformation', field: (v: Product) => v, }, -] satisfies QTableColumn[]; +] as const satisfies QTableColumn[]; const columnsService = [ { @@ -110,7 +112,7 @@ const columnsService = [ label: 'general.createdAt', field: (v: Service) => dateFormatJS({ date: v.createdAt }), }, -] satisfies QTableColumn[]; +] as const satisfies QTableColumn[]; const props = defineProps(); @@ -165,7 +167,18 @@ function selectedIndex(item: any) { :props="props" > @@ -209,7 +222,17 @@ function selectedIndex(item: any) { class="text-center" >