Skip to content

Commit

Permalink
feat(eig): hide eigs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminDNUM committed Dec 6, 2024
1 parent 80603ee commit 6309224
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ app.use(`/hebergement`, routes.hebergement);
app.use(`/siret`, routes.siret);
app.use(`/documents`, routes.documents);
app.use(`/geo`, routes.geo);
app.use(`/eig`, routes.eig);
//app.use(`/eig`, routes.eig);
app.use(`/message`, routes.message);
app.use(`/territoire`, routes.territoire);
app.use(`/healthz`, routes.healthz);
Expand Down
16 changes: 8 additions & 8 deletions packages/frontend-bo/src/composables/useMenuNavItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ export const useMenuNavItems = () => {
},
]
: []),
...(roles.includes("eig")
? [
{
text: "EIG",
to: "/eig",
},
]
: []),
/* ...(roles.includes("eig")
? [
{
text: "EIG",
to: "/eig",
},
]
: []),*/
];
});

Expand Down
13 changes: 13 additions & 0 deletions packages/frontend-bo/src/middleware/redirect-eig.global.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// TODO(eig): To remove when eig is ready

import { logger } from "#imports";
import { defineNuxtRouteMiddleware, navigateTo } from "#app";

const log = logger("middleware/check-role");

export default defineNuxtRouteMiddleware(async (to) => {
if (to.path.match("/eig")) {
return navigateTo("/connexion", { redirectCode: 301 });
}
log.i("DONE");
});
4 changes: 2 additions & 2 deletions packages/frontend-bo/src/pages/sejours/[declarationId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ const tabs = [
tabId: "tabpanel-messagerie",
href: "messagerie",
},
{
/*{
label: "EIG",
tabPanelId: "tabpanel-eig-panel",
tabId: "tabpanel-eig",
href: "eig",
},
},*/
];
const defaultTab = tabs.findIndex(({ href }) => route.name.includes(href));
Expand Down
26 changes: 13 additions & 13 deletions packages/frontend-usagers/src/composables/useMenuNavItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ export const useMenuNavItems = () => {
text: "Mes hébergements",
to: "/hebergements/liste",
},
{
title: "EIG",
links: [
{
text: "Mes EIG",
to: "/eig/liste",
},
{
text: "Créer un EIG",
to: "/eig",
},
],
},
/* {
title: "EIG",
links: [
{
text: "Mes EIG",
to: "/eig/liste",
},
{
text: "Créer un EIG",
to: "/eig",
},
],
},*/
];
});
};
13 changes: 13 additions & 0 deletions packages/frontend-usagers/src/middleware/redirect-eig.global.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// TODO(eig): To remove when eig is ready

import { logger } from "#imports";
import { defineNuxtRouteMiddleware, navigateTo } from "#app";

const log = logger("middleware/check-role");

export default defineNuxtRouteMiddleware(async (to) => {
if (to.path.match("/eig")) {
return navigateTo("/connexion", { redirectCode: 301 });
}
log.i("DONE");
});
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,15 @@ const tabTitles = computed(() => [
},
]
: []),
...(sejourId.value
? [
{
title: "EIG",
tabId: "declaration-sejour-tab-4",
panelId: "declaration-sejour-content-4",
},
]
: []),
/* ...(sejourId.value
? [
{
title: "EIG",
tabId: "declaration-sejour-tab-4",
panelId: "declaration-sejour-content-4",
},
]
: []),*/
]);
const sommaireOptions = demandeSejourMenus
Expand Down

0 comments on commit 6309224

Please sign in to comment.