From f449934886510239e6559ed2f5affe99fd5f8d61 Mon Sep 17 00:00:00 2001 From: erikataot Date: Wed, 8 Nov 2023 14:46:59 -0800 Subject: [PATCH 1/5] ORV2-1343 updated sorting funcs and styles --- .../components/dashboard/Dashboard.scss | 2 +- .../manageVehicles/components/list/List.scss | 2 ++ .../components/permit-list/BasePermitList.tsx | 2 +- .../components/permit-list/Columns.tsx | 26 +++++++++++++++---- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/frontend/src/common/components/dashboard/Dashboard.scss b/frontend/src/common/components/dashboard/Dashboard.scss index 6bbda543b..866fb01e7 100644 --- a/frontend/src/common/components/dashboard/Dashboard.scss +++ b/frontend/src/common/components/dashboard/Dashboard.scss @@ -1,5 +1,5 @@ .tabpanel-container { - padding: 0 3.75rem; + padding: 0 3.75rem 3.75rem 3.75rem; overflow: hidden; background-color: white; min-height: calc(100vh - 306px); diff --git a/frontend/src/features/manageVehicles/components/list/List.scss b/frontend/src/features/manageVehicles/components/list/List.scss index 3635604e3..5b8e9d41b 100644 --- a/frontend/src/features/manageVehicles/components/list/List.scss +++ b/frontend/src/features/manageVehicles/components/list/List.scss @@ -3,6 +3,7 @@ overflow: hidden; background-color: white; height: calc(100vh - 306px); + padding-bottom: 100px; } @media screen and (max-width: 768px) { @@ -11,5 +12,6 @@ overflow: hidden; background-color: white; height: calc(100vh - 267px); + padding-bottom: 100px; } } diff --git a/frontend/src/features/permits/components/permit-list/BasePermitList.tsx b/frontend/src/features/permits/components/permit-list/BasePermitList.tsx index 943120129..3ec7a56dd 100644 --- a/frontend/src/features/permits/components/permit-list/BasePermitList.tsx +++ b/frontend/src/features/permits/components/permit-list/BasePermitList.tsx @@ -102,7 +102,7 @@ export const BasePermitList = ({ muiTablePaperProps={{ sx: { border: "none", - boxShadow: "none", + boxShadow: "none" }, }} // Column widths diff --git a/frontend/src/features/permits/components/permit-list/Columns.tsx b/frontend/src/features/permits/components/permit-list/Columns.tsx index d72d84a85..af8664e41 100644 --- a/frontend/src/features/permits/components/permit-list/Columns.tsx +++ b/frontend/src/features/permits/components/permit-list/Columns.tsx @@ -11,7 +11,9 @@ export const PermitsColumnDefinition: MRT_ColumnDef[] = [ { accessorKey: "permitNumber", header: "Permit #", - enableSorting: false, + enableSorting: true, + enableMultiSort: false, + sortingFn: 'alphanumeric', size: 500, accessorFn: (row) => row.permitNumber, Cell: (props: { cell: any; row: any }) => { @@ -32,33 +34,47 @@ export const PermitsColumnDefinition: MRT_ColumnDef[] = [ { accessorKey: "permitType", header: "Permit Type", - enableSorting: false, + enableSorting: true, + enableMultiSort: false, + sortingFn: 'alphanumeric' }, { accessorFn: (row) => `${row.permitData.vehicleDetails?.unitNumber || ""}`, id: "unitNumber", header: "Unit #", - enableSorting: false, + enableSorting: true, + enableMultiSort: false, + sortingFn: 'alphanumeric' }, { accessorKey: "permitData.vehicleDetails.plate", header: "Plate", - enableSorting: false, + enableSorting: true, + enableMultiSort: false, + sortingFn: 'alphanumeric' }, { accessorKey: "permitData.startDate", header: "Permit Start Date", + enableSorting: true, + enableMultiSort: false, + sortingFn: 'datetime' }, { accessorKey: "permitData.expiryDate", header: "Permit End Date", + enableSorting: true, + enableMultiSort: false, + sortingFn: 'datetime' }, { accessorFn: (row) => `${row.permitData.contactDetails?.firstName} ${row.permitData.contactDetails?.lastName} `, id: "application", header: "Applicant", - enableSorting: false, + enableSorting: true, + enableMultiSort: false, + sortingFn: 'alphanumericCaseSensitive' }, ]; From daac41784bf0d88172e0254262070ba36d81b6a7 Mon Sep 17 00:00:00 2001 From: erikataot Date: Wed, 8 Nov 2023 14:54:19 -0800 Subject: [PATCH 2/5] chore: cleanup --- frontend/src/features/manageVehicles/components/list/List.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/features/manageVehicles/components/list/List.scss b/frontend/src/features/manageVehicles/components/list/List.scss index 5b8e9d41b..4f0ccb15c 100644 --- a/frontend/src/features/manageVehicles/components/list/List.scss +++ b/frontend/src/features/manageVehicles/components/list/List.scss @@ -1,5 +1,4 @@ .table-container { - //padding: 0px 60px; overflow: hidden; background-color: white; height: calc(100vh - 306px); @@ -8,7 +7,6 @@ @media screen and (max-width: 768px) { .table-container { - //padding: 0px 60px; overflow: hidden; background-color: white; height: calc(100vh - 267px); From 4798126f4b93aa0d068a1801e0574de434a88f82 Mon Sep 17 00:00:00 2001 From: erikataot Date: Wed, 8 Nov 2023 14:58:41 -0800 Subject: [PATCH 3/5] chore: cleanup sass structure --- .../src/features/manageVehicles/components/list/List.scss | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/manageVehicles/components/list/List.scss b/frontend/src/features/manageVehicles/components/list/List.scss index 4f0ccb15c..2768a5308 100644 --- a/frontend/src/features/manageVehicles/components/list/List.scss +++ b/frontend/src/features/manageVehicles/components/list/List.scss @@ -3,13 +3,9 @@ background-color: white; height: calc(100vh - 306px); padding-bottom: 100px; -} -@media screen and (max-width: 768px) { - .table-container { - overflow: hidden; - background-color: white; + @media screen and (max-width: 768px) { height: calc(100vh - 267px); - padding-bottom: 100px; + padding-bottom: 200px; } } From 02a1cea6a4e0f3f0886c0eac7c481c22d3f42141 Mon Sep 17 00:00:00 2001 From: erikataot Date: Wed, 8 Nov 2023 15:05:48 -0800 Subject: [PATCH 4/5] chore: sass cleanup --- frontend/src/features/idir/search/components/List.scss | 8 +------- frontend/src/features/idir/search/table/List.scss | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/frontend/src/features/idir/search/components/List.scss b/frontend/src/features/idir/search/components/List.scss index 3635604e3..f08a1663f 100644 --- a/frontend/src/features/idir/search/components/List.scss +++ b/frontend/src/features/idir/search/components/List.scss @@ -1,15 +1,9 @@ .table-container { - //padding: 0px 60px; overflow: hidden; background-color: white; height: calc(100vh - 306px); -} -@media screen and (max-width: 768px) { - .table-container { - //padding: 0px 60px; - overflow: hidden; - background-color: white; + @media screen and (max-width: 768px) { height: calc(100vh - 267px); } } diff --git a/frontend/src/features/idir/search/table/List.scss b/frontend/src/features/idir/search/table/List.scss index 3635604e3..f08a1663f 100644 --- a/frontend/src/features/idir/search/table/List.scss +++ b/frontend/src/features/idir/search/table/List.scss @@ -1,15 +1,9 @@ .table-container { - //padding: 0px 60px; overflow: hidden; background-color: white; height: calc(100vh - 306px); -} -@media screen and (max-width: 768px) { - .table-container { - //padding: 0px 60px; - overflow: hidden; - background-color: white; + @media screen and (max-width: 768px) { height: calc(100vh - 267px); } } From 1613a3b52b0e6e845455f680a2e9eaaca4e49542 Mon Sep 17 00:00:00 2001 From: erikataot Date: Wed, 8 Nov 2023 15:09:09 -0800 Subject: [PATCH 5/5] chore: revert style changes --- .../src/common/components/dashboard/Dashboard.scss | 2 +- frontend/src/features/idir/search/components/List.scss | 8 +++++++- frontend/src/features/idir/search/table/List.scss | 8 +++++++- .../features/manageVehicles/components/list/List.scss | 10 +++++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/frontend/src/common/components/dashboard/Dashboard.scss b/frontend/src/common/components/dashboard/Dashboard.scss index 866fb01e7..6bbda543b 100644 --- a/frontend/src/common/components/dashboard/Dashboard.scss +++ b/frontend/src/common/components/dashboard/Dashboard.scss @@ -1,5 +1,5 @@ .tabpanel-container { - padding: 0 3.75rem 3.75rem 3.75rem; + padding: 0 3.75rem; overflow: hidden; background-color: white; min-height: calc(100vh - 306px); diff --git a/frontend/src/features/idir/search/components/List.scss b/frontend/src/features/idir/search/components/List.scss index f08a1663f..3635604e3 100644 --- a/frontend/src/features/idir/search/components/List.scss +++ b/frontend/src/features/idir/search/components/List.scss @@ -1,9 +1,15 @@ .table-container { + //padding: 0px 60px; overflow: hidden; background-color: white; height: calc(100vh - 306px); +} - @media screen and (max-width: 768px) { +@media screen and (max-width: 768px) { + .table-container { + //padding: 0px 60px; + overflow: hidden; + background-color: white; height: calc(100vh - 267px); } } diff --git a/frontend/src/features/idir/search/table/List.scss b/frontend/src/features/idir/search/table/List.scss index f08a1663f..3635604e3 100644 --- a/frontend/src/features/idir/search/table/List.scss +++ b/frontend/src/features/idir/search/table/List.scss @@ -1,9 +1,15 @@ .table-container { + //padding: 0px 60px; overflow: hidden; background-color: white; height: calc(100vh - 306px); +} - @media screen and (max-width: 768px) { +@media screen and (max-width: 768px) { + .table-container { + //padding: 0px 60px; + overflow: hidden; + background-color: white; height: calc(100vh - 267px); } } diff --git a/frontend/src/features/manageVehicles/components/list/List.scss b/frontend/src/features/manageVehicles/components/list/List.scss index 2768a5308..3635604e3 100644 --- a/frontend/src/features/manageVehicles/components/list/List.scss +++ b/frontend/src/features/manageVehicles/components/list/List.scss @@ -1,11 +1,15 @@ .table-container { + //padding: 0px 60px; overflow: hidden; background-color: white; height: calc(100vh - 306px); - padding-bottom: 100px; +} - @media screen and (max-width: 768px) { +@media screen and (max-width: 768px) { + .table-container { + //padding: 0px 60px; + overflow: hidden; + background-color: white; height: calc(100vh - 267px); - padding-bottom: 200px; } }