@zauru-sdk/components 6.15.0 → 6.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,92 @@
1
+ import type { ReactNode } from "react";
2
+ import type { NavBarItem } from "../src/NavBar/NavBar.types.js";
3
+ import { NavBar } from "../src/NavBar/NavBar.js";
4
+
5
+ const receptionItems: NavBarItem[] = [
6
+ { name: "Nueva contraseña", link: "/receptions/new", loggedIn: true, selectedColor: "green" },
7
+ { name: "Cierre de turno", link: "/cierre-turno", loggedIn: true },
8
+ { name: "Contraseñas", link: "/receptions", loggedIn: true },
9
+ { name: "Procesos", link: "/processes", loggedIn: true },
10
+ {
11
+ name: "Envíos",
12
+ link: "/shipments",
13
+ loggedIn: true,
14
+ childrens: [
15
+ { name: "Listado de envíos", link: "/shipments", loggedIn: true },
16
+ { name: "Nuevo envío", link: "/shipments/new", loggedIn: true },
17
+ ],
18
+ },
19
+ ];
20
+
21
+ const costItems: NavBarItem[] = [
22
+ { name: "Configuración", link: "/configuration", loggedIn: true },
23
+ { name: "Modificar costos", link: "/prices", loggedIn: true },
24
+ { name: "Bitácora", link: "/history", loggedIn: true },
25
+ ];
26
+
27
+ const Frame = ({ children }: { children: ReactNode }) => (
28
+ <div className="-m-6 min-h-screen bg-slate-100">{children}</div>
29
+ );
30
+
31
+ export const RecepcionesSlate = () => (
32
+ <Frame>
33
+ <NavBar
34
+ title="Recepción de Verduras"
35
+ items={receptionItems}
36
+ loggedIn
37
+ selectedColor="slate"
38
+ settingsOption
39
+ reloadCatalogsOption
40
+ />
41
+ </Frame>
42
+ );
43
+
44
+ export const CostosGreen = () => (
45
+ <Frame>
46
+ <NavBar
47
+ title="Costos de verduras"
48
+ items={costItems}
49
+ loggedIn
50
+ selectedColor="green"
51
+ settingsOption
52
+ />
53
+ </Frame>
54
+ );
55
+
56
+ export const CalidadYellow = () => (
57
+ <Frame>
58
+ <NavBar
59
+ title="Control de calidad operativo"
60
+ items={receptionItems.map((item) => ({ ...item, selectedColor: undefined }))}
61
+ loggedIn
62
+ selectedColor="yellow"
63
+ settingsOption
64
+ reloadCatalogsOption
65
+ />
66
+ </Frame>
67
+ );
68
+
69
+ export const LaboratorioSky = () => (
70
+ <Frame>
71
+ <NavBar
72
+ title="Agri-Food Safety Lab"
73
+ items={costItems}
74
+ loggedIn
75
+ selectedColor="sky"
76
+ settingsOption
77
+ />
78
+ </Frame>
79
+ );
80
+
81
+ export const EnviosRed = () => (
82
+ <Frame>
83
+ <NavBar
84
+ title="Envíos"
85
+ items={receptionItems.filter((item) => item.name === "Envíos")}
86
+ loggedIn
87
+ selectedColor="red"
88
+ settingsOption
89
+ reloadCatalogsOption
90
+ />
91
+ </Frame>
92
+ );