From ccbb1f10e1d381a8fc63ddd01fa015f63c3e64c9 Mon Sep 17 00:00:00 2001 From: Arthur Dodin <52950784+tuturd@users.noreply.github.com> Date: Wed, 9 Sep 2026 11:37:08 +0200 Subject: [PATCH 1/3] feat: change runner from self-hosted to sia-autoscale-runners --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 698b929..8cdf5e2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ env: jobs: lint-api: - runs-on: self-hosted + runs-on: sia-autoscale-runners steps: - name: Checkout repository uses: actions/checkout@v5 @@ -42,7 +42,7 @@ jobs: run: pnpm run lint lint-front: - runs-on: self-hosted + runs-on: sia-autoscale-runners steps: - name: Checkout repository uses: actions/checkout@v5 @@ -68,7 +68,7 @@ jobs: run: pnpm run lint build-api: - runs-on: self-hosted + runs-on: sia-autoscale-runners if: github.event_name == 'pull_request' || github.event_name == 'push' needs: - lint-api @@ -97,7 +97,7 @@ jobs: run: pnpm run build-test build-front: - runs-on: self-hosted + runs-on: sia-autoscale-runners if: github.event_name == 'pull_request' || github.event_name == 'push' needs: - lint-front @@ -126,7 +126,7 @@ jobs: run: pnpm run build deploy-api: - runs-on: self-hosted + runs-on: sia-autoscale-runners if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || startswith(github.ref, 'refs/tags/v')) environment: ${{ startswith(github.ref, 'refs/tags/') && 'production' || 'development' }} needs: @@ -156,7 +156,7 @@ jobs: ${{ startswith(github.ref, 'refs/tags/') && format('{0}/integration/api:prod', secrets.REGISTRY_URL) || '' }} deploy-front: - runs-on: self-hosted + runs-on: sia-autoscale-runners if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || startswith(github.ref, 'refs/tags/v')) environment: ${{ startswith(github.ref, 'refs/tags/') && 'production' || 'development' }} needs: From 9f07b1b3409e6e2198e3bc0b185e3cffd1808c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Poncin?= Date: Wed, 9 Sep 2026 12:10:15 +0200 Subject: [PATCH 2/3] fix: HARD CODE FACTION POINTS HIDDEN --- .../components/challenge/challengeList.tsx | 90 +++++++++---------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/frontend/src/components/challenge/challengeList.tsx b/frontend/src/components/challenge/challengeList.tsx index 9859ebd..74bd9e4 100644 --- a/frontend/src/components/challenge/challengeList.tsx +++ b/frontend/src/components/challenge/challengeList.tsx @@ -2,16 +2,16 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import Swal from 'sweetalert2'; import { type Challenge } from '../../interfaces/challenge.interface'; -import { type Faction } from '../../interfaces/faction.interface'; -import { getAllChallenges, getFactionsPoints } from '../../services/requests/challenge.service'; -import { getAllFactionsUser } from '../../services/requests/faction.service'; +//import { type Faction } from '../../interfaces/faction.interface'; +import { getAllChallenges /*getFactionsPoints*/ } from '../../services/requests/challenge.service'; +//import { getAllFactionsUser } from '../../services/requests/faction.service'; import { checkChallengeStatus } from '../../services/requests/settings.service'; import { Card, CardContent, CardHeader, CardTitle } from '../ui/card'; export const UserChallengeList = () => { const [availableChallenges, setAvailableChallenges] = useState([]); - const [factions, setFactions] = useState([]); - const [factionPoints, setFactionPoints] = useState<{ [key: number]: number }>({}); + //const [factions, setFactions] = useState([]); + //const [factionPoints, setFactionPoints] = useState<{ [key: number]: number }>({}); const [selectedCategory, setSelectedCategory] = useState('Tous'); const [sortOrder, setSortOrder] = useState<'asc' | 'desc'>('asc'); const [isChallOpen, setIsChallOpen] = useState(false); @@ -27,36 +27,39 @@ export const UserChallengeList = () => { } }, []); - const fetchFactions = useCallback(async () => { - try { - const data = await getAllFactionsUser(); - setFactions(data); - } catch (err) { - console.error('Erreur lors du chargement des factions', err); - } - }, []); - - const fetchFactionPoints = useCallback(async () => { - try { - const points: { [key: number]: number } = {}; - const fetchedFactions = await getAllFactionsUser(); - await Promise.all( - fetchedFactions.map(async (faction: Faction) => { - const res = await getFactionsPoints(faction.factionId); - points[faction.factionId] = Number(res); - }), - ); - setFactionPoints(points); - } catch (err) { - console.error('Erreur lors du chargement des points des factions', err); - } - }, []); + //const fetchFactions = useCallback(async () => { + // try { + // const data = await getAllFactionsUser(); + // setFactions(data); + // } catch (err) { + // console.error('Erreur lors du chargement des factions', err); + // } + // }, []); + + // const fetchFactionPoints = useCallback(async () => { + // try { + // const points: { [key: number]: number } = {}; + // const fetchedFactions = await getAllFactionsUser(); + // await Promise.all( + // fetchedFactions.map(async (faction: Faction) => { + // const res = await getFactionsPoints(faction.factionId); + // points[faction.factionId] = Number(res); + // }), + // ); + // setFactionPoints(points); + // } catch (err) { + // console.error('Erreur lors du chargement des points des factions', err); + // } + // }, []); + + // const fetchInitialData = useCallback(async () => { + // await Promise.all([fetchChallenges(), fetchFactions()]); + // await fetchFactionPoints(); + // }, [fetchChallenges, fetchFactions, fetchFactionPoints]); const fetchInitialData = useCallback(async () => { - await Promise.all([fetchChallenges(), fetchFactions()]); - await fetchFactionPoints(); - }, [fetchChallenges, fetchFactions, fetchFactionPoints]); - + await Promise.all([fetchChallenges()]); + }, [fetchChallenges]); useEffect(() => { const init = async () => { try { @@ -105,12 +108,10 @@ export const UserChallengeList = () => { - {!isChallOpen ? ( -

- 🚫 Les points des factions sont actuellement cachés. -

- ) : ( -
+

+ 🚫 Les points des factions sont actuellement cachés. +

+ {/*
{factions.length > 0 ? (
{factions.map((faction) => ( @@ -122,8 +123,7 @@ export const UserChallengeList = () => { ) : (

Chargement des points...

)} -
- )} +
*/} @@ -135,9 +135,7 @@ export const UserChallengeList = () => { {!isChallOpen ? ( -

- 🚫 Les défis sont actuellement fermés. -

+

🚫 Les défis sont actuellement fermés.

) : (