From 8f2a6a56bebaca8c444bf7ba5fa06a81201ef9ea Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:18:06 +0000 Subject: [PATCH] fix(nc-gui): shared form oss ui changes --- .../index/[typeOrId]/form/[viewId]/index.vue | 72 +++++---- .../[typeOrId]/form/[viewId]/index/index.vue | 145 +++++++++++------- .../[typeOrId]/form/[viewId]/index/survey.vue | 127 ++++++++------- 3 files changed, 203 insertions(+), 141 deletions(-) diff --git a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue index eded02fb98..13a91b6536 100644 --- a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue +++ b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue @@ -1,27 +1,22 @@ - + + + - - {{ sharedFormView.heading }} - + + + {{ sharedFormView.heading }} + - - {{ sharedFormView.subheading }} - + + {{ sharedFormView.subheading }} + + - + - + @@ -103,7 +117,9 @@ const onDecode = async (scannedCodeValue: string) => { - {{ $t('activity.submitAnotherForm') }} + + {{ $t('activity.submitAnotherForm') }} @@ -124,7 +140,7 @@ const onDecode = async (scannedCodeValue: string) => { - + @@ -132,22 +148,16 @@ const onDecode = async (scannedCodeValue: string) => { - + - - - - + + + {{ field.label || field.title }} + + * + + + {{ field?.description }} @@ -182,34 +192,59 @@ const onDecode = async (scannedCodeValue: string) => { - - - {{ error.$message }} - - - {{ field.description }} + + + + {{ error.$message }} + + + + + {{ error.$message }} + + - - + + + {{ $t('activity.clearForm') }} + + + {{ $t('general.submit') }} + + + + + + - - - - + @@ -221,4 +256,10 @@ const onDecode = async (scannedCodeValue: string) => { @apply h-auto; @apply ml-1; } + +.nc-shared-form-button { + &.nc-button.ant-btn:focus { + box-shadow: 0px 0px 0px 2px #fff, 0px 0px 0px 4px #3069fe; + } +} diff --git a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue index b1647936d1..a4dc2def87 100644 --- a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue +++ b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue @@ -242,13 +242,13 @@ onMounted(() => { class="max-w-[max(33%,600px)] mx-auto flex flex-col justify-end" > - + {{ sharedFormView.heading }} {{ sharedFormView?.subheading }} @@ -264,24 +264,21 @@ onMounted(() => { class="color-transition h-full flex flex-col mt-6 gap-4 w-full max-w-[max(33%,600px)] m-auto" > - - - - + + + {{ field.label || field.title }} + + * + + + {{ field?.description }} - + { {{ error.$message }} - - {{ field.description }} - {{ $t('general.shift') }} + {{ $t('general.enter') }} @@ -323,19 +313,18 @@ onMounted(() => { - {{ $t('general.submit') }} - + @@ -357,18 +346,20 @@ onMounted(() => { ]" @click="goNext()" > - - {{ $t('general.ok') }} - - - - - - + + + Ok + + + + + + + @@ -381,19 +372,14 @@ onMounted(() => { - - - {{ sharedFormView?.success_msg }} - - - - - {{ $t('msg.info.thankYou') }} - - {{ $t('msg.info.submittedFormData') }} - - - + @@ -401,7 +387,7 @@ onMounted(() => { - + {{ $t('activity.submitAnotherForm') }} @@ -468,7 +454,9 @@ onMounted(() => { - + + + @@ -494,16 +482,37 @@ onMounted(() => { } .nc-input { - @apply appearance-none w-full rounded px-2 py-2 my-2 border-solid border-1 border-primary border-opacity-50; + @apply appearance-none w-full !bg-white !rounded-lg border-solid border-1 border-gray-200 focus-within:border-brand-500; + &.nc-cell-rating, + &.nc-cell-geodata { + @apply !py-1; + } + + :deep(input) { + @apply !px-1; + } + &.nc-cell-longtext { + @apply p-0 h-auto overflow-hidden; + } + &:not(.nc-cell-longtext) { + @apply px-2 py-2; + :deep(textarea) { + @apply !p-2; + } + } &.nc-cell-checkbox { > * { @apply justify-center flex items-center; } } + } + + .nc-form-data-cell.nc-data-cell { + @apply !border-none rounded-none; - input { - @apply !py-1 !px-1; + &:focus-within { + @apply !border-none; } } }
@@ -103,7 +117,9 @@ const onDecode = async (scannedCodeValue: string) => {
@@ -401,7 +387,7 @@ onMounted(() => {