From a25876a322cb1e2ec0b59de23a68fd9c422280cf Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 23 Apr 2024 11:12:01 +0000 Subject: [PATCH] refactor: customer card --- src/components/UsersDetailCardComponent.vue | 197 ++++++++++++++++---- 1 file changed, 156 insertions(+), 41 deletions(-) diff --git a/src/components/UsersDetailCardComponent.vue b/src/components/UsersDetailCardComponent.vue index b1acd976..59080320 100644 --- a/src/components/UsersDetailCardComponent.vue +++ b/src/components/UsersDetailCardComponent.vue @@ -3,9 +3,21 @@ import AppBox from './app/AppBox.vue'; withDefaults( defineProps<{ + noDetail?: boolean; + noHover?: boolean; + noBg?: boolean; dark?: boolean; width?: string; color: 'purple' | 'green'; + gridColumns?: number; + metadata?: { id: string; disabled: boolean }; + list: { + id: string; + type: 'customerLegalEntity' | 'customerNaturalPerson'; + name: string; + code: string; + detail?: { label: string; value: string }[]; + }; }>(), { width: '300px', @@ -13,44 +25,64 @@ withDefaults( color: 'green', }, ); + +defineEmits<{ + (e: 'deleteCard', id: string): void; + (e: 'updateCard', action: 'FORM' | 'INFO', id: string): void; + (e: 'enterCard', action: 'FORM' | 'INFO', id: string): void; + (e: 'toggleStatus', id: string): void; +}>();