mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 08:34:20 +02:00
Add more t-shirt sizes
This commit is contained in:
parent
028d703e98
commit
f9a68d7cfe
@ -6,16 +6,21 @@ import { AppState } from "../../store"
|
||||
import { fetchVolunteerParticipationDetailsSet } from "../../store/volunteerParticipationDetailsSet"
|
||||
|
||||
export const tshirtSizes = [
|
||||
"XXS",
|
||||
"XS",
|
||||
"S",
|
||||
"M",
|
||||
"L",
|
||||
"XL",
|
||||
"XXL",
|
||||
"3XL",
|
||||
"4XL",
|
||||
"Femme S",
|
||||
"Femme M",
|
||||
"Femme L",
|
||||
"Femme XL",
|
||||
"Femme XXL",
|
||||
"Femme 3XL",
|
||||
]
|
||||
|
||||
export const foodDefaultValue = "Aucune"
|
||||
|
@ -33,7 +33,7 @@ export const volunteerListGet = expressAccessor.get(async (list, _body, id) => {
|
||||
|
||||
export const volunteerAddNew = expressAccessor.add(async (list, _body, _id, roles) => {
|
||||
if (!roles.includes("admin")) {
|
||||
throw Error(`À moins d'être admin, on ne peut pas modifier n'importe quel utilisateur`)
|
||||
throw Error(`À moins d'être admin, on ne peut pas ajouter un bénévole`)
|
||||
}
|
||||
const id = (max(list.map((v) => v.id)) || 0) + 1
|
||||
const password = generatePassword()
|
||||
@ -53,7 +53,7 @@ export const volunteerAddNew = expressAccessor.add(async (list, _body, _id, role
|
||||
|
||||
export const volunteerSet = expressAccessor.set(async (list, body, _id, roles) => {
|
||||
if (!roles.includes("admin")) {
|
||||
throw Error(`À moins d'être admin, on ne peut pas modifier n'importe quel utilisateur`)
|
||||
throw Error(`À moins d'être admin, on ne peut pas modifier n'importe quel bénévole`)
|
||||
}
|
||||
const newPartialVolunteer = body[0] as Partial<Record<keyof Volunteer, string>> & { id: number }
|
||||
const volunteer: Volunteer | undefined = list.find((v) => v.id === newPartialVolunteer.id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user