@burdenoff/microfe-govcitizenhub 2026.720.6 → 2026.730.1
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/govcitizenhub/GovCitizenHubRoot.d.ts.map +1 -1
- package/dist/govcitizenhub/GovCitizenHubRoot.js +44 -36
- package/dist/govcitizenhub/GovCitizenHubRoot.js.map +1 -1
- package/dist/govcitizenhub/GovCitizenHubRoutes.d.ts.map +1 -1
- package/dist/govcitizenhub/GovCitizenHubRoutes.js +134 -6
- package/dist/govcitizenhub/GovCitizenHubRoutes.js.map +1 -1
- package/dist/govcitizenhub/components/DocumentUploadField.d.ts +17 -11
- package/dist/govcitizenhub/components/DocumentUploadField.d.ts.map +1 -1
- package/dist/govcitizenhub/components/DocumentUploadField.js +45 -42
- package/dist/govcitizenhub/components/DocumentUploadField.js.map +1 -1
- package/dist/govcitizenhub/components/GovCharts.js +127 -51
- package/dist/govcitizenhub/components/GovCharts.js.map +1 -1
- package/dist/govcitizenhub/hooks/index.d.ts +2 -0
- package/dist/govcitizenhub/hooks/index.d.ts.map +1 -1
- package/dist/govcitizenhub/hooks/index.js +2 -0
- package/dist/govcitizenhub/hooks/useGovApi.d.ts +23 -0
- package/dist/govcitizenhub/hooks/useGovApi.d.ts.map +1 -1
- package/dist/govcitizenhub/hooks/useGovApi.js +18 -7
- package/dist/govcitizenhub/hooks/useGovApi.js.map +1 -1
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.d.ts +24 -0
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.d.ts.map +1 -0
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.js +40 -0
- package/dist/govcitizenhub/hooks/useGovCitizenHubAnalytics.js.map +1 -0
- package/dist/govcitizenhub/hooks/useIntelligenceApi.d.ts +214 -0
- package/dist/govcitizenhub/hooks/useIntelligenceApi.d.ts.map +1 -0
- package/dist/govcitizenhub/hooks/useIntelligenceApi.js +1140 -0
- package/dist/govcitizenhub/hooks/useIntelligenceApi.js.map +1 -0
- package/dist/govcitizenhub/index.d.ts +1 -0
- package/dist/govcitizenhub/index.d.ts.map +1 -1
- package/dist/govcitizenhub/index.js +18 -0
- package/dist/govcitizenhub/pages/agencies/AgenciesPage.js +7 -7
- package/dist/govcitizenhub/pages/agencies/AgencyFormDialog.js +6 -6
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js +178 -172
- package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/ApplicationsPage.js +35 -35
- package/dist/govcitizenhub/pages/applications/ApplicationsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js +151 -147
- package/dist/govcitizenhub/pages/applications/NewApplicationPage.js.map +1 -1
- package/dist/govcitizenhub/pages/documents/DocumentsPage.js +5 -5
- package/dist/govcitizenhub/pages/grievances/GrievanceDetailPage.js +30 -30
- package/dist/govcitizenhub/pages/grievances/GrievanceDetailPage.js.map +1 -1
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.js +176 -172
- package/dist/govcitizenhub/pages/grievances/GrievancesPage.js.map +1 -1
- package/dist/govcitizenhub/pages/intelligence/AdminLevelsPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/AdminLevelsPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/AdminLevelsPage.js +634 -0
- package/dist/govcitizenhub/pages/intelligence/AdminLevelsPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/AssetFormDialog.d.ts +20 -0
- package/dist/govcitizenhub/pages/intelligence/AssetFormDialog.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/AssetFormDialog.js +537 -0
- package/dist/govcitizenhub/pages/intelligence/AssetFormDialog.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/AssetImage.d.ts +11 -0
- package/dist/govcitizenhub/pages/intelligence/AssetImage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/AssetImage.js +25 -0
- package/dist/govcitizenhub/pages/intelligence/AssetImage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/AssetMapPanel.d.ts +15 -0
- package/dist/govcitizenhub/pages/intelligence/AssetMapPanel.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/AssetMapPanel.js +203 -0
- package/dist/govcitizenhub/pages/intelligence/AssetMapPanel.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/BenchmarkPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/BenchmarkPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/BenchmarkPage.js +497 -0
- package/dist/govcitizenhub/pages/intelligence/BenchmarkPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/BudgetPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/BudgetPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/BudgetPage.js +1084 -0
- package/dist/govcitizenhub/pages/intelligence/BudgetPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationFormDialog.d.ts +13 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationFormDialog.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationFormDialog.js +581 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationFormDialog.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationParticipateDialog.d.ts +11 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationParticipateDialog.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationParticipateDialog.js +429 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationParticipateDialog.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationResultsPanel.d.ts +8 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationResultsPanel.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationResultsPanel.js +235 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationResultsPanel.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationsPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationsPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationsPage.js +534 -0
- package/dist/govcitizenhub/pages/intelligence/ConsultationsPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/CorrectionsPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/CorrectionsPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/CorrectionsPage.js +723 -0
- package/dist/govcitizenhub/pages/intelligence/CorrectionsPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ElectionsPage.d.ts +5 -0
- package/dist/govcitizenhub/pages/intelligence/ElectionsPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ElectionsPage.js +1029 -0
- package/dist/govcitizenhub/pages/intelligence/ElectionsPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/GovernancePage.d.ts +5 -0
- package/dist/govcitizenhub/pages/intelligence/GovernancePage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/GovernancePage.js +1545 -0
- package/dist/govcitizenhub/pages/intelligence/GovernancePage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorCatalogPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorCatalogPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorCatalogPage.js +960 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorCatalogPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorsPage.d.ts +13 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorsPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorsPage.js +927 -0
- package/dist/govcitizenhub/pages/intelligence/IndicatorsPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionDirectoryPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionDirectoryPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionDirectoryPage.js +620 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionDirectoryPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionLayout.d.ts +20 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionLayout.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionLayout.js +183 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionLayout.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionProfilePage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionProfilePage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionProfilePage.js +629 -0
- package/dist/govcitizenhub/pages/intelligence/JurisdictionProfilePage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/OpenDataPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/OpenDataPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/OpenDataPage.js +1124 -0
- package/dist/govcitizenhub/pages/intelligence/OpenDataPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ProjectsPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/ProjectsPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ProjectsPage.js +1518 -0
- package/dist/govcitizenhub/pages/intelligence/ProjectsPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/PublicAssetsPage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/PublicAssetsPage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/PublicAssetsPage.js +577 -0
- package/dist/govcitizenhub/pages/intelligence/PublicAssetsPage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ServicePerformancePage.d.ts +4 -0
- package/dist/govcitizenhub/pages/intelligence/ServicePerformancePage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/ServicePerformancePage.js +534 -0
- package/dist/govcitizenhub/pages/intelligence/ServicePerformancePage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/TimelinePage.d.ts +5 -0
- package/dist/govcitizenhub/pages/intelligence/TimelinePage.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/TimelinePage.js +538 -0
- package/dist/govcitizenhub/pages/intelligence/TimelinePage.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/consultationQuestions.d.ts +53 -0
- package/dist/govcitizenhub/pages/intelligence/consultationQuestions.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/consultationQuestions.js +138 -0
- package/dist/govcitizenhub/pages/intelligence/consultationQuestions.js.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/index.d.ts +27 -0
- package/dist/govcitizenhub/pages/intelligence/index.d.ts.map +1 -0
- package/dist/govcitizenhub/pages/intelligence/index.js +17 -0
- package/dist/govcitizenhub/pages/payments/PaymentsPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/payments/PaymentsPage.js +53 -49
- package/dist/govcitizenhub/pages/payments/PaymentsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js +82 -76
- package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js.map +1 -1
- package/dist/govcitizenhub/pages/permits/PermitsPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/permits/PermitsPage.js +174 -120
- package/dist/govcitizenhub/pages/permits/PermitsPage.js.map +1 -1
- package/dist/govcitizenhub/pages/services/ServiceDetailPage.js +8 -8
- package/dist/govcitizenhub/pages/services/ServiceFormDialog.js +98 -98
- package/dist/govcitizenhub/pages/services/ServiceFormDialog.js.map +1 -1
- package/dist/govcitizenhub/types/index.d.ts +1 -0
- package/dist/govcitizenhub/types/index.d.ts.map +1 -1
- package/dist/govcitizenhub/types/intelligence.d.ts +1559 -0
- package/dist/govcitizenhub/types/intelligence.d.ts.map +1 -0
- package/dist/govcitizenhub/types/intelligence.js +125 -0
- package/dist/govcitizenhub/types/intelligence.js.map +1 -0
- package/dist/index.js +19 -2
- package/dist/node_modules/recharts/es6/chart/BarChart.js +24 -0
- package/dist/node_modules/recharts/es6/chart/BarChart.js.map +1 -0
- package/dist/utils/pageContext.d.ts +1 -0
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +44 -17
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,25 +4,26 @@ import { PageLayout as t } from "../../components/PageLayout.js";
|
|
|
4
4
|
import { formatCurrency as n, formatDate as r, formatDateTime as i, formatEnumLabel as a, formatRelativeTime as o } from "../../utils/formatters.js";
|
|
5
5
|
import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
6
6
|
import { useGovAddCaseNote as c, useGovApplication as l, useGovCreatePayment as u, useGovMarkPaymentPaid as d, useGovPayments as f, useGovRefundPayment as ee, useGovReviewDocument as te, useGovService as ne, useGovSubmitApplication as re, useGovTransitionApplication as ie, useGovUpdateApplication as ae } from "../../hooks/useGovApi.js";
|
|
7
|
+
import { useGovCitizenHubAnalytics as oe } from "../../hooks/useGovCitizenHubAnalytics.js";
|
|
7
8
|
import "../../hooks/index.js";
|
|
8
|
-
import { ErrorView as
|
|
9
|
-
import { SlaBadge as
|
|
9
|
+
import { ErrorView as se, LoadingView as ce } from "../../components/StateViews.js";
|
|
10
|
+
import { SlaBadge as le } from "../../components/SlaBadge.js";
|
|
10
11
|
import { AssigneeChip as p } from "../../components/Avatar.js";
|
|
11
|
-
import {
|
|
12
|
+
import { SectionCard as m } from "../../components/SectionCard.js";
|
|
12
13
|
import { describeError as h, notify as g } from "../../lib/toast.js";
|
|
13
|
-
import {
|
|
14
|
-
import { Timeline as ue, TimelineItem as de } from "../../components/Timeline.js";
|
|
15
|
-
import { SectionCard as _ } from "../../components/SectionCard.js";
|
|
14
|
+
import { ConfirmDialog as _ } from "../../components/ConfirmDialog.js";
|
|
16
15
|
import { KeyValueList as v } from "../../components/KeyValueList.js";
|
|
17
|
-
import { DocumentUploadField as
|
|
18
|
-
import {
|
|
16
|
+
import { DocumentUploadField as ue } from "../../components/DocumentUploadField.js";
|
|
17
|
+
import { Timeline as de, TimelineItem as fe } from "../../components/Timeline.js";
|
|
18
|
+
import { StatusStepper as pe } from "../../components/StatusStepper.js";
|
|
19
|
+
import { IssuePermitDialog as me } from "../permits/IssuePermitDialog.js";
|
|
19
20
|
import { useEffect as y, useMemo as b, useState as x } from "react";
|
|
20
|
-
import { BadgeCheck as
|
|
21
|
-
import { useParams as
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { Button as M, DropdownMenu as
|
|
21
|
+
import { BadgeCheck as he, Check as ge, CheckCircle2 as S, ChevronDown as _e, ClipboardList as ve, CreditCard as ye, Eye as be, FileText as xe, Gavel as C, HelpCircle as w, Lock as T, MessageSquare as E, PlayCircle as D, Plus as O, Route as Se, Send as Ce, UserPlus as we, X as Te, XCircle as k } from "lucide-react";
|
|
22
|
+
import { useParams as Ee } from "react-router-dom";
|
|
23
|
+
import { Fragment as De, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
24
|
+
import { Button as M, DropdownMenu as Oe, DropdownMenuContent as ke, DropdownMenuItem as Ae, DropdownMenuTrigger as je, Input as N, Label as P, ResponsiveDialog as F, ResponsiveDialogContent as I, ResponsiveDialogDescription as L, ResponsiveDialogFooter as R, ResponsiveDialogHeader as z, ResponsiveDialogTitle as B, Select as Me, SelectContent as Ne, SelectItem as Pe, SelectTrigger as Fe, SelectValue as Ie, Textarea as Le } from "@burdenoff/fe-libs/ui";
|
|
24
25
|
//#region src/govcitizenhub/pages/applications/ApplicationDetailPage.tsx
|
|
25
|
-
var
|
|
26
|
+
var Re = [
|
|
26
27
|
"INTERNAL",
|
|
27
28
|
"CITIZEN_MESSAGE",
|
|
28
29
|
"INFO_REQUEST",
|
|
@@ -55,7 +56,7 @@ function H(e) {
|
|
|
55
56
|
return e.name?.trim() || t || e.username?.trim() || e.email;
|
|
56
57
|
}
|
|
57
58
|
var U = (e) => e.slice(0, 8);
|
|
58
|
-
function
|
|
59
|
+
function ze(e) {
|
|
59
60
|
switch (e) {
|
|
60
61
|
case "SUBMITTED": return [
|
|
61
62
|
{
|
|
@@ -129,7 +130,7 @@ function Re(e) {
|
|
|
129
130
|
default: return [];
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
+
function Be(e) {
|
|
133
134
|
let t = e.status === "APPROVED" ? "Approved" : e.status === "REJECTED" ? "Rejected" : e.status === "WITHDRAWN" ? "Withdrawn" : "Decision";
|
|
134
135
|
return {
|
|
135
136
|
steps: [
|
|
@@ -164,7 +165,7 @@ function ze(e) {
|
|
|
164
165
|
}[e.status]
|
|
165
166
|
};
|
|
166
167
|
}
|
|
167
|
-
function
|
|
168
|
+
function Ve({ assignedToId: e, currentUser: t }) {
|
|
168
169
|
return e ? t?.id && e === t.id ? /* @__PURE__ */ A(p, {
|
|
169
170
|
name: H(t) ?? "You",
|
|
170
171
|
src: t.avatar,
|
|
@@ -178,109 +179,109 @@ function Be({ assignedToId: e, currentUser: t }) {
|
|
|
178
179
|
});
|
|
179
180
|
}
|
|
180
181
|
function W() {
|
|
181
|
-
let { id: p } =
|
|
182
|
+
let { id: p } = Ee(), { navigateTo: y, currentUser: S, workspaceId: C } = e(), { emitPaymentSettled: w } = oe(), { data: T, isLoading: D, isError: k, refetch: N } = l(p), { data: F } = ne(T?.serviceId), I = f({
|
|
182
183
|
applicationId: p,
|
|
183
184
|
pagination: { limit: 50 }
|
|
184
|
-
}),
|
|
185
|
+
}), L = re(), R = ie(), z = ae(), B = te(), H = c(), W = u(), G = d(), Ue = ee(), [K, q] = x(null), [J, Y] = x(null), [X, We] = x(""), [Ge, Ke] = x("INTERNAL"), [qe, Je] = x(!1), [Ye, Xe] = x(!1), Z = b(() => T ? ze(T.status) : [], [T]), Ze = b(() => T ? Be(T) : {
|
|
185
186
|
steps: [],
|
|
186
187
|
current: 0
|
|
187
|
-
}, [
|
|
188
|
-
let e =
|
|
188
|
+
}, [T]), Qe = b(() => {
|
|
189
|
+
let e = T?.formData;
|
|
189
190
|
return !e || typeof e != "object" || Array.isArray(e) ? [] : Object.entries(e).filter(([, e]) => e != null && String(e).trim() !== "");
|
|
190
|
-
}, [
|
|
191
|
-
if (
|
|
191
|
+
}, [T?.formData]), Q = b(() => T ? [...T.notes].sort((e, t) => new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime()) : [], [T]);
|
|
192
|
+
if (D) return /* @__PURE__ */ A(t, {
|
|
192
193
|
title: "Application",
|
|
193
194
|
back: {
|
|
194
195
|
label: "Applications",
|
|
195
196
|
onClick: () => y("applications")
|
|
196
197
|
},
|
|
197
|
-
children: /* @__PURE__ */ A(
|
|
198
|
+
children: /* @__PURE__ */ A(ce, { label: "Loading application…" })
|
|
198
199
|
});
|
|
199
|
-
if (
|
|
200
|
+
if (k || !T) return /* @__PURE__ */ A(t, {
|
|
200
201
|
title: "Application",
|
|
201
202
|
back: {
|
|
202
203
|
label: "Applications",
|
|
203
204
|
onClick: () => y("applications")
|
|
204
205
|
},
|
|
205
|
-
children: /* @__PURE__ */ A(
|
|
206
|
+
children: /* @__PURE__ */ A(se, {
|
|
206
207
|
message: "We couldn't load this application.",
|
|
207
|
-
onRetry: () =>
|
|
208
|
+
onRetry: () => N()
|
|
208
209
|
})
|
|
209
210
|
});
|
|
210
|
-
let
|
|
211
|
+
let $e = async () => {
|
|
211
212
|
try {
|
|
212
|
-
await
|
|
213
|
+
await L.mutateAsync(T.id), g.success("Application submitted", T.reference);
|
|
213
214
|
} catch (e) {
|
|
214
215
|
g.error("Could not submit", h(e));
|
|
215
216
|
}
|
|
216
|
-
},
|
|
217
|
+
}, et = async (e, t) => {
|
|
217
218
|
try {
|
|
218
|
-
await
|
|
219
|
-
id:
|
|
219
|
+
await R.mutateAsync({
|
|
220
|
+
id: T.id,
|
|
220
221
|
status: e.status,
|
|
221
222
|
reason: t.trim() || null
|
|
222
223
|
}), g.success("Application updated", `Status is now ${a(e.status)}.`);
|
|
223
224
|
} catch (e) {
|
|
224
225
|
g.error("Could not update the application", h(e));
|
|
225
226
|
}
|
|
226
|
-
},
|
|
227
|
+
}, tt = async () => {
|
|
227
228
|
if (S?.id) try {
|
|
228
|
-
await
|
|
229
|
-
id:
|
|
229
|
+
await z.mutateAsync({
|
|
230
|
+
id: T.id,
|
|
230
231
|
input: { assignedToId: S.id }
|
|
231
232
|
}), g.success("Assigned to you");
|
|
232
233
|
} catch (e) {
|
|
233
234
|
g.error("Could not assign", h(e));
|
|
234
235
|
}
|
|
235
|
-
},
|
|
236
|
+
}, nt = async (e) => {
|
|
236
237
|
try {
|
|
237
|
-
await
|
|
238
|
+
await B.mutateAsync({
|
|
238
239
|
id: e.id,
|
|
239
240
|
status: "ACCEPTED",
|
|
240
|
-
applicationId:
|
|
241
|
+
applicationId: T.id
|
|
241
242
|
}), g.success("Document accepted", e.name);
|
|
242
243
|
} catch (e) {
|
|
243
244
|
g.error("Could not accept document", h(e));
|
|
244
245
|
}
|
|
245
|
-
},
|
|
246
|
-
if (
|
|
247
|
-
await
|
|
248
|
-
applicationId:
|
|
249
|
-
body:
|
|
250
|
-
type:
|
|
251
|
-
}),
|
|
246
|
+
}, rt = async () => {
|
|
247
|
+
if (X.trim()) try {
|
|
248
|
+
await H.mutateAsync({
|
|
249
|
+
applicationId: T.id,
|
|
250
|
+
body: X.trim(),
|
|
251
|
+
type: Ge
|
|
252
|
+
}), We(""), g.success("Note added");
|
|
252
253
|
} catch (e) {
|
|
253
254
|
g.error("Could not add note", h(e));
|
|
254
255
|
}
|
|
255
|
-
},
|
|
256
|
-
e.reason === "none" ?
|
|
257
|
-
},
|
|
256
|
+
}, $ = L.isPending || R.isPending || z.isPending, it = !!(T.assignedToId && T.assignedToId === S?.id), at = (e) => {
|
|
257
|
+
e.reason === "none" ? et(e, "") : q(e);
|
|
258
|
+
}, ot = [
|
|
258
259
|
{
|
|
259
260
|
label: "Filed",
|
|
260
|
-
value: i(
|
|
261
|
+
value: i(T.createdAt)
|
|
261
262
|
},
|
|
262
263
|
{
|
|
263
264
|
label: "Submitted",
|
|
264
|
-
value:
|
|
265
|
+
value: T.submittedAt ? i(T.submittedAt) : "Not submitted"
|
|
265
266
|
},
|
|
266
267
|
{
|
|
267
268
|
label: "Due date",
|
|
268
|
-
value:
|
|
269
|
+
value: T.dueDate ? /* @__PURE__ */ j("span", {
|
|
269
270
|
className: "flex flex-col items-end gap-1",
|
|
270
|
-
children: [/* @__PURE__ */ A("span", { children: r(
|
|
271
|
-
dueDate:
|
|
272
|
-
status:
|
|
271
|
+
children: [/* @__PURE__ */ A("span", { children: r(T.dueDate) }), /* @__PURE__ */ A(le, {
|
|
272
|
+
dueDate: T.dueDate,
|
|
273
|
+
status: T.status
|
|
273
274
|
})]
|
|
274
275
|
}) : "—"
|
|
275
276
|
},
|
|
276
277
|
{
|
|
277
278
|
label: "Decided",
|
|
278
|
-
value:
|
|
279
|
+
value: T.decidedAt ? i(T.decidedAt) : "—"
|
|
279
280
|
},
|
|
280
281
|
{
|
|
281
282
|
label: "Assigned to",
|
|
282
|
-
value: /* @__PURE__ */ A(
|
|
283
|
-
assignedToId:
|
|
283
|
+
value: /* @__PURE__ */ A(Ve, {
|
|
284
|
+
assignedToId: T.assignedToId,
|
|
284
285
|
currentUser: S
|
|
285
286
|
})
|
|
286
287
|
}
|
|
@@ -291,18 +292,18 @@ function W() {
|
|
|
291
292
|
children: [
|
|
292
293
|
/* @__PURE__ */ A("span", {
|
|
293
294
|
className: "text-text-primary",
|
|
294
|
-
children:
|
|
295
|
+
children: T.reference
|
|
295
296
|
}),
|
|
296
|
-
|
|
297
|
+
F && /* @__PURE__ */ j("span", {
|
|
297
298
|
className: "text-lg font-normal text-text-secondary",
|
|
298
|
-
children: ["· ",
|
|
299
|
+
children: ["· ", F.name]
|
|
299
300
|
}),
|
|
300
301
|
/* @__PURE__ */ A(s, {
|
|
301
|
-
status:
|
|
302
|
+
status: T.status,
|
|
302
303
|
size: "md"
|
|
303
304
|
}),
|
|
304
305
|
/* @__PURE__ */ A(s, {
|
|
305
|
-
status:
|
|
306
|
+
status: T.priority,
|
|
306
307
|
size: "md"
|
|
307
308
|
})
|
|
308
309
|
]
|
|
@@ -314,30 +315,30 @@ function W() {
|
|
|
314
315
|
actions: /* @__PURE__ */ j("div", {
|
|
315
316
|
className: "flex flex-wrap items-center gap-2",
|
|
316
317
|
children: [
|
|
317
|
-
!
|
|
318
|
+
!it && S?.id && /* @__PURE__ */ j(M, {
|
|
318
319
|
variant: "outline",
|
|
319
|
-
onClick:
|
|
320
|
-
disabled:
|
|
321
|
-
children: [/* @__PURE__ */ A(
|
|
320
|
+
onClick: tt,
|
|
321
|
+
disabled: z.isPending,
|
|
322
|
+
children: [/* @__PURE__ */ A(we, { className: "mr-1.5 h-4 w-4" }), " Assign to me"]
|
|
322
323
|
}),
|
|
323
|
-
|
|
324
|
-
onClick:
|
|
325
|
-
disabled:
|
|
326
|
-
children: [/* @__PURE__ */ A(
|
|
324
|
+
T.status === "DRAFT" && /* @__PURE__ */ j(M, {
|
|
325
|
+
onClick: $e,
|
|
326
|
+
disabled: $,
|
|
327
|
+
children: [/* @__PURE__ */ A(Ce, { className: "mr-1.5 h-4 w-4" }), " Submit"]
|
|
327
328
|
}),
|
|
328
|
-
|
|
329
|
-
disabled:
|
|
329
|
+
Z.length > 0 && /* @__PURE__ */ j(Oe, { children: [/* @__PURE__ */ j(je, {
|
|
330
|
+
disabled: $,
|
|
330
331
|
className: "inline-flex items-center gap-1.5 rounded-button bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:opacity-50",
|
|
331
332
|
"aria-label": "Advance status",
|
|
332
|
-
children: ["Advance status ", /* @__PURE__ */ A(
|
|
333
|
-
}), /* @__PURE__ */ A(
|
|
333
|
+
children: ["Advance status ", /* @__PURE__ */ A(_e, { className: "size-4" })]
|
|
334
|
+
}), /* @__PURE__ */ A(ke, {
|
|
334
335
|
align: "end",
|
|
335
336
|
className: "min-w-48",
|
|
336
|
-
children:
|
|
337
|
+
children: Z.map((e) => {
|
|
337
338
|
let t = e.icon;
|
|
338
|
-
return /* @__PURE__ */ j(
|
|
339
|
+
return /* @__PURE__ */ j(Ae, {
|
|
339
340
|
className: `gap-2 ${e.destructive ? "text-status-error-text focus:text-status-error-text" : ""}`,
|
|
340
|
-
onSelect: () =>
|
|
341
|
+
onSelect: () => at(e),
|
|
341
342
|
children: [
|
|
342
343
|
/* @__PURE__ */ A(t, { className: "size-4" }),
|
|
343
344
|
" ",
|
|
@@ -349,13 +350,13 @@ function W() {
|
|
|
349
350
|
]
|
|
350
351
|
}),
|
|
351
352
|
children: [
|
|
352
|
-
/* @__PURE__ */ A(
|
|
353
|
+
/* @__PURE__ */ A(m, {
|
|
353
354
|
title: "Progress",
|
|
354
|
-
icon: /* @__PURE__ */ A(
|
|
355
|
+
icon: /* @__PURE__ */ A(Se, {}),
|
|
355
356
|
className: "mb-4 border-border-seam",
|
|
356
|
-
children: /* @__PURE__ */ A(
|
|
357
|
-
steps:
|
|
358
|
-
current:
|
|
357
|
+
children: /* @__PURE__ */ A(pe, {
|
|
358
|
+
steps: Ze.steps,
|
|
359
|
+
current: Ze.current
|
|
359
360
|
})
|
|
360
361
|
}),
|
|
361
362
|
/* @__PURE__ */ j("div", {
|
|
@@ -363,49 +364,49 @@ function W() {
|
|
|
363
364
|
children: [/* @__PURE__ */ j("div", {
|
|
364
365
|
className: "space-y-4 lg:col-span-2",
|
|
365
366
|
children: [
|
|
366
|
-
|
|
367
|
+
T.decisionReason && /* @__PURE__ */ j("div", {
|
|
367
368
|
className: "rounded-card border border-border-seam bg-bg-sunken px-4 py-3 text-sm text-text-secondary",
|
|
368
369
|
children: [/* @__PURE__ */ A("span", {
|
|
369
370
|
className: "font-medium text-text-primary",
|
|
370
371
|
children: "Decision note: "
|
|
371
|
-
}),
|
|
372
|
+
}), T.decisionReason]
|
|
372
373
|
}),
|
|
373
|
-
/* @__PURE__ */ A(
|
|
374
|
+
/* @__PURE__ */ A(m, {
|
|
374
375
|
title: "Submitted information",
|
|
375
|
-
icon: /* @__PURE__ */ A(
|
|
376
|
+
icon: /* @__PURE__ */ A(ve, {}),
|
|
376
377
|
className: "border-border-seam",
|
|
377
|
-
children:
|
|
378
|
+
children: Qe.length === 0 ? /* @__PURE__ */ A("p", {
|
|
378
379
|
className: "text-sm text-text-secondary",
|
|
379
380
|
children: "No form data was captured with this application."
|
|
380
381
|
}) : /* @__PURE__ */ A(v, {
|
|
381
382
|
columns: 2,
|
|
382
383
|
variant: "stacked",
|
|
383
|
-
items:
|
|
384
|
+
items: Qe.map(([e, t]) => ({
|
|
384
385
|
label: a(e),
|
|
385
386
|
value: String(t)
|
|
386
387
|
}))
|
|
387
388
|
})
|
|
388
389
|
}),
|
|
389
|
-
/* @__PURE__ */ j(
|
|
390
|
+
/* @__PURE__ */ j(m, {
|
|
390
391
|
title: "Documents",
|
|
391
|
-
icon: /* @__PURE__ */ A(
|
|
392
|
+
icon: /* @__PURE__ */ A(xe, {}),
|
|
392
393
|
className: "border-border-seam",
|
|
393
394
|
actions: /* @__PURE__ */ j("span", {
|
|
394
395
|
className: "text-xs text-text-muted tabular-nums",
|
|
395
|
-
children: [
|
|
396
|
+
children: [T.documents.length, " attached"]
|
|
396
397
|
}),
|
|
397
398
|
children: [/* @__PURE__ */ A("div", {
|
|
398
399
|
className: "space-y-2.5",
|
|
399
|
-
children:
|
|
400
|
+
children: T.documents.length === 0 ? /* @__PURE__ */ A("p", {
|
|
400
401
|
className: "text-sm text-text-secondary",
|
|
401
402
|
children: "No documents attached yet."
|
|
402
|
-
}) :
|
|
403
|
+
}) : T.documents.map((e) => /* @__PURE__ */ j("div", {
|
|
403
404
|
className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
404
405
|
children: [/* @__PURE__ */ j("div", {
|
|
405
406
|
className: "flex min-w-0 items-center gap-3",
|
|
406
407
|
children: [/* @__PURE__ */ A("span", {
|
|
407
408
|
className: "inline-flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
408
|
-
children: /* @__PURE__ */ A(
|
|
409
|
+
children: /* @__PURE__ */ A(xe, { className: "size-4" })
|
|
409
410
|
}), /* @__PURE__ */ j("div", {
|
|
410
411
|
className: "min-w-0",
|
|
411
412
|
children: [
|
|
@@ -429,58 +430,58 @@ function W() {
|
|
|
429
430
|
})]
|
|
430
431
|
}), /* @__PURE__ */ j("div", {
|
|
431
432
|
className: "flex items-center gap-2",
|
|
432
|
-
children: [/* @__PURE__ */ A(s, { status: e.status }), e.status === "PENDING" && /* @__PURE__ */ j(
|
|
433
|
+
children: [/* @__PURE__ */ A(s, { status: e.status }), e.status === "PENDING" && /* @__PURE__ */ j(De, { children: [/* @__PURE__ */ A(M, {
|
|
433
434
|
size: "sm",
|
|
434
435
|
variant: "outline",
|
|
435
|
-
onClick: () =>
|
|
436
|
-
disabled:
|
|
436
|
+
onClick: () => nt(e),
|
|
437
|
+
disabled: B.isPending,
|
|
437
438
|
"aria-label": `Accept ${e.name}`,
|
|
438
|
-
children: /* @__PURE__ */ A(
|
|
439
|
+
children: /* @__PURE__ */ A(ge, { className: "h-4 w-4" })
|
|
439
440
|
}), /* @__PURE__ */ A(M, {
|
|
440
441
|
size: "sm",
|
|
441
442
|
variant: "outline",
|
|
442
|
-
onClick: () =>
|
|
443
|
-
disabled:
|
|
443
|
+
onClick: () => Y(e),
|
|
444
|
+
disabled: B.isPending,
|
|
444
445
|
"aria-label": `Reject ${e.name}`,
|
|
445
|
-
children: /* @__PURE__ */ A(
|
|
446
|
+
children: /* @__PURE__ */ A(Te, { className: "h-4 w-4" })
|
|
446
447
|
})] })]
|
|
447
448
|
})]
|
|
448
449
|
}, e.id))
|
|
449
450
|
}), /* @__PURE__ */ j("div", {
|
|
450
451
|
className: "mt-4 border-t border-border-seam pt-4",
|
|
451
|
-
children: [/* @__PURE__ */ A(
|
|
452
|
-
applicationId:
|
|
453
|
-
onAdded: () =>
|
|
454
|
-
}),
|
|
452
|
+
children: [/* @__PURE__ */ A(ue, {
|
|
453
|
+
applicationId: T.id,
|
|
454
|
+
onAdded: () => N()
|
|
455
|
+
}), F && F.requiredDocuments.length > 0 && /* @__PURE__ */ j("p", {
|
|
455
456
|
className: "mt-2 text-xs text-text-muted",
|
|
456
|
-
children: ["Required: ",
|
|
457
|
+
children: ["Required: ", F.requiredDocuments.join(", ")]
|
|
457
458
|
})]
|
|
458
459
|
})]
|
|
459
460
|
}),
|
|
460
|
-
/* @__PURE__ */ j(
|
|
461
|
+
/* @__PURE__ */ j(m, {
|
|
461
462
|
title: "Case notes",
|
|
462
463
|
icon: /* @__PURE__ */ A(E, {}),
|
|
463
464
|
className: "border-border-seam",
|
|
464
465
|
actions: /* @__PURE__ */ j("span", {
|
|
465
466
|
className: "text-xs text-text-muted tabular-nums",
|
|
466
467
|
children: [
|
|
467
|
-
|
|
468
|
+
T.notes.length,
|
|
468
469
|
" ",
|
|
469
|
-
|
|
470
|
+
T.notes.length === 1 ? "note" : "notes"
|
|
470
471
|
]
|
|
471
472
|
}),
|
|
472
|
-
children: [
|
|
473
|
+
children: [Q.length === 0 ? /* @__PURE__ */ A("p", {
|
|
473
474
|
className: "text-sm text-text-secondary",
|
|
474
475
|
children: "No case notes yet."
|
|
475
|
-
}) : /* @__PURE__ */ A(
|
|
476
|
+
}) : /* @__PURE__ */ A(de, { children: Q.map((e, t) => {
|
|
476
477
|
let n = V[e.type], r = n.icon, a = S?.id && e.authorId === S.id ? "You" : `#${U(e.authorId)}`;
|
|
477
|
-
return /* @__PURE__ */ A(
|
|
478
|
+
return /* @__PURE__ */ A(fe, {
|
|
478
479
|
tone: n.tone,
|
|
479
480
|
icon: /* @__PURE__ */ A(r, {}),
|
|
480
481
|
title: n.label,
|
|
481
482
|
author: a,
|
|
482
483
|
timestamp: i(e.createdAt),
|
|
483
|
-
last: t ===
|
|
484
|
+
last: t === Q.length - 1,
|
|
484
485
|
children: /* @__PURE__ */ A("p", {
|
|
485
486
|
className: "whitespace-pre-wrap text-text-primary",
|
|
486
487
|
children: e.body
|
|
@@ -488,9 +489,9 @@ function W() {
|
|
|
488
489
|
}, e.id);
|
|
489
490
|
}) }), /* @__PURE__ */ j("div", {
|
|
490
491
|
className: "mt-4 space-y-2 border-t border-border-seam pt-4",
|
|
491
|
-
children: [/* @__PURE__ */ A(
|
|
492
|
-
value:
|
|
493
|
-
onChange: (e) =>
|
|
492
|
+
children: [/* @__PURE__ */ A(Le, {
|
|
493
|
+
value: X,
|
|
494
|
+
onChange: (e) => We(e.target.value),
|
|
494
495
|
placeholder: "Add a case note…",
|
|
495
496
|
rows: 2,
|
|
496
497
|
"aria-label": "New case note"
|
|
@@ -502,22 +503,22 @@ function W() {
|
|
|
502
503
|
htmlFor: "note-type",
|
|
503
504
|
className: "text-xs text-text-muted",
|
|
504
505
|
children: "Note type"
|
|
505
|
-
}), /* @__PURE__ */ j(
|
|
506
|
-
value:
|
|
507
|
-
onValueChange: (e) =>
|
|
508
|
-
children: [/* @__PURE__ */ A(
|
|
506
|
+
}), /* @__PURE__ */ j(Me, {
|
|
507
|
+
value: Ge,
|
|
508
|
+
onValueChange: (e) => Ke(e),
|
|
509
|
+
children: [/* @__PURE__ */ A(Fe, {
|
|
509
510
|
id: "note-type",
|
|
510
511
|
className: "w-44",
|
|
511
512
|
"aria-label": "Note type",
|
|
512
|
-
children: /* @__PURE__ */ A(
|
|
513
|
-
}), /* @__PURE__ */ A(
|
|
513
|
+
children: /* @__PURE__ */ A(Ie, {})
|
|
514
|
+
}), /* @__PURE__ */ A(Ne, { children: Re.map((e) => /* @__PURE__ */ A(Pe, {
|
|
514
515
|
value: e,
|
|
515
516
|
children: V[e].label
|
|
516
517
|
}, e)) })]
|
|
517
518
|
})]
|
|
518
519
|
}), /* @__PURE__ */ j(M, {
|
|
519
|
-
onClick:
|
|
520
|
-
disabled: !
|
|
520
|
+
onClick: rt,
|
|
521
|
+
disabled: !X.trim() || H.isPending,
|
|
521
522
|
children: [/* @__PURE__ */ A(O, { className: "mr-1.5 h-4 w-4" }), " Add note"]
|
|
522
523
|
})]
|
|
523
524
|
})]
|
|
@@ -527,26 +528,26 @@ function W() {
|
|
|
527
528
|
}), /* @__PURE__ */ j("div", {
|
|
528
529
|
className: "space-y-4",
|
|
529
530
|
children: [
|
|
530
|
-
/* @__PURE__ */ A(
|
|
531
|
+
/* @__PURE__ */ A(m, {
|
|
531
532
|
title: "Case details",
|
|
532
|
-
icon: /* @__PURE__ */ A(
|
|
533
|
+
icon: /* @__PURE__ */ A(be, {}),
|
|
533
534
|
className: "border-border-seam",
|
|
534
|
-
children: /* @__PURE__ */ A(v, { items:
|
|
535
|
+
children: /* @__PURE__ */ A(v, { items: ot })
|
|
535
536
|
}),
|
|
536
|
-
/* @__PURE__ */ A(
|
|
537
|
+
/* @__PURE__ */ A(m, {
|
|
537
538
|
title: "Payments",
|
|
538
|
-
icon: /* @__PURE__ */ A(
|
|
539
|
+
icon: /* @__PURE__ */ A(ye, {}),
|
|
539
540
|
className: "border-border-seam",
|
|
540
541
|
actions: /* @__PURE__ */ A(M, {
|
|
541
542
|
size: "sm",
|
|
542
543
|
variant: "outline",
|
|
543
|
-
onClick: () =>
|
|
544
|
+
onClick: () => Je(!0),
|
|
544
545
|
"aria-label": "Record payment",
|
|
545
546
|
children: /* @__PURE__ */ A(O, { className: "h-4 w-4" })
|
|
546
547
|
}),
|
|
547
548
|
children: /* @__PURE__ */ A("div", {
|
|
548
549
|
className: "space-y-2",
|
|
549
|
-
children:
|
|
550
|
+
children: I.data?.items.length ? I.data.items.map((e) => /* @__PURE__ */ j("div", {
|
|
550
551
|
className: "rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
551
552
|
children: [
|
|
552
553
|
/* @__PURE__ */ j("div", {
|
|
@@ -565,14 +566,19 @@ function W() {
|
|
|
565
566
|
children: [e.status === "PENDING" && /* @__PURE__ */ A(M, {
|
|
566
567
|
size: "sm",
|
|
567
568
|
variant: "outline",
|
|
568
|
-
onClick: () =>
|
|
569
|
-
|
|
569
|
+
onClick: () => G.mutateAsync({ id: e.id }).then(() => {
|
|
570
|
+
g.success("Marked as paid"), w({
|
|
571
|
+
workspaceId: C,
|
|
572
|
+
id: e.id
|
|
573
|
+
});
|
|
574
|
+
}).catch((e) => g.error("Could not update", h(e))),
|
|
575
|
+
disabled: G.isPending,
|
|
570
576
|
children: "Mark paid"
|
|
571
577
|
}), e.status === "PAID" && /* @__PURE__ */ A(M, {
|
|
572
578
|
size: "sm",
|
|
573
579
|
variant: "outline",
|
|
574
|
-
onClick: () =>
|
|
575
|
-
disabled:
|
|
580
|
+
onClick: () => Ue.mutateAsync(e.id).then(() => g.success("Refunded")).catch((e) => g.error("Could not refund", h(e))),
|
|
581
|
+
disabled: Ue.isPending,
|
|
576
582
|
children: "Refund"
|
|
577
583
|
})]
|
|
578
584
|
})
|
|
@@ -583,20 +589,20 @@ function W() {
|
|
|
583
589
|
})
|
|
584
590
|
})
|
|
585
591
|
}),
|
|
586
|
-
/* @__PURE__ */ A(
|
|
592
|
+
/* @__PURE__ */ A(m, {
|
|
587
593
|
title: "Permits",
|
|
588
|
-
icon: /* @__PURE__ */ A(
|
|
594
|
+
icon: /* @__PURE__ */ A(he, {}),
|
|
589
595
|
className: "border-border-seam",
|
|
590
596
|
actions: /* @__PURE__ */ A(M, {
|
|
591
597
|
size: "sm",
|
|
592
598
|
variant: "outline",
|
|
593
|
-
onClick: () =>
|
|
599
|
+
onClick: () => Xe(!0),
|
|
594
600
|
"aria-label": "Issue permit",
|
|
595
601
|
children: /* @__PURE__ */ A(O, { className: "h-4 w-4" })
|
|
596
602
|
}),
|
|
597
603
|
children: /* @__PURE__ */ A("div", {
|
|
598
604
|
className: "space-y-2",
|
|
599
|
-
children:
|
|
605
|
+
children: T.permits.length ? T.permits.map((e) => /* @__PURE__ */ j("div", {
|
|
600
606
|
className: "rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
601
607
|
children: [/* @__PURE__ */ j("div", {
|
|
602
608
|
className: "flex items-center justify-between gap-2",
|
|
@@ -617,26 +623,26 @@ function W() {
|
|
|
617
623
|
]
|
|
618
624
|
})]
|
|
619
625
|
}),
|
|
620
|
-
|
|
621
|
-
open: !!
|
|
622
|
-
onOpenChange: (e) => e ? void 0 :
|
|
623
|
-
title: `${
|
|
624
|
-
description: `This will move the application to ${a(
|
|
625
|
-
confirmLabel:
|
|
626
|
-
destructive:
|
|
626
|
+
K && /* @__PURE__ */ A(_, {
|
|
627
|
+
open: !!K,
|
|
628
|
+
onOpenChange: (e) => e ? void 0 : q(null),
|
|
629
|
+
title: `${K.label}?`,
|
|
630
|
+
description: `This will move the application to ${a(K.status)}.`,
|
|
631
|
+
confirmLabel: K.label,
|
|
632
|
+
destructive: K.destructive,
|
|
627
633
|
reason: {
|
|
628
|
-
label:
|
|
634
|
+
label: K.status === "REJECTED" ? "Reason for rejection" : "Reason / note",
|
|
629
635
|
placeholder: "Explain the decision…",
|
|
630
|
-
required:
|
|
636
|
+
required: K.reason === "required"
|
|
631
637
|
},
|
|
632
638
|
onConfirm: async (e) => {
|
|
633
|
-
await
|
|
639
|
+
await et(K, e), q(null);
|
|
634
640
|
}
|
|
635
641
|
}),
|
|
636
|
-
|
|
637
|
-
open: !!
|
|
638
|
-
onOpenChange: (e) => e ? void 0 :
|
|
639
|
-
title: `Reject ${
|
|
642
|
+
J && /* @__PURE__ */ A(_, {
|
|
643
|
+
open: !!J,
|
|
644
|
+
onOpenChange: (e) => e ? void 0 : Y(null),
|
|
645
|
+
title: `Reject ${J.name}?`,
|
|
640
646
|
confirmLabel: "Reject document",
|
|
641
647
|
destructive: !0,
|
|
642
648
|
reason: {
|
|
@@ -645,40 +651,40 @@ function W() {
|
|
|
645
651
|
required: !0
|
|
646
652
|
},
|
|
647
653
|
onConfirm: async (e) => {
|
|
648
|
-
await
|
|
649
|
-
id:
|
|
654
|
+
await B.mutateAsync({
|
|
655
|
+
id: J.id,
|
|
650
656
|
status: "REJECTED",
|
|
651
657
|
rejectionReason: e,
|
|
652
|
-
applicationId:
|
|
653
|
-
}), g.success("Document rejected"),
|
|
658
|
+
applicationId: T.id
|
|
659
|
+
}), g.success("Document rejected"), Y(null);
|
|
654
660
|
}
|
|
655
661
|
}),
|
|
656
|
-
/* @__PURE__ */ A(
|
|
657
|
-
open:
|
|
658
|
-
onOpenChange:
|
|
659
|
-
defaultAmount:
|
|
660
|
-
defaultCurrency:
|
|
662
|
+
/* @__PURE__ */ A(He, {
|
|
663
|
+
open: qe,
|
|
664
|
+
onOpenChange: Je,
|
|
665
|
+
defaultAmount: F?.feeAmount ?? 0,
|
|
666
|
+
defaultCurrency: F?.currency ?? "INR",
|
|
661
667
|
onSubmit: async ({ amount: e, currency: t, providerRef: n }) => {
|
|
662
|
-
await
|
|
663
|
-
applicationId:
|
|
668
|
+
await W.mutateAsync({
|
|
669
|
+
applicationId: T.id,
|
|
664
670
|
amount: e,
|
|
665
671
|
currency: t,
|
|
666
672
|
providerRef: n || null
|
|
667
|
-
}), g.success("Payment recorded"),
|
|
673
|
+
}), g.success("Payment recorded"), I.refetch();
|
|
668
674
|
}
|
|
669
675
|
}),
|
|
670
|
-
/* @__PURE__ */ A(
|
|
671
|
-
open:
|
|
672
|
-
onOpenChange:
|
|
673
|
-
defaultServiceId:
|
|
674
|
-
defaultHolderId:
|
|
675
|
-
applicationId:
|
|
676
|
-
onIssued: () =>
|
|
676
|
+
/* @__PURE__ */ A(me, {
|
|
677
|
+
open: Ye,
|
|
678
|
+
onOpenChange: Xe,
|
|
679
|
+
defaultServiceId: T.serviceId,
|
|
680
|
+
defaultHolderId: T.citizenId,
|
|
681
|
+
applicationId: T.id,
|
|
682
|
+
onIssued: () => N()
|
|
677
683
|
})
|
|
678
684
|
]
|
|
679
685
|
});
|
|
680
686
|
}
|
|
681
|
-
function
|
|
687
|
+
function He({ open: e, onOpenChange: t, defaultAmount: n, defaultCurrency: r, onSubmit: i }) {
|
|
682
688
|
let [a, o] = x(""), [s, c] = x(r), [l, u] = x(""), [d, f] = x(!1);
|
|
683
689
|
return y(() => {
|
|
684
690
|
e && (o(n ? String(n) : ""), c(r || "INR"), u(""));
|