mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-09 09:04: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"
|
import { fetchVolunteerParticipationDetailsSet } from "../../store/volunteerParticipationDetailsSet"
|
||||||
|
|
||||||
export const tshirtSizes = [
|
export const tshirtSizes = [
|
||||||
|
"XXS",
|
||||||
"XS",
|
"XS",
|
||||||
"S",
|
"S",
|
||||||
"M",
|
"M",
|
||||||
"L",
|
"L",
|
||||||
"XL",
|
"XL",
|
||||||
"XXL",
|
"XXL",
|
||||||
|
"3XL",
|
||||||
|
"4XL",
|
||||||
"Femme S",
|
"Femme S",
|
||||||
"Femme M",
|
"Femme M",
|
||||||
"Femme L",
|
"Femme L",
|
||||||
"Femme XL",
|
"Femme XL",
|
||||||
|
"Femme XXL",
|
||||||
|
"Femme 3XL",
|
||||||
]
|
]
|
||||||
|
|
||||||
export const foodDefaultValue = "Aucune"
|
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) => {
|
export const volunteerAddNew = expressAccessor.add(async (list, _body, _id, roles) => {
|
||||||
if (!roles.includes("admin")) {
|
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 id = (max(list.map((v) => v.id)) || 0) + 1
|
||||||
const password = generatePassword()
|
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) => {
|
export const volunteerSet = expressAccessor.set(async (list, body, _id, roles) => {
|
||||||
if (!roles.includes("admin")) {
|
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 newPartialVolunteer = body[0] as Partial<Record<keyof Volunteer, string>> & { id: number }
|
||||||
const volunteer: Volunteer | undefined = list.find((v) => v.id === newPartialVolunteer.id)
|
const volunteer: Volunteer | undefined = list.find((v) => v.id === newPartialVolunteer.id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user