feat(multi load): refactored range find function, unlocking excel with password is reusable #115
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue99"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #99
WIP: feat(multi load): refactored range find function, unlocking excel with password is reusableto feat(multi load): refactored range find function, unlocking excel with password is reusableclient/src/app/routes/multi-dataset-route/multi-dataset-route.component.scss
is an empty fileclient/src/app/shared/excel-password-modal/excel-password-modal.component.scss
is an empty file@ -0,0 +17,4 @@
this.beforeEach(() => {
cy.visit(hostUrl + appLocation)
// cy.get('input.username').type(username)
Please clean up
@ -0,0 +84,4 @@
it('3 | Uploads Excel file with multiple sheets, 1 sheets has 2 tables', (done) => {
attachExcelFile('multi_load_test_1.xlsx', () => {
checkHotUserDatasetTable('hotTableUserDataset', [
['DC996664', 'MPE_X_TEST'],
variables for these string values would be nice
@ -0,0 +125,4 @@
this.afterEach(() => {
colorLog(`TEST END -------------`, '#3498DB')
// cy.visit(`${hostUrl}/SASLogon/logout`)
Please clean up
@ -0,0 +28,4 @@
}
export interface Sasparam {
STATUS: string | 'SUCCESS'
It would be helpful to mention other possible statuses
There are no more
STATUS
states, if the upload fails,sasjsAbort
will be present in the response@ -101,3 +101,3 @@
tables[tableName] = [tableParams]
let res: any = await this.sasService.request(program, tables)
let res: any = await this.sasService.request(program, tables, null, {
it would be nice to define response type
@ -0,0 +55,4 @@
export interface ParseResult {
/**
* In case of CSV file, won't be returned
one-line comment would make more sense
If it's one line it's not detected as a comment by the
IntelliSense
.@ -0,0 +59,4 @@
*/
data?: any[]
/**
* In case of CSV file, won't be returned
one-line comment would make more sense
If it's one line it's not detected as a comment by the IntelliSense.
@ -0,0 +95,4 @@
): Promise<ParseResult | undefined> {
return new Promise((resolve, reject) => {
let data: any[] = []
let uploader: FileUploader = parseParams.uploader || new FileUploader()
should be const
@ -0,0 +97,4 @@
let data: any[] = []
let uploader: FileUploader = parseParams.uploader || new FileUploader()
let file: File = parseParams.file
should be const
@ -0,0 +98,4 @@
let uploader: FileUploader = parseParams.uploader || new FileUploader()
let file: File = parseParams.file
let filename = file.name
should be const
@ -0,0 +337,4 @@
* Code below used to convert JSON to CSV
* now the XLSX is converting to CSV
*/
// if (isNaN(col)) {
Please clean up
@ -0,0 +486,4 @@
let isComplete = false
let missingHeaders: string[] = []
let csvArrayHeaders: string[] = [
'_____DELETE__THIS__RECORD_____',
should be a const
@ -0,0 +637,4 @@
parseParams: ParseParams
): Array<any> {
let headersFound = false
let missingErrorArray = []
should be const
@ -0,0 +747,4 @@
* @param ws worksheet to be updated
*/
private update_sheet_range(ws: XLSX.WorkSheet) {
var range = { s: { r: Infinity, c: Infinity }, e: { r: 0, c: 0 } }
lint
check should throw a warningApparently prettier does not care about that stuff, only the format.
@ -0,0 +773,4 @@
resolve(result.password)
})
// Focus the password field
please clean up
@ -0,0 +801,4 @@
parseParams: ParseParams
) {
if (parseParams.dateHeaders.length > 0) {
let dateCols: number[] = []
should be const
@ -0,0 +855,4 @@
})
}
if (parseParams.dateTimeHeaders.length > 0) {
let dateTimeCols: number[] = []
should be const
@ -0,0 +865,4 @@
dateTimeCols.forEach((element) => {
const obj = row[element]
if (isStringNumber(obj.v) || isStringDecimal(obj.v)) {
let date = excelDateToJSDate(Number(obj.v))
should be const
@ -0,0 +873,4 @@
str = str + ' ' + obj.v.substring(obj.v.indexOf(':') + 1)
obj.v = str
}
let date = new Date(obj.v)
should be const
@ -0,0 +7,4 @@
headerLevel: number
) => {
// Dark mode
TH.classList.add('darkTH')
darkTH
should be a const@ -87,0 +103,4 @@
white-space: pre-wrap;
border-radius: 3px;
border: 1px solid #e2e2e2;
colour should be a const