Skip to content

Commit

Permalink
NPM run check
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter York committed Sep 30, 2024
1 parent 3fc9b08 commit e53b837
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/routes/planning/lists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ export let ratings: [string, string, string, string][] = [
export function getColoursForRating(
rating: string | undefined,
): [string, string] {
let ratingColours = ratings.find((ratingColour) => ratingColour[0] == rating) || ["", "", "white", "black"];
let ratingColours = ratings.find(
(ratingColour) => ratingColour[0] == rating,
) || ["", "", "white", "black"];
return [ratingColours[2], ratingColours[3]];
}
9 changes: 4 additions & 5 deletions src/routes/planning/report/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
<th>Relevant Policy & Guidance</th>
</tr>
{#each criteria as criterion, idx}
{@const [backgroundColor, color] = getColoursForRating($state.ratings[idx])}
{@const [backgroundColor, color] = getColoursForRating(
$state.ratings[idx],
)}
<tr>
<td style:min-width="125px">{idx + 1}. {criterion}</td>
<td
style:background={backgroundColor}
style:color={color}
>
<td style:background={backgroundColor} style:color>
{$state.ratings[idx]}
</td>
<td>{$state.appraiserComments[idx]}</td>
Expand Down
12 changes: 6 additions & 6 deletions src/routes/route_check/results_export/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ function policyConflictLog(state: State, workbook: ExcelJS.Workbook) {
sheet.getCell("L" + (8 + i)).value = pc.notes;
}

for(let i = 0; i <42; i++) {
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"],
};
}
}
Expand All @@ -181,11 +181,11 @@ function criticalIssueLog(state: State, workbook: ExcelJS.Workbook) {
sheet.getCell("L" + (8 + i)).value = ci.notes;
}

for(let i = 0; i <42; i++) {
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"],
};
}
}
Expand Down

0 comments on commit e53b837

Please sign in to comment.