diff --git a/frontend/src/app/components/containers/complaints/complaint-list.tsx b/frontend/src/app/components/containers/complaints/complaint-list.tsx index 4a210ce21..2c002c23a 100644 --- a/frontend/src/app/components/containers/complaints/complaint-list.tsx +++ b/frontend/src/app/components/containers/complaints/complaint-list.tsx @@ -205,7 +205,10 @@ export const ComplaintList: FC = ({ type, searchQuery }) => { className="comp-table-scroll-container" ref={divRef} > - +
{renderComplaintListHeader(type)} {complaints.map((item) => { diff --git a/frontend/src/app/components/containers/complaints/headers/allegation-complaint-list-header.tsx b/frontend/src/app/components/containers/complaints/headers/allegation-complaint-list-header.tsx index 9c80a0ed2..cfc899353 100644 --- a/frontend/src/app/components/containers/complaints/headers/allegation-complaint-list-header.tsx +++ b/frontend/src/app/components/containers/complaints/headers/allegation-complaint-list-header.tsx @@ -19,7 +19,7 @@ export const AllegationComplaintListHeader: FC = ({ 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" /> = ({ handleSort, sortKey, sortKey="incident_reported_utc_timestmp" currentSort={sortKey} sortDirection={sortDirection} + className="comp-cell-width-160 comp-cell-min-width-160" /> = ({ handleSort, sortKey, currentSort={sortKey} sortDirection={sortDirection} id="update-date-column" + className="comp-cell-width-160 comp-cell-min-width-160" /> - diff --git a/frontend/src/app/components/containers/complaints/headers/general-complaint-list-header.tsx b/frontend/src/app/components/containers/complaints/headers/general-complaint-list-header.tsx index b7b9ffdaf..d48b49393 100644 --- a/frontend/src/app/components/containers/complaints/headers/general-complaint-list-header.tsx +++ b/frontend/src/app/components/containers/complaints/headers/general-complaint-list-header.tsx @@ -17,7 +17,7 @@ export const GeneralComplaintListHeader: FC = ({ 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" /> = ({ handleSort, sortKey, sor sortKey="incident_reported_utc_timestmp" currentSort={sortKey} sortDirection={sortDirection} + className="comp-cell-width-160 comp-cell-min-width-160" /> = ({ handleSort, sortKey, sor sortKey="update_utc_timestamp" currentSort={sortKey} sortDirection={sortDirection} + className="comp-cell-width-160 comp-cell-min-width-160" /> - diff --git a/frontend/src/app/components/containers/complaints/headers/wildlife-complaint-list-header.tsx b/frontend/src/app/components/containers/complaints/headers/wildlife-complaint-list-header.tsx index 88a6daae7..ea06a55a4 100644 --- a/frontend/src/app/components/containers/complaints/headers/wildlife-complaint-list-header.tsx +++ b/frontend/src/app/components/containers/complaints/headers/wildlife-complaint-list-header.tsx @@ -17,7 +17,7 @@ export const WildlifeComplaintListHeader: FC = ({ 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" /> = ({ handleSort, sortKey, so sortKey="incident_reported_utc_timestmp" currentSort={sortKey} sortDirection={sortDirection} + className="comp-cell-width-160 comp-cell-min-width-160" /> = ({ handleSort, sortKey, so sortDirection={sortDirection} /> - = ({ handleSort, sortKey, so sortKey="complaint_status_code" currentSort={sortKey} sortDirection={sortDirection} + className="comp-cell-width-110" /> = ({ handleSort, sortKey, so sortKey="update_utc_timestamp" currentSort={sortKey} sortDirection={sortDirection} + className="comp-cell-width-160 comp-cell-min-width-160" /> - diff --git a/frontend/src/app/components/containers/complaints/list-items/allegation-complaint-list-item.tsx b/frontend/src/app/components/containers/complaints/list-items/allegation-complaint-list-item.tsx index 47a6a9fab..bc2e91578 100644 --- a/frontend/src/app/components/containers/complaints/list-items/allegation-complaint-list-item.tsx +++ b/frontend/src/app/components/containers/complaints/list-items/allegation-complaint-list-item.tsx @@ -114,7 +114,7 @@ export const AllegationComplaintListItem: FC = ({ type, complaint }) => { className={`${isExpandedClass} ${isRowHovered ? "comp-table-row-hover-style" : ""}`} > - - + - + )} diff --git a/frontend/src/app/components/containers/complaints/list-items/general-complaint-list-item.tsx b/frontend/src/app/components/containers/complaints/list-items/general-complaint-list-item.tsx index 4984eb505..8fdcbc40f 100644 --- a/frontend/src/app/components/containers/complaints/list-items/general-complaint-list-item.tsx +++ b/frontend/src/app/components/containers/complaints/list-items/general-complaint-list-item.tsx @@ -115,7 +115,7 @@ export const GeneralInformationComplaintListItem: FC = ({ type, complaint className={`${isExpandedClass} ${isRowHovered ? "comp-table-row-hover-style" : ""}`} > - - + - + )} diff --git a/frontend/src/app/components/containers/complaints/list-items/wildlife-complaint-list-item.tsx b/frontend/src/app/components/containers/complaints/list-items/wildlife-complaint-list-item.tsx index b15db4a36..8def80074 100644 --- a/frontend/src/app/components/containers/complaints/list-items/wildlife-complaint-list-item.tsx +++ b/frontend/src/app/components/containers/complaints/list-items/wildlife-complaint-list-item.tsx @@ -115,7 +115,7 @@ export const WildlifeComplaintListItem: FC = ({ type, complaint }) => { className={`${isExpandedClass} ${isRowHovered ? "comp-table-row-hover-style" : ""}`} > - - + - + )} diff --git a/frontend/src/assets/sass/complaint.scss b/frontend/src/assets/sass/complaint.scss index 0d5ee1c3b..b49ee39f4 100644 --- a/frontend/src/assets/sass/complaint.scss +++ b/frontend/src/assets/sass/complaint.scss @@ -222,6 +222,103 @@ } } +// COMPLAINT TABLES - GENERAL +#complaint-list { + border-collapse: initial; + border-spacing: 0px; + font-style: normal; + + tbody { + tr { + cursor: pointer; + + &:hover { + background-color: $gray-110; + } + } + + td { + overflow: hidden; + } + + .comp-table-row-hover-style { + background-color: $gray-110; + } + + .comp-table-icon-weighted:hover { + stroke-width: 0.5; + } + } + + .comp-ellipsis-cell { + width: 31px; + vertical-align: middle; + color: $gray-600; + font-size: 14px; + + td { + cursor: pointer; + } + } +} + +// COMPLAINT TABLE - HUMAN WILDLIFE COMPLAINTS +.hwc-table { + &-date-cell { + white-space: nowrap; + } + + &-actions-cell { + text-align: center; + } +} + +.hwc-table-dl { + margin: 0; + + + dl { + margin-top: 16px; + } + + div { + display: flex; + flex-direction: column; + gap: 2px; + } + + dt { + width: 40ch; + font-weight: 400; + color: $gray-500; + } + + dd { + margin: 0; + white-space: normal; + max-width: 92ch; + } +} + +// COMPLAINT TABLE - ALLEGATION/COMPLAINTS +.ac-table { + &-date-cell { + white-space: nowrap; + } + &-actions-cell { + text-align: center; + } +} + +// COMPLAINT TABLE - GENERAL COMPLAINTS +.gc-table { + &-date-cell { + white-space: nowrap; + } + &-actions-cell { + text-align: center; + } +} + // COMPLAINT DETAILS AND EDIT PAGES // COMPLAINT HEADER COMPONENT .comp-details-header { @@ -699,10 +796,6 @@ p { white-space: pre-wrap; } -.comp-table tbody div:last-child .comp-cell:last-of-type { - border-bottom-right-radius: 4px; -} - .comp-complaint-label { color: $gray-500; } @@ -949,7 +1042,7 @@ p { .comp-complaint-top-row { margin-top: 24px; } - + .first-row { flex-direction: row; gap: 10px; @@ -1378,160 +1471,6 @@ p { margin-top: 6px; } -// COMPLAINT DETAILS END - -#complaint-list { - border-collapse: initial; - border-spacing: 0px; - font-style: normal; - - tbody { - tr { - cursor: pointer; - } - - tr .comp-table-icons { - // don't display unless row is hovered on - display: none; - } - - tr:hover { - background-color: $gray-110; - } - - .comp-table-row-hover-style { - background-color: $gray-110; - } - - // display the interactive icons when the row is hovered on - tr:hover .comp-table-icons { - margin-top: 10px; - display: block; - } - - // hide the date when the row is hovered on - tr:hover .comp-table-update-date { - display: none; - } - - td { - white-space: nowrap; - } - - .comp-table-icon-weighted:hover { - stroke-width: 0.5; - } - - .comp-cell-action-icon { - margin-right: 15px; - } - - .comp-cell-break-word { - word-break: break-word; - } - - .comp-cell-expanded-location { - max-width: 800px; - } - - .comp-cell-child-actions { - vertical-align: bottom !important; - text-align: right !important; - } - - .comp-cell-child-actions div { - margin-right: 20px; - } - } - - .comp-header-left-border { - border-left-width: 1px; - } - - .comp-header-right-border { - border-right-width: 1px; - } - - .comp-header-vertical-border-left { - border-left-width: 1px; - } - - .comp-ellipsis-cell { - width: 31px; - vertical-align: middle; - color: $gray-600; - font-size: 14px; - - td { - cursor: pointer; - } - } -} - -.comp-table-header { - display: flex; - flex-direction: row; - align-items: flex-start; - margin: 0; - width: 1330px; - font-style: normal; - font-weight: 600; - font-size: 12px; - - height: 38px; - border-spacing: 0px; - text-align: left; - border-collapse: initial; - margin-left: 12px; - - > :not(caption) > * > * { - background: $gray-500; - background-color: $gray-200; - border-color: $gray-500; - } - - /* Inside auto layout */ - - flex: none; - order: 0; - align-self: stretch; - flex-grow: 0; -} - -.comp-table { - border-spacing: 0px; - display: flex; - flex-direction: row; - align-items: flex-start; - margin: 0; - width: 1330px; - font-style: normal; - font-size: 12px; - text-align: left; - border-collapse: initial; - - /* Inside auto layout */ - - flex: none; - order: 0; - align-self: stretch; - flex-grow: 0; -} - -.comp-header-cell { - box-sizing: border-box; - padding: 0px 12px 0px 12px; - height: 38px; - - border-width: 1px 1px 0px 0px; - border-style: solid; - border-bottom-width: 0px; - flex: none; - order: 12; - align-self: stretch; - flex-grow: 0; -} - .comp-box-footer { margin-right: 24px; height: 100px; @@ -1556,20 +1495,6 @@ p { } } -.comp-cell { - box-sizing: border-box; - padding: 12px 12px 12px 12px; - - border-width: 0px 1px 0px 0px; - border-style: solid; - border-color: $gray-310; - - flex: none; - order: 12; - align-self: stretch; - flex-grow: 0; -} - .comp-cell-parent-expanded { border-bottom: none !important; } @@ -1582,33 +1507,6 @@ p { padding-top: 0 !important; } -.comp-cell-left { - border-style: solid; - border-color: $gray-310; - border-width: 0px 1px 0px 1px; -} - -.comp-top-left { - border-top-left-radius: 4px; - border-width: 1px 1px 0px 1px; -} - -.comp-small-cell { - width: 95px; -} - -.comp-medium-cell { - width: 130px; -} - -.comp-area-cell { - width: 165px; -} - -.comp-location-cell { - width: 170px; -} - .collapsible .header { padding: 6px; cursor: pointer; @@ -1966,54 +1864,3 @@ p { cursor: not-allowed; pointer-events: all; } - -// COMPLAINT TABLE CUSTOMIZATION -th, -td { - white-space: nowrap; -} - -td { - vertical-align: middle; -} - -td.incident-col { - text-align: center; -} - -.actions-col { - text-align: center; -} - -.hwc-table-dl { - margin: 0; - - + dl { - margin-top: 16px; - } - - div { - display: flex; - flex-direction: column; - gap: 2px; - } - - dt { - width: 40ch; - font-weight: 400; - color: $gray-500; - } - - dd { - margin: 0; - white-space: normal; - max-width: 92ch; - } -} - -.bg-species-badge { - font-size: 0.75rem; - line-height: normal; - background-color: #e4e4e4; - color: #313132; -} diff --git a/frontend/src/assets/sass/layout.scss b/frontend/src/assets/sass/layout.scss index b3ad2031e..b7540f9cd 100644 --- a/frontend/src/assets/sass/layout.scss +++ b/frontend/src/assets/sass/layout.scss @@ -723,7 +723,7 @@ p { } // TABLES -.table { +.comp-table { font-size: 0.875rem; thead { @@ -735,6 +735,7 @@ p { background: $gray-100; background-color: $gray-100; border-color: $gray-300; + overflow: hidden; white-space: nowrap; vertical-align: middle; @@ -753,6 +754,9 @@ p { } td { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + overflow: hidden; border-color: $gray-300; } @@ -794,7 +798,13 @@ td.sticky-col { background-color: #fff; } -.actions-col { +td.actions-col { + padding-top: 0; + padding-bottom: 0; + .btn { + margin-top: 4px; + } + .btn + .btn { margin-left: 8px; } @@ -811,12 +821,12 @@ td.sticky-col { justify-content: space-between; gap: 0.5rem; } +} - & .header-label { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } +.header-label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } // TABS diff --git a/frontend/src/assets/sass/mixins.scss b/frontend/src/assets/sass/mixins.scss index a09b1747d..a2dad7c97 100644 --- a/frontend/src/assets/sass/mixins.scss +++ b/frontend/src/assets/sass/mixins.scss @@ -207,3 +207,9 @@ width: #{$width}px; } } + +@each $width in $cell-widths { + .comp-cell-min-width-#{$width} { + min-width: #{$width}px; + } +}
+
Actions
+
Actions
-
Location/Address
+
+
Location/Address
+
Actions
= ({ type, complaint }) => { {reportedOnDateTime} @@ -179,14 +179,14 @@ export const AllegationComplaintListItem: FC = ({ type, complaint }) => { className={`${isExpandedClass}`} onClick={toggleExpand} > -
{getOfficerAssigned()}
{updatedOnDateTime} + + {updatedOnDateTime} + = ({ type, complaint }) => {
= ({ type, complaint {reportedOnDateTime} @@ -165,8 +165,12 @@ export const GeneralInformationComplaintListItem: FC = ({ type, complaint > {getOfficerAssigned()} {updatedOnDateTime} + + {updatedOnDateTime} + = ({ type, complaint
= ({ type, complaint }) => { {reportedOnDateTime} {natureCode} @@ -150,7 +150,7 @@ export const WildlifeComplaintListItem: FC = ({ type, complaint }) => { {location} {locationSummary} @@ -162,17 +162,17 @@ export const WildlifeComplaintListItem: FC = ({ type, complaint }) => {
{getStatusDescription(status)}
-
{getOfficerAssigned()}
{updatedOnDateTime} + + {updatedOnDateTime} + = ({ type, complaint }) => {