Skip to content

Commit

Permalink
feat: CE-1029 - UI Updates to Complaints Tables (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeznorth authored Sep 5, 2024
1 parent b072e01 commit 8a4bd67
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 293 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ export const ComplaintList: FC<Props> = ({ type, searchQuery }) => {
className="comp-table-scroll-container"
ref={divRef}
>
<Table id="complaint-list">
<Table
className="comp-table"
id="complaint-list"
>
{renderComplaintListHeader(type)}
<tbody>
{complaints.map((item) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const AllegationComplaintListHeader: FC<Props> = ({ handleSort, sortKey,
sortKey="complaint_identifier"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-110 sticky-col sticky-col--left"
className="comp-cell-width-110 comp-cell-min-width-110 sticky-col sticky-col--left"
/>

<SortableHeader
Expand All @@ -29,6 +29,7 @@ export const AllegationComplaintListHeader: FC<Props> = ({ handleSort, sortKey,
sortKey="incident_reported_utc_timestmp"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-160 comp-cell-min-width-160"
/>

<SortableHeader
Expand Down Expand Up @@ -84,9 +85,10 @@ export const AllegationComplaintListHeader: FC<Props> = ({ handleSort, sortKey,
currentSort={sortKey}
sortDirection={sortDirection}
id="update-date-column"
className="comp-cell-width-160 comp-cell-min-width-160"
/>

<th className="comp-cell-width-100 unsortable sticky-col sticky-col--right actions-col">
<th className="unsortable sticky-col sticky-col--right comp-cell-width-90 comp-cell-min-width-90 actions-col ac-table-actions-cell">
<div className="header-label">Actions</div>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const GeneralComplaintListHeader: FC<Props> = ({ handleSort, sortKey, sor
sortKey="complaint_identifier"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-110 sticky-col sticky-col--left"
className="comp-cell-width-110 comp-cell-min-width-110 sticky-col sticky-col--left"
/>
<SortableHeader
id="incident-date-column"
Expand All @@ -26,6 +26,7 @@ export const GeneralComplaintListHeader: FC<Props> = ({ handleSort, sortKey, sor
sortKey="incident_reported_utc_timestmp"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-160 comp-cell-min-width-160"
/>
<SortableHeader
title="GIR Type"
Expand Down Expand Up @@ -70,9 +71,10 @@ export const GeneralComplaintListHeader: FC<Props> = ({ handleSort, sortKey, sor
sortKey="update_utc_timestamp"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-160 comp-cell-min-width-160"
/>

<th className="comp-cell-width-100 unsortable sticky-col sticky-col--right actions-col">
<th className="unsortable sticky-col sticky-col--right comp-cell-width-90 comp-cell-min-width-90 actions-col gc-table-actions-cell">
<div className="header-label">Actions</div>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const WildlifeComplaintListHeader: FC<Props> = ({ handleSort, sortKey, so
sortKey="complaint_identifier"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-110 sticky-col sticky-col--left"
className="comp-cell-width-110 comp-cell-min-width-110 sticky-col sticky-col--left"
/>
<SortableHeader
id="incident-date-column"
Expand All @@ -26,6 +26,7 @@ export const WildlifeComplaintListHeader: FC<Props> = ({ handleSort, sortKey, so
sortKey="incident_reported_utc_timestmp"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-160 comp-cell-min-width-160"
/>
<SortableHeader
title="Nature of Complaint"
Expand All @@ -51,8 +52,8 @@ export const WildlifeComplaintListHeader: FC<Props> = ({ handleSort, sortKey, so
sortDirection={sortDirection}
/>

<th className="unsortable">
<div className="comp-header-label">Location/Address</div>
<th className="unsortable-header">
<div className="header-label">Location/Address</div>
</th>

<SortableHeader
Expand All @@ -61,6 +62,7 @@ export const WildlifeComplaintListHeader: FC<Props> = ({ handleSort, sortKey, so
sortKey="complaint_status_code"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-110"
/>

<SortableHeader
Expand All @@ -78,9 +80,10 @@ export const WildlifeComplaintListHeader: FC<Props> = ({ handleSort, sortKey, so
sortKey="update_utc_timestamp"
currentSort={sortKey}
sortDirection={sortDirection}
className="comp-cell-width-160 comp-cell-min-width-160"
/>

<th className="comp-cell-width-100 unsortable sticky-col sticky-col--right actions-col">
<th className="unsortable sticky-col sticky-col--right comp-cell-width-90 comp-cell-min-width-90 actions-col hwc-table-actions-cell">
<div className="header-label">Actions</div>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const AllegationComplaintListItem: FC<Props> = ({ type, complaint }) => {
className={`${isExpandedClass} ${isRowHovered ? "comp-table-row-hover-style" : ""}`}
>
<td
className={`comp-cell-width-100 sticky-col sticky-col--left incident-col ${isExpandedClass}`}
className={`comp-cell-width-110 sticky-col sticky-col--left text-center ${isExpandedClass}`}
onClick={toggleExpand}
>
<Link
Expand All @@ -125,7 +125,7 @@ export const AllegationComplaintListItem: FC<Props> = ({ type, complaint }) => {
</Link>
</td>
<td
className={`${isExpandedClass}`}
className={`comp-cell-width-160 comp-cell-min-width-160 ac-table-date-cell ${isExpandedClass}`}
onClick={toggleExpand}
>
{reportedOnDateTime}
Expand Down Expand Up @@ -179,14 +179,14 @@ export const AllegationComplaintListItem: FC<Props> = ({ type, complaint }) => {
className={`${isExpandedClass}`}
onClick={toggleExpand}
>
<div
data-initials-listview={getOfficerAssignedInitials()}
className="comp-profile-avatar"
></div>
{getOfficerAssigned()}
</td>
<td className={`${isExpandedClass}`}>{updatedOnDateTime}</td>
<td className={`comp-cell-width-110 sticky-col sticky-col--right actions-col ${isExpandedClass}`}>
<td className={`comp-cell-width-160 comp-cell-min-width-160 ac-table-date-cell ${isExpandedClass}`}>
{updatedOnDateTime}
</td>
<td
className={`comp-cell-width-90 comp-cell-min-width-90 sticky-col sticky-col--right actions-col ac-table-actions-cell ${isExpandedClass}`}
>
<ComplaintActionItems
complaint_identifier={id}
complaint_type={type}
Expand Down Expand Up @@ -225,7 +225,9 @@ export const AllegationComplaintListItem: FC<Props> = ({ type, complaint }) => {
</div>
</dl>
</td>
<td className={`comp-cell-width-110 comp-cell-child-expanded sticky-col sticky-col--right actions-col`}></td>
<td
className={`comp-cell-width-90 comp-cell-min-width-90 sticky-col sticky-col--right actions-col ac-table-actions-cell`}
></td>
</tr>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const GeneralInformationComplaintListItem: FC<Props> = ({ type, complaint
className={`${isExpandedClass} ${isRowHovered ? "comp-table-row-hover-style" : ""}`}
>
<td
className={`comp-cell-width-100 sticky-col sticky-col--left incident-col ${isExpandedClass}`}
className={`comp-cell-width-100 sticky-col sticky-col--left text-center ${isExpandedClass}`}
onClick={toggleExpand}
>
<Link
Expand All @@ -126,7 +126,7 @@ export const GeneralInformationComplaintListItem: FC<Props> = ({ type, complaint
</Link>
</td>
<td
className={`${isExpandedClass}`}
className={`comp-cell-width-160 comp-cell-min-width-160 gc-table-date-cell ${isExpandedClass}`}
onClick={toggleExpand}
>
{reportedOnDateTime}
Expand Down Expand Up @@ -165,8 +165,12 @@ export const GeneralInformationComplaintListItem: FC<Props> = ({ type, complaint
></div>
{getOfficerAssigned()}
</td>
<td className={`${isExpandedClass}`}>{updatedOnDateTime}</td>
<td className={`comp-cell-width-110 sticky-col sticky-col--right actions-col ${isExpandedClass}`}>
<td className={`comp-cell-width-160 comp-cell-min-width-160 gc-table-date-cell ${isExpandedClass}`}>
{updatedOnDateTime}
</td>
<td
className={`comp-cell-width-90 comp-cell-min-width-90 sticky-col sticky-col--right actions-col gc-table-actions-cell ${isExpandedClass}`}
>
<ComplaintActionItems
complaint_identifier={id}
complaint_type={type}
Expand Down Expand Up @@ -205,7 +209,9 @@ export const GeneralInformationComplaintListItem: FC<Props> = ({ type, complaint
</div>
</dl>
</td>
<td className={`comp-cell-width-110 comp-cell-child-expanded sticky-col sticky-col--right actions-col`}></td>
<td
className={`comp-cell-width-90 comp-cell-min-width-90 sticky-col sticky-col--right actions-col gc-table-actions-cell`}
></td>
</tr>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const WildlifeComplaintListItem: FC<Props> = ({ type, complaint }) => {
className={`${isExpandedClass} ${isRowHovered ? "comp-table-row-hover-style" : ""}`}
>
<td
className={`comp-cell-width-95 sticky-col sticky-col--left incident-col ${isExpandedClass}`}
className={`comp-cell-width-110 sticky-col sticky-col--left text-center ${isExpandedClass}`}
onClick={toggleExpand}
>
<Link
Expand All @@ -126,13 +126,13 @@ export const WildlifeComplaintListItem: FC<Props> = ({ type, complaint }) => {
</Link>
</td>
<td
className={`comp-cell-width-95 ${isExpandedClass}`}
className={`comp-cell-width-160 comp-cell-min-width-160 hwc-table-date-cell ${isExpandedClass}`}
onClick={toggleExpand}
>
{reportedOnDateTime}
</td>
<td
className={`comp-cell-width-330 ${isExpandedClass}`}
className={`hwc-nature-of-complaint-cell ${isExpandedClass}`}
onClick={toggleExpand}
>
{natureCode}
Expand All @@ -150,7 +150,7 @@ export const WildlifeComplaintListItem: FC<Props> = ({ type, complaint }) => {
{location}
</td>
<td
className={`comp-cell-width-170 ${isExpandedClass}`}
className={`${isExpandedClass}`}
onClick={toggleExpand}
>
{locationSummary}
Expand All @@ -162,17 +162,17 @@ export const WildlifeComplaintListItem: FC<Props> = ({ type, complaint }) => {
<div className={statusButtonClass}>{getStatusDescription(status)}</div>
</td>
<td
className={`comp-cell-width-130 ${isExpandedClass}`}
className={`${isExpandedClass}`}
onClick={toggleExpand}
>
<div
data-initials-listview={getOfficerAssignedInitials()}
className="comp-profile-avatar"
></div>
{getOfficerAssigned()}
</td>
<td className={`comp-cell-width-110 ${isExpandedClass}`}>{updatedOnDateTime}</td>
<td className={`comp-cell-width-110 sticky-col sticky-col--right actions-col ${isExpandedClass}`}>
<td className={`comp-cell-width-160 comp-cell-min-width-160 hwc-table-date-cell ${isExpandedClass}`}>
{updatedOnDateTime}
</td>
<td
className={`comp-cell-width-90 comp-cell-min-width-90 sticky-col sticky-col--right actions-col hwc-table-actions-cell ${isExpandedClass}`}
>
<ComplaintActionItems
complaint_identifier={id}
complaint_type={type}
Expand Down Expand Up @@ -211,7 +211,9 @@ export const WildlifeComplaintListItem: FC<Props> = ({ type, complaint }) => {
</div>
</dl>
</td>
<td className={`comp-cell-width-110 comp-cell-child-expanded sticky-col sticky-col--right actions-col`}></td>
<td
className={`comp-cell-width-90 comp-cell-min-width-90 comp-cell-child-expanded sticky-col sticky-col--right actions-col`}
></td>
</tr>
)}
</>
Expand Down
Loading

0 comments on commit 8a4bd67

Please sign in to comment.