export type UserRole = "user" | "team_admin" | "department_admin" | "field_admin" | "global_admin" export type ShelterStatus = "yes" | "no" | "no_alarm" | "safe_after_exit" export type Department = "מאי" | "עדן" | "שניר" | "יקיר" export type Team = | "מאי" | "שי" | "תומר" | "ינון" | "עדי" | "לינוי" | "ניצן" | "רונן" | "אופיר" | "הדר" | "יקיר" export type Field = "יקיר" | "אורלי" | "מיכאל" | "מאור" | "גלעד" export interface User { national_id: string name: string role: UserRole is_admin: boolean field?: Field department?: Department team?: Team in_shelter?: ShelterStatus last_updated?: string must_change_password?: boolean password_changed_at?: string } export interface AdminUser extends User { is_admin: true } export const ROLE_NAMES: Record = { user: "משתמש", team_admin: "מנהל צוות", department_admin: "מנהל מסגרת", field_admin: "מנהל תחום", global_admin: "מנהל על", } export const ROLE_HIERARCHY: Record = { global_admin: 5, field_admin: 4, department_admin: 3, team_admin: 2, user: 1, } export const SHELTER_STATUS_NAMES: Record = { yes: "במקלט/חדר מוגן", no: "לא במקלט", no_alarm: "אין אזעקה", safe_after_exit: "אני בטוח.ה (סוף אירוע)" } export const DEPARTMENTS: Department[] = ["מאי", "עדן", "שניר", "יקיר"] export const TEAMS: Team[] = [ "מאי", "שי", "תומר", "ינון", "עדי", "לינוי", "ניצן", "רונן", "אופיר", "הדר", "יקיר", ] export const FIELDS: Field[] = ["יקיר", "אורלי", "מיכאל", "מאור", "גלעד"]