diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fd13bbf..63d15c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,6 @@ on: - dev jobs: - deploy-api: runs-on: self-hosted @@ -59,5 +58,7 @@ jobs: VITE_API_URL=${{ github.ref == 'refs/heads/prod' && 'https://integration.utt.fr/api' || 'https://integration.dev.uttnetgroup.fr/api' }} VITE_SERVICE_URL=${{ github.ref == 'refs/heads/prod' && 'https://integration.utt.fr/' || 'https://integration.dev.uttnetgroup.fr/' }} VITE_ANALYTICS_WEBSITE_ID=${{ github.ref == 'refs/heads/prod' && secrets.ANALYTICS_WEBSITE_ID_PROD || secrets.ANALYTICS_WEBSITE_ID_DEV }} + VITE_ROADBOOK_URL_FRENCH=${{ secrets.ROADBOOK_URL_FRENCH }} + VITE_ROADBOOK_URL_ENGLISH=${{ secrets.ROADBOOK_URL_ENGLISH }} tags: | - ${{ secrets.REGISTRY_URL }}/integration/front:${{ github.ref == 'refs/heads/prod' && 'prod' || 'dev' }} \ No newline at end of file + ${{ secrets.REGISTRY_URL }}/integration/front:${{ github.ref == 'refs/heads/prod' && 'prod' || 'dev' }} diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 9c29e08..f81b53e 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -5,12 +5,15 @@ ARG VITE_CAS_LOGIN_URL="https://cas.utt.fr/cas/login" ARG VITE_SERVICE_URL="https://integration.utt.fr/" ARG VITE_API_URL="https://integration.utt.fr/api" ARG VITE_ANALYTICS_WEBSITE_ID="" +ARG VITE_ROADBOOK_URL_FRENCH="" +ARG VITE_ROADBOOK_URL_ENGLISH="" ENV VITE_CAS_LOGIN_URL=${VITE_CAS_LOGIN_URL} ENV VITE_SERVICE_URL=${VITE_SERVICE_URL} ENV VITE_API_URL=${VITE_API_URL} ENV VITE_ANALYTICS_WEBSITE_ID=${VITE_ANALYTICS_WEBSITE_ID} -#localhost:4001 in local version +ENV VITE_ROADBOOK_URL_FRENCH=${VITE_ROADBOOK_URL_FRENCH} +ENV VITE_ROADBOOK_URL_ENGLISH=${VITE_ROADBOOK_URL_ENGLISH} COPY package.json package-lock.json ./ RUN npm install -g npm@latest diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5d4ddc6..2099a37 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -6770,19 +6770,28 @@ "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, "node_modules/react-dom": { "version": "19.1.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", - "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", + "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", + "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/react-dom": { + "version": "19.1.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz", + "integrity": "sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==", "license": "MIT", "dependencies": { "scheduler": "^0.26.0" }, "peerDependencies": { - "react": "^19.1.0" + "react": "^19.1.1" } }, "node_modules/react-hook-form": { @@ -8425,4 +8434,4 @@ } } } -} +} \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 6c6ecff..9a690a9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -54,4 +54,4 @@ "typescript-eslint": "^8.24.1", "vite": "^6.2.0" } -} +} \ No newline at end of file diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 9e038e0..e0d74c9 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -36,6 +36,7 @@ import PrivateRoute from './components/utils/privateroute'; import { GamesPage } from './pages/games'; import { FoodPage } from './pages/food'; import { PlanningsPage } from './pages/plannings'; +import { Roadbook } from './pages/roadbook'; const App: React.FC = () => { @@ -61,6 +62,7 @@ const App: React.FC = () => { } /> } /> } /> + } /> {/* Utilisateurs connectés */} } /> diff --git a/frontend/src/components/Admin/AdminPerm/adminPermAction.tsx b/frontend/src/components/Admin/AdminPerm/adminPermAction.tsx index e44ec01..55593b8 100644 --- a/frontend/src/components/Admin/AdminPerm/adminPermAction.tsx +++ b/frontend/src/components/Admin/AdminPerm/adminPermAction.tsx @@ -32,10 +32,12 @@ const PermanenceActions: React.FC = ({ permanences, onRe }); if (!confirm.isConfirmed) return; + const today = normalizeDate(new Date()).getTime(); const threshold = inSevenDays().getTime(); + const toOpen = permanences.filter((p) => { const permDate = normalizeDate(new Date(p.start_at)).getTime(); - return permDate <= threshold; + return permDate > today && permDate <= threshold && !p.is_open; }); try { diff --git a/frontend/src/components/home/infosSection.tsx b/frontend/src/components/home/infosSection.tsx index d647065..1688e5c 100644 --- a/frontend/src/components/home/infosSection.tsx +++ b/frontend/src/components/home/infosSection.tsx @@ -1,5 +1,7 @@ import { Swiper, SwiperSlide } from "swiper/react"; import { Pagination, Autoplay } from "swiper/modules"; +import { Button } from "../ui/button"; +import { Link } from "react-router-dom"; import "swiper/swiper-bundle.css"; export const Infos = () => { @@ -79,6 +81,20 @@ export const Infos = () => { C'est ici que tu trouveras toutes les informations nécessaires au déroulement de la semaine d'inté. Par exemple, tu pourras prendre ta place pour le WEI ou regarder quelle faction est la plus proche de la victoire.

+ +
+

+ Le Roadbook de l'inté +

+

+ Retrouve ici toutes les informations de l’intégration ! Les plannings, la prévention, les activités, les menus… Tout pour passer des moments incroyables ! +

+ +
diff --git a/frontend/src/components/roadbook/roadbookCard.tsx b/frontend/src/components/roadbook/roadbookCard.tsx new file mode 100644 index 0000000..b209d8a --- /dev/null +++ b/frontend/src/components/roadbook/roadbookCard.tsx @@ -0,0 +1,49 @@ +import { Button } from "../ui/button"; +import { Card } from "../ui/card"; +import { Link } from "react-router-dom"; + +export const RoadBookCard = () => { + + return ( +
+ +

+ 📖{" "} + Roadbook de l'intégration{" "} + 🚗 +

+ + +
+

+ C'est dans ce livret, que vous pourrez retrouver les informations les plus importantes pour naviguer au travers de l'Intégration. Vous y trouverez les contacts des super-orgas, de l'équipe prévention, de l'infirmerie ainsi que du téléphone d'astreinte, que vous pourrez appeler en cas de problème. +
+ Un texte résumant toute la prévention et les bons gestes à adopter se trouve à l'intérieur. +
+ Il y aura de même à votre disposition les plannings pour être toujours à l'heure, ainsi qu'une super description de chaque activité. +

+ On vous rappelle que LES ACTIVITES NE SONT PAS OBLIGATOIRES. +

+ Bonne Intégration à tous ! +

+
+ +
+ + + + {/* + + */} +

An english version will be available soon !

+
+
+
+ ); +}; + diff --git a/frontend/src/pages/roadbook.tsx b/frontend/src/pages/roadbook.tsx new file mode 100644 index 0000000..5d1e136 --- /dev/null +++ b/frontend/src/pages/roadbook.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import { RoadBookCard } from "../components/roadbook/roadbookCard"; + +export const Roadbook: React.FC = () => { + return ( +
+
+
+ +
+
+

+ +
+ ); +}; \ No newline at end of file diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index c619b5f..377343f 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -3,3 +3,5 @@ VITE_SERVICE_URL = "https://integration.utt.fr/" VITE_CAS_LOGIN_URL = "https://cas.utt.fr/cas/login" VITE_API_URL = "http://localhost:4001/api" VITE_ANALYTICS_WEBSITE_ID = "" +VITE_ROADBOOK_URL_FRENCH = "" +VITE_ROADBOOK_URL_ENGLISH = ""