add type symbol
Some checks are pending
Test / test (push) Waiting to run

This commit is contained in:
jorming.chong 2026-01-07 09:41:49 +08:00
parent 148182c680
commit 132587e838
2 changed files with 9 additions and 4 deletions

Binary file not shown.

View File

@ -40,7 +40,7 @@ export class ReadingReportController extends Controller {
const data: DeviceData[] = FullReportSchema.data;
const reportParams: ReportParams = FullReportSchema.report_params;
const workbook = new ExcelJS.Workbook();
const worksheet = workbook.addWorksheet('Event Records');
const worksheet = workbook.addWorksheet('Reading Records');
// ---------------- Logos ----------------
const jecLogoId = workbook.addImage({
@ -55,7 +55,7 @@ export class ReadingReportController extends Controller {
worksheet.addImage(jecLogoId, {
tl: { col: 0, row: 0 },
ext: { width: 120, height: 60 },
ext: { width: 120, height: 120 },
});
worksheet.addImage(fastLogoId, {
tl: { col: 7, row: 0 },
@ -133,8 +133,13 @@ export class ReadingReportController extends Controller {
for (const type of types) {
const row = worksheet.getRow(currentRow);
row.getCell(4).value = type;
if (type == 'Temperature') {
row.getCell(4).value = 'Temperature (°C)';
} else if (type == 'Humidity') {
row.getCell(4).value = 'Humidity (%)';
} else if (type == 'Battery') {
row.getCell(4).value = 'Battery (%)';
}
const stats = device.min_max_avg?.[type] ?? {};
row.getCell(5).value = stats.min ?? '-';