From b2357f5d0034d2f848102801b30406f96476bb62 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Tue, 24 Dec 2024 10:56:11 +0700 Subject: [PATCH] refactor: add define props hide kebeb view and edit --- src/components/05_quotation/QuotationCard.vue | 4 ++++ src/components/shared/KebabAction.vue | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/05_quotation/QuotationCard.vue b/src/components/05_quotation/QuotationCard.vue index 7c875fd1..387110d7 100644 --- a/src/components/05_quotation/QuotationCard.vue +++ b/src/components/05_quotation/QuotationCard.vue @@ -20,6 +20,8 @@ defineProps<{ urgent?: boolean; hidePreview?: boolean; badgeColor?: string; + hideKebabView?: boolean; + hideKebabEdit?: boolean; customData?: { label: string; @@ -89,6 +91,8 @@ const rand = Math.random(); :idName="code" status="ACTIVE" hide-toggle + :hide-view="hideKebabView" + :hide-edit="hideKebabEdit" @view="$emit('view')" @edit="$emit('edit')" @link="$emit('link')" diff --git a/src/components/shared/KebabAction.vue b/src/components/shared/KebabAction.vue index 633ed998..9360b56e 100644 --- a/src/components/shared/KebabAction.vue +++ b/src/components/shared/KebabAction.vue @@ -9,10 +9,10 @@ const props = withDefaults( idName: string; status: string; hideToggle?: boolean; + hideEdit?: boolean; + hideView?: boolean; useLink?: boolean; useUpload?: boolean; - hideEdit?: boolean; - disableDelete?: boolean; }>(), { @@ -54,6 +54,7 @@ watch( - {{ $t('general.delete') }} + + {{ $t('general.delete') }} +