From 533bb0104e0d1d42cff4a440c025d4eed2debbb6 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 3 Oct 2022 23:15:23 +0800 Subject: [PATCH] fix(nc-gui): remove dt enrichment and fix comment --- packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts b/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts index bfe06220d9..a32c8d5a95 100644 --- a/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts +++ b/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts @@ -123,7 +123,7 @@ export default class ExcelTemplateAdapter extends TemplateGenerator { } columnNamePrefixRef[cn] = 0 - let column: Record = { + const column: Record = { column_name: cn, ref_column_name: cn, } @@ -138,9 +138,6 @@ export default class ExcelTemplateAdapter extends TemplateGenerator { const { sqlUi } = useProject() - // enrich data type for Template Editor to process - column = { ...column, ...sqlUi?.value?.getDataTypeForUiType({ uidt: column.uidt }) } - // todo: optimize if (column.uidt === UITypes.SingleLineText) { // check for long text @@ -189,7 +186,7 @@ export default class ExcelTemplateAdapter extends TemplateGenerator { column.uidt = UITypes.SingleSelect } // set dtxp here so that users can have the options even they switch the type from other types to SingleSelect - // once it's set, dtxp needs to be reset if the final column type is not MultiSelect + // once it's set, dtxp needs to be reset if the final column type is not SingleSelect column.dtxp = `'${uniqueVals.join("','")}'` } }