@burdenoff/microfe-proserviceworld 2026.709.1 → 2026.709.2
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/index.js +2 -1
- package/dist/proserviceworld/ProServiceWorldRoutes.d.ts.map +1 -1
- package/dist/proserviceworld/ProServiceWorldRoutes.js +95 -42
- package/dist/proserviceworld/ProServiceWorldRoutes.js.map +1 -1
- package/dist/proserviceworld/components/FeatureFlaggedPage.d.ts +8 -0
- package/dist/proserviceworld/components/FeatureFlaggedPage.d.ts.map +1 -0
- package/dist/proserviceworld/components/FeatureFlaggedPage.js +17 -0
- package/dist/proserviceworld/components/FeatureFlaggedPage.js.map +1 -0
- package/dist/proserviceworld/components/LoadMore.d.ts +12 -0
- package/dist/proserviceworld/components/LoadMore.d.ts.map +1 -0
- package/dist/proserviceworld/components/LoadMore.js +30 -0
- package/dist/proserviceworld/components/LoadMore.js.map +1 -0
- package/dist/proserviceworld/components/TagPicker.d.ts +11 -0
- package/dist/proserviceworld/components/TagPicker.d.ts.map +1 -0
- package/dist/proserviceworld/components/TagPicker.js +31 -0
- package/dist/proserviceworld/components/TagPicker.js.map +1 -0
- package/dist/proserviceworld/hooks/usePageViewAnalytics.d.ts +10 -0
- package/dist/proserviceworld/hooks/usePageViewAnalytics.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/usePageViewAnalytics.js +24 -0
- package/dist/proserviceworld/hooks/usePageViewAnalytics.js.map +1 -0
- package/dist/proserviceworld/hooks/useProServiceWorldApi.js +47 -27
- package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
- package/dist/proserviceworld/i18n/index.d.ts +13 -0
- package/dist/proserviceworld/i18n/index.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/index.js +171 -0
- package/dist/proserviceworld/i18n/index.js.map +1 -0
- package/dist/proserviceworld/index.d.ts +1 -0
- package/dist/proserviceworld/index.d.ts.map +1 -1
- package/dist/proserviceworld/index.js +1 -0
- package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/ClientsPage.js +173 -121
- package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.js +168 -120
- package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.js +183 -144
- package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
- package/dist/proserviceworld/utils/native.d.ts +23 -0
- package/dist/proserviceworld/utils/native.d.ts.map +1 -0
- package/dist/proserviceworld/utils/native.js +14 -0
- package/dist/proserviceworld/utils/native.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/proserviceworld/i18n/index.ts"],"sourcesContent":["/**\n * ProServiceWorld MFE local i18n.\n *\n * The host app shell owns the global I18nProvider and product translations.\n * This lightweight module provides fallback translations for MFE-owned UI\n * strings (page titles, empty states, form labels) so the MFE can be mounted\n * standalone (dev harness, tests) and still render in all supported locales.\n * When running inside the shell, the shell's `useI18n` translations take\n * precedence via the `t` helper below.\n */\n\nexport type SupportedLocale = 'en' | 'es' | 'hi' | 'ta' | 'zh' | 'ar';\n\nconst translations: Record<SupportedLocale, Record<string, string>> = {\n en: {\n 'psw.clients.title': 'Clients',\n 'psw.clients.subtitle': 'Every person or organization your firm serves.',\n 'psw.clients.emptyTitle': 'No clients yet',\n 'psw.clients.emptyDescription':\n 'Add your first client to start scoping engagements and matters.',\n 'psw.clients.new': 'New client',\n 'psw.clients.searchPlaceholder': 'Search clients…',\n 'psw.clients.allStatuses': 'All statuses',\n 'psw.common.loading': 'Loading…',\n 'psw.common.retry': 'Retry',\n 'psw.common.cancel': 'Cancel',\n 'psw.common.save': 'Save',\n 'psw.common.create': 'Create',\n 'psw.common.edit': 'Edit',\n 'psw.common.archive': 'Archive',\n 'psw.common.actions': 'Actions',\n 'psw.common.name': 'Name',\n 'psw.common.status': 'Status',\n 'psw.common.type': 'Type',\n 'psw.common.added': 'Added',\n 'psw.common.loadMore': 'Load more',\n 'psw.common.showing': 'Showing',\n 'psw.common.of': 'of',\n 'psw.tags.title': 'Tags',\n 'psw.tags.add': 'Add tag',\n },\n es: {\n 'psw.clients.title': 'Clientes',\n 'psw.clients.subtitle': 'Toda persona u organización que atiende su firma.',\n 'psw.clients.emptyTitle': 'Aún no hay clientes',\n 'psw.clients.emptyDescription':\n 'Agregue su primer cliente para comenzar a definir compromisos y asuntos.',\n 'psw.clients.new': 'Nuevo cliente',\n 'psw.clients.searchPlaceholder': 'Buscar clientes…',\n 'psw.clients.allStatuses': 'Todos los estados',\n 'psw.common.loading': 'Cargando…',\n 'psw.common.retry': 'Reintentar',\n 'psw.common.cancel': 'Cancelar',\n 'psw.common.save': 'Guardar',\n 'psw.common.create': 'Crear',\n 'psw.common.edit': 'Editar',\n 'psw.common.archive': 'Archivar',\n 'psw.common.actions': 'Acciones',\n 'psw.common.name': 'Nombre',\n 'psw.common.status': 'Estado',\n 'psw.common.type': 'Tipo',\n 'psw.common.added': 'Añadido',\n 'psw.common.loadMore': 'Cargar más',\n 'psw.common.showing': 'Mostrando',\n 'psw.common.of': 'de',\n 'psw.tags.title': 'Etiquetas',\n 'psw.tags.add': 'Agregar etiqueta',\n },\n hi: {\n 'psw.clients.title': 'ग्राहक',\n 'psw.clients.subtitle': 'हर व्यक्ति या संगठन जिसे आपकी फर्म सेवा देती है।',\n 'psw.clients.emptyTitle': 'अभी तक कोई ग्राहक नहीं',\n 'psw.clients.emptyDescription':\n 'समझौते और मामलों का दायरा तय करना शुरू करने के लिए अपना पहला ग्राहक जोड़ें।',\n 'psw.clients.new': 'नया ग्राहक',\n 'psw.clients.searchPlaceholder': 'ग्राहक खोजें…',\n 'psw.clients.allStatuses': 'सभी स्थिति',\n 'psw.common.loading': 'लोड हो रहा है…',\n 'psw.common.retry': 'पुनः प्रयास करें',\n 'psw.common.cancel': 'रद्द करें',\n 'psw.common.save': 'सहेजें',\n 'psw.common.create': 'बनाएं',\n 'psw.common.edit': 'संपादित करें',\n 'psw.common.archive': 'संग्रहीत करें',\n 'psw.common.actions': 'कार्रवाइयाँ',\n 'psw.common.name': 'नाम',\n 'psw.common.status': 'स्थिति',\n 'psw.common.type': 'प्रकार',\n 'psw.common.added': 'जोड़ा गया',\n 'psw.common.loadMore': 'और लोड करें',\n 'psw.common.showing': 'दिखा रहा है',\n 'psw.common.of': 'में से',\n 'psw.tags.title': 'टैग',\n 'psw.tags.add': 'टैग जोड़ें',\n },\n ta: {\n 'psw.clients.title': 'வாடிக்கையாளர்கள்',\n 'psw.clients.subtitle': 'உங்கள் நிறுவனம் சேவை செய்யும் ஒவ்வொரு நபரும் அல்லது நிறுவனமும்.',\n 'psw.clients.emptyTitle': 'இன்னும் வாடிக்கையாளர்கள் இல்லை',\n 'psw.clients.emptyDescription':\n 'உறுதிமொழிகள் மற்றும் விவகாரங்களை வரையறுக்க முதல் வாடிக்கையாளரைச் சேர்க்கவும்.',\n 'psw.clients.new': 'புதிய வாடிக்கையாளர்',\n 'psw.clients.searchPlaceholder': 'வாடிக்கையாளர்களைத் தேடு…',\n 'psw.clients.allStatuses': 'அனைத்து நிலைகள்',\n 'psw.common.loading': 'ஏற்றுகிறது…',\n 'psw.common.retry': 'மீண்டும் முயற்சி',\n 'psw.common.cancel': 'ரத்து',\n 'psw.common.save': 'சேமி',\n 'psw.common.create': 'உருவாக்கு',\n 'psw.common.edit': 'திருத்து',\n 'psw.common.archive': 'காப்பகம்',\n 'psw.common.actions': 'செயல்கள்',\n 'psw.common.name': 'பெயர்',\n 'psw.common.status': 'நிலை',\n 'psw.common.type': 'வகை',\n 'psw.common.added': 'சேர்க்கப்பட்டது',\n 'psw.common.loadMore': 'மேலும் ஏற்று',\n 'psw.common.showing': 'காட்டுகிறது',\n 'psw.common.of': 'இல்',\n 'psw.tags.title': 'குறிச்சொற்கள்',\n 'psw.tags.add': 'குறிச்சொல் சேர்',\n },\n zh: {\n 'psw.clients.title': '客户',\n 'psw.clients.subtitle': '贵公司服务的每一个人或组织。',\n 'psw.clients.emptyTitle': '暂无客户',\n 'psw.clients.emptyDescription': '添加您的第一个客户,开始确定业务和事项范围。',\n 'psw.clients.new': '新建客户',\n 'psw.clients.searchPlaceholder': '搜索客户…',\n 'psw.clients.allStatuses': '全部状态',\n 'psw.common.loading': '加载中…',\n 'psw.common.retry': '重试',\n 'psw.common.cancel': '取消',\n 'psw.common.save': '保存',\n 'psw.common.create': '创建',\n 'psw.common.edit': '编辑',\n 'psw.common.archive': '归档',\n 'psw.common.actions': '操作',\n 'psw.common.name': '名称',\n 'psw.common.status': '状态',\n 'psw.common.type': '类型',\n 'psw.common.added': '添加时间',\n 'psw.common.loadMore': '加载更多',\n 'psw.common.showing': '显示',\n 'psw.common.of': '共',\n 'psw.tags.title': '标签',\n 'psw.tags.add': '添加标签',\n },\n ar: {\n 'psw.clients.title': 'العملاء',\n 'psw.clients.subtitle': 'كل شخص أو مؤسسة تخدمها شركتك.',\n 'psw.clients.emptyTitle': 'لا يوجد عملاء بعد',\n 'psw.clients.emptyDescription': 'أضف عميلك الأول لبدء تحديد نطاق الالتزامات والقضايا.',\n 'psw.clients.new': 'عميل جديد',\n 'psw.clients.searchPlaceholder': 'البحث في العملاء…',\n 'psw.clients.allStatuses': 'جميع الحالات',\n 'psw.common.loading': 'جارٍ التحميل…',\n 'psw.common.retry': 'إعادة المحاولة',\n 'psw.common.cancel': 'إلغاء',\n 'psw.common.save': 'حفظ',\n 'psw.common.create': 'إنشاء',\n 'psw.common.edit': 'تعديل',\n 'psw.common.archive': 'أرشفة',\n 'psw.common.actions': 'إجراءات',\n 'psw.common.name': 'الاسم',\n 'psw.common.status': 'الحالة',\n 'psw.common.type': 'النوع',\n 'psw.common.added': 'تاريخ الإضافة',\n 'psw.common.loadMore': 'تحميل المزيد',\n 'psw.common.showing': 'عرض',\n 'psw.common.of': 'من',\n 'psw.tags.title': 'الوسوم',\n 'psw.tags.add': 'إضافة وسم',\n },\n};\n\nfunction detectLocale(): SupportedLocale {\n if (typeof navigator === 'undefined') return 'en';\n const code = (navigator.language ?? 'en').split('-')[0].toLowerCase();\n if (code in translations) return code as SupportedLocale;\n return 'en';\n}\n\nexport function t(key: string, fallback?: string, locale?: SupportedLocale): string {\n const loc = locale ?? detectLocale();\n return translations[loc]?.[key] ?? translations.en[key] ?? fallback ?? key;\n}\n"],"mappings":"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"}
|
|
@@ -2,4 +2,5 @@ export { ProServiceWorldRoot } from './ProServiceWorldRoot';
|
|
|
2
2
|
export type { ProServiceWorldRootProps, NavItem, FooterItem } from './types';
|
|
3
3
|
export { useProServiceWorld } from './providers/ProServiceWorldProvider';
|
|
4
4
|
export { useSandboxAssistantTransport } from './services/createSandboxAssistantTransport';
|
|
5
|
+
export { t } from './i18n';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proserviceworld/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proserviceworld/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientsPage.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/pages/ClientsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientsPage.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/pages/ClientsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2DhC,qDAAqD;AACrD,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAU3D,CAAC;AAyBF,eAAO,MAAM,WAAW,EAAE,EAwNzB,CAAC"}
|
|
@@ -2,22 +2,26 @@ import { useArchiveClient as e, useClients as t, useCreateClient as n, useUpdate
|
|
|
2
2
|
import { useNav as i } from "../utils/nav.js";
|
|
3
3
|
import { cn as a } from "../utils/cn.js";
|
|
4
4
|
import { Banner as o, Empty as s, ErrorState as c, Field as l, LoadingBlock as u, Modal as d, NativeSelect as f, PageHeader as p, SectionCard as m, StatusPill as h, TableWrap as g, Td as _, TextArea as v, TextInput as y, Th as b, enumOptions as x, fmtDate as S } from "../components/ui.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { t as C } from "../i18n/index.js";
|
|
6
|
+
import { useAnalytics as w } from "../hooks/useAnalytics.js";
|
|
7
|
+
import { impactFeedback as T } from "../utils/native.js";
|
|
8
|
+
import { TagPicker as E } from "../components/TagPicker.js";
|
|
9
|
+
import { LoadMore as D } from "../components/LoadMore.js";
|
|
10
|
+
import { useMemo as O, useState as k } from "react";
|
|
11
|
+
import { Archive as A, Building2 as ee, ChevronRight as te, Pencil as ne, Plus as j, Search as M, User as N, Users as P } from "lucide-react";
|
|
12
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
13
|
+
import { Button as R } from "@burdenoff/fe-libs/ui";
|
|
10
14
|
//#region src/proserviceworld/pages/ClientsPage.tsx
|
|
11
|
-
var
|
|
15
|
+
var z = ["ORGANIZATION", "INDIVIDUAL"], B = [
|
|
12
16
|
"PROSPECT",
|
|
13
17
|
"ACTIVE",
|
|
14
18
|
"INACTIVE",
|
|
15
19
|
"ARCHIVED"
|
|
16
|
-
],
|
|
20
|
+
], V = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || "?", H = ({ name: e, className: t }) => /* @__PURE__ */ I("span", {
|
|
17
21
|
className: a("flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent ring-1 ring-inset ring-accent/15", t),
|
|
18
22
|
"aria-hidden": !0,
|
|
19
|
-
children:
|
|
20
|
-
}),
|
|
23
|
+
children: V(e)
|
|
24
|
+
}), U = {
|
|
21
25
|
name: "",
|
|
22
26
|
type: "ORGANIZATION",
|
|
23
27
|
status: "PROSPECT",
|
|
@@ -26,124 +30,163 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
26
30
|
contactEmail: "",
|
|
27
31
|
contactPhone: "",
|
|
28
32
|
notes: ""
|
|
29
|
-
},
|
|
30
|
-
let e = i(), { emitIntent: n, emitFact:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
34
|
-
|
|
33
|
+
}, W = 25, G = () => {
|
|
34
|
+
let e = i(), { emitIntent: n, emitFact: a } = w(), [l, d] = k(""), [v, A] = k(""), [F, z] = k(null), [V, U] = k(!1), [G, q] = k(null), [ie, J] = k({
|
|
35
|
+
limit: W,
|
|
36
|
+
offset: 0
|
|
37
|
+
}), { data: Y, isLoading: X, error: Z, refetch: Q } = t({
|
|
38
|
+
search: l.trim() || void 0,
|
|
39
|
+
status: v || void 0,
|
|
40
|
+
pagination: ie
|
|
41
|
+
}), ae = r(), $ = O(() => Y?.items ?? [], [Y]);
|
|
42
|
+
return /* @__PURE__ */ L("div", {
|
|
35
43
|
className: "space-y-6",
|
|
36
44
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
title: "
|
|
39
|
-
subtitle: "
|
|
40
|
-
icon: /* @__PURE__ */
|
|
41
|
-
actions: /* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ I(p, {
|
|
46
|
+
title: C("psw.clients.title"),
|
|
47
|
+
subtitle: C("psw.clients.subtitle"),
|
|
48
|
+
icon: /* @__PURE__ */ I(P, { className: "h-6 w-6" }),
|
|
49
|
+
actions: /* @__PURE__ */ L(R, {
|
|
42
50
|
onClick: () => {
|
|
43
|
-
n("psw.client.create_clicked"),
|
|
51
|
+
T("light"), n("psw.client.create_clicked"), U(!0);
|
|
44
52
|
},
|
|
45
|
-
children: [
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ I(j, { className: "mr-1.5 h-4 w-4" }),
|
|
55
|
+
" ",
|
|
56
|
+
C("psw.clients.new")
|
|
57
|
+
]
|
|
46
58
|
})
|
|
47
59
|
}),
|
|
48
|
-
|
|
49
|
-
tone:
|
|
50
|
-
onClose: () =>
|
|
51
|
-
children:
|
|
60
|
+
G && /* @__PURE__ */ I(o, {
|
|
61
|
+
tone: G.tone,
|
|
62
|
+
onClose: () => q(null),
|
|
63
|
+
children: G.text
|
|
52
64
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ L("div", {
|
|
54
66
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
55
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ L("div", {
|
|
56
68
|
className: "relative flex-1",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
58
|
-
placeholder: "
|
|
59
|
-
value:
|
|
60
|
-
onChange: (e) =>
|
|
69
|
+
children: [/* @__PURE__ */ I(M, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ I(y, {
|
|
70
|
+
placeholder: C("psw.clients.searchPlaceholder"),
|
|
71
|
+
value: l,
|
|
72
|
+
onChange: (e) => {
|
|
73
|
+
d(e.target.value), J({
|
|
74
|
+
limit: W,
|
|
75
|
+
offset: 0
|
|
76
|
+
});
|
|
77
|
+
},
|
|
61
78
|
onKeyDown: (e) => {
|
|
62
|
-
e.key === "Enter" &&
|
|
79
|
+
e.key === "Enter" && l.trim() && a("psw.search.performed", {
|
|
63
80
|
entityType: "client",
|
|
64
|
-
queryLength:
|
|
81
|
+
queryLength: l.trim().length
|
|
65
82
|
});
|
|
66
83
|
},
|
|
67
84
|
className: "pl-9"
|
|
68
85
|
})]
|
|
69
|
-
}), /* @__PURE__ */
|
|
70
|
-
value:
|
|
71
|
-
onChange: (e) =>
|
|
86
|
+
}), /* @__PURE__ */ L(f, {
|
|
87
|
+
value: v,
|
|
88
|
+
onChange: (e) => {
|
|
89
|
+
A(e.target.value), J({
|
|
90
|
+
limit: W,
|
|
91
|
+
offset: 0
|
|
92
|
+
});
|
|
93
|
+
},
|
|
72
94
|
className: "sm:w-48",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ I("option", {
|
|
74
96
|
value: "",
|
|
75
|
-
children: "
|
|
76
|
-
}), x(
|
|
97
|
+
children: C("psw.clients.allStatuses")
|
|
98
|
+
}), x(B)]
|
|
77
99
|
})]
|
|
78
100
|
}),
|
|
79
|
-
|
|
80
|
-
error:
|
|
81
|
-
onRetry: () => void
|
|
82
|
-
}) : !
|
|
83
|
-
title: "
|
|
84
|
-
description: "
|
|
85
|
-
icon: /* @__PURE__ */
|
|
86
|
-
action: /* @__PURE__ */
|
|
87
|
-
onClick: () =>
|
|
88
|
-
children: [
|
|
101
|
+
X ? /* @__PURE__ */ I(u, {}) : Z ? /* @__PURE__ */ I(c, {
|
|
102
|
+
error: Z,
|
|
103
|
+
onRetry: () => void Q()
|
|
104
|
+
}) : !Y || Y.items.length === 0 ? /* @__PURE__ */ I(s, {
|
|
105
|
+
title: C("psw.clients.emptyTitle"),
|
|
106
|
+
description: C("psw.clients.emptyDescription"),
|
|
107
|
+
icon: /* @__PURE__ */ I(P, { className: "h-8 w-8" }),
|
|
108
|
+
action: /* @__PURE__ */ L(R, {
|
|
109
|
+
onClick: () => U(!0),
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ I(j, { className: "mr-1.5 h-4 w-4" }),
|
|
112
|
+
" ",
|
|
113
|
+
C("psw.clients.new")
|
|
114
|
+
]
|
|
89
115
|
})
|
|
90
|
-
}) : /* @__PURE__ */
|
|
91
|
-
title: `${
|
|
92
|
-
children: /* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
116
|
+
}) : /* @__PURE__ */ L(m, {
|
|
117
|
+
title: `${Y.totalCount} client${Y.totalCount === 1 ? "" : "s"}`,
|
|
118
|
+
children: [/* @__PURE__ */ L(g, { children: [/* @__PURE__ */ I("thead", { children: /* @__PURE__ */ L("tr", { children: [
|
|
119
|
+
/* @__PURE__ */ I(b, { children: C("psw.common.name") }),
|
|
120
|
+
/* @__PURE__ */ I(b, { children: C("psw.common.type") }),
|
|
121
|
+
/* @__PURE__ */ I(b, { children: "Industry" }),
|
|
122
|
+
/* @__PURE__ */ I(b, { children: C("psw.common.status") }),
|
|
123
|
+
/* @__PURE__ */ I(b, { children: C("psw.common.added") }),
|
|
124
|
+
/* @__PURE__ */ I(b, { children: "Tags" }),
|
|
125
|
+
/* @__PURE__ */ I(b, {
|
|
99
126
|
className: "text-right",
|
|
100
|
-
children: "
|
|
127
|
+
children: C("psw.common.actions")
|
|
101
128
|
})
|
|
102
|
-
] }) }), /* @__PURE__ */
|
|
129
|
+
] }) }), /* @__PURE__ */ I("tbody", { children: Y.items.map((t) => /* @__PURE__ */ L("tr", {
|
|
103
130
|
className: "group cursor-pointer transition-colors hover:bg-bg-sunken/60",
|
|
104
131
|
onClick: () => e(`clients/${t.id}`),
|
|
105
132
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L("div", {
|
|
107
134
|
className: "flex items-center gap-3",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ I(H, { name: t.name }), /* @__PURE__ */ L("div", {
|
|
109
136
|
className: "min-w-0",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ L("div", {
|
|
111
138
|
className: "flex items-center gap-1 font-medium text-text-primary transition-colors group-hover:text-accent",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ I("span", {
|
|
113
140
|
className: "truncate",
|
|
114
141
|
children: t.name
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
-
}), t.contactName ? /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ I(te, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary opacity-0 transition-opacity group-hover:opacity-100" })]
|
|
143
|
+
}), t.contactName ? /* @__PURE__ */ I("div", {
|
|
117
144
|
className: "truncate text-xs text-text-tertiary",
|
|
118
145
|
children: t.contactName
|
|
119
146
|
}) : null]
|
|
120
147
|
})]
|
|
121
148
|
}) }),
|
|
122
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L("span", {
|
|
123
150
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
124
|
-
children: [t.type === "ORGANIZATION" ? /* @__PURE__ */
|
|
151
|
+
children: [t.type === "ORGANIZATION" ? /* @__PURE__ */ I(ee, { className: "h-3.5 w-3.5 text-text-tertiary" }) : /* @__PURE__ */ I(N, { className: "h-3.5 w-3.5 text-text-tertiary" }), t.type === "ORGANIZATION" ? "Organization" : "Individual"]
|
|
125
152
|
}) }),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ I(_, { children: t.industry || "—" }),
|
|
154
|
+
/* @__PURE__ */ I(_, { children: /* @__PURE__ */ I(h, { status: t.status }) }),
|
|
155
|
+
/* @__PURE__ */ I(_, {
|
|
129
156
|
className: "whitespace-nowrap",
|
|
130
157
|
children: S(t.createdAt)
|
|
131
158
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ I(_, { children: /* @__PURE__ */ I("div", {
|
|
160
|
+
onClick: (e) => e.stopPropagation(),
|
|
161
|
+
role: "presentation",
|
|
162
|
+
children: /* @__PURE__ */ I(E, {
|
|
163
|
+
entityType: "PswClient",
|
|
164
|
+
entityId: t.id,
|
|
165
|
+
tags: t.tags ?? [],
|
|
166
|
+
onChange: async (e) => {
|
|
167
|
+
await ae.mutateAsync({
|
|
168
|
+
id: t.id,
|
|
169
|
+
input: { tags: e }
|
|
170
|
+
}), Q();
|
|
171
|
+
},
|
|
172
|
+
maxTags: 5
|
|
173
|
+
})
|
|
174
|
+
}) }),
|
|
175
|
+
/* @__PURE__ */ I(_, {
|
|
133
176
|
className: "text-right",
|
|
134
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ L("div", {
|
|
135
178
|
className: "flex justify-end gap-1",
|
|
136
179
|
onClick: (e) => e.stopPropagation(),
|
|
137
180
|
role: "presentation",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ I(R, {
|
|
139
182
|
variant: "ghost",
|
|
140
183
|
size: "sm",
|
|
141
|
-
onClick: () =>
|
|
184
|
+
onClick: () => z(t),
|
|
142
185
|
"aria-label": "Edit",
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
}), t.status !== "ARCHIVED" && /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ I(ne, { className: "h-4 w-4" })
|
|
187
|
+
}), t.status !== "ARCHIVED" && /* @__PURE__ */ I(re, {
|
|
145
188
|
id: t.id,
|
|
146
|
-
onDone: (e) =>
|
|
189
|
+
onDone: (e) => q(e ? {
|
|
147
190
|
tone: "success",
|
|
148
191
|
text: `${t.name} archived.`
|
|
149
192
|
} : {
|
|
@@ -154,28 +197,37 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
154
197
|
})
|
|
155
198
|
})
|
|
156
199
|
]
|
|
157
|
-
}, t.id)) })] })
|
|
200
|
+
}, t.id)) })] }), /* @__PURE__ */ I(D, {
|
|
201
|
+
hasMore: Y?.pageInfo?.hasMore ?? !1,
|
|
202
|
+
loading: X,
|
|
203
|
+
loadedCount: $.length,
|
|
204
|
+
totalCount: Y?.totalCount ?? $.length,
|
|
205
|
+
onLoadMore: () => J((e) => ({
|
|
206
|
+
limit: W,
|
|
207
|
+
offset: e.offset + W
|
|
208
|
+
}))
|
|
209
|
+
})]
|
|
158
210
|
}),
|
|
159
|
-
|
|
160
|
-
onClose: () =>
|
|
161
|
-
onSaved: (e) =>
|
|
211
|
+
V && /* @__PURE__ */ I(K, {
|
|
212
|
+
onClose: () => U(!1),
|
|
213
|
+
onSaved: (e) => q({
|
|
162
214
|
tone: "success",
|
|
163
215
|
text: `${e} created.`
|
|
164
216
|
})
|
|
165
217
|
}),
|
|
166
|
-
|
|
167
|
-
client:
|
|
168
|
-
onClose: () =>
|
|
169
|
-
onSaved: (e) =>
|
|
218
|
+
F && /* @__PURE__ */ I(K, {
|
|
219
|
+
client: F,
|
|
220
|
+
onClose: () => z(null),
|
|
221
|
+
onSaved: (e) => q({
|
|
170
222
|
tone: "success",
|
|
171
223
|
text: `${e} updated.`
|
|
172
224
|
})
|
|
173
225
|
})
|
|
174
226
|
]
|
|
175
227
|
});
|
|
176
|
-
},
|
|
177
|
-
let r = e(), { emitFact: i } =
|
|
178
|
-
return /* @__PURE__ */
|
|
228
|
+
}, re = ({ id: t, onDone: n }) => {
|
|
229
|
+
let r = e(), { emitFact: i } = w();
|
|
230
|
+
return /* @__PURE__ */ I(R, {
|
|
179
231
|
variant: "ghost",
|
|
180
232
|
size: "sm",
|
|
181
233
|
"aria-label": "Archive",
|
|
@@ -188,10 +240,10 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
188
240
|
onError: () => n(!1)
|
|
189
241
|
});
|
|
190
242
|
},
|
|
191
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ I(A, { className: "h-4 w-4" })
|
|
192
244
|
});
|
|
193
|
-
},
|
|
194
|
-
let a = n(), s = r(), { emitFact: c } =
|
|
245
|
+
}, K = ({ client: e, onClose: t, onSaved: i }) => {
|
|
246
|
+
let a = n(), s = r(), { emitFact: c } = w(), [u, p] = k(e ? {
|
|
195
247
|
name: e.name,
|
|
196
248
|
type: e.type,
|
|
197
249
|
status: e.status,
|
|
@@ -200,10 +252,10 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
200
252
|
contactEmail: e.contactEmail ?? "",
|
|
201
253
|
contactPhone: e.contactPhone ?? "",
|
|
202
254
|
notes: e.notes ?? ""
|
|
203
|
-
} :
|
|
255
|
+
} : U), [m, h] = k(null), g = (e) => (t) => p((n) => ({
|
|
204
256
|
...n,
|
|
205
257
|
[e]: t.target.value
|
|
206
|
-
})), _ = a.isPending || s.isPending, b =
|
|
258
|
+
})), _ = a.isPending || s.isPending, b = O(() => ({
|
|
207
259
|
name: u.name.trim(),
|
|
208
260
|
type: u.type,
|
|
209
261
|
status: u.status,
|
|
@@ -213,16 +265,16 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
213
265
|
contactPhone: u.contactPhone.trim() || null,
|
|
214
266
|
notes: u.notes.trim() || null
|
|
215
267
|
}), [u]);
|
|
216
|
-
return /* @__PURE__ */
|
|
268
|
+
return /* @__PURE__ */ I(d, {
|
|
217
269
|
open: !0,
|
|
218
270
|
onClose: t,
|
|
219
271
|
title: e ? "Edit client" : "New client",
|
|
220
|
-
footer: /* @__PURE__ */
|
|
272
|
+
footer: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(R, {
|
|
221
273
|
variant: "outline",
|
|
222
274
|
onClick: t,
|
|
223
275
|
disabled: _,
|
|
224
276
|
children: "Cancel"
|
|
225
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ I(R, {
|
|
226
278
|
onClick: () => {
|
|
227
279
|
if (h(null), !b.name) return h("Client name is required.");
|
|
228
280
|
let n = (e) => h(e instanceof Error ? e.message : "Save failed.");
|
|
@@ -244,75 +296,75 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
244
296
|
disabled: _,
|
|
245
297
|
children: _ ? "Saving…" : e ? "Save changes" : "Create client"
|
|
246
298
|
})] }),
|
|
247
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ L("div", {
|
|
248
300
|
className: "space-y-3",
|
|
249
301
|
children: [
|
|
250
|
-
m && /* @__PURE__ */
|
|
302
|
+
m && /* @__PURE__ */ I(o, {
|
|
251
303
|
tone: "danger",
|
|
252
304
|
children: m
|
|
253
305
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ I(l, {
|
|
255
307
|
label: "Name",
|
|
256
308
|
required: !0,
|
|
257
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ I(y, {
|
|
258
310
|
value: u.name,
|
|
259
311
|
onChange: g("name"),
|
|
260
312
|
placeholder: "Acme Holdings Ltd."
|
|
261
313
|
})
|
|
262
314
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ L("div", {
|
|
264
316
|
className: "grid grid-cols-2 gap-3",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ I(l, {
|
|
266
318
|
label: "Type",
|
|
267
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ I(f, {
|
|
268
320
|
value: u.type,
|
|
269
321
|
onChange: g("type"),
|
|
270
|
-
children: x(
|
|
322
|
+
children: x(z)
|
|
271
323
|
})
|
|
272
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ I(l, {
|
|
273
325
|
label: "Status",
|
|
274
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ I(f, {
|
|
275
327
|
value: u.status,
|
|
276
328
|
onChange: g("status"),
|
|
277
|
-
children: x(
|
|
329
|
+
children: x(B)
|
|
278
330
|
})
|
|
279
331
|
})]
|
|
280
332
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ I(l, {
|
|
282
334
|
label: "Industry",
|
|
283
|
-
children: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ I(y, {
|
|
284
336
|
value: u.industry,
|
|
285
337
|
onChange: g("industry"),
|
|
286
338
|
placeholder: "Financial services"
|
|
287
339
|
})
|
|
288
340
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ L("div", {
|
|
290
342
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ I(l, {
|
|
292
344
|
label: "Contact name",
|
|
293
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ I(y, {
|
|
294
346
|
value: u.contactName,
|
|
295
347
|
onChange: g("contactName")
|
|
296
348
|
})
|
|
297
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ I(l, {
|
|
298
350
|
label: "Contact email",
|
|
299
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ I(y, {
|
|
300
352
|
type: "email",
|
|
301
353
|
value: u.contactEmail,
|
|
302
354
|
onChange: g("contactEmail")
|
|
303
355
|
})
|
|
304
356
|
})]
|
|
305
357
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ I(l, {
|
|
307
359
|
label: "Contact phone",
|
|
308
|
-
children: /* @__PURE__ */
|
|
360
|
+
children: /* @__PURE__ */ I(y, {
|
|
309
361
|
value: u.contactPhone,
|
|
310
362
|
onChange: g("contactPhone")
|
|
311
363
|
})
|
|
312
364
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ I(l, {
|
|
314
366
|
label: "Notes",
|
|
315
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ I(v, {
|
|
316
368
|
value: u.notes,
|
|
317
369
|
onChange: g("notes")
|
|
318
370
|
})
|
|
@@ -322,6 +374,6 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
|
|
|
322
374
|
});
|
|
323
375
|
};
|
|
324
376
|
//#endregion
|
|
325
|
-
export {
|
|
377
|
+
export { G as ClientsPage };
|
|
326
378
|
|
|
327
379
|
//# sourceMappingURL=ClientsPage.js.map
|