diff --git a/public/icons/android-chrome-192x192.png b/public/icons/android-chrome-192x192.png index a7ef8a12..06369928 100644 Binary files a/public/icons/android-chrome-192x192.png and b/public/icons/android-chrome-192x192.png differ diff --git a/public/icons/android-chrome-512x512.png b/public/icons/android-chrome-512x512.png index 014d88b1..8cbd2a03 100644 Binary files a/public/icons/android-chrome-512x512.png and b/public/icons/android-chrome-512x512.png differ diff --git a/public/icons/apple-touch-icon.png b/public/icons/apple-touch-icon.png index df30a6a9..008e0011 100644 Binary files a/public/icons/apple-touch-icon.png and b/public/icons/apple-touch-icon.png differ diff --git a/public/icons/mstile-150x150.png b/public/icons/mstile-150x150.png index b19a191f..c32509b1 100644 Binary files a/public/icons/mstile-150x150.png and b/public/icons/mstile-150x150.png differ diff --git a/src/app/(dashboard)/admin/users/page.tsx b/src/app/(dashboard)/admin/users/page.tsx index b8dd04eb..f78415b0 100644 --- a/src/app/(dashboard)/admin/users/page.tsx +++ b/src/app/(dashboard)/admin/users/page.tsx @@ -17,6 +17,7 @@ const columnTitles = { scannedLabel: 'Scanné', permissionsLabel: 'Permissions', teamName: 'Équipe', + status: 'Rôle', tournamentName: 'Tournoi', place: 'Place', }; @@ -79,6 +80,7 @@ const Users = () => { lockedLabel: true, paidLabel: true, scannedLabel: true, + status: true, permissionsLabel: true, teamName: true, tournamentName: true, diff --git a/src/modules/register.ts b/src/modules/register.ts index 8defd87e..2befeeec 100644 --- a/src/modules/register.ts +++ b/src/modules/register.ts @@ -37,9 +37,7 @@ export const registerUser = async (user: RegisterUser) => { return; } - delete user.passwordConfirmation; - delete user.legalRepresentativeAccepted; - await API.post('auth/register', user); + await API.post('auth/register', { ...user, passwordConfirmation: undefined, legalRepresentativeAccepted: undefined }); toast.success('Inscription réussie, vérifie tes emails'); return true; }; diff --git a/src/modules/users.ts b/src/modules/users.ts index 1cd1a86e..d11b2dd9 100644 --- a/src/modules/users.ts +++ b/src/modules/users.ts @@ -39,15 +39,31 @@ const initialState: UsersAction = { }; const format = (users: Array) => { + function userType(type: string) { + switch (type) { + case UserType.player: + return 'Joueur'; + case UserType.coach: + return 'Coach'; + case UserType.spectator: + return 'Spectateur'; + case UserType.attendant: + return 'Accompagnateur'; + default: + return type; + } + } + return users.map((user) => ({ ...user, fullname: `${user.firstname} ${user.lastname}`, tournamentName: user.team ? user.team.tournament.name : '', - teamName: user.team ? user.team.name : user.type === UserType.spectator ? '(spectateur)' : '', + teamName: user.team ? user.team.name : '', lockedLabel: user.team && user.team.lockedAt ? '✔' : '✖', paidLabel: user.hasPaid ? '✔' : '✖', scannedLabel: user.scannedAt ? '✔' : '✖', permissionsLabel: user.permissions.join(', ') || '', + status: user.type ? userType(user.type) : '', })); };