mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
formatting text in portfolio
This commit is contained in:
parent
613def9c0c
commit
7f1a09f96a
3 changed files with 1372 additions and 3 deletions
1
src/app/db/migrations/0050_clumsy_wind_dancer.sql
Normal file
1
src/app/db/migrations/0050_clumsy_wind_dancer.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
ALTER TYPE "type" ADD VALUE 'suspended_floor_vapour_barrier';
|
||||
1360
src/app/db/migrations/meta/0050_snapshot.json
Normal file
1360
src/app/db/migrations/meta/0050_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue