mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-09 17:14:21 +02:00
Add roles to Volunteers
This commit is contained in:
parent
968ec3b430
commit
c536632a51
@ -273,8 +273,10 @@ function anonimizedDb(_s: States): States {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function idADev(v: Volunteer | PreVolunteer): boolean {
|
function idADev(v: Volunteer | PreVolunteer): boolean {
|
||||||
const devList = ["Pierre Scelles", "Manuel Emeriau", "Timothé Caillaud"]
|
if (((v as Volunteer)?.roles || []).includes("dev")) {
|
||||||
return devList.includes(`${v.firstname} ${v.lastname}`)
|
console.log(v.lastname)
|
||||||
|
}
|
||||||
|
return ((v as Volunteer)?.roles || []).includes("dev")
|
||||||
}
|
}
|
||||||
|
|
||||||
function anonimizedNameEmailMobile(v: Volunteer | PreVolunteer): void {
|
function anonimizedNameEmailMobile(v: Volunteer | PreVolunteer): void {
|
||||||
|
@ -13,7 +13,7 @@ export class Volunteer {
|
|||||||
|
|
||||||
adult = 1
|
adult = 1
|
||||||
|
|
||||||
privileges = 0
|
roles: string[] = []
|
||||||
|
|
||||||
active = ""
|
active = ""
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ export const translationVolunteer: { [k in keyof Volunteer]: string } = {
|
|||||||
mobile: "telephone",
|
mobile: "telephone",
|
||||||
photo: "photo",
|
photo: "photo",
|
||||||
adult: "majeur",
|
adult: "majeur",
|
||||||
privileges: "privilege",
|
roles: "roles",
|
||||||
active: "actif",
|
active: "actif",
|
||||||
discordId: "discordId",
|
discordId: "discordId",
|
||||||
dayWishes: "enviesJours",
|
dayWishes: "enviesJours",
|
||||||
@ -82,7 +82,7 @@ export const volunteerExample: Volunteer = {
|
|||||||
mobile: "0675650392",
|
mobile: "0675650392",
|
||||||
photo: "images/volunteers/$taille/amélie_aupeix.jpg",
|
photo: "images/volunteers/$taille/amélie_aupeix.jpg",
|
||||||
adult: 1,
|
adult: 1,
|
||||||
privileges: 0,
|
roles: [],
|
||||||
active: "inconnu",
|
active: "inconnu",
|
||||||
discordId: "",
|
discordId: "",
|
||||||
dayWishes: [],
|
dayWishes: [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user