From 5cb136d22e566d1d080ac9dcec2a3bb6a4b7403b Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Wed, 1 Feb 2023 12:23:23 +0530 Subject: [PATCH] refactor: type DataImport - remove unused file --- src/components/ImportWizard.vue | 50 -------- src/dataImport.ts | 11 +- src/pages/DataImport.vue | 203 ++++++++++++++++++++------------ 3 files changed, 128 insertions(+), 136 deletions(-) delete mode 100644 src/components/ImportWizard.vue diff --git a/src/components/ImportWizard.vue b/src/components/ImportWizard.vue deleted file mode 100644 index b8405900..00000000 --- a/src/components/ImportWizard.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - diff --git a/src/dataImport.ts b/src/dataImport.ts index 91e4bc7c..e3971936 100644 --- a/src/dataImport.ts +++ b/src/dataImport.ts @@ -20,15 +20,6 @@ import { } from 'utils'; import { generateCSV, parseCSV } from '../utils/csvParser'; -export const importable = [ - ModelNameEnum.SalesInvoice, - ModelNameEnum.PurchaseInvoice, - ModelNameEnum.Payment, - ModelNameEnum.Party, - ModelNameEnum.Item, - ModelNameEnum.JournalEntry, -]; - type Status = { success: boolean; message: string; @@ -265,7 +256,7 @@ export class Importer { return true; } - initialize(labelIndex: number, force: boolean) { + initialize(labelIndex: number, force: boolean = false) { if ( (typeof labelIndex !== 'number' && !labelIndex) || (labelIndex === this.labelIndex && !force) diff --git a/src/pages/DataImport.vue b/src/pages/DataImport.vue index 2a2e1036..d4c62b26 100644 --- a/src/pages/DataImport.vue +++ b/src/pages/DataImport.vue @@ -6,6 +6,12 @@ :actions="actions" v-if="(canCancel || importType) && !complete" /> +