The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add boolean with toggle in csv import (#6050)
Félix Malfait08c081d315b0
diff --git a/packages/twenty-front/src/modules/object-record/spreadsheet-import/useSpreadsheetRecordImport.ts b/packages/twenty-front/src/modules/object-record/spreadsheet-import/useSpreadsheetRecordImport.tsindex c58b0142fba..28516c7939e 100644--- a/packages/twenty-front/src/modules/object-record/spreadsheet-import/useSpreadsheetRecordImport.ts+++ b/packages/twenty-front/src/modules/object-record/spreadsheet-import/useSpreadsheetRecordImport.ts@@ -90,6 +90,16 @@ export const useSpreadsheetRecordImport = (objectNameSingular: string) => {field.label + ' (ID)',),});+ } else if (field.type === FieldMetadataType.Boolean) {+ templateFields.push({+ icon: getIcon(field.icon),+ label: field.label,+ key: field.name,+ fieldType: {+ type: 'checkbox',+ },+ validations: getSpreadSheetValidation(field.type, field.label),+ });} else {templateFields.push({icon: getIcon(field.icon),diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsxindex 982a1d432c6..ccf38c5be32 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/ValidationStep/ValidationStep.tsx@@ -147,6 +147,8 @@ export const ValidationStep = <T extends string>({importColumn.value === column.key) ||(importColumn.type === ColumnType.matchedSelectOptions &&importColumn.value === column.key) ||+ (importColumn.type === ColumnType.matchedCheckbox &&+ importColumn.value === column.key) ||column.key === 'select-row',).length > 0;