Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- dev

jobs:

deploy-api:
runs-on: self-hosted

Expand Down Expand Up @@ -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' }}
${{ secrets.REGISTRY_URL }}/integration/front:${{ github.ref == 'refs/heads/prod' && 'prod' || 'dev' }}
5 changes: 4 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 14 additions & 5 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@
"typescript-eslint": "^8.24.1",
"vite": "^6.2.0"
}
}
}
2 changes: 2 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand All @@ -61,6 +62,7 @@ const App: React.FC = () => {
<Route path="/" element={<LoginPage />} />
<Route path="/Register" element={<RegisterPage />} />
<Route path="/ResetPassword" element={<ResetPasswordPage />} />
<Route path="/roadbook" element={<Roadbook />} />

{/* Utilisateurs connectés */}
<Route path="/Home" element={<ProtectedRoute><HomePage /></ProtectedRoute>} />
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/Admin/AdminPerm/adminPermAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ const PermanenceActions: React.FC<PermanenceActionsProps> = ({ 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 {
Expand Down
16 changes: 16 additions & 0 deletions frontend/src/components/home/infosSection.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand Down Expand Up @@ -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.
</p>
</section>

<section className="text-center lg:text-center">
<h3 className="text-2xl sm:text-3xl md:text-4xl font-bold mb-6 text-blue-700">
Le Roadbook de l'inté
</h3>
<p className="text-center sm:text-lg leading-relaxed text-gray-700 max-w-3xl mx-auto mb-4">
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 !
</p>
<Button asChild className="bg-pink-600 hover:bg-pink-800">
<Link to="/roadbook">
Accéder au Roadbook
</Link>
</Button>
</section>
</div>
</div>

Expand Down
49 changes: 49 additions & 0 deletions frontend/src/components/roadbook/roadbookCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Button } from "../ui/button";
import { Card } from "../ui/card";
import { Link } from "react-router-dom";

export const RoadBookCard = () => {

return (
<div className="flex flex-col items-center px-4 py-8 space-y-8 max-w-full min-h-screen mx-auto">
<Card className="w-full p-6 rounded-2xl shadow-md space-y-4">
<h2 className="text-3xl font-bold text-center">
<span role="img" aria-label="rocket">📖</span>{" "}
<span>Roadbook de l'intégration</span>{" "}
<span role="img" aria-label="backpack">🚗</span>
</h2>


<div className="text-center text-gray-700 space-y-1">
<p>
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 <strong>contacts</strong> des super-orgas, de l'équipe prévention, de l'infirmerie ainsi que du <strong>téléphone d'astreinte</strong>, que vous pourrez appeler en cas de problème.
<br />
Un texte résumant toute la <strong>prévention</strong> et les bons gestes à adopter se trouve à l'intérieur.
<br />
Il y aura de même à votre disposition les <strong>plannings</strong> pour être toujours à l'heure, ainsi qu'une super description de chaque activité.
<br /><br />
On vous rappelle que <strong>LES ACTIVITES NE SONT PAS OBLIGATOIRES</strong>.
<br /><br />
Bonne Intégration à tous !
</p>
</div>

<div className="flex flex-col items-center space-y-4">
<Link to={import.meta.env.VITE_ROADBOOK_URL_FRENCH}>
<Button className="cursor-pointer">
<span role="img" aria-label="lien" className="mr-2">🔗</span>
Accéder à la version Française
</Button>
</Link>
{/* <Link to={import.meta.env.VITE_ROADBOOK_URL_ENGLISH}>
<Button variant="link" className="cursor-pointer">
English Version
</Button>
</Link> */}
<p className="text-destructive">An english version will be available soon !</p>
</div>
</Card>
</div>
);
};

18 changes: 18 additions & 0 deletions frontend/src/pages/roadbook.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import { RoadBookCard } from "../components/roadbook/roadbookCard";

export const Roadbook: React.FC = () => {
return (
<div>
<div className="bg-gray-100 min-h-screen py-6 px-4 sm:px-6 lg:px-8">
<div className="max-w-7xl mx-auto space-y-8">
<RoadBookCard />
</div>
</div>
<br /><br />
<footer className="bg-gray-800 text-white p-4 text-center">
<p>&copy; 2025 Semaine d'Intégration UTT</p>
</footer>
</div>
);
};
2 changes: 2 additions & 0 deletions frontend/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""