From 31f3bddb34fca91aaedf44ea97bcdb53dcfe14a2 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 1 Aug 2022 15:01:37 +0530 Subject: [PATCH 1/5] refactor/gui-v2-added-phonenumber-cell --- .../nc-gui-v2/components/cell/PhoneNumber.vue | 31 +++++++++++++++++++ .../nc-gui-v2/components/smartsheet/Cell.vue | 2 ++ packages/nc-gui-v2/composables/useColumn.ts | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 packages/nc-gui-v2/components/cell/PhoneNumber.vue diff --git a/packages/nc-gui-v2/components/cell/PhoneNumber.vue b/packages/nc-gui-v2/components/cell/PhoneNumber.vue new file mode 100644 index 0000000000..38e2dc3d1b --- /dev/null +++ b/packages/nc-gui-v2/components/cell/PhoneNumber.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/packages/nc-gui-v2/components/smartsheet/Cell.vue b/packages/nc-gui-v2/components/smartsheet/Cell.vue index 119501e22d..4469bea05c 100644 --- a/packages/nc-gui-v2/components/smartsheet/Cell.vue +++ b/packages/nc-gui-v2/components/smartsheet/Cell.vue @@ -46,6 +46,7 @@ const { isSingleSelect, isMultiSelect, isPercent, + isPhoneNumber, } = useColumn(column) @@ -183,6 +184,7 @@ todo : + diff --git a/packages/nc-gui-v2/composables/useColumn.ts b/packages/nc-gui-v2/composables/useColumn.ts index f71afb6015..cb125fd365 100644 --- a/packages/nc-gui-v2/composables/useColumn.ts +++ b/packages/nc-gui-v2/composables/useColumn.ts @@ -30,6 +30,7 @@ export function useColumn(column: ColumnType) { const isAttachment = uiDatatype === 'Attachment' const isRating = uiDatatype === UITypes.Rating const isCurrency = uiDatatype === 'Currency' + const isPhoneNumber = uiDatatype === 'PhoneNumber' const isDuration = uiDatatype === UITypes.Duration const isPercent = uiDatatype === UITypes.Percent const isAutoSaved = [ @@ -74,5 +75,6 @@ export function useColumn(column: ColumnType) { isSingleSelect, isMultiSelect, isPercent, + isPhoneNumber, } } From b1fecd85b5b85fc5360291b1613741cac6e2d6df Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 1 Aug 2022 19:22:26 +0530 Subject: [PATCH 2/5] chore/gui-v2-phonenumber-cleanup --- packages/nc-gui-v2/components/cell/PhoneNumber.vue | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/PhoneNumber.vue b/packages/nc-gui-v2/components/cell/PhoneNumber.vue index 38e2dc3d1b..3aa0a67a10 100644 --- a/packages/nc-gui-v2/components/cell/PhoneNumber.vue +++ b/packages/nc-gui-v2/components/cell/PhoneNumber.vue @@ -10,22 +10,14 @@ const { modelValue: value } = defineProps() const emit = defineEmits(['update:modelValue']) -const localState = computed({ +const VModal = computed({ get: () => value, set: (val) => emit('update:modelValue', val), }) - + From 759f35acfa77ff41d4acb9174636dfd8d1ba9699 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 1 Aug 2022 19:45:17 +0530 Subject: [PATCH 3/5] chore/gui-v2-phonenumber-added-icon-for-column-cell --- packages/nc-gui-v2/components/smartsheet-header/CellIcon.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nc-gui-v2/components/smartsheet-header/CellIcon.vue b/packages/nc-gui-v2/components/smartsheet-header/CellIcon.vue index 45551d4d47..cab337fbdc 100644 --- a/packages/nc-gui-v2/components/smartsheet-header/CellIcon.vue +++ b/packages/nc-gui-v2/components/smartsheet-header/CellIcon.vue @@ -1,6 +1,7 @@ From 86a85d1f3f95ac430efae542721fa31da92c8e70 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Tue, 2 Aug 2022 11:10:13 +0530 Subject: [PATCH 5/5] fix/gui-v2-phonenumber-model-type-changed --- packages/nc-gui-v2/components/cell/PhoneNumber.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/PhoneNumber.vue b/packages/nc-gui-v2/components/cell/PhoneNumber.vue index b47c56ffcf..d40fb3ae12 100644 --- a/packages/nc-gui-v2/components/cell/PhoneNumber.vue +++ b/packages/nc-gui-v2/components/cell/PhoneNumber.vue @@ -6,7 +6,7 @@ interface Props { } interface Emits { - (event: 'update:modelValue', model: number): void + (event: 'update:modelValue', model: string): void } const props = defineProps() @@ -14,7 +14,6 @@ const props = defineProps() const emits = defineEmits() const vModel = useVModel(props, 'modelValue', emits) -