From a8fb25e439dad19416533a84d3b9fadd464f5661 Mon Sep 17 00:00:00 2001 From: Daniel Spaude Date: Mon, 20 Feb 2023 22:16:16 -0500 Subject: [PATCH] code scanner for forms - WIP --- .../nc-gui/components/smartsheet/Form.vue | 34 ++++++++++++------- packages/nocodb-sdk/src/lib/Api.ts | 1 + .../nocodb/src/lib/models/FormViewColumn.ts | 3 ++ scripts/sdk/swagger.json | 4 +++ 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index c4eb8405cb..a52c267787 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -616,18 +616,28 @@ watch(view, (nextView) => { /> - - - FOO - - + +
+ + {{ $t('general.enableScanner') }} + + + +
diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index 93ae72c9ec..c62a3a1903 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -424,6 +424,7 @@ export interface FormColumnType { uuid?: any; label?: string; help?: any; + enable_scanner?: boolean; required?: boolean; show?: boolean; order?: number; diff --git a/packages/nocodb/src/lib/models/FormViewColumn.ts b/packages/nocodb/src/lib/models/FormViewColumn.ts index 8cd3fb3efe..50342e7cf5 100644 --- a/packages/nocodb/src/lib/models/FormViewColumn.ts +++ b/packages/nocodb/src/lib/models/FormViewColumn.ts @@ -12,6 +12,7 @@ export default class FormViewColumn implements FormColumnType { help?: string; description?: string; required?: boolean; + enable_scanner?: boolean; show?: boolean; order?: number; @@ -68,6 +69,7 @@ export default class FormViewColumn implements FormColumnType { help: column.help, description: column.description, required: column.required, + enable_scanner: column.enable_scanner, }; if (column.meta) { @@ -158,6 +160,7 @@ export default class FormViewColumn implements FormColumnType { 'show', 'order', 'meta', + 'enable_scanner', ]); // get existing cache diff --git a/scripts/sdk/swagger.json b/scripts/sdk/swagger.json index a2690a160c..cf916e4dc1 100644 --- a/scripts/sdk/swagger.json +++ b/scripts/sdk/swagger.json @@ -8831,6 +8831,7 @@ "help": null, "required": false, "show": 1, + "enable_scanner": 1, "order": 1, "created_at": "2022-02-15 12:39:04", "updated_at": "2022-02-15 12:39:16", @@ -8856,6 +8857,9 @@ "minLength": 1 }, "help": {}, + "enable_scanner": { + "type": "boolean" + }, "required": { "type": "boolean" },