@wisemen/wise-crm-web 0.2.5 → 1.0.0

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 (37) hide show
  1. package/dist/BusinessDetailSidebarProvider-Dm6Dd7Nq.js +2899 -0
  2. package/dist/{BusinessDetailView-BZpocob4.js → BusinessDetailView-BHVUfCpV.js} +5 -5
  3. package/dist/{CrmDetailHeaderCard-Jo2OteBb.js → CrmDetailHeaderCard-CiVLyIuw.js} +39 -39
  4. package/dist/{CrmDetailView-DKHX-JEl.js → CrmDetailView-DaAuWeiB.js} +14 -14
  5. package/dist/{DealCommunicationTabView-ClflVxHJ.js → DealCommunicationTabView-xq_zOAsr.js} +2 -2
  6. package/dist/{DealDetailView-ChAFvBBK.js → DealDetailView-C54XpYN1.js} +124 -124
  7. package/dist/{DealExternalAttachment-ClwtFzpQ.js → DealExternalAttachment-Dp44vkgt.js} +1 -1
  8. package/dist/{DealSendMailDialog-SWWyaxq8.js → DealSendMailDialog-D11Tgd_A.js} +50 -50
  9. package/dist/{Error-CX6APxDX.js → Error-X0deDY-N.js} +510 -8
  10. package/dist/{IndividualDetailSidebarProvider-BJgxw1Jd.js → IndividualDetailSidebarProvider-BvjhFng9.js} +218 -218
  11. package/dist/{IndividualDetailView-CvGUCWPY.js → IndividualDetailView-Cq8iAwQv.js} +5 -5
  12. package/dist/{client-CpsHjr8V.js → client-S6BLV3Ct.js} +7 -12
  13. package/dist/composables/crmConfig.composable.d.ts +1 -0
  14. package/dist/index.js +375 -375
  15. package/dist/kbo-client/client/client.gen.d.ts +2 -0
  16. package/dist/kbo-client/client/index.d.ts +8 -0
  17. package/dist/kbo-client/client/types.gen.d.ts +117 -0
  18. package/dist/kbo-client/client/utils.gen.d.ts +33 -0
  19. package/dist/kbo-client/client.gen.d.ts +12 -0
  20. package/dist/kbo-client/core/auth.gen.d.ts +18 -0
  21. package/dist/kbo-client/core/bodySerializer.gen.d.ts +25 -0
  22. package/dist/kbo-client/core/params.gen.d.ts +43 -0
  23. package/dist/kbo-client/core/pathSerializer.gen.d.ts +33 -0
  24. package/dist/kbo-client/core/queryKeySerializer.gen.d.ts +18 -0
  25. package/dist/kbo-client/core/serverSentEvents.gen.d.ts +71 -0
  26. package/dist/kbo-client/core/types.gen.d.ts +78 -0
  27. package/dist/kbo-client/core/utils.gen.d.ts +19 -0
  28. package/dist/kbo-client/index.d.ts +2 -0
  29. package/dist/kbo-client/sdk.gen.d.ts +72 -0
  30. package/dist/kbo-client/types.gen.d.ts +2089 -0
  31. package/dist/kbo-client/zod.gen.d.ts +5943 -0
  32. package/dist/libs/http.lib.d.ts +3 -1
  33. package/dist/libs/kboBaseUrl.lib.d.ts +1 -0
  34. package/dist/models/cbe/search/cbeEnterpriseSearchDto.model.d.ts +1 -1
  35. package/dist/testing.js +1 -1
  36. package/package.json +2 -1
  37. package/dist/BusinessDetailSidebarProvider-CXG99iHk.js +0 -2077
@@ -1,9 +1,9 @@
1
- import { $ as NoteService, B as toFormField, D as useCrmConfig, H as i18nPlugin, J as useApiErrorToast, L as NoteUpdateDialog_default, N as AppSidebarFormSubmitButton_default, P as AppSidebarFormFooter_default, Q as useNoteDeleteMutation, T as useCrm, V as AppForm_default, Z as useKeysetInfiniteQuery, _ as IndividualAutocomplete_default, a as AppOpenEntityButton_default, c as CrmDetailAccordionRoot_default, d as ContactPersonFormNameField_default, f as ContactPersonFormContactField_default, g as phoneNumberFormSchema, h as useContactPersonCreateMutation, i as CrmDetailSidebarAccordionHeaderIconButton_default, j as useSearch, k as AppColorProvider_default, l as AppIconLabelPair_default, m as AppDialog_default, n as CrmDetailContainer_default, nt as AppGrid_default, o as CrmDetailSidebarCard_default, p as AppUnstyledButton_default, r as CrmDetailSidebarTabs_default, s as CrmDetailSidebarAccordionItem_default, t as Error_default, u as individualItemSchema, x as AppGlobalFormError_default, z as CrmDetailSidebarNotesView_default } from "./Error-CX6APxDX.js";
1
+ import { $ as useNoteDeleteMutation, A as AppColorProvider_default, B as CrmDetailSidebarNotesView_default, D as useCrmConfig, F as AppSidebarFormFooter_default, H as AppForm_default, M as useSearch, P as AppSidebarFormSubmitButton_default, Q as useKeysetInfiniteQuery, R as NoteUpdateDialog_default, T as useCrm, U as i18nPlugin, V as toFormField, Y as useApiErrorToast, _ as IndividualAutocomplete_default, a as AppOpenEntityButton_default, c as CrmDetailAccordionRoot_default, d as ContactPersonFormNameField_default, et as NoteService, f as ContactPersonFormContactField_default, g as phoneNumberFormSchema, h as useContactPersonCreateMutation, i as CrmDetailSidebarAccordionHeaderIconButton_default, l as AppIconLabelPair_default, m as AppDialog_default, n as CrmDetailContainer_default, o as CrmDetailSidebarCard_default, p as AppUnstyledButton_default, r as CrmDetailSidebarTabs_default, rt as AppGrid_default, s as CrmDetailSidebarAccordionItem_default, t as Error_default, u as individualItemSchema, x as AppGlobalFormError_default } from "./Error-X0deDY-N.js";
2
2
  import { a as AppGroup_default, l as He, n as useDateTimeFormat, t as AppSkeletonLoader_default, u as ze } from "./AppSkeletonLoader-BAhoOmFD.js";
3
- import { ht as EntityType, lt as BoardColumnTransitionTriggerType, pt as DealSource, yt as SdkContentLocale } from "./client-CpsHjr8V.js";
4
- import { d as ContentLocaleUtil, f as DealService, g as BoardService, h as useUserIndexQuery, n as useDealDetailQuery, t as DealSendMailDialog_default, u as DealSourceUtil } from "./DealSendMailDialog-SWWyaxq8.js";
5
- import "./DealExternalAttachment-ClwtFzpQ.js";
6
- import { t as CrmDetailView_default } from "./CrmDetailView-DKHX-JEl.js";
3
+ import { ct as BoardColumnTransitionTriggerType, ft as DealSource, mt as EntityType, vt as SdkContentLocale } from "./client-S6BLV3Ct.js";
4
+ import { d as ContentLocaleUtil, f as DealService, g as BoardService, h as useUserIndexQuery, n as useDealDetailQuery, t as DealSendMailDialog_default, u as DealSourceUtil } from "./DealSendMailDialog-D11Tgd_A.js";
5
+ import "./DealExternalAttachment-Dp44vkgt.js";
6
+ import { t as CrmDetailView_default } from "./CrmDetailView-DaAuWeiB.js";
7
7
  import z$1, { z } from "zod";
8
8
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useModel, useTemplateRef, withCtx } from "vue";
9
9
  import { useI18n } from "vue-i18n";
@@ -55,60 +55,60 @@ var _hoisted_1$3 = {
55
55
  __name: "DealDetailSidebarNameField",
56
56
  props: { deal: {} },
57
57
  setup(a) {
58
- let P = a, F = useI18n(), L = useApiErrorToast(), R = ref(!1), B = useTemplateRef("nameFieldContainerRef"), V = useDealUpdateNameMutation(), H = useForm({
58
+ let N = a, P = useI18n(), F = useApiErrorToast(), I = ref(!1), R = useTemplateRef("nameFieldContainerRef"), B = useDealUpdateNameMutation(), V = useForm({
59
59
  schema: z$1.object({ name: z$1.string().min(1) }),
60
60
  onSubmit: async (a) => {
61
61
  try {
62
- await V.execute({
62
+ await B.execute({
63
63
  body: { name: a.name },
64
- params: { dealUuid: P.deal.uuid }
64
+ params: { dealUuid: N.deal.uuid }
65
65
  });
66
66
  } catch (a) {
67
- L.show(a);
67
+ F.show(a);
68
68
  } finally {
69
- R.value = !1;
69
+ I.value = !1;
70
70
  }
71
71
  }
72
- }), W = H.register("name", P.deal.name);
73
- async function G() {
74
- R.value = !0, await nextTick(), K();
72
+ }), H = V.register("name", N.deal.name);
73
+ async function U() {
74
+ I.value = !0, await nextTick(), W();
75
75
  }
76
- function K() {
77
- (B.value?.querySelector("input"))?.focus();
76
+ function W() {
77
+ (R.value?.querySelector("input"))?.focus();
78
78
  }
79
- function q() {
80
- if (!H.isDirty.value) {
81
- R.value = !1;
79
+ function K() {
80
+ if (!V.isDirty.value) {
81
+ I.value = !1;
82
82
  return;
83
83
  }
84
- H.submit();
84
+ V.submit();
85
85
  }
86
- return (a, I) => (openBlock(), createElementBlock("div", {
86
+ return (a, F) => (openBlock(), createElementBlock("div", {
87
87
  ref_key: "nameFieldContainerRef",
88
- ref: B
89
- }, [R.value ? (openBlock(), createBlock(AppForm_default, {
88
+ ref: R
89
+ }, [I.value ? (openBlock(), createBlock(AppForm_default, {
90
90
  key: 0,
91
- form: unref(H)
91
+ form: unref(V)
92
92
  }, {
93
- default: withCtx(() => [createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(W)), {
93
+ default: withCtx(() => [createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(H)), {
94
94
  "class-config": { input: "text-xl font-bold" },
95
- "is-loading": unref(H).isSubmitting.value,
96
- label: unref(F).t("wise_crm.deal.detail.sidebar.name_field.label"),
97
- onBlur: q
95
+ "is-loading": unref(V).isSubmitting.value,
96
+ label: unref(P).t("wise_crm.deal.detail.sidebar.name_field.label"),
97
+ onBlur: K
98
98
  }), {
99
99
  label: withCtx(() => [createVNode(unref(VcFormFieldLabel), { class: "sr-only" })]),
100
100
  _: 1
101
- }, 16, ["is-loading", "label"]), I[0] ||= createElementVNode("button", {
101
+ }, 16, ["is-loading", "label"]), F[0] ||= createElementVNode("button", {
102
102
  type: "submit",
103
103
  class: "sr-only"
104
104
  }, null, -1)]),
105
105
  _: 1
106
- }, 8, ["form"])) : (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("h2", _hoisted_2$2, toDisplayString(P.deal.name), 1), createVNode(unref(VcIconButton), {
107
- label: unref(F).t("wise_crm.deal.detail.sidebar.name_field.edit_label"),
106
+ }, 8, ["form"])) : (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("h2", _hoisted_2$2, toDisplayString(N.deal.name), 1), createVNode(unref(VcIconButton), {
107
+ label: unref(P).t("wise_crm.deal.detail.sidebar.name_field.edit_label"),
108
108
  icon: "editWithLine",
109
109
  variant: "tertiary",
110
110
  class: "shrink-0",
111
- onClick: G
111
+ onClick: U
112
112
  }, null, 8, ["label"])]))], 512));
113
113
  }
114
114
  });
@@ -226,7 +226,7 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
226
226
  __name: "DealDetailSidebarGeneralInfo",
227
227
  props: { deal: {} },
228
228
  setup(a) {
229
- let N = a, P = useI18n(), F = useApiErrorToast(), L = useDealUpdateLanguageMutation(), R = useDealUpdateSourceMutation(), B = useDealUpdateOwnerMutation(), V = useSearch({ persistInUrl: !1 }), H = useUserIndexQuery({ params: { search: V.debouncedSearch } }), U = ref(N.deal.dealLanguage), W = ref(N.deal.dealSource), G = ref(N.deal.owner ? {
229
+ let N = a, P = useI18n(), F = useApiErrorToast(), I = useDealUpdateLanguageMutation(), L = useDealUpdateSourceMutation(), B = useDealUpdateOwnerMutation(), V = useSearch({ persistInUrl: !1 }), H = useUserIndexQuery({ params: { search: V.debouncedSearch } }), U = ref(N.deal.dealLanguage), W = ref(N.deal.dealSource), G = ref(N.deal.owner ? {
230
230
  uuid: N.deal.owner.uuid,
231
231
  name: N.deal.owner.name
232
232
  } : null), K = computed(() => H.data.value?.data.map((a) => ({
@@ -245,7 +245,7 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
245
245
  }
246
246
  async function Z(a) {
247
247
  if (U.value = a, a !== null) try {
248
- await L.execute({
248
+ await I.execute({
249
249
  body: { dealLanguage: a },
250
250
  params: { dealUuid: N.deal.uuid }
251
251
  });
@@ -255,7 +255,7 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
255
255
  }
256
256
  async function Q(a) {
257
257
  if (W.value = a, a !== null) try {
258
- await R.execute({
258
+ await L.execute({
259
259
  body: { dealSource: a },
260
260
  params: { dealUuid: N.deal.uuid }
261
261
  });
@@ -297,7 +297,7 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
297
297
  label: unref(P).t("wise_crm.deal.form.fields.language"),
298
298
  placeholder: unref(P).t("wise_crm.deal.form.fields.language_placeholder"),
299
299
  "display-fn": q,
300
- "is-loading": unref(L).isLoading.value
300
+ "is-loading": unref(I).isLoading.value
301
301
  }, {
302
302
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(SdkContentLocale)), (a) => (openBlock(), createBlock(unref(VcSelectItem), {
303
303
  key: a,
@@ -319,7 +319,7 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
319
319
  "display-fn": J,
320
320
  label: unref(P).t("wise_crm.deal.form.fields.source"),
321
321
  placeholder: unref(P).t("wise_crm.deal.form.fields.source_placeholder"),
322
- "is-loading": unref(R).isLoading.value
322
+ "is-loading": unref(L).isLoading.value
323
323
  }, {
324
324
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(DealSource)), (a) => (openBlock(), createBlock(unref(VcSelectItem), {
325
325
  key: a,
@@ -361,8 +361,8 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
361
361
  props: { form: {} },
362
362
  emits: ["createNewContactPerson"],
363
363
  setup(a, { emit: N }) {
364
- let P = a, F = N, I = useI18n(), L = P.form.register("email"), V = P.form.register("phone"), H = P.form.register("mobile"), W = P.form.register("existingContactPerson");
365
- function K() {
364
+ let P = a, F = N, R = useI18n(), V = P.form.register("email"), H = P.form.register("phone"), U = P.form.register("mobile"), W = P.form.register("existingContactPerson");
365
+ function G() {
366
366
  F("createNewContactPerson");
367
367
  }
368
368
  return (a, N) => (openBlock(), createBlock(AppForm_default, {
@@ -371,19 +371,19 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
371
371
  }, {
372
372
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
373
373
  default: withCtx(() => [createVNode(IndividualAutocomplete_default, {
374
- label: unref(I).t("wise_crm.contact.create_dialog.form.fields.contact_person"),
374
+ label: unref(R).t("wise_crm.contact.create_dialog.form.fields.contact_person"),
375
375
  "model-value": unref(W).modelValue.value,
376
376
  class: "col-span-2",
377
377
  "onUpdate:modelValue": unref(W).setValue,
378
- onCreateNew: K
378
+ onCreateNew: G
379
379
  }, null, 8, [
380
380
  "label",
381
381
  "model-value",
382
382
  "onUpdate:modelValue"
383
383
  ]), createVNode(ContactPersonFormContactField_default, {
384
- email: unref(L),
385
- "mobile-phone": unref(H),
386
- phone: unref(V)
384
+ email: unref(V),
385
+ "mobile-phone": unref(U),
386
+ phone: unref(H)
387
387
  }, null, 8, [
388
388
  "email",
389
389
  "mobile-phone",
@@ -393,7 +393,7 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
393
393
  }), createVNode(AppSidebarFormFooter_default, null, {
394
394
  default: withCtx(() => [createVNode(AppSidebarFormSubmitButton_default, {
395
395
  "is-loading": P.form.isSubmitting.value,
396
- label: unref(I).t("wise_crm.shared.add"),
396
+ label: unref(R).t("wise_crm.shared.add"),
397
397
  class: "col-span-2"
398
398
  }, null, 8, ["is-loading", "label"])]),
399
399
  _: 1
@@ -405,8 +405,8 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
405
405
  __name: "DealContactPersonCreateNewForm",
406
406
  props: { form: {} },
407
407
  setup(a) {
408
- let N = a, P = N.form.register("firstName"), F = N.form.register("lastName"), I = N.form.register("email"), L = N.form.register("mobilePhone"), R = N.form.register("phone");
409
- return (a, B) => (openBlock(), createBlock(AppForm_default, {
408
+ let N = a, P = N.form.register("firstName"), F = N.form.register("lastName"), I = N.form.register("email"), R = N.form.register("mobilePhone"), B = N.form.register("phone");
409
+ return (a, V) => (openBlock(), createBlock(AppForm_default, {
410
410
  form: N.form,
411
411
  class: "pb-xl flex h-full flex-col justify-between"
412
412
  }, {
@@ -418,8 +418,8 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
418
418
  }, null, 8, ["first-name", "last-name"]),
419
419
  createVNode(ContactPersonFormContactField_default, {
420
420
  email: unref(I),
421
- "mobile-phone": unref(L),
422
- phone: unref(R)
421
+ "mobile-phone": unref(R),
422
+ phone: unref(B)
423
423
  }, null, 8, [
424
424
  "email",
425
425
  "mobile-phone",
@@ -461,18 +461,18 @@ var DealContactPersonCreateDialog_default = /* @__PURE__ */ defineComponent({
461
461
  },
462
462
  emits: ["close", "createNewContactPerson"],
463
463
  setup(a, { emit: N }) {
464
- let P = a, F = N, L = useI18n(), V = useApiErrorToast(), H = useDealLinkContactPersonMutation(), U = useContactPersonCreateMutation(), W = ref(P.isCreatingNewContactPerson), G = useForm({
464
+ let P = a, F = N, L = useI18n(), R = useApiErrorToast(), V = useDealLinkContactPersonMutation(), H = useContactPersonCreateMutation(), U = ref(P.isCreatingNewContactPerson), W = useForm({
465
465
  schema: dealContactPersonCreateFormSchema,
466
466
  onSubmit: async (a) => {
467
467
  try {
468
- let N = await U.execute({ body: {
468
+ let N = await H.execute({ body: {
469
469
  email: a.email,
470
470
  firstName: a.firstName,
471
471
  lastName: a.lastName,
472
472
  mobilePhone: a.mobilePhone,
473
473
  phone: a.phone
474
474
  } });
475
- P.isCreatingNewContactPerson || await H.execute({
475
+ P.isCreatingNewContactPerson || await V.execute({
476
476
  body: {
477
477
  contactPersonUuid: N,
478
478
  contactInfo: {
@@ -482,41 +482,41 @@ var DealContactPersonCreateDialog_default = /* @__PURE__ */ defineComponent({
482
482
  }
483
483
  },
484
484
  params: { dealUuid: P.dealUuid }
485
- }), Y({
485
+ }), J({
486
486
  label: `${a.firstName} ${a.lastName}`,
487
487
  value: N
488
488
  });
489
489
  } catch (a) {
490
- V.show(a);
490
+ R.show(a);
491
491
  }
492
492
  }
493
- }), K = useForm({
493
+ }), G = useForm({
494
494
  schema: dealContactPersonCreateExistingFormSchema,
495
495
  onSubmit: async (a) => {
496
- await J(a.existingContactPerson.value, {
496
+ await q(a.existingContactPerson.value, {
497
497
  email: a.email,
498
498
  mobilePhone: a.mobile,
499
499
  phone: a.phone
500
500
  });
501
501
  }
502
502
  });
503
- function q() {
504
- W.value = !0;
503
+ function K() {
504
+ U.value = !0;
505
505
  }
506
- async function J(a, N) {
506
+ async function q(a, N) {
507
507
  if (a !== null) try {
508
- await H.execute({
508
+ await V.execute({
509
509
  body: {
510
510
  contactPersonUuid: a,
511
511
  contactInfo: N
512
512
  },
513
513
  params: { dealUuid: P.dealUuid }
514
- }), Y();
514
+ }), J();
515
515
  } catch (a) {
516
- V.show(a);
516
+ R.show(a);
517
517
  }
518
518
  }
519
- function Y(a) {
519
+ function J(a) {
520
520
  if (a === void 0) {
521
521
  F("close");
522
522
  return;
@@ -526,15 +526,15 @@ var DealContactPersonCreateDialog_default = /* @__PURE__ */ defineComponent({
526
526
  return (a, N) => (openBlock(), createBlock(AppDialog_default, {
527
527
  title: unref(L).t("wise_crm.info_dialog.contact_person_create.title"),
528
528
  description: unref(L).t("wise_crm.info_dialog.contact_person_create.description"),
529
- onClose: Y
529
+ onClose: J
530
530
  }, {
531
- default: withCtx(() => [W.value ? (openBlock(), createBlock(DealContactPersonCreateNewForm_default, {
531
+ default: withCtx(() => [U.value ? (openBlock(), createBlock(DealContactPersonCreateNewForm_default, {
532
532
  key: 0,
533
- form: unref(G)
533
+ form: unref(W)
534
534
  }, {
535
535
  actions: withCtx(() => [createVNode(AppSidebarFormFooter_default, null, {
536
536
  default: withCtx(() => [createVNode(AppSidebarFormSubmitButton_default, {
537
- "is-loading": unref(G).isSubmitting.value,
537
+ "is-loading": unref(W).isSubmitting.value,
538
538
  label: unref(L).t("wise_crm.shared.create")
539
539
  }, null, 8, ["is-loading", "label"])]),
540
540
  _: 1
@@ -542,8 +542,8 @@ var DealContactPersonCreateDialog_default = /* @__PURE__ */ defineComponent({
542
542
  _: 1
543
543
  }, 8, ["form"])) : (openBlock(), createBlock(DealContactPersonCreateExistingForm_default, {
544
544
  key: 1,
545
- form: unref(K),
546
- onCreateNewContactPerson: q
545
+ form: unref(G),
546
+ onCreateNewContactPerson: K
547
547
  }, null, 8, ["form"]))]),
548
548
  _: 1
549
549
  }, 8, ["title", "description"]));
@@ -602,7 +602,7 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
602
602
  onSubmit: async (a) => {
603
603
  await N.onSubmit(a);
604
604
  }
605
- }), I = F.register("firstName"), L = F.register("lastName"), V = F.register("email"), H = F.register("mobilePhone"), W = F.register("phone");
605
+ }), R = F.register("firstName"), V = F.register("lastName"), H = F.register("email"), U = F.register("mobilePhone"), W = F.register("phone");
606
606
  return (a, N) => (openBlock(), createBlock(AppForm_default, {
607
607
  form: unref(F),
608
608
  class: "flex h-full flex-col justify-between"
@@ -610,12 +610,12 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
610
610
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
611
611
  default: withCtx(() => [
612
612
  createVNode(ContactPersonFormNameField_default, {
613
- "first-name": unref(I),
614
- "last-name": unref(L)
613
+ "first-name": unref(R),
614
+ "last-name": unref(V)
615
615
  }, null, 8, ["first-name", "last-name"]),
616
616
  createVNode(ContactPersonFormContactField_default, {
617
- email: unref(V),
618
- "mobile-phone": unref(H),
617
+ email: unref(H),
618
+ "mobile-phone": unref(U),
619
619
  phone: unref(W)
620
620
  }, null, 8, [
621
621
  "email",
@@ -643,10 +643,10 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
643
643
  },
644
644
  emits: ["close"],
645
645
  setup(a, { emit: N }) {
646
- let P = a, F = N, L = useI18n(), R = useApiErrorToast(), B = useDealContactPersonUpdateMutation(), V = useDealContactPersonDetailQuery(computed(() => P.dealUuid), computed(() => P.contactPersonUuid));
647
- async function H(a) {
646
+ let P = a, F = N, I = useI18n(), L = useApiErrorToast(), R = useDealContactPersonUpdateMutation(), B = useDealContactPersonDetailQuery(computed(() => P.dealUuid), computed(() => P.contactPersonUuid));
647
+ async function V(a) {
648
648
  try {
649
- await B.execute({
649
+ await R.execute({
650
650
  body: { form: a },
651
651
  params: {
652
652
  contactPersonUuid: P.contactPersonUuid,
@@ -654,22 +654,22 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
654
654
  }
655
655
  }), F("close");
656
656
  } catch (a) {
657
- R.show(a);
657
+ L.show(a);
658
658
  }
659
659
  }
660
- function U() {
660
+ function H() {
661
661
  F("close");
662
662
  }
663
663
  return (a, N) => (openBlock(), createBlock(AppDialog_default, {
664
- title: unref(L).t("wise_crm.info_dialog.contact_person_update.title"),
665
- description: unref(L).t("wise_crm.info_dialog.contact_person_create.description"),
666
- onClose: U
664
+ title: unref(I).t("wise_crm.info_dialog.contact_person_update.title"),
665
+ description: unref(I).t("wise_crm.info_dialog.contact_person_create.description"),
666
+ onClose: H
667
667
  }, {
668
- default: withCtx(() => [unref(V).data.value ? (openBlock(), createBlock(DealContactPersonUpdateForm_default, {
668
+ default: withCtx(() => [unref(B).data.value ? (openBlock(), createBlock(DealContactPersonUpdateForm_default, {
669
669
  key: 0,
670
- "on-submit": H,
671
- "contact-person": unref(V).data.value,
672
- onClose: U
670
+ "on-submit": V,
671
+ "contact-person": unref(B).data.value,
672
+ onClose: H
673
673
  }, null, 8, ["contact-person"])) : createCommentVNode("", !0)]),
674
674
  _: 1
675
675
  }, 8, ["title", "description"]));
@@ -678,19 +678,19 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
678
678
  __name: "DealDetailSidebarOverviewContent",
679
679
  props: { deal: {} },
680
680
  setup(a) {
681
- let N = a, P = useI18n(), F = useApiErrorToast(), L = useDealSetPrimaryContactPersonMutation(), R = useDealUnlinkContactPersonMutation(), B = useDialog(DealContactPersonCreateDialog_default), V = useDialog(DealContactPersonUpdateDialog_default), H = computed(() => N.deal.contactPersons.length > 0);
682
- function U() {
683
- B.open({ dealUuid: N.deal.uuid });
681
+ let N = a, P = useI18n(), F = useApiErrorToast(), I = useDealSetPrimaryContactPersonMutation(), L = useDealUnlinkContactPersonMutation(), R = useDialog(DealContactPersonCreateDialog_default), B = useDialog(DealContactPersonUpdateDialog_default), V = computed(() => N.deal.contactPersons.length > 0);
682
+ function H() {
683
+ R.open({ dealUuid: N.deal.uuid });
684
684
  }
685
- function W(a) {
686
- V.open({
685
+ function U(a) {
686
+ B.open({
687
687
  contactPersonUuid: a,
688
688
  dealUuid: N.deal.uuid
689
689
  });
690
690
  }
691
- async function G(a) {
691
+ async function W(a) {
692
692
  try {
693
- await R.execute({
693
+ await L.execute({
694
694
  body: { contactPersonUuid: a },
695
695
  params: { dealUuid: N.deal.uuid }
696
696
  });
@@ -698,8 +698,8 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
698
698
  F.show(a);
699
699
  }
700
700
  }
701
- function K(a) {
702
- L.execute({ params: {
701
+ function G(a) {
702
+ I.execute({ params: {
703
703
  contactPersonUuid: a,
704
704
  dealUuid: N.deal.uuid
705
705
  } });
@@ -713,18 +713,18 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
713
713
  default: withCtx(() => [createVNode(DealDetailSidebarGeneralInfo_default, { deal: N.deal }, null, 8, ["deal"])]),
714
714
  _: 1
715
715
  }, 8, ["label"]), createVNode(CrmDetailSidebarAccordionItem_default, {
716
- "is-empty": !H.value,
716
+ "is-empty": !V.value,
717
717
  label: unref(P).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
718
718
  value: "contact-persons",
719
719
  icon: "userCircle",
720
- onAdd: U
720
+ onAdd: H
721
721
  }, {
722
- actions: withCtx(() => [H.value ? createCommentVNode("", !0) : (openBlock(), createBlock(CrmDetailSidebarAccordionHeaderIconButton_default, {
722
+ actions: withCtx(() => [V.value ? createCommentVNode("", !0) : (openBlock(), createBlock(CrmDetailSidebarAccordionHeaderIconButton_default, {
723
723
  key: 0,
724
724
  label: unref(P).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
725
725
  class: "z-1",
726
726
  icon: "plus",
727
- onClick: U
727
+ onClick: H
728
728
  }, null, 8, ["label"]))]),
729
729
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(N.deal.contactPersons, (a) => (openBlock(), createBlock(unref(Motion), {
730
730
  key: a.uuid,
@@ -732,10 +732,10 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
732
732
  }, {
733
733
  default: withCtx(() => [createVNode(CrmDetailSidebarAccordionGenericContactPersonInfo_default, {
734
734
  "contact-person": a,
735
- "on-toggle-is-primary": () => K(a.uuid),
735
+ "on-toggle-is-primary": () => G(a.uuid),
736
736
  description: a.phone,
737
- onUpdate: (N) => W(a.uuid),
738
- onDelete: (N) => G(a.uuid)
737
+ onUpdate: (N) => U(a.uuid),
738
+ onDelete: (N) => W(a.uuid)
739
739
  }, null, 8, [
740
740
  "contact-person",
741
741
  "on-toggle-is-primary",
@@ -744,12 +744,12 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
744
744
  "onDelete"
745
745
  ])]),
746
746
  _: 2
747
- }, 1032, ["layout-id"]))), 128)), H.value ? (openBlock(), createBlock(unref(VcButton), {
747
+ }, 1032, ["layout-id"]))), 128)), V.value ? (openBlock(), createBlock(unref(VcButton), {
748
748
  key: 0,
749
749
  variant: "tertiary",
750
750
  size: "sm",
751
751
  "icon-left": "plus",
752
- onClick: U
752
+ onClick: H
753
753
  }, {
754
754
  default: withCtx(() => [createTextVNode(toDisplayString(unref(P).t("wise_crm.shared.add")), 1)]),
755
755
  _: 1
@@ -783,7 +783,7 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
783
783
  }),
784
784
  emits: ["update:modelValue"],
785
785
  setup(a) {
786
- let N = a, F = useI18n(), L = useCrmConfig(), R = useDialog(DealSendMailDialog_default), B = useModel(a, "modelValue"), V = useApiErrorToast(), H = useDealTransitionMutation(), U = useBoardColumnsTransitionQuery(computed(() => B.value.toColumnUuid), computed(() => L.getOptions().deals?.allowedTransitionTriggerTypes ?? [])), W = computed(() => (U.data.value ?? []).flatMap((a) => a.triggers.length === 0 ? [a] : a.triggers.map((N) => ({
786
+ let P = a, I = useI18n(), L = useCrmConfig(), R = useDialog(DealSendMailDialog_default), B = useModel(a, "modelValue"), V = useApiErrorToast(), H = useDealTransitionMutation(), U = useBoardColumnsTransitionQuery(computed(() => B.value.toColumnUuid), computed(() => L.getOptions().deals?.allowedTransitionTriggerTypes ?? [])), W = computed(() => (U.data.value ?? []).flatMap((a) => a.triggers.length === 0 ? [a] : a.triggers.map((N) => ({
787
787
  ...a,
788
788
  toColumnDisplayName: a.toColumnDisplayName,
789
789
  triggers: [N]
@@ -795,10 +795,10 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
795
795
  if (a.triggers.length !== 0) {
796
796
  if (a.triggers[0]?.triggerType === BoardColumnTransitionTriggerType.EMAIL) {
797
797
  R.open({
798
- dealUuid: N.deal.uuid,
798
+ dealUuid: P.deal.uuid,
799
799
  client: {
800
- uuid: N.deal.client.uuid,
801
- type: N.deal.client.type
800
+ uuid: P.deal.client.uuid,
801
+ type: P.deal.client.type
802
802
  },
803
803
  templateKey: a.triggers[0].config.mailTemplateKey
804
804
  });
@@ -807,14 +807,14 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
807
807
  try {
808
808
  B.value = a, await H.execute({
809
809
  body: { toBoardColumnUuid: a.toColumnUuid },
810
- params: { dealUuid: N.deal.uuid }
810
+ params: { dealUuid: P.deal.uuid }
811
811
  });
812
812
  } catch (a) {
813
813
  V.show(a);
814
814
  }
815
815
  }
816
816
  }
817
- return (a, N) => (openBlock(), createBlock(AppColorProvider_default, { color: B.value?.toColumnColor ?? null }, {
817
+ return (a, P) => (openBlock(), createBlock(AppColorProvider_default, { color: B.value?.toColumnColor ?? null }, {
818
818
  default: withCtx(() => [W.value.length === 0 ? (openBlock(), createBlock(unref(VcBadge), {
819
819
  key: 0,
820
820
  "class-config": { root: "text-nowrap" },
@@ -835,8 +835,8 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
835
835
  iconRight: "size-3 text-brand-700",
836
836
  loader: "text-brand-700 size-3"
837
837
  },
838
- placeholder: unref(F).t("wise_crm.deal.transition.placeholder"),
839
- label: unref(F).t("wise_crm.deal.transition.label"),
838
+ placeholder: unref(I).t("wise_crm.deal.transition.placeholder"),
839
+ label: unref(I).t("wise_crm.deal.transition.label"),
840
840
  "onUpdate:modelValue": K
841
841
  }, {
842
842
  label: withCtx(() => [createVNode(unref(VcFormFieldLabel), { class: "sr-only" })]),
@@ -852,7 +852,7 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
852
852
  }, {
853
853
  default: withCtx(() => [createVNode(AppGroup_default, null, {
854
854
  default: withCtx(() => [createVNode(AppColorProvider_default, { color: a.toColumnColor }, {
855
- default: withCtx(() => [...N[0] ||= [createElementVNode("div", { class: "bg-brand-100 border-brand-400 size-3 rounded-full border" }, null, -1)]]),
855
+ default: withCtx(() => [...P[0] ||= [createElementVNode("div", { class: "bg-brand-100 border-brand-400 size-3 rounded-full border" }, null, -1)]]),
856
856
  _: 1
857
857
  }, 8, ["color"]), createElementVNode("span", null, toDisplayString(a.toColumnDisplayName), 1)]),
858
858
  _: 2
@@ -872,43 +872,43 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
872
872
  });
873
873
  function useNoteDealCreateMutation() {
874
874
  return ze({
875
- queryFn: async ({ body: N, params: P }) => await NoteService.create(N, { dealUuid: P.dealUuid }),
875
+ queryFn: async ({ body: a, params: N }) => await NoteService.create(a, { dealUuid: N.dealUuid }),
876
876
  queryKeysToInvalidate: { noteDealIndex: {} }
877
877
  });
878
878
  }
879
- function useNoteDealIndexQuery(N, P) {
879
+ function useNoteDealIndexQuery(a, N) {
880
880
  return useKeysetInfiniteQuery({
881
- queryFn: (P) => NoteService.getDealNotes({ pagination: P }, N.value),
882
- queryKey: { noteDealIndex: { params: P?.params } }
881
+ queryFn: (N) => NoteService.getDealNotes({ pagination: N }, a.value),
882
+ queryKey: { noteDealIndex: { params: N?.params } }
883
883
  });
884
884
  }
885
885
  var DealDialogSidebarNotesContent_default = /* @__PURE__ */ defineComponent({
886
886
  __name: "DealDialogSidebarNotesContent",
887
887
  props: { deal: {} },
888
- setup(a) {
889
- let N = a, P = useDialog(NoteUpdateDialog_default), F = useApiErrorToast(), R = useNoteDealCreateMutation(), B = useNoteDeleteMutation(), H = useNoteDealIndexQuery(computed(() => N.deal.uuid)), U = computed(() => H.data?.value?.data ?? []);
888
+ setup(N) {
889
+ let F = N, I = useDialog(NoteUpdateDialog_default), L = useApiErrorToast(), R = useNoteDealCreateMutation(), B = useNoteDeleteMutation(), V = useNoteDealIndexQuery(computed(() => F.deal.uuid)), U = computed(() => V.data?.value?.data ?? []);
890
890
  async function W(a) {
891
891
  await R.execute({
892
892
  body: a,
893
- params: { dealUuid: N.deal.uuid }
893
+ params: { dealUuid: F.deal.uuid }
894
894
  });
895
895
  }
896
896
  async function G(a) {
897
897
  try {
898
898
  await B.execute({ params: { noteUuid: a } });
899
899
  } catch (a) {
900
- F.show(a);
900
+ L.show(a);
901
901
  }
902
902
  }
903
903
  function K(a) {
904
- P.open({ note: a });
904
+ I.open({ note: a });
905
905
  }
906
906
  return (a, N) => (openBlock(), createBlock(CrmDetailSidebarNotesView_default, {
907
- "is-loading": unref(H).isLoading.value,
907
+ "is-loading": unref(V).isLoading.value,
908
908
  notes: U.value,
909
909
  "on-submit": W,
910
- "has-next-page": unref(H).hasNextPage.value,
911
- onNext: N[0] ||= (a) => unref(H).fetchNextPage(),
910
+ "has-next-page": unref(V).hasNextPage.value,
911
+ onNext: N[0] ||= (a) => unref(V).fetchNextPage(),
912
912
  onDelete: G,
913
913
  onUpdate: K
914
914
  }, null, 8, [
@@ -1,5 +1,5 @@
1
1
  import { s as ZonedDateTimeTransformer } from "./AppSkeletonLoader-BAhoOmFD.js";
2
- import { et as viewMailIndexV1, o as createMailV1, vt as MimeType } from "./client-CpsHjr8V.js";
2
+ import { $ as viewMailIndexV1, _t as MimeType, o as createMailV1 } from "./client-S6BLV3Ct.js";
3
3
  import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BSi1g3Lh.js";
4
4
  import { createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
5
5
  import { VcIcon, VcIconButton } from "@wisemen/vue-core-components";