@wisemen/wise-crm-web 2.0.0-alpha.11 → 2.0.0-alpha.13

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,13 +1,13 @@
1
- import { defineComponent as x, ref as M, useTemplateRef as xe, openBlock as d, createElementBlock as V, createBlock as g, unref as e, withCtx as r, createVNode as l, mergeProps as E, createElementVNode as F, toDisplayString as j, nextTick as Ie, computed as w, createCommentVNode as N, Fragment as W, createTextVNode as ne, renderList as Ne, useModel as Se, mergeModels as Fe } from "vue";
1
+ import { defineComponent as x, ref as M, useTemplateRef as xe, openBlock as d, createElementBlock as V, createBlock as g, unref as e, withCtx as i, createVNode as l, mergeProps as q, createElementVNode as F, toDisplayString as R, nextTick as Ie, computed as C, createCommentVNode as S, Fragment as ee, createTextVNode as le, renderList as Ne, useModel as Se, mergeModels as Fe } from "vue";
2
2
  import { useRouteParams as ke } from "@vueuse/router";
3
3
  import { useI18n as I } from "vue-i18n";
4
- import { aX as ce, b1 as $e, b3 as Te, b6 as Me } from "./uuid.util-CaePLXHv.js";
5
- import { _ as Ve } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-BF8hf6cf.js";
6
- import { c as k, d as q, e as Le, E as de, C as me, f as qe, h as Ee, i as Oe, j as Qe, k as K, g as Ae, J as Be, l as Ke, n as le, o as je, I as ze, p as pe, q as Q, r as Re, s as fe, t as Ge, v as Xe, U as Ye, w as Ze, u as He, x as Je, Q as We, y as ea, z as aa, B as ta, F as oe, G as _e, H as na, K as ie, L as la, N as oa, O as ia, P as ra, R as sa, S as ge, T as ua, V as ca, W as da, X as ma, Y as pa, Z as fa, $ as _a, a0 as ga, a1 as ba, a2 as ya, a3 as va, A as ha } from "./index-CZFDtbuz.js";
7
- import { UITextField as z, toFormField as O, UIIconButton as be, UIDropdownMenu as Ua, UIDropdownMenuGroup as Ca, UIDropdownMenuItem as re, UIPhoneNumberField as se, UIFormLayout as ee, UIFormFieldGroup as A, UIFormFieldGrid as B, useToast as wa, UIFormDialog as ye, UIDialogHeader as ve, UIForm as ue, UIDialogBody as X, UIDialogFooter as Y, UIDialogFooterSubmit as Z, createAutocompleteOptions as Pa, createSelectOptions as H, UIAutocomplete as Da, UISelect as J, useOverlay as ae, UIButton as xa, UIBadge as he } from "@wisemen/vue-core-design-system";
8
- import { useForm as R } from "formango";
9
- import G, { z as S } from "zod";
10
- import { useMutation as T, useQuery as Ue, useOffsetInfiniteQuery as Ia, useKeysetInfiniteQuery as Na } from "@wisemen/vue-core-api-utils";
4
+ import { aZ as de, b3 as $e, b5 as Te, b8 as Me } from "./uuid.util-90e4mXv8.js";
5
+ import { _ as Ve } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-DVQiT3Dp.js";
6
+ import { c as k, d as E, e as Le, E as me, C as pe, f as Ee, h as qe, i as Oe, j as Qe, k as j, g as Ae, J as Be, l as Ke, n as oe, o as je, I as Re, p as fe, q as Q, r as ze, s as _e, t as Ge, v as Ze, U as Ye, w as He, u as Je, x as Xe, Q as We, y as ea, z as aa, B as ta, F as re, G as ge, H as na, K as ie, L as la, N as oa, O as ra, P as ia, R as sa, S as be, T as ua, V as ca, W as da, X as ma, Y as pa, Z as fa, $ as _a, a0 as ga, a1 as ba, a2 as ya, a3 as va, A as ha } from "./index-xck90fnP.js";
7
+ import { UITextField as z, toFormField as O, UIIconButton as ye, UIDropdownMenu as Ua, UIDropdownMenuGroup as wa, UIDropdownMenuItem as se, UIPhoneNumberField as ue, UIFormLayout as ae, UIFormFieldGroup as A, UIFormFieldGrid as B, useToast as Ca, UIFormDialog as ve, UIDialogHeader as he, UIForm as ce, UIDialogBody as Y, UIDialogFooter as H, UIDialogFooterSubmit as J, createAutocompleteOptions as Pa, createSelectOptions as X, UIAutocomplete as Da, UISelect as W, useOverlay as te, UIButton as xa, UIBadge as Ue } from "@wisemen/vue-core-design-system";
8
+ import { useForm as G } from "formango";
9
+ import Z, { z as N } from "zod";
10
+ import { useMutation as T, useQuery as we, useOffsetInfiniteQuery as Ia, useKeysetInfiniteQuery as Na } from "@wisemen/vue-core-api-utils";
11
11
  import { Motion as Sa } from "motion-v";
12
12
  import { useQueryClient as Fa, useMutation as ka } from "@tanstack/vue-query";
13
13
  function $a() {
@@ -77,15 +77,15 @@ function Va() {
77
77
  const La = {
78
78
  key: 1,
79
79
  class: "flex justify-between"
80
- }, qa = { class: "text-xl font-bold text-primary" }, Ea = /* @__PURE__ */ x({
80
+ }, Ea = { class: "text-xl font-bold text-primary" }, qa = /* @__PURE__ */ x({
81
81
  __name: "DealDetailSidebarNameField",
82
82
  props: {
83
83
  deal: {}
84
84
  },
85
85
  setup(t) {
86
- const a = t, n = I(), i = q(), o = M(!1), s = xe("nameFieldContainerRef"), p = Va(), f = R({
87
- schema: G.object({
88
- name: G.string().min(1)
86
+ const a = t, n = I(), r = E(), o = M(!1), s = xe("nameFieldContainerRef"), p = Va(), f = G({
87
+ schema: Z.object({
88
+ name: Z.string().min(1)
89
89
  }),
90
90
  onSubmit: async (_) => {
91
91
  try {
@@ -98,7 +98,7 @@ const La = {
98
98
  }
99
99
  });
100
100
  } catch (b) {
101
- i.show(b);
101
+ r.show(b);
102
102
  } finally {
103
103
  o.value = !1;
104
104
  }
@@ -127,8 +127,8 @@ const La = {
127
127
  key: 0,
128
128
  form: e(f)
129
129
  }, {
130
- default: r(() => [
131
- l(e(z), E(e(O)(e(m)), {
130
+ default: i(() => [
131
+ l(e(z), q(e(O)(e(m)), {
132
132
  "is-loading": e(f).isSubmitting.value,
133
133
  label: e(n).t("wise_crm.deal.detail.sidebar.name_field.label"),
134
134
  class: "[&_input]:text-xl [&_input]:font-bold",
@@ -141,10 +141,10 @@ const La = {
141
141
  ]),
142
142
  _: 1
143
143
  }, 8, ["form"])) : (d(), V("div", La, [
144
- F("h2", qa, j(a.deal.name), 1),
145
- l(e(be), {
144
+ F("h2", Ea, R(a.deal.name), 1),
145
+ l(e(ye), {
146
146
  label: e(n).t("wise_crm.deal.detail.sidebar.name_field.edit_label"),
147
- icon: e(de),
147
+ icon: e(me),
148
148
  variant: "tertiary",
149
149
  class: "shrink-0",
150
150
  onClick: u
@@ -155,12 +155,12 @@ const La = {
155
155
  });
156
156
  function Oa() {
157
157
  const t = Fa(), a = "dealDetail", n = ka({
158
- mutationFn: async (i) => {
159
- const o = await k.setPrimaryContactPerson(i.dealUuid, i.contactPersonUuid);
158
+ mutationFn: async (r) => {
159
+ const o = await k.setPrimaryContactPerson(r.dealUuid, r.contactPersonUuid);
160
160
  if (o.isErr())
161
161
  throw o.error;
162
162
  },
163
- onError: (i, o, s) => {
163
+ onError: (r, o, s) => {
164
164
  t.setQueryData(
165
165
  [
166
166
  a,
@@ -171,12 +171,12 @@ function Oa() {
171
171
  s?.previousData
172
172
  );
173
173
  },
174
- onMutate: async (i) => {
174
+ onMutate: async (r) => {
175
175
  await t.cancelQueries({
176
176
  queryKey: [
177
177
  a,
178
178
  {
179
- dealUuid: i.dealUuid
179
+ dealUuid: r.dealUuid
180
180
  }
181
181
  ]
182
182
  });
@@ -184,7 +184,7 @@ function Oa() {
184
184
  [
185
185
  a,
186
186
  {
187
- dealUuid: i.dealUuid
187
+ dealUuid: r.dealUuid
188
188
  }
189
189
  ]
190
190
  );
@@ -192,21 +192,21 @@ function Oa() {
192
192
  [
193
193
  a,
194
194
  {
195
- dealUuid: i.dealUuid
195
+ dealUuid: r.dealUuid
196
196
  }
197
197
  ],
198
198
  o.map((s) => ({
199
199
  ...s,
200
200
  contactPersons: s.contactPersons.map((p) => ({
201
201
  ...p,
202
- isPrimary: p.uuid === i.contactPersonUuid
202
+ isPrimary: p.uuid === r.contactPersonUuid
203
203
  }))
204
204
  }))
205
205
  ), {
206
206
  previousData: o
207
207
  });
208
208
  },
209
- onSettled: (i, o, s) => {
209
+ onSettled: (r, o, s) => {
210
210
  s !== void 0 && t.invalidateQueries({
211
211
  queryKey: [
212
212
  a,
@@ -218,9 +218,9 @@ function Oa() {
218
218
  }
219
219
  });
220
220
  return {
221
- isLoading: w(() => n.isPending.value),
222
- data: w(() => n.data.value),
223
- execute: async (i) => await n.mutateAsync(i.params)
221
+ isLoading: C(() => n.isPending.value),
222
+ data: C(() => n.data.value),
223
+ execute: async (r) => await n.mutateAsync(r.params)
224
224
  };
225
225
  }
226
226
  function Qa() {
@@ -240,7 +240,7 @@ function Qa() {
240
240
  const Aa = { class: "flex items-start justify-between" }, Ba = { class: "flex flex-col items-start" }, Ka = {
241
241
  key: 1,
242
242
  class: "mt-sm text-brand-700"
243
- }, ja = { class: "-mt-2 -mr-2 flex items-center justify-end" }, za = { class: "grid gap-lg" }, Ra = /* @__PURE__ */ x({
243
+ }, ja = { class: "-mt-2 -mr-2 flex items-center justify-end" }, Ra = { class: "grid gap-lg" }, za = /* @__PURE__ */ x({
244
244
  __name: "CrmDetailSidebarAccordionGenericContactPersonInfo",
245
245
  props: {
246
246
  contactPerson: {},
@@ -249,9 +249,9 @@ const Aa = { class: "flex items-start justify-between" }, Ba = { class: "flex fl
249
249
  },
250
250
  emits: ["delete", "update"],
251
251
  setup(t, { emit: a }) {
252
- const n = t, i = a, o = I(), s = n.contactPerson.uuid ?? n.contactPerson.contactPersonUuid, p = {
252
+ const n = t, r = a, o = I(), s = n.contactPerson.uuid ?? n.contactPerson.contactPersonUuid, p = {
253
253
  left: {
254
- icon: de,
254
+ icon: me,
255
255
  type: "icon"
256
256
  }
257
257
  }, f = {
@@ -261,50 +261,50 @@ const Aa = { class: "flex items-start justify-between" }, Ba = { class: "flex fl
261
261
  }
262
262
  };
263
263
  function m() {
264
- i("update");
264
+ r("update");
265
265
  }
266
266
  function u() {
267
- i("delete");
267
+ r("delete");
268
268
  }
269
269
  function y() {
270
270
  n.onToggleIsPrimary();
271
271
  }
272
- return (v, _) => (d(), g(me, { class: "flex flex-col gap-lg" }, {
273
- default: r(() => [
272
+ return (v, _) => (d(), g(pe, { class: "flex flex-col gap-lg" }, {
273
+ default: i(() => [
274
274
  F("div", Aa, [
275
275
  F("div", Ba, [
276
- e(s) ? (d(), g(qe, {
276
+ e(s) ? (d(), g(Ee, {
277
277
  key: 0,
278
278
  label: `${n.contactPerson.firstName} ${n.contactPerson.lastName}`,
279
- "entity-type": e(ce).INDIVIDUAL,
279
+ "entity-type": e(de).INDIVIDUAL,
280
280
  uuid: e(s),
281
281
  class: "-m-xs"
282
- }, null, 8, ["label", "entity-type", "uuid"])) : N("", !0),
283
- n.description ? (d(), V("p", Ka, j(n.description), 1)) : N("", !0)
282
+ }, null, 8, ["label", "entity-type", "uuid"])) : S("", !0),
283
+ n.description ? (d(), V("p", Ka, R(n.description), 1)) : S("", !0)
284
284
  ]),
285
285
  F("div", ja, [
286
- l(Ee, {
286
+ l(qe, {
287
287
  "is-active": n.contactPerson.isPrimary,
288
288
  onClick: y
289
289
  }, null, 8, ["is-active"]),
290
290
  l(e(Ua), { "popover-align": "end" }, {
291
- trigger: r(() => [
292
- l(e(be), {
291
+ trigger: i(() => [
292
+ l(e(ye), {
293
293
  icon: e(Qe),
294
294
  variant: "tertiary",
295
295
  size: "sm",
296
296
  label: "actionMenu"
297
297
  }, null, 8, ["icon"])
298
298
  ]),
299
- content: r(() => [
300
- l(e(Ca), null, {
301
- default: r(() => [
302
- l(e(re), {
299
+ content: i(() => [
300
+ l(e(wa), null, {
301
+ default: i(() => [
302
+ l(e(se), {
303
303
  config: p,
304
304
  label: e(o).t("wise_crm.info_dialog.sidebar.overview.update_contact_person"),
305
305
  onSelect: m
306
306
  }, null, 8, ["label"]),
307
- l(e(re), {
307
+ l(e(se), {
308
308
  "is-destructive": !0,
309
309
  "is-disabled": n.contactPerson.isPrimary,
310
310
  config: f,
@@ -319,22 +319,22 @@ const Aa = { class: "flex items-start justify-between" }, Ba = { class: "flex fl
319
319
  })
320
320
  ])
321
321
  ]),
322
- F("div", za, [
323
- n.contactPerson.email !== null ? (d(), g(K, {
322
+ F("div", Ra, [
323
+ n.contactPerson.email !== null ? (d(), g(j, {
324
324
  key: 0,
325
325
  label: n.contactPerson.email,
326
326
  icon: e(Ae)
327
- }, null, 8, ["label", "icon"])) : N("", !0),
328
- n.contactPerson.mobilePhone !== null ? (d(), g(K, {
327
+ }, null, 8, ["label", "icon"])) : S("", !0),
328
+ n.contactPerson.mobilePhone !== null ? (d(), g(j, {
329
329
  key: 1,
330
330
  label: n.contactPerson.mobilePhone,
331
331
  icon: e(Be)
332
- }, null, 8, ["label", "icon"])) : N("", !0),
333
- n.contactPerson.phone !== null ? (d(), g(K, {
332
+ }, null, 8, ["label", "icon"])) : S("", !0),
333
+ n.contactPerson.phone !== null ? (d(), g(j, {
334
334
  key: 2,
335
335
  label: n.contactPerson.phone,
336
336
  icon: e(Ke)
337
- }, null, 8, ["label", "icon"])) : N("", !0)
337
+ }, null, 8, ["label", "icon"])) : S("", !0)
338
338
  ])
339
339
  ]),
340
340
  _: 1
@@ -359,7 +359,7 @@ function Ga() {
359
359
  }
360
360
  });
361
361
  }
362
- const te = /* @__PURE__ */ x({
362
+ const ne = /* @__PURE__ */ x({
363
363
  __name: "ContactPersonFormContactField",
364
364
  props: {
365
365
  email: {},
@@ -368,57 +368,57 @@ const te = /* @__PURE__ */ x({
368
368
  },
369
369
  setup(t) {
370
370
  const a = t, n = I();
371
- return (i, o) => (d(), V(W, null, [
372
- l(e(z), E(e(O)(a.email), {
371
+ return (r, o) => (d(), V(ee, null, [
372
+ l(e(z), q(e(O)(a.email), {
373
373
  label: e(n).t("wise_crm.contact.create_dialog.form.fields.email"),
374
374
  placeholder: e(n).t("wise_crm.contact.create_dialog.form.fields.email"),
375
375
  class: "col-span-2"
376
376
  }), null, 16, ["label", "placeholder"]),
377
- l(le, { class: "col-span-2" }, {
378
- default: r(() => [
379
- ne(j(e(n).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
377
+ l(oe, { class: "col-span-2" }, {
378
+ default: i(() => [
379
+ le(R(e(n).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
380
380
  ]),
381
381
  _: 1
382
382
  }),
383
- l(e(se), E(e(O)(a.mobilePhone), {
383
+ l(e(ue), q(e(O)(a.mobilePhone), {
384
384
  label: e(n).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
385
385
  placeholder: e(n).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
386
386
  class: "col-span-2"
387
387
  }), null, 16, ["label", "placeholder"]),
388
- l(le, { class: "col-span-2" }, {
389
- default: r(() => [
390
- ne(j(e(n).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
388
+ l(oe, { class: "col-span-2" }, {
389
+ default: i(() => [
390
+ le(R(e(n).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
391
391
  ]),
392
392
  _: 1
393
393
  }),
394
- l(e(se), E(e(O)(a.phone), {
394
+ l(e(ue), q(e(O)(a.phone), {
395
395
  label: e(n).t("wise_crm.contact.create_dialog.form.fields.phone"),
396
396
  placeholder: e(n).t("wise_crm.contact.create_dialog.form.fields.phone"),
397
397
  class: "col-span-2"
398
398
  }), null, 16, ["label", "placeholder"])
399
399
  ], 64));
400
400
  }
401
- }), Xa = /* @__PURE__ */ x({
401
+ }), Za = /* @__PURE__ */ x({
402
402
  __name: "DealContactPersonCreateExistingForm",
403
403
  props: {
404
404
  form: {}
405
405
  },
406
406
  emits: ["createNewContactPerson"],
407
407
  setup(t, { emit: a }) {
408
- const n = t, i = a, o = I(), s = n.form.register("email"), p = n.form.register("phone"), f = n.form.register("mobile"), m = n.form.register("existingContactPerson"), u = M(null);
408
+ const n = t, r = a, o = I(), s = n.form.register("email"), p = n.form.register("phone"), f = n.form.register("mobile"), m = n.form.register("existingContactPerson"), u = M(null);
409
409
  async function y(v) {
410
410
  if (u.value = v, m.setValue(v?.uuid ?? null), v === null)
411
411
  return;
412
- const _ = await ze.getByUuid(v.uuid);
412
+ const _ = await Re.getByUuid(v.uuid);
413
413
  if (_.isErr())
414
414
  return;
415
415
  const b = _.value;
416
416
  s.setValue(b.email), p.setValue(b.phone), f.setValue(b.mobilePhone);
417
417
  }
418
- return (v, _) => (d(), g(e(ee), null, {
419
- default: r(() => [
418
+ return (v, _) => (d(), g(e(ae), null, {
419
+ default: i(() => [
420
420
  l(e(A), null, {
421
- default: r(() => [
421
+ default: i(() => [
422
422
  l(je, {
423
423
  modelValue: u.value,
424
424
  "onUpdate:modelValue": [
@@ -426,20 +426,20 @@ const te = /* @__PURE__ */ x({
426
426
  y
427
427
  ],
428
428
  label: e(o).t("wise_crm.contact.create_dialog.form.fields.contact_person"),
429
- onCreateNew: _[1] || (_[1] = (b) => i("createNewContactPerson"))
429
+ onCreateNew: _[1] || (_[1] = (b) => r("createNewContactPerson"))
430
430
  }, null, 8, ["modelValue", "label"])
431
431
  ]),
432
432
  _: 1
433
433
  }),
434
434
  l(e(A), null, {
435
- default: r(() => [
435
+ default: i(() => [
436
436
  l(e(B), {
437
437
  sm: 1,
438
438
  lg: 1,
439
439
  variant: "card"
440
440
  }, {
441
- default: r(() => [
442
- l(te, {
441
+ default: i(() => [
442
+ l(ne, {
443
443
  email: e(s),
444
444
  "mobile-phone": e(f),
445
445
  phone: e(p)
@@ -462,12 +462,12 @@ const te = /* @__PURE__ */ x({
462
462
  },
463
463
  setup(t) {
464
464
  const a = t, n = I();
465
- return (i, o) => (d(), V(W, null, [
466
- l(e(z), E(e(O)(a.firstName), {
465
+ return (r, o) => (d(), V(ee, null, [
466
+ l(e(z), q(e(O)(a.firstName), {
467
467
  label: e(n).t("wise_crm.contact.create_dialog.form.fields.first_name"),
468
468
  placeholder: e(n).t("wise_crm.contact.create_dialog.form.fields.first_name")
469
469
  }), null, 16, ["label", "placeholder"]),
470
- l(e(z), E(e(O)(a.lastName), {
470
+ l(e(z), q(e(O)(a.lastName), {
471
471
  label: e(n).t("wise_crm.contact.create_dialog.form.fields.last_name"),
472
472
  placeholder: e(n).t("wise_crm.contact.create_dialog.form.fields.last_name")
473
473
  }), null, 16, ["label", "placeholder"])
@@ -479,19 +479,19 @@ const te = /* @__PURE__ */ x({
479
479
  form: {}
480
480
  },
481
481
  setup(t) {
482
- const a = t, n = a.form.register("firstName"), i = a.form.register("lastName"), o = a.form.register("email"), s = a.form.register("mobilePhone"), p = a.form.register("phone");
483
- return (f, m) => (d(), g(e(ee), null, {
484
- default: r(() => [
482
+ const a = t, n = a.form.register("firstName"), r = a.form.register("lastName"), o = a.form.register("email"), s = a.form.register("mobilePhone"), p = a.form.register("phone");
483
+ return (f, m) => (d(), g(e(ae), null, {
484
+ default: i(() => [
485
485
  l(e(A), null, {
486
- default: r(() => [
486
+ default: i(() => [
487
487
  l(e(B), {
488
488
  sm: 1,
489
489
  lg: 2
490
490
  }, {
491
- default: r(() => [
491
+ default: i(() => [
492
492
  l(Ce, {
493
493
  "first-name": e(n),
494
- "last-name": e(i)
494
+ "last-name": e(r)
495
495
  }, null, 8, ["first-name", "last-name"])
496
496
  ]),
497
497
  _: 1
@@ -500,14 +500,14 @@ const te = /* @__PURE__ */ x({
500
500
  _: 1
501
501
  }),
502
502
  l(e(A), null, {
503
- default: r(() => [
503
+ default: i(() => [
504
504
  l(e(B), {
505
505
  sm: 1,
506
506
  lg: 1,
507
507
  variant: "card"
508
508
  }, {
509
- default: r(() => [
510
- l(te, {
509
+ default: i(() => [
510
+ l(ne, {
511
511
  email: e(o),
512
512
  "mobile-phone": e(s),
513
513
  phone: e(p)
@@ -515,7 +515,7 @@ const te = /* @__PURE__ */ x({
515
515
  ]),
516
516
  _: 1
517
517
  }),
518
- l(pe, {
518
+ l(fe, {
519
519
  form: a.form
520
520
  }, null, 8, ["form"])
521
521
  ]),
@@ -525,23 +525,23 @@ const te = /* @__PURE__ */ x({
525
525
  _: 1
526
526
  }));
527
527
  }
528
- }), Za = G.object({
529
- email: G.email().nullable(),
530
- existingContactPerson: Re.nullable(),
528
+ }), Ha = Z.object({
529
+ email: Z.email().nullable(),
530
+ existingContactPerson: ze.nullable(),
531
531
  mobile: Q.nullable(),
532
532
  phone: Q.nullable()
533
- }), Ha = S.object({
534
- email: S.email().min(1).nullable(),
535
- firstName: S.string().min(1),
536
- lastName: S.string().min(1),
533
+ }), Ja = N.object({
534
+ email: N.literal("").or(N.email()).nullable(),
535
+ firstName: N.string().min(1),
536
+ lastName: N.string().min(1),
537
537
  mobilePhone: Q.nullable(),
538
538
  phone: Q.nullable()
539
539
  }).superRefine((t, a) => {
540
540
  t.email !== null && t.email !== "" || t.mobilePhone !== null && t.mobilePhone !== "" || t.phone !== null && t.phone !== "" || a.addIssue({
541
- code: S.ZodIssueCode.custom,
542
- message: fe.global.t("wise_crm.form.errors.at_least_one")
541
+ code: N.ZodIssueCode.custom,
542
+ message: _e.global.t("wise_crm.form.errors.at_least_one")
543
543
  });
544
- }), Ja = /* @__PURE__ */ x({
544
+ }), Xa = /* @__PURE__ */ x({
545
545
  __name: "DealContactPersonCreateDialog",
546
546
  props: {
547
547
  dealUuid: {},
@@ -549,8 +549,8 @@ const te = /* @__PURE__ */ x({
549
549
  },
550
550
  emits: ["close", "createNewContactPerson"],
551
551
  setup(t, { emit: a }) {
552
- const n = t, i = a, o = I(), s = q(), p = wa(), f = Ga(), m = Ge(), u = M(n.isCreatingNewContactPerson), y = R({
553
- schema: Ha,
552
+ const n = t, r = a, o = I(), s = E(), p = Ca(), f = Ga(), m = Ge(), u = M(n.isCreatingNewContactPerson), y = G({
553
+ schema: Ja,
554
554
  onSubmit: async (c) => {
555
555
  try {
556
556
  const P = await m.execute({
@@ -567,19 +567,26 @@ const te = /* @__PURE__ */ x({
567
567
  return;
568
568
  }
569
569
  const $ = P.value;
570
- n.isCreatingNewContactPerson || await f.execute({
571
- body: {
572
- contactPersonUuid: $,
573
- contactInfo: {
574
- email: c.email,
575
- mobilePhone: c.mobilePhone,
576
- phone: c.phone
570
+ if (!n.isCreatingNewContactPerson) {
571
+ const K = await f.execute({
572
+ body: {
573
+ contactPersonUuid: $,
574
+ contactInfo: {
575
+ email: c.email,
576
+ mobilePhone: c.mobilePhone,
577
+ phone: c.phone
578
+ }
579
+ },
580
+ params: {
581
+ dealUuid: n.dealUuid
577
582
  }
578
- },
579
- params: {
580
- dealUuid: n.dealUuid
583
+ });
584
+ if (K.isErr()) {
585
+ s.show(K.error);
586
+ return;
581
587
  }
582
- }), C({
588
+ }
589
+ w({
583
590
  label: `${c.firstName} ${c.lastName}`,
584
591
  value: $
585
592
  });
@@ -590,8 +597,8 @@ const te = /* @__PURE__ */ x({
590
597
  onSubmitError: () => {
591
598
  p.unableToSave();
592
599
  }
593
- }), v = R({
594
- schema: Za,
600
+ }), v = G({
601
+ schema: Ha,
595
602
  onSubmit: async (c) => {
596
603
  await h(
597
604
  c.existingContactPerson,
@@ -605,7 +612,7 @@ const te = /* @__PURE__ */ x({
605
612
  onSubmitError: () => {
606
613
  p.unableToSave();
607
614
  }
608
- }), _ = w(
615
+ }), _ = C(
609
616
  () => u.value ? y : v
610
617
  );
611
618
  function b() {
@@ -622,44 +629,44 @@ const te = /* @__PURE__ */ x({
622
629
  params: {
623
630
  dealUuid: n.dealUuid
624
631
  }
625
- }), C();
632
+ }), w();
626
633
  } catch ($) {
627
634
  s.show($);
628
635
  }
629
636
  }
630
- function C(c) {
637
+ function w(c) {
631
638
  if (c === void 0) {
632
- i("close");
639
+ r("close");
633
640
  return;
634
641
  }
635
- i("createNewContactPerson", c), i("close");
642
+ r("createNewContactPerson", c), r("close");
636
643
  }
637
- return (c, P) => (d(), g(e(ye), {
644
+ return (c, P) => (d(), g(e(ve), {
638
645
  form: _.value,
639
646
  size: "md",
640
647
  "render-own-form-component": "",
641
- onClose: C
648
+ onClose: w
642
649
  }, {
643
- default: r(() => [
644
- l(e(ve), {
650
+ default: i(() => [
651
+ l(e(he), {
645
652
  title: e(o).t("wise_crm.info_dialog.contact_person_create.title"),
646
653
  description: e(o).t("wise_crm.info_dialog.contact_person_create.description")
647
654
  }, null, 8, ["title", "description"]),
648
- u.value ? (d(), g(e(ue), {
655
+ u.value ? (d(), g(e(ce), {
649
656
  key: 0,
650
657
  form: e(y),
651
658
  "prompt-on-unsaved-changes": !1
652
659
  }, {
653
- default: r(() => [
654
- l(e(X), null, {
655
- default: r(() => [
660
+ default: i(() => [
661
+ l(e(Y), null, {
662
+ default: i(() => [
656
663
  l(Ya, { form: e(y) }, null, 8, ["form"])
657
664
  ]),
658
665
  _: 1
659
666
  }),
660
- l(e(Y), null, {
661
- right: r(() => [
662
- l(e(Z), {
667
+ l(e(H), null, {
668
+ right: i(() => [
669
+ l(e(J), {
663
670
  "is-loading": e(y).isSubmitting.value,
664
671
  label: e(o).t("wise_crm.shared.create")
665
672
  }, null, 8, ["is-loading", "label"])
@@ -668,24 +675,24 @@ const te = /* @__PURE__ */ x({
668
675
  })
669
676
  ]),
670
677
  _: 1
671
- }, 8, ["form"])) : (d(), g(e(ue), {
678
+ }, 8, ["form"])) : (d(), g(e(ce), {
672
679
  key: 1,
673
680
  form: e(v),
674
681
  "prompt-on-unsaved-changes": !1
675
682
  }, {
676
- default: r(() => [
677
- l(e(X), null, {
678
- default: r(() => [
679
- l(Xa, {
683
+ default: i(() => [
684
+ l(e(Y), null, {
685
+ default: i(() => [
686
+ l(Za, {
680
687
  form: e(v),
681
688
  onCreateNewContactPerson: b
682
689
  }, null, 8, ["form"])
683
690
  ]),
684
691
  _: 1
685
692
  }),
686
- l(e(Y), null, {
687
- right: r(() => [
688
- l(e(Z), {
693
+ l(e(H), null, {
694
+ right: i(() => [
695
+ l(e(J), {
689
696
  "is-loading": e(v).isSubmitting.value,
690
697
  label: e(o).t("wise_crm.shared.create")
691
698
  }, null, 8, ["is-loading", "label"])
@@ -719,7 +726,7 @@ function Wa() {
719
726
  });
720
727
  }
721
728
  function et(t, a) {
722
- return Ue("dealContactPersonDetail", {
729
+ return we("dealContactPersonDetail", {
723
730
  params: {
724
731
  contactPersonUuid: a,
725
732
  dealUuid: t
@@ -727,16 +734,16 @@ function et(t, a) {
727
734
  queryFn: () => k.getContactPerson(t.value, a.value)
728
735
  });
729
736
  }
730
- const at = S.object({
731
- email: S.email().min(1).nullable(),
732
- firstName: S.string().min(1),
733
- lastName: S.string().min(1),
737
+ const at = N.object({
738
+ email: N.literal("").or(N.email()).nullable(),
739
+ firstName: N.string().min(1),
740
+ lastName: N.string().min(1),
734
741
  mobilePhone: Q.nullable(),
735
742
  phone: Q.nullable()
736
743
  }).superRefine((t, a) => {
737
744
  t.email !== null && t.email !== "" || t.mobilePhone !== null && t.mobilePhone !== "" || t.phone !== null && t.phone !== "" || a.addIssue({
738
- code: S.ZodIssueCode.custom,
739
- message: fe.global.t("wise_crm.form.errors.at_least_one")
745
+ code: N.ZodIssueCode.custom,
746
+ message: _e.global.t("wise_crm.form.errors.at_least_one")
740
747
  });
741
748
  }), tt = /* @__PURE__ */ x({
742
749
  __name: "DealContactPersonUpdateDialog",
@@ -746,11 +753,11 @@ const at = S.object({
746
753
  },
747
754
  emits: ["close"],
748
755
  setup(t, { emit: a }) {
749
- const n = t, i = a, o = I(), s = q(), p = Wa(), f = et(
750
- w(() => n.dealUuid),
751
- w(() => n.contactPersonUuid)
752
- ), m = w(() => f.result.value.isOk() ? f.result.value.getValue() : null), u = R({
753
- initialState: w(() => m.value === null ? null : {
756
+ const n = t, r = a, o = I(), s = E(), p = Wa(), f = et(
757
+ C(() => n.dealUuid),
758
+ C(() => n.contactPersonUuid)
759
+ ), m = C(() => f.result.value.isOk() ? f.result.value.getValue() : null), u = G({
760
+ initialState: C(() => m.value === null ? null : {
754
761
  email: m.value.email,
755
762
  firstName: m.value.firstName,
756
763
  lastName: m.value.lastName,
@@ -759,10 +766,10 @@ const at = S.object({
759
766
  }),
760
767
  schema: at,
761
768
  onSubmit: async (P) => {
762
- await C(P);
769
+ await w(P);
763
770
  }
764
771
  }), y = u.register("firstName"), v = u.register("lastName"), _ = u.register("email"), b = u.register("mobilePhone"), h = u.register("phone");
765
- async function C(P) {
772
+ async function w(P) {
766
773
  try {
767
774
  await p.execute({
768
775
  body: {
@@ -772,35 +779,35 @@ const at = S.object({
772
779
  contactPersonUuid: n.contactPersonUuid,
773
780
  dealUuid: n.dealUuid
774
781
  }
775
- }), i("close");
782
+ }), r("close");
776
783
  } catch ($) {
777
784
  s.show($);
778
785
  }
779
786
  }
780
787
  function c() {
781
- i("close");
788
+ r("close");
782
789
  }
783
- return (P, $) => (d(), g(e(ye), {
790
+ return (P, $) => (d(), g(e(ve), {
784
791
  form: e(u),
785
792
  size: "md",
786
793
  onClose: c
787
794
  }, {
788
- default: r(() => [
789
- l(e(ve), {
795
+ default: i(() => [
796
+ l(e(he), {
790
797
  title: e(o).t("wise_crm.info_dialog.contact_person_update.title"),
791
798
  description: e(o).t("wise_crm.info_dialog.contact_person_create.description")
792
799
  }, null, 8, ["title", "description"]),
793
- m.value !== null ? (d(), g(e(X), { key: 0 }, {
794
- default: r(() => [
795
- l(e(ee), null, {
796
- default: r(() => [
800
+ m.value !== null ? (d(), g(e(Y), { key: 0 }, {
801
+ default: i(() => [
802
+ l(e(ae), null, {
803
+ default: i(() => [
797
804
  l(e(A), null, {
798
- default: r(() => [
805
+ default: i(() => [
799
806
  l(e(B), {
800
807
  sm: 1,
801
808
  lg: 2
802
809
  }, {
803
- default: r(() => [
810
+ default: i(() => [
804
811
  l(Ce, {
805
812
  "first-name": e(y),
806
813
  "last-name": e(v)
@@ -811,17 +818,17 @@ const at = S.object({
811
818
  ]),
812
819
  _: 1
813
820
  }),
814
- l(Xe, {
821
+ l(Ze, {
815
822
  title: e(o).t("wise_crm.shared.contact_info")
816
823
  }, {
817
- default: r(() => [
824
+ default: i(() => [
818
825
  l(e(B), {
819
826
  sm: 1,
820
827
  lg: 1,
821
828
  variant: "card"
822
829
  }, {
823
- default: r(() => [
824
- l(te, {
830
+ default: i(() => [
831
+ l(ne, {
825
832
  email: e(_),
826
833
  "mobile-phone": e(b),
827
834
  phone: e(h)
@@ -829,7 +836,7 @@ const at = S.object({
829
836
  ]),
830
837
  _: 1
831
838
  }),
832
- l(pe, { form: e(u) }, null, 8, ["form"])
839
+ l(fe, { form: e(u) }, null, 8, ["form"])
833
840
  ]),
834
841
  _: 1
835
842
  }, 8, ["title"])
@@ -838,10 +845,10 @@ const at = S.object({
838
845
  })
839
846
  ]),
840
847
  _: 1
841
- })) : N("", !0),
842
- l(e(Y), null, {
843
- right: r(() => [
844
- l(e(Z), {
848
+ })) : S("", !0),
849
+ l(e(H), null, {
850
+ right: i(() => [
851
+ l(e(J), {
845
852
  "is-loading": e(u).isSubmitting.value,
846
853
  label: e(o).t("wise_crm.shared.save_changes")
847
854
  }, null, 8, ["is-loading", "label"])
@@ -868,7 +875,7 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
868
875
  deal: {}
869
876
  },
870
877
  setup(t) {
871
- const a = t, n = I(), i = q(), o = $a(), s = Ta(), p = Ma(), f = Ze({
878
+ const a = t, n = I(), r = E(), o = $a(), s = Ta(), p = Ma(), f = He({
872
879
  persistInUrl: !1
873
880
  }), m = nt({
874
881
  params: {
@@ -879,7 +886,7 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
879
886
  uuid: a.deal.owner.uuid,
880
887
  name: a.deal.owner.name
881
888
  } : null
882
- ), _ = w(() => {
889
+ ), _ = C(() => {
883
890
  const U = (m.result.value.isOk() ? m.result.value.getValue().data : []).map((D) => ({
884
891
  uuid: D.uuid,
885
892
  name: `${D.firstName} ${D.lastName}`
@@ -892,11 +899,11 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
892
899
  function h(U) {
893
900
  return n.t(aa.getI18nKey(U));
894
901
  }
895
- const C = H(Object.values($e)), c = H(Object.values(Te)), P = He();
902
+ const w = X(Object.values($e)), c = X(Object.values(Te)), P = Je();
896
903
  function $(U) {
897
904
  f.updateSearch(U);
898
905
  }
899
- async function we(U) {
906
+ async function K(U) {
900
907
  if (u.value = U, U !== null)
901
908
  try {
902
909
  await o.execute({
@@ -908,7 +915,7 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
908
915
  }
909
916
  });
910
917
  } catch (D) {
911
- i.show(D);
918
+ r.show(D);
912
919
  }
913
920
  }
914
921
  async function Pe(U) {
@@ -923,7 +930,7 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
923
930
  }
924
931
  });
925
932
  } catch (D) {
926
- i.show(D);
933
+ r.show(D);
927
934
  }
928
935
  }
929
936
  async function De(U) {
@@ -938,15 +945,15 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
938
945
  }
939
946
  });
940
947
  } catch (D) {
941
- i.show(D);
948
+ r.show(D);
942
949
  }
943
950
  }
944
951
  return (U, D) => (d(), V("div", null, [
945
- l(me, null, {
946
- default: r(() => [
952
+ l(pe, null, {
953
+ default: i(() => [
947
954
  F("form", null, [
948
- l(Je, { cols: 1 }, {
949
- default: r(() => [
955
+ l(Xe, { cols: 1 }, {
956
+ default: i(() => [
950
957
  l(e(Da), {
951
958
  modelValue: v.value,
952
959
  "onUpdate:modelValue": [
@@ -961,19 +968,19 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
961
968
  label: "Deal owner",
962
969
  "onUpdate:search": $
963
970
  }, null, 8, ["modelValue", "items", "display-fn", "is-loading"]),
964
- l(e(J), {
971
+ l(e(W), {
965
972
  modelValue: u.value,
966
973
  "onUpdate:modelValue": [
967
974
  D[1] || (D[1] = (L) => u.value = L),
968
- we
975
+ K
969
976
  ],
970
977
  label: e(n).t("wise_crm.deal.form.fields.language"),
971
978
  placeholder: e(n).t("wise_crm.deal.form.fields.language_placeholder"),
972
979
  "display-fn": b,
973
980
  "is-loading": e(o).isLoading.value,
974
- items: e(C)
981
+ items: e(w)
975
982
  }, null, 8, ["modelValue", "label", "placeholder", "is-loading", "items"]),
976
- l(e(J), {
983
+ l(e(W), {
977
984
  modelValue: y.value,
978
985
  "onUpdate:modelValue": [
979
986
  D[2] || (D[2] = (L) => y.value = L),
@@ -993,7 +1000,7 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
993
1000
  _: 1
994
1001
  }),
995
1002
  F("div", lt, [
996
- l(K, {
1003
+ l(j, {
997
1004
  label: e(n).t("wise_crm.deal.sidebar.created_at", {
998
1005
  date: e(P).toDate(a.deal.createdAt.toPlainDate())
999
1006
  }),
@@ -1004,13 +1011,13 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
1004
1011
  ])
1005
1012
  ]));
1006
1013
  }
1007
- }), it = /* @__PURE__ */ x({
1014
+ }), rt = /* @__PURE__ */ x({
1008
1015
  __name: "DealDetailSidebarOverviewContent",
1009
1016
  props: {
1010
1017
  deal: {}
1011
1018
  },
1012
1019
  setup(t) {
1013
- const a = t, n = I(), i = q(), o = Oa(), s = Qa(), p = ae(), f = p.create(Ja), m = p.create(tt), u = w(() => a.deal.contactPersons.length > 0);
1020
+ const a = t, n = I(), r = E(), o = Oa(), s = Qa(), p = te(), f = p.create(Xa), m = p.create(tt), u = C(() => a.deal.contactPersons.length > 0);
1014
1021
  function y() {
1015
1022
  f.open({
1016
1023
  dealUuid: a.deal.uuid
@@ -1032,8 +1039,8 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
1032
1039
  dealUuid: a.deal.uuid
1033
1040
  }
1034
1041
  });
1035
- } catch (C) {
1036
- i.show(C);
1042
+ } catch (w) {
1043
+ r.show(w);
1037
1044
  }
1038
1045
  }
1039
1046
  function b(h) {
@@ -1044,29 +1051,29 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
1044
1051
  }
1045
1052
  });
1046
1053
  }
1047
- return (h, C) => (d(), g(ta, { "default-values": ["general-info", "contact-persons"] }, {
1048
- default: r(() => [
1049
- l(oe, {
1054
+ return (h, w) => (d(), g(ta, { "default-values": ["general-info", "contact-persons"] }, {
1055
+ default: i(() => [
1056
+ l(re, {
1050
1057
  label: e(n).t("wise_crm.deal.detail.sidebar.accordion.general_info"),
1051
- icon: e(_e),
1058
+ icon: e(ge),
1052
1059
  value: "general-info"
1053
1060
  }, {
1054
- default: r(() => [
1061
+ default: i(() => [
1055
1062
  l(ot, {
1056
1063
  deal: a.deal
1057
1064
  }, null, 8, ["deal"])
1058
1065
  ]),
1059
1066
  _: 1
1060
1067
  }, 8, ["label", "icon"]),
1061
- l(oe, {
1068
+ l(re, {
1062
1069
  "is-empty": !u.value,
1063
1070
  label: e(n).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
1064
1071
  icon: e(na),
1065
1072
  value: "contact-persons",
1066
1073
  onAdd: y
1067
1074
  }, {
1068
- actions: r(() => [
1069
- u.value ? N("", !0) : (d(), g(la, {
1075
+ actions: i(() => [
1076
+ u.value ? S("", !0) : (d(), g(la, {
1070
1077
  key: 0,
1071
1078
  label: e(n).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
1072
1079
  icon: e(ie),
@@ -1074,13 +1081,13 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
1074
1081
  onClick: y
1075
1082
  }, null, 8, ["label", "icon"]))
1076
1083
  ]),
1077
- default: r(() => [
1078
- (d(!0), V(W, null, Ne(a.deal.contactPersons, (c) => (d(), g(e(Sa), {
1084
+ default: i(() => [
1085
+ (d(!0), V(ee, null, Ne(a.deal.contactPersons, (c) => (d(), g(e(Sa), {
1079
1086
  key: c.uuid,
1080
1087
  "layout-id": c.uuid
1081
1088
  }, {
1082
- default: r(() => [
1083
- l(Ra, {
1089
+ default: i(() => [
1090
+ l(za, {
1084
1091
  "contact-person": c,
1085
1092
  "on-toggle-is-primary": () => b(c.uuid),
1086
1093
  description: c.phone,
@@ -1097,7 +1104,7 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
1097
1104
  variant: "tertiary",
1098
1105
  size: "sm",
1099
1106
  onClick: y
1100
- }, null, 8, ["icon-left", "label"])) : N("", !0)
1107
+ }, null, 8, ["icon-left", "label"])) : S("", !0)
1101
1108
  ]),
1102
1109
  _: 1
1103
1110
  }, 8, ["is-empty", "label", "icon"])
@@ -1106,7 +1113,7 @@ const lt = { class: "p-lg" }, ot = /* @__PURE__ */ x({
1106
1113
  }));
1107
1114
  }
1108
1115
  });
1109
- function rt() {
1116
+ function it() {
1110
1117
  return T({
1111
1118
  queryFn: async ({
1112
1119
  body: t,
@@ -1121,7 +1128,7 @@ function rt() {
1121
1128
  });
1122
1129
  }
1123
1130
  function st(t, a) {
1124
- return Ue("boardColumnsTransition", {
1131
+ return we("boardColumnsTransition", {
1125
1132
  params: {
1126
1133
  boardColumnUuid: t
1127
1134
  },
@@ -1140,14 +1147,14 @@ const ut = /* @__PURE__ */ x({
1140
1147
  }),
1141
1148
  emits: ["update:modelValue"],
1142
1149
  setup(t) {
1143
- const a = t, n = I(), i = ia(), s = ae().create(ra), p = Se(t, "modelValue"), f = q(), m = rt(), u = st(
1144
- w(() => p.value.toColumnUuid),
1145
- w(() => i.getOptions().deals?.allowedTransitionTriggerTypes ?? [])
1146
- ), y = w(() => (u.result.value.isOk() ? u.result.value.getValue() : []).flatMap((C) => C.triggers.length === 0 ? [
1147
- C
1148
- ] : C.triggers.map((c) => ({
1149
- ...C,
1150
- toColumnDisplayName: C.toColumnDisplayName,
1150
+ const a = t, n = I(), r = ra(), s = te().create(ia), p = Se(t, "modelValue"), f = E(), m = it(), u = st(
1151
+ C(() => p.value.toColumnUuid),
1152
+ C(() => r.getOptions().deals?.allowedTransitionTriggerTypes ?? [])
1153
+ ), y = C(() => (u.result.value.isOk() ? u.result.value.getValue() : []).flatMap((w) => w.triggers.length === 0 ? [
1154
+ w
1155
+ ] : w.triggers.map((c) => ({
1156
+ ...w,
1157
+ toColumnDisplayName: w.toColumnDisplayName,
1151
1158
  triggers: [
1152
1159
  c
1153
1160
  ]
@@ -1155,7 +1162,7 @@ const ut = /* @__PURE__ */ x({
1155
1162
  function v(h) {
1156
1163
  return h?.toColumnDisplayName ?? "-";
1157
1164
  }
1158
- const _ = w(() => H(y.value));
1165
+ const _ = C(() => X(y.value));
1159
1166
  async function b(h) {
1160
1167
  if (h.triggers.length !== 0) {
1161
1168
  if (h.triggers[0]?.triggerType === Me.EMAIL) {
@@ -1178,16 +1185,16 @@ const ut = /* @__PURE__ */ x({
1178
1185
  dealUuid: a.deal.uuid
1179
1186
  }
1180
1187
  });
1181
- } catch (C) {
1182
- f.show(C);
1188
+ } catch (w) {
1189
+ f.show(w);
1183
1190
  }
1184
1191
  }
1185
1192
  }
1186
- return (h, C) => (d(), g(sa, {
1193
+ return (h, w) => (d(), g(sa, {
1187
1194
  color: p.value?.toColumnColor ?? null
1188
1195
  }, {
1189
- default: r(() => [
1190
- y.value.length === 0 ? (d(), g(e(he), {
1196
+ default: i(() => [
1197
+ y.value.length === 0 ? (d(), g(e(Ue), {
1191
1198
  key: 0,
1192
1199
  "class-config": {
1193
1200
  root: "text-nowrap"
@@ -1195,7 +1202,7 @@ const ut = /* @__PURE__ */ x({
1195
1202
  label: p.value.toColumnDisplayName,
1196
1203
  variant: "translucent",
1197
1204
  color: "brand"
1198
- }, null, 8, ["label"])) : (d(), g(e(J), {
1205
+ }, null, 8, ["label"])) : (d(), g(e(W), {
1199
1206
  key: 1,
1200
1207
  "model-value": p.value,
1201
1208
  "is-loading": e(m).isLoading.value,
@@ -1218,7 +1225,7 @@ function ct() {
1218
1225
  queryFn: async ({
1219
1226
  body: t,
1220
1227
  params: a
1221
- }) => await ge.create(t, {
1228
+ }) => await be.create(t, {
1222
1229
  dealUuid: a.dealUuid
1223
1230
  }),
1224
1231
  queryKeysToInvalidate: {
@@ -1231,7 +1238,7 @@ function dt(t, a) {
1231
1238
  params: {
1232
1239
  params: a?.params
1233
1240
  },
1234
- queryFn: (n) => ge.getDealNotes({
1241
+ queryFn: (n) => be.getDealNotes({
1235
1242
  pagination: n
1236
1243
  }, t.value)
1237
1244
  });
@@ -1242,9 +1249,9 @@ const mt = /* @__PURE__ */ x({
1242
1249
  deal: {}
1243
1250
  },
1244
1251
  setup(t) {
1245
- const a = t, i = ae().create(ua), o = q(), s = ct(), p = ca(), f = dt(
1246
- w(() => a.deal.uuid)
1247
- ), m = w(() => f.result.value.isOk() ? f.result.value.getValue().data : []);
1252
+ const a = t, r = te().create(ua), o = E(), s = ct(), p = ca(), f = dt(
1253
+ C(() => a.deal.uuid)
1254
+ ), m = C(() => f.result.value.isOk() ? f.result.value.getValue().data : []);
1248
1255
  async function u(_) {
1249
1256
  await s.execute({
1250
1257
  body: _,
@@ -1265,7 +1272,7 @@ const mt = /* @__PURE__ */ x({
1265
1272
  }
1266
1273
  }
1267
1274
  function v(_) {
1268
- i.open({
1275
+ r.open({
1269
1276
  note: _
1270
1277
  });
1271
1278
  }
@@ -1285,7 +1292,7 @@ const mt = /* @__PURE__ */ x({
1285
1292
  deal: {}
1286
1293
  },
1287
1294
  setup(t) {
1288
- const a = t, n = I(), i = ma(), o = M(
1295
+ const a = t, n = I(), r = ma(), o = M(
1289
1296
  "overview"
1290
1297
  /* OVERVIEW */
1291
1298
  ), s = M({
@@ -1296,9 +1303,9 @@ const mt = /* @__PURE__ */ x({
1296
1303
  toColumnDisplayName: a.deal.boardColumn.displayName,
1297
1304
  toColumnKey: "",
1298
1305
  triggers: []
1299
- }), p = w(() => [
1306
+ }), p = C(() => [
1300
1307
  {
1301
- icon: _e,
1308
+ icon: ge,
1302
1309
  label: n.t("wise_crm.shared.overview"),
1303
1310
  value: "overview"
1304
1311
  /* OVERVIEW */
@@ -1312,21 +1319,23 @@ const mt = /* @__PURE__ */ x({
1312
1319
  ]);
1313
1320
  return (f, m) => (d(), V("div", pt, [
1314
1321
  F("div", ft, [
1315
- l(Ea, {
1322
+ l(qa, {
1316
1323
  deal: a.deal
1317
1324
  }, null, 8, ["deal"]),
1318
1325
  F("div", _t, [
1319
1326
  l(fa, {
1320
- onClick: m[0] || (m[0] = (u) => e(i).openBusinessDetail(
1327
+ class: "max-w-full min-w-0",
1328
+ onClick: m[0] || (m[0] = (u) => e(r).openBusinessDetail(
1321
1329
  a.deal.client.uuid
1322
1330
  ))
1323
1331
  }, {
1324
- default: r(() => [
1325
- l(e(he), {
1332
+ default: i(() => [
1333
+ l(e(Ue), {
1326
1334
  icon: e(_a),
1327
1335
  label: a.deal.client.name,
1328
1336
  variant: "translucent",
1329
- color: "brand"
1337
+ color: "brand",
1338
+ class: "max-w-full"
1330
1339
  }, null, 8, ["icon", "label"])
1331
1340
  ]),
1332
1341
  _: 1
@@ -1343,14 +1352,14 @@ const mt = /* @__PURE__ */ x({
1343
1352
  "onUpdate:modelValue": m[2] || (m[2] = (u) => o.value = u),
1344
1353
  tabs: p.value
1345
1354
  }, {
1346
- default: r(() => [
1347
- o.value === "overview" ? (d(), g(it, {
1355
+ default: i(() => [
1356
+ o.value === "overview" ? (d(), g(rt, {
1348
1357
  key: 0,
1349
1358
  deal: a.deal
1350
1359
  }, null, 8, ["deal"])) : o.value === "notes" ? (d(), g(mt, {
1351
1360
  key: 1,
1352
1361
  deal: a.deal
1353
- }, null, 8, ["deal"])) : N("", !0)
1362
+ }, null, 8, ["deal"])) : S("", !0)
1354
1363
  ]),
1355
1364
  _: 1
1356
1365
  }, 8, ["modelValue", "tabs"])
@@ -1363,21 +1372,21 @@ const mt = /* @__PURE__ */ x({
1363
1372
  },
1364
1373
  setup(t) {
1365
1374
  const a = t, n = ba(
1366
- w(() => a.dealUuid)
1367
- ), i = I();
1375
+ C(() => a.dealUuid)
1376
+ ), r = I();
1368
1377
  return (o, s) => (d(), g(ya, null, {
1369
- default: r(() => [
1378
+ default: i(() => [
1370
1379
  e(n).isError.value ? (d(), g(va, {
1371
1380
  key: 0,
1372
- message: e(i).t("error.deal_details.description"),
1373
- title: e(i).t("error.deal_details.title")
1381
+ message: e(r).t("error.deal_details.description"),
1382
+ title: e(r).t("error.deal_details.title")
1374
1383
  }, null, 8, ["message", "title"])) : e(n).isLoading.value ? (d(), g(ha, {
1375
1384
  key: 1,
1376
1385
  class: "h-full"
1377
1386
  })) : e(n).result.value.isOk() ? (d(), g(gt, {
1378
1387
  key: e(n).result.value.getValue().boardColumn.uuid,
1379
1388
  deal: e(n).result.value.getValue()
1380
- }, null, 8, ["deal"])) : N("", !0)
1389
+ }, null, 8, ["deal"])) : S("", !0)
1381
1390
  ]),
1382
1391
  _: 1
1383
1392
  }));
@@ -1388,20 +1397,20 @@ const mt = /* @__PURE__ */ x({
1388
1397
  tabs: {}
1389
1398
  },
1390
1399
  setup(t) {
1391
- const a = t, n = I(), i = ke("dealUuid"), o = w(() => [
1400
+ const a = t, n = I(), r = ke("dealUuid"), o = C(() => [
1392
1401
  ...a.tabs,
1393
1402
  {
1394
- label: w(() => n.t("wise_crm.deal.detail_view.communication_tab_label")),
1403
+ label: C(() => n.t("wise_crm.deal.detail_view.communication_tab_label")),
1395
1404
  to: "deal-communication"
1396
1405
  }
1397
1406
  ]);
1398
1407
  return (s, p) => (d(), g(Ve, {
1399
- key: e(i),
1400
- "entity-type": e(ce).BUSINESS,
1408
+ key: e(r),
1409
+ "entity-type": e(de).BUSINESS,
1401
1410
  tabs: o.value
1402
1411
  }, {
1403
- sidebar: r(() => [
1404
- l(bt, { "deal-uuid": e(i) }, null, 8, ["deal-uuid"])
1412
+ sidebar: i(() => [
1413
+ l(bt, { "deal-uuid": e(r) }, null, 8, ["deal-uuid"])
1405
1414
  ]),
1406
1415
  _: 1
1407
1416
  }, 8, ["entity-type", "tabs"]));