diff --git a/src/components/Reports/TableFilter/TableFilter.jsx b/src/components/Reports/TableFilter/TableFilter.jsx
index c9abf62e88..5517e88be9 100644
--- a/src/components/Reports/TableFilter/TableFilter.jsx
+++ b/src/components/Reports/TableFilter/TableFilter.jsx
@@ -41,6 +41,7 @@ function TableFilter({
EndDate,
UpdateStartDate,
UpdateEndDate,
+ darkMode,
}) {
const taskPriority = ['Primary', 'Secondary', 'Tertiary'];
const taskStatus = ['Paused', 'Complete', 'Active'];
@@ -118,6 +119,7 @@ function TableFilter({
id="active"
wrapperClassname="table-filter-item"
label="Active"
+ darkMode={darkMode}
/>
);
diff --git a/src/components/Reports/__tests__/PeopleTableDetails.test.jsx b/src/components/Reports/__tests__/PeopleTableDetails.test.jsx
index 27e7655861..2d98003cbe 100644
--- a/src/components/Reports/__tests__/PeopleTableDetails.test.jsx
+++ b/src/components/Reports/__tests__/PeopleTableDetails.test.jsx
@@ -193,13 +193,14 @@ describe('PeopleTableDetails component', () => {
render(
);
const allButtons = screen.getAllByRole('button');
+ // Find the button by its content (the "1+" text indicating more resources)
const toggleButton = allButtons.find(button =>
- button.classList.contains('resourceMoreToggle')
+ button.textContent.includes('+')
);
expect(toggleButton).toBeInTheDocument();
// eslint-disable-next-line testing-library/no-node-access
- const extraDiv = toggleButton.parentElement.querySelector('.extra');
+ const extraDiv = document.getElementById(tasks[0]._id);
expect(extraDiv).toBeInTheDocument();
fireEvent.click(toggleButton);
diff --git a/src/components/Reports/reportsPage.css b/src/components/Reports/index.css
similarity index 96%
rename from src/components/Reports/reportsPage.css
rename to src/components/Reports/index.css
index 1ba1b54ae1..007977a083 100644
--- a/src/components/Reports/reportsPage.css
+++ b/src/components/Reports/index.css
@@ -19,6 +19,11 @@
overflow-x: hidden;
}
+/* Dark mode: Reports page background */
+.container-component-wrapper.bg-oxford-blue {
+ background-color: #1b2a41;
+}
+
.data-container {
width: 50%;
}
@@ -33,6 +38,11 @@
padding: 0 16px;
}
+/* Dark mode: category section background */
+.category-data-container.bg-oxford-blue {
+ background-color: #1b2a41;
+}
+
@media screen and (max-width: 1200px) {
.category-data-container {
grid-template-columns: 1fr;
diff --git a/src/components/Reports/reportsPage.module.css b/src/components/Reports/reportsPage.module.css
new file mode 100644
index 0000000000..eb60882a59
--- /dev/null
+++ b/src/components/Reports/reportsPage.module.css
@@ -0,0 +1,379 @@
+:global {
+ * {
+ box-sizing: border-box;
+ margin: 0;
+ }
+
+ .red-asterisk {
+ color: #e00000;
+ }
+
+ .container-component-wrapper {
+ min-height: 100%;
+ width: 100%;
+ display: grid;
+ justify-content: center;
+ align-content: start;
+ background-color: #faf7fc;
+ margin: 0px;
+ justify-items: center;
+ overflow-x: hidden;
+ }
+
+ .data-container {
+ width: 50%;
+ }
+
+ .category-data-container {
+ display: flex;
+ width: 100%;
+ justify-content: center;
+ align-content: flex-start;
+ background-color: #faf7fc;
+ margin: 0 auto;
+ padding: 0 16px;
+ }
+
+ .no-active-selection {
+ grid-template-columns: 1fr !important;
+ }
+
+ .container-component-category {
+ width: 90%;
+ display: flex;
+ flex-direction: column;
+ border-radius: 0 0 16px 16px;
+ padding: 32px;
+ }
+
+ .category-container {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-evenly;
+ gap: 10px;
+ }
+
+ .card-category-item {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-between;
+ width: 30%;
+ padding: 24px;
+ border: 0;
+ background-color: #f1ebf7;
+ border-radius: 8px;
+ cursor: pointer;
+ margin: 8px;
+ transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
+ transform-origin: center center;
+ }
+
+ .report-container-data {
+ display: flex;
+ gap: 10px;
+ }
+
+ .category-container > .card-category-item.selected {
+ background-color: #d7cdda;
+ box-shadow: 0px 8px 16px rgba(78, 32, 125, 0.2);
+ transform: scale(1.03);
+ position: relative;
+ z-index: 1;
+ }
+
+ .category-container > .card-category-item.bg-yinmn-blue.selected {
+ background-color: #4a6a8a;
+ box-shadow: 0px 8px 16px rgba(58, 80, 107, 0.4);
+ }
+
+ .category-container > .card-category-item.bg-yinmn-blue.selected .card-category-item-title,
+ .category-container > .card-category-item.bg-yinmn-blue.selected .card-category-item-number {
+ color: #fff;
+ }
+
+ .card-category-item:focus-visible {
+ outline: none;
+ }
+
+ .card-category-item img {
+ width: 100px;
+ height: 100px;
+ object-fit: contain;
+ }
+
+ .card-category-item-title {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ font-size: 24px;
+ font-weight: 400;
+ text-align: center;
+ }
+
+ .card-category-item-number {
+ font-size: 32px;
+ font-weight: 700;
+ margin: 12px 0;
+ }
+
+ .text-light {
+ color: white;
+ }
+
+ .table-data-container {
+ width: 50%;
+ max-width: 600px;
+ height: 1250px;
+ position: sticky;
+ top: 0;
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .search-field-container {
+ max-width: 100%;
+ }
+
+ .date-picker-container {
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ padding: 8px 0px 8px 0px;
+ gap: 4%;
+ }
+
+ .date-picker-item {
+ display: flex;
+ width: 30%;
+ flex-direction: column;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+ }
+
+ .date-picker-label {
+ text-align: left;
+ margin: 8px 0;
+ }
+
+ :root {
+ --spacing-unit: 0.5rem;
+ }
+
+ .total-report-container,
+ .lost-time-container {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ width: 100%;
+ gap: var(--spacing-unit);
+ margin: var(--spacing-unit) 0;
+ padding: 0;
+ }
+
+ .total-report-item,
+ .lost-time-item {
+ flex: 0 0 calc(50% - var(--spacing-unit));
+ min-width: 200px;
+ max-width: 240px;
+ display: flex;
+ align-items: center;
+ margin-bottom: var(--spacing-unit);
+ }
+
+ .total-report-item button,
+ .lost-time-item button {
+ width: 100%;
+ font-size: 0.9rem;
+ white-space: nowrap;
+ padding: 0.5rem;
+ }
+
+ .info-icon-wrapper {
+ margin-left: 6px;
+ flex-shrink: 0;
+ }
+
+ .total-report-container:last-child,
+ .lost-time-container:last-child {
+ margin-bottom: 0;
+ }
+
+ .type-container {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ gap: 1rem;
+ }
+
+ .type-item {
+ padding-left: 30px;
+ }
+
+ .loading-spinner-top {
+ display: flex;
+ justify-content: center;
+ margin-bottom: 1rem;
+ }
+
+ .bg-yinmn-blue .info-modal-content {
+ color: #fff !important;
+ }
+
+ .force-white-text,
+ .bg-yinmn-blue .force-white-text,
+ .bg-yinmn-blue .info-modal-content.force-white-text {
+ color: #fff !important;
+ }
+
+ .bg-yinmn-blue .info-modal-content.force-white-text,
+ .bg-yinmn-blue .info-modal-content.force-white-text * {
+ color: #fff !important;
+ }
+}
+
+@media screen and (max-width: 1200px) {
+ :global {
+ .category-data-container {
+ grid-template-columns: 1fr;
+ }
+
+ .table-data-container {
+ max-width: 720px;
+ margin: 0 auto;
+ }
+ }
+}
+
+@media screen and (max-width: 1350px) {
+ :global {
+ .container-component-wrapper {
+ padding: 16px;
+ }
+
+ .category-data-container {
+ width: 100%;
+ padding: 0;
+ }
+
+ .container-component-category {
+ padding: 16px;
+ }
+
+ .category-container {
+ margin-top: 20px;
+ justify-content: center;
+ }
+
+ .card-category-item {
+ width: 30%;
+ min-width: 120px;
+ max-width: 200px;
+ padding: 16px;
+ margin: 8px;
+ }
+
+ .card-category-item img {
+ width: 72px;
+ height: 72px;
+ }
+
+ .card-category-item-number {
+ font-size: 24px;
+ font-weight: 700;
+ margin: 8px 0;
+ }
+
+ .table-data-container {
+ padding: 16px;
+ width: 50%;
+ }
+ }
+}
+
+@media screen and (max-width: 1100px) {
+ :global {
+ .container-component-wrapper {
+ padding: 16px;
+ }
+
+ .table-data-container {
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .table-data-container::-webkit-scrollbar {
+ display: none;
+ }
+
+ .category-container {
+ flex-wrap: wrap;
+ }
+
+ .card-category-item {
+ width: 30%;
+ min-width: 120px;
+ margin: 0;
+ }
+
+ .total-report-container,
+ .lost-time-container {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ gap: 1rem;
+ }
+ }
+}
+
+@media screen and (max-width: 700px) {
+ :global {
+ .container-component-wrapper {
+ padding: 16px;
+ }
+
+ .category-data-container {
+ grid-template-columns: 1fr;
+ }
+
+ .container-component-category {
+ width: 100%;
+ max-width: 100%;
+ display: flex;
+ flex-direction: column;
+ border-radius: 0 0 16px 16px;
+ padding: 16px;
+ }
+
+ .table-data-container {
+ width: 100%;
+ }
+
+ .data-container {
+ width: 100% !important;
+ }
+
+ .report-container-data {
+ flex-direction: column;
+ }
+
+ .card-category-item {
+ width: 30%;
+ max-width: none;
+ }
+
+ .card-category-item img {
+ width: 72px;
+ height: 72px;
+ }
+
+ .category-container {
+ flex-wrap: wrap;
+ }
+
+ .card-category-item-number {
+ font-size: 24px;
+ font-weight: 700;
+ margin: 8px 0;
+ }
+ }
+}
diff --git a/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.css b/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.css
deleted file mode 100644
index fef69d623e..0000000000
--- a/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.css
+++ /dev/null
@@ -1,91 +0,0 @@
-.report-header {
- min-height: 25vh;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.report-header-details {
- width: 100%;
- text-align: center;
-}
-
-.report-header-profile-pic {
- width: 6rem;
- height: 6rem;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
- background: #a780d9;
- border: 3px solid #e5daf0;
-}
-
-.report-header-profile-pic svg {
- width: 50px;
- height: 50px;
- color: #faf7fd;
-}
-
-.report-header-profile-pic-wrapper {
- position: relative;
- display: inline-block;
-}
-
-.report-header-entity-name {
- font-weight: 400;
- font-size: 1.3rem;
- margin: 1rem 0;
-}
-
-.report-header-activity {
- position: absolute;
- right: -6px;
- bottom: -1px;
- width: 20px;
- height: 20px;
- background-color: #c6c6c6;
- border-radius: 50%;
- border: 2px solid white;
-}
-
-.report-header-activity.active {
- background-color: #2affa1;
-}
-
-/* DARK MODE */
-.report-header-profile-pic-dark {
- width: 6rem;
- height: 6rem;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
-
- background: #5b0ac6;
- border: 3px solid #a45bed;
-}
-
-.report-header-profile-pic-dark svg {
- width: 50px;
- height: 50px;
- color: #c489ff;
-}
-
-.report-header-activity-dark {
- position: absolute;
- right: -6px;
- bottom: -1px;
- width: 20px;
- height: 20px;
- background-color: #3A506B;
- border-radius: 50%;
- border: 2px solid rgb(40, 39, 39);
-}
-
-.report-header-activity-dark.active {
- background-color: #2affa1;
-}
-.report-header-entity-other-info{
- font-size: 15px;
-}
diff --git a/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.jsx b/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.jsx
index 37b6ddab2a..03d45cb8a4 100644
--- a/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.jsx
+++ b/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.jsx
@@ -1,6 +1,6 @@
import classnames from 'classnames';
import { ReportBlock } from '../ReportBlock';
-import './ReportHeader.css';
+import './ReportHeader.module.css';
export function ReportHeader({
children,
diff --git a/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.module.css b/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.module.css
new file mode 100644
index 0000000000..d80114fe6b
--- /dev/null
+++ b/src/components/Reports/sharedComponents/ReportPage/components/ReportHeader/ReportHeader.module.css
@@ -0,0 +1,95 @@
+:global {
+ .report-header {
+ min-height: 25vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .report-header-details {
+ width: 100%;
+ text-align: center;
+ }
+
+ .report-header-profile-pic {
+ width: 6rem;
+ height: 6rem;
+ border-radius: 50%;
+ object-fit: cover;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #a780d9;
+ border: 3px solid #e5daf0;
+ }
+
+ .report-header-profile-pic svg {
+ width: 50px;
+ height: 50px;
+ color: #faf7fd;
+ }
+
+ .report-header-profile-pic-wrapper {
+ position: relative;
+ display: inline-block;
+ }
+
+ .report-header-entity-name {
+ font-weight: 400;
+ font-size: 1.3rem;
+ margin: 1rem 0;
+ }
+
+ .report-header-activity {
+ position: absolute;
+ right: 2px;
+ bottom: 2px;
+ width: 20px;
+ height: 20px;
+ background-color: #c6c6c6;
+ border-radius: 50%;
+ border: 2px solid white;
+ }
+
+ .report-header-activity.active {
+ background-color: #2affa1;
+ }
+
+ /* DARK MODE */
+ .report-header-profile-pic-dark {
+ width: 6rem;
+ height: 6rem;
+ border-radius: 50%;
+ object-fit: cover;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #5b0ac6;
+ border: 3px solid #a45bed;
+ }
+
+ .report-header-profile-pic-dark svg {
+ width: 50px;
+ height: 50px;
+ color: #c489ff;
+ }
+
+ .report-header-activity-dark {
+ position: absolute;
+ right: 2px;
+ bottom: 2px;
+ width: 20px;
+ height: 20px;
+ background-color: #3A506B;
+ border-radius: 50%;
+ border: 2px solid rgb(40, 39, 39);
+ }
+
+ .report-header-activity-dark.active {
+ background-color: #2affa1;
+ }
+
+ .report-header-entity-other-info {
+ font-size: 15px;
+ }
+}
diff --git a/src/components/common/Checkbox/Checkbox.jsx b/src/components/common/Checkbox/Checkbox.jsx
index 0b4ec544a2..34f9811780 100644
--- a/src/components/common/Checkbox/Checkbox.jsx
+++ b/src/components/common/Checkbox/Checkbox.jsx
@@ -9,11 +9,14 @@ export const Checkbox = ({
wrapperClassname,
backgroundColorCN,
textColorCN,
+ darkMode,
}) => {
return (
-
diff --git a/src/components/common/Checkbox/Checkbox.module.css b/src/components/common/Checkbox/Checkbox.module.css
index ec7f333d74..81a09f6f36 100644
--- a/src/components/common/Checkbox/Checkbox.module.css
+++ b/src/components/common/Checkbox/Checkbox.module.css
@@ -2,6 +2,10 @@
background-color: #f8f7f8;
}
+.checkboxWrapperDark {
+ background-color: #2c2c2c;
+}
+
.checkboxInput {
width: 16px;
height: 16px;
@@ -12,3 +16,7 @@
margin: 0 4px;
cursor: pointer;
}
+
+.checkboxLabelDark {
+ color: #fff;
+}