Skip to content

Commit 94cc220

Browse files
fix: resolving merge conflicts and now pushing the code for the final merge
2 parents c367f5b + 2281ca6 commit 94cc220

252 files changed

Lines changed: 17911 additions & 6217 deletions

File tree

Some content is hidden

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

index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
To create a production bundle, use `npm run build` or `yarn build`.
3838
-->
3939
<script type="module" src="/src/index.jsx"></script>
40-
<a class="top" href="#">Back to Top ↑</a>
40+
<a class="back-to-top" href="#" aria-label="Back to top">
41+
42+
</a>
4143
</body>
4244
</html>

package-lock.json

Lines changed: 25 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@react-leaflet/core": "^2.1.0",
3030
"@reduxjs/toolkit": "^2.4.0",
3131
"@sentry/browser": "^9.15.0",
32-
"@tanstack/react-query": "^5.90.3",
32+
"@tanstack/react-query": "^5.90.16",
3333
"@tinymce/miniature": "^6.0.0",
3434
"@tinymce/tinymce-react": "^6.1.0",
3535
"ajv": "^8.0.0",
@@ -54,7 +54,7 @@
5454
"date-fns": "^2.14.0",
5555
"date-fns-tz": "^2.0.1",
5656
"dayjs": "^1.11.13",
57-
"diff": "^5.0.0",
57+
"diff": "^8.0.3",
5858
"dompurify": "^3.2.5",
5959
"elliptic": "^6.6.1",
6060
"font-awesome": "^4.7.0",
@@ -65,7 +65,7 @@
6565
"html2canvas": "^1.4.1",
6666
"jest": "^30.2.0",
6767
"jquery": "^3.7.1",
68-
"jspdf": "^3.0.3",
68+
"jspdf": "^4.0.0",
6969
"jwt-decode": "^2.2.0",
7070
"leaflet": "^1.9.4",
7171
"leaflet.heat": "^0.2.0",
@@ -206,4 +206,4 @@
206206
],
207207
"**/*.{css,scss,sass}": "stylelint"
208208
}
209-
}
209+
}

public/index.css

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,6 @@ body.bm-dashboard-dark .nav-link {
242242
color: #ffffff !important;
243243
}
244244

245-
body.dark-mode .navbar,
246-
body.bm-dashboard-dark .navbar {
247-
background-color: #1b2a41 !important;
248-
}
249245

250246
body.dark-mode .navbar-brand,
251247
body.bm-dashboard-dark .navbar-brand {
@@ -329,11 +325,33 @@ body.bm-dashboard-dark .page-item.active .page-link {
329325
}
330326

331327
/* Fix the position of the header at the top */
332-
.top {
333-
position: fixed;
334-
right: 10px;
335-
bottom: 10px;
336-
}
328+
.back-to-top {
329+
position: fixed;
330+
bottom: 24px;
331+
right: 24px;
332+
333+
width: 48px;
334+
height: 48px;
335+
336+
display: flex;
337+
align-items: center;
338+
justify-content: center;
339+
340+
background-color: #2A1B3D;
341+
color: #ffffff;
342+
343+
border-radius: 50%;
344+
font-size: 22px;
345+
text-decoration: none;
346+
347+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
348+
z-index: 1000;
349+
}
350+
351+
.back-to-top:hover {
352+
transform: translateY(-4px);
353+
opacity: 0.9;
354+
}
337355

338356
/* Allow the page content to scroll horizontally */
339357
.container-fluid {
@@ -343,4 +361,9 @@ body.bm-dashboard-dark .page-item.active .page-link {
343361
/* Hide the horizontal scrollbar */
344362
.container-fluid::-webkit-scrollbar {
345363
display: none;
346-
}
364+
}
365+
366+
.tab-content {
367+
background-color: transparent;
368+
border: none;
369+
}

src/actions/__tests__/userManagement.test.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const mockStore = configureMockStore(middlewares);
1414

1515
describe('User Management Actions', () => {
1616
let store;
17-
17+
1818
beforeEach(() => {
1919
store = mockStore({});
2020
vi.clearAllMocks();
@@ -46,7 +46,7 @@ describe('User Management Actions', () => {
4646

4747
it('should update user to active status', async () => {
4848
const reactivationDate = null;
49-
49+
5050
axios.patch.mockResolvedValueOnce({ data: {} });
5151

5252
await store.dispatch(actions.updateUserStatus(mockUser, UserStatus.Active, reactivationDate));
@@ -143,7 +143,7 @@ describe('User Management Actions', () => {
143143
);
144144
});
145145

146-
146+
147147
});
148148

149149
describe('updateUserFinalDayStatus', () => {
@@ -205,6 +205,7 @@ describe('User Management Actions', () => {
205205
{ id: 1, name: 'John Doe', email: 'john@example.com' },
206206
{ id: 2, name: 'Jane Smith', email: 'jane@example.com' }
207207
];
208+
const mockSource = 'Report';
208209

209210
axios.get.mockResolvedValueOnce({ data: mockBasicInfo });
210211

@@ -213,20 +214,20 @@ describe('User Management Actions', () => {
213214
{ type: 'RECEIVE_USER_PROFILE_BASIC_INFO', payload: mockBasicInfo }
214215
];
215216

216-
await store.dispatch(actions.getUserProfileBasicInfo());
217+
await store.dispatch(actions.getUserProfileBasicInfo({source: mockSource}));
217218
expect(store.getActions()).toEqual(expectedActions);
218-
expect(axios.get).toHaveBeenCalledWith(ENDPOINTS.USER_PROFILE_BASIC_INFO);
219+
expect(axios.get).toHaveBeenCalledWith(ENDPOINTS.USER_PROFILE_BASIC_INFO(mockSource));
219220
});
220221

221222
it('should handle errors when fetching basic info', async () => {
222223
axios.get.mockRejectedValueOnce(new Error('Network error'));
223-
224+
const mockSource = '';
224225
const expectedActions = [
225226
{ type: 'FETCH_USER_PROFILE_BASIC_INFO' },
226227
{ type: 'FETCH_USER_PROFILE_BASIC_INFO_ERROR' }
227228
];
228229

229-
await store.dispatch(actions.getUserProfileBasicInfo());
230+
await store.dispatch(actions.getUserProfileBasicInfo({ source: mockSource }));
230231
expect(store.getActions()).toEqual(expectedActions);
231232
});
232233
});
@@ -276,4 +277,4 @@ describe('User Management Actions', () => {
276277
expect(store.getActions()).toContainEqual(expectedAction);
277278
});
278279
});
279-
});
280+
});

src/actions/authActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import jwtDecode from 'jwt-decode';
22
import axios from 'axios';
33
import httpService from '../services/httpService';
44
import config from '../config.json';
5-
import { ENDPOINTS } from '~/utils/URL';
5+
import { ENDPOINTS } from '../utils/URL';
66
import { GET_ERRORS } from '../constants/errors';
77
import {
88
SET_CURRENT_USER,

src/actions/bmdashboard/projectActions.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ export const fetchBMProjects = () => {
3030
});
3131
};
3232
};
33+
34+
export const getProjectGlobalDistribution = async (payload) => {
35+
const url = ENDPOINTS.PROJECT_GLOBAL_DISTRIBUTION
36+
37+
const res = await axios.get(url, {params: payload});
38+
39+
return res.data
40+
};

0 commit comments

Comments
 (0)