Skip to content

Commit 9982535

Browse files
Merge pull request #4820 from OneCommunityGlobal/development
Frontend Release to Main [4.74]
2 parents a1b7f10 + 002106f commit 9982535

48 files changed

Lines changed: 2686 additions & 623 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ jobs:
6262
domain: ${{ vars.SURGE_DOMAIN }}
6363
project: './build'
6464
login: ${{ secrets.SURGE_LOGIN }}
65-
token: ${{ secrets.SURGE_TOKEN }}
65+
token: ${{ secrets.SURGE_TOKEN }}

.github/workflows/pull_request_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ jobs:
5555
- name: Run Unit Tests for Changed Files Only
5656
run: yarn run test:changed
5757
- name: Run Lint
58-
run: yarn run lint
58+
run: yarn run lint

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# dependencies
44
/node_modules
5+
package-lock.json
56
# testing
67
/coverage
78
*.code-snippets

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Define a imagem base
2-
FROM node:14-alpine
2+
FROM node:20-alpine
33
# Set the working directory to /app
44
WORKDIR /app
55
# Copy the package.json and yarn.lock files to the container

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
"@vitejs/plugin-react": "^4.5.0",
174174
"@vitest/ui": "3.2.2",
175175
"babel-jest": "^29.7.0",
176+
"baseline-browser-mapping": "^2.9.17",
176177
"cross-env": "^5.2.1",
177178
"eslint": "^8.57.1",
178179
"eslint-config-prettier": "^5.1.0",
@@ -189,6 +190,7 @@
189190
"joi-browser": "^13.4.0",
190191
"jsdom": "^26.1.0",
191192
"lint-staged": "^16.1.5",
193+
"mdn-data": "^2.26.0",
192194
"msw": "^2.10.4",
193195
"prettier": "^1.19.1",
194196
"redux-mock-store": "^1.5.4",

public/index.css

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* public/index.css */
2+
13
#root {
24
background-color: #ffffff;
35
}
@@ -179,3 +181,95 @@ body:not(.dark-mode) textarea {
179181
transform: translateY(-4px);
180182
opacity: 0.9;
181183
}
184+
185+
/* Allow the page content to scroll horizontally */
186+
.container-fluid {
187+
overflow-x: auto;
188+
}
189+
190+
/* Hide the horizontal scrollbar */
191+
.container-fluid::-webkit-scrollbar {
192+
display: none;
193+
}
194+
195+
/* Explicit targeting for all input types and selects */
196+
body.dark-mode .form-control,
197+
body.bm-dashboard-dark .form-control,
198+
body.dark-mode select,
199+
body.bm-dashboard-dark select,
200+
body.dark-mode input[type="text"] {
201+
background-color: #1e293b !important;
202+
color: #ffffff !important;
203+
border: 1px solid #334155 !important;
204+
}
205+
206+
/* Fix for the Project and Tool dropdown arrows and internal padding */
207+
body.dark-mode select.form-control,
208+
body.bm-dashboard-dark select.form-control {
209+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
210+
background-repeat: no-repeat !important;
211+
background-position: right 0.75rem center !important;
212+
background-size: 16px 12px !important;
213+
}
214+
215+
body.dark-mode .form-control::placeholder {
216+
color: #94a3b8 !important;
217+
}
218+
219+
body.dark-mode option,
220+
body.bm-dashboard-dark option {
221+
background-color: #1e293b !important;
222+
color: #ffffff !important;
223+
}
224+
225+
body.dark-mode .modal-content,
226+
body.bm-dashboard-dark .modal-content {
227+
background-color: #1b2a41 !important;
228+
border: 1px solid #2e3d55 !important;
229+
color: #ffffff !important;
230+
}
231+
232+
body.dark-mode .modal-header,
233+
body.dark-mode .modal-body,
234+
body.dark-mode .modal-footer,
235+
body.bm-dashboard-dark .modal-header,
236+
body.bm-dashboard-dark .modal-body,
237+
body.bm-dashboard-dark .modal-footer {
238+
background-color: #1b2a41 !important;
239+
color: #ffffff !important;
240+
border-color: #2e3d55 !important;
241+
}
242+
243+
body.dark-mode .form-control,
244+
body.dark-mode select,
245+
body.dark-mode input {
246+
background-color: #1e293b !important;
247+
color: #ffffff !important;
248+
border: 1px solid #334155 !important;
249+
}
250+
251+
body.dark-mode select.form-control {
252+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
253+
}
254+
255+
body.dark-mode .modal-header,
256+
body.bm-dashboard-dark .modal-header {
257+
background-color: #24344d !important;
258+
border-bottom: 1px solid #334155 !important;
259+
color: #ffffff !important;
260+
padding: 1rem 1.5rem;
261+
}
262+
263+
body.dark-mode .modal-title,
264+
body.bm-dashboard-dark .modal-title {
265+
font-weight: 600;
266+
letter-spacing: 0.5px;
267+
}
268+
269+
body.dark-mode .modal-content .table thead th {
270+
background-color: #2d3d5a !important;
271+
color: #ffffff !important;
272+
border-bottom: 2px solid #334155 !important;
273+
font-size: 0.85rem;
274+
letter-spacing: 1px;
275+
}

src/actions/allTeamsAction.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ export const updateTeamMemeberVisibility = (teamId, userId, visibility) => {
251251
.catch(error => {
252252
if (error.response) {
253253
// The request was made and the server responded with a status code
254-
toast.error('Error updating visibility:', error.response.data);
254+
const msg =
255+
error.response?.data?.message ||
256+
error.response?.data?.error ||
257+
(typeof error.response?.data === 'string' ? error.response.data : 'Unknown error');
258+
toast.error(`Error updating visibility: ${msg}`);
255259
} else if (error.request) {
256260
// The request was made but no response was received
257261
toast.error('Error updating visibility: No response received');

src/actions/blueSquareEmailBCCAction.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ export const deleteBlueSquareEmailAssignement = id => {
6161
try {
6262
const response = await axios.delete(url);
6363
if (response.status === 200) {
64-
toast.info(response.data);
64+
const msg =
65+
typeof response.data === 'string'
66+
? response.data
67+
: response.data?.message || JSON.stringify(response.data);
68+
toast.info(msg);
6569
dispatch(deleteBlueSquareEmailBcc(response.data.id));
6670
} else {
6771
dispatch(blueSquareEmailBccError(response.data));

src/actions/rolePermissionPresets.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const createNewPreset = newPreset => {
4646
}
4747
return 0;
4848
} catch (error) {
49-
toast.error(error);
49+
toast.error(error?.message || String(error));
5050
return 1;
5151
}
5252
};
@@ -60,7 +60,7 @@ export const updatePresetById = updatedPreset => {
6060
dispatch(updatePreset(updatedPreset));
6161
}
6262
} catch (err) {
63-
toast.info(err);
63+
toast.info(err?.message || String(err));
6464
}
6565
};
6666
};
@@ -75,7 +75,7 @@ export const deletePresetById = presetId => {
7575
}
7676
return 1;
7777
} catch (error) {
78-
toast.info(error);
78+
toast.info(error?.message || String(error));
7979
return 1;
8080
}
8181
};

src/actions/task.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export const deleteChildrenTasks = taskId => {
190190
try {
191191
await axios.post(ENDPOINTS.DELETE_CHILDREN(taskId));
192192
} catch (error) {
193-
toast.info(error);
193+
toast.info(error?.message || String(error));
194194
}
195195
};
196196
};
@@ -257,7 +257,7 @@ export const updateTask = (taskId, updatedTask, hasPermission, prevTask) => asyn
257257
}
258258
} catch (error) {
259259
// dispatch(fetchTeamMembersTaskError());
260-
toast.info(error);
260+
toast.info(error?.message || String(error));
261261
status = 400;
262262
}
263263
// TODO: DISPATCH TO TASKEDITSUGGESETIONS REDUCER TO UPDATE STATE

0 commit comments

Comments
 (0)