formatting text in portfolio

This commit is contained in:
Khalim Conn-Kowlessar 2023-11-24 13:51:32 +00:00
parent 613def9c0c
commit 7f1a09f96a
3 changed files with 1372 additions and 3 deletions

View file

@ -0,0 +1 @@
ALTER TYPE "type" ADD VALUE 'suspended_floor_vapour_barrier';

File diff suppressed because it is too large Load diff

View file

@ -53,11 +53,19 @@ function SummaryBox({
}
}
function formatBudget(budget: number | null) {
if (budget === null) {
return "Not set";
} else {
return formatMoney(budget);
}
}
function formatHours(hours: number | null) {
if (hours === null) {
return "0 hours";
} else {
return hours + " hours";
return Math.round(hours) + " hours";
}
}
@ -77,7 +85,7 @@ function SummaryBox({
}
}
const budgetFormatted = formatMoney(budget);
const budgetFormatted = formatBudget(budget);
const totalCostFormatted = formatMoney(totalCost);
const totalValueIncreaseFormatted = formatMoney(propertyValuationIncrease);
const totalWorkHoursFormatted = formatHours(totalWorkHours);
@ -136,7 +144,7 @@ function SummaryBox({
<td className="text-gray-600 text-end">{numProperties}</td>
</tr>
<tr>
<td className="text-gray-700">Total Works Time</td>
<td className="text-gray-700">Total Labour Hours</td>
<td className="text-gray-600 text-end">
{totalWorkHoursFormatted}
</td>