diff --git a/src/app/(protected)/settings/_components/services-registry-components.tsx b/src/app/(protected)/settings/_components/services-registry-components.tsx new file mode 100644 index 00000000..81fff5cb --- /dev/null +++ b/src/app/(protected)/settings/_components/services-registry-components.tsx @@ -0,0 +1,342 @@ +import { + Autocomplete, + Box, + Button, + Checkbox, + Chip, + Dialog, + DialogActions, + DialogContent, + DialogContentText, + DialogTitle, + Divider, + Drawer, + FormControl, + FormControlLabel, + FormHelperText, + InputLabel, + MenuItem, + Select, + Stack, + Switch, + TextField, + Typography, +} from "@mui/material"; +import { Droplets, Hammer, Settings2, Wrench, Zap } from "lucide-react"; +import type { DropdownOption } from "@/domain/settings/dropdown-options/types/dropdown-option"; +import type { TaskTemplate } from "@/domain/settings/task-templates/types/task-template"; +import { + SERVICE_WORK_ORDER_TYPES, + type Service, + type ServiceWorkOrderType, +} from "@/domain/services/types/service"; +import type { ServiceForm } from "@/domain/services/use-cases/use-services-registry-controller"; + +const ICONS = [ + { key: "wrench", label: "Wrench", Icon: Wrench }, + { key: "droplets", label: "Droplets", Icon: Droplets }, + { key: "zap", label: "Zap", Icon: Zap }, + { key: "hammer", label: "Hammer", Icon: Hammer }, + { key: "settings", label: "Settings", Icon: Settings2 }, +] as const; + +export function ServiceIcon({ iconKey, size = 18 }: { iconKey: string; size?: number }) { + const icon = ICONS.find((item) => item.key === iconKey) ?? ICONS[0]; + const Icon = icon.Icon; + return