Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 46a2b85

Browse files
committed
fix: rename sort variable to more descriptive
1 parent d00dce7 commit 46a2b85

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

apps/admin-ui/src/component/Unit/UnitsDataLoader.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ function transformSortString(orderBy: string | null): UnitOrderingChoices[] {
7979
return [UnitOrderingChoices.NameFiAsc];
8080
case "-nameFi":
8181
return [UnitOrderingChoices.NameFiDesc];
82-
case "typeFi":
83-
return [UnitOrderingChoices.ReservationCountAsc];
84-
case "-typeFi":
85-
return [UnitOrderingChoices.ReservationCountDesc];
82+
case "reservationUnitCount":
83+
return [UnitOrderingChoices.ReservationUnitsCountAsc];
84+
case "-reservationUnitCount":
85+
return [UnitOrderingChoices.ReservationUnitsCountDesc];
8686
case "unitGroup":
8787
return [UnitOrderingChoices.UnitGroupNameAsc];
8888
case "-unitGroup":

apps/admin-ui/src/component/Unit/UnitsTable.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ function getColConfig(t: TFunction, isMyUnits?: boolean): ColumnType[] {
4242
},
4343
{
4444
headerName: t("Units.headings.reservationUnitCount"),
45-
key: "typeFi",
45+
key: "reservationUnitCount",
4646
isSortable: true,
4747
transform: (unit: UnitType) => (
48-
<> {unit?.reservationunitSet?.length ?? 0} </>
48+
<>{unit?.reservationunitSet?.length ?? 0}</>
4949
),
5050
width: "25%",
5151
},
@@ -56,7 +56,7 @@ function getColConfig(t: TFunction, isMyUnits?: boolean): ColumnType[] {
5656
transform: (unit: UnitType) =>
5757
(unit?.unitGroups || [])
5858
.map((unitGroup) => unitGroup?.nameFi)
59-
.join(","),
59+
.join(", "),
6060
width: "25%",
6161
},
6262
];

0 commit comments

Comments
 (0)