feat(multi load): refactored range find function, unlocking excel with password is reusable #115

Merged
allan merged 15 commits from issue99 into main 2024-06-27 09:40:45 +00:00
Owner

Closes #99

Closes #99
mihajlo added 1 commit 2024-06-13 11:00:30 +00:00
feat(multi load): refactored range find function, unlocking excel with password is reusable
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 52s
eb7c44333c
mihajlo added 2 commits 2024-06-14 13:46:40 +00:00
mihajlo added 1 commit 2024-06-14 13:52:33 +00:00
chore(licence checker): handsontable 14.4.0
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 4m41s
0a8b1e764c
mihajlo added 2 commits 2024-06-17 22:38:06 +00:00
style: lint
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 4m45s
6df7d8d2ba
mihajlo added 1 commit 2024-06-20 12:11:36 +00:00
feat(multi load): added HOT for user datasets input
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 51s
18363bbbeb
mihajlo added 1 commit 2024-06-21 12:23:25 +00:00
feat(multi load): licence submit limits
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 42s
cffeab813d
Icons improvement, ux improvements, matched dataset link to edit table, empty table is visible on the left
mihajlo added 4 commits 2024-06-26 14:14:59 +00:00
mihajlo added 1 commit 2024-06-26 14:19:08 +00:00
fix(multi load): label rename
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 3m56s
fa04d7bf4e
mihajlo changed title from WIP: feat(multi load): refactored range find function, unlocking excel with password is reusable to feat(multi load): refactored range find function, unlocking excel with password is reusable 2024-06-26 14:19:18 +00:00
Owner

client/src/app/routes/multi-dataset-route/multi-dataset-route.component.scss is an empty file

`client/src/app/routes/multi-dataset-route/multi-dataset-route.component.scss` is an empty file
Owner

client/src/app/shared/excel-password-modal/excel-password-modal.component.scss is an empty file

`client/src/app/shared/excel-password-modal/excel-password-modal.component.scss` is an empty file
yury requested changes 2024-06-27 07:38:39 +00:00
Dismissed
@ -0,0 +17,4 @@
this.beforeEach(() => {
cy.visit(hostUrl + appLocation)
// cy.get('input.username').type(username)
Owner

Please clean up

Please clean up
mihajlo marked this conversation as resolved
@ -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'],
Owner

variables for these string values would be nice

variables for these string values would be nice
mihajlo marked this conversation as resolved
@ -0,0 +125,4 @@
this.afterEach(() => {
colorLog(`TEST END -------------`, '#3498DB')
// cy.visit(`${hostUrl}/SASLogon/logout`)
Owner

Please clean up

Please clean up
mihajlo marked this conversation as resolved
@ -0,0 +28,4 @@
}
export interface Sasparam {
STATUS: string | 'SUCCESS'
Owner

It would be helpful to mention other possible statuses

It would be helpful to mention other possible statuses
Author
Owner

There are no more STATUS states, if the upload fails, sasjsAbort will be present in the response

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, {
Owner

it would be nice to define response type

it would be nice to define response type
mihajlo marked this conversation as resolved
@ -0,0 +55,4 @@
export interface ParseResult {
/**
* In case of CSV file, won't be returned
Owner

one-line comment would make more sense

one-line comment would make more sense
Author
Owner

If it's one line it's not detected as a comment by the IntelliSense.

image

If it's one line it's not detected as a comment by the `IntelliSense`. ![image](/attachments/ff7dece9-c909-48bf-965b-f379ab58ba17)
yury marked this conversation as resolved
@ -0,0 +59,4 @@
*/
data?: any[]
/**
* In case of CSV file, won't be returned
Owner

one-line comment would make more sense

one-line comment would make more sense
Author
Owner

If it's one line it's not detected as a comment by the IntelliSense.

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()
Owner

should be const

should be const
mihajlo marked this conversation as resolved
@ -0,0 +97,4 @@
let data: any[] = []
let uploader: FileUploader = parseParams.uploader || new FileUploader()
let file: File = parseParams.file
Owner

should be const

should be const
mihajlo marked this conversation as resolved
@ -0,0 +98,4 @@
let uploader: FileUploader = parseParams.uploader || new FileUploader()
let file: File = parseParams.file
let filename = file.name
Owner

should be const

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)) {
Owner

Please clean up

Please clean up
mihajlo marked this conversation as resolved
@ -0,0 +486,4 @@
let isComplete = false
let missingHeaders: string[] = []
let csvArrayHeaders: string[] = [
'_____DELETE__THIS__RECORD_____',
Owner

should be a const

should be a const
mihajlo marked this conversation as resolved
@ -0,0 +637,4 @@
parseParams: ParseParams
): Array<any> {
let headersFound = false
let missingErrorArray = []
Owner

should be const

should be const
mihajlo marked this conversation as resolved
@ -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 } }
Owner

lint check should throw a warning

`lint` check should throw a warning
Author
Owner

Apparently prettier does not care about that stuff, only the format.

Apparently prettier does not care about that stuff, only the format.
@ -0,0 +773,4 @@
resolve(result.password)
})
// Focus the password field
Owner

please clean up

please clean up
mihajlo marked this conversation as resolved
@ -0,0 +801,4 @@
parseParams: ParseParams
) {
if (parseParams.dateHeaders.length > 0) {
let dateCols: number[] = []
Owner

should be const

should be const
mihajlo marked this conversation as resolved
@ -0,0 +855,4 @@
})
}
if (parseParams.dateTimeHeaders.length > 0) {
let dateTimeCols: number[] = []
Owner

should be const

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))
Owner

should be const

should be const
mihajlo marked this conversation as resolved
@ -0,0 +873,4 @@
str = str + ' ' + obj.v.substring(obj.v.indexOf(':') + 1)
obj.v = str
}
let date = new Date(obj.v)
Owner

should be const

should be const
mihajlo marked this conversation as resolved
@ -0,0 +7,4 @@
headerLevel: number
) => {
// Dark mode
TH.classList.add('darkTH')
Owner

darkTH should be a const

`darkTH` should be a const
mihajlo marked this conversation as resolved
@ -87,0 +103,4 @@
white-space: pre-wrap;
border-radius: 3px;
border: 1px solid #e2e2e2;
Owner

colour should be a const

colour should be a const
mihajlo marked this conversation as resolved
mihajlo added 1 commit 2024-06-27 09:00:28 +00:00
fix: addressing PR comments
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 43s
d94df7f0eb
yury approved these changes 2024-06-27 09:06:03 +00:00
mihajlo added 1 commit 2024-06-27 09:07:35 +00:00
style: lint
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 3m52s
1b4560061d
allan approved these changes 2024-06-27 09:40:41 +00:00
allan merged commit e2c0b8da86 into main 2024-06-27 09:40:45 +00:00
allan deleted branch issue99 2024-06-27 09:40:46 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: dc/dc#115
No description provided.