fix(nc-gui): remove dt enrichment and fix comment

This commit is contained in:
Wing-Kam Wong
2022-10-03 23:15:23 +08:00
parent fe5e8d70b2
commit 533bb0104e

View File

@@ -123,7 +123,7 @@ export default class ExcelTemplateAdapter extends TemplateGenerator {
}
columnNamePrefixRef[cn] = 0
let column: Record<string, any> = {
const column: Record<string, any> = {
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("','")}'`
}
}