assigners can assign volunteer to a team

This commit is contained in:
memeriau
2022-04-16 18:30:47 +02:00
parent f0f08a91ed
commit 7c96636477
8 changed files with 145 additions and 6 deletions

View File

@@ -29,6 +29,8 @@ export class Volunteer {
food = ""
team = 0
teamWishes: number[] = []
teamWishesComment = ""
@@ -62,6 +64,7 @@ export const translationVolunteer: { [k in keyof Volunteer]: string } = {
tshirtCount: "nbDeTshirts",
tshirtSize: "tailleDeTshirts",
food: "alimentation",
team: "équipe",
teamWishes: "enviesEquipe",
teamWishesComment: "commentaireEnviesEquipe",
hiddenAsks: "questionsCachees",
@@ -90,6 +93,7 @@ export const volunteerExample: Volunteer = {
tshirtCount: "1",
tshirtSize: "Femme M",
food: "Végétarien",
team: 2,
teamWishes: [],
teamWishesComment: "",
hiddenAsks: [],
@@ -146,3 +150,9 @@ export interface VolunteerParticipationDetails {
adult: Volunteer["adult"]
food: Volunteer["food"]
}
export interface VolunteerTeamAssign {
id: Volunteer["id"]
volunteer: number
team: Volunteer["team"]
}

View File

@@ -6,6 +6,7 @@ import {
VolunteerAsks,
VolunteerParticipationDetails,
VolunteerTeamWishes,
VolunteerTeamAssign,
VolunteerWithoutId,
} from "./volunteers"
@@ -34,3 +35,6 @@ export const volunteerParticipationDetailsSet =
serviceAccessors.securedCustomPost<[number, Partial<VolunteerParticipationDetails>]>(
"ParticipationDetailsSet"
)
export const volunteerTeamAssignSet =
serviceAccessors.securedCustomPost<[number, Partial<VolunteerTeamAssign>]>("TeamAssignSet")