@wisemen/wise-crm-web 2.0.0-alpha.0 → 2.0.0-alpha.10

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