Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
88de932
Customise to CAMU
edarchis Sep 11, 2023
bb2c77f
Add graphqlMutationLegacy() for sync call
edarchis Sep 25, 2023
7f0205b
component changes
RishavWtt Sep 26, 2023
28d9fff
style cahnges
RishavWtt Sep 30, 2023
26b4429
add checkbox color
RishavWtt Oct 5, 2023
6ca79e8
OP-1481: change type of number inputs, hide up/down arrow keys (#148)
olewandowski1 Aug 23, 2023
67f3132
hide version and help icon
RishavWtt Oct 22, 2023
c87024c
translation
RishavWtt Oct 22, 2023
e62f430
french locallization
RishavWtt Oct 23, 2023
4c69b1d
loginpage
rajatsharma-wtt Oct 26, 2023
bb79666
forgot password screen ui change
rajatsharma-wtt Oct 26, 2023
5209661
Changes for insuree status
ankitkumar774 Oct 27, 2023
dd94725
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
ankitkumar774 Oct 27, 2023
ba59064
background image changes
rajatsharma-wtt Oct 27, 2023
83fbe6f
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
rajatsharma-wtt Oct 27, 2023
9dedd52
background changes
rajatsharma-wtt Oct 27, 2023
8832995
commit form
RishavWtt Oct 28, 2023
866322a
status changedbtton access
ankitkumar774 Oct 28, 2023
9ef86ad
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
ankitkumar774 Oct 28, 2023
e3f302b
change logic of buttons
ankitkumar774 Oct 29, 2023
294eeb3
login screen, forgotpassword ui changes
rajatsharma-wtt Oct 31, 2023
944138d
tab label change
rajatsharma-wtt Nov 1, 2023
e927168
LoginPage Title, save button icon
rajatsharma-wtt Nov 2, 2023
7e56fd4
date picker localisation changes
ankitkumar774 Nov 3, 2023
e02a855
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
ankitkumar774 Nov 3, 2023
c44e2c4
changes in local storage
ankitkumar774 Nov 3, 2023
c24b98e
theme changes
RishavWtt Nov 6, 2023
9879423
localization
rajatsharma-wtt Nov 7, 2023
2e928e9
JournalDrawer Scroll Bar changes
rajatsharma-wtt Nov 9, 2023
cfad627
disble email and print button when popup appears
RishavWtt Nov 9, 2023
015cd71
Rework and PEnding approval changes
ankitkumar774 Nov 13, 2023
55a5ec9
setPasswordScreen UI Change
rajatsharma-wtt Nov 14, 2023
094d95e
Change Date formate
rajatsharma-wtt Nov 16, 2023
ced9ea7
add edited
rajatsharma-wtt Nov 18, 2023
4789a8e
change for menu role
ankitkumar774 Nov 19, 2023
350bae9
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
ankitkumar774 Nov 19, 2023
0e4b3de
error boundary changes
ankitkumar774 Nov 27, 2023
b58b8dc
added tooltip and disabled approve
ankitkumar774 Nov 29, 2023
00ec4b1
bed request label changes
rajatsharma-wtt Dec 1, 2023
7bfa835
remove console log
rajatsharma-wtt Dec 1, 2023
6bc398d
status buttons changes
ankitkumar774 Dec 1, 2023
4b91753
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
ankitkumar774 Dec 1, 2023
9fdf4ec
buttons only for waiting for approval
ankitkumar774 Dec 1, 2023
1f36c9e
idle logout implementation
ankitkumar774 Dec 4, 2023
2362aa3
text capitalize added
ankitkumar774 Dec 6, 2023
246c53b
changes of idle timeout variable
ankitkumar774 Dec 7, 2023
80f480f
API integration to check assignedprofile before logout
ankitkumar774 Dec 8, 2023
8c22ef8
idle timeout in variable
ankitkumar774 Dec 11, 2023
c878320
enable approver role based button
ankitkumar774 Dec 14, 2023
a4f1a35
eye icon to show/hide password
ankitkumar774 Dec 26, 2023
fd42db7
date picker changes for months and year
ankitkumar774 Jan 8, 2024
8ad8cff
changes in searcher for reset
ankitkumar774 Jan 10, 2024
887e9c4
add bg color
RishavWtt Jan 15, 2024
04bb0f2
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
RishavWtt Jan 15, 2024
67aa62b
paymentApprove button
ankitkumar774 Jan 16, 2024
9937581
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
ankitkumar774 Jan 16, 2024
6b5afb4
added common snackbar
ankitkumar774 Jan 17, 2024
ffc93b8
get current username
ankitkumar774 Jan 19, 2024
484bc8f
change style
RishavWtt Jan 25, 2024
4511e0e
add state in onChangeFilter
RishavWtt Feb 13, 2024
6ae6180
add button
RishavWtt Mar 5, 2024
b0b2d48
changed userID from reducer
ankitkumar774 Mar 6, 2024
e0d086d
correction in logout
ankitkumar774 Mar 6, 2024
7fcac88
logout issue resolved
ankitkumar774 Mar 6, 2024
f031297
Form save button disable and enable
ankitkumar774 Mar 27, 2024
704d41d
tooltip label changes
ankitkumar774 Apr 4, 2024
cbbb81d
update payment button
RishavWtt Apr 16, 2024
3fe9116
udate on form
RishavWtt Apr 16, 2024
30c0cb5
add rework button
RishavWtt May 13, 2024
78e4694
add paid button
RishavWtt May 21, 2024
6911d4f
add rework tooltip
RishavWtt May 25, 2024
a3f8bca
add status check
RishavWtt Jun 10, 2024
1b55278
add XAF and Date Picker changes
RishavWtt Jun 14, 2024
95a09c2
update localization
RishavWtt Jun 24, 2024
6cced97
change in form for payment approval
ankitkumar774 Jun 24, 2024
6c817fd
Merge branch 'akieni' into release/test
ankitkumar774 Jun 24, 2024
60401f6
Merge branch 'release/test' into akieni
RishavWtt Jul 4, 2024
99af77d
Merge branch 'akieni' into release/test
ankitkumar774 Jul 16, 2024
37a5b86
udate form
RishavWtt Jul 23, 2024
eb0fbdf
change button style
RishavWtt Jul 23, 2024
0d0dc0a
update form
RishavWtt Jul 23, 2024
181cc39
add hfid in localstorage
RishavWtt Aug 5, 2024
f1dfadb
notification logic on frontend
ankitkumar774 Aug 13, 2024
2cfc909
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
ankitkumar774 Aug 14, 2024
1be9931
Merge branch 'akieni' into release/test
RishavWtt Aug 20, 2024
ca581a2
notification on scroll call API
ankitkumar774 Aug 22, 2024
d30ca49
changes
richa-rathoreee Aug 23, 2024
84b60b6
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
richa-rathoreee Aug 23, 2024
f8f2ade
Merge branch 'akieni' into release/test
richa-rathoreee Aug 23, 2024
fac0bfe
Merge branch 'release/test' of https://github.com/Akieni-Yao/openimis…
richa-rathoreee Aug 23, 2024
44741a4
add check for fosacategory limit
RishavWtt Aug 29, 2024
4dfb838
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
RishavWtt Aug 29, 2024
97038c1
notification CSS correction
ankitkumar774 Aug 30, 2024
84f8aac
craete time picker component
RishavWtt Sep 5, 2024
182e69a
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
RishavWtt Sep 5, 2024
e6f6707
Merge branch 'akieni' into release/test
ankitkumar774 Sep 13, 2024
73528df
changes btn
richa-rathoreee Oct 1, 2024
5936b5c
Merge branch 'akieni' of https://github.com/Akieni-Yao/openimis-fe-co…
richa-rathoreee Oct 1, 2024
0482100
Merge pull request #1 from Akieni-Yao/akieni
danielchuh Oct 22, 2024
7015e0c
feature current title menu and page
hktom Oct 30, 2024
b909a04
underline current menu
hktom Oct 30, 2024
3685efc
menu-and-title
hktom Nov 6, 2024
27da16a
Merge pull request #2 from Akieni-Yao/feature/current_menu_indicator
danielchuh Nov 6, 2024
3f1f5d1
Merge pull request #3 from Akieni-Yao/akieni
danielchuh Nov 6, 2024
0afd30d
remove back project
hktom Mar 3, 2025
6332217
Merge pull request #4 from Akieni-Yao/feature/hide-header-navigation-…
danielchuh Mar 4, 2025
133fa64
feature/new-reset-pages
hktom Mar 12, 2025
441e09b
fix update query
hktom Mar 12, 2025
8852370
fix response
hktom Mar 12, 2025
12be83f
reset password
hktom Mar 12, 2025
86e56c3
reset and forgot password
hktom Mar 12, 2025
f6cd26d
Merge pull request #7 from Akieni-Yao/feature/new-reset-pages
danielchuh Mar 13, 2025
d6cd5d0
fix traduction reset password
hktom Apr 16, 2025
2a5077e
Merge pull request #9 from Akieni-Yao/feat/translate-login-reset-page
danielchuh Apr 16, 2025
e13cecb
add useMask props
hktom Apr 24, 2025
1e419a7
fix: remember behavior
glody007 Apr 25, 2025
9d157b6
Merge pull request #11 from Akieni-Yao/fix/remember-me
danielchuh Apr 25, 2025
1721ecd
Merge pull request #14 from Akieni-Yao/feat/add-mask-in-numberInput
danielchuh Apr 25, 2025
900ff14
feat: add cookie management for JWT in App and RequireAuth components
hktom Sep 22, 2025
499c215
Merge pull request #16 from Akieni-Yao:feat/get-token-from-url-imis
hktom Sep 22, 2025
965ddd0
fix: prevent overwriting userLanguage in localStorage
hktom Sep 22, 2025
8bdfbdc
feat: manage menu navigation visibility in localStorage based on quer…
hktom Sep 22, 2025
f358fd8
Merge pull request #17 from Akieni-Yao:feat/add-default-select-language
hktom Sep 22, 2025
9e48c26
refactor: update conditional rendering for payment approval and visib…
hktom Sep 23, 2025
cf58968
Merge pull request #18 from Akieni-Yao:feat/hide-approve-button-on-hi…
hktom Sep 25, 2025
78cfa7c
add condition
hktom Nov 10, 2025
f041627
format value from props
hktom Nov 10, 2025
05628fc
Merge pull request #20 from Akieni-Yao:feat/add-condition-traduction-…
hktom Nov 10, 2025
56693d0
fix: update title in routes for medical services
sancty007 Nov 17, 2025
9bbc8ab
fix: correct title in routes for medical services
sancty007 Nov 17, 2025
7ae84f3
fix: update title in routes for medical services
sancty007 Nov 21, 2025
19a101f
fix: correct title in routes for medical services
sancty007 Nov 21, 2025
f9c9abb
fix: update titles in routes for medical services to correct French t…
sancty007 Nov 21, 2025
4da4a78
Merge pull request #21 from Akieni-Yao/feat/rename-panier-paquet
hktom Nov 24, 2025
d01f651
fix: update French translations in medical services routes
hktom Dec 16, 2025
58b54ff
refactor: update import path for useGedHealthCheck and integrate GedA…
hktom Dec 16, 2025
30872e6
fix: correct logic for GED service status and add debug logs in GedAl…
hktom Dec 16, 2025
7be869a
refactor: simplify GedAlertBanner by removing unnecessary elements an…
hktom Dec 16, 2025
c490cae
Merge pull request #24 from Akieni-Yao:feat/add-ged-health-check
hktom Dec 16, 2025
0003199
fix: update health status logic in useGedHealthCheck to handle stored…
hktom Dec 16, 2025
df1edf5
refactor: remove margin from GedAlertBanner and ensure consistent ren…
hktom Dec 16, 2025
b6b326f
Merge pull request #25 from Akieni-Yao:feat/handle-already-session-ge…
hktom Dec 16, 2025
920e83a
refactor: reorganize MainMenuContribution component and enhance route…
sancty007 Dec 18, 2025
9f3815a
feat: add health service management route to Fosa section
chrismoussounda Dec 22, 2025
b5dd815
Merge pull request #28 from Akieni-Yao/feature/add-health-service-man…
hktom Dec 22, 2025
8afdbed
Merge branch 'develop' into feat/ims-page-headers-and-menu-highlights
hktom Dec 22, 2025
2ccb760
style: enhance button and menu item transitions for improved user exp…
sancty007 Dec 22, 2025
111cc02
Merge branch 'feat/ims-page-headers-and-menu-highlights' of https://g…
sancty007 Dec 22, 2025
7d9af9e
refactor: remove unused GraphQL mutation for user verification and pa…
hktom Dec 22, 2025
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ It is dedicated to be deployed as a module of [openimis-fe_js](https://github.co
- `Searcher`: generic searcher page (with criteria form and result table)
- `Form`: generic form. Manage dirty state, displays add/save button,...
- `Table`: generic table. Headers (with -sort-actions), rows,...
- `CommonSnackbar`: generic snackbar. Display banner based on response

## Helpers

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "rollup -c",
"start": "rollup -c -w",
"format": "prettier src -w",
"prepare":"npm run build"
"prepare": "npm run build"
},
"peerDependency": {
"react-intl": "^5.8.1",
Expand Down Expand Up @@ -50,7 +50,9 @@
"src"
],
"dependencies": {
"cookie_js": "^1.4.2",
"history": "^5.2.0",
"react-idle-timer": "^5.7.2",
"react-router": "^5.2.1",
"react-router-dom": "^5.2.1"
}
Expand Down
137 changes: 129 additions & 8 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
formatGQLString,
formatMutation,
formatServerError,
decodeId,
} from "./helpers/api";

const ROLE_FULL_PROJECTION = () => [
Expand All @@ -28,8 +29,8 @@ const LANGUAGE_FULL_PROJECTION = () => ["name", "code", "sortOrder"];
const MODULEPERMISSION_FULL_PROJECTION = () => ["modulePermsList{moduleName, permissions{permsName, permsValue}}"];

function getApiUrl() {
let _baseApiUrl = process.env.REACT_APP_API_URL ?? '/api';
if (_baseApiUrl.indexOf('/') !== 0) {
let _baseApiUrl = process.env.REACT_APP_API_URL ?? "/api";
if (_baseApiUrl.indexOf("/") !== 0) {
_baseApiUrl = `/${_baseApiUrl}`;
}
return _baseApiUrl;
Expand All @@ -39,6 +40,7 @@ export const baseApiUrl = getApiUrl();

export function apiHeaders() {
let headers = {
// "ngrok-skip-browser-warning": "true",
"Content-Type": "application/json",
};
return headers;
Expand Down Expand Up @@ -147,7 +149,7 @@ export function prepareMutation(operation, input, params = {}) {
return { operation, variables, clientMutationId: params.clientMutationId };
}

export function waitForMutation(clientMutationId) {
export function waitForMutation(clientMutationId, additionalRequest = "") {
return async (dispatch) => {
let attempts = 0;
let res;
Expand All @@ -166,6 +168,7 @@ export function waitForMutation(clientMutationId) {
clientMutationId
jsonContent
error
${additionalRequest}
}
}
}
Expand All @@ -186,7 +189,14 @@ export function waitForMutation(clientMutationId) {
};
}

export function graphqlMutation(mutation, variables, type = "CORE_TRIGGER_MUTATION", params = {}, wait = true) {
export function graphqlMutation(
mutation,
variables,
type = "CORE_TRIGGER_MUTATION",
params = {},
wait = true,
additionalRequest = "",
) {
let clientMutationId;
if (variables?.input) {
clientMutationId = uuid.uuid();
Expand All @@ -197,11 +207,51 @@ export function graphqlMutation(mutation, variables, type = "CORE_TRIGGER_MUTATI
if (clientMutationId) {
dispatch(fetchMutation(clientMutationId));
if (wait) {
return dispatch(waitForMutation(clientMutationId));
return dispatch(waitForMutation(clientMutationId, additionalRequest));
} else {
return response?.payload?.data;
}
}
};
}

export function graphqlMutation2(
mutation,
variables,
type = "CORE_TRIGGER_MUTATION",
params = {},
wait = true,
additionalRequest = "",
) {
let clientMutationId;
if (variables?.input) {
clientMutationId = uuid.uuid();
variables.input.clientMutationId = clientMutationId;
}
return async (dispatch) => {
const response = await dispatch(graphqlWithVariables(mutation, variables, type, params));
return response?.payload?.data;
};
}

export function graphqlMutationLegacy(
payload,
type = "CORE_TRIGGER_MUTATION",
params = {},
wait = true,
additionalRequest = "",
) {
if (wait && !params.clientMutationId) {
console.error("graphqlMutationLegacy cannot wait with a specified clientMutationId");
}
return async (dispatch) => {
const response = await dispatch(graphql(payload, type, params));
dispatch(fetchMutation(params.clientMutationId));
if (wait) {
return dispatch(waitForMutation(params.clientMutationId, additionalRequest));
} else {
return response?.payload?.data;
}
return response;
};
}
Expand All @@ -212,6 +262,7 @@ export function fetch(config) {
[RSAA]: {
...config,
headers: {
// "ngrok-skip-browser-warning": "true",
"Content-Type": "application/json",
...config.headers,
},
Expand Down Expand Up @@ -245,6 +296,12 @@ export function login(credentials) {
await dispatch(refreshAuthToken());
}
const action = await dispatch(loadUser());
localStorage.setItem("userName", action?.payload?.username);
if (!localStorage.getItem("userLanguage")) {
localStorage.setItem("userLanguage", action?.payload?.i_user?.language);
}
localStorage.setItem("userId", action?.payload?.id);
localStorage.setItem("HfId", action?.payload?.i_user?.health_facility_id);
return action.type !== "CORE_AUTH_ERR";
};
}
Expand Down Expand Up @@ -289,10 +346,23 @@ export function logout() {
}
`;
await dispatch(graphqlMutation(mutation, {}));
localStorage.removeItem("userLanguage");
localStorage.removeItem("userId");
return dispatch({ type: "CORE_AUTH_LOGOUT" });
};
}

export function CheckAssignedProfile(userID) {
const mutation = `mutation CheckAssignedProfiles {
checkAssignedProfiles(userId:"${userID}") {
status
}
}
`;
return graphql(mutation, "CHECK_ASSIGNED_PROFILE", {});
}
// }

export function fetchMutation(clientMutationId) {
const payload = formatPageQuery(
"mutationLogs",
Expand Down Expand Up @@ -449,12 +519,63 @@ export function roleNameSetValid() {

export function saveCurrentPaginationPage(page, afterCursor, beforeCursor, module) {
return (dispatch) => {
dispatch({ type: "CORE_PAGINATION_PAGE", payload: { page, afterCursor, beforeCursor, module} });
dispatch({ type: "CORE_PAGINATION_PAGE", payload: { page, afterCursor, beforeCursor, module } });
};
}

export function clearCurrentPaginationPage() {
return (dispatch) => {
dispatch({ type: "CORE_PAGINATION_PAGE_CLEAR" })
}
dispatch({ type: "CORE_PAGINATION_PAGE_CLEAR" });
};
}

export function fetchNotification(userID, first = 10) {
return graphql(
` query CamuNotifications {
camuNotifications(first: ${first}, user_Id: "${userID}") {
totalCount
edgeCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
title
module
message
isRead
createdAt
redirectUrl
}
}
}
}
`,
"CORE_NOTIFICATION_LIST",
);
}

function formatNotificationGQL(data) {
return `
${!!data.userId ? `userId: "${data.userId}"` : ""}
${!!data.readAll ? `readAll: ${data.readAll}` : ""}
${!!data.id ? `notificationId: "${decodeId(data.id)}"` : ""}
`;
}

export function markNotificationAsRead(data, clientMutationLabel) {
let mutation = `mutation MarkNotificationAsRead {
markNotificationAsRead(${formatNotificationGQL(data)}) {
success
}
}`;
// let mutation = formatMutation("markNotificationAsRead ", formatNotificationGQL(data), clientMutationLabel);
var requestedDateTime = new Date();
return graphql(mutation, ["CORE_ROLE_MUTATION_REQ", "CORE_CREATE_NOTIFICATION_RESP", "CORE_ROLE_MUTATION_ERR"], {
clientMutationLabel,
});
}
6 changes: 6 additions & 0 deletions src/components/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@
transform: rotate(360deg);
}
}

.MuiMenuItem-root,
.MuiListItem-button,
.MuiButton-root {
transition: background-color 0.3s ease !important;
}
43 changes: 41 additions & 2 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ import LoginPage from "../pages/LoginPage";
import { useAuthentication } from "../helpers/hooks";
import ForgotPasswordPage from "../pages/ForgotPasswordPage";
import SetPasswordPage from "../pages/SetPasswordPage";
import VerifyUserAndUpdatePasswordPage from "../pages/VerifyUserAndUpdatePasswordPage";
import { ErrorBoundary } from "@openimis/fe-core";
import cookie from "cookie_js";
import { useLocation } from "react-router-dom";
// import { useQuery } from "./RequireAuth";

export const ROUTER_CONTRIBUTION_KEY = "core.Router";
export const UNAUTHENTICATED_ROUTER_CONTRIBUTION_KEY = "core.UnauthenticatedRouter";
Expand All @@ -33,6 +37,20 @@ const styles = () => ({
},
});

export const getParamsFromUrl = () => {
const params = {};
const queryString = window.location.search; // e.g. "?id=123&name=Tom"

if (queryString) {
const urlParams = new URLSearchParams(queryString);
for (const [key, value] of urlParams.entries()) {
params[key] = value;
}
}

return params;
};

const App = (props) => {
const {
history,
Expand All @@ -48,6 +66,7 @@ const App = (props) => {
...others
} = props;

const query = getParamsFromUrl();
const auth = useAuthentication();
const routes = useMemo(() => {
return modulesManager.getContribs(ROUTER_CONTRIBUTION_KEY);
Expand Down Expand Up @@ -77,6 +96,22 @@ const App = (props) => {
return { ...messages, ...msgs };
}, [user?.language, messages]);

useEffect(() => {
if (query["hideMenuNavigation"]) {
localStorage.setItem("hideMenuNavigation", "yes");
} else {
localStorage.removeItem("hideMenuNavigation");
}

if (query["JWT"]) {
cookie.set("JWT", query["JWT"], { path: "/" });
}

if (query["JWT-refresh-token"]) {
cookie.set("JWT-refresh-token", query["JWT-refresh-token"], { path: "/" });
}
}, [query]);

useEffect(() => {
auth.initialize();
if (process.env.NODE_ENV == "development") {
Expand All @@ -95,7 +130,7 @@ const App = (props) => {

return (
<>
<Helmet titleTemplate="%s - openIMIS" defaultTitle="openIMIS" />
<Helmet titleTemplate="%s - CAMU IMS" defaultTitle="CAMU IMS" />
<CssBaseline />
<ModulesManagerProvider value={modulesManager}>
<IntlProvider locale={locale} messages={allMessages}>
Expand All @@ -109,14 +144,18 @@ const App = (props) => {
<Route path={"/login"} render={() => <LoginPage {...others} />} />
<Route path={"/forgot_password"} render={() => <ForgotPasswordPage {...others} />} />
<Route path={"/set_password"} render={() => <SetPasswordPage {...others} />} />
<Route
path={"/verify-user-and-update-password"}
render={() => <VerifyUserAndUpdatePasswordPage {...others} />}
/>
{unauthenticatedRoutes.map((route) => (
<Route
exact
key={route.path}
path={"/" + route.path}
render={(props) => (
<ErrorBoundary>
<route.component modulesManager={modulesManager} {...props} {...others} />
<route.component modulesManager={modulesManager} {...props} {...others} />
</ErrorBoundary>
)}
/>
Expand Down
25 changes: 25 additions & 0 deletions src/components/GedAlertBanner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import { useGedHealthCheck } from "../helpers/hooks/useGedHealthCheck";

export default function GedAlertBanner() {
const { isGedDown, isChecking } = useGedHealthCheck();

if (!isGedDown) return <></>;

return (
<div
style={{
backgroundColor: "#ffcccc",
color: "#900",
textAlign: "center",
padding: "12px 0",
fontWeight: "bold",
fontSize: "14px",
width: "100%",
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
}}
>
{`⚠️ Service GED (DMS) est actuellement indisponible. Veuillez contacter l'équipe technique.`}
</div>
);
}
Loading