diff --git a/apps/client/src/components/leo/incidents/manage-incident-modal.tsx b/apps/client/src/components/leo/incidents/manage-incident-modal.tsx index 07b5947c8..493c140d3 100644 --- a/apps/client/src/components/leo/incidents/manage-incident-modal.tsx +++ b/apps/client/src/components/leo/incidents/manage-incident-modal.tsx @@ -51,6 +51,10 @@ interface AreFormFieldsDisabledOptions { } function areFormFieldsDisabled(options: AreFormFieldsDisabledOptions) { + console.log({ + options, + }); + /** non-active incidents are always editable */ if (!options.isActiveIncidentsList) return false; /** dispatch can always edit the fields */ @@ -103,10 +107,10 @@ export function ManageIncidentModal({ const isOfficerIncidents = router.pathname.includes("/officer"); const activeUnit = isOfficerIncidents ? activeOfficer : isEmsFdIncidents ? activeDeputy : null; - const isActiveIncidentsList = isOfficerIncidents || isEmsFdIncidents; + const isReadOnly = isOfficerIncidents || isEmsFdIncidents; const areFieldsDisabled = areFormFieldsDisabled({ - isActiveIncidentsList, + isActiveIncidentsList: !isReadOnly, isDispatch, hasActiveDispatchers, incident, @@ -298,11 +302,7 @@ export function ManageIncidentModal({ {incident ? ( - + ) : null} @@ -336,7 +336,7 @@ export function ManageIncidentModal({ {incident ? ( ) : null}