From d3b4d3dcc078f9fff922c6cd694d2486f2a9dd51 Mon Sep 17 00:00:00 2001 From: CollinWoo Date: Sun, 1 Oct 2023 23:06:22 -0400 Subject: [PATCH 1/4] add alt text to back button chevron --- frontend/src/components/UserDetail/EmployeeDetail.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/UserDetail/EmployeeDetail.tsx b/frontend/src/components/UserDetail/EmployeeDetail.tsx index 805de67bd..8ba4d74b6 100644 --- a/frontend/src/components/UserDetail/EmployeeDetail.tsx +++ b/frontend/src/components/UserDetail/EmployeeDetail.tsx @@ -145,7 +145,7 @@ const Header = () => { }} className={styles.header} > - + Employees Employees From 339575c94d68186a75f396d04b50d995dbc63c8a Mon Sep 17 00:00:00 2001 From: CollinWoo Date: Sun, 1 Oct 2023 23:21:28 -0400 Subject: [PATCH 2/4] add documentation to compRides() --- frontend/src/components/UserDetail/EmployeeDetail.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/components/UserDetail/EmployeeDetail.tsx b/frontend/src/components/UserDetail/EmployeeDetail.tsx index 8ba4d74b6..9e8dfd594 100644 --- a/frontend/src/components/UserDetail/EmployeeDetail.tsx +++ b/frontend/src/components/UserDetail/EmployeeDetail.tsx @@ -162,6 +162,15 @@ const EmployeeDetail = () => { const [rideCount, setRideCount] = useState(-1); const [workingHours, setWorkingHours] = useState(-1); + /** + * Compares ride [a] with ride [b] based on their start time. Returns a + * negative number if [a] starts before [b], a positive number if [a] starts + * after [b], and 0 otherwise + * + * @param a the first ride to compare + * @param b the second ride to compare + * @returns -1, 1, or 0 if the start time of [a] is before, after, or the same as [b] + */ const compRides = (a: Ride, b: Ride) => { const x = new Date(a.startTime); const y = new Date(b.startTime); From 11ced83b7ea7f4fc95a5e5a899893bdf4dc87f9e Mon Sep 17 00:00:00 2001 From: CollinWoo Date: Tue, 3 Oct 2023 15:43:01 -0400 Subject: [PATCH 3/4] change alt text to be more descriptive --- frontend/src/components/UserDetail/EmployeeDetail.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/UserDetail/EmployeeDetail.tsx b/frontend/src/components/UserDetail/EmployeeDetail.tsx index 9e8dfd594..760419d0b 100644 --- a/frontend/src/components/UserDetail/EmployeeDetail.tsx +++ b/frontend/src/components/UserDetail/EmployeeDetail.tsx @@ -145,7 +145,7 @@ const Header = () => { }} className={styles.header} > - Employees + Back to Employees List Employees From 55f63aa24511b1d77a1cd5b1feb8a43e5a62da87 Mon Sep 17 00:00:00 2001 From: CollinWoo Date: Tue, 3 Oct 2023 15:46:06 -0400 Subject: [PATCH 4/4] reformat with prettier --- frontend/src/components/UserDetail/EmployeeDetail.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/UserDetail/EmployeeDetail.tsx b/frontend/src/components/UserDetail/EmployeeDetail.tsx index 760419d0b..f9abdd806 100644 --- a/frontend/src/components/UserDetail/EmployeeDetail.tsx +++ b/frontend/src/components/UserDetail/EmployeeDetail.tsx @@ -145,7 +145,11 @@ const Header = () => { }} className={styles.header} > - Back to Employees List + Back to Employees List Employees