@wisemen/wise-crm-web 2.0.0-alpha.44 → 2.0.0-alpha.46

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.
@@ -1,5 +1,5 @@
1
1
  import { openBlock as i, createElementBlock as _, renderSlot as C, defineComponent as g, computed as w, unref as t, createBlock as p, withCtx as d, createVNode as r, createCommentVNode as N, useModel as Z, Fragment as A, renderList as T, createElementVNode as a, mergeModels as Y, createStaticVNode as J, resolveDynamicComponent as I, toDisplayString as v, mergeProps as j, normalizeClass as $, ref as W, toValue as F } from "vue";
2
- import { _ as V, ao as X, ap as ee, aq as te, ar as ne, as as oe, at as se, au as le, av as ae, e as ie, aw as re, am as ce, $ as ue, Y as de, ax as me, al as S, t as pe, u as fe, ay as _e, a4 as ye, az as xe, U as he, y as ge, aA as be, aB as ve, D as we, aC as Ce } from "./index-D4L5GVbr.js";
2
+ import { _ as V, ao as X, ap as ee, aq as te, ar as ne, as as oe, at as se, au as le, av as ae, e as ie, aw as re, am as ce, $ as ue, Y as de, ax as me, al as S, t as pe, u as fe, ay as _e, a4 as ye, az as xe, U as he, y as ge, aA as be, aB as ve, D as we, aC as Ce } from "./index-DoUWBza_.js";
3
3
  import { useQuery as ke, ApiUtil as b, useMutation as E } from "@wisemen/vue-core-api-utils";
4
4
  import { UISkeletonItem as Ue, UIBadge as $e, UITabs as Ie, UITabsList as De, UITabsItem as Se, UITextareaField as R, toFormField as q, UIIconButton as D, UIDropdownMenu as Be, UIDropdownMenuGroup as Ne, UIDropdownMenuItem as z, UILoader as Ae, useToast as Te, UIFormDialog as Ve, UIDialogHeader as Ee, UIDialogBody as Pe, UIDialogFooter as Le, UIDialogFooterCancel as Fe, UIDialogFooterSubmit as ze, UILink as Me, UITabsRouterLink as je, UITabsRouterLinkItem as Re } from "@wisemen/vue-core-design-system";
5
5
  import { Motion as H, AnimatePresence as qe } from "motion-v";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as y, openBlock as t, createElementBlock as _, createElementVNode as s, createBlock as o, resolveDynamicComponent as x, unref as e, toDisplayString as p, createVNode as r, withCtx as n, createCommentVNode as f, Fragment as b, renderList as w, normalizeClass as k, computed as $ } from "vue";
2
2
  import { useRouteParams as I } from "@vueuse/router";
3
3
  import { useOffsetInfiniteQuery as L } from "@wisemen/vue-core-api-utils";
4
- import { M, u as z, H as E, T as j, K as B, L as N, N as T, O as S, P as h, p as A, R as C, U as F, t as H, G as V } from "./index-D4L5GVbr.js";
4
+ import { M, u as z, H as E, T as j, K as B, L as N, N as T, O as S, P as h, p as A, R as C, U as F, t as H, G as V } from "./index-DoUWBza_.js";
5
5
  import { UIIconButton as P, UIEmptyState as Q, UIBadge as q } from "@wisemen/vue-core-design-system";
6
6
  import { AnimatePresence as O, Motion as R } from "motion-v";
7
7
  import { AccordionRoot as W, AccordionItem as G, AccordionHeader as K, AccordionTrigger as J, AccordionContent as X } from "reka-ui";
@@ -2,8 +2,8 @@ import { defineComponent as x, openBlock as c, createBlock as y, unref as e, ref
2
2
  import { useRouteParams as Oe } from "@vueuse/router";
3
3
  import { useI18n as I } from "vue-i18n";
4
4
  import { bs as ge, by as Ee, bz as Ve, bB as Le } from "./uuid.util-DUuuAgdg.js";
5
- import { C as ye, c as qe, l as Ae, f as z, b as Qe, d as Be, e as ue, g as Ke, N as be, _ as Re, u as je, a as ze, h as Ge, i as Ye, j as Ze, k as Xe } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-CTukbqp5.js";
6
- import { X as F, y as he, Y as He, v as $, Z as E, u as q, e as Je, $ as ve, a0 as We, a1 as ea, p as aa, a2 as ta, q as na, A as ce, a3 as la, a4 as oa, a5 as Ce, a6 as B, a7 as ia, a8 as Ue, a9 as ra, aa as sa, b as ua, t as ca, f as da, Q as ma, ab as fa, ac as pa, I as we, x as _a, o as de, ad as ga, ae as ya, D as ba, C as ha, af as va, j as Ca, ag as Ua, F as wa, G as Pa } from "./index-D4L5GVbr.js";
5
+ import { C as ye, c as qe, l as Ae, f as z, b as Qe, d as Be, e as ue, g as Ke, N as be, _ as Re, u as je, a as ze, h as Ge, i as Ye, j as Ze, k as Xe } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-CMzz9bVK.js";
6
+ import { X as F, y as he, Y as He, v as $, Z as E, u as q, e as Je, $ as ve, a0 as We, a1 as ea, p as aa, a2 as ta, q as na, A as ce, a3 as la, a4 as oa, a5 as Ce, a6 as B, a7 as ia, a8 as Ue, a9 as ra, aa as sa, b as ua, t as ca, f as da, Q as ma, ab as fa, ac as pa, I as we, x as _a, o as de, ad as ga, ae as ya, D as ba, C as ha, af as va, j as Ca, ag as Ua, F as wa, G as Pa } from "./index-DoUWBza_.js";
7
7
  import { useToast as Pe, useOverlay as J, UIConfirmDialog as Da, UIIconButton as oe, UITextField as Y, toFormField as Q, UIDropdownMenu as xa, UIDropdownMenuGroup as Ia, UIDropdownMenuItem as me, UIPhoneNumberField as fe, UIFormLayout as ie, UIFormFieldGroup as K, UIFormFieldGrid as R, UIFormDialog as De, UIDialogHeader as xe, UIForm as pe, UIDialogBody as W, UIDialogFooter as ee, UIDialogFooterSubmit as ae, createAutocompleteOptions as Na, createSelectOptions as te, UIAutocomplete as Sa, UISelect as ne, UIButton as ka, UIBadge as le, UIColumnLayout as Ta, UIBadgeGroup as Fa } from "@wisemen/vue-core-design-system";
8
8
  import { useMutation as M, useQuery as Ie, useOffsetInfiniteQuery as $a, useKeysetInfiniteQuery as Ma } from "@wisemen/vue-core-api-utils";
9
9
  import { useForm as Z } from "formango";
@@ -1,18 +1,18 @@
1
- import { defineComponent as P, computed as c, openBlock as o, createBlock as s, unref as e, createElementBlock as S, createVNode as d, withCtx as p, createElementVNode as M, ref as G, Fragment as Q, createCommentVNode as x, renderList as V, toDisplayString as si, resolveDynamicComponent as ri } from "vue";
1
+ import { defineComponent as P, computed as c, openBlock as o, createBlock as s, unref as e, createElementBlock as S, createVNode as d, withCtx as p, createElementVNode as Q, ref as G, Fragment as q, createCommentVNode as x, renderList as V, toDisplayString as si, resolveDynamicComponent as ri } from "vue";
2
2
  import { useRouteParams as di } from "@vueuse/router";
3
- import { bs as q } from "./uuid.util-DUuuAgdg.js";
4
- import { N as R, u as ci, _ as vi, a as mi, C as Y, f as $, b as pi, d as fi, e as F, g as _i, h as yi, i as bi, j as gi, k as Ui } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-CTukbqp5.js";
3
+ import { bs as A } from "./uuid.util-DUuuAgdg.js";
4
+ import { N as R, u as ci, _ as vi, a as mi, C as Y, f as $, b as pi, d as fi, e as M, g as _i, h as yi, i as bi, j as gi, k as Ui } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-CMzz9bVK.js";
5
5
  import { useI18n as k } from "vue-i18n";
6
- import { a4 as N, u as A, p as H, a2 as Ci, q as J, Q as hi, t as wi, S as O, v as W, y as X, I as Z, w as Ii, x as Pi, o as K, j as xi, z as Di, C as ki, D as Ni, ah as $i, F as Si, G as Ei } from "./index-D4L5GVbr.js";
6
+ import { a4 as N, u as T, p as H, a2 as Ci, q as J, Q as hi, t as wi, S as O, v as W, y as X, I as Z, w as Ii, x as Pi, o as K, j as xi, z as Di, C as ki, D as Ni, ah as $i, F as Si, G as Ei } from "./index-DoUWBza_.js";
7
7
  import { useOverlay as ii, UIFormDialog as ei, UIDialogHeader as ni, UIForm as z, UIDialogFooter as Fi, UIDialogFooterSubmit as Mi, UIConfirmDialog as Qi, UIButton as qi, UILink as Ai, useToast as Ti } from "@wisemen/vue-core-design-system";
8
- import { useMutation as T, useKeysetInfiniteQuery as ti, useQuery as Li } from "@wisemen/vue-core-api-utils";
8
+ import { useMutation as L, useKeysetInfiniteQuery as ti, useQuery as Li } from "@wisemen/vue-core-api-utils";
9
9
  import "zod";
10
- import { _ as Vi, f as Bi, c as Oi, a as Ki, b as j, d as zi, e as ji, u as Gi, g as Ri, h as Yi, i as Hi } from "./CrmDetailSidebarMapCard.vue_vue_type_script_setup_true_lang-CeS10J7W.js";
10
+ import { _ as Vi, f as Bi, c as Oi, a as Ki, b as j, d as zi, e as ji, u as Gi, g as Ri, h as Yi, i as Hi } from "./CrmDetailSidebarMapCard.vue_vue_type_script_setup_true_lang-CteTxdvx.js";
11
11
  import { Motion as Ji } from "motion-v";
12
12
  import { useQueryClient as Wi, useMutation as Xi } from "@tanstack/vue-query";
13
13
  import { useForm as B } from "formango";
14
14
  function Zi() {
15
- return T({
15
+ return L({
16
16
  queryFn: async ({
17
17
  body: n,
18
18
  params: i
@@ -47,7 +47,7 @@ const ee = /* @__PURE__ */ P({
47
47
  }
48
48
  });
49
49
  function ne() {
50
- return T({
50
+ return L({
51
51
  queryFn: async ({
52
52
  body: n,
53
53
  params: i
@@ -75,7 +75,7 @@ const ae = /* @__PURE__ */ P({
75
75
  individual: {}
76
76
  },
77
77
  setup(n) {
78
- const i = n, t = A(), a = ne(), u = ci(), f = ii().create(vi), y = te(
78
+ const i = n, t = T(), a = ne(), u = ci(), f = ii().create(vi), y = te(
79
79
  c(() => i.individual.uuid)
80
80
  ), _ = c(() => y.result.value.isOk() ? y.result.value.getValue().data : []);
81
81
  async function w(C) {
@@ -193,7 +193,7 @@ function oe() {
193
193
  };
194
194
  }
195
195
  function le() {
196
- return T({
196
+ return L({
197
197
  queryFn: async ({
198
198
  body: n,
199
199
  params: i
@@ -216,7 +216,7 @@ const ue = { class: "flex flex-col gap-md" }, se = { class: "flex flex-col gap-s
216
216
  return (a, u) => (o(), S("div", ue, [
217
217
  d(Y, null, {
218
218
  default: p(() => [
219
- M("div", se, [
219
+ Q("div", se, [
220
220
  d($, {
221
221
  label: i.individual.email ?? "-",
222
222
  icon: e(H)
@@ -230,7 +230,7 @@ const ue = { class: "flex flex-col gap-md" }, se = { class: "flex flex-col gap-s
230
230
  icon: e(J)
231
231
  }, null, 8, ["label", "icon"])
232
232
  ]),
233
- M("div", re, [
233
+ Q("div", re, [
234
234
  d($, {
235
235
  label: e(t).t("wise_crm.info_dialog.sidebar.overview.created_at_label", {
236
236
  value: i.individual.createdAt ? e(wi)().toDateTime(i.individual.createdAt) : "-"
@@ -248,7 +248,7 @@ const ue = { class: "flex flex-col gap-md" }, se = { class: "flex flex-col gap-s
248
248
  }
249
249
  });
250
250
  function ce() {
251
- return T({
251
+ return L({
252
252
  queryFn: async ({
253
253
  body: n,
254
254
  params: i
@@ -274,7 +274,7 @@ const ve = /* @__PURE__ */ P({
274
274
  },
275
275
  emits: ["close", "createNewContactPerson"],
276
276
  setup(n, { emit: i }) {
277
- const t = n, a = i, u = k(), r = A(), f = ce(), y = pi(), _ = G(t.isCreatingNewContactPerson), w = B({
277
+ const t = n, a = i, u = k(), r = T(), f = ce(), y = pi(), _ = G(t.isCreatingNewContactPerson), w = B({
278
278
  schema: Oi,
279
279
  onSubmit: async (l) => {
280
280
  await C(l);
@@ -407,7 +407,7 @@ const ve = /* @__PURE__ */ P({
407
407
  }
408
408
  });
409
409
  function me() {
410
- return T({
410
+ return L({
411
411
  queryFn: async ({
412
412
  body: n,
413
413
  params: i
@@ -447,7 +447,7 @@ const fe = /* @__PURE__ */ P({
447
447
  },
448
448
  setup(n) {
449
449
  const i = n, t = k();
450
- return (a, u) => (o(), S(Q, null, [
450
+ return (a, u) => (o(), S(q, null, [
451
451
  d(zi, {
452
452
  form: i.form
453
453
  }, null, 8, ["form"]),
@@ -470,7 +470,7 @@ const fe = /* @__PURE__ */ P({
470
470
  },
471
471
  emits: ["close"],
472
472
  setup(n, { emit: i }) {
473
- const t = n, a = i, u = k(), r = A(), f = c(() => t.individualUuid), y = c(() => t.contactPersonUuid), _ = pe(
473
+ const t = n, a = i, u = k(), r = T(), f = c(() => t.individualUuid), y = c(() => t.contactPersonUuid), _ = pe(
474
474
  f,
475
475
  y
476
476
  ), w = me(), m = c(() => _.result.value.isOk() ? _.result.value.getValue() : null), b = B({
@@ -529,7 +529,7 @@ const fe = /* @__PURE__ */ P({
529
529
  individual: {}
530
530
  },
531
531
  setup(n) {
532
- const i = n, t = k(), a = A(), u = W(), r = X(), f = c(
532
+ const i = n, t = k(), a = T(), u = W(), r = X(), f = c(
533
533
  () => u.getOptions().individual?.sidebarSections ?? []
534
534
  ), y = Gi(
535
535
  f,
@@ -537,8 +537,8 @@ const fe = /* @__PURE__ */ P({
537
537
  individualUuid: i.individual.uuid
538
538
  }))
539
539
  ), _ = ii(), w = _.create(ve), m = _.create(_e), b = _.create(Qi), C = oe(), h = le(), U = c(() => i.individual.contactPersons.length > 0), l = c(
540
- () => i.individual.contactPersons.toSorted((D, L) => Number(L.isPrimary) - Number(D.isPrimary))
541
- ), g = c(() => i.individual.billingInformationDetail !== null), I = c(() => r.getEntityConfig(q.BUSINESS)?.name.toLowerCase() ?? "");
540
+ () => i.individual.contactPersons.toSorted((D, F) => Number(F.isPrimary) - Number(D.isPrimary))
541
+ ), g = c(() => i.individual.billingInformationDetail !== null), I = c(() => r.getEntityConfig(A.BUSINESS)?.name.toLowerCase() ?? "");
542
542
  function E() {
543
543
  w.open({
544
544
  individualUuid: i.individual.uuid
@@ -557,20 +557,15 @@ const fe = /* @__PURE__ */ P({
557
557
  confirmLabel: t.t("shared.delete"),
558
558
  description: t.t("wise_crm.info_dialog.sidebar.overview.delete_contact_person_description"),
559
559
  onConfirm: async () => {
560
- try {
561
- await h.execute({
562
- body: {
563
- contactPersonUuid: D
564
- },
565
- params: {
566
- individualUuid: i.individual.uuid
567
- }
568
- });
569
- } catch (L) {
570
- a.show(L);
571
- } finally {
572
- b.close();
573
- }
560
+ const F = await h.execute({
561
+ body: {
562
+ contactPersonUuid: D
563
+ },
564
+ params: {
565
+ individualUuid: i.individual.uuid
566
+ }
567
+ });
568
+ b.close(), F.isErr() && a.show(F.error);
574
569
  }
575
570
  });
576
571
  }
@@ -582,11 +577,11 @@ const fe = /* @__PURE__ */ P({
582
577
  }
583
578
  });
584
579
  }
585
- return (D, L) => (o(), s(fi, {
580
+ return (D, F) => (o(), s(fi, {
586
581
  "default-values": ["customer", "invoice", "contact-persons", "linked-businesses", ...f.value.map((v) => `custom-${v.key}`)]
587
582
  }, {
588
583
  default: p(() => [
589
- d(F, {
584
+ d(M, {
590
585
  label: e(t).t("wise_crm.info_dialog.sidebar.overview.customer_info_label"),
591
586
  icon: e(Z),
592
587
  value: "customer"
@@ -596,7 +591,7 @@ const fe = /* @__PURE__ */ P({
596
591
  ]),
597
592
  _: 1
598
593
  }, 8, ["label", "icon"]),
599
- d(F, {
594
+ d(M, {
600
595
  label: e(t).t("wise_crm.info_dialog.sidebar.overview.invoice_label"),
601
596
  "is-empty": !g.value,
602
597
  icon: e(Ii),
@@ -611,7 +606,7 @@ const fe = /* @__PURE__ */ P({
611
606
  ]),
612
607
  _: 1
613
608
  }, 8, ["label", "is-empty", "icon"]),
614
- d(F, {
609
+ d(M, {
615
610
  "is-empty": !U.value,
616
611
  label: e(t).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
617
612
  icon: e(Pi),
@@ -628,7 +623,7 @@ const fe = /* @__PURE__ */ P({
628
623
  }, null, 8, ["label", "icon"]))
629
624
  ]),
630
625
  default: p(() => [
631
- (o(!0), S(Q, null, V(l.value, (v) => (o(), s(e(Ji), {
626
+ (o(!0), S(q, null, V(l.value, (v) => (o(), s(e(Ji), {
632
627
  key: v.uuid,
633
628
  "layout-id": v.uuid
634
629
  }, {
@@ -653,7 +648,7 @@ const fe = /* @__PURE__ */ P({
653
648
  ]),
654
649
  _: 1
655
650
  }, 8, ["is-empty", "label", "icon"]),
656
- i.individual.linkedBusinesses.length > 0 ? (o(), s(F, {
651
+ i.individual.linkedBusinesses.length > 0 ? (o(), s(M, {
657
652
  key: 0,
658
653
  "is-edit-button-hidden": !0,
659
654
  label: e(t).t("wise_crm.info_dialog.sidebar.overview.linked_business_label", {
@@ -663,13 +658,13 @@ const fe = /* @__PURE__ */ P({
663
658
  value: "linked-businesses"
664
659
  }, {
665
660
  default: p(() => [
666
- (o(!0), S(Q, null, V(i.individual.linkedBusinesses, (v) => (o(), s(Y, {
661
+ (o(!0), S(q, null, V(i.individual.linkedBusinesses, (v) => (o(), s(Y, {
667
662
  key: v.uuid,
668
663
  class: "flex flex-col gap-lg"
669
664
  }, {
670
665
  default: p(() => [
671
- M("div", ye, [
672
- M("div", be, [
666
+ Q("div", ye, [
667
+ Q("div", be, [
673
668
  d(e(Ai), {
674
669
  to: {
675
670
  name: "business-detail",
@@ -682,7 +677,7 @@ const fe = /* @__PURE__ */ P({
682
677
  variant: "secondary",
683
678
  class: "-ml-xs"
684
679
  }, null, 8, ["to", "label"]),
685
- M("p", ge, si(v.position), 1)
680
+ Q("p", ge, si(v.position), 1)
686
681
  ])
687
682
  ]),
688
683
  d($, {
@@ -699,7 +694,7 @@ const fe = /* @__PURE__ */ P({
699
694
  ]),
700
695
  _: 1
701
696
  }, 8, ["label", "icon"])) : x("", !0),
702
- (o(!0), S(Q, null, V(e(y), (v) => (o(), s(F, {
697
+ (o(!0), S(q, null, V(e(y), (v) => (o(), s(M, {
703
698
  key: v.key,
704
699
  label: v.label.value,
705
700
  icon: v.icon,
@@ -725,7 +720,7 @@ const fe = /* @__PURE__ */ P({
725
720
  const i = n, t = k();
726
721
  Ti();
727
722
  const a = X(), u = W();
728
- A(), Zi();
723
+ T(), Zi();
729
724
  const r = G(
730
725
  "overview"
731
726
  /* OVERVIEW */
@@ -748,16 +743,16 @@ const fe = /* @__PURE__ */ P({
748
743
  value: "notes"
749
744
  /* NOTES */
750
745
  }
751
- ]), y = c(() => a.getEntityConfig(q.INDIVIDUAL)), _ = c(
746
+ ]), y = c(() => a.getEntityConfig(A.INDIVIDUAL)), _ = c(
752
747
  () => u.getOptions().individual?.headerBadges ?? []
753
748
  );
754
749
  return (w, m) => (o(), s(Ni, {
755
- color: e(a).getEntityConfig(e(q).INDIVIDUAL)?.color ?? null,
750
+ color: e(a).getEntityConfig(e(A).INDIVIDUAL)?.color ?? null,
756
751
  class: "flex h-full flex-col"
757
752
  }, {
758
753
  default: p(() => [
759
754
  d(Hi, {
760
- "entity-type": e(q).INDIVIDUAL,
755
+ "entity-type": e(A).INDIVIDUAL,
761
756
  name: `${i.individual.firstName} ${i.individual.lastName}`,
762
757
  address: i.individual.address,
763
758
  email: i.individual.email,
@@ -769,7 +764,7 @@ const fe = /* @__PURE__ */ P({
769
764
  x("", !0)
770
765
  ]),
771
766
  badges: p(() => [
772
- (o(!0), S(Q, null, V(_.value, (b) => (o(), s(yi, {
767
+ (o(!0), S(q, null, V(_.value, (b) => (o(), s(yi, {
773
768
  key: b.key,
774
769
  badge: b,
775
770
  uuid: i.individual.uuid,
@@ -838,7 +833,7 @@ const fe = /* @__PURE__ */ P({
838
833
  return (a, u) => (o(), s(Ui, {
839
834
  key: e(t),
840
835
  tabs: i.tabs,
841
- "entity-type": e(q).INDIVIDUAL
836
+ "entity-type": e(A).INDIVIDUAL
842
837
  }, {
843
838
  sidebar: p(() => [
844
839
  d(he, { "individual-uuid": e(t) }, null, 8, ["individual-uuid"])