@wisemen/wise-crm-web 0.2.1 → 0.2.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.
Files changed (66) hide show
  1. package/README.md +1037 -0
  2. package/dist/BusinessDetailSidebarProvider-BQMRbGHQ.js +2083 -0
  3. package/dist/{BusinessDetailView-BbfUJk4T.js → BusinessDetailView-BxGxWOme.js} +5 -5
  4. package/dist/{CrmDetailHeaderCard-oRgvRuFD.js → CrmDetailHeaderCard-CCNJpMAK.js} +68 -67
  5. package/dist/{CrmDetailView-B0ZN_Fnu.js → CrmDetailView-ozCpuaX2.js} +14 -14
  6. package/dist/{DealCommunicationTabView-e7NkRy9r.js → DealCommunicationTabView-Df5EeolN.js} +2 -2
  7. package/dist/{DealDetailView-BPIatW_2.js → DealDetailView-DdWHqaBr.js} +163 -163
  8. package/dist/{DealExternalAttachment-D1PznE3V.js → DealExternalAttachment-qHdh4yMI.js} +1 -1
  9. package/dist/{DealSendMailDialog-BK_lUIx6.js → DealSendMailDialog-BaYcWZP-.js} +65 -69
  10. package/dist/Error-BArv9rNb.js +12650 -0
  11. package/dist/IndividualDetailSidebarProvider-BXZH951l.js +608 -0
  12. package/dist/{IndividualDetailView-Cdodb8Ii.js → IndividualDetailView-DfYS31-e.js} +5 -5
  13. package/dist/LinkBrokenIcon-CTlqmapl.js +17 -0
  14. package/dist/api/mutations/deal/dealCreate.mutation.d.ts +1 -1
  15. package/dist/api/mutations/deal/dealUpdate.mutation.d.ts +3 -3
  16. package/dist/api/mutations/mail-template/mailTemplateUpdate.mutation.d.ts +1 -1
  17. package/dist/client/apiErrorCode.gen.d.ts +2 -2
  18. package/dist/client/sdk.gen.d.ts +20 -17
  19. package/dist/client/types.gen.d.ts +1057 -1376
  20. package/dist/client/zod.gen.d.ts +15453 -17750
  21. package/dist/{client-BP13IBbl.js → client-pCaNxE3C.js} +748 -1047
  22. package/dist/components/crm-detail/CrmDetailHeaderCard.vue.d.ts +2 -0
  23. package/dist/deal/components/DealSendMailForm.vue.d.ts +2 -2
  24. package/dist/icons/LinkBrokenIcon.vue.d.ts +3 -0
  25. package/dist/icons/icon.d.ts +1 -0
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.js +448 -453
  28. package/dist/models/brand-colors/brandColor.model.d.ts +14 -0
  29. package/dist/models/brand-colors/brandColor.transformer.d.ts +5 -0
  30. package/dist/models/conent-locale/contentLocaleEnum.model.d.ts +3 -3
  31. package/dist/models/deal/create/dealCreateForm.model.d.ts +2 -2
  32. package/dist/models/deal/detail/dealDetail.model.d.ts +2 -2
  33. package/dist/models/deal/index/dealIndex.model.d.ts +2 -2
  34. package/dist/models/deal/update/dealUpdateForm.model.d.ts +2 -2
  35. package/dist/models/mail-template/detail/mailTemplateDetail.model.d.ts +2 -2
  36. package/dist/models/mail-template/update/mailTemplateUpdateForm.model.d.ts +3 -3
  37. package/dist/models/phone-number/phoneNumberForm.model.d.ts +3 -0
  38. package/dist/models/tenant-config/tenantConfig.model.d.ts +3 -0
  39. package/dist/plugins/i18n.plugin.d.ts +4 -0
  40. package/dist/style.css +1 -1
  41. package/dist/testing/factories/business.factory.d.ts +2 -1
  42. package/dist/testing.js +23 -2
  43. package/package.json +2 -1
  44. package/dist/BusinessDetailSidebarProvider-BrpWqjRs.js +0 -2081
  45. package/dist/Error-iBGGWZtH.js +0 -3695
  46. package/dist/IndividualDetailSidebarProvider-DUVi7XF0.js +0 -606
  47. /package/dist/{LinkExternalIcon-B9Qg55Oa.js → LinkExternalIcon-LOVtSqBT.js} +0 -0
  48. /package/dist/{LinkIcon-DCW5zjbQ.js → LinkIcon-DqBbVrvs.js} +0 -0
  49. /package/dist/{LocationPinIcon-DBc-wt2e.js → LocationPinIcon-Cp-wRgk2.js} +0 -0
  50. /package/dist/{MailIcon-Do4a7S2W.js → MailIcon-CnTrB1k3.js} +0 -0
  51. /package/dist/{MobilePhoneIcon-DSXyKwjd.js → MobilePhoneIcon-B747hmpS.js} +0 -0
  52. /package/dist/{NumberedListIcon-DUaSJSYu.js → NumberedListIcon-amJxDaaD.js} +0 -0
  53. /package/dist/{PhoneIcon-C8Cv1IiW.js → PhoneIcon-94MYVL85.js} +0 -0
  54. /package/dist/{RefreshIcon-CKZgHIZU.js → RefreshIcon-DRe3coBc.js} +0 -0
  55. /package/dist/{SendIcon-B-sQkQ3W.js → SendIcon-MYItp1xI.js} +0 -0
  56. /package/dist/{SettingsIcon-DzP-IQS5.js → SettingsIcon-C0qTAv0w.js} +0 -0
  57. /package/dist/{StarOutlineIcon-c0VfXRdQ.js → StarOutlineIcon-CiFLgepk.js} +0 -0
  58. /package/dist/{StarYellowIcon-CH0CnlSU.js → StarYellowIcon-C0v_XGwI.js} +0 -0
  59. /package/dist/{ThreeDotsIcon-C6PCFq5J.js → ThreeDotsIcon-lujOTU3G.js} +0 -0
  60. /package/dist/{TimeLineMarkerIcon-6B6SbwTN.js → TimeLineMarkerIcon-C4LfErbc.js} +0 -0
  61. /package/dist/{TrashIcon-BTPSVviz.js → TrashIcon-v4L9SEK_.js} +0 -0
  62. /package/dist/{UploadCloudIcon-1aMW5OJq.js → UploadCloudIcon-j1-1Rvqb.js} +0 -0
  63. /package/dist/{UserCircleIcon-D-19dc-2.js → UserCircleIcon-BjUt_2C4.js} +0 -0
  64. /package/dist/{UserIcon-D1H8TGlg.js → UserIcon-Cb2jFKLr.js} +0 -0
  65. /package/dist/{VerticalDotsIcon-DmPza4Jd.js → VerticalDotsIcon-Y3m6tlQ2.js} +0 -0
  66. /package/dist/{WalletIcon-BlI3D3v-.js → WalletIcon-pPsKbzmh.js} +0 -0
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { $ as AppInfiniteScroll_default, A as useSearch, B as AppForm_default, C as AppHeightTransition_default, E as useCrmConfig, F as useOffsetInfiniteQuery, J as LoggerUtil, L as AppDialogHeader_default, O as AppColorProvider_default, P as AppAndOrSeparator_default, S as AppSeparator_default, U as AppDialogContainer_default, V as i18nPlugin, W as AppDialogActions_default, Y as createI18nKeyMap, _ as useIndividualIndexQuery, b as AppGlobalFormError_default, ct as nl_BE_default, j as useRouteQueryState, k as EntityTypeUtil, lt as en_US_default, p as AppUnstyledButton_default, q as useApiErrorToast, st as individualUuidSchema, t as Error_default, tt as AppGrid_default, v as IndividualService, w as useCrm, x as EntityAutocomplete_default, y as IndividualUpdateTransformer, z as toFormField } from "./Error-iBGGWZtH.js";
2
- import { a as vatNumberSchema, c as AppVatNumberField_default, d as useBusinessCreateMutation, f as useBusinessDetailQuery, i as CustomFieldDefinitionUtil, l as FormFieldset_default, m as businessUuidSchema, n as VatNumberUtil, o as addressFormSchema, p as BusinessService, r as ContactCreateDialogBusinessForm_default, s as CustomFieldDefinitionForm_default, t as BusinessDetailSidebarProvider_default, u as useBusinessIndexQuery } from "./BusinessDetailSidebarProvider-BrpWqjRs.js";
3
- import { c as AddressUtil, u as assert } from "./CrmDetailHeaderCard-oRgvRuFD.js";
1
+ import { A as EntityTypeUtil, B as toFormField, C as AppSeparator_default, D as useCrmConfig, F as AppAndOrSeparator_default, G as AppDialogActions_default, H as i18nPlugin, I as useOffsetInfiniteQuery, J as useApiErrorToast, M as useRouteQueryState, R as AppDialogHeader_default, S as EntityAutocomplete_default, T as useCrm, V as AppForm_default, W as AppDialogContainer_default, X as createI18nKeyMap, Y as LoggerUtil, b as IndividualUpdateTransformer, ct as individualUuidSchema, et as AppInfiniteScroll_default, g as phoneNumberFormSchema, j as useSearch, k as AppColorProvider_default, lt as nl_BE_default, nt as AppGrid_default, p as AppUnstyledButton_default, t as Error_default, ut as en_US_default, v as useIndividualIndexQuery, w as AppHeightTransition_default, x as AppGlobalFormError_default, y as IndividualService } from "./Error-BArv9rNb.js";
2
+ import { a as vatNumberSchema, c as AppVatNumberField_default, d as useBusinessCreateMutation, f as useBusinessDetailQuery, i as CustomFieldDefinitionUtil, l as FormFieldset_default, m as businessUuidSchema, n as VatNumberUtil, o as addressFormSchema, p as BusinessService, r as ContactCreateDialogBusinessForm_default, s as CustomFieldDefinitionForm_default, t as BusinessDetailSidebarProvider_default, u as useBusinessIndexQuery } from "./BusinessDetailSidebarProvider-BQMRbGHQ.js";
3
+ import { c as AddressUtil, u as assert } from "./CrmDetailHeaderCard-CCNJpMAK.js";
4
4
  import { a as AppGroup_default, l as He, n as useDateTimeFormat, s as ZonedDateTimeTransformer, t as AppSkeletonLoader_default, u as ze } from "./AppSkeletonLoader-BAhoOmFD.js";
5
- import { _t as GlobalSearchCollectionName, b as searchCollectionsV1, ct as BillingInformationRequirement, dt as ClientType, ft as ContentLocale, gt as EntityType, it as viewRecentEntitiesV1, mt as DealSource, vt as Locale } from "./client-BP13IBbl.js";
5
+ import { _t as Locale, b as searchCollectionsV1, ct as BillingInformationRequirement, dt as ClientType, gt as GlobalSearchCollectionName, ht as EntityType, it as viewRecentEntitiesV1, pt as DealSource, yt as SdkContentLocale } from "./client-pCaNxE3C.js";
6
6
  import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BSi1g3Lh.js";
7
- import { _ as AnimateHeight_default, a as FormFileUploadDropzoneOverlay_default, c as useMailTemplateDetailQuery, d as ContentLocaleUtil, f as DealService, g as BoardService, h as useUserIndexQuery, i as FormFileUploadItem_default, l as MailTemplateService, m as ButtonTooltip_default, o as FileUploadService, p as TruncateText_default, r as fileReferenceFormSchema, s as AppRichTextField_default, t as DealSendMailDialog_default, u as DealSourceUtil, v as CenterContent_default, y as AppTagsInputField_default } from "./DealSendMailDialog-BK_lUIx6.js";
7
+ import { _ as AnimateHeight_default, a as FormFileUploadDropzoneOverlay_default, c as useMailTemplateDetailQuery, d as ContentLocaleUtil, f as DealService, g as BoardService, h as useUserIndexQuery, i as FormFileUploadItem_default, l as MailTemplateService, m as ButtonTooltip_default, o as FileUploadService, p as TruncateText_default, r as fileReferenceFormSchema, s as AppRichTextField_default, t as DealSendMailDialog_default, u as DealSourceUtil, v as CenterContent_default, y as AppTagsInputField_default } from "./DealSendMailDialog-BaYcWZP-.js";
8
8
  import { t as UuidUtil } from "./uuid.util-C1p-yuFc.js";
9
- import { o as FileReferenceTransformer } from "./DealExternalAttachment-D1PznE3V.js";
10
- import { n as useIndividualDetailQuery, t as IndividualDetailSidebarProvider_default } from "./IndividualDetailSidebarProvider-DUVi7XF0.js";
9
+ import { o as FileReferenceTransformer } from "./DealExternalAttachment-qHdh4yMI.js";
10
+ import { n as useIndividualDetailQuery, t as IndividualDetailSidebarProvider_default } from "./IndividualDetailSidebarProvider-BXZH951l.js";
11
11
  import z$1, { z } from "zod";
12
12
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, h, inject, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toValue, unref, useId, useModel, useTemplateRef, watch, withCtx, withModifiers } from "vue";
13
13
  import { useI18n } from "vue-i18n";
@@ -53,7 +53,7 @@ var OpenCrmDetailTransition_default = /* @__PURE__ */ defineComponent({
53
53
  _: 3
54
54
  }));
55
55
  }
56
- }), _hoisted_1$37 = { class: "p-sm flex h-full w-full flex-1 justify-center overflow-hidden" }, _hoisted_2$22 = { class: "mt-xl p-lg absolute top-0 right-6 z-1 flex w-full justify-end" }, CrmDetailContent_default = /* @__PURE__ */ defineComponent({
56
+ }), _hoisted_1$38 = { class: "p-sm flex h-full w-full flex-1 justify-center overflow-hidden" }, _hoisted_2$23 = { class: "mt-xl p-lg absolute top-0 right-6 z-1 flex w-full justify-end" }, CrmDetailContent_default = /* @__PURE__ */ defineComponent({
57
57
  __name: "CrmDetailContent",
58
58
  props: {
59
59
  entityType: {},
@@ -65,7 +65,7 @@ var OpenCrmDetailTransition_default = /* @__PURE__ */ defineComponent({
65
65
  color: unref(r).getEntityConfig(unref(EntityType).BUSINESS)?.color ?? null,
66
66
  class: "relative flex-1"
67
67
  }, {
68
- default: withCtx(() => [createElementVNode("div", _hoisted_1$37, [createElementVNode("div", _hoisted_2$22, [createVNode(unref(VcDialogCloseButton))]), createVNode(unref(VcTabs), {
68
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$38, [createElementVNode("div", _hoisted_2$23, [createVNode(unref(VcDialogCloseButton))]), createVNode(unref(VcTabs), {
69
69
  modelValue: n.value,
70
70
  "onUpdate:modelValue": i[0] ||= (e) => n.value = e,
71
71
  "class-config": {
@@ -198,7 +198,7 @@ function useBusinessBillingInformationQuery(e, t) {
198
198
  queryKey: { wiseCrmBusinessBillingInformation: { businessUuid: e } }
199
199
  });
200
200
  }
201
- var _hoisted_1$36 = { class: "border-primary/50 overflow-hidden rounded-xl border shadow-lg" }, _hoisted_2$21 = { class: "bg-tertiary p-lg flex h-14 items-center justify-between rounded-t-xl" }, _hoisted_3$16 = { class: "gap-sm flex items-center" }, _hoisted_4$9 = { class: "text-primary text-sm font-medium" }, _hoisted_5$5 = { class: "bg-primary p-xl shadow-lg" }, AppCard_default = /* @__PURE__ */ defineComponent({
201
+ var _hoisted_1$37 = { class: "border-primary/50 overflow-hidden rounded-xl border shadow-lg" }, _hoisted_2$22 = { class: "bg-tertiary p-lg flex h-14 items-center justify-between rounded-t-xl" }, _hoisted_3$16 = { class: "gap-sm flex items-center" }, _hoisted_4$10 = { class: "text-primary text-sm font-medium" }, _hoisted_5$5 = { class: "bg-primary p-xl shadow-lg" }, AppCard_default = /* @__PURE__ */ defineComponent({
202
202
  __name: "AppCard",
203
203
  props: {
204
204
  title: {},
@@ -206,10 +206,10 @@ var _hoisted_1$36 = { class: "border-primary/50 overflow-hidden rounded-xl borde
206
206
  },
207
207
  setup(e) {
208
208
  let t = e;
209
- return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$36, [createElementVNode("div", _hoisted_2$21, [createElementVNode("div", _hoisted_3$16, [createVNode(unref(VcIcon), {
209
+ return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$37, [createElementVNode("div", _hoisted_2$22, [createElementVNode("div", _hoisted_3$16, [createVNode(unref(VcIcon), {
210
210
  icon: t.icon,
211
211
  class: "text-primary size-4"
212
- }, null, 8, ["icon"]), createElementVNode("p", _hoisted_4$9, toDisplayString(t.title), 1)]), renderSlot(e.$slots, "header-action")]), createElementVNode("div", _hoisted_5$5, [renderSlot(e.$slots, "default")])]));
212
+ }, null, 8, ["icon"]), createElementVNode("p", _hoisted_4$10, toDisplayString(t.title), 1)]), renderSlot(e.$slots, "header-action")]), createElementVNode("div", _hoisted_5$5, [renderSlot(e.$slots, "default")])]));
213
213
  }
214
214
  }), emailOnlySchema$1 = z.object({
215
215
  billingAddress: addressFormSchema.nullable(),
@@ -264,56 +264,56 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
264
264
  onSubmit: { type: Function }
265
265
  },
266
266
  setup(e) {
267
- let t = e, a = useI18n(), o = useCrmConfig(), s = useForm({
268
- initialState: computed(() => t.billingInformation === null ? null : {
269
- billingAddress: t.businessAddress,
270
- invoiceCcEmails: t.billingInformation.invoiceCcEmails ?? [],
271
- invoiceEmail: t.billingInformation.invoiceEmail,
272
- purchaseNoteCcEmails: t.billingInformation.purchaseNoteCcEmails ?? [],
273
- purchaseNoteEmail: t.billingInformation.purchaseNoteEmail,
274
- reminderCcEmails: t.billingInformation.reminderCcEmails ?? [],
275
- reminderEmail: t.billingInformation.reminderEmail
267
+ let n = e, i = useI18n(), a = useCrmConfig(), o = useForm({
268
+ initialState: computed(() => n.billingInformation === null ? null : {
269
+ billingAddress: n.businessAddress,
270
+ invoiceCcEmails: n.billingInformation.invoiceCcEmails ?? [],
271
+ invoiceEmail: n.billingInformation.invoiceEmail,
272
+ purchaseNoteCcEmails: n.billingInformation.purchaseNoteCcEmails ?? [],
273
+ purchaseNoteEmail: n.billingInformation.purchaseNoteEmail,
274
+ reminderCcEmails: n.billingInformation.reminderCcEmails ?? [],
275
+ reminderEmail: n.billingInformation.reminderEmail
276
276
  }),
277
- schema: createBusinessBillingInformationFormSchema(o.getConfig().billingConfig?.businessBillingInformationRequirement ?? BillingInformationRequirement.EMAIL_OR_ADDRESS),
277
+ schema: createBusinessBillingInformationFormSchema(a.getConfig().billingConfig?.businessBillingInformationRequirement ?? BillingInformationRequirement.EMAIL_OR_ADDRESS),
278
278
  onSubmit: async (e) => {
279
- await t.onSubmit(e);
279
+ await n.onSubmit(e);
280
280
  }
281
- }), c = computed(() => `card-update-form-${UuidUtil.getRandom()}`), l = s.register("billingAddress"), d = s.register("invoiceCcEmails", []), p = s.register("invoiceEmail"), g = s.register("purchaseNoteCcEmails", []), _ = s.register("purchaseNoteEmail"), v = s.register("reminderCcEmails"), y = s.register("reminderEmail"), C = ref(s.state.value.reminderEmail !== s.state.value.invoiceEmail || JSON.stringify(s.state.value.reminderCcEmails) !== JSON.stringify(s.state.value.invoiceCcEmails)), T = ref(s.state.value.purchaseNoteEmail !== s.state.value.invoiceEmail || JSON.stringify(s.state.value.purchaseNoteCcEmails) !== JSON.stringify(s.state.value.invoiceCcEmails));
281
+ }), s = computed(() => `card-update-form-${UuidUtil.getRandom()}`), c = o.register("billingAddress"), l = o.register("invoiceCcEmails", []), d = o.register("invoiceEmail"), p = o.register("purchaseNoteCcEmails", []), g = o.register("purchaseNoteEmail"), v = o.register("reminderCcEmails"), y = o.register("reminderEmail"), C = ref(o.state.value.reminderEmail !== o.state.value.invoiceEmail || JSON.stringify(o.state.value.reminderCcEmails) !== JSON.stringify(o.state.value.invoiceCcEmails)), T = ref(o.state.value.purchaseNoteEmail !== o.state.value.invoiceEmail || JSON.stringify(o.state.value.purchaseNoteCcEmails) !== JSON.stringify(o.state.value.invoiceCcEmails));
282
282
  function j(e) {
283
- C.value || y.setValue(e ?? ""), T.value || _.setValue(e ?? "");
283
+ C.value || y.setValue(e ?? ""), T.value || g.setValue(e ?? "");
284
284
  }
285
285
  function I(e) {
286
- C.value || v.setValue(e ?? []), T.value || g.setValue(e ?? []);
286
+ C.value || v.setValue(e ?? []), T.value || p.setValue(e ?? []);
287
287
  }
288
288
  function K(e) {
289
- e || (y.setValue(p.modelValue.value ?? ""), v.setValue(d.modelValue.value ?? []));
289
+ e || (y.setValue(d.modelValue.value ?? ""), v.setValue(l.modelValue.value ?? []));
290
290
  }
291
291
  function Z(e) {
292
- e || (_.setValue(p.modelValue.value ?? ""), g.setValue(d.modelValue.value ?? []));
292
+ e || (g.setValue(d.modelValue.value ?? ""), p.setValue(l.modelValue.value ?? []));
293
293
  }
294
- return (e, t) => (openBlock(), createBlock(AppForm_default, {
295
- id: c.value,
296
- form: unref(s),
294
+ return (e, n) => (openBlock(), createBlock(AppForm_default, {
295
+ id: s.value,
296
+ form: unref(o),
297
297
  class: "flex h-full flex-col justify-between"
298
298
  }, {
299
299
  default: withCtx(() => [createVNode(AppCard_default, {
300
- title: unref(a).t("wise_crm.info_dialog.info.billing_information.card.title"),
300
+ title: unref(i).t("wise_crm.info_dialog.info.billing_information.card.title"),
301
301
  icon: "wallet"
302
302
  }, {
303
303
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
304
304
  default: withCtx(() => [
305
305
  createVNode(unref(VcAddressAutocomplete), mergeProps({
306
- label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.billing_address"),
307
- placeholder: unref(a).t("wise_crm.info_dialog.business.information.billing_information.billing_address")
308
- }, unref(toFormField)(unref(l))), null, 16, ["label", "placeholder"]),
306
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.billing_address"),
307
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.billing_address")
308
+ }, unref(toFormField)(unref(c))), null, 16, ["label", "placeholder"]),
309
309
  createVNode(unref(VcTextField), mergeProps({
310
- label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.invoice_email"),
311
- placeholder: unref(a).t("wise_crm.info_dialog.business.information.billing_information.email")
312
- }, unref(toFormField)(unref(p)), { "onUpdate:modelValue": j }), null, 16, ["label", "placeholder"]),
310
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.invoice_email"),
311
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.email")
312
+ }, unref(toFormField)(unref(d)), { "onUpdate:modelValue": j }), null, 16, ["label", "placeholder"]),
313
313
  createVNode(AppTagsInputField_default, mergeProps({
314
- label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails"),
315
- placeholder: unref(a).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails")
316
- }, unref(toFormField)(unref(d)), {
314
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails"),
315
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails")
316
+ }, unref(toFormField)(unref(l)), {
317
317
  class: "col-span-2",
318
318
  "onUpdate:modelValue": I
319
319
  }), null, 16, ["label", "placeholder"]),
@@ -321,12 +321,12 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
321
321
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
322
322
  default: withCtx(() => [createVNode(unref(VcSwitch), {
323
323
  modelValue: C.value,
324
- "onUpdate:modelValue": [t[0] ||= (e) => C.value = e, K],
325
- label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.reminder_different_switch"),
324
+ "onUpdate:modelValue": [n[0] ||= (e) => C.value = e, K],
325
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.reminder_different_switch"),
326
326
  class: "col-span-full"
327
- }, null, 8, ["modelValue", "label"]), C.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.reminder_email") }, unref(toFormField)(unref(y)), { placeholder: unref(a).t("wise_crm.info_dialog.business.information.billing_information.email") }), null, 16, ["label", "placeholder"]), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(v)), {
328
- label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.reminder_cc_emails"),
329
- placeholder: unref(a).t("wise_crm.info_dialog.business.information.billing_information.reminder_cc_emails"),
327
+ }, null, 8, ["modelValue", "label"]), C.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.reminder_email") }, unref(toFormField)(unref(y)), { placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.email") }), null, 16, ["label", "placeholder"]), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(v)), {
328
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.reminder_cc_emails"),
329
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.reminder_cc_emails"),
330
330
  class: "col-span-2"
331
331
  }), null, 16, ["label", "placeholder"])], 64)) : createCommentVNode("", !0)]),
332
332
  _: 1
@@ -337,12 +337,12 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
337
337
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
338
338
  default: withCtx(() => [createVNode(unref(VcSwitch), {
339
339
  modelValue: T.value,
340
- "onUpdate:modelValue": [t[1] ||= (e) => T.value = e, Z],
341
- label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.purchase_notes_different_switch"),
340
+ "onUpdate:modelValue": [n[1] ||= (e) => T.value = e, Z],
341
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.purchase_notes_different_switch"),
342
342
  class: "col-span-full"
343
- }, null, 8, ["modelValue", "label"]), T.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_email") }, unref(toFormField)(unref(_)), { placeholder: unref(a).t("wise_crm.info_dialog.business.information.billing_information.email") }), null, 16, ["label", "placeholder"]), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(g)), {
344
- label: unref(a).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_cc_emails"),
345
- placeholder: unref(a).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_cc_emails"),
343
+ }, null, 8, ["modelValue", "label"]), T.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_email") }, unref(toFormField)(unref(g)), { placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.email") }), null, 16, ["label", "placeholder"]), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(p)), {
344
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_cc_emails"),
345
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_cc_emails"),
346
346
  class: "col-span-2"
347
347
  }), null, 16, ["label", "placeholder"])], 64)) : createCommentVNode("", !0)]),
348
348
  _: 1
@@ -352,18 +352,18 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
352
352
  ]),
353
353
  _: 1
354
354
  })]),
355
- "header-action": withCtx(() => [createVNode(unref(FormCardSubmitButtonTransition_default), { "is-open": unref(s).isDirty.value }, {
355
+ "header-action": withCtx(() => [createVNode(unref(FormCardSubmitButtonTransition_default), { "is-open": unref(o).isDirty.value }, {
356
356
  default: withCtx(() => [createVNode(unref(VcButton), {
357
357
  "class-config": {
358
358
  loader: "size-3",
359
359
  iconRight: "text-success-500",
360
360
  root: "text-xs h-8 px-lg data-[loading=false]:not-disabled:bg-quaternary bg-quaternary border-transparent text-secondary shadow-none"
361
361
  },
362
- "is-loading": unref(s).isSubmitting.value,
363
- form: c.value,
362
+ "is-loading": unref(o).isSubmitting.value,
363
+ form: s.value,
364
364
  type: "submit"
365
365
  }, {
366
- default: withCtx(() => [createTextVNode(toDisplayString(unref(a).t("wise_crm.shared.save_changes")), 1)]),
366
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("wise_crm.shared.save_changes")), 1)]),
367
367
  _: 1
368
368
  }, 8, ["is-loading", "form"])]),
369
369
  _: 1
@@ -377,8 +377,8 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
377
377
  __name: "BusinessBillingInformationCard",
378
378
  props: { businessUuid: {} },
379
379
  setup(e) {
380
- let t = e, n = useApiErrorToast(), r = computed(() => t.businessUuid), i = useBusinessDetailQuery(r), a = useBusinessBillingInformationQuery(r, computed(() => i.data.value === null ? !1 : i.data.value.billingInformation !== null)), o = computed(() => a.data.value?.uuid ?? null), s = useBusinessBillingInformationUpsertMutation(), c = computed(() => i.data.value?.address ?? null);
381
- async function l(e) {
380
+ let t = e, n = useApiErrorToast(), r = computed(() => t.businessUuid), i = useBusinessDetailQuery(r), a = useBusinessBillingInformationQuery(r, computed(() => i.data.value === null ? !1 : i.data.value.billingInformation !== null)), o = computed(() => a.data.value?.uuid ?? null), s = useBusinessBillingInformationUpsertMutation(), l = computed(() => i.data.value?.address ?? null);
381
+ async function d(e) {
382
382
  try {
383
383
  await s.execute({
384
384
  body: e,
@@ -396,9 +396,9 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
396
396
  class: "h-40"
397
397
  })) : (openBlock(), createBlock(BusinessBillingInformationUpdateForm_default, {
398
398
  key: 1,
399
- "business-address": c.value,
399
+ "business-address": l.value,
400
400
  "business-uuid": r.value,
401
- "on-submit": l,
401
+ "on-submit": d,
402
402
  "billing-information": unref(a).data.value
403
403
  }, null, 8, [
404
404
  "business-address",
@@ -470,8 +470,8 @@ z.object({
470
470
  customFields: z.object(CustomFieldDefinitionUtil.getZodType([])).nullable(),
471
471
  email: z.string().email().nullable(),
472
472
  language: localeSchema,
473
- mobilePhone: z.string().nullable(),
474
- phone: z.string().nullable(),
473
+ mobilePhone: phoneNumberFormSchema.nullable(),
474
+ phone: phoneNumberFormSchema.nullable(),
475
475
  vatNumber: vatNumberSchema.nullable()
476
476
  });
477
477
  function getBusinessUpdateFormSchema(e) {
@@ -482,12 +482,12 @@ function getBusinessUpdateFormSchema(e) {
482
482
  customFields: z.object(CustomFieldDefinitionUtil.getZodType(e)).nullable(),
483
483
  email: z.string().email().nullable(),
484
484
  language: localeSchema,
485
- mobilePhone: z.string().nullable(),
486
- phone: z.string().nullable(),
485
+ mobilePhone: phoneNumberFormSchema.nullable(),
486
+ phone: phoneNumberFormSchema.nullable(),
487
487
  vatNumber: vatNumberSchema.nullable()
488
488
  });
489
489
  }
490
- var BusinessInfoForm_default = /* @__PURE__ */ defineComponent({
490
+ var _hoisted_1$36 = { class: "col-span-4" }, BusinessInfoForm_default = /* @__PURE__ */ defineComponent({
491
491
  __name: "BusinessInfoForm",
492
492
  props: {
493
493
  business: {},
@@ -495,24 +495,24 @@ var BusinessInfoForm_default = /* @__PURE__ */ defineComponent({
495
495
  onSubmit: { type: Function }
496
496
  },
497
497
  setup(e) {
498
- let t = e, r = useI18n(), i = useForm({
498
+ let n = e, r = useI18n(), i = useForm({
499
499
  initialState: {
500
- name: t.business.name,
501
- address: t.business.address,
502
- companyNumber: t.business.companyNumber,
503
- customFields: t.business.customFields ?? null,
504
- email: t.business.email,
505
- language: t.business.language,
506
- mobilePhone: t.business.mobilePhone,
507
- phone: t.business.phone,
508
- vatNumber: t.business.vatNumber
500
+ name: n.business.name,
501
+ address: n.business.address,
502
+ companyNumber: n.business.companyNumber,
503
+ customFields: n.business.customFields ?? null,
504
+ email: n.business.email,
505
+ language: n.business.language,
506
+ mobilePhone: n.business.mobilePhone,
507
+ phone: n.business.phone,
508
+ vatNumber: n.business.vatNumber
509
509
  },
510
- schema: getBusinessUpdateFormSchema(t.customFieldDefinitions),
510
+ schema: getBusinessUpdateFormSchema(n.customFieldDefinitions),
511
511
  onSubmit: async (e) => {
512
- await t.onSubmit(e);
512
+ await n.onSubmit(e);
513
513
  }
514
514
  }), a = i.register("name"), o = i.register("address"), s = i.register("companyNumber"), c = i.register("email"), l = i.register("mobilePhone"), d = i.register("phone"), p = i.register("vatNumber"), g = i.register("language");
515
- return (e, _) => (openBlock(), createBlock(AppForm_default, {
515
+ return (e, v) => (openBlock(), createBlock(AppForm_default, {
516
516
  form: unref(i),
517
517
  class: "flex h-full flex-col justify-between"
518
518
  }, {
@@ -522,44 +522,38 @@ var BusinessInfoForm_default = /* @__PURE__ */ defineComponent({
522
522
  }, {
523
523
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 4 }, {
524
524
  default: withCtx(() => [
525
- createVNode(FormFieldset_default, {
526
- title: unref(r).t("wise_crm.shared.contact_info"),
527
- class: "col-span-4"
528
- }, {
529
- default: withCtx(() => [createVNode(AppGrid_default, { cols: 4 }, {
530
- default: withCtx(() => [
531
- createVNode(unref(VcTextField), mergeProps({ "is-required": !0 }, unref(toFormField)(unref(a)), {
532
- label: unref(r).t("wise_crm.contact.create_dialog.form.name"),
533
- placeholder: unref(r).t("wise_crm.contact.create_dialog.form.name"),
534
- class: "col-span-2"
535
- }), null, 16, ["label", "placeholder"]),
536
- createVNode(AppVatNumberField_default, mergeProps({
537
- label: unref(r).t("wise_crm.contact.create_dialog.form.vat_number"),
538
- placeholder: unref(r).t("wise_crm.contact.create_dialog.form.vat_number")
539
- }, unref(toFormField)(unref(p))), null, 16, ["label", "placeholder"]),
540
- createVNode(unref(VcTextField), mergeProps({
541
- label: unref(r).t("wise_crm.contact.create_dialog.form.company_number"),
542
- placeholder: unref(r).t("wise_crm.contact.create_dialog.form.company_number")
543
- }, unref(toFormField)(unref(s))), null, 16, ["label", "placeholder"]),
544
- createVNode(unref(VcAddressAutocomplete), mergeProps({
545
- "is-required": !0,
546
- label: unref(r).t("wise_crm.contact.create_dialog.form.fields.address")
547
- }, unref(toFormField)(unref(o)), { class: "col-span-2" }), null, 16, ["label"]),
548
- createVNode(unref(VcSelect), mergeProps({ label: unref(r).t("wise_crm.contact.create_dialog.form.fields.language") }, unref(toFormField)(unref(g)), { "display-fn": (e) => e ? unref(r).t(unref(LocaleEnum).getI18nKey(e)) : "" }), {
549
- default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(Locale)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
550
- key: e,
551
- value: e
552
- }, {
553
- default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t(unref(LocaleEnum).getI18nKey(e))), 1)]),
554
- _: 2
555
- }, 1032, ["value"]))), 128))]),
556
- _: 1
557
- }, 16, ["label", "display-fn"])
558
- ]),
559
- _: 1
560
- })]),
525
+ createElementVNode("div", _hoisted_1$36, [createVNode(AppGrid_default, { cols: 4 }, {
526
+ default: withCtx(() => [
527
+ createVNode(unref(VcTextField), mergeProps({ "is-required": !0 }, unref(toFormField)(unref(a)), {
528
+ label: unref(r).t("wise_crm.contact.create_dialog.form.name"),
529
+ placeholder: unref(r).t("wise_crm.contact.create_dialog.form.name"),
530
+ class: "col-span-2"
531
+ }), null, 16, ["label", "placeholder"]),
532
+ createVNode(AppVatNumberField_default, mergeProps({
533
+ label: unref(r).t("wise_crm.contact.create_dialog.form.vat_number"),
534
+ placeholder: unref(r).t("wise_crm.contact.create_dialog.form.vat_number")
535
+ }, unref(toFormField)(unref(p))), null, 16, ["label", "placeholder"]),
536
+ createVNode(unref(VcTextField), mergeProps({
537
+ label: unref(r).t("wise_crm.contact.create_dialog.form.company_number"),
538
+ placeholder: unref(r).t("wise_crm.contact.create_dialog.form.company_number")
539
+ }, unref(toFormField)(unref(s))), null, 16, ["label", "placeholder"]),
540
+ createVNode(unref(VcAddressAutocomplete), mergeProps({
541
+ "is-required": !0,
542
+ label: unref(r).t("wise_crm.contact.create_dialog.form.fields.address")
543
+ }, unref(toFormField)(unref(o)), { class: "col-span-2" }), null, 16, ["label"]),
544
+ createVNode(unref(VcSelect), mergeProps({ label: unref(r).t("wise_crm.contact.create_dialog.form.fields.language") }, unref(toFormField)(unref(g)), { "display-fn": (e) => e ? unref(r).t(unref(LocaleEnum).getI18nKey(e)) : "" }), {
545
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(Locale)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
546
+ key: e,
547
+ value: e
548
+ }, {
549
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t(unref(LocaleEnum).getI18nKey(e))), 1)]),
550
+ _: 2
551
+ }, 1032, ["value"]))), 128))]),
552
+ _: 1
553
+ }, 16, ["label", "display-fn"])
554
+ ]),
561
555
  _: 1
562
- }, 8, ["title"]),
556
+ })]),
563
557
  createVNode(FormFieldset_default, {
564
558
  title: unref(r).t("wise_crm.shared.contact_info"),
565
559
  class: "col-span-4"
@@ -591,7 +585,7 @@ var BusinessInfoForm_default = /* @__PURE__ */ defineComponent({
591
585
  }, 8, ["title"]),
592
586
  createVNode(CustomFieldDefinitionForm_default, {
593
587
  form: unref(i),
594
- "custom-field-definitions": t.customFieldDefinitions,
588
+ "custom-field-definitions": n.customFieldDefinitions,
595
589
  class: "col-span-full"
596
590
  }, null, 8, ["form", "custom-field-definitions"])
597
591
  ]),
@@ -622,31 +616,31 @@ var BusinessInfoForm_default = /* @__PURE__ */ defineComponent({
622
616
  props: { businessUuid: {} },
623
617
  emits: ["close"],
624
618
  setup(e, { emit: t }) {
625
- let n = e, r = t, a = useCrmConfig(), o = useApiErrorToast(), s = computed(() => n.businessUuid), c = useBusinessUpdateMutation(), l = useBusinessDetailQuery(computed(() => s.value));
626
- async function d(e) {
619
+ let n = e, i = t, a = useCrmConfig(), o = useApiErrorToast(), s = computed(() => n.businessUuid), l = useBusinessUpdateMutation(), d = useBusinessDetailQuery(computed(() => s.value));
620
+ async function p(e) {
627
621
  try {
628
- await c.execute({
622
+ await l.execute({
629
623
  body: e,
630
624
  params: { uuid: s.value }
631
- }), p();
625
+ }), g();
632
626
  } catch (e) {
633
627
  o.show(e);
634
628
  }
635
629
  }
636
- function p() {
637
- r("close");
630
+ function g() {
631
+ i("close");
638
632
  }
639
- return (e, t) => unref(l).isLoading.value ? (openBlock(), createBlock(AppSkeletonLoader_default, {
633
+ return (e, t) => unref(d).isLoading.value ? (openBlock(), createBlock(AppSkeletonLoader_default, {
640
634
  key: 0,
641
635
  class: "h-100"
642
- })) : unref(l).data.value ? (openBlock(), createBlock(BusinessInfoForm_default, {
636
+ })) : unref(d).data.value ? (openBlock(), createBlock(BusinessInfoForm_default, {
643
637
  key: 1,
644
- business: unref(l).data.value,
638
+ business: unref(d).data.value,
645
639
  "custom-field-definitions": unref(a).getCustomFieldDefinitionForEntity(unref(EntityType).BUSINESS),
646
- "on-submit": d
640
+ "on-submit": p
647
641
  }, null, 8, ["business", "custom-field-definitions"])) : createCommentVNode("", !0);
648
642
  }
649
- }), _hoisted_1$35 = { class: "flex flex-col" }, _hoisted_2$20 = { class: "font-medium" }, _hoisted_3$15 = {
643
+ }), _hoisted_1$35 = { class: "flex flex-col" }, _hoisted_2$21 = { class: "font-medium" }, _hoisted_3$15 = {
650
644
  key: 0,
651
645
  class: "text-placeholder text-sm"
652
646
  }, BusinessOverviewTableNameCell_default = /* @__PURE__ */ defineComponent({
@@ -658,7 +652,7 @@ var BusinessInfoForm_default = /* @__PURE__ */ defineComponent({
658
652
  setup(e) {
659
653
  let t = e;
660
654
  return (e, n) => (openBlock(), createBlock(unref(VcTableCell), null, {
661
- default: withCtx(() => [createElementVNode("div", _hoisted_1$35, [createElementVNode("span", _hoisted_2$20, toDisplayString(t.name), 1), t.email ? (openBlock(), createElementBlock("span", _hoisted_3$15, toDisplayString(t.email), 1)) : createCommentVNode("", !0)])]),
655
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$35, [createElementVNode("span", _hoisted_2$21, toDisplayString(t.name), 1), t.email ? (openBlock(), createElementBlock("span", _hoisted_3$15, toDisplayString(t.email), 1)) : createCommentVNode("", !0)])]),
662
656
  _: 1
663
657
  }));
664
658
  }
@@ -736,7 +730,7 @@ var DataTableHeaderCell_default = /* @__PURE__ */ defineComponent({
736
730
  }), _hoisted_1$33 = {
737
731
  key: 0,
738
732
  class: "absolute top-1/2 left-1/2 z-12 -translate-x-1/2 -translate-y-1/2 text-center"
739
- }, _hoisted_2$19 = { class: "mt-xl text-primary text-lg font-semibold" }, _hoisted_3$14 = { class: "pt-md pb-xl text-secondary mx-auto max-w-92 text-sm" }, _hoisted_4$8 = { class: "relative col-span-full grid grid-cols-subgrid overflow-hidden mask-b-from-0% mask-b-to-75%" }, ROW_COUNT = 10, DataTableEmptyOrLoadingState_default = /* @__PURE__ */ defineComponent({
733
+ }, _hoisted_2$20 = { class: "mt-xl text-primary text-lg font-semibold" }, _hoisted_3$14 = { class: "pt-md pb-xl text-secondary mx-auto max-w-92 text-sm" }, _hoisted_4$9 = { class: "relative col-span-full grid grid-cols-subgrid overflow-hidden mask-b-from-0% mask-b-to-75%" }, ROW_COUNT = 10, DataTableEmptyOrLoadingState_default = /* @__PURE__ */ defineComponent({
740
734
  __name: "DataTableEmptyOrLoadingState",
741
735
  setup(e) {
742
736
  let { isEmpty: t, isLoading: n, activeFilterCount: r, columns: i, gridTemplateColumns: a, onClear: o } = useInjectDataTableContext(), s = useI18n();
@@ -751,7 +745,7 @@ var DataTableHeaderCell_default = /* @__PURE__ */ defineComponent({
751
745
  icon: "search",
752
746
  class: "text-secondary mx-auto size-6"
753
747
  }),
754
- createElementVNode("p", _hoisted_2$19, [unref(r) > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(s).t("component.table.no_results.title")), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(s).t("component.table.no_data.title")), 1)], 64))]),
748
+ createElementVNode("p", _hoisted_2$20, [unref(r) > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(s).t("component.table.no_results.title")), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(s).t("component.table.no_data.title")), 1)], 64))]),
755
749
  createElementVNode("p", _hoisted_3$14, [unref(r) > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(s).t("component.table.no_results.description")), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(s).t("component.table.no_data.description")), 1)], 64))]),
756
750
  unref(r) > 0 ? (openBlock(), createBlock(unref(VcButton), {
757
751
  key: 0,
@@ -763,7 +757,7 @@ var DataTableHeaderCell_default = /* @__PURE__ */ defineComponent({
763
757
  _: 1
764
758
  })) : createCommentVNode("", !0)
765
759
  ])])) : createCommentVNode("", !0),
766
- createElementVNode("div", _hoisted_4$8, [unref(t) ? (openBlock(), createBlock(DataTableEmptyOrLoadingStateBlurOverlay_default, {
760
+ createElementVNode("div", _hoisted_4$9, [unref(t) ? (openBlock(), createBlock(DataTableEmptyOrLoadingStateBlurOverlay_default, {
767
761
  key: 0,
768
762
  class: "to-primary inset-0 z-5 from-transparent dark:bg-gradient-to-b"
769
763
  })) : createCommentVNode("", !0), (openBlock(), createElementBlock(Fragment, null, renderList(ROW_COUNT, (e) => createElementVNode("div", {
@@ -870,11 +864,11 @@ var DataTableHeaderCell_default = /* @__PURE__ */ defineComponent({
870
864
  onNextPage: {}
871
865
  },
872
866
  setup(e) {
873
- let t = e, n = useTemplateRef("scrollContainerRef"), r = t.columns.every((e) => e.maxWidth !== void 0), i = computed(() => `${t.columns.map((e) => `minmax(${e.width ?? "min-content"},${e.maxWidth ?? "auto"})`).join(" ")}`), a = computed(() => t.search === null ? !1 : t.search.debouncedSearch.value.trim().length > 0), s = computed(() => t.filters === null ? a.value ? 1 : 0 : t.filters.activeFilters.value.filter((e) => !e.isStatic).length + (a.value ? 1 : 0)), c = computed(() => t.data.length === 0 && !t.isLoading);
874
- function l() {
867
+ let t = e, n = useTemplateRef("scrollContainerRef"), r = t.columns.every((e) => e.maxWidth !== void 0), i = computed(() => `${t.columns.map((e) => `minmax(${e.width ?? "min-content"},${e.maxWidth ?? "auto"})`).join(" ")}`), a = computed(() => t.search === null ? !1 : t.search.debouncedSearch.value.trim().length > 0), o = computed(() => t.filters === null ? a.value ? 1 : 0 : t.filters.activeFilters.value.filter((e) => !e.isStatic).length + (a.value ? 1 : 0)), s = computed(() => t.data.length === 0 && !t.isLoading);
868
+ function c() {
875
869
  t.filters?.clearAllFilters(), t.search?.clearSearch();
876
870
  }
877
- function d(e) {
871
+ function l(e) {
878
872
  return t.rowAction?.type === "link" ? {
879
873
  label: t.rowAction.label(e),
880
874
  to: t.rowAction.to(e),
@@ -888,13 +882,13 @@ var DataTableHeaderCell_default = /* @__PURE__ */ defineComponent({
888
882
  return r && LoggerUtil.warn("All columns have a maxWidth defined. This can restrict the table from expanding to fill available space, potentially causing layout issues. Consider leaving at least one column without a maxWidth to allow flexible sizing."), useInfiniteScroll(computed(() => n.value?.$el ?? null), () => {
889
883
  t.onNextPage();
890
884
  }, { distance: 400 }), useProvideDataTableContext({
891
- isEmpty: c,
885
+ isEmpty: s,
892
886
  isLoading: computed(() => t.isLoading),
893
- activeFilterCount: s,
887
+ activeFilterCount: o,
894
888
  columns: computed(() => t.columns),
895
889
  gridTemplateColumns: i,
896
890
  sort: t.sort,
897
- onClear: l
891
+ onClear: c
898
892
  }), (r, a) => t.error === null ? (openBlock(), createBlock(unref(VcTableRoot), {
899
893
  key: 1,
900
894
  "is-first-column-sticky": t.isFirstColumnSticky,
@@ -909,7 +903,7 @@ var DataTableHeaderCell_default = /* @__PURE__ */ defineComponent({
909
903
  default: withCtx(() => [createVNode(DataTableHeader_default), createVNode(unref(VcTableBody), null, {
910
904
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(t.data, (n) => (openBlock(), createBlock(unref(VcTableRow), {
911
905
  key: t.getKey(n),
912
- action: d(n)
906
+ action: l(n)
913
907
  }, {
914
908
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.columns, (e) => (openBlock(), createBlock(resolveDynamicComponent(e.cell(n)), { key: e.key }))), 128))]),
915
909
  _: 2
@@ -918,10 +912,10 @@ var DataTableHeaderCell_default = /* @__PURE__ */ defineComponent({
918
912
  })]),
919
913
  _: 1
920
914
  })) : createCommentVNode("", !0), createVNode(unref(VcTableHiddenResultsHint), {
921
- "is-empty": c.value,
915
+ "is-empty": s.value,
922
916
  "is-loading": t.isLoading,
923
- "active-filter-count": s.value,
924
- onClear: l
917
+ "active-filter-count": o.value,
918
+ onClear: c
925
919
  }, null, 8, [
926
920
  "is-empty",
927
921
  "is-loading",
@@ -1058,7 +1052,7 @@ function useGlobalSearchQuery(e, t) {
1058
1052
  } }
1059
1053
  });
1060
1054
  }
1061
- var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto mb-4 flex size-12 items-center justify-center rounded-full bg-gray-100" }, _hoisted_3$13 = { class: "mb-2 text-sm font-medium text-gray-900" }, _hoisted_4$7 = { class: "mb-6 text-sm text-gray-500" }, CrmSearchDialogContentEmptyState_default = /* @__PURE__ */ defineComponent({
1055
+ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$19 = { class: "mx-auto mb-4 flex size-12 items-center justify-center rounded-full bg-gray-100" }, _hoisted_3$13 = { class: "mb-2 text-sm font-medium text-gray-900" }, _hoisted_4$8 = { class: "mb-6 text-sm text-gray-500" }, CrmSearchDialogContentEmptyState_default = /* @__PURE__ */ defineComponent({
1062
1056
  __name: "CrmSearchDialogContentEmptyState",
1063
1057
  props: { searchTerm: {} },
1064
1058
  emits: ["clearSearch", "createNewContact"],
@@ -1087,12 +1081,12 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1087
1081
  class: "p-4"
1088
1082
  }, {
1089
1083
  default: withCtx(() => [createElementVNode("div", _hoisted_1$32, [
1090
- createElementVNode("div", _hoisted_2$18, [createVNode(unref(VcIcon), {
1084
+ createElementVNode("div", _hoisted_2$19, [createVNode(unref(VcIcon), {
1091
1085
  icon: "search",
1092
1086
  class: "size-6 text-gray-400"
1093
1087
  })]),
1094
1088
  createElementVNode("h3", _hoisted_3$13, toDisplayString(unref(r).t("wise_crm.search.empty_state.title")), 1),
1095
- createElementVNode("p", _hoisted_4$7, toDisplayString(unref(r).t("wise_crm.search.empty_state.description", { searchTerm: e.searchTerm })), 1),
1089
+ createElementVNode("p", _hoisted_4$8, toDisplayString(unref(r).t("wise_crm.search.empty_state.description", { searchTerm: e.searchTerm })), 1),
1096
1090
  createVNode(AppGroup_default, {
1097
1091
  gap: "sm",
1098
1092
  justify: "center",
@@ -1118,7 +1112,7 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1118
1112
  _: 1
1119
1113
  }));
1120
1114
  }
1121
- }), _hoisted_1$31 = { class: "flex flex-col" }, _hoisted_2$17 = { class: "flex items-center border-gray-200 py-3" }, _hoisted_3$12 = { key: 0 }, _hoisted_4$6 = { class: "px-2 py-1" }, _hoisted_5$4 = { class: "min-w-0 flex-1" }, _hoisted_6$1 = { class: "font-medium text-gray-900" }, _hoisted_7 = {
1115
+ }), _hoisted_1$31 = { class: "flex flex-col" }, _hoisted_2$18 = { class: "flex items-center border-gray-200 py-3" }, _hoisted_3$12 = { key: 0 }, _hoisted_4$7 = { class: "px-2 py-1" }, _hoisted_5$4 = { class: "min-w-0 flex-1" }, _hoisted_6$1 = { class: "font-medium text-gray-900" }, _hoisted_7 = {
1122
1116
  key: 0,
1123
1117
  class: "divide-fg-disabled-subtle text-quaternary flex items-center divide-x text-xs [&>p]:px-2 [&>p:first-child]:pl-0"
1124
1118
  }, _hoisted_8 = { key: 0 }, _hoisted_9 = { key: 1 }, _hoisted_10 = { key: 2 }, _hoisted_11 = {
@@ -1129,16 +1123,16 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1129
1123
  props: { onCreateNewContact: { type: Function } },
1130
1124
  emits: ["close", "select"],
1131
1125
  setup(e, { emit: t }) {
1132
- let n = e, r = t, i = useI18n(), a = useCrm(), o = ref(""), s = ref(""), c = useDebounceFn((e) => {
1133
- o.value = e;
1126
+ let r = e, i = t, a = useI18n(), o = useCrm(), s = ref(""), c = ref(""), l = useDebounceFn((e) => {
1127
+ s.value = e;
1134
1128
  }, 300);
1135
- watch(s, (e) => {
1136
- c(e);
1129
+ watch(c, (e) => {
1130
+ l(e);
1137
1131
  });
1138
- let l = [GlobalSearchCollectionName.INDIVIDUAL, GlobalSearchCollectionName.BUSINESS], p = useGlobalSearchQuery(computed(() => o.value), computed(() => l ?? [])), g = computed(() => (p.data.value ?? []).map((e) => e.entity.type === "individual" ? {
1132
+ let d = [GlobalSearchCollectionName.INDIVIDUAL, GlobalSearchCollectionName.BUSINESS], p = useGlobalSearchQuery(computed(() => s.value), computed(() => d ?? [])), _ = computed(() => (p.data.value ?? []).map((e) => e.entity.type === "individual" ? {
1139
1133
  id: e.entity.uuid,
1140
- address: e.entity.address ? _(e.entity.address) : null,
1141
- description: a.getEntityConfig(EntityType.INDIVIDUAL)?.name ?? `${i.t("wise_crm.search.individual_label")}`,
1134
+ address: e.entity.address ? v(e.entity.address) : null,
1135
+ description: o.getEntityConfig(EntityType.INDIVIDUAL)?.name ?? `${a.t("wise_crm.search.individual_label")}`,
1142
1136
  email: e.entity.email,
1143
1137
  entity: e.entity,
1144
1138
  icon: "user",
@@ -1146,8 +1140,8 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1146
1140
  type: e.collection
1147
1141
  } : e.entity.type === "business" ? {
1148
1142
  id: e.entity.uuid,
1149
- address: e.entity.address ? _(e.entity.address) : null,
1150
- description: a.getEntityConfig(EntityType.BUSINESS)?.name ?? `${i.t("wise_crm.search.business_label")}`,
1143
+ address: e.entity.address ? v(e.entity.address) : null,
1144
+ description: o.getEntityConfig(EntityType.BUSINESS)?.name ?? `${a.t("wise_crm.search.business_label")}`,
1151
1145
  email: null,
1152
1146
  entity: e.entity,
1153
1147
  icon: "building",
@@ -1163,7 +1157,7 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1163
1157
  label: e.entity.name,
1164
1158
  type: e.collection
1165
1159
  }).slice(0, 5));
1166
- function _(e) {
1160
+ function v(e) {
1167
1161
  return {
1168
1162
  placeId: e.placeId,
1169
1163
  bus: e.unit ?? "",
@@ -1178,54 +1172,54 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1178
1172
  streetNumber: e.streetNumber ?? ""
1179
1173
  };
1180
1174
  }
1181
- let v = ref(null), y = computed(() => o.value.length > 0), C = computed(() => y.value && !p.isLoading.value && g.value.length === 0);
1182
- function T(e) {
1183
- r("select", e.entity.type, e.id);
1175
+ let y = ref(null), C = computed(() => s.value.length > 0), T = computed(() => C.value && !p.isLoading.value && _.value.length === 0);
1176
+ function j(e) {
1177
+ i("select", e.entity.type, e.id);
1184
1178
  }
1185
- function j() {
1186
- n.onCreateNewContact();
1187
- }
1188
- function I(e) {
1189
- return e === v.value;
1179
+ function I() {
1180
+ r.onCreateNewContact();
1190
1181
  }
1191
1182
  function K(e) {
1192
- v.value = e ?? null;
1183
+ return e === y.value;
1184
+ }
1185
+ function Z(e) {
1186
+ y.value = e ?? null;
1193
1187
  }
1194
- return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", _hoisted_2$17, [createVNode(AppGroup_default, {
1188
+ return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", _hoisted_2$18, [createVNode(AppGroup_default, {
1195
1189
  gap: "sm",
1196
1190
  align: "center",
1197
1191
  class: "flex-1"
1198
1192
  }, {
1199
1193
  default: withCtx(() => [createVNode(unref(ListboxRoot), {
1200
1194
  class: "flex-1",
1201
- onHighlight: t[2] ||= (e) => K(e?.value?.toString())
1195
+ onHighlight: t[2] ||= (e) => Z(e?.value?.toString())
1202
1196
  }, {
1203
1197
  default: withCtx(() => [createVNode(unref(ListboxFilter), {
1204
1198
  class: "w-full border-0 bg-transparent text-sm placeholder-gray-500 outline-0 focus:outline-0",
1205
1199
  "as-child": ""
1206
1200
  }, {
1207
1201
  default: withCtx(() => [createVNode(unref(VcTextField), {
1208
- modelValue: s.value,
1209
- "onUpdate:modelValue": t[0] ||= (e) => s.value = e,
1202
+ modelValue: c.value,
1203
+ "onUpdate:modelValue": t[0] ||= (e) => c.value = e,
1210
1204
  "class-config": {
1211
1205
  input: "text-md",
1212
1206
  root: "border-none h-auto bg-transparent rounded-none shadow-none outline-none"
1213
1207
  },
1214
- placeholder: unref(i).t("wise_crm.search.placeholder"),
1208
+ placeholder: unref(a).t("wise_crm.search.placeholder"),
1215
1209
  "icon-left": "search",
1216
1210
  "auto-focus": ""
1217
1211
  }, null, 8, ["modelValue", "placeholder"])]),
1218
1212
  _: 1
1219
1213
  }), createVNode(AnimateHeight_default, null, {
1220
- default: withCtx(() => [y.value ? (openBlock(), createElementBlock("div", _hoisted_3$12, [createVNode(AppSeparator_default, { class: "my-2" }), g.value.length > 0 ? (openBlock(), createBlock(unref(ListboxContent), {
1214
+ default: withCtx(() => [C.value ? (openBlock(), createElementBlock("div", _hoisted_3$12, [createVNode(AppSeparator_default, { class: "my-2" }), _.value.length > 0 ? (openBlock(), createBlock(unref(ListboxContent), {
1221
1215
  key: 0,
1222
1216
  class: "max-h-80 overflow-y-auto"
1223
1217
  }, {
1224
- default: withCtx(() => [createElementVNode("div", _hoisted_4$6, [(openBlock(!0), createElementBlock(Fragment, null, renderList(g.value, (e) => (openBlock(), createBlock(unref(ListboxItem), {
1218
+ default: withCtx(() => [createElementVNode("div", _hoisted_4$7, [(openBlock(!0), createElementBlock(Fragment, null, renderList(_.value, (e) => (openBlock(), createBlock(unref(ListboxItem), {
1225
1219
  key: e.id,
1226
1220
  value: e.id,
1227
- class: normalizeClass([[I(e.id) ? "bg-gray-100" : ""], "flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors hover:bg-gray-100 focus:bg-gray-100 focus:outline-none"]),
1228
- onClick: (t) => T(e)
1221
+ class: normalizeClass([[K(e.id) ? "bg-gray-100" : ""], "flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors hover:bg-gray-100 focus:bg-gray-100 focus:outline-none"]),
1222
+ onClick: (t) => j(e)
1229
1223
  }, {
1230
1224
  default: withCtx(() => [createVNode(unref(VcIcon), {
1231
1225
  icon: e.icon,
@@ -1243,12 +1237,12 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1243
1237
  "onClick"
1244
1238
  ]))), 128))])]),
1245
1239
  _: 1
1246
- })) : C.value ? (openBlock(), createBlock(CrmSearchDialogContentEmptyState_default, {
1240
+ })) : T.value ? (openBlock(), createBlock(CrmSearchDialogContentEmptyState_default, {
1247
1241
  key: 1,
1248
- "search-term": o.value,
1249
- onCreateNewContact: j,
1250
- onClearSearch: t[1] ||= (e) => s.value = ""
1251
- }, null, 8, ["search-term"])) : unref(p).isLoading ? (openBlock(), createElementBlock("div", _hoisted_11, [createElementVNode("div", _hoisted_12, toDisplayString(unref(i).t("wise_crm.search.searching")), 1)])) : createCommentVNode("", !0)])) : createCommentVNode("", !0)]),
1242
+ "search-term": s.value,
1243
+ onCreateNewContact: I,
1244
+ onClearSearch: t[1] ||= (e) => c.value = ""
1245
+ }, null, 8, ["search-term"])) : unref(p).isLoading ? (openBlock(), createElementBlock("div", _hoisted_11, [createElementVNode("div", _hoisted_12, toDisplayString(unref(a).t("wise_crm.search.searching")), 1)])) : createCommentVNode("", !0)])) : createCommentVNode("", !0)]),
1252
1246
  _: 1
1253
1247
  })]),
1254
1248
  _: 1
@@ -1393,45 +1387,45 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$18 = { class: "mx-auto
1393
1387
  _: 3
1394
1388
  }));
1395
1389
  }
1396
- }), _hoisted_1$30 = { class: "text-primary text-xl font-semibold" }, _hoisted_2$16 = { class: "text-primary text-sm" }, _hoisted_3$11 = { class: "gap-lg flex" }, _hoisted_4$5 = { class: "gap-lg flex w-full items-center" }, _hoisted_5$3 = { class: "bg-brand-100 text-brand-700 flex size-10 items-center justify-center rounded-full" }, _hoisted_6 = { class: "font-semibold" }, ContactCreateDialogContactTypeSection_default = /* @__PURE__ */ defineComponent({
1390
+ }), _hoisted_1$30 = { class: "text-primary text-xl font-semibold" }, _hoisted_2$17 = { class: "text-primary text-sm" }, _hoisted_3$11 = { class: "gap-lg flex" }, _hoisted_4$6 = { class: "gap-lg flex w-full items-center" }, _hoisted_5$3 = { class: "bg-brand-100 text-brand-700 flex size-10 items-center justify-center rounded-full" }, _hoisted_6 = { class: "font-semibold" }, ContactCreateDialogContactTypeSection_default = /* @__PURE__ */ defineComponent({
1397
1391
  __name: "ContactCreateDialogContactTypeSection",
1398
1392
  props: {
1399
1393
  modelValue: { required: !0 },
1400
1394
  modelModifiers: {}
1401
1395
  },
1402
1396
  emits: /* @__PURE__ */ mergeModels(["next"], ["update:modelValue"]),
1403
- setup(e, { emit: t }) {
1404
- let n = t, r = useI18n(), a = useCrm(), o = useCrmConfig(), s = useModel(e, "modelValue"), l = computed(() => (o.getConfig().entities ?? [])?.map((e) => ({
1405
- color: e.color,
1406
- icon: EntityTypeUtil.getIcon(e.type),
1407
- label: e.name,
1408
- value: e.type
1397
+ setup(t, { emit: n }) {
1398
+ let i = n, a = useI18n(), o = useCrm(), s = useCrmConfig(), c = useModel(t, "modelValue"), l = computed(() => (s.getConfig().entities ?? [])?.map((t) => ({
1399
+ color: t.color,
1400
+ icon: EntityTypeUtil.getIcon(t.type),
1401
+ label: t.name,
1402
+ value: t.type
1409
1403
  })));
1410
1404
  function d() {
1411
- n("next");
1405
+ i("next");
1412
1406
  }
1413
- function g(e) {
1414
- s.value = e, d();
1407
+ function p(e) {
1408
+ c.value = e, d();
1415
1409
  }
1416
1410
  return (e, t) => (openBlock(), createBlock(AppDialogContainer_default, { class: "gap-xl flex flex-col" }, {
1417
1411
  default: withCtx(() => [createElementVNode("div", null, [createVNode(unref(VcDialogTitle), null, {
1418
- default: withCtx(() => [createElementVNode("h2", _hoisted_1$30, toDisplayString(unref(r).t("wise_crm.contact.create_dialog.title")), 1)]),
1412
+ default: withCtx(() => [createElementVNode("h2", _hoisted_1$30, toDisplayString(unref(a).t("wise_crm.contact.create_dialog.title")), 1)]),
1419
1413
  _: 1
1420
1414
  }), createVNode(unref(VcDialogDescription), null, {
1421
- default: withCtx(() => [createElementVNode("p", _hoisted_2$16, toDisplayString(unref(r).t("wise_crm.contact.create_dialog.description")), 1)]),
1415
+ default: withCtx(() => [createElementVNode("p", _hoisted_2$17, toDisplayString(unref(a).t("wise_crm.contact.create_dialog.description")), 1)]),
1422
1416
  _: 1
1423
1417
  })]), createElementVNode("div", _hoisted_3$11, [(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (e) => (openBlock(), createBlock(unref(VcButton), {
1424
1418
  key: e.value,
1425
1419
  "class-config": { root: "h-auto w-auto p-lg rounded-md shadow-none justify-start" },
1426
1420
  variant: "secondary",
1427
1421
  class: "flex-1",
1428
- onClick: (t) => g(e.value)
1422
+ onClick: (t) => p(e.value)
1429
1423
  }, {
1430
1424
  default: withCtx(() => [createVNode(AppColorProvider_default, {
1431
1425
  "entity-type": e.value,
1432
- color: unref(a).getEntityConfig(e.value)?.color ?? null
1426
+ color: unref(o).getEntityConfig(e.value)?.color ?? null
1433
1427
  }, {
1434
- default: withCtx(() => [createElementVNode("span", _hoisted_4$5, [createElementVNode("span", _hoisted_5$3, [createVNode(unref(VcIcon), {
1428
+ default: withCtx(() => [createElementVNode("span", _hoisted_4$6, [createElementVNode("span", _hoisted_5$3, [createVNode(unref(VcIcon), {
1435
1429
  icon: e.icon,
1436
1430
  class: "size-5"
1437
1431
  }, null, 8, ["icon"])]), createElementVNode("span", _hoisted_6, toDisplayString(e.label), 1)])]),
@@ -1459,14 +1453,14 @@ var ContactCreateDialogFooter_default = /* @__PURE__ */ defineComponent({
1459
1453
  ],
1460
1454
  setup(e, { emit: t }) {
1461
1455
  let n = e, r = t, i = useI18n();
1462
- function a() {
1456
+ function o() {
1463
1457
  r("back");
1464
1458
  }
1465
1459
  return (e, t) => (openBlock(), createBlock(AppDialogActions_default, null, {
1466
1460
  default: withCtx(() => [createVNode(unref(VcButton), {
1467
1461
  size: "lg",
1468
1462
  variant: "secondary",
1469
- onClick: a
1463
+ onClick: o
1470
1464
  }, {
1471
1465
  default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("wise_crm.shared.back")), 1)]),
1472
1466
  _: 1
@@ -1490,8 +1484,8 @@ z$1.object({
1490
1484
  email: z$1.string().email().nullable(),
1491
1485
  firstName: z$1.string().min(1),
1492
1486
  lastName: z$1.string().min(1),
1493
- mobilePhone: z$1.string().min(1).nullable(),
1494
- phone: z$1.string().min(1).nullable()
1487
+ mobilePhone: phoneNumberFormSchema.nullable(),
1488
+ phone: phoneNumberFormSchema.nullable()
1495
1489
  }).superRefine((e, t) => {
1496
1490
  e.email !== null && e.email !== "" || e.mobilePhone !== null && e.mobilePhone !== "" || e.phone !== null && e.phone !== "" || t.addIssue({
1497
1491
  code: z$1.ZodIssueCode.custom,
@@ -1505,8 +1499,8 @@ function getIndividualCreateFormSchema(e) {
1505
1499
  email: z$1.string().email().nullable(),
1506
1500
  firstName: z$1.string().min(1),
1507
1501
  lastName: z$1.string().min(1),
1508
- mobilePhone: z$1.string().min(1).nullable(),
1509
- phone: z$1.string().min(1).nullable()
1502
+ mobilePhone: phoneNumberFormSchema.nullable(),
1503
+ phone: phoneNumberFormSchema.nullable()
1510
1504
  }).superRefine((e, t) => {
1511
1505
  e.email !== null && e.email !== "" || e.mobilePhone !== null && e.mobilePhone !== "" || e.phone !== null && e.phone !== "" || t.addIssue({
1512
1506
  code: z$1.ZodIssueCode.custom,
@@ -1518,8 +1512,8 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
1518
1512
  __name: "ContactCreateDialogIndividualForm",
1519
1513
  props: { onSubmit: { type: Function } },
1520
1514
  emits: ["back"],
1521
- setup(e, { emit: t }) {
1522
- let r = e, a = t, o = useI18n(), d = useCrm(), g = useCrmConfig(), _ = computed(() => d.getEntityConfig(EntityType$1.INDIVIDUAL)), v = computed(() => g.getCustomFieldDefinitionForEntity(EntityType$1.INDIVIDUAL).filter((e) => e.isDisplayedOnCreate)), y = useForm({
1515
+ setup(e, { emit: n }) {
1516
+ let a = e, o = n, s = useI18n(), c = useCrm(), l = useCrmConfig(), p = computed(() => c.getEntityConfig(EntityType$1.INDIVIDUAL)), y = computed(() => l.getCustomFieldDefinitionForEntity(EntityType$1.INDIVIDUAL).filter((e) => e.isDisplayedOnCreate)), C = useForm({
1523
1517
  initialState: {
1524
1518
  address: null,
1525
1519
  customFields: null,
@@ -1529,19 +1523,19 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
1529
1523
  mobilePhone: null,
1530
1524
  phone: null
1531
1525
  },
1532
- schema: getIndividualCreateFormSchema(v.value),
1526
+ schema: getIndividualCreateFormSchema(y.value),
1533
1527
  onSubmit: async (e) => {
1534
- await r.onSubmit(e);
1528
+ await a.onSubmit(e);
1535
1529
  }
1536
- }), T = y.register("firstName"), j = y.register("lastName"), I = y.register("phone"), K = y.register("mobilePhone"), Z = y.register("email"), pu = y.register("address");
1537
- function mu() {
1538
- a("back");
1530
+ }), T = C.register("firstName"), j = C.register("lastName"), I = C.register("phone"), K = C.register("mobilePhone"), Z = C.register("email"), _u = C.register("address");
1531
+ function vu() {
1532
+ o("back");
1539
1533
  }
1540
- return (e, t) => (openBlock(), createBlock(AppDialogContainer_default, { class: "gap-xl flex flex-1 flex-col overflow-hidden" }, {
1541
- default: withCtx(() => [createVNode(AppColorProvider_default, { color: unref(d).getEntityConfig(unref(EntityType$1).INDIVIDUAL)?.color ?? null }, {
1534
+ return (e, n) => (openBlock(), createBlock(AppDialogContainer_default, { class: "gap-xl flex flex-1 flex-col overflow-hidden" }, {
1535
+ default: withCtx(() => [createVNode(AppColorProvider_default, { color: unref(c).getEntityConfig(unref(EntityType$1).INDIVIDUAL)?.color ?? null }, {
1542
1536
  default: withCtx(() => [createVNode(AppDialogHeader_default, {
1543
- title: unref(o).t("wise_crm.contact.create_dialog.form.title", { value: _.value?.name ?? "-" }),
1544
- description: unref(o).t("wise_crm.contact.create_dialog.form.description"),
1537
+ title: unref(s).t("wise_crm.contact.create_dialog.form.title", { value: p.value?.name ?? "-" }),
1538
+ description: unref(s).t("wise_crm.contact.create_dialog.form.description"),
1545
1539
  icon: "user"
1546
1540
  }, {
1547
1541
  "closse-button": withCtx(() => [createVNode(unref(VcDialogCloseButton))]),
@@ -1550,33 +1544,33 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
1550
1544
  _: 1
1551
1545
  }, 8, ["color"]), createVNode(AppForm_default, {
1552
1546
  "can-exit-when-dirty": !0,
1553
- form: unref(y),
1554
- class: "flex flex-1 flex-col overflow-y-auto"
1547
+ form: unref(C),
1548
+ class: "flex flex-1 flex-col"
1555
1549
  }, {
1556
1550
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 1 }, {
1557
1551
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
1558
1552
  default: withCtx(() => [
1559
1553
  createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(T)), {
1560
1554
  "is-required": !0,
1561
- label: unref(o).t("wise_crm.contact.create_dialog.form.fields.first_name"),
1562
- placeholder: unref(o).t("wise_crm.contact.create_dialog.form.fields.first_name")
1555
+ label: unref(s).t("wise_crm.contact.create_dialog.form.fields.first_name"),
1556
+ placeholder: unref(s).t("wise_crm.contact.create_dialog.form.fields.first_name")
1563
1557
  }), null, 16, ["label", "placeholder"]),
1564
1558
  createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(j)), {
1565
1559
  "is-required": !0,
1566
- label: unref(o).t("wise_crm.contact.create_dialog.form.fields.last_name"),
1567
- placeholder: unref(o).t("wise_crm.contact.create_dialog.form.fields.last_name")
1560
+ label: unref(s).t("wise_crm.contact.create_dialog.form.fields.last_name"),
1561
+ placeholder: unref(s).t("wise_crm.contact.create_dialog.form.fields.last_name")
1568
1562
  }), null, 16, ["label", "placeholder"]),
1569
1563
  createVNode(unref(VcAddressAutocomplete), mergeProps({
1570
- label: unref(o).t("wise_crm.contact.create_dialog.form.fields.address"),
1571
- placeholder: unref(o).t("wise_crm.contact.create_dialog.form.fields.address")
1572
- }, unref(toFormField)(unref(pu)), { class: "col-span-2" }), null, 16, ["label", "placeholder"]),
1564
+ label: unref(s).t("wise_crm.contact.create_dialog.form.fields.address"),
1565
+ placeholder: unref(s).t("wise_crm.contact.create_dialog.form.fields.address")
1566
+ }, unref(toFormField)(unref(_u)), { class: "col-span-2" }), null, 16, ["label", "placeholder"]),
1573
1567
  createVNode(CustomFieldDefinitionForm_default, {
1574
- "custom-field-definitions": v.value,
1575
- form: unref(y),
1568
+ "custom-field-definitions": y.value,
1569
+ form: unref(C),
1576
1570
  class: "col-span-2"
1577
1571
  }, null, 8, ["custom-field-definitions", "form"]),
1578
1572
  createVNode(FormFieldset_default, {
1579
- title: unref(o).t("wise_crm.shared.contact_info"),
1573
+ title: unref(s).t("wise_crm.shared.contact_info"),
1580
1574
  class: "col-span-2"
1581
1575
  }, {
1582
1576
  default: withCtx(() => [createVNode(AppGrid_default, {
@@ -1585,37 +1579,37 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
1585
1579
  }, {
1586
1580
  default: withCtx(() => [
1587
1581
  createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(Z)), {
1588
- label: unref(o).t("wise_crm.contact.create_dialog.form.fields.email"),
1589
- placeholder: unref(o).t("wise_crm.contact.create_dialog.form.fields.email")
1582
+ label: unref(s).t("wise_crm.contact.create_dialog.form.fields.email"),
1583
+ placeholder: unref(s).t("wise_crm.contact.create_dialog.form.fields.email")
1590
1584
  }), null, 16, ["label", "placeholder"]),
1591
1585
  createVNode(AppAndOrSeparator_default, null, {
1592
- default: withCtx(() => [createTextVNode(toDisplayString(unref(o).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)]),
1586
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(s).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)]),
1593
1587
  _: 1
1594
1588
  }),
1595
1589
  createVNode(unref(VcPhoneNumberField), mergeProps(unref(toFormField)(unref(K)), {
1596
- label: unref(o).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
1597
- placeholder: unref(o).t("wise_crm.contact.create_dialog.form.fields.mobile_phone")
1590
+ label: unref(s).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
1591
+ placeholder: unref(s).t("wise_crm.contact.create_dialog.form.fields.mobile_phone")
1598
1592
  }), null, 16, ["label", "placeholder"]),
1599
1593
  createVNode(AppAndOrSeparator_default, null, {
1600
- default: withCtx(() => [createTextVNode(toDisplayString(unref(o).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)]),
1594
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(s).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)]),
1601
1595
  _: 1
1602
1596
  }),
1603
1597
  createVNode(unref(VcPhoneNumberField), mergeProps(unref(toFormField)(unref(I)), {
1604
- label: unref(o).t("wise_crm.contact.create_dialog.form.fields.phone"),
1605
- placeholder: unref(o).t("wise_crm.contact.create_dialog.form.fields.phone")
1598
+ label: unref(s).t("wise_crm.contact.create_dialog.form.fields.phone"),
1599
+ placeholder: unref(s).t("wise_crm.contact.create_dialog.form.fields.phone")
1606
1600
  }), null, 16, ["label", "placeholder"])
1607
1601
  ]),
1608
1602
  _: 1
1609
1603
  })]),
1610
1604
  _: 1
1611
1605
  }, 8, ["title"]),
1612
- createVNode(AppGlobalFormError_default, { form: unref(y) }, null, 8, ["form"])
1606
+ createVNode(AppGlobalFormError_default, { form: unref(C) }, null, 8, ["form"])
1613
1607
  ]),
1614
1608
  _: 1
1615
1609
  }), createVNode(ContactCreateDialogFooter_default, {
1616
- "is-submitting": unref(y).isSubmitting.value,
1610
+ "is-submitting": unref(C).isSubmitting.value,
1617
1611
  class: "pt-lg bg-primary sticky bottom-0",
1618
- onBack: mu
1612
+ onBack: vu
1619
1613
  }, null, 8, ["is-submitting"])]),
1620
1614
  _: 1
1621
1615
  })]),
@@ -1633,7 +1627,7 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
1633
1627
  emits: ["back", "close"],
1634
1628
  setup(e, { emit: t }) {
1635
1629
  let n = e, r = t, i = useApiErrorToast(), a = useCrm(), o = useBusinessCreateMutation(), s = useIndividualCreateMutation();
1636
- async function c(e) {
1630
+ async function l(e) {
1637
1631
  try {
1638
1632
  let t = await o.execute({ body: e });
1639
1633
  if (n.onCreate) {
@@ -1645,7 +1639,7 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
1645
1639
  i.show(e);
1646
1640
  }
1647
1641
  }
1648
- async function l(e) {
1642
+ async function d(e) {
1649
1643
  try {
1650
1644
  let t = await s.execute({ body: e });
1651
1645
  if (n.onCreate) {
@@ -1657,17 +1651,17 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
1657
1651
  i.show(e);
1658
1652
  }
1659
1653
  }
1660
- function d() {
1654
+ function p() {
1661
1655
  r("back");
1662
1656
  }
1663
1657
  return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$29, [n.entityType === unref(EntityType$1).INDIVIDUAL ? (openBlock(), createBlock(ContactCreateDialogIndividualForm_default, {
1664
1658
  key: 0,
1665
- "on-submit": l,
1666
- onBack: d
1659
+ "on-submit": d,
1660
+ onBack: p
1667
1661
  })) : createCommentVNode("", !0), n.entityType === unref(EntityType$1).BUSINESS ? (openBlock(), createBlock(ContactCreateDialogBusinessForm_default, {
1668
1662
  key: 1,
1669
- "on-submit": c,
1670
- onBack: d
1663
+ "on-submit": l,
1664
+ onBack: p
1671
1665
  })) : createCommentVNode("", !0)]));
1672
1666
  }
1673
1667
  }), ContactCreateDialog_default = /* @__PURE__ */ defineComponent({
@@ -1822,7 +1816,7 @@ var BackgroundBuilding_default = /* @__PURE__ */ __plugin_vue_export_helper_defa
1822
1816
  function _sfc_render$2(e, t) {
1823
1817
  return openBlock(), createElementBlock("svg", _hoisted_1$27, [...t[0] ||= [createStaticVNode("<mask id=\"mask0_4933_393121\" style=\"mask-type:alpha;\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"480\" height=\"480\"><rect width=\"480\" height=\"480\" fill=\"url(#paint0_radial_4933_393121)\"></rect></mask><g mask=\"url(#mask0_4933_393121)\"><g clip-path=\"url(#clip0_4933_393121)\"><g clip-path=\"url(#clip1_4933_393121)\"><line x1=\"0.5\" x2=\"0.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"32.5\" x2=\"32.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"64.5\" x2=\"64.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"96.5\" x2=\"96.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"128.5\" x2=\"128.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"160.5\" x2=\"160.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"192.5\" x2=\"192.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"224.5\" x2=\"224.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"256.5\" x2=\"256.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"288.5\" x2=\"288.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"320.5\" x2=\"320.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"352.5\" x2=\"352.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"384.5\" x2=\"384.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"416.5\" x2=\"416.5\" y2=\"480\" class=\"stroke-current\"></line><line x1=\"448.5\" x2=\"448.5\" y2=\"480\" class=\"stroke-current\"></line></g><rect x=\"0.5\" y=\"0.5\" width=\"479\" height=\"479\" class=\"stroke-current\"></rect><g clip-path=\"url(#clip2_4933_393121)\"><line y1=\"31.5\" x2=\"480\" y2=\"31.5\" class=\"stroke-current\"></line><line y1=\"63.5\" x2=\"480\" y2=\"63.5\" class=\"stroke-current\"></line><line y1=\"95.5\" x2=\"480\" y2=\"95.5\" class=\"stroke-current\"></line><line y1=\"127.5\" x2=\"480\" y2=\"127.5\" class=\"stroke-current\"></line><line y1=\"159.5\" x2=\"480\" y2=\"159.5\" class=\"stroke-current\"></line><line y1=\"191.5\" x2=\"480\" y2=\"191.5\" class=\"stroke-current\"></line><line y1=\"223.5\" x2=\"480\" y2=\"223.5\" class=\"stroke-current\"></line><line y1=\"255.5\" x2=\"480\" y2=\"255.5\" class=\"stroke-current\"></line><line y1=\"287.5\" x2=\"480\" y2=\"287.5\" class=\"stroke-current\"></line><line y1=\"319.5\" x2=\"480\" y2=\"319.5\" class=\"stroke-current\"></line><line y1=\"351.5\" x2=\"480\" y2=\"351.5\" class=\"stroke-current\"></line><line y1=\"383.5\" x2=\"480\" y2=\"383.5\" class=\"stroke-current\"></line><line y1=\"415.5\" x2=\"480\" y2=\"415.5\" class=\"stroke-current\"></line><line y1=\"447.5\" x2=\"480\" y2=\"447.5\" class=\"stroke-current\"></line><line y1=\"479.5\" x2=\"480\" y2=\"479.5\" class=\"stroke-current\"></line></g><rect x=\"0.5\" y=\"0.5\" width=\"479\" height=\"479\" class=\"stroke-current\"></rect></g></g><defs><radialGradient id=\"paint0_radial_4933_393121\" cx=\"0\" cy=\"0\" r=\"1\" gradientUnits=\"userSpaceOnUse\" gradientTransform=\"translate(240 240) rotate(90) scale(240 240)\"><stop></stop><stop offset=\"1\" stop-opacity=\"0\"></stop></radialGradient><clipPath id=\"clip0_4933_393121\"><rect width=\"480\" height=\"480\" fill=\"white\"></rect></clipPath><clipPath id=\"clip1_4933_393121\"><rect width=\"480\" height=\"480\" fill=\"white\"></rect></clipPath><clipPath id=\"clip2_4933_393121\"><rect width=\"480\" height=\"480\" fill=\"white\"></rect></clipPath></defs>", 3)]]);
1824
1818
  }
1825
- var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$2, [["render", _sfc_render$2]]), _hoisted_1$26 = { class: "p-xl bg-primary relative h-full min-w-80 overflow-hidden rounded-xl shadow-lg" }, _hoisted_2$15 = { class: "text-primary font-semibold" }, _hoisted_3$10 = { class: "text-brand-600 text-6xl font-semibold" }, WidgetBusinessStatistics_default = /* @__PURE__ */ defineComponent({
1819
+ var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$2, [["render", _sfc_render$2]]), _hoisted_1$26 = { class: "p-xl bg-primary relative isolate h-full max-w-150 min-w-100 overflow-hidden rounded-xl shadow-lg" }, _hoisted_2$16 = { class: "text-primary font-semibold" }, _hoisted_3$10 = { class: "text-brand-600 text-4xl font-semibold" }, _hoisted_4$5 = { class: "text-sm" }, WidgetBusinessStatistics_default = /* @__PURE__ */ defineComponent({
1826
1820
  __name: "WidgetBusinessStatistics",
1827
1821
  emits: ["viewAll"],
1828
1822
  setup(e, { emit: t }) {
@@ -1846,7 +1840,7 @@ var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_defau
1846
1840
  justify: "between",
1847
1841
  class: "w-full"
1848
1842
  }, {
1849
- default: withCtx(() => [createElementVNode("p", _hoisted_2$15, toDisplayString(unref(i).getEntityConfig(unref(EntityType).BUSINESS)?.name ?? ""), 1), createVNode(unref(VcButton), {
1843
+ default: withCtx(() => [createElementVNode("p", _hoisted_2$16, toDisplayString(unref(i).getEntityConfig(unref(EntityType).BUSINESS)?.name ?? ""), 1), createVNode(unref(VcButton), {
1850
1844
  variant: "tertiary",
1851
1845
  "icon-right": "chevronRight",
1852
1846
  onClick: s
@@ -1869,7 +1863,7 @@ var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_defau
1869
1863
  default: withCtx(() => [createVNode(unref(VcIcon), {
1870
1864
  icon: "plus",
1871
1865
  class: "size-3"
1872
- }), createElementVNode("p", null, toDisplayString(unref(r).t("wise_crm.widgets.individuals.value_since_last_month", { count: unref(a).data.value?.monthlyAdded ?? 0 })), 1)]),
1866
+ }), createElementVNode("p", _hoisted_4$5, toDisplayString(unref(r).t("wise_crm.widgets.individuals.value_since_last_month", { count: unref(a).data.value?.monthlyAdded ?? 0 })), 1)]),
1873
1867
  _: 1
1874
1868
  })]),
1875
1869
  _: 1
@@ -1917,7 +1911,7 @@ var _sfc_main$1 = {}, _hoisted_1$25 = {
1917
1911
  function _sfc_render$1(e, t) {
1918
1912
  return openBlock(), createElementBlock("svg", _hoisted_1$25, [...t[0] ||= [createStaticVNode("<path d=\"M62.895 65.715C74.55 60.435 82.665 48.72 82.665 35.1C82.65 16.545 67.62 1.5 49.05 1.5C30.48 1.5 15.45 16.545 15.45 35.1C15.45 48.72 23.565 60.45 35.22 65.715C15.705 71.64 1.5 89.775 1.5 111.225H96.615C96.615 89.775 82.41 71.64 62.895 65.715Z\" fill=\"#F8FAFC\"></path><path d=\"M49.0498 0.75C68.0344 0.75 83.3997 16.1312 83.415 35.0996L83.4092 35.751C83.1676 48.7335 75.713 59.9417 64.8926 65.5762C83.7927 72.1308 97.3651 90.0929 97.3652 111.225V111.975H0.75V111.225C0.750168 90.094 14.321 72.1325 33.2197 65.5771C22.2196 59.8596 14.7002 48.356 14.7002 35.0996C14.7004 16.1309 30.0656 0.750106 49.0498 0.75Z\" stroke=\"black\" stroke-opacity=\"0.08\" stroke-width=\"1.5\"></path><path d=\"M1.50003 111.225C1.50003 84.9603 22.785 63.6753 49.05 63.6753C75.315 63.6753 96.6 84.9603 96.6 111.225H1.50003Z\" fill=\"url(#paint0_linear_18087_18112)\"></path><path d=\"M49.0501 68.7C67.6069 68.7 82.6501 53.6568 82.6501 35.1C82.6501 16.5432 67.6069 1.5 49.0501 1.5C30.4933 1.5 15.4501 16.5432 15.4501 35.1C15.4501 53.6568 30.4933 68.7 49.0501 68.7Z\" fill=\"url(#paint1_linear_18087_18112)\"></path><defs><linearGradient id=\"paint0_linear_18087_18112\" x1=\"12.5384\" y1=\"71.7418\" x2=\"47.4718\" y2=\"137.374\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#E3E8EF\"></stop><stop offset=\"0.350715\" stop-color=\"#F8FAFC\"></stop></linearGradient><linearGradient id=\"paint1_linear_18087_18112\" x1=\"23.2501\" y1=\"12.9\" x2=\"82.6501\" y2=\"68.6999\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#E3E8EF\"></stop><stop offset=\"0.350715\" stop-color=\"#F8FAFC\"></stop></linearGradient></defs>", 5)]]);
1919
1913
  }
1920
- var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$1, [["render", _sfc_render$1]]), _hoisted_1$24 = { class: "p-xl bg-primary relative h-full min-w-80 overflow-hidden rounded-xl shadow-lg" }, _hoisted_2$14 = { class: "font-semibold" }, _hoisted_3$9 = { class: "text-brand-600 text-6xl font-semibold" }, WidgetIndividualStatistics_default = /* @__PURE__ */ defineComponent({
1914
+ var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$1, [["render", _sfc_render$1]]), _hoisted_1$24 = { class: "p-xl bg-primary relative isolate h-full max-w-150 min-w-100 overflow-hidden rounded-xl shadow-lg" }, _hoisted_2$15 = { class: "text-primary font-semibold" }, _hoisted_3$9 = { class: "text-brand-600 text-4xl font-semibold" }, WidgetIndividualStatistics_default = /* @__PURE__ */ defineComponent({
1921
1915
  __name: "WidgetIndividualStatistics",
1922
1916
  emits: ["viewAll"],
1923
1917
  setup(e, { emit: t }) {
@@ -1941,7 +1935,7 @@ var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_defaul
1941
1935
  justify: "between",
1942
1936
  class: "w-full"
1943
1937
  }, {
1944
- default: withCtx(() => [createElementVNode("p", _hoisted_2$14, toDisplayString(unref(i).getEntityConfig(unref(EntityType).INDIVIDUAL)?.name ?? ""), 1), createVNode(unref(VcButton), {
1938
+ default: withCtx(() => [createElementVNode("p", _hoisted_2$15, toDisplayString(unref(i).getEntityConfig(unref(EntityType).INDIVIDUAL)?.name ?? ""), 1), createVNode(unref(VcButton), {
1945
1939
  variant: "tertiary",
1946
1940
  "icon-right": "chevronRight",
1947
1941
  onClick: o
@@ -2018,7 +2012,7 @@ function useRecentEntitiesQuery(e) {
2018
2012
  queryKey: { individualIndex: { queryParams: e?.params } }
2019
2013
  });
2020
2014
  }
2021
- var _hoisted_1$23 = { class: "gap-sm flex items-center" }, WidgetRecentlyCreatedItem_default = /* @__PURE__ */ defineComponent({
2015
+ var _hoisted_1$23 = { class: "gap-sm flex items-center" }, _hoisted_2$14 = { class: "text-sm" }, WidgetRecentlyCreatedItem_default = /* @__PURE__ */ defineComponent({
2022
2016
  __name: "WidgetRecentlyCreatedItem",
2023
2017
  props: { item: {} },
2024
2018
  emits: ["click"],
@@ -2034,49 +2028,49 @@ var _hoisted_1$23 = { class: "gap-sm flex items-center" }, WidgetRecentlyCreated
2034
2028
  default: withCtx(() => [createElementVNode("div", _hoisted_1$23, [createVNode(unref(VcIcon), {
2035
2029
  icon: n.item.type === unref(EntityType).BUSINESS ? "building" : "user",
2036
2030
  class: "text-brand-500 size-4"
2037
- }, null, 8, ["icon"]), createElementVNode("p", null, toDisplayString(n.item.name), 1)]), createVNode(unref(VcIcon), {
2031
+ }, null, 8, ["icon"]), createElementVNode("p", _hoisted_2$14, toDisplayString(n.item.name), 1)]), createVNode(unref(VcIcon), {
2038
2032
  class: "size-4",
2039
2033
  icon: "chevronRight"
2040
2034
  })]),
2041
2035
  _: 1
2042
2036
  }));
2043
2037
  }
2044
- }), _hoisted_1$22 = { class: "p-xl gap-lg border-primary/50 flex h-full min-w-150 flex-col rounded-xl border shadow-lg" }, _hoisted_2$13 = { class: "font-medium" }, _hoisted_3$8 = { key: 0 }, _hoisted_4$4 = { class: "text-tertiary" }, _hoisted_5$2 = {
2038
+ }), _hoisted_1$22 = { class: "p-xl gap-lg border-primary/50 flex h-full max-w-150 min-w-150 flex-col rounded-xl border shadow-lg" }, _hoisted_2$13 = { class: "text-primary font-medium" }, _hoisted_3$8 = { key: 0 }, _hoisted_4$4 = { class: "text-tertiary" }, _hoisted_5$2 = {
2045
2039
  key: 1,
2046
2040
  class: "flex flex-1 flex-col overflow-hidden"
2047
2041
  }, WidgetRecentlyCreated_default = /* @__PURE__ */ defineComponent({
2048
2042
  __name: "WidgetRecentlyCreated",
2049
- setup(t) {
2050
- let n = useI18n(), r = useCrm(), i = useRecentEntitiesQuery(), a = computed(() => i.data.value?.data ?? []);
2051
- function o(e) {
2043
+ setup(e) {
2044
+ let t = useI18n(), n = useCrm(), r = useRecentEntitiesQuery(), i = computed(() => r.data.value?.data ?? []);
2045
+ function a(e) {
2052
2046
  if (e.type === EntityType.INDIVIDUAL) {
2053
- r.openIndividualDetail(e.uuid);
2047
+ n.openIndividualDetail(e.uuid);
2054
2048
  return;
2055
2049
  }
2056
- r.openBusinessDetail(e.uuid);
2050
+ n.openBusinessDetail(e.uuid);
2057
2051
  }
2058
- function s() {
2059
- i.fetchNextPage();
2052
+ function o() {
2053
+ r.fetchNextPage();
2060
2054
  }
2061
- return (t, r) => (openBlock(), createElementBlock("div", _hoisted_1$22, [createElementVNode("p", _hoisted_2$13, toDisplayString(unref(n).t("wise_crm.widgets.recently_created.title")), 1), a.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_3$8, [createElementVNode("p", _hoisted_4$4, toDisplayString(unref(n).t("wise_crm.widgets.recently_created.empty_state")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_5$2, [createVNode(AppInfiniteScroll_default, {
2055
+ return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$22, [createElementVNode("p", _hoisted_2$13, toDisplayString(unref(t).t("wise_crm.widgets.recently_created.title")), 1), i.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_3$8, [createElementVNode("p", _hoisted_4$4, toDisplayString(unref(t).t("wise_crm.widgets.recently_created.empty_state")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_5$2, [createVNode(AppInfiniteScroll_default, {
2062
2056
  class: "gap-md flex flex-1 flex-col",
2063
- onNext: s
2057
+ onNext: o
2064
2058
  }, {
2065
- default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (e) => (openBlock(), createBlock(WidgetRecentlyCreatedItem_default, {
2059
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(i.value, (e) => (openBlock(), createBlock(WidgetRecentlyCreatedItem_default, {
2066
2060
  key: e.uuid,
2067
2061
  item: e,
2068
- onClick: (t) => o(e)
2062
+ onClick: (t) => a(e)
2069
2063
  }, null, 8, ["item", "onClick"]))), 128))]),
2070
2064
  _: 1
2071
2065
  })]))]));
2072
2066
  }
2073
- }), _hoisted_1$21 = { class: "py-4xl mx-auto flex w-full flex-1 flex-col overflow-y-auto px-(--container-padding-x)" }, _hoisted_2$12 = { class: "flex h-full flex-1 flex-col" }, _hoisted_3$7 = { class: "flex min-h-50 flex-1 items-center justify-center" }, _hoisted_4$3 = { class: "gap-lg flex max-h-110 flex-col sm:flex-row" }, _hoisted_5$1 = {
2067
+ }), _hoisted_1$21 = { class: "py-4xl mx-auto flex w-full flex-1 flex-col overflow-y-auto px-(--container-padding-x)" }, _hoisted_2$12 = { class: "flex h-full flex-1 flex-col" }, _hoisted_3$7 = { class: "flex min-h-50 flex-1 items-center justify-center" }, _hoisted_4$3 = { class: "gap-lg flex max-h-110 flex-col items-center justify-center sm:flex-row" }, _hoisted_5$1 = {
2074
2068
  key: 0,
2075
- class: "gap-lg flex flex-1 flex-col justify-between"
2069
+ class: "gap-lg flex flex-col justify-between"
2076
2070
  }, CrmOverviewContent_default = /* @__PURE__ */ defineComponent({
2077
2071
  __name: "CrmOverviewContent",
2078
2072
  setup(e) {
2079
- let t = useRouter(), n = useCrm(), r = useCrmConfig(), a = useContactCreateDialog();
2073
+ let t = useRouter(), n = useCrm(), i = useCrmConfig(), a = useContactCreateDialog();
2080
2074
  function o() {
2081
2075
  a.open();
2082
2076
  }
@@ -2084,15 +2078,15 @@ var _hoisted_1$23 = { class: "gap-sm flex items-center" }, WidgetRecentlyCreated
2084
2078
  e === EntityType.INDIVIDUAL && n.openIndividualDetail(t), e === EntityType.BUSINESS && n.openBusinessDetail(t);
2085
2079
  }
2086
2080
  function c() {
2087
- t.push({ name: r.getOptions().widgets?.entityStatistics?.viewAllIndividualRouteName });
2081
+ t.push({ name: i.getOptions().widgets?.entityStatistics?.viewAllIndividualRouteName });
2088
2082
  }
2089
2083
  function l() {
2090
- t.push({ name: r.getOptions().widgets?.entityStatistics?.viewAllBusinessRouteName });
2084
+ t.push({ name: i.getOptions().widgets?.entityStatistics?.viewAllBusinessRouteName });
2091
2085
  }
2092
2086
  return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$21, [createElementVNode("div", _hoisted_2$12, [createElementVNode("div", _hoisted_3$7, [createVNode(CrmSearchTrigger_default, {
2093
2087
  "on-create-new-contact": o,
2094
2088
  onSelect: s
2095
- })]), createElementVNode("div", _hoisted_4$3, [unref(r).getOptions().widgets?.entityStatistics ? (openBlock(), createElementBlock("div", _hoisted_5$1, [createVNode(WidgetIndividualStatistics_default, { onViewAll: c }), createVNode(WidgetBusinessStatistics_default, { onViewAll: l })])) : createCommentVNode("", !0), unref(r).getOptions().widgets?.recentlyCreatedEntities ? (openBlock(), createBlock(WidgetRecentlyCreated_default, { key: 1 })) : createCommentVNode("", !0)])])]));
2089
+ })]), createElementVNode("div", _hoisted_4$3, [unref(i).getOptions().widgets?.entityStatistics ? (openBlock(), createElementBlock("div", _hoisted_5$1, [createVNode(WidgetIndividualStatistics_default, { onViewAll: c }), createVNode(WidgetBusinessStatistics_default, { onViewAll: l })])) : createCommentVNode("", !0), unref(i).getOptions().widgets?.recentlyCreatedEntities ? (openBlock(), createBlock(WidgetRecentlyCreated_default, { key: 1 })) : createCommentVNode("", !0)])])]));
2096
2090
  }
2097
2091
  });
2098
2092
  function useBoardColumnsIndexQuery() {
@@ -3866,12 +3860,12 @@ function useFilters(e) {
3866
3860
  parse: (e) => SuperJSON.parse(atob(e)),
3867
3861
  serialize: (e) => btoa(SuperJSON.stringify(e))
3868
3862
  }
3869
- }) : ref(c()), o = ref(null), s = computed(() => Array.from(i).map(v).sort((e, t) => Number(t.isStatic ?? !1) - Number(e.isStatic ?? !1)));
3863
+ }) : ref(c()), o = ref(null), s = computed(() => Array.from(i).map(y).sort((e, t) => Number(t.isStatic ?? !1) - Number(e.isStatic ?? !1)));
3870
3864
  function c() {
3871
- return r.value.reduce((e, t) => (e[t.key] = t.defaultValue ?? l(t.key), e), {});
3865
+ return r.value.reduce((e, t) => (e[t.key] = t.defaultValue ?? d(t.key), e), {});
3872
3866
  }
3873
- function l(e) {
3874
- switch (v(e).type) {
3867
+ function d(e) {
3868
+ switch (y(e).type) {
3875
3869
  case "boolean": return !1;
3876
3870
  case "select":
3877
3871
  case "autocomplete":
@@ -3884,37 +3878,37 @@ function useFilters(e) {
3884
3878
  case "multi-autocomplete": return [];
3885
3879
  }
3886
3880
  }
3887
- function d(e) {
3888
- return o.value === e || !_(e);
3881
+ function p(e) {
3882
+ return o.value === e || !v(e);
3889
3883
  }
3890
- function p(e, t = !1, n = !1) {
3891
- let r = _(e), o = v(e);
3892
- t && !r || n && o.isStatic || (a.value[e] = l(e), i.delete(e));
3884
+ function g(e, t = !1, n = !1) {
3885
+ let r = v(e), o = y(e);
3886
+ t && !r || n && o.isStatic || (a.value[e] = d(e), i.delete(e));
3893
3887
  }
3894
- function g() {
3888
+ function _() {
3895
3889
  for (let e of r.value) {
3896
3890
  let t = e.key;
3897
- d(t) && p(t, !1, !0);
3891
+ p(t) && g(t, !1, !0);
3898
3892
  }
3899
3893
  }
3900
- function _(e) {
3894
+ function v(e) {
3901
3895
  let t = a.value[e];
3902
- return SuperJSON.stringify(t) === SuperJSON.stringify(l(e));
3896
+ return SuperJSON.stringify(t) === SuperJSON.stringify(d(e));
3903
3897
  }
3904
- function v(e) {
3898
+ function y(e) {
3905
3899
  return r.value.find((t) => t.key === e);
3906
3900
  }
3907
3901
  watch(a, () => {
3908
3902
  for (let e of r.value) {
3909
3903
  let t = e.key;
3910
- d(t) ? i.add(t) : i.delete(t);
3904
+ p(t) ? i.add(t) : i.delete(t);
3911
3905
  }
3912
3906
  }, {
3913
3907
  deep: !0,
3914
3908
  immediate: !0
3915
3909
  });
3916
- let y = r.value.filter((e) => e.keyboardShortcutKeys !== void 0);
3917
- for (let e of y) useKeyboardShortcut({
3910
+ let C = r.value.filter((e) => e.keyboardShortcutKeys !== void 0);
3911
+ for (let e of C) useKeyboardShortcut({
3918
3912
  keys: e.keyboardShortcutKeys,
3919
3913
  onTrigger(t) {
3920
3914
  t.preventDefault(), o.value = e.key, i.add(e.key);
@@ -3922,8 +3916,8 @@ function useFilters(e) {
3922
3916
  });
3923
3917
  return {
3924
3918
  activeFilters: s,
3925
- clearAllFilters: g,
3926
- clearFilter: p,
3919
+ clearAllFilters: _,
3920
+ clearFilter: g,
3927
3921
  filterGroups: n,
3928
3922
  filters: r,
3929
3923
  openFilterKey: o,
@@ -4089,32 +4083,32 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
4089
4083
  stepper: {}
4090
4084
  },
4091
4085
  setup(e) {
4092
- let t = e, n = useI18n(), r = computed(() => {
4086
+ let t = e, r = useI18n(), i = computed(() => {
4093
4087
  for (let e = 0; e < t.stepper.index.value; e++) if (!t.stepper.findStepAt(e)?.isValid) return !1;
4094
4088
  return !0;
4095
4089
  });
4096
- function i(e) {
4090
+ function a(e) {
4097
4091
  return t.stepper.current.value.id === e;
4098
4092
  }
4099
- let a = computed(() => !r.value || !t.stepper.current.value.isValid());
4100
- function o() {
4101
- t.form.blurAll(), !(!r.value || !t.stepper.current.value.isValid()) && t.stepper.goToNext();
4093
+ let o = computed(() => !i.value || !t.stepper.current.value.isValid());
4094
+ function s() {
4095
+ t.form.blurAll(), !(!i.value || !t.stepper.current.value.isValid()) && t.stepper.goToNext();
4102
4096
  }
4103
- return (r, s) => (openBlock(), createElementBlock("div", null, [createVNode(AppSeparator_default), createVNode(AppDialogContainer_default, { class: "flex items-center justify-between" }, {
4097
+ return (i, c) => (openBlock(), createElementBlock("div", null, [createVNode(AppSeparator_default), createVNode(AppDialogContainer_default, { class: "flex items-center justify-between" }, {
4104
4098
  default: withCtx(() => [
4105
4099
  createVNode(unref(VcButton), {
4106
4100
  "is-disabled": e.stepper.isFirst.value,
4107
4101
  variant: "secondary",
4108
4102
  onClick: e.stepper.goToPrevious
4109
4103
  }, {
4110
- default: withCtx(() => [createTextVNode(toDisplayString(unref(n).t("shared.previous")), 1)]),
4104
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t("shared.previous")), 1)]),
4111
4105
  _: 1
4112
4106
  }, 8, ["is-disabled", "onClick"]),
4113
4107
  createElementVNode("div", _hoisted_1$9, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.stepper.steps.value, (e) => (openBlock(), createElementBlock("div", {
4114
4108
  key: e.id,
4115
4109
  class: normalizeClass([{
4116
- "bg-brand-500": i(e.id),
4117
- "bg-quaternary": !i(e.id)
4110
+ "bg-brand-500": a(e.id),
4111
+ "bg-quaternary": !a(e.id)
4118
4112
  }, "size-2 rounded-full"])
4119
4113
  }, null, 2))), 128))]),
4120
4114
  e.stepper.isLast.value ? (openBlock(), createBlock(unref(VcButton), {
@@ -4123,15 +4117,15 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
4123
4117
  "icon-left": "plus",
4124
4118
  type: "submit"
4125
4119
  }, {
4126
- default: withCtx(() => [createTextVNode(toDisplayString(unref(n).t("shared.add")), 1)]),
4120
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t("shared.add")), 1)]),
4127
4121
  _: 1
4128
4122
  }, 8, ["is-loading"])) : (openBlock(), createBlock(unref(VcButton), {
4129
4123
  key: 0,
4130
- "is-disabled": a.value,
4124
+ "is-disabled": o.value,
4131
4125
  class: "dark:text-gray-950",
4132
- onClick: o
4126
+ onClick: s
4133
4127
  }, {
4134
- default: withCtx(() => [createTextVNode(toDisplayString(unref(n).t("shared.next")), 1)]),
4128
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t("shared.next")), 1)]),
4135
4129
  _: 1
4136
4130
  }, 8, ["is-disabled"]))
4137
4131
  ]),
@@ -4142,43 +4136,43 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
4142
4136
  __name: "DealCreateDialogExtraInfoForm",
4143
4137
  props: { form: {} },
4144
4138
  setup(e) {
4145
- let t = e, n = useI18n(), r = t.form.register("name", `${n.t("wise_crm.deal.form.fields.quote")}: ${t.form.state.value.clientId?.name}`), i = t.form.register("dealLanguage"), a = t.form.register("dealSource");
4146
- function o(e) {
4147
- return n.t(ContentLocaleUtil.getI18nKey(e));
4148
- }
4139
+ let n = e, r = useI18n(), i = n.form.register("name", `${r.t("wise_crm.deal.form.fields.quote")}: ${n.form.state.value.clientId?.name}`), a = n.form.register("dealLanguage"), o = n.form.register("dealSource");
4149
4140
  function s(e) {
4150
- return n.t(DealSourceUtil.getI18nKey(e));
4141
+ return r.t(ContentLocaleUtil.getI18nKey(e));
4151
4142
  }
4152
- return (e, t) => (openBlock(), createBlock(AppGrid_default, { cols: 2 }, {
4143
+ function c(e) {
4144
+ return r.t(DealSourceUtil.getI18nKey(e));
4145
+ }
4146
+ return (e, n) => (openBlock(), createBlock(AppGrid_default, { cols: 2 }, {
4153
4147
  default: withCtx(() => [
4154
4148
  createVNode(unref(VcTextField), mergeProps({
4155
- label: unref(n).t("wise_crm.deal.form.fields.name"),
4156
- placeholder: unref(n).t("wise_crm.deal.form.fields.name_placeholder")
4157
- }, unref(toFormField)(unref(r)), { class: "col-span-full" }), null, 16, ["label", "placeholder"]),
4158
- createVNode(unref(VcSelect), mergeProps(unref(toFormField)(unref(i)), {
4159
- "display-fn": o,
4160
- label: unref(n).t("wise_crm.deal.form.fields.language"),
4161
- placeholder: unref(n).t("wise_crm.deal.form.fields.language_placeholder")
4149
+ label: unref(r).t("wise_crm.deal.form.fields.name"),
4150
+ placeholder: unref(r).t("wise_crm.deal.form.fields.name_placeholder")
4151
+ }, unref(toFormField)(unref(i)), { class: "col-span-full" }), null, 16, ["label", "placeholder"]),
4152
+ createVNode(unref(VcSelect), mergeProps(unref(toFormField)(unref(a)), {
4153
+ "display-fn": s,
4154
+ label: unref(r).t("wise_crm.deal.form.fields.language"),
4155
+ placeholder: unref(r).t("wise_crm.deal.form.fields.language_placeholder")
4162
4156
  }), {
4163
- default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(ContentLocale)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
4157
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(SdkContentLocale)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
4164
4158
  key: e,
4165
4159
  value: e
4166
4160
  }, {
4167
- default: withCtx(() => [createTextVNode(toDisplayString(o(e)), 1)]),
4161
+ default: withCtx(() => [createTextVNode(toDisplayString(s(e)), 1)]),
4168
4162
  _: 2
4169
4163
  }, 1032, ["value"]))), 128))]),
4170
4164
  _: 1
4171
4165
  }, 16, ["label", "placeholder"]),
4172
4166
  createVNode(unref(VcSelect), mergeProps({
4173
- "display-fn": s,
4174
- label: unref(n).t("wise_crm.deal.form.fields.source"),
4175
- placeholder: unref(n).t("wise_crm.deal.form.fields.source_placeholder")
4176
- }, unref(toFormField)(unref(a))), {
4167
+ "display-fn": c,
4168
+ label: unref(r).t("wise_crm.deal.form.fields.source"),
4169
+ placeholder: unref(r).t("wise_crm.deal.form.fields.source_placeholder")
4170
+ }, unref(toFormField)(unref(o))), {
4177
4171
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(DealSource)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
4178
4172
  key: e,
4179
4173
  value: e
4180
4174
  }, {
4181
- default: withCtx(() => [createTextVNode(toDisplayString(s(e)), 1)]),
4175
+ default: withCtx(() => [createTextVNode(toDisplayString(c(e)), 1)]),
4182
4176
  _: 2
4183
4177
  }, 1032, ["value"]))), 128))]),
4184
4178
  _: 1
@@ -4197,28 +4191,28 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
4197
4191
  modelModifiers: {}
4198
4192
  }),
4199
4193
  emits: /* @__PURE__ */ mergeModels(["createNew"], ["update:modelValue"]),
4200
- setup(e, { emit: n }) {
4201
- let r = e, i = n, a = useI18n(), o = useModel(e, "modelValue"), s = ref(!0), c = useSearch({ persistInUrl: !1 }), l = useBusinessIndexQuery({ params: { search: c.debouncedSearch } }, computed(() => !s.value)), d = useDebounceFn((e) => {
4202
- e !== null && (s.value = e.length === 0 || e.trim().length === 0, c.updateSearch(e));
4203
- }, 300), p = computed(() => l.data.value?.data ?? []);
4194
+ setup(e, { emit: t }) {
4195
+ let n = e, r = t, i = useI18n(), a = useModel(e, "modelValue"), o = ref(!0), s = useSearch({ persistInUrl: !1 }), c = useBusinessIndexQuery({ params: { search: s.debouncedSearch } }, computed(() => !o.value)), l = useDebounceFn((e) => {
4196
+ e !== null && (o.value = e.length === 0 || e.trim().length === 0, s.updateSearch(e));
4197
+ }, 300), d = computed(() => c.data.value?.data ?? []);
4204
4198
  async function g(e) {
4205
- await d(e);
4199
+ await l(e);
4206
4200
  }
4207
4201
  function _() {
4208
- i("createNew");
4202
+ r("createNew");
4209
4203
  }
4210
4204
  function v(e) {
4211
- return p.value.find((t) => t.uuid === e)?.name ?? "";
4205
+ return d.value.find((t) => t.uuid === e)?.name ?? "";
4212
4206
  }
4213
4207
  return (e, t) => (openBlock(), createBlock(EntityAutocomplete_default, {
4214
- modelValue: o.value,
4215
- "onUpdate:modelValue": t[0] ||= (e) => o.value = e,
4216
- "is-required": r.isRequired,
4208
+ modelValue: a.value,
4209
+ "onUpdate:modelValue": t[0] ||= (e) => a.value = e,
4210
+ "is-required": n.isRequired,
4217
4211
  "display-fn": v,
4218
- label: r.label,
4219
- options: p.value,
4220
- "is-loading": unref(l).isFetching.value,
4221
- placeholder: unref(a).t("component.select.search_placeholder"),
4212
+ label: n.label,
4213
+ options: d.value,
4214
+ "is-loading": unref(c).isFetching.value,
4215
+ placeholder: unref(i).t("component.select.search_placeholder"),
4222
4216
  onCreateNew: _,
4223
4217
  onSearch: g
4224
4218
  }, {
@@ -4276,31 +4270,31 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
4276
4270
  },
4277
4271
  emits: ["createNewBusiness"],
4278
4272
  setup(e, { emit: t }) {
4279
- let r = e, i = t, a = useI18n();
4280
- function o() {
4281
- i("createNewBusiness");
4273
+ let n = e, r = t, i = useI18n();
4274
+ function a() {
4275
+ r("createNewBusiness");
4282
4276
  }
4283
- return (t, i) => (openBlock(), createBlock(AppForm_default, { form: r.form }, {
4277
+ return (t, r) => (openBlock(), createBlock(AppForm_default, { form: n.form }, {
4284
4278
  default: withCtx(() => [createVNode(AppDialogContainer_default, { class: "flex flex-col" }, {
4285
4279
  default: withCtx(() => [createVNode(AppDialogHeader_default, {
4286
- title: r.stepper.current.value.title,
4287
- description: unref(a).t("wise_crm.deal.create.title"),
4280
+ title: n.stepper.current.value.title,
4281
+ description: unref(i).t("wise_crm.deal.create.title"),
4288
4282
  icon: "deal"
4289
4283
  }, {
4290
4284
  "closse-button": withCtx(() => [createVNode(unref(VcDialogCloseButton))]),
4291
4285
  _: 1
4292
4286
  }, 8, ["title", "description"]), createElementVNode("div", _hoisted_1$7, [e.stepper.isCurrent("select-business") ? (openBlock(), createBlock(DealCreateDialogSelectBusinessForm_default, {
4293
4287
  key: 0,
4294
- form: r.form,
4295
- onCreateNew: o
4288
+ form: n.form,
4289
+ onCreateNew: a
4296
4290
  }, null, 8, ["form"])) : createCommentVNode("", !0), e.stepper.isCurrent("extra-info") ? (openBlock(), createBlock(DealCreateDialogExtraInfoForm_default, {
4297
4291
  key: 1,
4298
- form: r.form
4292
+ form: n.form
4299
4293
  }, null, 8, ["form"])) : createCommentVNode("", !0)])]),
4300
4294
  _: 1
4301
4295
  }), createVNode(AppDialogStepper_default, {
4302
4296
  form: e.form,
4303
- "is-loading": r.isSubmitting,
4297
+ "is-loading": n.isSubmitting,
4304
4298
  stepper: e.stepper
4305
4299
  }, null, 8, [
4306
4300
  "form",
@@ -4318,14 +4312,14 @@ const dealCreateFormSchema = z$1.object({
4318
4312
  type: z$1.enum(ClientType)
4319
4313
  }),
4320
4314
  name: z$1.string().min(1),
4321
- dealLanguage: z$1.enum(ContentLocale),
4315
+ dealLanguage: z$1.enum(SdkContentLocale),
4322
4316
  dealSource: z$1.enum(DealSource)
4323
4317
  });
4324
4318
  var DealCreateDialog_default = /* @__PURE__ */ defineComponent({
4325
4319
  __name: "DealCreateDialog",
4326
4320
  emits: ["close"],
4327
4321
  setup(e, { emit: t }) {
4328
- let n = t, r = useI18n(), i = useApiErrorToast(), a = useDealCreateMutation(), o = useBusinessCreateMutation(), s = ref(!1), c = useForm({
4322
+ let n = t, r = useI18n(), i = useApiErrorToast(), a = useDealCreateMutation(), o = useBusinessCreateMutation(), s = ref(!1), l = useForm({
4329
4323
  schema: dealCreateFormSchema,
4330
4324
  onSubmit: async (e) => {
4331
4325
  try {
@@ -4334,47 +4328,47 @@ var DealCreateDialog_default = /* @__PURE__ */ defineComponent({
4334
4328
  i.show(e);
4335
4329
  }
4336
4330
  }
4337
- }), l = c.register("clientId"), d = computed(() => c.register("dealSource").isValid.value && c.register("dealLanguage").isValid.value && c.register("name").isValid.value), p = useFormStepper(computed(() => s.value ? [] : [{
4331
+ }), d = l.register("clientId"), p = computed(() => l.register("dealSource").isValid.value && l.register("dealLanguage").isValid.value && l.register("name").isValid.value), g = useFormStepper(computed(() => s.value ? [] : [{
4338
4332
  id: "select-business",
4339
4333
  title: r.t("wise_crm.deal.create.steps.select_business"),
4340
- isValid: () => c.register("clientId").isValid.value
4334
+ isValid: () => l.register("clientId").isValid.value
4341
4335
  }, {
4342
4336
  id: "extra-info",
4343
4337
  title: r.t("wise_crm.deal.create.steps.extra_info"),
4344
- isValid: () => d.value
4338
+ isValid: () => p.value
4345
4339
  }]));
4346
- function g() {
4340
+ function _() {
4347
4341
  s.value = !0;
4348
4342
  }
4349
- async function _(e) {
4343
+ async function v(e) {
4350
4344
  let t = await o.execute({ body: e });
4351
- s.value = !1, l.setValue({
4345
+ s.value = !1, d.setValue({
4352
4346
  uuid: t,
4353
4347
  name: e.name,
4354
4348
  type: ClientType.BUSINESS
4355
- }), p.goToNext();
4349
+ }), g.goToNext();
4356
4350
  }
4357
- function v() {
4351
+ function y() {
4358
4352
  s.value = !1;
4359
4353
  }
4360
- function y() {
4354
+ function C() {
4361
4355
  n("close");
4362
4356
  }
4363
4357
  return (e, t) => (openBlock(), createBlock(unref(VcDialog), {
4364
4358
  "class-config": { content: "w-full max-w-140 flex flex-col gap-lg" },
4365
- onClose: y
4359
+ onClose: C
4366
4360
  }, {
4367
4361
  default: withCtx(() => [createVNode(AnimateHeight_default, null, {
4368
4362
  default: withCtx(() => [s.value ? (openBlock(), createBlock(ContactCreateDialogBusinessForm_default, {
4369
4363
  key: 0,
4370
- "on-submit": _,
4371
- onBack: v
4364
+ "on-submit": v,
4365
+ onBack: y
4372
4366
  })) : (openBlock(), createBlock(DealCreateDialogStepperForm_default, {
4373
4367
  key: 1,
4374
- form: unref(c),
4375
- stepper: unref(p),
4376
- "is-submitting": unref(c).isSubmitting.value,
4377
- onCreateNewBusiness: g
4368
+ form: unref(l),
4369
+ stepper: unref(g),
4370
+ "is-submitting": unref(l).isSubmitting.value,
4371
+ onCreateNewBusiness: _
4378
4372
  }, null, 8, [
4379
4373
  "form",
4380
4374
  "stepper",
@@ -4672,17 +4666,17 @@ var DealSettingsDialogMailTemplateFooter_default = /* @__PURE__ */ defineCompone
4672
4666
  __name: "DealSettingsDialogMailTemplateLocaleField",
4673
4667
  props: { localeField: {} },
4674
4668
  setup(e) {
4675
- let t = e, n = useI18n(), r = t.localeField.register("subject"), i = t.localeField.register("message"), a = t.localeField.register("attachments", []);
4676
- return (e, t) => (openBlock(), createBlock(AppGrid_default, { cols: 1 }, {
4669
+ let n = e, r = useI18n(), i = n.localeField.register("subject"), a = n.localeField.register("message"), o = n.localeField.register("attachments", []);
4670
+ return (e, n) => (openBlock(), createBlock(AppGrid_default, { cols: 1 }, {
4677
4671
  default: withCtx(() => [
4678
4672
  createVNode(unref(VcTextField), mergeProps({
4679
- label: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.subject_label"),
4680
- placeholder: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.subject_placeholder")
4681
- }, unref(toFormField)(unref(r))), null, 16, ["label", "placeholder"]),
4682
- createVNode(AppRichTextField_default, mergeProps({ label: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.message_label") }, unref(toFormField)(unref(i))), null, 16, ["label"]),
4683
- createVNode(FormFileUpload_default, mergeProps(unref(toFormField)(unref(a)), {
4673
+ label: unref(r).t("wise_crm.deal.settings.mail_template.locale_field.subject_label"),
4674
+ placeholder: unref(r).t("wise_crm.deal.settings.mail_template.locale_field.subject_placeholder")
4675
+ }, unref(toFormField)(unref(i))), null, 16, ["label", "placeholder"]),
4676
+ createVNode(AppRichTextField_default, mergeProps({ label: unref(r).t("wise_crm.deal.settings.mail_template.locale_field.message_label") }, unref(toFormField)(unref(a))), null, 16, ["label"]),
4677
+ createVNode(FormFileUpload_default, mergeProps(unref(toFormField)(unref(o)), {
4684
4678
  accept: ["application/pdf", "image/*"],
4685
- label: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.default_attachments_label")
4679
+ label: unref(r).t("wise_crm.deal.settings.mail_template.locale_field.default_attachments_label")
4686
4680
  }), null, 16, ["label"])
4687
4681
  ]),
4688
4682
  _: 1
@@ -4691,7 +4685,7 @@ var DealSettingsDialogMailTemplateFooter_default = /* @__PURE__ */ defineCompone
4691
4685
  });
4692
4686
  const mailTemplateUpdateLocaleFormSchema = z$1.object({
4693
4687
  attachments: z$1.array(fileReferenceFormSchema),
4694
- language: z$1.enum(ContentLocale),
4688
+ language: z$1.enum(SdkContentLocale),
4695
4689
  message: z$1.string().min(1),
4696
4690
  replyTo: z$1.email().nullable(),
4697
4691
  subject: z$1.string().min(1)
@@ -4704,8 +4698,8 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4704
4698
  __name: "DealSettingsDialogMailTemplateFormFields",
4705
4699
  props: { mailTemplate: {} },
4706
4700
  emits: ["cancel", "close"],
4707
- setup(e, { emit: t }) {
4708
- let r = e, i = t, a = useI18n(), o = useApiErrorToast(), c = useMailTemplateUpdateMutation(), l = ref(r.mailTemplate.locales[0]?.language ?? ""), d = useForm({
4701
+ setup(e, { emit: n }) {
4702
+ let r = e, i = n, a = useI18n(), o = useApiErrorToast(), s = useMailTemplateUpdateMutation(), l = ref(r.mailTemplate.locales[0]?.language ?? ""), p = useForm({
4709
4703
  initialState: {
4710
4704
  defaultBCC: r.mailTemplate.defaultBCC,
4711
4705
  defaultCC: r.mailTemplate.defaultCC,
@@ -4720,24 +4714,24 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4720
4714
  schema: mailTemplateUpdateFormSchema,
4721
4715
  onSubmit: async (e) => {
4722
4716
  try {
4723
- await c.execute({
4717
+ await s.execute({
4724
4718
  body: e,
4725
4719
  params: { mailTemplateUuid: r.mailTemplate.uuid }
4726
4720
  });
4727
4721
  } catch (e) {
4728
4722
  o.show(e);
4729
4723
  } finally {
4730
- y();
4724
+ T();
4731
4725
  }
4732
4726
  }
4733
- }), g = d.register("defaultCC"), _ = d.register("defaultBCC");
4734
- function v() {
4727
+ }), g = p.register("defaultCC"), y = p.register("defaultBCC");
4728
+ function C() {
4735
4729
  i("cancel");
4736
4730
  }
4737
- function y() {
4731
+ function T() {
4738
4732
  i("close");
4739
4733
  }
4740
- return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(AppDialogContainer_default, null, {
4734
+ return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(AppDialogContainer_default, null, {
4741
4735
  default: withCtx(() => [createVNode(AppDialogHeader_default, {
4742
4736
  title: r.mailTemplate.displayName,
4743
4737
  description: "Deal settings",
@@ -4748,7 +4742,7 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4748
4742
  }, 8, ["title"])]),
4749
4743
  _: 1
4750
4744
  }), createElementVNode("div", _hoisted_2$3, [createVNode(AppForm_default, {
4751
- form: unref(d),
4745
+ form: unref(p),
4752
4746
  class: "flex flex-1 flex-col overflow-hidden"
4753
4747
  }, {
4754
4748
  default: withCtx(() => [createVNode(AppDialogContainer_default, { class: "flex flex-1 flex-col overflow-y-auto" }, {
@@ -4757,14 +4751,14 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4757
4751
  default: withCtx(() => [createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(g)), {
4758
4752
  label: "Default CC",
4759
4753
  placeholder: "Default CC"
4760
- }), null, 16), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(_)), {
4754
+ }), null, 16), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(y)), {
4761
4755
  label: "Default BCC",
4762
4756
  placeholder: "Default BCC"
4763
4757
  }), null, 16)]),
4764
4758
  _: 1
4765
4759
  }), createVNode(unref(VcTabs), {
4766
4760
  modelValue: l.value,
4767
- "onUpdate:modelValue": t[0] ||= (e) => l.value = e
4761
+ "onUpdate:modelValue": n[0] ||= (e) => l.value = e
4768
4762
  }, {
4769
4763
  items: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.mailTemplate.locales, (e) => (openBlock(), createBlock(unref(VcTabsItem), {
4770
4764
  key: e.uuid,
@@ -4777,7 +4771,7 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4777
4771
  key: e.uuid,
4778
4772
  value: e.language
4779
4773
  }, {
4780
- default: withCtx(() => [createElementVNode("div", _hoisted_3$2, [createVNode(DealSettingsDialogMailTemplateLocaleField_default, { "locale-field": unref(d).register(`locales.${t}`) }, null, 8, ["locale-field"])])]),
4774
+ default: withCtx(() => [createElementVNode("div", _hoisted_3$2, [createVNode(DealSettingsDialogMailTemplateLocaleField_default, { "locale-field": unref(p).register(`locales.${t}`) }, null, 8, ["locale-field"])])]),
4781
4775
  _: 2
4782
4776
  }, 1032, ["value"]))), 128))]),
4783
4777
  _: 1
@@ -4786,8 +4780,8 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4786
4780
  })]),
4787
4781
  _: 1
4788
4782
  }), createVNode(DealSettingsDialogMailTemplateFooter_default, {
4789
- "is-submitting": unref(d).isSubmitting.value,
4790
- onCancel: v
4783
+ "is-submitting": unref(p).isSubmitting.value,
4784
+ onCancel: C
4791
4785
  }, null, 8, ["is-submitting"])]),
4792
4786
  _: 1
4793
4787
  }, 8, ["form"])])]));
@@ -4817,18 +4811,18 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4817
4811
  }), _hoisted_1$2 = { class: "py-2xl" }, DealSettingsDialogMailTemplate_default = /* @__PURE__ */ defineComponent({
4818
4812
  __name: "DealSettingsDialogMailTemplate",
4819
4813
  emits: ["close"],
4820
- setup(t, { emit: n }) {
4821
- let r = n, i = useMailTemplateIndexQuery(), a = ref(null);
4822
- function o(e) {
4823
- a.value = e;
4814
+ setup(e, { emit: t }) {
4815
+ let n = t, r = useMailTemplateIndexQuery(), i = ref(null);
4816
+ function a(e) {
4817
+ i.value = e;
4824
4818
  }
4825
- function c() {
4826
- a.value = null;
4819
+ function o() {
4820
+ i.value = null;
4827
4821
  }
4828
- function l() {
4829
- r("close");
4822
+ function s() {
4823
+ n("close");
4830
4824
  }
4831
- return (t, n) => a.value === null ? (openBlock(), createBlock(AppDialogContainer_default, { key: 0 }, {
4825
+ return (e, t) => i.value === null ? (openBlock(), createBlock(AppDialogContainer_default, { key: 0 }, {
4832
4826
  default: withCtx(() => [createVNode(AppDialogHeader_default, {
4833
4827
  title: "Mailing templates",
4834
4828
  description: "Deal settings",
@@ -4836,12 +4830,12 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4836
4830
  }, {
4837
4831
  "closse-button": withCtx(() => [createVNode(unref(VcDialogCloseButton))]),
4838
4832
  _: 1
4839
- }), createElementVNode("div", _hoisted_1$2, [createVNode(AppInfiniteScroll_default, { "on-next": unref(i).fetchNextPage }, {
4833
+ }), createElementVNode("div", _hoisted_1$2, [createVNode(AppInfiniteScroll_default, { "on-next": unref(r).fetchNextPage }, {
4840
4834
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
4841
- default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i).data.value.data, (e) => (openBlock(), createBlock(AppUnstyledButton_default, {
4835
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r).data.value.data, (e) => (openBlock(), createBlock(AppUnstyledButton_default, {
4842
4836
  key: e.uuid,
4843
4837
  class: "border-primary p-sm flex items-center justify-center rounded-md border hover:bg-gray-50",
4844
- onClick: (t) => o(e)
4838
+ onClick: (t) => a(e)
4845
4839
  }, {
4846
4840
  default: withCtx(() => [createTextVNode(toDisplayString(e.name), 1)]),
4847
4841
  _: 2
@@ -4853,10 +4847,10 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
4853
4847
  _: 1
4854
4848
  })) : (openBlock(), createBlock(DealSettingsDialogMailTemplateForm_default, {
4855
4849
  key: 1,
4856
- "mail-template-uuid": a.value.uuid,
4857
- "mail-template-name": a.value.name,
4858
- onClose: l,
4859
- onCancel: c
4850
+ "mail-template-uuid": i.value.uuid,
4851
+ "mail-template-name": i.value.name,
4852
+ onClose: s,
4853
+ onCancel: o
4860
4854
  }, null, 8, ["mail-template-uuid", "mail-template-name"]));
4861
4855
  }
4862
4856
  }), DealSettingsDialog_default = /* @__PURE__ */ defineComponent({
@@ -4989,38 +4983,38 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
4989
4983
  onSubmit: { type: Function }
4990
4984
  },
4991
4985
  setup(e) {
4992
- let t = e, r = useI18n(), a = useCrmConfig(), o = useForm({
4993
- initialState: computed(() => t.billingInformation === null ? null : {
4994
- billingAddress: t.individualAddress,
4995
- invoiceCcEmails: t.billingInformation.invoiceCcEmails ?? [],
4996
- invoiceEmail: t.billingInformation.invoiceEmail
4986
+ let n = e, i = useI18n(), a = useCrmConfig(), o = useForm({
4987
+ initialState: computed(() => n.billingInformation === null ? null : {
4988
+ billingAddress: n.individualAddress,
4989
+ invoiceCcEmails: n.billingInformation.invoiceCcEmails ?? [],
4990
+ invoiceEmail: n.billingInformation.invoiceEmail
4997
4991
  }),
4998
4992
  schema: createIndividualBillingInformationFormSchema(a.getConfig().billingConfig.individualBillingInformationRequirement ?? BillingInformationRequirement.EMAIL_OR_ADDRESS),
4999
4993
  onSubmit: async (e) => {
5000
- await t.onSubmit(e);
4994
+ await n.onSubmit(e);
5001
4995
  }
5002
4996
  }), s = o.register("billingAddress"), c = o.register("invoiceCcEmails", []), l = o.register("invoiceEmail");
5003
- return (e, t) => (openBlock(), createBlock(AppForm_default, {
4997
+ return (e, n) => (openBlock(), createBlock(AppForm_default, {
5004
4998
  form: unref(o),
5005
4999
  class: "flex h-full flex-col justify-between"
5006
5000
  }, {
5007
5001
  default: withCtx(() => [createVNode(AppCard_default, {
5008
- title: unref(r).t("wise_crm.info_dialog.info.billing_information.card.title"),
5002
+ title: unref(i).t("wise_crm.info_dialog.info.billing_information.card.title"),
5009
5003
  icon: "wallet"
5010
5004
  }, {
5011
5005
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
5012
5006
  default: withCtx(() => [
5013
5007
  createVNode(unref(VcAddressAutocomplete), mergeProps({
5014
- label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.billing_address"),
5015
- placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.billing_address")
5008
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.billing_address"),
5009
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.billing_address")
5016
5010
  }, unref(toFormField)(unref(s))), null, 16, ["label", "placeholder"]),
5017
5011
  createVNode(unref(VcTextField), mergeProps({
5018
- label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_email"),
5019
- placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.email")
5012
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.invoice_email"),
5013
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.email")
5020
5014
  }, unref(toFormField)(unref(l))), null, 16, ["label", "placeholder"]),
5021
5015
  createVNode(AppTagsInputField_default, mergeProps({
5022
- label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails"),
5023
- placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails")
5016
+ label: unref(i).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails"),
5017
+ placeholder: unref(i).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails")
5024
5018
  }, unref(toFormField)(unref(c)), { class: "col-span-2" }), null, 16, ["label", "placeholder"])
5025
5019
  ]),
5026
5020
  _: 1
@@ -5035,7 +5029,7 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
5035
5029
  "is-loading": unref(o).isSubmitting.value,
5036
5030
  type: "submit"
5037
5031
  }, {
5038
- default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t("wise_crm.shared.save_changes")), 1)]),
5032
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("wise_crm.shared.save_changes")), 1)]),
5039
5033
  _: 1
5040
5034
  }, 8, ["is-loading"])]),
5041
5035
  _: 1
@@ -5049,8 +5043,8 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
5049
5043
  __name: "IndividualBillingInformationCard",
5050
5044
  props: { individualUuid: {} },
5051
5045
  setup(e) {
5052
- let t = e, n = useApiErrorToast(), r = useIndividualBillingInformationUpsertMutation(), i = computed(() => t.individualUuid), a = useIndividualDetailQuery(i), o = computed(() => a.data.value === null ? !1 : a.data.value.billingInformationDetail !== null), s = useIndividualBillingInformationQuery(i, computed(() => o.value)), c = computed(() => s.data.value?.billingLocation?.address ?? null);
5053
- async function l(e) {
5046
+ let t = e, n = useApiErrorToast(), r = useIndividualBillingInformationUpsertMutation(), i = computed(() => t.individualUuid), a = useIndividualDetailQuery(i), o = computed(() => a.data.value === null ? !1 : a.data.value.billingInformationDetail !== null), s = useIndividualBillingInformationQuery(i, computed(() => o.value)), l = computed(() => s.data.value?.billingLocation?.address ?? null);
5047
+ async function d(e) {
5054
5048
  try {
5055
5049
  await r.execute({
5056
5050
  body: e,
@@ -5065,9 +5059,9 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
5065
5059
  class: "h-40"
5066
5060
  })) : (openBlock(), createBlock(IndividualBillingInformationUpdateForm_default, {
5067
5061
  key: 1,
5068
- "individual-address": c.value,
5062
+ "individual-address": l.value,
5069
5063
  "individual-uuid": i.value,
5070
- "on-submit": l,
5064
+ "on-submit": d,
5071
5065
  "billing-information": unref(s).data.value
5072
5066
  }, null, 8, [
5073
5067
  "individual-address",
@@ -5092,8 +5086,8 @@ z.object({
5092
5086
  firstName: z.string().min(1),
5093
5087
  language: localeSchema,
5094
5088
  lastName: z.string().min(1),
5095
- mobilePhone: z.string().min(1).nullable(),
5096
- phone: z.string().min(1).nullable()
5089
+ mobilePhone: phoneNumberFormSchema.nullable(),
5090
+ phone: phoneNumberFormSchema.nullable()
5097
5091
  });
5098
5092
  function getIndividualUpdateFormSchema(e) {
5099
5093
  return z.object({
@@ -5103,8 +5097,8 @@ function getIndividualUpdateFormSchema(e) {
5103
5097
  firstName: z.string().min(1),
5104
5098
  language: localeSchema,
5105
5099
  lastName: z.string().min(1),
5106
- mobilePhone: z.string().min(1).nullable(),
5107
- phone: z.string().min(1).nullable()
5100
+ mobilePhone: phoneNumberFormSchema.nullable(),
5101
+ phone: phoneNumberFormSchema.nullable()
5108
5102
  });
5109
5103
  }
5110
5104
  var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
@@ -5115,11 +5109,11 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
5115
5109
  onSubmit: { type: Function }
5116
5110
  },
5117
5111
  setup(e) {
5118
- let t = e, r = useI18n(), i = useForm({
5119
- initialState: IndividualUpdateTransformer.toForm(t.individual),
5120
- schema: getIndividualUpdateFormSchema(t.customFieldDefinitions),
5112
+ let n = e, r = useI18n(), i = useForm({
5113
+ initialState: IndividualUpdateTransformer.toForm(n.individual),
5114
+ schema: getIndividualUpdateFormSchema(n.customFieldDefinitions),
5121
5115
  onSubmit: async (e) => {
5122
- await t.onSubmit(e);
5116
+ await n.onSubmit(e);
5123
5117
  }
5124
5118
  }), a = i.register("firstName"), o = i.register("lastName"), s = i.register("language"), c = i.register("address"), l = i.register("email"), d = i.register("mobilePhone"), p = i.register("phone");
5125
5119
  return (e, g) => (openBlock(), createBlock(AppForm_default, {
@@ -5180,7 +5174,7 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
5180
5174
  }, 16, ["label", "display-fn"]),
5181
5175
  createVNode(CustomFieldDefinitionForm_default, {
5182
5176
  form: unref(i),
5183
- "custom-field-definitions": t.customFieldDefinitions
5177
+ "custom-field-definitions": n.customFieldDefinitions
5184
5178
  }, null, 8, ["form", "custom-field-definitions"])
5185
5179
  ]),
5186
5180
  _: 1
@@ -5194,15 +5188,15 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
5194
5188
  __name: "IndividualInfoUpdateCard",
5195
5189
  props: { individualUuid: {} },
5196
5190
  setup(e) {
5197
- let t = e, n = useCrmConfig(), r = useApiErrorToast(), a = computed(() => t.individualUuid), o = useIndividualDetailQuery(a), s = useIndividualUpdateMutation();
5198
- async function c(e) {
5191
+ let t = e, n = useCrmConfig(), i = useApiErrorToast(), a = computed(() => t.individualUuid), o = useIndividualDetailQuery(a), s = useIndividualUpdateMutation();
5192
+ async function l(e) {
5199
5193
  try {
5200
5194
  await s.execute({
5201
5195
  body: e,
5202
5196
  params: { uuid: a.value }
5203
5197
  });
5204
5198
  } catch (e) {
5205
- r.show(e);
5199
+ i.show(e);
5206
5200
  }
5207
5201
  }
5208
5202
  return (e, t) => unref(o).isLoading.value ? (openBlock(), createBlock(AppSkeletonLoader_default, {
@@ -5210,7 +5204,7 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
5210
5204
  class: "h-100"
5211
5205
  })) : unref(o).data.value ? (openBlock(), createBlock(IndividualCustomerInfoForm_default, {
5212
5206
  key: 1,
5213
- "on-submit": c,
5207
+ "on-submit": l,
5214
5208
  individual: unref(o).data.value,
5215
5209
  "custom-field-definitions": unref(n).getCustomFieldDefinitionForEntity(unref(EntityType).INDIVIDUAL)
5216
5210
  }, null, 8, ["individual", "custom-field-definitions"])) : createCommentVNode("", !0);
@@ -5310,7 +5304,7 @@ function businessRoutes(e) {
5310
5304
  to: e.route.name
5311
5305
  })) },
5312
5306
  path: "/business/:businessUuid",
5313
- component: () => import("./BusinessDetailView-BbfUJk4T.js"),
5307
+ component: () => import("./BusinessDetailView-BxGxWOme.js"),
5314
5308
  redirect: { name: e[0].route.name },
5315
5309
  children: e.map((e) => e.route)
5316
5310
  }];
@@ -5319,7 +5313,7 @@ function dealRoutes(e) {
5319
5313
  let t = [...e.map((e) => e.route), {
5320
5314
  name: "deal-communication",
5321
5315
  path: "communication",
5322
- component: () => import("./DealCommunicationTabView-e7NkRy9r.js")
5316
+ component: () => import("./DealCommunicationTabView-Df5EeolN.js")
5323
5317
  }];
5324
5318
  return [{
5325
5319
  name: "deal-detail",
@@ -5328,7 +5322,7 @@ function dealRoutes(e) {
5328
5322
  to: e.route.name
5329
5323
  })) },
5330
5324
  path: "/deals/:dealUuid",
5331
- component: () => import("./DealDetailView-BPIatW_2.js"),
5325
+ component: () => import("./DealDetailView-DdWHqaBr.js"),
5332
5326
  redirect: { name: t[0].name },
5333
5327
  children: t
5334
5328
  }];
@@ -5341,7 +5335,7 @@ function individualRoutes(e) {
5341
5335
  to: e.route.name
5342
5336
  })) },
5343
5337
  path: "/individual/:individualUuid",
5344
- component: () => import("./IndividualDetailView-Cdodb8Ii.js"),
5338
+ component: () => import("./IndividualDetailView-DfYS31-e.js"),
5345
5339
  redirect: { name: e[0].route.name },
5346
5340
  children: e.map((e) => e.route)
5347
5341
  }];
@@ -5381,26 +5375,27 @@ const icons = {
5381
5375
  homeFilled: import("./HomeFilledIcon-CxIazF0B.js"),
5382
5376
  italic: import("./ItalicIcon-DfV3EOdk.js"),
5383
5377
  layersTree: import("./LayersTreeIcon-Ct-owndO.js"),
5384
- link: import("./LinkIcon-DCW5zjbQ.js"),
5385
- linkExternal: import("./LinkExternalIcon-B9Qg55Oa.js"),
5386
- locationPin: import("./LocationPinIcon-DBc-wt2e.js"),
5387
- mail: import("./MailIcon-Do4a7S2W.js"),
5388
- mobilePhone: import("./MobilePhoneIcon-DSXyKwjd.js"),
5389
- numberedList: import("./NumberedListIcon-DUaSJSYu.js"),
5390
- phone: import("./PhoneIcon-C8Cv1IiW.js"),
5391
- refresh: import("./RefreshIcon-CKZgHIZU.js"),
5392
- send: import("./SendIcon-B-sQkQ3W.js"),
5393
- settings: import("./SettingsIcon-DzP-IQS5.js"),
5394
- starOutline: import("./StarOutlineIcon-c0VfXRdQ.js"),
5395
- starYellow: import("./StarYellowIcon-CH0CnlSU.js"),
5396
- threeDots: import("./ThreeDotsIcon-C6PCFq5J.js"),
5397
- timeLineMarker: import("./TimeLineMarkerIcon-6B6SbwTN.js"),
5398
- trash: import("./TrashIcon-BTPSVviz.js"),
5399
- uploadCloud: import("./UploadCloudIcon-1aMW5OJq.js"),
5400
- user: import("./UserIcon-D1H8TGlg.js"),
5401
- userCircle: import("./UserCircleIcon-D-19dc-2.js"),
5402
- verticalDots: import("./VerticalDotsIcon-DmPza4Jd.js"),
5403
- wallet: import("./WalletIcon-BlI3D3v-.js")
5378
+ link: import("./LinkIcon-DqBbVrvs.js"),
5379
+ linkBroken: import("./LinkBrokenIcon-CTlqmapl.js"),
5380
+ linkExternal: import("./LinkExternalIcon-LOVtSqBT.js"),
5381
+ locationPin: import("./LocationPinIcon-Cp-wRgk2.js"),
5382
+ mail: import("./MailIcon-CnTrB1k3.js"),
5383
+ mobilePhone: import("./MobilePhoneIcon-B747hmpS.js"),
5384
+ numberedList: import("./NumberedListIcon-amJxDaaD.js"),
5385
+ phone: import("./PhoneIcon-94MYVL85.js"),
5386
+ refresh: import("./RefreshIcon-DRe3coBc.js"),
5387
+ send: import("./SendIcon-MYItp1xI.js"),
5388
+ settings: import("./SettingsIcon-C0qTAv0w.js"),
5389
+ starOutline: import("./StarOutlineIcon-CiFLgepk.js"),
5390
+ starYellow: import("./StarYellowIcon-C0v_XGwI.js"),
5391
+ threeDots: import("./ThreeDotsIcon-lujOTU3G.js"),
5392
+ timeLineMarker: import("./TimeLineMarkerIcon-C4LfErbc.js"),
5393
+ trash: import("./TrashIcon-v4L9SEK_.js"),
5394
+ uploadCloud: import("./UploadCloudIcon-j1-1Rvqb.js"),
5395
+ user: import("./UserIcon-Cb2jFKLr.js"),
5396
+ userCircle: import("./UserCircleIcon-BjUt_2C4.js"),
5397
+ verticalDots: import("./VerticalDotsIcon-Y3m6tlQ2.js"),
5398
+ wallet: import("./WalletIcon-pPsKbzmh.js")
5404
5399
  }, wiseCrmLocales = {
5405
5400
  "en-US": en_US_default,
5406
5401
  "nl-BE": nl_BE_default