Skip to content
Snippets Groups Projects

Greg 61 Add search field

Merged Andreas Ellewsen requested to merge GREG-61-add-role into master
9 files
+ 234
100
Compare changes
  • Side-by-side
  • Inline
Files
9
  • To make handling info about roles and persons easier we split them into
    separate objects. The Profile page has now gotten its own api endpoint
    where a sponsor has access to all guests instead of only those they are
    sponsor for which is used on the sponsor frontpage. This is necessary
    since a sponsor may want to give a role to someone they are not
    currently sponsor for.
export type Guest = {
id: string
pid: string
name: string
first: string
last: string
email: string
mobile: string
fnr: string
role_nb: string
role_en: string
max_days: number
start_date: Date
end_date: Date
active: boolean
ou_nb: string
ou_en: string
roles: Role[]
}
export interface FetchedGuest {
id: string
pid: string
first: string
last: string
email: string
mobile: string
fnr: string
role_nb: string
role_en: string
active: boolean
roles: FetchedRole[]
}
export type Role = {
id: string
name_nb: string
name_en: string
ou_nb: string
ou_en: string
start_date: Date
end_date: Date
max_days: number
start_date: string
end_date: string
}
export type FetchedRole = {
id: string
name_nb: string
name_en: string
ou_nb: string
ou_en: string
active: boolean
start_date: string
end_date: string
max_days: number
}
Loading