@wisemen/wise-crm-web 0.2.0 → 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 (97) hide show
  1. package/README.md +1037 -0
  2. package/dist/BusinessDetailSidebarProvider-BQMRbGHQ.js +2083 -0
  3. package/dist/{BusinessDetailView-DvhFfuGg.js → BusinessDetailView-BxGxWOme.js} +5 -5
  4. package/dist/{CrmDetailHeaderCard-e5332OkQ.js → CrmDetailHeaderCard-CCNJpMAK.js} +68 -67
  5. package/dist/{CrmDetailView-C-lsAhtD.js → CrmDetailView-ozCpuaX2.js} +14 -14
  6. package/dist/{DealCommunicationTabView-e7NkRy9r.js → DealCommunicationTabView-Df5EeolN.js} +2 -2
  7. package/dist/{DealDetailView-BDCbOBoo.js → DealDetailView-DdWHqaBr.js} +163 -163
  8. package/dist/{DealExternalAttachment-D1PznE3V.js → DealExternalAttachment-qHdh4yMI.js} +1 -1
  9. package/dist/{DealSendMailDialog-DVE2iYQC.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-B7dX3hZ8.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/app/dialog/AppConfirmDialog.vue.d.ts +2 -2
  23. package/dist/components/crm-detail/CrmDetailHeaderCard.vue.d.ts +2 -0
  24. package/dist/components/crm-detail/CrmDetailSidebarAccordionContactPersonInfo.vue.d.ts +2 -2
  25. package/dist/components/crm-detail/CrmDetailSidebarAccordionGenericContactPersonInfo.vue.d.ts +2 -2
  26. package/dist/components/notes/NoteList.vue.d.ts +2 -2
  27. package/dist/deal/components/DealSendMailForm.vue.d.ts +2 -2
  28. package/dist/deal/components/DealSendMailFormFooter.vue.d.ts +1 -1
  29. package/dist/deal/components/DealSettingsDialogMailTemplateForm.vue.d.ts +2 -2
  30. package/dist/deal/components/DealSettingsDialogMailTemplateFormFields.vue.d.ts +2 -2
  31. package/dist/dialogs/contact-create/ContactCreateDialog.vue.d.ts +1 -1
  32. package/dist/dialogs/contact-create/components/ContactCreateDialogBusinessContactPersonSearch.vue.d.ts +2 -2
  33. package/dist/dialogs/contact-create/components/ContactCreateDialogBusinessGeneralInfo.vue.d.ts +2 -2
  34. package/dist/dialogs/contact-create/components/ContactCreateDialogFooter.vue.d.ts +2 -2
  35. package/dist/dialogs/contact-create/components/ContactCreateDialogFormSection.vue.d.ts +2 -2
  36. package/dist/dialogs/note/CrmDetailSidebarNotesView.vue.d.ts +2 -2
  37. package/dist/icons/LinkBrokenIcon.vue.d.ts +3 -0
  38. package/dist/icons/icon.d.ts +1 -0
  39. package/dist/index.d.ts +4 -0
  40. package/dist/index.js +448 -453
  41. package/dist/models/brand-colors/brandColor.model.d.ts +14 -0
  42. package/dist/models/brand-colors/brandColor.transformer.d.ts +5 -0
  43. package/dist/models/conent-locale/contentLocaleEnum.model.d.ts +3 -3
  44. package/dist/models/deal/create/dealCreateForm.model.d.ts +2 -2
  45. package/dist/models/deal/detail/dealDetail.model.d.ts +2 -2
  46. package/dist/models/deal/index/dealIndex.model.d.ts +2 -2
  47. package/dist/models/deal/update/dealUpdateForm.model.d.ts +2 -2
  48. package/dist/models/mail-template/detail/mailTemplateDetail.model.d.ts +2 -2
  49. package/dist/models/mail-template/update/mailTemplateUpdateForm.model.d.ts +3 -3
  50. package/dist/models/phone-number/phoneNumberForm.model.d.ts +3 -0
  51. package/dist/models/tenant-config/tenantConfig.model.d.ts +3 -0
  52. package/dist/plugins/i18n.plugin.d.ts +4 -0
  53. package/dist/style.css +1 -1
  54. package/dist/testing/factories/business.factory.d.ts +2 -1
  55. package/dist/testing.js +23 -2
  56. package/package.json +2 -1
  57. package/dist/BusinessDetailSidebarProvider-D11bjWFa.js +0 -2081
  58. package/dist/BusinessDetailSidebarProvider-DYY-Uzvx.js +0 -2081
  59. package/dist/BusinessDetailSidebarProvider-ZYGQoNHh.js +0 -2081
  60. package/dist/BusinessDetailView-BOCy7G-w.js +0 -24
  61. package/dist/BusinessDetailView-WaATSNQS.js +0 -24
  62. package/dist/CrmDetailHeaderCard-C-JNdi7s.js +0 -2515
  63. package/dist/CrmDetailHeaderCard-qkNK-2wR.js +0 -2515
  64. package/dist/CrmDetailView-C6Xm1Lp6.js +0 -65
  65. package/dist/CrmDetailView-DQehs8Fb.js +0 -65
  66. package/dist/DealDetailView-BfkDNvK4.js +0 -1021
  67. package/dist/DealDetailView-Cs5TDhih.js +0 -1021
  68. package/dist/DealSendMailDialog-D5Voyhhc.js +0 -1556
  69. package/dist/DealSendMailDialog-OAn6xjLq.js +0 -1556
  70. package/dist/Error-5vt6UD4m.js +0 -3708
  71. package/dist/Error-B4TwHEhb.js +0 -3706
  72. package/dist/Error-BPxDpKcI.js +0 -3706
  73. package/dist/IndividualDetailSidebarProvider-CvZQdjzp.js +0 -606
  74. package/dist/IndividualDetailSidebarProvider-DBITt-9W.js +0 -606
  75. package/dist/IndividualDetailSidebarProvider-vIu7Hv8O.js +0 -606
  76. package/dist/IndividualDetailView-B1vbJXGc.js +0 -24
  77. package/dist/IndividualDetailView-BKEs0XS5.js +0 -24
  78. /package/dist/{LinkExternalIcon-B9Qg55Oa.js → LinkExternalIcon-LOVtSqBT.js} +0 -0
  79. /package/dist/{LinkIcon-DCW5zjbQ.js → LinkIcon-DqBbVrvs.js} +0 -0
  80. /package/dist/{LocationPinIcon-DBc-wt2e.js → LocationPinIcon-Cp-wRgk2.js} +0 -0
  81. /package/dist/{MailIcon-Do4a7S2W.js → MailIcon-CnTrB1k3.js} +0 -0
  82. /package/dist/{MobilePhoneIcon-DSXyKwjd.js → MobilePhoneIcon-B747hmpS.js} +0 -0
  83. /package/dist/{NumberedListIcon-DUaSJSYu.js → NumberedListIcon-amJxDaaD.js} +0 -0
  84. /package/dist/{PhoneIcon-C8Cv1IiW.js → PhoneIcon-94MYVL85.js} +0 -0
  85. /package/dist/{RefreshIcon-CKZgHIZU.js → RefreshIcon-DRe3coBc.js} +0 -0
  86. /package/dist/{SendIcon-B-sQkQ3W.js → SendIcon-MYItp1xI.js} +0 -0
  87. /package/dist/{SettingsIcon-DzP-IQS5.js → SettingsIcon-C0qTAv0w.js} +0 -0
  88. /package/dist/{StarOutlineIcon-c0VfXRdQ.js → StarOutlineIcon-CiFLgepk.js} +0 -0
  89. /package/dist/{StarYellowIcon-CH0CnlSU.js → StarYellowIcon-C0v_XGwI.js} +0 -0
  90. /package/dist/{ThreeDotsIcon-C6PCFq5J.js → ThreeDotsIcon-lujOTU3G.js} +0 -0
  91. /package/dist/{TimeLineMarkerIcon-6B6SbwTN.js → TimeLineMarkerIcon-C4LfErbc.js} +0 -0
  92. /package/dist/{TrashIcon-BTPSVviz.js → TrashIcon-v4L9SEK_.js} +0 -0
  93. /package/dist/{UploadCloudIcon-1aMW5OJq.js → UploadCloudIcon-j1-1Rvqb.js} +0 -0
  94. /package/dist/{UserCircleIcon-D-19dc-2.js → UserCircleIcon-BjUt_2C4.js} +0 -0
  95. /package/dist/{UserIcon-D1H8TGlg.js → UserIcon-Cb2jFKLr.js} +0 -0
  96. /package/dist/{VerticalDotsIcon-DmPza4Jd.js → VerticalDotsIcon-Y3m6tlQ2.js} +0 -0
  97. /package/dist/{WalletIcon-BlI3D3v-.js → WalletIcon-pPsKbzmh.js} +0 -0
@@ -1,9 +1,9 @@
1
- import { A as useSearch, B as AppForm_default, E as useCrmConfig, I as NoteUpdateDialog_default, M as AppSidebarFormSubmitButton_default, N as AppSidebarFormFooter_default, O as AppColorProvider_default, Q as NoteService, R as CrmDetailSidebarNotesView_default, V as i18nPlugin, X as useKeysetInfiniteQuery, Z as useNoteDeleteMutation, a as AppOpenEntityButton_default, b as AppGlobalFormError_default, c as CrmDetailAccordionRoot_default, d as ContactPersonFormNameField_default, f as ContactPersonFormContactField_default, g as IndividualAutocomplete_default, 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, q as useApiErrorToast, r as CrmDetailSidebarTabs_default, s as CrmDetailSidebarAccordionItem_default, t as Error_default, tt as AppGrid_default, u as individualItemSchema, w as useCrm, z as toFormField } from "./Error-BPxDpKcI.js";
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-BArv9rNb.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 { ft as ContentLocale, gt as EntityType, lt as BoardColumnTransitionTriggerType, mt as DealSource } from "./client-BP13IBbl.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-DVE2iYQC.js";
5
- import "./DealExternalAttachment-D1PznE3V.js";
6
- import { t as CrmDetailView_default } from "./CrmDetailView-C-lsAhtD.js";
3
+ import { ht as EntityType, lt as BoardColumnTransitionTriggerType, pt as DealSource, yt as SdkContentLocale } from "./client-pCaNxE3C.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-BaYcWZP-.js";
5
+ import "./DealExternalAttachment-qHdh4yMI.js";
6
+ import { t as CrmDetailView_default } from "./CrmDetailView-ozCpuaX2.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,46 +55,46 @@ var _hoisted_1$3 = {
55
55
  __name: "DealDetailSidebarNameField",
56
56
  props: { deal: {} },
57
57
  setup(a) {
58
- let P = a, F = useI18n(), I = useApiErrorToast(), L = ref(!1), R = useTemplateRef("nameFieldContainerRef"), B = useDealUpdateNameMutation(), V = useForm({
58
+ let P = a, F = useI18n(), L = useApiErrorToast(), R = ref(!1), B = useTemplateRef("nameFieldContainerRef"), V = useDealUpdateNameMutation(), H = useForm({
59
59
  schema: z$1.object({ name: z$1.string().min(1) }),
60
60
  onSubmit: async (a) => {
61
61
  try {
62
- await B.execute({
62
+ await V.execute({
63
63
  body: { name: a.name },
64
64
  params: { dealUuid: P.deal.uuid }
65
65
  });
66
66
  } catch (a) {
67
- I.show(a);
67
+ L.show(a);
68
68
  } finally {
69
- L.value = !1;
69
+ R.value = !1;
70
70
  }
71
71
  }
72
- }), H = V.register("name", P.deal.name);
73
- async function U() {
74
- L.value = !0, await nextTick(), W();
72
+ }), W = H.register("name", P.deal.name);
73
+ async function G() {
74
+ R.value = !0, await nextTick(), K();
75
75
  }
76
- function W() {
77
- (R.value?.querySelector("input"))?.focus();
76
+ function K() {
77
+ (B.value?.querySelector("input"))?.focus();
78
78
  }
79
- function G() {
80
- if (!V.isDirty.value) {
81
- L.value = !1;
79
+ function q() {
80
+ if (!H.isDirty.value) {
81
+ R.value = !1;
82
82
  return;
83
83
  }
84
- V.submit();
84
+ H.submit();
85
85
  }
86
86
  return (a, I) => (openBlock(), createElementBlock("div", {
87
87
  ref_key: "nameFieldContainerRef",
88
- ref: R
89
- }, [L.value ? (openBlock(), createBlock(AppForm_default, {
88
+ ref: B
89
+ }, [R.value ? (openBlock(), createBlock(AppForm_default, {
90
90
  key: 0,
91
- form: unref(V)
91
+ form: unref(H)
92
92
  }, {
93
- default: withCtx(() => [createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(H)), {
93
+ default: withCtx(() => [createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(W)), {
94
94
  "class-config": { input: "text-xl font-bold" },
95
- "is-loading": unref(V).isSubmitting.value,
95
+ "is-loading": unref(H).isSubmitting.value,
96
96
  label: unref(F).t("wise_crm.deal.detail.sidebar.name_field.label"),
97
- onBlur: G
97
+ onBlur: q
98
98
  }), {
99
99
  label: withCtx(() => [createVNode(unref(VcFormFieldLabel), { class: "sr-only" })]),
100
100
  _: 1
@@ -108,7 +108,7 @@ var _hoisted_1$3 = {
108
108
  icon: "editWithLine",
109
109
  variant: "tertiary",
110
110
  class: "shrink-0",
111
- onClick: U
111
+ onClick: G
112
112
  }, null, 8, ["label"])]))], 512));
113
113
  }
114
114
  });
@@ -197,8 +197,8 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
197
197
  }, null, 8, ["label"]), createVNode(unref(VcDropdownMenuItem), {
198
198
  "is-destructive": !0,
199
199
  "is-disabled": P.contactPerson.isPrimary,
200
- label: unref(I).t("wise_crm.shared.delete"),
201
- icon: "trash",
200
+ label: unref(I).t("wise_crm.info_dialog.sidebar.overview.delete_contact_person"),
201
+ icon: "linkBroken",
202
202
  onSelect: B
203
203
  }, null, 8, ["is-disabled", "label"])]),
204
204
  _: 1
@@ -225,19 +225,19 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
225
225
  }), _hoisted_1$1 = { class: "p-lg" }, DealDetailSidebarGeneralInfo_default = /* @__PURE__ */ defineComponent({
226
226
  __name: "DealDetailSidebarGeneralInfo",
227
227
  props: { deal: {} },
228
- setup(N) {
229
- let P = N, F = useI18n(), I = useApiErrorToast(), L = useDealUpdateLanguageMutation(), R = useDealUpdateSourceMutation(), B = useDealUpdateOwnerMutation(), V = useSearch({ persistInUrl: !1 }), H = useUserIndexQuery({ params: { search: V.debouncedSearch } }), U = ref(P.deal.dealLanguage), W = ref(P.deal.dealSource), G = ref(P.deal.owner ? {
230
- uuid: P.deal.owner.uuid,
231
- name: P.deal.owner.name
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 ? {
230
+ uuid: N.deal.owner.uuid,
231
+ name: N.deal.owner.name
232
232
  } : null), K = computed(() => H.data.value?.data.map((a) => ({
233
233
  uuid: a.uuid,
234
234
  name: `${a.firstName} ${a.lastName}`
235
235
  })) ?? []);
236
236
  function q(a) {
237
- return F.t(ContentLocaleUtil.getI18nKey(a));
237
+ return P.t(ContentLocaleUtil.getI18nKey(a));
238
238
  }
239
239
  function J(a) {
240
- return F.t(DealSourceUtil.getI18nKey(a));
240
+ return P.t(DealSourceUtil.getI18nKey(a));
241
241
  }
242
242
  let Y = useDateTimeFormat();
243
243
  function X(a) {
@@ -247,38 +247,38 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
247
247
  if (U.value = a, a !== null) try {
248
248
  await L.execute({
249
249
  body: { dealLanguage: a },
250
- params: { dealUuid: P.deal.uuid }
250
+ params: { dealUuid: N.deal.uuid }
251
251
  });
252
252
  } catch (a) {
253
- I.show(a);
253
+ F.show(a);
254
254
  }
255
255
  }
256
256
  async function Q(a) {
257
257
  if (W.value = a, a !== null) try {
258
258
  await R.execute({
259
259
  body: { dealSource: a },
260
- params: { dealUuid: P.deal.uuid }
260
+ params: { dealUuid: N.deal.uuid }
261
261
  });
262
262
  } catch (a) {
263
- I.show(a);
263
+ F.show(a);
264
264
  }
265
265
  }
266
266
  async function $(a) {
267
267
  if (G.value = a, a !== null) try {
268
268
  await B.execute({
269
269
  body: { dealOwner: a },
270
- params: { dealUuid: P.deal.uuid }
270
+ params: { dealUuid: N.deal.uuid }
271
271
  });
272
272
  } catch (a) {
273
- I.show(a);
273
+ F.show(a);
274
274
  }
275
275
  }
276
- return (a, N) => (openBlock(), createElementBlock("div", null, [createVNode(CrmDetailSidebarCard_default, null, {
276
+ return (a, F) => (openBlock(), createElementBlock("div", null, [createVNode(CrmDetailSidebarCard_default, null, {
277
277
  default: withCtx(() => [createElementVNode("form", null, [createVNode(AppGrid_default, { cols: 1 }, {
278
278
  default: withCtx(() => [
279
279
  createVNode(unref(VcAutocomplete), {
280
280
  modelValue: G.value,
281
- "onUpdate:modelValue": [N[0] ||= (a) => G.value = a, $],
281
+ "onUpdate:modelValue": [F[0] ||= (a) => G.value = a, $],
282
282
  items: K.value,
283
283
  "display-fn": (a) => a.name,
284
284
  "is-loading": unref(H).isLoading.value || unref(B).isLoading.value,
@@ -293,13 +293,13 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
293
293
  ]),
294
294
  createVNode(unref(VcSelect), {
295
295
  modelValue: U.value,
296
- "onUpdate:modelValue": [N[1] ||= (a) => U.value = a, Z],
297
- label: unref(F).t("wise_crm.deal.form.fields.language"),
298
- placeholder: unref(F).t("wise_crm.deal.form.fields.language_placeholder"),
296
+ "onUpdate:modelValue": [F[1] ||= (a) => U.value = a, Z],
297
+ label: unref(P).t("wise_crm.deal.form.fields.language"),
298
+ placeholder: unref(P).t("wise_crm.deal.form.fields.language_placeholder"),
299
299
  "display-fn": q,
300
300
  "is-loading": unref(L).isLoading.value
301
301
  }, {
302
- default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(ContentLocale)), (a) => (openBlock(), createBlock(unref(VcSelectItem), {
302
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(SdkContentLocale)), (a) => (openBlock(), createBlock(unref(VcSelectItem), {
303
303
  key: a,
304
304
  value: a
305
305
  }, {
@@ -315,10 +315,10 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
315
315
  ]),
316
316
  createVNode(unref(VcSelect), {
317
317
  modelValue: W.value,
318
- "onUpdate:modelValue": [N[2] ||= (a) => W.value = a, Q],
318
+ "onUpdate:modelValue": [F[2] ||= (a) => W.value = a, Q],
319
319
  "display-fn": J,
320
- label: unref(F).t("wise_crm.deal.form.fields.source"),
321
- placeholder: unref(F).t("wise_crm.deal.form.fields.source_placeholder"),
320
+ label: unref(P).t("wise_crm.deal.form.fields.source"),
321
+ placeholder: unref(P).t("wise_crm.deal.form.fields.source_placeholder"),
322
322
  "is-loading": unref(R).isLoading.value
323
323
  }, {
324
324
  default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(DealSource)), (a) => (openBlock(), createBlock(unref(VcSelectItem), {
@@ -340,7 +340,7 @@ var _hoisted_1$2 = { class: "flex items-start justify-between" }, _hoisted_2$1 =
340
340
  })])]),
341
341
  _: 1
342
342
  }), createElementVNode("div", _hoisted_1$1, [createVNode(AppIconLabelPair_default, {
343
- label: unref(F).t("wise_crm.deal.sidebar.created_at", { date: unref(Y).toDate(P.deal.createdAt.toPlainDate()) }),
343
+ label: unref(P).t("wise_crm.deal.sidebar.created_at", { date: unref(Y).toDate(N.deal.createdAt.toPlainDate()) }),
344
344
  icon: "clockPlus",
345
345
  "text-color": "text-quaternary",
346
346
  class: "text-sm"
@@ -360,30 +360,30 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
360
360
  __name: "DealContactPersonCreateExistingForm",
361
361
  props: { form: {} },
362
362
  emits: ["createNewContactPerson"],
363
- setup(a, { emit: P }) {
364
- let F = a, R = P, B = useI18n(), V = F.form.register("email"), H = F.form.register("phone"), U = F.form.register("mobile"), W = F.form.register("existingContactPerson");
365
- function G() {
366
- R("createNewContactPerson");
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() {
366
+ F("createNewContactPerson");
367
367
  }
368
- return (a, P) => (openBlock(), createBlock(AppForm_default, {
369
- form: F.form,
368
+ return (a, N) => (openBlock(), createBlock(AppForm_default, {
369
+ form: P.form,
370
370
  class: "pb-xl flex h-full flex-1 flex-col justify-between"
371
371
  }, {
372
372
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
373
373
  default: withCtx(() => [createVNode(IndividualAutocomplete_default, {
374
- label: unref(B).t("wise_crm.contact.create_dialog.form.fields.contact_person"),
374
+ label: unref(I).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: G
378
+ onCreateNew: K
379
379
  }, null, 8, [
380
380
  "label",
381
381
  "model-value",
382
382
  "onUpdate:modelValue"
383
383
  ]), createVNode(ContactPersonFormContactField_default, {
384
- email: unref(V),
385
- "mobile-phone": unref(U),
386
- phone: unref(H)
384
+ email: unref(L),
385
+ "mobile-phone": unref(H),
386
+ phone: unref(V)
387
387
  }, null, 8, [
388
388
  "email",
389
389
  "mobile-phone",
@@ -392,8 +392,8 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
392
392
  _: 1
393
393
  }), createVNode(AppSidebarFormFooter_default, null, {
394
394
  default: withCtx(() => [createVNode(AppSidebarFormSubmitButton_default, {
395
- "is-loading": F.form.isSubmitting.value,
396
- label: unref(B).t("wise_crm.shared.add"),
395
+ "is-loading": P.form.isSubmitting.value,
396
+ label: unref(I).t("wise_crm.shared.add"),
397
397
  class: "col-span-2"
398
398
  }, null, 8, ["is-loading", "label"])]),
399
399
  _: 1
@@ -405,27 +405,27 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
405
405
  __name: "DealContactPersonCreateNewForm",
406
406
  props: { form: {} },
407
407
  setup(a) {
408
- let P = a, F = P.form.register("firstName"), I = P.form.register("lastName"), L = P.form.register("email"), R = P.form.register("mobilePhone"), B = P.form.register("phone");
409
- return (a, V) => (openBlock(), createBlock(AppForm_default, {
410
- form: P.form,
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, {
410
+ form: N.form,
411
411
  class: "pb-xl flex h-full flex-col justify-between"
412
412
  }, {
413
413
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
414
414
  default: withCtx(() => [
415
415
  createVNode(ContactPersonFormNameField_default, {
416
- "first-name": unref(F),
417
- "last-name": unref(I)
416
+ "first-name": unref(P),
417
+ "last-name": unref(F)
418
418
  }, null, 8, ["first-name", "last-name"]),
419
419
  createVNode(ContactPersonFormContactField_default, {
420
- email: unref(L),
421
- "mobile-phone": unref(R),
422
- phone: unref(B)
420
+ email: unref(I),
421
+ "mobile-phone": unref(L),
422
+ phone: unref(R)
423
423
  }, null, 8, [
424
424
  "email",
425
425
  "mobile-phone",
426
426
  "phone"
427
427
  ]),
428
- createVNode(AppGlobalFormError_default, { form: P.form }, null, 8, ["form"])
428
+ createVNode(AppGlobalFormError_default, { form: N.form }, null, 8, ["form"])
429
429
  ]),
430
430
  _: 1
431
431
  }), renderSlot(a.$slots, "actions")]),
@@ -436,14 +436,14 @@ var DealContactPersonCreateExistingForm_default = /* @__PURE__ */ defineComponen
436
436
  const dealContactPersonCreateExistingFormSchema = z$1.object({
437
437
  email: z$1.email().nullable(),
438
438
  existingContactPerson: individualItemSchema,
439
- mobile: z$1.string().nullable(),
440
- phone: z$1.string().nullable()
439
+ mobile: phoneNumberFormSchema.nullable(),
440
+ phone: phoneNumberFormSchema.nullable()
441
441
  }), dealContactPersonCreateFormSchema = z.object({
442
442
  email: z.email().min(1).nullable(),
443
443
  firstName: z.string().min(1),
444
444
  lastName: z.string().min(1),
445
- mobilePhone: z.string().min(1).nullable(),
446
- phone: z.string().min(1).nullable()
445
+ mobilePhone: phoneNumberFormSchema.nullable(),
446
+ phone: phoneNumberFormSchema.nullable()
447
447
  }).superRefine((a, N) => {
448
448
  a.email !== null && a.email !== "" || a.mobilePhone !== null && a.mobilePhone !== "" || a.phone !== null && a.phone !== "" || N.addIssue({
449
449
  code: z.ZodIssueCode.custom,
@@ -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, R = useI18n(), B = useApiErrorToast(), V = useDealLinkContactPersonMutation(), H = useContactPersonCreateMutation(), U = ref(P.isCreatingNewContactPerson), W = useForm({
464
+ let P = a, F = N, L = useI18n(), V = useApiErrorToast(), H = useDealLinkContactPersonMutation(), U = useContactPersonCreateMutation(), W = ref(P.isCreatingNewContactPerson), G = useForm({
465
465
  schema: dealContactPersonCreateFormSchema,
466
466
  onSubmit: async (a) => {
467
467
  try {
468
- let N = await H.execute({ body: {
468
+ let N = await U.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 V.execute({
475
+ P.isCreatingNewContactPerson || await H.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
- }), J({
485
+ }), Y({
486
486
  label: `${a.firstName} ${a.lastName}`,
487
487
  value: N
488
488
  });
489
489
  } catch (a) {
490
- B.show(a);
490
+ V.show(a);
491
491
  }
492
492
  }
493
- }), G = useForm({
493
+ }), K = useForm({
494
494
  schema: dealContactPersonCreateExistingFormSchema,
495
495
  onSubmit: async (a) => {
496
- await q(a.existingContactPerson.value, {
496
+ await J(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 K() {
504
- U.value = !0;
503
+ function q() {
504
+ W.value = !0;
505
505
  }
506
- async function q(a, N) {
506
+ async function J(a, N) {
507
507
  if (a !== null) try {
508
- await V.execute({
508
+ await H.execute({
509
509
  body: {
510
510
  contactPersonUuid: a,
511
511
  contactInfo: N
512
512
  },
513
513
  params: { dealUuid: P.dealUuid }
514
- }), J();
514
+ }), Y();
515
515
  } catch (a) {
516
- B.show(a);
516
+ V.show(a);
517
517
  }
518
518
  }
519
- function J(a) {
519
+ function Y(a) {
520
520
  if (a === void 0) {
521
521
  F("close");
522
522
  return;
@@ -524,26 +524,26 @@ var DealContactPersonCreateDialog_default = /* @__PURE__ */ defineComponent({
524
524
  F("createNewContactPerson", a), F("close");
525
525
  }
526
526
  return (a, N) => (openBlock(), createBlock(AppDialog_default, {
527
- title: unref(R).t("wise_crm.info_dialog.contact_person_create.title"),
528
- description: unref(R).t("wise_crm.info_dialog.contact_person_create.description"),
529
- onClose: J
527
+ title: unref(L).t("wise_crm.info_dialog.contact_person_create.title"),
528
+ description: unref(L).t("wise_crm.info_dialog.contact_person_create.description"),
529
+ onClose: Y
530
530
  }, {
531
- default: withCtx(() => [U.value ? (openBlock(), createBlock(DealContactPersonCreateNewForm_default, {
531
+ default: withCtx(() => [W.value ? (openBlock(), createBlock(DealContactPersonCreateNewForm_default, {
532
532
  key: 0,
533
- form: unref(W)
533
+ form: unref(G)
534
534
  }, {
535
535
  actions: withCtx(() => [createVNode(AppSidebarFormFooter_default, null, {
536
536
  default: withCtx(() => [createVNode(AppSidebarFormSubmitButton_default, {
537
- "is-loading": unref(W).isSubmitting.value,
538
- label: unref(R).t("wise_crm.shared.create")
537
+ "is-loading": unref(G).isSubmitting.value,
538
+ label: unref(L).t("wise_crm.shared.create")
539
539
  }, null, 8, ["is-loading", "label"])]),
540
540
  _: 1
541
541
  })]),
542
542
  _: 1
543
543
  }, 8, ["form"])) : (openBlock(), createBlock(DealContactPersonCreateExistingForm_default, {
544
544
  key: 1,
545
- form: unref(G),
546
- onCreateNewContactPerson: K
545
+ form: unref(K),
546
+ onCreateNewContactPerson: q
547
547
  }, null, 8, ["form"]))]),
548
548
  _: 1
549
549
  }, 8, ["title", "description"]));
@@ -575,8 +575,8 @@ const dealContactPersonUpdateFormSchema = z.object({
575
575
  email: z.email().min(1).nullable(),
576
576
  firstName: z.string().min(1),
577
577
  lastName: z.string().min(1),
578
- mobilePhone: z.string().min(1).nullable(),
579
- phone: z.string().min(1).nullable()
578
+ mobilePhone: phoneNumberFormSchema.nullable(),
579
+ phone: phoneNumberFormSchema.nullable()
580
580
  }).superRefine((a, N) => {
581
581
  a.email !== null && a.email !== "" || a.mobilePhone !== null && a.mobilePhone !== "" || a.phone !== null && a.phone !== "" || N.addIssue({
582
582
  code: z.ZodIssueCode.custom,
@@ -590,45 +590,45 @@ var DealContactPersonUpdateForm_default = /* @__PURE__ */ defineComponent({
590
590
  onSubmit: { type: Function }
591
591
  },
592
592
  setup(a) {
593
- let P = a, F = useI18n(), R = useForm({
593
+ let N = a, P = useI18n(), F = useForm({
594
594
  initialState: {
595
- email: P.contactPerson.email,
596
- firstName: P.contactPerson.firstName,
597
- lastName: P.contactPerson.lastName,
598
- mobilePhone: P.contactPerson.mobilePhone,
599
- phone: P.contactPerson.phone
595
+ email: N.contactPerson.email,
596
+ firstName: N.contactPerson.firstName,
597
+ lastName: N.contactPerson.lastName,
598
+ mobilePhone: N.contactPerson.mobilePhone,
599
+ phone: N.contactPerson.phone
600
600
  },
601
601
  schema: dealContactPersonUpdateFormSchema,
602
602
  onSubmit: async (a) => {
603
- await P.onSubmit(a);
603
+ await N.onSubmit(a);
604
604
  }
605
- }), B = R.register("firstName"), V = R.register("lastName"), H = R.register("email"), U = R.register("mobilePhone"), W = R.register("phone");
606
- return (a, P) => (openBlock(), createBlock(AppForm_default, {
607
- form: unref(R),
605
+ }), I = F.register("firstName"), L = F.register("lastName"), V = F.register("email"), H = F.register("mobilePhone"), W = F.register("phone");
606
+ return (a, N) => (openBlock(), createBlock(AppForm_default, {
607
+ form: unref(F),
608
608
  class: "flex h-full flex-col justify-between"
609
609
  }, {
610
610
  default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
611
611
  default: withCtx(() => [
612
612
  createVNode(ContactPersonFormNameField_default, {
613
- "first-name": unref(B),
614
- "last-name": unref(V)
613
+ "first-name": unref(I),
614
+ "last-name": unref(L)
615
615
  }, null, 8, ["first-name", "last-name"]),
616
616
  createVNode(ContactPersonFormContactField_default, {
617
- email: unref(H),
618
- "mobile-phone": unref(U),
617
+ email: unref(V),
618
+ "mobile-phone": unref(H),
619
619
  phone: unref(W)
620
620
  }, null, 8, [
621
621
  "email",
622
622
  "mobile-phone",
623
623
  "phone"
624
624
  ]),
625
- createVNode(AppGlobalFormError_default, { form: unref(R) }, null, 8, ["form"])
625
+ createVNode(AppGlobalFormError_default, { form: unref(F) }, null, 8, ["form"])
626
626
  ]),
627
627
  _: 1
628
628
  }), createVNode(AppSidebarFormFooter_default, null, {
629
629
  default: withCtx(() => [createVNode(AppSidebarFormSubmitButton_default, {
630
- "is-loading": unref(R).isSubmitting.value,
631
- label: unref(F).t("wise_crm.shared.save_changes")
630
+ "is-loading": unref(F).isSubmitting.value,
631
+ label: unref(P).t("wise_crm.shared.save_changes")
632
632
  }, null, 8, ["is-loading", "label"])]),
633
633
  _: 1
634
634
  })]),
@@ -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, I = useI18n(), L = useApiErrorToast(), R = useDealContactPersonUpdateMutation(), B = useDealContactPersonDetailQuery(computed(() => P.dealUuid), computed(() => P.contactPersonUuid));
647
- async function V(a) {
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) {
648
648
  try {
649
- await R.execute({
649
+ await B.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
- L.show(a);
657
+ R.show(a);
658
658
  }
659
659
  }
660
- function H() {
660
+ function U() {
661
661
  F("close");
662
662
  }
663
663
  return (a, N) => (openBlock(), createBlock(AppDialog_default, {
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
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
667
667
  }, {
668
- default: withCtx(() => [unref(B).data.value ? (openBlock(), createBlock(DealContactPersonUpdateForm_default, {
668
+ default: withCtx(() => [unref(V).data.value ? (openBlock(), createBlock(DealContactPersonUpdateForm_default, {
669
669
  key: 0,
670
- "on-submit": V,
671
- "contact-person": unref(B).data.value,
672
- onClose: H
670
+ "on-submit": H,
671
+ "contact-person": unref(V).data.value,
672
+ onClose: U
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(), 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 });
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 });
684
684
  }
685
- function U(a) {
686
- B.open({
685
+ function W(a) {
686
+ V.open({
687
687
  contactPersonUuid: a,
688
688
  dealUuid: N.deal.uuid
689
689
  });
690
690
  }
691
- async function W(a) {
691
+ async function G(a) {
692
692
  try {
693
- await L.execute({
693
+ await R.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 G(a) {
702
- I.execute({ params: {
701
+ function K(a) {
702
+ L.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": !V.value,
716
+ "is-empty": !H.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: H
720
+ onAdd: U
721
721
  }, {
722
- actions: withCtx(() => [V.value ? createCommentVNode("", !0) : (openBlock(), createBlock(CrmDetailSidebarAccordionHeaderIconButton_default, {
722
+ actions: withCtx(() => [H.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: H
727
+ onClick: U
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": () => G(a.uuid),
735
+ "on-toggle-is-primary": () => K(a.uuid),
736
736
  description: a.phone,
737
- onUpdate: (N) => U(a.uuid),
738
- onDelete: (N) => W(a.uuid)
737
+ onUpdate: (N) => W(a.uuid),
738
+ onDelete: (N) => G(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)), V.value ? (openBlock(), createBlock(unref(VcButton), {
747
+ }, 1032, ["layout-id"]))), 128)), H.value ? (openBlock(), createBlock(unref(VcButton), {
748
748
  key: 0,
749
749
  variant: "tertiary",
750
750
  size: "sm",
751
751
  "icon-left": "plus",
752
- onClick: H
752
+ onClick: U
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(), I = useCrmConfig(), L = useDialog(DealSendMailDialog_default), B = useModel(a, "modelValue"), V = useApiErrorToast(), H = useDealTransitionMutation(), U = useBoardColumnsTransitionQuery(computed(() => B.value.toColumnUuid), computed(() => I.getOptions().deals?.allowedTransitionTriggerTypes ?? [])), W = computed(() => (U.data.value ?? []).flatMap((a) => a.triggers.length === 0 ? [a] : a.triggers.map((N) => ({
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) => ({
787
787
  ...a,
788
788
  toColumnDisplayName: a.toColumnDisplayName,
789
789
  triggers: [N]
@@ -794,7 +794,7 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
794
794
  async function K(a) {
795
795
  if (a.triggers.length !== 0) {
796
796
  if (a.triggers[0]?.triggerType === BoardColumnTransitionTriggerType.EMAIL) {
797
- L.open({
797
+ R.open({
798
798
  dealUuid: N.deal.uuid,
799
799
  client: {
800
800
  uuid: N.deal.client.uuid,
@@ -872,43 +872,43 @@ var DealDetailSidebarTransitionSelect_default = /* @__PURE__ */ defineComponent(
872
872
  });
873
873
  function useNoteDealCreateMutation() {
874
874
  return ze({
875
- queryFn: async ({ body: a, params: N }) => await NoteService.create(a, { dealUuid: N.dealUuid }),
875
+ queryFn: async ({ body: N, params: P }) => await NoteService.create(N, { dealUuid: P.dealUuid }),
876
876
  queryKeysToInvalidate: { noteDealIndex: {} }
877
877
  });
878
878
  }
879
- function useNoteDealIndexQuery(a, N) {
879
+ function useNoteDealIndexQuery(N, P) {
880
880
  return useKeysetInfiniteQuery({
881
- queryFn: (N) => NoteService.getDealNotes({ pagination: N }, a.value),
882
- queryKey: { noteDealIndex: { params: N?.params } }
881
+ queryFn: (P) => NoteService.getDealNotes({ pagination: P }, N.value),
882
+ queryKey: { noteDealIndex: { params: P?.params } }
883
883
  });
884
884
  }
885
885
  var DealDialogSidebarNotesContent_default = /* @__PURE__ */ defineComponent({
886
886
  __name: "DealDialogSidebarNotesContent",
887
887
  props: { deal: {} },
888
888
  setup(a) {
889
- let N = a, P = useDialog(NoteUpdateDialog_default), I = useApiErrorToast(), L = useNoteDealCreateMutation(), R = useNoteDeleteMutation(), B = useNoteDealIndexQuery(computed(() => N.deal.uuid)), H = computed(() => B.data?.value?.data ?? []);
890
- async function U(a) {
891
- await L.execute({
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 ?? []);
890
+ async function W(a) {
891
+ await R.execute({
892
892
  body: a,
893
893
  params: { dealUuid: N.deal.uuid }
894
894
  });
895
895
  }
896
896
  async function G(a) {
897
897
  try {
898
- await R.execute({ params: { noteUuid: a } });
898
+ await B.execute({ params: { noteUuid: a } });
899
899
  } catch (a) {
900
- I.show(a);
900
+ F.show(a);
901
901
  }
902
902
  }
903
903
  function K(a) {
904
904
  P.open({ note: a });
905
905
  }
906
906
  return (a, N) => (openBlock(), createBlock(CrmDetailSidebarNotesView_default, {
907
- "is-loading": unref(B).isLoading.value,
908
- notes: H.value,
909
- "on-submit": U,
910
- "has-next-page": unref(B).hasNextPage.value,
911
- onNext: N[0] ||= (a) => unref(B).fetchNextPage(),
907
+ "is-loading": unref(H).isLoading.value,
908
+ notes: U.value,
909
+ "on-submit": W,
910
+ "has-next-page": unref(H).hasNextPage.value,
911
+ onNext: N[0] ||= (a) => unref(H).fetchNextPage(),
912
912
  onDelete: G,
913
913
  onUpdate: K
914
914
  }, null, 8, [