Skip to content

Commit

Permalink
Moves the gir type to the header, fixes issue on fragments.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorylavery committed Jul 17, 2024
1 parent 3a27d13 commit af42be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const CallDetails: FC<ComplaintHeaderProps> = ({ complaintType }) => {
attractants,
violationInProgress,
violationObserved,
girType,
} = useAppSelector(selectComplaintDetails(complaintType)) as ComplaintDetails;

return (
Expand Down Expand Up @@ -99,15 +98,6 @@ export const CallDetails: FC<ComplaintHeaderProps> = ({ complaintType }) => {
</div>
</>
)}
{/* GIR Details */}
{complaintType === COMPLAINT_TYPES.GIR && (
<>
<div>
<dt>General Incident Type</dt>
<dd id="comp-details-general-incident-type">{girType}</dd>
</div>
</>
)}
</dl>

{/* Location Information */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const ComplaintHeader: FC<ComplaintHeaderProps> = ({
violationType,
species,
complaintAgency,
girType,
} = useAppSelector(selectComplaintHeader(complaintType));

const dispatch = useAppDispatch();
Expand Down Expand Up @@ -230,6 +231,7 @@ export const ComplaintHeader: FC<ComplaintHeaderProps> = ({
<span className="comp-box-species-type">{species}&nbsp;&nbsp;•&nbsp;&nbsp;</span>
)}
{readOnly && <span>{complaintType !== COMPLAINT_TYPES.ERS ? natureOfComplaint : violationType}</span>}
{readOnly && girType && complaintType === COMPLAINT_TYPES.GIR && <span>{girType}</span>}
</div>
</div>
</div>
Expand Down

0 comments on commit af42be9

Please sign in to comment.