diff --git a/frontend/package.json b/frontend/package.json index 56701963a..decdc0eb4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -37,7 +37,7 @@ "typescript": "^4.8.4" }, "scripts": { - "start": "react-scripts start", + "start": "react-scripts --openssl-legacy-provider start", "build": "react-scripts build", "tsc": "../node_modules/.bin/tsc --noEmit false", "lint": "eslint . --ext .js --ext .jsx --ext .ts --ext .tsx --fix", diff --git a/frontend/src/components/EmployeeModal/EmployeeModal.tsx b/frontend/src/components/EmployeeModal/EmployeeModal.tsx index 4ed4aefd1..32f02b3b4 100644 --- a/frontend/src/components/EmployeeModal/EmployeeModal.tsx +++ b/frontend/src/components/EmployeeModal/EmployeeModal.tsx @@ -81,6 +81,15 @@ const EmployeeModal = ({ setIsOpen(false); }; + /** + * Converts availabilities expressed as an array of {starTime, endTime, days} + * objects into an object mapping the day to the start and end time of each + * availability period + * + * @param availability the availibity array to convert + * @returns the availibity array expressed as an object mapping the day to + * the start and end time of each availibility period + */ const parseAvailability = (availability: ObjectType[]) => { const result: ObjectType = {}; availability.forEach(({ startTime, endTime, days }) => { @@ -306,13 +315,21 @@ const EmployeeModal = ({ } return ( <> - + -
+ + Add a location )} - - + +
+
-

+

Are you sure you want to remove {user.firstName} {user.lastName}?

diff --git a/frontend/src/components/Modal/Modal.tsx b/frontend/src/components/Modal/Modal.tsx index 61c4ffe52..c80b9baae 100644 --- a/frontend/src/components/Modal/Modal.tsx +++ b/frontend/src/components/Modal/Modal.tsx @@ -35,6 +35,8 @@ type ModalProps = { onClose?: () => void; displayClose?: boolean; isRider?: boolean; + id?: string; + arialabelledby?: string; }; const Modal = ({ @@ -46,6 +48,8 @@ const Modal = ({ onClose, displayClose, isRider = true, + arialabelledby, + id = 'modal', }: ModalProps) => { // Wrapping children in Array to match type for numPages const pages = paginate ? (children as React.ReactNodeArray) : [children]; @@ -69,12 +73,21 @@ const Modal = ({ }} >
-
+
{isRider ? ( -

{currentTitle}

+

+ {currentTitle} +

) : ( -
{currentTitle}
+
+ {currentTitle} +
)} {!displayClose && isRider && (