Skip to content

Commit

Permalink
feat: extended EMS/FD incidents
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Sep 25, 2023
1 parent 19fe35b commit 80b6d8f
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions apps/client/src/components/leo/incidents/manage-incident-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,16 @@ export function ManageIncidentModal<T extends LeoIncident | EmsFdIncident>({
{t("arrestsMade")}
</SwitchField>

<SwitchField
isDisabled={areFieldsDisabled}
isSelected={values.vehicleInvolved}
onChange={(isSelected) => setFieldValue("vehicleInvolved", isSelected)}
className="w-full"
>
{t("vehicleInvolved")}
</SwitchField>
{type === "ems-fd" ? (
<SwitchField
isDisabled={areFieldsDisabled}
isSelected={values.vehicleInvolved}
onChange={(isSelected) => setFieldValue("vehicleInvolved", isSelected)}
className="w-full"
>
{t("vehicleInvolved")}
</SwitchField>
) : null}
</div>

<FormField errorMessage={errors.description} label={common("description")}>
Expand All @@ -275,13 +277,15 @@ export function ManageIncidentModal<T extends LeoIncident | EmsFdIncident>({
filterFn={(value) => value.type === StatusValueType.SITUATION_CODE}
/>

<TextField
isOptional
value={values.fireType}
className="w-full"
onChange={(value) => setFieldValue("fireType", value)}
label={t("fireType")}
/>
{type === "ems-fd" ? (
<TextField
isOptional
value={values.fireType}
className="w-full"
onChange={(value) => setFieldValue("fireType", value)}
label={t("fireType")}
/>
) : null}
</FormRow>

<AddressPostalSelect
Expand Down

0 comments on commit 80b6d8f

Please sign in to comment.