Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions src/actions/userManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
import { UserStatus, UserStatusOperations, InactiveReason } from '~/utils/enums';
import { COMPANY_TZ } from '~/utils/formatDate';

/** Used when callers request all basic profiles without a named source (e.g. LB/BM dashboards). */
const DEFAULT_USER_PROFILE_BASIC_INFO_SOURCE = 'UserManagement';

/**
* Set a flag that fetching user profiles
*/
Expand Down Expand Up @@ -203,7 +206,7 @@
};

const buildBackendPayload = (userDetails, action) => {
console.log('Building backend payload with:', { userDetails, action });

Check warning on line 209 in src/actions/userManagement.js

View workflow job for this annotation

GitHub Actions / test

Unexpected console statement
switch (action){
case UserStatusOperations.ACTIVATE:
return {
Expand Down Expand Up @@ -368,12 +371,17 @@
export const getUserProfileBasicInfo = ({ userId, source } = {}) => {
// API request to fetch basic user profile information
let userProfileBasicInfoPromise;
if (userId)
userProfileBasicInfoPromise = axios.get(`${ENDPOINTS.USER_PROFILE_BASIC_INFO}?userId=${userId}`);
else if (source)
if (userId) {
userProfileBasicInfoPromise = axios.get(
`${ENDPOINTS.APIEndpoint()}/userProfile/basicInfo?userId=${userId}`,
);
} else if (source) {
userProfileBasicInfoPromise = axios.get(ENDPOINTS.USER_PROFILE_BASIC_INFO(source));
else
userProfileBasicInfoPromise = axios.get(ENDPOINTS.USER_PROFILE_BASIC_INFO);
} else {
userProfileBasicInfoPromise = axios.get(
ENDPOINTS.USER_PROFILE_BASIC_INFO(DEFAULT_USER_PROFILE_BASIC_INFO_SOURCE),
);
}

return async dispatch => {
// Dispatch action indicating the start of the fetch process
Expand Down
22 changes: 11 additions & 11 deletions src/components/BMDashboard/ItemList/ItemListView.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

:global(.dark-mode) .items_list_container {
background-color: #0d1117 !important;
color: #ffffff !important;
color: #fff !important;
min-height: 100vh;
padding-bottom: 2rem;
}
Expand All @@ -60,49 +60,49 @@

:global(.dark-mode) .items_list_container table {
background-color: #161b22;
color: #ffffff;
color: #fff;
border: 1px solid #30363d;
}

:global(.dark-mode) .items_list_container th {
background-color: #1f2937;
color: #ffffff;
color: #fff;
border-bottom: 1px solid #30363d;
}

:global(.dark-mode) .items_list_container td {
border-bottom: 1px solid #30363d;
color: #ffffff;
color: #fff;
}

:global(.dark-mode) .items_list_container tr:hover {
background-color: #1f2a37;
}

:global(.dark-mode) .items_cell svg {
color: #ffffff;
color: #fff;
}

:global(.dark-mode) .items_cell svg:hover {
color: #ffffff;
color: #fff;
}

:global(.dark-mode) .select_input {
background-color: #1e2632;
color: #ffffff;
color: #fff;
border: 1px solid #30363d;
}

:global(.dark-mode) select,
:global(.dark-mode) input {
background-color: #1e2632;
color: #ffffff;
color: #fff;
border: 1px solid #30363d;
}

:global(.dark-mode) option {
background-color: #111827;
color: #ffffff;
color: #fff;
}

:global(.dark-mode) body,
Expand All @@ -113,13 +113,13 @@

.items_list_container.dark_mode {
background-color: #1b1f27 !important;
color: #ffffff !important;
color: #fff !important;
border-color: #2a2f3a !important;
}

.dark-mode .items_table_container .table thead th {
background-color: #1c2541 !important;
color: #ffffff !important;
color: #fff !important;
border-color: #555 !important;
}

Expand Down
12 changes: 6 additions & 6 deletions src/components/BMDashboard/ItemList/RecordsModal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:global(.dark-mode) .records_modal_table_container,
:global(.dark-mode) .recordsModalTableContainer {
background-color: #3a506b;
color: #ffffff;
color: #fff;
}

:global(.dark-mode) .records_modal_table_container a,
Expand All @@ -27,24 +27,24 @@
:global(.dark-mode) .records_modal_table_container thead tr th,
:global(.dark-mode) .recordsModalTableContainer thead tr th {
background-color: #1c2541 !important;
color: #ffffff !important;
color: #fff !important;
border-color: #3a506b !important;
}

:global(.dark-mode) .records_modal_table_container tbody tr td,
:global(.dark-mode) .recordsModalTableContainer tbody tr td {
background-color: #3a506b !important;
color: #ffffff !important;
color: #fff !important;
border-color: #1c2541 !important;
}

:global(.dark-mode) .records_modal_table_container tbody tr:hover td,
:global(.dark-mode) .recordsModalTableContainer tbody tr:hover td {
background-color: #1c2541 !important;
color: #ffffff !important;
color: #fff !important;
}

@media (min-width: 1200px) {
@media (width >= 1200px) {
.records_modal_table_container,
.recordsModalTableContainer {
font-size: medium;
Expand Down Expand Up @@ -88,7 +88,7 @@
:global(.dark-mode) .reject_button,
:global(.dark-mode) .rejectButton {
background-color: #1c2541;
color: #ffffff;
color: #fff;
border: 1px solid #3a506b;
}

Expand Down
Loading
Loading