Skip to content

Commit

Permalink
Fix staffing sum and week selection comments (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigridge authored Nov 29, 2023
1 parent 155fd41 commit 3b3e961
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 11 additions & 3 deletions frontend/src/components/StaffingSums.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export default function StaffingSums({
</td>
{totalBillableHours.map((totalBillableHour, index) => (
<td key={index} className="m-2 px-2 py-1 pt-3 gap-1">
<p className="small-medium text-right">{totalBillableHour}</p>
<p className="small-medium text-right">
{totalBillableHour.toLocaleString("nb-No", {
maximumFractionDigits: 1,
minimumFractionDigits: 1,
})}
</p>
</td>
))}
</tr>
Expand All @@ -35,7 +40,10 @@ export default function StaffingSums({
(totalBillableAndOfferedHour, index) => (
<td key={index} className="m-2 px-2 py-1 pt-3 gap-1">
<p className="small-medium text-right">
{totalBillableAndOfferedHour}
{totalBillableAndOfferedHour.toLocaleString("nb-No", {
maximumFractionDigits: 1,
minimumFractionDigits: 1,
})}
</p>
</td>
),
Expand All @@ -48,7 +56,7 @@ export default function StaffingSums({
{weeklyInvoiceRatesArray.map((indexRates, index) => (
<td key={index} className="m-2 px-2 py-1 pt-3 gap-1">
<p className="small-medium text-right">
{Math.floor(indexRates * 100)}
{Math.round(indexRates * 100)}%
</p>
</td>
))}
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/components/WeekSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,13 @@ export default function WeekSelection() {

return (
<div className="flex flex-row gap-2">
<LargeModal />
<ButtonExampleModal />

<DropDown
startingOption={weekSpan ? weekSpan + " uker" : weekSpanOptions[0]}
dropDownOptions={weekSpanOptions}
dropDownFunction={setWeekSpan}
/>
<ActionButton variant="secondary" onClick={resetSelectedWeek}>
Denne uka
Nåværende uke
</ActionButton>
<IconSecondaryButton
icon={<ArrowLeft size={24} />}
Expand Down

0 comments on commit 3b3e961

Please sign in to comment.