Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
76f533f
WIP: Maker Battle Frontend (Admin & User faces)
tuturd Aug 26, 2026
ef35933
feat: new Settings logic
tuturd Aug 26, 2026
73a2f4f
feat: distribute maker battle teams
Remi-pcn Aug 26, 2026
aeef3da
feat: api route for generating maker battle team (ca marché mais ca m…
Remi-pcn Aug 27, 2026
509b203
feat: generate maker battle placement
Remi-pcn Aug 27, 2026
e5cdc75
feat: getme route
Remi-pcn Aug 27, 2026
48009a0
feat: maker battle table and team in adminusers
Remi-pcn Aug 28, 2026
992bd7c
fix: faction_id not in db when generating teams for more than 1 group
Remi-pcn Aug 28, 2026
9141427
feat: json to csv utils + refactor bus and team members export
Remi-pcn Aug 29, 2026
c2acf0f
Merge pull request #160 from ungdev/feat/new-settings
tuturd Aug 29, 2026
a7143c3
fix: db
Remi-pcn Aug 29, 2026
e498d49
fix: leftJoin instead of innerJoin
tuturd Aug 30, 2026
eceb168
fix: use Ok returns
tuturd Aug 30, 2026
8387c13
fix: makerbattleresponsedata format
tuturd Aug 30, 2026
db8f581
Merge branch 'dev' into 146-feature-tc-branches-challenges-team-repar…
tuturd Aug 30, 2026
bac0ec5
fix: adminSettings
tuturd Aug 30, 2026
f2970ed
feat: makerBattleGroup Card settings condition
tuturd Aug 30, 2026
dd6b38d
feat: remove MM newcomers from Branch MakerBattle
tuturd Aug 30, 2026
6b034e8
feat: releases system
tuturd Aug 30, 2026
9b0cfd2
Merge pull request #166 from ungdev/165-feature-releases-system
tuturd Aug 30, 2026
21bac6e
fix: add first and last name to maker battle team export
Remi-pcn Aug 30, 2026
c5d02a6
Merge pull request #167 from ungdev/163-feature-uploads-exports-prote…
Remi-pcn Aug 30, 2026
d17e5c3
Merge pull request #161 from ungdev/146-feature-tc-branches-challenge…
tuturd Aug 30, 2026
b89c290
fix: maker battle orga access
tuturd Aug 30, 2026
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
29 changes: 18 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ name: CI
on:
push:
branches:
- prod
- dev
tags:
- 'v*'
pull_request:
branches:
- prod
- dev
- prod

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:

build-api:
runs-on: self-hosted
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' || github.event_name == 'push'
needs:
- lint-api
steps:
Expand Down Expand Up @@ -97,7 +98,7 @@ jobs:

build-front:
runs-on: self-hosted
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' || github.event_name == 'push'
needs:
- lint-front
steps:
Expand Down Expand Up @@ -126,10 +127,11 @@ jobs:

deploy-api:
runs-on: self-hosted
if : github.event_name == 'push'
environment: ${{ github.ref == 'refs/heads/dev' && 'development' || 'production' }}
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:
- lint-api
- build-api
steps:
- name: Checkout repository
uses: actions/checkout@v5
Expand All @@ -150,14 +152,16 @@ jobs:
context: ./backend
push: true
tags: |
${{ secrets.REGISTRY_URL }}/integration/api:${{ github.ref == 'refs/heads/prod' && 'prod' || 'dev' }}
${{ secrets.REGISTRY_URL }}/integration/api:${{ startswith(github.ref, 'refs/tags/') && github.ref_name || 'dev' }}
${{ startswith(github.ref, 'refs/tags/') && format('{0}/integration/api:prod', secrets.REGISTRY_URL) || '' }}

deploy-front:
runs-on: self-hosted
if : github.event_name == 'push'
environment: ${{ github.ref == 'refs/heads/dev' && 'development' || 'production' }}
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:
- lint-front
- build-front
steps:
- name: Checkout repository
uses: actions/checkout@v5
Expand All @@ -172,7 +176,7 @@ jobs:
- name: Install docker
uses: docker/setup-buildx-action@v3

- name: Front- Build and push
- name: Front - Build and push
uses: docker/build-push-action@v6
with:
context: ./frontend
Expand All @@ -199,5 +203,8 @@ jobs:
VITE_BDE_SIREN=${{ vars.BDE_SIREN }}
VITE_DPO_EMAIL=${{ vars.DPO_EMAIL }}
VITE_DPO_NAME=${{ vars.DPO_NAME }}
VITE_APP_VERSION=${{ startswith(github.ref, 'refs/tags/') && github.ref_name || 'dev' }}
VITE_RELEASE_URL=${{ startswith(github.ref, 'refs/tags/') && format('https://github.com/{0}/releases/tag/{1}', github.repository, github.ref_name) || '' }}
tags: |
${{ secrets.REGISTRY_URL }}/integration/front:${{ github.ref == 'refs/heads/prod' && 'prod' || 'dev' }}
${{ secrets.REGISTRY_URL }}/integration/front:${{ startswith(github.ref, 'refs/tags/') && github.ref_name || 'dev' }}
${{ startswith(github.ref, 'refs/tags/') && format('{0}/integration/front:prod', secrets.REGISTRY_URL) || '' }}
6 changes: 4 additions & 2 deletions backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import challengeRoutes from './src/routes/challenge.routes';
import defaultRoute from './src/routes/default.routes';
import discordRoutes from './src/routes/discord.routes';
import emailRoutes from './src/routes/email.routes';
import eventRoutes from './src/routes/event.routes';
import settingsRoutes from './src/routes/settings.routes';
import factionRoutes from './src/routes/faction.routes';
import imexportRouter from './src/routes/im_export.routes';
import newsRoutes from './src/routes/news.routes';
Expand All @@ -27,6 +27,7 @@ import roleRoutes from './src/routes/role.routes';
import teamRoutes from './src/routes/team.routes';
import tentRoutes from './src/routes/tent.routes';
import userRoutes from './src/routes/user.routes';
import makerBattleRoutes from './src/routes/maker_battle.routes';
import bannedRoutes from './src/routes/banned.routes';
import { server_port } from './src/shared/secrets/secrets';
import { initQcmvss } from './src/database/initdb/initQcmvss';
Expand Down Expand Up @@ -59,7 +60,7 @@ async function startServer() {
app.use('/api/role', authenticateUser, roleRoutes);
app.use('/api/user', authenticateUser, userRoutes);
app.use('/api/team', authenticateUser, teamRoutes);
app.use('/api/event', authenticateUser, eventRoutes);
app.use('/api/settings', authenticateUser, settingsRoutes);
app.use('/api/faction', authenticateUser, factionRoutes);
app.use('/api/imexport', authenticateUser, imexportRouter);
app.use('/api/permanence', authenticateUser, permanenceRoutes);
Expand All @@ -69,6 +70,7 @@ async function startServer() {
app.use('/api/discord', authenticateUser, discordRoutes);
app.use('/api/tent', authenticateUser, tentRoutes);
app.use('/api/bus', authenticateUser, busRoutes);
app.use('/api/maker-battle', authenticateUser, makerBattleRoutes);
app.use('/api/uploads/news', express.static(path.join(__dirname, '/uploads/news')));
app.use('/api/uploads/notebooks', express.static(path.join(__dirname, '/uploads/notebooks')));
app.use('/api/uploads/foodmenu', express.static(path.join(__dirname, '/uploads/foodmenu')));
Expand Down
199 changes: 0 additions & 199 deletions backend/src/controllers/event.controller.ts

This file was deleted.

26 changes: 16 additions & 10 deletions backend/src/controllers/im_export.controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import path from 'path';
import * as event_service from '../services/event.service';
import * as settings_service from '../services/settings.service';
import * as export_service from '../services/im_export.service';
import * as permanence_service from '../services/permanence.service';
import * as team_service from '../services/team.service';
Expand All @@ -22,7 +22,7 @@ export const exportAllDataToSheets: AppRequestHandler = async (_req, res) => {
const userList = await user_service.getUsersAll();
const teamList = await team_service.getTeamsAll();
const permanenceList = await permanence_service.getAllPermanencesWithUsers();
const shotgunList = await event_service.getAllTeamShotguns();
const shotgunList = await settings_service.getAllTeamShotguns();

// 2. Mapping -> format pour Google Sheets (array de array)
const usersValues = [
Expand Down Expand Up @@ -162,23 +162,29 @@ export const updatePlannings: AppRequestHandler = async (_req, res) => {
}
};

export const exportUsersCSV: AppRequestHandler = async (_req, res) => {
export const exportBus: AppRequestHandler = async (_req, res) => {
try {
await export_service.exportUsersToCSV();
Ok(res, { msg: 'CSV des bus généré' });
const exportData = await export_service.exportBus();
res.setHeader('Content-Type', 'application/json');
res.setHeader('Content-Disposition', `attachment; filename="bus_${Date.now()}.json"`);

return res.status(200).json(exportData);
} catch (error) {
console.error(error);
Error(res, { msg: "Erreur lors de l'export CSV" });
return Error(res, { msg: "Erreur lors de l'exportation des memsbres des équipes : " + error });
}
};

export const exportTeamMembersCSV: AppRequestHandler = async (_req, res) => {
export const exportTeamMembers: AppRequestHandler = async (_req, res) => {
try {
await export_service.exportTeamMembersToCSV();
Ok(res, { msg: "CSV des membres de l'équipe généré" });
const exportData = await export_service.exportTeamMembers();
res.setHeader('Content-Type', 'application/json');
res.setHeader('Content-Disposition', `attachment; filename="team_members_${Date.now()}.json"`);

return res.status(200).json(exportData);
} catch (error) {
console.error(error);
Error(res, { msg: "Erreur lors de l'export CSV" });
return Error(res, { msg: "Erreur lors de l'exportation des memsbres des équipes : " + error });
}
};
export const getUploadedDocumentStatus: AppRequestHandler<unknown, unknown, UploadedDocumentParams> = async (
Expand Down
Loading
Loading