@gelabs/ovr 0.2.1 → 0.3.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.
- package/dist/auth-auth.js +1 -1
- package/dist/auth.js +1 -1
- package/dist/{chunk-MDTRBOPQ.js → chunk-2C3VCTYJ.js} +1 -1
- package/dist/chunk-3YKVH4Y7.js +126 -0
- package/dist/chunk-6YFZLXFP.js +84 -0
- package/dist/{chunk-3NZ2XUBO.js → chunk-AJ2RZTVX.js} +9 -2
- package/dist/chunk-BI4EGLPG.js +298 -0
- package/dist/{chunk-3KIDW4LT.js → chunk-BVI5XDDA.js} +1 -1
- package/dist/{chunk-BIQ2J75Y.js → chunk-GLIK5BHP.js} +2 -2
- package/dist/{chunk-5YYR37CF.js → chunk-HGWPA7FU.js} +119 -0
- package/dist/{chunk-JEYT63LE.js → chunk-IBZVIUNI.js} +1 -1
- package/dist/chunk-IS3THKTE.js +89 -0
- package/dist/{chunk-4SZXBT56.js → chunk-NT72CQAI.js} +2 -2
- package/dist/{chunk-E2D7QT6N.js → chunk-TJSNVTVB.js} +1 -1
- package/dist/{chunk-5Z2IAD5I.js → chunk-TLG4C2XI.js} +2 -2
- package/dist/chunk-V7VQVDWS.js +237 -0
- package/dist/{chunk-IF5UAVIE.js → chunk-YC7G2IOZ.js} +1 -1
- package/dist/chunk-YGYA7KEG.js +423 -0
- package/dist/{chunk-GDOCD7LT.js → chunk-ZUMEOZ22.js} +5 -5
- package/dist/core-i18n.d.ts +2 -2
- package/dist/core-i18n.js +1 -1
- package/dist/core.d.ts +61 -1
- package/dist/core.js +1 -1
- package/dist/data-mock-store.js +265 -9
- package/dist/data-prisma-store.js +254 -1
- package/dist/data-seed-runner.js +18 -15
- package/dist/data.d.ts +54 -3
- package/dist/generated/client/edge.js +29 -9
- package/dist/generated/client/index-browser.js +26 -6
- package/dist/generated/client/index.d.ts +3544 -552
- package/dist/generated/client/index.js +29 -9
- package/dist/generated/client/package.json +1 -1
- package/dist/generated/client/schema.prisma +47 -9
- package/dist/generated/client/wasm.js +29 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/offline.d.ts +55 -19
- package/dist/offline.js +2 -375
- package/dist/{types-CtBC5-TW.d.ts → types-BOgdk0Jw.d.ts} +119 -0
- package/dist/types.d.ts +94 -1
- package/dist/types.js +1 -1
- package/dist/ui-components-admin/accounts-manager.d.ts +52 -0
- package/dist/ui-components-admin/accounts-manager.js +471 -0
- package/dist/ui-components-admin/admin-nav.d.ts +15 -1
- package/dist/ui-components-admin/admin-nav.js +387 -58
- package/dist/ui-components-admin/issuance-form.js +96 -23
- package/dist/ui-components-admin/logs-viewer.d.ts +13 -0
- package/dist/ui-components-admin/logs-viewer.js +102 -0
- package/dist/ui-components-admin/notifications-list.d.ts +5 -0
- package/dist/ui-components-admin/notifications-list.js +70 -0
- package/dist/ui-components-admin/officers-manager.d.ts +27 -0
- package/dist/ui-components-admin/officers-manager.js +271 -0
- package/dist/ui-components-admin/roles-manager.d.ts +37 -0
- package/dist/ui-components-admin/roles-manager.js +406 -0
- package/dist/ui-components-admin/ticket-preview.js +7 -7
- package/dist/ui-components-admin/tickets-table.js +56 -33
- package/dist/ui-components-citizen/citizen-nav.js +2 -2
- package/dist/ui-components-citizen/payment-form.js +5 -5
- package/dist/ui-components-citizen/payment-qr-dialog.js +4 -4
- package/dist/ui-components-citizen/ticket-not-found.js +2 -2
- package/dist/ui-components-citizen/violation-history-table.js +3 -3
- package/dist/ui-components-shared/amount-summary.js +4 -4
- package/dist/ui-components-shared/money.js +3 -3
- package/dist/ui-components-shared/municipal-seal.js +3 -3
- package/dist/ui-components-shared/official-header.js +4 -4
- package/dist/ui-components-shared/site-header.js +4 -4
- package/dist/ui-components-shared/sonner.js +2 -2
- package/dist/ui-components-shared/theme-toggle.js +3 -3
- package/dist/ui-components-shared/ticket-receipt.js +15 -7
- package/dist/ui-components-shared/violations-table.js +4 -4
- package/dist/ui-components-ui/badge.d.ts +1 -1
- package/dist/ui-components-ui/button.d.ts +1 -1
- package/dist/ui-components-ui/dropdown-menu.js +2 -237
- package/dist/ui-components-ui/sheet.js +3 -126
- package/dist/ui-config.d.ts +1 -1
- package/dist/ui-config.js +2 -2
- package/dist/ui-server.d.ts +1 -1
- package/dist/ui-server.js +2 -2
- package/package.json +3 -3
- package/prisma/migrations/20260622000000_add_issued_by/migration.sql +2 -0
- package/prisma/migrations/20260622010000_add_super_admin_role/migration.sql +3 -0
- package/prisma/migrations/20260622020000_add_apprehending_enforcer/migration.sql +4 -0
- package/prisma/migrations/20260622030000_custom_roles/migration.sql +30 -0
- package/prisma/migrations/20260622040000_add_activity_log/migration.sql +18 -0
- package/prisma/schema.prisma +47 -9
- package/dist/chunk-B634JHKZ.js +0 -181
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ThemeToggle } from '../chunk-
|
|
3
|
-
import { MunicipalSeal } from '../chunk-
|
|
2
|
+
import { ThemeToggle } from '../chunk-2C3VCTYJ.js';
|
|
3
|
+
import { MunicipalSeal } from '../chunk-YC7G2IOZ.js';
|
|
4
4
|
import '../chunk-WOPU6DI7.js';
|
|
5
5
|
import '../chunk-I4WDVYHX.js';
|
|
6
|
-
import { useOvrConfig, useCopy } from '../chunk-
|
|
6
|
+
import { useOvrConfig, useCopy } from '../chunk-TJSNVTVB.js';
|
|
7
7
|
import '../chunk-77QBZC7J.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-BI4EGLPG.js';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useTheme } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
import { useTheme } from '../chunk-TJSNVTVB.js';
|
|
3
|
+
import '../chunk-BI4EGLPG.js';
|
|
4
4
|
import { Toaster as Toaster$1 } from 'sonner';
|
|
5
5
|
import { Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon } from 'lucide-react';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { ThemeToggle } from '../chunk-
|
|
2
|
+
export { ThemeToggle } from '../chunk-2C3VCTYJ.js';
|
|
3
3
|
import '../chunk-I4WDVYHX.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-TJSNVTVB.js';
|
|
5
5
|
import '../chunk-77QBZC7J.js';
|
|
6
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-BI4EGLPG.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { OfficialHeader } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
import { OfficialHeader } from '../chunk-NT72CQAI.js';
|
|
3
|
+
import '../chunk-YC7G2IOZ.js';
|
|
4
4
|
import '../chunk-WOPU6DI7.js';
|
|
5
|
-
import { ViolationsTable } from '../chunk-
|
|
5
|
+
import { ViolationsTable } from '../chunk-IBZVIUNI.js';
|
|
6
6
|
import { Separator } from '../chunk-NSCIBSCW.js';
|
|
7
7
|
import { StatusBadge } from '../chunk-OE525ZER.js';
|
|
8
|
+
import { Money } from '../chunk-BVI5XDDA.js';
|
|
8
9
|
import '../chunk-OWCGEEAZ.js';
|
|
9
10
|
import '../chunk-55FQP2DO.js';
|
|
10
|
-
import {
|
|
11
|
-
import { useFormatters, useOvrConfig } from '../chunk-E2D7QT6N.js';
|
|
11
|
+
import { useFormatters, useOvrConfig } from '../chunk-TJSNVTVB.js';
|
|
12
12
|
import { cn } from '../chunk-77QBZC7J.js';
|
|
13
|
-
import { formalName, formatAddress } from '../chunk-
|
|
13
|
+
import { formalName, formatAddress } from '../chunk-BI4EGLPG.js';
|
|
14
14
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
15
15
|
|
|
16
16
|
function Field({ label, value }) {
|
|
@@ -63,7 +63,15 @@ function TicketReceipt({ ticket }) {
|
|
|
63
63
|
label: "Apprehending Officer",
|
|
64
64
|
value: `${ticket.officer.name}${ticket.officer.badgeNo ? ` (${ticket.officer.badgeNo})` : ""}`
|
|
65
65
|
}
|
|
66
|
-
)
|
|
66
|
+
),
|
|
67
|
+
ticket.apprehendingEnforcerName ? /* @__PURE__ */ jsx(
|
|
68
|
+
Field,
|
|
69
|
+
{
|
|
70
|
+
label: "Apprehending Enforcer",
|
|
71
|
+
value: ticket.apprehendingEnforcerName
|
|
72
|
+
}
|
|
73
|
+
) : null,
|
|
74
|
+
ticket.issuedBy ? /* @__PURE__ */ jsx(Field, { label: "Issued By", value: ticket.issuedBy }) : null
|
|
67
75
|
] }),
|
|
68
76
|
/* @__PURE__ */ jsxs("div", { className: "mt-6 print:mt-3", children: [
|
|
69
77
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-sm font-medium print:mb-1", children: "Violations" }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { ViolationsTable } from '../chunk-
|
|
2
|
+
export { ViolationsTable } from '../chunk-IBZVIUNI.js';
|
|
3
|
+
import '../chunk-BVI5XDDA.js';
|
|
3
4
|
import '../chunk-OWCGEEAZ.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-E2D7QT6N.js';
|
|
5
|
+
import '../chunk-TJSNVTVB.js';
|
|
6
6
|
import '../chunk-77QBZC7J.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-BI4EGLPG.js';
|
|
@@ -4,7 +4,7 @@ import { useRender } from '@base-ui/react/use-render';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" |
|
|
7
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import { Button as Button$1 } from '@base-ui/react/button';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" |
|
|
7
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
8
8
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): React.JSX.Element;
|
|
@@ -1,238 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import { ChevronRightIcon, CheckIcon } from 'lucide-react';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function DropdownMenu({ ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Menu.Root, { "data-slot": "dropdown-menu", ...props });
|
|
9
|
-
}
|
|
10
|
-
function DropdownMenuPortal({ ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsx(Menu.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
12
|
-
}
|
|
13
|
-
function DropdownMenuTrigger({ ...props }) {
|
|
14
|
-
return /* @__PURE__ */ jsx(Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
15
|
-
}
|
|
16
|
-
function DropdownMenuContent({
|
|
17
|
-
align = "start",
|
|
18
|
-
alignOffset = 0,
|
|
19
|
-
side = "bottom",
|
|
20
|
-
sideOffset = 4,
|
|
21
|
-
className,
|
|
22
|
-
...props
|
|
23
|
-
}) {
|
|
24
|
-
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(
|
|
25
|
-
Menu.Positioner,
|
|
26
|
-
{
|
|
27
|
-
className: "isolate z-50 outline-none",
|
|
28
|
-
align,
|
|
29
|
-
alignOffset,
|
|
30
|
-
side,
|
|
31
|
-
sideOffset,
|
|
32
|
-
children: /* @__PURE__ */ jsx(
|
|
33
|
-
Menu.Popup,
|
|
34
|
-
{
|
|
35
|
-
"data-slot": "dropdown-menu-content",
|
|
36
|
-
className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
37
|
-
...props
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
) });
|
|
42
|
-
}
|
|
43
|
-
function DropdownMenuGroup({ ...props }) {
|
|
44
|
-
return /* @__PURE__ */ jsx(Menu.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
45
|
-
}
|
|
46
|
-
function DropdownMenuLabel({
|
|
47
|
-
className,
|
|
48
|
-
inset,
|
|
49
|
-
...props
|
|
50
|
-
}) {
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
Menu.GroupLabel,
|
|
53
|
-
{
|
|
54
|
-
"data-slot": "dropdown-menu-label",
|
|
55
|
-
"data-inset": inset,
|
|
56
|
-
className: cn(
|
|
57
|
-
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
58
|
-
className
|
|
59
|
-
),
|
|
60
|
-
...props
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
function DropdownMenuItem({
|
|
65
|
-
className,
|
|
66
|
-
inset,
|
|
67
|
-
variant = "default",
|
|
68
|
-
...props
|
|
69
|
-
}) {
|
|
70
|
-
return /* @__PURE__ */ jsx(
|
|
71
|
-
Menu.Item,
|
|
72
|
-
{
|
|
73
|
-
"data-slot": "dropdown-menu-item",
|
|
74
|
-
"data-inset": inset,
|
|
75
|
-
"data-variant": variant,
|
|
76
|
-
className: cn(
|
|
77
|
-
"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
78
|
-
className
|
|
79
|
-
),
|
|
80
|
-
...props
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
function DropdownMenuSub({ ...props }) {
|
|
85
|
-
return /* @__PURE__ */ jsx(Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
86
|
-
}
|
|
87
|
-
function DropdownMenuSubTrigger({
|
|
88
|
-
className,
|
|
89
|
-
inset,
|
|
90
|
-
children,
|
|
91
|
-
...props
|
|
92
|
-
}) {
|
|
93
|
-
return /* @__PURE__ */ jsxs(
|
|
94
|
-
Menu.SubmenuTrigger,
|
|
95
|
-
{
|
|
96
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
97
|
-
"data-inset": inset,
|
|
98
|
-
className: cn(
|
|
99
|
-
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
100
|
-
className
|
|
101
|
-
),
|
|
102
|
-
...props,
|
|
103
|
-
children: [
|
|
104
|
-
children,
|
|
105
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
function DropdownMenuSubContent({
|
|
111
|
-
align = "start",
|
|
112
|
-
alignOffset = -3,
|
|
113
|
-
side = "right",
|
|
114
|
-
sideOffset = 0,
|
|
115
|
-
className,
|
|
116
|
-
...props
|
|
117
|
-
}) {
|
|
118
|
-
return /* @__PURE__ */ jsx(
|
|
119
|
-
DropdownMenuContent,
|
|
120
|
-
{
|
|
121
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
122
|
-
className: cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
123
|
-
align,
|
|
124
|
-
alignOffset,
|
|
125
|
-
side,
|
|
126
|
-
sideOffset,
|
|
127
|
-
...props
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
function DropdownMenuCheckboxItem({
|
|
132
|
-
className,
|
|
133
|
-
children,
|
|
134
|
-
checked,
|
|
135
|
-
inset,
|
|
136
|
-
...props
|
|
137
|
-
}) {
|
|
138
|
-
return /* @__PURE__ */ jsxs(
|
|
139
|
-
Menu.CheckboxItem,
|
|
140
|
-
{
|
|
141
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
142
|
-
"data-inset": inset,
|
|
143
|
-
className: cn(
|
|
144
|
-
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
145
|
-
className
|
|
146
|
-
),
|
|
147
|
-
checked,
|
|
148
|
-
...props,
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ jsx(
|
|
151
|
-
"span",
|
|
152
|
-
{
|
|
153
|
-
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
154
|
-
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
155
|
-
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
156
|
-
CheckIcon,
|
|
157
|
-
{}
|
|
158
|
-
) })
|
|
159
|
-
}
|
|
160
|
-
),
|
|
161
|
-
children
|
|
162
|
-
]
|
|
163
|
-
}
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
function DropdownMenuRadioGroup({ ...props }) {
|
|
167
|
-
return /* @__PURE__ */ jsx(
|
|
168
|
-
Menu.RadioGroup,
|
|
169
|
-
{
|
|
170
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
171
|
-
...props
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
function DropdownMenuRadioItem({
|
|
176
|
-
className,
|
|
177
|
-
children,
|
|
178
|
-
inset,
|
|
179
|
-
...props
|
|
180
|
-
}) {
|
|
181
|
-
return /* @__PURE__ */ jsxs(
|
|
182
|
-
Menu.RadioItem,
|
|
183
|
-
{
|
|
184
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
185
|
-
"data-inset": inset,
|
|
186
|
-
className: cn(
|
|
187
|
-
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
188
|
-
className
|
|
189
|
-
),
|
|
190
|
-
...props,
|
|
191
|
-
children: [
|
|
192
|
-
/* @__PURE__ */ jsx(
|
|
193
|
-
"span",
|
|
194
|
-
{
|
|
195
|
-
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
196
|
-
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
197
|
-
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
198
|
-
CheckIcon,
|
|
199
|
-
{}
|
|
200
|
-
) })
|
|
201
|
-
}
|
|
202
|
-
),
|
|
203
|
-
children
|
|
204
|
-
]
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
function DropdownMenuSeparator({
|
|
209
|
-
className,
|
|
210
|
-
...props
|
|
211
|
-
}) {
|
|
212
|
-
return /* @__PURE__ */ jsx(
|
|
213
|
-
Menu.Separator,
|
|
214
|
-
{
|
|
215
|
-
"data-slot": "dropdown-menu-separator",
|
|
216
|
-
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
217
|
-
...props
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
function DropdownMenuShortcut({
|
|
222
|
-
className,
|
|
223
|
-
...props
|
|
224
|
-
}) {
|
|
225
|
-
return /* @__PURE__ */ jsx(
|
|
226
|
-
"span",
|
|
227
|
-
{
|
|
228
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
229
|
-
className: cn(
|
|
230
|
-
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
231
|
-
className
|
|
232
|
-
),
|
|
233
|
-
...props
|
|
234
|
-
}
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
2
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from '../chunk-V7VQVDWS.js';
|
|
3
|
+
import '../chunk-77QBZC7J.js';
|
|
@@ -1,127 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { XIcon } from 'lucide-react';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function Sheet({ ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(Dialog.Root, { "data-slot": "sheet", ...props });
|
|
10
|
-
}
|
|
11
|
-
function SheetTrigger({ ...props }) {
|
|
12
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
13
|
-
}
|
|
14
|
-
function SheetClose({ ...props }) {
|
|
15
|
-
return /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "sheet-close", ...props });
|
|
16
|
-
}
|
|
17
|
-
function SheetPortal({ ...props }) {
|
|
18
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
19
|
-
}
|
|
20
|
-
function SheetOverlay({ className, ...props }) {
|
|
21
|
-
return /* @__PURE__ */ jsx(
|
|
22
|
-
Dialog.Backdrop,
|
|
23
|
-
{
|
|
24
|
-
"data-slot": "sheet-overlay",
|
|
25
|
-
className: cn(
|
|
26
|
-
"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
|
27
|
-
className
|
|
28
|
-
),
|
|
29
|
-
...props
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function SheetContent({
|
|
34
|
-
className,
|
|
35
|
-
children,
|
|
36
|
-
side = "right",
|
|
37
|
-
showCloseButton = true,
|
|
38
|
-
...props
|
|
39
|
-
}) {
|
|
40
|
-
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
41
|
-
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
42
|
-
/* @__PURE__ */ jsxs(
|
|
43
|
-
Dialog.Popup,
|
|
44
|
-
{
|
|
45
|
-
"data-slot": "sheet-content",
|
|
46
|
-
"data-side": side,
|
|
47
|
-
className: cn(
|
|
48
|
-
"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
|
|
49
|
-
className
|
|
50
|
-
),
|
|
51
|
-
...props,
|
|
52
|
-
children: [
|
|
53
|
-
children,
|
|
54
|
-
showCloseButton && /* @__PURE__ */ jsxs(
|
|
55
|
-
Dialog.Close,
|
|
56
|
-
{
|
|
57
|
-
"data-slot": "sheet-close",
|
|
58
|
-
render: /* @__PURE__ */ jsx(
|
|
59
|
-
Button,
|
|
60
|
-
{
|
|
61
|
-
variant: "ghost",
|
|
62
|
-
className: "absolute top-3 right-3",
|
|
63
|
-
size: "icon-sm"
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
XIcon,
|
|
69
|
-
{}
|
|
70
|
-
),
|
|
71
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
] });
|
|
79
|
-
}
|
|
80
|
-
function SheetHeader({ className, ...props }) {
|
|
81
|
-
return /* @__PURE__ */ jsx(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
"data-slot": "sheet-header",
|
|
85
|
-
className: cn("flex flex-col gap-0.5 p-4", className),
|
|
86
|
-
...props
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
function SheetFooter({ className, ...props }) {
|
|
91
|
-
return /* @__PURE__ */ jsx(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
"data-slot": "sheet-footer",
|
|
95
|
-
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
96
|
-
...props
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
function SheetTitle({ className, ...props }) {
|
|
101
|
-
return /* @__PURE__ */ jsx(
|
|
102
|
-
Dialog.Title,
|
|
103
|
-
{
|
|
104
|
-
"data-slot": "sheet-title",
|
|
105
|
-
className: cn(
|
|
106
|
-
"font-heading text-base font-medium text-foreground",
|
|
107
|
-
className
|
|
108
|
-
),
|
|
109
|
-
...props
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
function SheetDescription({
|
|
114
|
-
className,
|
|
115
|
-
...props
|
|
116
|
-
}) {
|
|
117
|
-
return /* @__PURE__ */ jsx(
|
|
118
|
-
Dialog.Description,
|
|
119
|
-
{
|
|
120
|
-
"data-slot": "sheet-description",
|
|
121
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
122
|
-
...props
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
2
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from '../chunk-3YKVH4Y7.js';
|
|
3
|
+
import '../chunk-I4WDVYHX.js';
|
|
4
|
+
import '../chunk-77QBZC7J.js';
|
package/dist/ui-config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { b as OvrConfig } from './schema-CdsFQxIg.js';
|
|
3
3
|
import { a as Formatters } from './format-C7MSwUHK.js';
|
|
4
|
-
import { D as Dictionary } from './types-
|
|
4
|
+
import { D as Dictionary } from './types-BOgdk0Jw.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './types.js';
|
|
7
7
|
|
package/dist/ui-config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { OvrConfigProvider, ThemeProvider, useCopy, useFormatters, useOvrConfig, useTheme } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
export { OvrConfigProvider, ThemeProvider, useCopy, useFormatters, useOvrConfig, useTheme } from './chunk-TJSNVTVB.js';
|
|
3
|
+
import './chunk-BI4EGLPG.js';
|
package/dist/ui-server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as OvrConfig } from './schema-CdsFQxIg.js';
|
|
2
2
|
import { a as Formatters } from './format-C7MSwUHK.js';
|
|
3
|
-
import { D as Dictionary, C as CopyOverrides } from './types-
|
|
3
|
+
import { D as Dictionary, C as CopyOverrides } from './types-BOgdk0Jw.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import './types.js';
|
|
6
6
|
|
package/dist/ui-server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gelabs/ovr",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The @gelabs/ovr SDK — one self-contained package over the OVR (Online Ordinance Violation Receipt) platform. A standalone per-LGU app installs ONLY this package and imports from @gelabs/ovr/{config,core,data,runtime,auth,ui,...}; the seven @gelabs/ovr-* implementation packages are bundled in at build time.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
"@gelabs/ovr-core": "0.0.0",
|
|
165
165
|
"@gelabs/ovr-auth": "0.0.0",
|
|
166
166
|
"@gelabs/ovr-ui": "0.0.0",
|
|
167
|
-
"@gelabs/ovr-
|
|
168
|
-
"@gelabs/ovr-
|
|
167
|
+
"@gelabs/ovr-runtime": "0.0.0",
|
|
168
|
+
"@gelabs/ovr-offline": "0.0.0"
|
|
169
169
|
},
|
|
170
170
|
"scripts": {
|
|
171
171
|
"build": "tsup && node scripts/copy-assets.mjs",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- GE-013 (custom roles): roles + permissions become editable DATA.
|
|
2
|
+
|
|
3
|
+
-- CreateTable
|
|
4
|
+
CREATE TABLE "Role" (
|
|
5
|
+
"name" TEXT NOT NULL,
|
|
6
|
+
"label" TEXT NOT NULL,
|
|
7
|
+
"isSystem" BOOLEAN NOT NULL DEFAULT false,
|
|
8
|
+
"permissions" TEXT[] NOT NULL DEFAULT ARRAY[]::TEXT[],
|
|
9
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
10
|
+
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
11
|
+
CONSTRAINT "Role_pkey" PRIMARY KEY ("name")
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
-- Seed the system roles up-front (they must exist before the FK below, and so
|
|
15
|
+
-- existing User.role values 'ENFORCER'/'ADMIN'/'SUPER_ADMIN' satisfy it).
|
|
16
|
+
INSERT INTO "Role" ("name", "label", "isSystem", "permissions", "updatedAt") VALUES
|
|
17
|
+
('SUPER_ADMIN', 'Super Admin', true, ARRAY['dashboard:view','tickets:view','tickets:create','accounts:manage','roles:manage'], CURRENT_TIMESTAMP),
|
|
18
|
+
('ADMIN', 'Administrator', true, ARRAY['dashboard:view','tickets:view','tickets:create'], CURRENT_TIMESTAMP),
|
|
19
|
+
('ENFORCER', 'Enforcer', true, ARRAY['tickets:view','tickets:create'], CURRENT_TIMESTAMP);
|
|
20
|
+
|
|
21
|
+
-- Convert User.role from the UserRole enum to a TEXT foreign key into Role.name.
|
|
22
|
+
ALTER TABLE "User" ALTER COLUMN "role" DROP DEFAULT;
|
|
23
|
+
ALTER TABLE "User" ALTER COLUMN "role" TYPE TEXT USING "role"::text;
|
|
24
|
+
ALTER TABLE "User" ALTER COLUMN "role" SET DEFAULT 'ENFORCER';
|
|
25
|
+
|
|
26
|
+
-- AddForeignKey
|
|
27
|
+
ALTER TABLE "User" ADD CONSTRAINT "User_role_fkey" FOREIGN KEY ("role") REFERENCES "Role"("name") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
28
|
+
|
|
29
|
+
-- DropEnum (no longer referenced)
|
|
30
|
+
DROP TYPE "UserRole";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
-- GE-022: append-only audit trail of account actions.
|
|
3
|
+
CREATE TABLE "ActivityLog" (
|
|
4
|
+
"id" TEXT NOT NULL,
|
|
5
|
+
"actorId" TEXT,
|
|
6
|
+
"actorUsername" TEXT,
|
|
7
|
+
"action" TEXT NOT NULL,
|
|
8
|
+
"summary" TEXT NOT NULL,
|
|
9
|
+
"targetType" TEXT,
|
|
10
|
+
"targetId" TEXT,
|
|
11
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
12
|
+
CONSTRAINT "ActivityLog_pkey" PRIMARY KEY ("id")
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
-- CreateIndex
|
|
16
|
+
CREATE INDEX "ActivityLog_action_idx" ON "ActivityLog"("action");
|
|
17
|
+
CREATE INDEX "ActivityLog_actorId_idx" ON "ActivityLog"("actorId");
|
|
18
|
+
CREATE INDEX "ActivityLog_createdAt_idx" ON "ActivityLog"("createdAt");
|