From 4af165cc7fcc4fc1e8807b2b2d32d594f2b77389 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Wed, 25 Sep 2024 14:22:52 -0500 Subject: [PATCH] Comment for #87 and format --- src/routes/route_check/results_export/export.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/routes/route_check/results_export/export.ts b/src/routes/route_check/results_export/export.ts index 934ee87104..acd610cbe9 100644 --- a/src/routes/route_check/results_export/export.ts +++ b/src/routes/route_check/results_export/export.ts @@ -158,11 +158,12 @@ function policyConflictLog(state: State, workbook: ExcelJS.Workbook) { sheet.getCell("L" + (8 + i)).value = pc.notes; } - for(let i = 0; i <42; i++) { + // ExcelJS somehow breaks the dropdown menu on some pages. Manually restore it. + for (let i = 0; i < 42; i++) { sheet.getCell("F" + (8 + i)).dataValidation = { - type: 'list', + type: "list", allowBlank: true, - formulae: ["'8.2 Lookups&Forumlae2'!$B$7:$B$12"] + formulae: ["'8.2 Lookups&Forumlae2'!$B$7:$B$12"], }; } } @@ -181,11 +182,12 @@ function criticalIssueLog(state: State, workbook: ExcelJS.Workbook) { sheet.getCell("L" + (8 + i)).value = ci.notes; } - for(let i = 0; i <42; i++) { + // Fix the dropdown menu thatExcelJS breaks + for (let i = 0; i < 42; i++) { sheet.getCell("F" + (8 + i)).dataValidation = { - type: 'list', + type: "list", allowBlank: true, - formulae: ["'8.2 Lookups&Forumlae2'!$B$16:$B$39"] + formulae: ["'8.2 Lookups&Forumlae2'!$B$16:$B$39"], }; } }