@burdenoff/microfe-proserviceworld 2026.706.3 → 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/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -1
- package/dist/proserviceworld/ProServiceWorldRoot.d.ts +5 -0
- package/dist/proserviceworld/ProServiceWorldRoot.d.ts.map +1 -0
- package/dist/proserviceworld/ProServiceWorldRoutes.d.ts +2 -0
- package/dist/proserviceworld/ProServiceWorldRoutes.d.ts.map +1 -0
- package/dist/proserviceworld/ProServiceWorldRoutes.js +95 -42
- package/dist/proserviceworld/ProServiceWorldRoutes.js.map +1 -1
- package/dist/proserviceworld/components/DiscussionThread.d.ts +12 -0
- package/dist/proserviceworld/components/DiscussionThread.d.ts.map +1 -0
- 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/components/ui.d.ts +82 -0
- package/dist/proserviceworld/components/ui.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useAnalytics.d.ts +18 -0
- package/dist/proserviceworld/hooks/useAnalytics.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useAnalytics.js +21 -0
- package/dist/proserviceworld/hooks/useAnalytics.js.map +1 -0
- package/dist/proserviceworld/hooks/useEntityComments.d.ts +27 -0
- package/dist/proserviceworld/hooks/useEntityComments.d.ts.map +1 -0
- package/dist/proserviceworld/hooks/useFiles.d.ts +23 -0
- package/dist/proserviceworld/hooks/useFiles.d.ts.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.d.ts +351 -0
- package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.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 +6 -0
- package/dist/proserviceworld/index.d.ts.map +1 -0
- package/dist/proserviceworld/index.js +2 -0
- package/dist/proserviceworld/pages/AnalyticsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/AnalyticsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ClientDetailPage.d.ts +4 -0
- package/dist/proserviceworld/pages/ClientDetailPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ClientsPage.d.ts +9 -0
- package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ClientsPage.js +218 -155
- package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
- package/dist/proserviceworld/pages/CompliancePage.d.ts +4 -0
- package/dist/proserviceworld/pages/CompliancePage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/ConflictsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/ConflictsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/DashboardPage.d.ts +4 -0
- package/dist/proserviceworld/pages/DashboardPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/DocumentsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/DocumentsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/EngagementDetailPage.d.ts +4 -0
- package/dist/proserviceworld/pages/EngagementDetailPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/EngagementDetailPage.js +162 -156
- package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.d.ts +4 -0
- package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/EngagementsPage.js +201 -140
- package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
- package/dist/proserviceworld/pages/InvoicesPage.d.ts +4 -0
- package/dist/proserviceworld/pages/InvoicesPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/MattersPage.d.ts +4 -0
- package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/MattersPage.js +212 -158
- package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
- package/dist/proserviceworld/pages/PracticeAreasPage.d.ts +4 -0
- package/dist/proserviceworld/pages/PracticeAreasPage.d.ts.map +1 -0
- package/dist/proserviceworld/pages/TimePage.d.ts +4 -0
- package/dist/proserviceworld/pages/TimePage.d.ts.map +1 -0
- package/dist/proserviceworld/providers/ProServiceWorldProvider.d.ts +6 -0
- package/dist/proserviceworld/providers/ProServiceWorldProvider.d.ts.map +1 -0
- package/dist/proserviceworld/services/assistantApi.d.ts +74 -0
- package/dist/proserviceworld/services/assistantApi.d.ts.map +1 -0
- package/dist/proserviceworld/services/assistantApi.js +203 -0
- package/dist/proserviceworld/services/assistantApi.js.map +1 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.d.ts +28 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.js +120 -0
- package/dist/proserviceworld/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/proserviceworld/types/index.d.ts +57 -0
- package/dist/proserviceworld/types/index.d.ts.map +1 -0
- package/dist/proserviceworld/utils/cn.d.ts +4 -0
- package/dist/proserviceworld/utils/cn.d.ts.map +1 -0
- 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/dist/proserviceworld/utils/nav.d.ts +6 -0
- package/dist/proserviceworld/utils/nav.d.ts.map +1 -0
- package/dist/proserviceworld/utils/navigation.d.ts +2 -0
- package/dist/proserviceworld/utils/navigation.d.ts.map +1 -0
- package/dist/proserviceworld/utils/pageContext.d.ts +12 -0
- package/dist/proserviceworld/utils/pageContext.d.ts.map +1 -0
- package/dist/proserviceworld/utils/pageContext.js +74 -0
- package/dist/proserviceworld/utils/pageContext.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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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ProServiceWorldRoot } from './ProServiceWorldRoot';
|
|
2
|
+
export type { ProServiceWorldRootProps, NavItem, FooterItem } from './types';
|
|
3
|
+
export { useProServiceWorld } from './providers/ProServiceWorldProvider';
|
|
4
|
+
export { useSandboxAssistantTransport } from './services/createSandboxAssistantTransport';
|
|
5
|
+
export { t } from './i18n';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnalyticsPage.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/pages/AnalyticsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,eAAO,MAAM,aAAa,EAAE,EA6G3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientDetailPage.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/pages/ClientDetailPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsDhC,eAAO,MAAM,gBAAgB,EAAE,EA2P9B,CAAC"}
|
|
@@ -0,0 +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;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,21 +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 {
|
|
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";
|
|
9
14
|
//#region src/proserviceworld/pages/ClientsPage.tsx
|
|
10
|
-
var
|
|
15
|
+
var z = ["ORGANIZATION", "INDIVIDUAL"], B = [
|
|
11
16
|
"PROSPECT",
|
|
12
17
|
"ACTIVE",
|
|
13
18
|
"INACTIVE",
|
|
14
19
|
"ARCHIVED"
|
|
15
|
-
],
|
|
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", {
|
|
16
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),
|
|
17
22
|
"aria-hidden": !0,
|
|
18
|
-
children:
|
|
19
|
-
}),
|
|
23
|
+
children: V(e)
|
|
24
|
+
}), U = {
|
|
20
25
|
name: "",
|
|
21
26
|
type: "ORGANIZATION",
|
|
22
27
|
status: "PROSPECT",
|
|
@@ -25,116 +30,163 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
|
|
|
25
30
|
contactEmail: "",
|
|
26
31
|
contactPhone: "",
|
|
27
32
|
notes: ""
|
|
28
|
-
},
|
|
29
|
-
let e = i(),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
|
|
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", {
|
|
34
43
|
className: "space-y-6",
|
|
35
44
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
title: "
|
|
38
|
-
subtitle: "
|
|
39
|
-
icon: /* @__PURE__ */ P
|
|
40
|
-
actions: /* @__PURE__ */
|
|
41
|
-
onClick: () =>
|
|
42
|
-
|
|
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, {
|
|
50
|
+
onClick: () => {
|
|
51
|
+
T("light"), n("psw.client.create_clicked"), U(!0);
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ I(j, { className: "mr-1.5 h-4 w-4" }),
|
|
55
|
+
" ",
|
|
56
|
+
C("psw.clients.new")
|
|
57
|
+
]
|
|
43
58
|
})
|
|
44
59
|
}),
|
|
45
|
-
|
|
46
|
-
tone:
|
|
47
|
-
onClose: () =>
|
|
48
|
-
children:
|
|
60
|
+
G && /* @__PURE__ */ I(o, {
|
|
61
|
+
tone: G.tone,
|
|
62
|
+
onClose: () => q(null),
|
|
63
|
+
children: G.text
|
|
49
64
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ L("div", {
|
|
51
66
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ L("div", {
|
|
53
68
|
className: "relative flex-1",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
55
|
-
placeholder: "
|
|
56
|
-
value:
|
|
57
|
-
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
|
+
},
|
|
78
|
+
onKeyDown: (e) => {
|
|
79
|
+
e.key === "Enter" && l.trim() && a("psw.search.performed", {
|
|
80
|
+
entityType: "client",
|
|
81
|
+
queryLength: l.trim().length
|
|
82
|
+
});
|
|
83
|
+
},
|
|
58
84
|
className: "pl-9"
|
|
59
85
|
})]
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
-
value:
|
|
62
|
-
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
|
+
},
|
|
63
94
|
className: "sm:w-48",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ I("option", {
|
|
65
96
|
value: "",
|
|
66
|
-
children: "
|
|
67
|
-
}), x(
|
|
97
|
+
children: C("psw.clients.allStatuses")
|
|
98
|
+
}), x(B)]
|
|
68
99
|
})]
|
|
69
100
|
}),
|
|
70
|
-
|
|
71
|
-
error:
|
|
72
|
-
onRetry: () => void
|
|
73
|
-
}) : !
|
|
74
|
-
title: "
|
|
75
|
-
description: "
|
|
76
|
-
icon: /* @__PURE__ */ P
|
|
77
|
-
action: /* @__PURE__ */
|
|
78
|
-
onClick: () =>
|
|
79
|
-
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
|
+
]
|
|
80
115
|
})
|
|
81
|
-
}) : /* @__PURE__ */
|
|
82
|
-
title: `${
|
|
83
|
-
children: /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__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, {
|
|
90
126
|
className: "text-right",
|
|
91
|
-
children: "
|
|
127
|
+
children: C("psw.common.actions")
|
|
92
128
|
})
|
|
93
|
-
] }) }), /* @__PURE__ */
|
|
129
|
+
] }) }), /* @__PURE__ */ I("tbody", { children: Y.items.map((t) => /* @__PURE__ */ L("tr", {
|
|
94
130
|
className: "group cursor-pointer transition-colors hover:bg-bg-sunken/60",
|
|
95
131
|
onClick: () => e(`clients/${t.id}`),
|
|
96
132
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L("div", {
|
|
98
134
|
className: "flex items-center gap-3",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ I(H, { name: t.name }), /* @__PURE__ */ L("div", {
|
|
100
136
|
className: "min-w-0",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ L("div", {
|
|
102
138
|
className: "flex items-center gap-1 font-medium text-text-primary transition-colors group-hover:text-accent",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ I("span", {
|
|
104
140
|
className: "truncate",
|
|
105
141
|
children: t.name
|
|
106
|
-
}), /* @__PURE__ */
|
|
107
|
-
}), 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", {
|
|
108
144
|
className: "truncate text-xs text-text-tertiary",
|
|
109
145
|
children: t.contactName
|
|
110
146
|
}) : null]
|
|
111
147
|
})]
|
|
112
148
|
}) }),
|
|
113
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L("span", {
|
|
114
150
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
115
|
-
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"]
|
|
116
152
|
}) }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ I(_, { children: t.industry || "—" }),
|
|
154
|
+
/* @__PURE__ */ I(_, { children: /* @__PURE__ */ I(h, { status: t.status }) }),
|
|
155
|
+
/* @__PURE__ */ I(_, {
|
|
120
156
|
className: "whitespace-nowrap",
|
|
121
157
|
children: S(t.createdAt)
|
|
122
158
|
}),
|
|
123
|
-
/* @__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(_, {
|
|
124
176
|
className: "text-right",
|
|
125
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ L("div", {
|
|
126
178
|
className: "flex justify-end gap-1",
|
|
127
179
|
onClick: (e) => e.stopPropagation(),
|
|
128
180
|
role: "presentation",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ I(R, {
|
|
130
182
|
variant: "ghost",
|
|
131
183
|
size: "sm",
|
|
132
|
-
onClick: () =>
|
|
184
|
+
onClick: () => z(t),
|
|
133
185
|
"aria-label": "Edit",
|
|
134
|
-
children: /* @__PURE__ */
|
|
135
|
-
}), t.status !== "ARCHIVED" && /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ I(ne, { className: "h-4 w-4" })
|
|
187
|
+
}), t.status !== "ARCHIVED" && /* @__PURE__ */ I(re, {
|
|
136
188
|
id: t.id,
|
|
137
|
-
onDone: (e) =>
|
|
189
|
+
onDone: (e) => q(e ? {
|
|
138
190
|
tone: "success",
|
|
139
191
|
text: `${t.name} archived.`
|
|
140
192
|
} : {
|
|
@@ -145,42 +197,53 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
|
|
|
145
197
|
})
|
|
146
198
|
})
|
|
147
199
|
]
|
|
148
|
-
}, 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
|
+
})]
|
|
149
210
|
}),
|
|
150
|
-
|
|
151
|
-
onClose: () =>
|
|
152
|
-
onSaved: (e) =>
|
|
211
|
+
V && /* @__PURE__ */ I(K, {
|
|
212
|
+
onClose: () => U(!1),
|
|
213
|
+
onSaved: (e) => q({
|
|
153
214
|
tone: "success",
|
|
154
215
|
text: `${e} created.`
|
|
155
216
|
})
|
|
156
217
|
}),
|
|
157
|
-
|
|
158
|
-
client:
|
|
159
|
-
onClose: () =>
|
|
160
|
-
onSaved: (e) =>
|
|
218
|
+
F && /* @__PURE__ */ I(K, {
|
|
219
|
+
client: F,
|
|
220
|
+
onClose: () => z(null),
|
|
221
|
+
onSaved: (e) => q({
|
|
161
222
|
tone: "success",
|
|
162
223
|
text: `${e} updated.`
|
|
163
224
|
})
|
|
164
225
|
})
|
|
165
226
|
]
|
|
166
227
|
});
|
|
167
|
-
},
|
|
168
|
-
let r = e();
|
|
169
|
-
return /* @__PURE__ */
|
|
228
|
+
}, re = ({ id: t, onDone: n }) => {
|
|
229
|
+
let r = e(), { emitFact: i } = w();
|
|
230
|
+
return /* @__PURE__ */ I(R, {
|
|
170
231
|
variant: "ghost",
|
|
171
232
|
size: "sm",
|
|
172
233
|
"aria-label": "Archive",
|
|
173
234
|
disabled: r.isPending,
|
|
174
235
|
onClick: () => {
|
|
175
236
|
window.confirm("Archive this client? Their engagements and matters remain.") && r.mutate(t, {
|
|
176
|
-
onSuccess: (e) =>
|
|
237
|
+
onSuccess: (e) => {
|
|
238
|
+
i("psw.client.archived", { clientId: t }), n(!!e);
|
|
239
|
+
},
|
|
177
240
|
onError: () => n(!1)
|
|
178
241
|
});
|
|
179
242
|
},
|
|
180
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ I(A, { className: "h-4 w-4" })
|
|
181
244
|
});
|
|
182
|
-
},
|
|
183
|
-
let a = n(), s = r(),
|
|
245
|
+
}, K = ({ client: e, onClose: t, onSaved: i }) => {
|
|
246
|
+
let a = n(), s = r(), { emitFact: c } = w(), [u, p] = k(e ? {
|
|
184
247
|
name: e.name,
|
|
185
248
|
type: e.type,
|
|
186
249
|
status: e.status,
|
|
@@ -189,121 +252,121 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
|
|
|
189
252
|
contactEmail: e.contactEmail ?? "",
|
|
190
253
|
contactPhone: e.contactPhone ?? "",
|
|
191
254
|
notes: e.notes ?? ""
|
|
192
|
-
} :
|
|
255
|
+
} : U), [m, h] = k(null), g = (e) => (t) => p((n) => ({
|
|
193
256
|
...n,
|
|
194
257
|
[e]: t.target.value
|
|
195
|
-
})),
|
|
196
|
-
name:
|
|
197
|
-
type:
|
|
198
|
-
status:
|
|
199
|
-
industry:
|
|
200
|
-
contactName:
|
|
201
|
-
contactEmail:
|
|
202
|
-
contactPhone:
|
|
203
|
-
notes:
|
|
204
|
-
}), [
|
|
205
|
-
return /* @__PURE__ */
|
|
258
|
+
})), _ = a.isPending || s.isPending, b = O(() => ({
|
|
259
|
+
name: u.name.trim(),
|
|
260
|
+
type: u.type,
|
|
261
|
+
status: u.status,
|
|
262
|
+
industry: u.industry.trim() || null,
|
|
263
|
+
contactName: u.contactName.trim() || null,
|
|
264
|
+
contactEmail: u.contactEmail.trim() || null,
|
|
265
|
+
contactPhone: u.contactPhone.trim() || null,
|
|
266
|
+
notes: u.notes.trim() || null
|
|
267
|
+
}), [u]);
|
|
268
|
+
return /* @__PURE__ */ I(d, {
|
|
206
269
|
open: !0,
|
|
207
270
|
onClose: t,
|
|
208
271
|
title: e ? "Edit client" : "New client",
|
|
209
|
-
footer: /* @__PURE__ */ F
|
|
272
|
+
footer: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(R, {
|
|
210
273
|
variant: "outline",
|
|
211
274
|
onClick: t,
|
|
212
|
-
disabled:
|
|
275
|
+
disabled: _,
|
|
213
276
|
children: "Cancel"
|
|
214
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ I(R, {
|
|
215
278
|
onClick: () => {
|
|
216
|
-
if (
|
|
217
|
-
let n = (e) =>
|
|
279
|
+
if (h(null), !b.name) return h("Client name is required.");
|
|
280
|
+
let n = (e) => h(e instanceof Error ? e.message : "Save failed.");
|
|
218
281
|
e ? s.mutate({
|
|
219
282
|
id: e.id,
|
|
220
|
-
input:
|
|
283
|
+
input: b
|
|
221
284
|
}, {
|
|
222
285
|
onSuccess: () => {
|
|
223
|
-
i(
|
|
286
|
+
c("psw.client.updated", { clientId: e.id }), i(b.name), t();
|
|
224
287
|
},
|
|
225
288
|
onError: n
|
|
226
|
-
}) : a.mutate(
|
|
227
|
-
onSuccess: () => {
|
|
228
|
-
i(
|
|
289
|
+
}) : a.mutate(b, {
|
|
290
|
+
onSuccess: (e) => {
|
|
291
|
+
c("psw.client.created", { clientId: e.pswCreateClient.id }), i(b.name), t();
|
|
229
292
|
},
|
|
230
293
|
onError: n
|
|
231
294
|
});
|
|
232
295
|
},
|
|
233
|
-
disabled:
|
|
234
|
-
children:
|
|
296
|
+
disabled: _,
|
|
297
|
+
children: _ ? "Saving…" : e ? "Save changes" : "Create client"
|
|
235
298
|
})] }),
|
|
236
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ L("div", {
|
|
237
300
|
className: "space-y-3",
|
|
238
301
|
children: [
|
|
239
|
-
|
|
302
|
+
m && /* @__PURE__ */ I(o, {
|
|
240
303
|
tone: "danger",
|
|
241
|
-
children:
|
|
304
|
+
children: m
|
|
242
305
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ I(l, {
|
|
244
307
|
label: "Name",
|
|
245
308
|
required: !0,
|
|
246
|
-
children: /* @__PURE__ */
|
|
247
|
-
value:
|
|
248
|
-
onChange:
|
|
309
|
+
children: /* @__PURE__ */ I(y, {
|
|
310
|
+
value: u.name,
|
|
311
|
+
onChange: g("name"),
|
|
249
312
|
placeholder: "Acme Holdings Ltd."
|
|
250
313
|
})
|
|
251
314
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ L("div", {
|
|
253
316
|
className: "grid grid-cols-2 gap-3",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ I(l, {
|
|
255
318
|
label: "Type",
|
|
256
|
-
children: /* @__PURE__ */
|
|
257
|
-
value:
|
|
258
|
-
onChange:
|
|
259
|
-
children: x(
|
|
319
|
+
children: /* @__PURE__ */ I(f, {
|
|
320
|
+
value: u.type,
|
|
321
|
+
onChange: g("type"),
|
|
322
|
+
children: x(z)
|
|
260
323
|
})
|
|
261
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ I(l, {
|
|
262
325
|
label: "Status",
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
value:
|
|
265
|
-
onChange:
|
|
266
|
-
children: x(
|
|
326
|
+
children: /* @__PURE__ */ I(f, {
|
|
327
|
+
value: u.status,
|
|
328
|
+
onChange: g("status"),
|
|
329
|
+
children: x(B)
|
|
267
330
|
})
|
|
268
331
|
})]
|
|
269
332
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ I(l, {
|
|
271
334
|
label: "Industry",
|
|
272
|
-
children: /* @__PURE__ */
|
|
273
|
-
value:
|
|
274
|
-
onChange:
|
|
335
|
+
children: /* @__PURE__ */ I(y, {
|
|
336
|
+
value: u.industry,
|
|
337
|
+
onChange: g("industry"),
|
|
275
338
|
placeholder: "Financial services"
|
|
276
339
|
})
|
|
277
340
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ L("div", {
|
|
279
342
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ I(l, {
|
|
281
344
|
label: "Contact name",
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
-
value:
|
|
284
|
-
onChange:
|
|
345
|
+
children: /* @__PURE__ */ I(y, {
|
|
346
|
+
value: u.contactName,
|
|
347
|
+
onChange: g("contactName")
|
|
285
348
|
})
|
|
286
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ I(l, {
|
|
287
350
|
label: "Contact email",
|
|
288
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ I(y, {
|
|
289
352
|
type: "email",
|
|
290
|
-
value:
|
|
291
|
-
onChange:
|
|
353
|
+
value: u.contactEmail,
|
|
354
|
+
onChange: g("contactEmail")
|
|
292
355
|
})
|
|
293
356
|
})]
|
|
294
357
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ I(l, {
|
|
296
359
|
label: "Contact phone",
|
|
297
|
-
children: /* @__PURE__ */
|
|
298
|
-
value:
|
|
299
|
-
onChange:
|
|
360
|
+
children: /* @__PURE__ */ I(y, {
|
|
361
|
+
value: u.contactPhone,
|
|
362
|
+
onChange: g("contactPhone")
|
|
300
363
|
})
|
|
301
364
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ I(l, {
|
|
303
366
|
label: "Notes",
|
|
304
|
-
children: /* @__PURE__ */
|
|
305
|
-
value:
|
|
306
|
-
onChange:
|
|
367
|
+
children: /* @__PURE__ */ I(v, {
|
|
368
|
+
value: u.notes,
|
|
369
|
+
onChange: g("notes")
|
|
307
370
|
})
|
|
308
371
|
})
|
|
309
372
|
]
|
|
@@ -311,6 +374,6 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
|
|
|
311
374
|
});
|
|
312
375
|
};
|
|
313
376
|
//#endregion
|
|
314
|
-
export {
|
|
377
|
+
export { G as ClientsPage };
|
|
315
378
|
|
|
316
379
|
//# sourceMappingURL=ClientsPage.js.map
|