chore: removed commented code about old workaround for excel upload validation

This commit is contained in:
Mihajlo Medjedovic 2023-08-03 21:58:50 +02:00
parent c054ea500d
commit 2bb2eee80e
2 changed files with 0 additions and 45 deletions

View File

@ -1,7 +0,0 @@
export interface RowValidation {
valid: boolean
invalidError: string
rowNumber?: number
colName?: string
value?: string
}

View File

@ -1177,44 +1177,6 @@ export class EditorComponent implements OnInit, AfterViewInit {
this.excelFileParsing = false
this.excelUploadState = null
})
/**
* This is half validation feature to speed up file upload
* Currently disabled but will leave it here in case it needs to be re-enabled
*/
// this.excelUploadState = 'Validating-DQ'
// this.validateRowsOnPendingExcel(
// async (rowValidation: RowValidation | undefined) => {
// if (rowValidation) {
// this.eventService.showAbortModal(
// 'Excel validation',
// `Please fix the data and re-submit the file. Invalid data details: <br><br> Row: ${rowValidation.rowNumber} <br> Column: ${rowValidation.colName} <br> Reason: <strong>${rowValidation.invalidError}</strong> <br> Invalid value: ${rowValidation.value}`
// )
// this.excelFileParsing = false
// this.excelUploadState = null
// } else {
// this.excelUploadState = 'Validating-HOT'
// hot.updateSettings(
// {
// data: this.dataSource
// },
// false
// )
// hot.render()
// hot.validateCells(() => {
// this.showUploadModal = false
// this.uploadPreview = true
// this.excelFileParsing = false
// this.excelUploadState = null
// })
// }
// }
// )
}
/**