frontend: map internal & therapy triggers
Parents:
d02f5132 file(s) changed
- frontend/constants/trigger-categories.ts +2 -0
- frontend/constants/triggers.ts +2 -0
frontend/constants/trigger-categories.ts
1 1
import { MaterialIcons } from "@expo/vector-icons";
2 2
import { TriggerCategory } from "@/constants/triggers";
3 3
4 4
export interface TriggerCategoryDefinition {
5 5
id: TriggerCategory;
▸ 8 unchanged lines
14 14
{ id: "WORK", label: "Trabalho", icon: "work", color: "#3b82f6", iconBackground: "#dbeafe", variant: "blue" },
15 15
{ id: "SOCIAL", label: "Social", icon: "diversity-1", color: "#8b5cf6", iconBackground: "#ede9fe", variant: "purple" },
16 16
{ id: "HEALTH", label: "Saúde", icon: "healing", color: "#34c272", iconBackground: "#d4f5e2", variant: "green" },
17 17
{ id: "FAMILY", label: "Família", icon: "family-restroom", color: "#f97316", iconBackground: "#ffedd5", variant: "orange" },
18 18
{ id: "PHYSICAL", label: "Físico", icon: "fitness-center", color: "#f97316", iconBackground: "#ffedd5", variant: "orange" },
19 +
{ id: "THERAPY", label: "Terapia", icon: "psychology", color: "#6366f1", iconBackground: "#e0e7ff", variant: "indigo" },
20 +
{ id: "INTERNAL", label: "Interno", icon: "self-improvement", color: "#ec4899", iconBackground: "#fce7f3", variant: "pink" },
19 21
{ id: "OTHER", label: "Outro", icon: "help-outline", color: "#94a3b8", iconBackground: "#f1f5f9", variant: "gray" },
20 22
];
21 23
22 24
export const getTriggerCategory = (id: string): TriggerCategoryDefinition =>
23 25
TRIGGER_CATEGORY_DEFINITIONS.find((c) => c.id === id) ??
24 26
TRIGGER_CATEGORY_DEFINITIONS.find((c) => c.id === "OTHER")!;
frontend/constants/triggers.ts
1 1
export type TriggerCategory =
2 2
| "WORK"
3 3
| "SOCIAL"
4 4
| "HEALTH"
5 5
| "PHYSICAL"
6 6
| "FAMILY"
7 +
| "THERAPY"
8 +
| "INTERNAL"
7 9
| "OTHER";