Cleanup, comments, e2e
This commit is contained in:
parent
1e0594a488
commit
8faa5354a8
14 changed files with 288 additions and 232 deletions
|
|
@ -1,21 +1,34 @@
|
|||
/**
|
||||
* ClientField Component
|
||||
*
|
||||
* Renders a list of testing centers with associated client selection inputs.
|
||||
* Each testing center allows for the selection of a client from a provided list.
|
||||
*/
|
||||
|
||||
import { faClock } from "@fortawesome/free-regular-svg-icons"
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||
import React from "react"
|
||||
import SelectInput from "./SelectInput"
|
||||
import { Utils } from "./Utils"
|
||||
|
||||
// Define a type for your props to improve type-checking
|
||||
/**
|
||||
* Props for ClientField component.
|
||||
*
|
||||
* @param testingCenters Array of testing center names to be displayed.
|
||||
* @param clients Array of client names available for selection.
|
||||
*/
|
||||
|
||||
type ClientFieldProps = {
|
||||
testingCenters: string[]
|
||||
clients: string[]
|
||||
}
|
||||
|
||||
// Destructure the props in the function parameter
|
||||
const ClientField: React.FC<ClientFieldProps> = ({ testingCenters, clients }) => {
|
||||
return (
|
||||
<div className="flex flex-col gap-4 text-sm leading-tight">
|
||||
{/* Render a selection input for each testing center, allowing a client to be chosen for each. */}
|
||||
{testingCenters.map((testingCenter) => (
|
||||
<div key={Utils.camelize(testingCenter)} className="flex items-center gap-14">
|
||||
<div key={Utils.camelize(testingCenter)} className="flex items-center gap-4 md:gap-14">
|
||||
<span>{testingCenter}</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<SelectInput name={Utils.camelize(testingCenter)}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue