Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .yarn/cache/xlsx-https-15979b9f23-c08ac699e6.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/core-ui/command-surface/src/views/control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const ControlView = () => {
id: '',
// ...activeProgram?.interface,
...hmi,
nodes: fullHMIElements
nodes: fullHMIElements //.map((x) => ({...x, draggable: false}))
},
tags,
types
Expand Down
2 changes: 1 addition & 1 deletion packages/lambdas/compile-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"mathjs": "^12.4.1",
"moment": "^2.30.1",
"nanoid": "3.x",
"xlsx": "^0.18.5"
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"devDependencies": {
"ts-node": "^10.9.2",
Expand Down
7 changes: 3 additions & 4 deletions packages/lambdas/compile-report/src/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const compileReport = async (
AND "lastUpdated" <= ${endDate}
`;

console.log({startRecord, endRecord})

const result : any[] = await prisma.$queryRaw`
SELECT placeholder,
Expand All @@ -58,8 +57,8 @@ console.log({startRecord, endRecord})
"deviceId" = ${deviceId} AND
placeholder=${field.device?.name}
${field.key ? Prisma.sql` AND key=${field.key?.name}` : Prisma.empty}
AND "lastUpdated" >= ${startRecord?.[0] ? moment(startRecord?.[0]?.date).toDate() : startDate}
AND "lastUpdated" <= ${endRecord?.[0] ? moment(endRecord?.[0]?.date).toDate() : endDate}
AND "lastUpdated" >= ${startRecord?.[0]?.date ? moment(startRecord?.[0]?.date).toDate() : startDate}
AND "lastUpdated" <= ${endRecord?.[0]?.date ? moment(endRecord?.[0]?.date).toDate() : endDate}
GROUP BY placeholder, key, time ORDER BY time ASC
`

Expand All @@ -86,7 +85,7 @@ console.log({startRecord, endRecord})

const xlsxPath = path.join(__dirname, `${id}.xlsx`);

xlsx.writeFile(workbook, xlsxPath);
xlsx.writeFile(workbook, xlsxPath, {bookSST: true, compression: true});

return {path: xlsxPath, id};

Expand Down
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16873,7 +16873,7 @@ __metadata:
nanoid: 3.x
ts-node: ^10.9.2
typescript: 4.9.5
xlsx: ^0.18.5
xlsx: "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -39357,6 +39357,15 @@ __metadata:
languageName: node
linkType: hard

"xlsx@https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz":
version: 0.20.3
resolution: "xlsx@https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
bin:
xlsx: ./bin/xlsx.njs
checksum: c08ac699e6d31222404871240aa2c2804cb8bae59f0bea08d3293e99756cf0d3122fd34739189edaae1d9b0b493bbb8eb95d021950ee7b5cba9d55ecd6fcb4e4
languageName: node
linkType: hard

"xlsx@npm:^0.18.5":
version: 0.18.5
resolution: "xlsx@npm:0.18.5"
Expand Down
Loading