mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
everything buildsnpm run buildnpm run build
This commit is contained in:
parent
1f8c6e0c5b
commit
085e9c2020
2 changed files with 17 additions and 11 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import type { ReactNode } from "react";
|
||||
|
||||
import {
|
||||
getPropertyMeta,
|
||||
getDocument,
|
||||
|
|
@ -309,7 +311,7 @@ function ReplacementsContent({
|
|||
|
||||
// sort within each group
|
||||
Object.values(groups).forEach((comps) =>
|
||||
comps.sort((a, b) => a.expiry.getTime() - b.expiry.getTime())
|
||||
comps.sort((a, b) => a.expiry.getTime() - b.expiry.getTime()),
|
||||
);
|
||||
|
||||
const groupOrder: (keyof typeof groups)[] = [
|
||||
|
|
@ -320,7 +322,7 @@ function ReplacementsContent({
|
|||
];
|
||||
|
||||
// urgency → card highlight color + icon
|
||||
const cardStyles: Record<string, { border: string; icon: JSX.Element }> = {
|
||||
const cardStyles: Record<string, { border: string; icon: ReactNode }> = {
|
||||
Overdue: {
|
||||
border: "border-l-4 border-red-600",
|
||||
icon: <AlertTriangle className="w-4 h-4 text-red-600" />,
|
||||
|
|
@ -385,7 +387,7 @@ function ReplacementsContent({
|
|||
))}
|
||||
</div>
|
||||
</div>
|
||||
) : null
|
||||
) : null,
|
||||
)}
|
||||
</CardContent>
|
||||
<div className="absolute bottom-0 left-0 right-0 h-6 bg-gradient-to-t from-gray-100 to-transparent pointer-events-none" />
|
||||
|
|
@ -434,7 +436,7 @@ function DecentHomesSummary({
|
|||
day: "numeric",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const criteriaGroups: Record<
|
||||
|
|
@ -581,15 +583,15 @@ export default async function DecentHomesPage(props: {
|
|||
!decentPropertyMeta.s3JsonUri
|
||||
) {
|
||||
throw new Error(
|
||||
`Decent Homes data is missing for uprn ${propertyMeta.uprn}`
|
||||
`Decent Homes data is missing for uprn ${propertyMeta.uprn}`,
|
||||
);
|
||||
}
|
||||
|
||||
const decentHomesMeta = await getEnergyAssessmentFromS3(
|
||||
decentPropertyMeta.s3JsonUri
|
||||
decentPropertyMeta.s3JsonUri,
|
||||
);
|
||||
const decentHomes = await getEnergyAssessmentFromS3(
|
||||
decentHomesSummary.s3JsonUri
|
||||
decentHomesSummary.s3JsonUri,
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export default function PropertyFilters({
|
|||
Change handlers (no useEffect)
|
||||
----------------------------------------- */
|
||||
function handleCurrentEpcChange(
|
||||
value: PropertyFilterValues["current_epc_at_most"]
|
||||
value: PropertyFilterValues["current_epc_at_most"],
|
||||
) {
|
||||
setCurrentEpc(value);
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ export default function PropertyFilters({
|
|||
}
|
||||
|
||||
function handleExpectedEpcChange(
|
||||
value: PropertyFilterValues["expected_epc_at_least"]
|
||||
value: PropertyFilterValues["expected_epc_at_least"],
|
||||
) {
|
||||
setExpectedEpc(value);
|
||||
|
||||
|
|
@ -126,7 +126,9 @@ export default function PropertyFilters({
|
|||
<option
|
||||
key={epc}
|
||||
value={epc}
|
||||
disabled={expectedEpc && epcIndex(epc) <= epcIndex(expectedEpc)}
|
||||
disabled={
|
||||
expectedEpc !== "" && epcIndex(epc) <= epcIndex(expectedEpc)
|
||||
}
|
||||
>
|
||||
{epc} or below
|
||||
</option>
|
||||
|
|
@ -150,7 +152,9 @@ export default function PropertyFilters({
|
|||
<option
|
||||
key={epc}
|
||||
value={epc}
|
||||
disabled={currentEpc && epcIndex(epc) >= epcIndex(currentEpc)}
|
||||
disabled={
|
||||
expectedEpc !== "" && epcIndex(epc) <= epcIndex(expectedEpc)
|
||||
}
|
||||
>
|
||||
{epc} or above
|
||||
</option>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue