From 20c3a338c563701b04a647d1d0cac0f84b36dd63 Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Mon, 12 Aug 2024 10:33:54 +0200 Subject: [PATCH] style: lint --- client/src/app/models/ParseParams.interface.ts | 2 +- client/src/app/models/RangeInfo.ts | 2 +- .../models/SearchDataExcelResult.interface.ts | 10 +++++----- .../app/multi-dataset/multi-dataset.component.ts | 8 +++++--- client/src/app/services/spreadsheet.service.ts | 16 ++++++++-------- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/client/src/app/models/ParseParams.interface.ts b/client/src/app/models/ParseParams.interface.ts index 442b2fd..9e4b9b9 100644 --- a/client/src/app/models/ParseParams.interface.ts +++ b/client/src/app/models/ParseParams.interface.ts @@ -12,7 +12,7 @@ export interface ParseParams { * If workbook is provided, parse function will not run a XLSX.read() * it will use this property instead. So the client must do a file read beforehand */ - workbook?: XLSX.WorkBook, + workbook?: XLSX.WorkBook /** * Parse function will manipulate and return the uploader array which can be provided with files already in the queue * Otherwise new empty instance will be created. diff --git a/client/src/app/models/RangeInfo.ts b/client/src/app/models/RangeInfo.ts index 959e4ba..663a2ce 100644 --- a/client/src/app/models/RangeInfo.ts +++ b/client/src/app/models/RangeInfo.ts @@ -10,4 +10,4 @@ export default interface FoundRangeInfo { export interface MissingHeaders { sheetName: string missingHeaders: string[] -} \ No newline at end of file +} diff --git a/client/src/app/models/SearchDataExcelResult.interface.ts b/client/src/app/models/SearchDataExcelResult.interface.ts index b28eef8..cc44cde 100644 --- a/client/src/app/models/SearchDataExcelResult.interface.ts +++ b/client/src/app/models/SearchDataExcelResult.interface.ts @@ -1,13 +1,13 @@ -import { MissingHeaders } from "./RangeInfo" +import { MissingHeaders } from './RangeInfo' export interface SearchDataExcelResult { - missing?: MissingHeaders[], + missing?: MissingHeaders[] found?: { - data: any, - arrayData: any[], + data: any + arrayData: any[] sheetName: string headers: string[] startAddress?: string endAddress?: string } -} \ No newline at end of file +} diff --git a/client/src/app/multi-dataset/multi-dataset.component.ts b/client/src/app/multi-dataset/multi-dataset.component.ts index dc4d93f..0ab5d49 100644 --- a/client/src/app/multi-dataset/multi-dataset.component.ts +++ b/client/src/app/multi-dataset/multi-dataset.component.ts @@ -219,10 +219,12 @@ export class MultiDatasetComponent implements OnInit { if (this.selectedFile) { this.fileLoadingState = FileLoadingState.reading - this.selectedFile.sizeMB = this.spreadsheetService.bytesToMB(this.selectedFile.size) + this.selectedFile.sizeMB = this.spreadsheetService.bytesToMB( + this.selectedFile.size + ) // Read the excel file to be ready - this.spreadsheetService.xlsxReadFile(this.selectedFile!).then(wb => { + this.spreadsheetService.xlsxReadFile(this.selectedFile!).then((wb) => { this.fileLoadingState = FileLoadingState.parsing this.selectedFile!.workbook = wb }) @@ -314,7 +316,7 @@ export class MultiDatasetComponent implements OnInit { }) }) - this.workbookLoaded().then(workbook => { + this.workbookLoaded().then((workbook) => { for (let parsedDataset of this.parsedDatasets) { this.spreadsheetService .parseExcelFile({ diff --git a/client/src/app/services/spreadsheet.service.ts b/client/src/app/services/spreadsheet.service.ts index 2edceee..f89be34 100644 --- a/client/src/app/services/spreadsheet.service.ts +++ b/client/src/app/services/spreadsheet.service.ts @@ -55,14 +55,14 @@ export class SpreadsheetService { let reader: FileReader = new FileReader() reader.onload = (fileReaderResponse: any) => { - spreadSheetUtil.xslxStartReading( - fileReaderResponse, - this.promptExcelPassword - ).then(response => { - resolve(response) - }).catch(err => { - reject(err) - }) + spreadSheetUtil + .xslxStartReading(fileReaderResponse, this.promptExcelPassword) + .then((response) => { + resolve(response) + }) + .catch((err) => { + reject(err) + }) } reader.readAsArrayBuffer(file)