@wisemen/wise-crm-web 2.0.0-alpha.41 → 2.0.0-alpha.43
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.
- package/README.md +17 -1
- package/dist/{BusinessDetailView-CHKBpSrI.js → BusinessDetailView-DJKi210v.js} +2 -2
- package/dist/{CrmDetailView.vue_vue_type_script_setup_true_lang-Xwd_IT_R.js → CrmDetailView.vue_vue_type_script_setup_true_lang-C2Pnl58E.js} +8 -5
- package/dist/{DealCommunicationTabView-DsghmRPh.js → DealCommunicationTabView-BLGyQLSw.js} +1 -1
- package/dist/{DealDetailView-BWmuuBj8.js → DealDetailView-CkfelGwy.js} +100 -100
- package/dist/{IndividualDetailView-CRD2Z_3X.js → IndividualDetailView-B4V1rJma.js} +2 -2
- package/dist/{index-DEBSTcsW.js → index-Hc4kvsaE.js} +1238 -1201
- package/dist/index.d.ts +14 -3
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as c, createBlock as y, unref as e, ref as V, useTemplateRef as Te, createElementBlock as O, withCtx as r, createVNode as l, mergeProps as A, createElementVNode as S, toDisplayString as G, nextTick as Fe, computed as U, createCommentVNode as
|
|
1
|
+
import { defineComponent as x, openBlock as c, createBlock as y, unref as e, ref as V, useTemplateRef as Te, createElementBlock as O, withCtx as r, createVNode as l, mergeProps as A, createElementVNode as S, toDisplayString as G, nextTick as Fe, computed as U, createCommentVNode as T, Fragment as J, createTextVNode as se, renderList as _e, useModel as $e, mergeModels as Me } from "vue";
|
|
2
2
|
import { useRouteParams as Oe } from "@vueuse/router";
|
|
3
3
|
import { useI18n as I } from "vue-i18n";
|
|
4
4
|
import { br as ge, bw as Ee, by as Ve, bB as Le } from "./uuid.util-SYJY4Bt5.js";
|
|
5
|
-
import { _ as qe } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { f as
|
|
5
|
+
import { _ as qe } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-C2Pnl58E.js";
|
|
6
|
+
import { f as F, h as ye, i as Ae, j as $, k as E, u as q, l as Be, E as be, C as he, n as Qe, o as Ke, p as Re, q as je, r as z, g as ze, J as Ge, s as Ye, t as ue, v as Ze, I as He, w as ve, x as Q, y as Je, z as Ce, B as Xe, G as We, U as ea, H as aa, e as ta, K as na, Q as la, L as oa, N as ia, O as ra, P as ce, R as Ue, S as sa, V as de, X as ua, Y as ca, Z as da, $ as ma, a0 as we, a1 as fa, a2 as pa, a3 as _a, a4 as ga, a5 as ya, a6 as ba, a7 as ha, a8 as va, a9 as Ca, aa as Ua, ab as wa, A as Pa } from "./index-Hc4kvsaE.js";
|
|
7
7
|
import { useToast as Pe, useOverlay as X, UIConfirmDialog as Da, UIIconButton as oe, UITextField as Y, toFormField as B, UIDropdownMenu as xa, UIDropdownMenuGroup as Ia, UIDropdownMenuItem as me, UIPhoneNumberField as fe, UIFormLayout as ie, UIFormFieldGroup as K, UIFormFieldGrid as R, UIFormDialog as De, UIDialogHeader as xe, UIForm as pe, UIDialogBody as W, UIDialogFooter as ee, UIDialogFooterSubmit as ae, createAutocompleteOptions as Na, createSelectOptions as te, UIAutocomplete as Sa, UISelect as ne, UIButton as ka, UIBadge as le, UIColumnLayout as Ta, UIBadgeGroup as Fa } from "@wisemen/vue-core-design-system";
|
|
8
8
|
import { useMutation as M, useQuery as Ie, useOffsetInfiniteQuery as $a, useKeysetInfiniteQuery as Ma } from "@wisemen/vue-core-api-utils";
|
|
9
9
|
import { useForm as Z } from "formango";
|
|
@@ -14,7 +14,7 @@ function La() {
|
|
|
14
14
|
return M({
|
|
15
15
|
queryFn: async ({
|
|
16
16
|
params: n
|
|
17
|
-
}) => await
|
|
17
|
+
}) => await F.delete(n.dealUuid),
|
|
18
18
|
queryKeysToInvalidate: {
|
|
19
19
|
dealIndex: {}
|
|
20
20
|
}
|
|
@@ -26,7 +26,7 @@ const qa = /* @__PURE__ */ x({
|
|
|
26
26
|
deal: {}
|
|
27
27
|
},
|
|
28
28
|
setup(n) {
|
|
29
|
-
const a = n, t = I(), o = Pe(), i = ye(), s = X().create(Da),
|
|
29
|
+
const a = n, t = I(), o = Pe(), i = ye(), s = X().create(Da), m = La();
|
|
30
30
|
function _() {
|
|
31
31
|
s.open({
|
|
32
32
|
title: t.t("wise_crm.deal.detail.sidebar.delete.title"),
|
|
@@ -36,20 +36,20 @@ const qa = /* @__PURE__ */ x({
|
|
|
36
36
|
name: a.deal.name
|
|
37
37
|
}),
|
|
38
38
|
onConfirm: async () => {
|
|
39
|
-
const
|
|
39
|
+
const d = await m.execute({
|
|
40
40
|
params: {
|
|
41
41
|
dealUuid: a.deal.uuid
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
if (
|
|
45
|
-
o.apiError(
|
|
44
|
+
if (d.isErr()) {
|
|
45
|
+
o.apiError(d.error);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
s.close(), i.goToReturnRoute();
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
return (
|
|
52
|
+
return (d, g) => (c(), y(e(oe), {
|
|
53
53
|
label: e(t).t("wise_crm.deal.detail.sidebar.delete.label"),
|
|
54
54
|
icon: e(Ae),
|
|
55
55
|
variant: "tertiary",
|
|
@@ -59,13 +59,13 @@ const qa = /* @__PURE__ */ x({
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
function Aa() {
|
|
62
|
-
const n =
|
|
62
|
+
const n = $();
|
|
63
63
|
return M({
|
|
64
64
|
queryFn: async ({
|
|
65
65
|
body: a,
|
|
66
66
|
params: t
|
|
67
67
|
}) => {
|
|
68
|
-
const o = await
|
|
68
|
+
const o = await F.update(t.dealUuid, {
|
|
69
69
|
dealLanguage: a.dealLanguage
|
|
70
70
|
});
|
|
71
71
|
return o.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), o;
|
|
@@ -79,13 +79,13 @@ function Aa() {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
function Ba() {
|
|
82
|
-
const n =
|
|
82
|
+
const n = $();
|
|
83
83
|
return M({
|
|
84
84
|
queryFn: async ({
|
|
85
85
|
body: a,
|
|
86
86
|
params: t
|
|
87
87
|
}) => {
|
|
88
|
-
const o = await
|
|
88
|
+
const o = await F.update(t.dealUuid, {
|
|
89
89
|
dealSource: a.dealSource
|
|
90
90
|
});
|
|
91
91
|
return o.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), o;
|
|
@@ -99,13 +99,13 @@ function Ba() {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
function Qa() {
|
|
102
|
-
const n =
|
|
102
|
+
const n = $();
|
|
103
103
|
return M({
|
|
104
104
|
queryFn: async ({
|
|
105
105
|
body: a,
|
|
106
106
|
params: t
|
|
107
107
|
}) => {
|
|
108
|
-
const o = await
|
|
108
|
+
const o = await F.update(t.dealUuid, {
|
|
109
109
|
dealOwner: a.dealOwner
|
|
110
110
|
});
|
|
111
111
|
return o.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), o;
|
|
@@ -119,13 +119,13 @@ function Qa() {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
function Ka() {
|
|
122
|
-
const n =
|
|
122
|
+
const n = $();
|
|
123
123
|
return M({
|
|
124
124
|
queryFn: async ({
|
|
125
125
|
body: a,
|
|
126
126
|
params: t
|
|
127
127
|
}) => {
|
|
128
|
-
const o = await
|
|
128
|
+
const o = await F.update(t.dealUuid, {
|
|
129
129
|
name: a.name
|
|
130
130
|
});
|
|
131
131
|
return o.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), o;
|
|
@@ -147,7 +147,7 @@ const Ra = {
|
|
|
147
147
|
deal: {}
|
|
148
148
|
},
|
|
149
149
|
setup(n) {
|
|
150
|
-
const a = n, t = I(), o = q(), i = V(!1), u = Te("nameFieldContainerRef"), s = Ka(),
|
|
150
|
+
const a = n, t = I(), o = q(), i = V(!1), u = Te("nameFieldContainerRef"), s = Ka(), m = Z({
|
|
151
151
|
schema: H.object({
|
|
152
152
|
name: H.string().min(1)
|
|
153
153
|
}),
|
|
@@ -167,8 +167,8 @@ const Ra = {
|
|
|
167
167
|
i.value = !1;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
}), _ =
|
|
171
|
-
async function
|
|
170
|
+
}), _ = m.register("name", a.deal.name);
|
|
171
|
+
async function d() {
|
|
172
172
|
i.value = !0, await Fe(), g();
|
|
173
173
|
}
|
|
174
174
|
function g() {
|
|
@@ -177,11 +177,11 @@ const Ra = {
|
|
|
177
177
|
)?.focus();
|
|
178
178
|
}
|
|
179
179
|
function f() {
|
|
180
|
-
if (!
|
|
180
|
+
if (!m.isDirty.value) {
|
|
181
181
|
i.value = !1;
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
m.submit();
|
|
185
185
|
}
|
|
186
186
|
return (b, h) => (c(), O("div", {
|
|
187
187
|
ref_key: "nameFieldContainerRef",
|
|
@@ -189,11 +189,11 @@ const Ra = {
|
|
|
189
189
|
}, [
|
|
190
190
|
i.value ? (c(), y(Be, {
|
|
191
191
|
key: 0,
|
|
192
|
-
form: e(
|
|
192
|
+
form: e(m)
|
|
193
193
|
}, {
|
|
194
194
|
default: r(() => [
|
|
195
195
|
l(e(Y), A(e(B)(e(_)), {
|
|
196
|
-
"is-loading": e(
|
|
196
|
+
"is-loading": e(m).isSubmitting.value,
|
|
197
197
|
label: e(t).t("wise_crm.deal.detail.sidebar.name_field.label"),
|
|
198
198
|
class: "[&_input]:text-xl [&_input]:font-bold",
|
|
199
199
|
onBlur: f
|
|
@@ -211,16 +211,16 @@ const Ra = {
|
|
|
211
211
|
icon: e(be),
|
|
212
212
|
variant: "tertiary",
|
|
213
213
|
class: "shrink-0",
|
|
214
|
-
onClick:
|
|
214
|
+
onClick: d
|
|
215
215
|
}, null, 8, ["label", "icon"])
|
|
216
216
|
]))
|
|
217
217
|
], 512));
|
|
218
218
|
}
|
|
219
219
|
});
|
|
220
220
|
function Ga() {
|
|
221
|
-
const n = Ea(), a =
|
|
221
|
+
const n = Ea(), a = $(), t = "dealDetail", o = Va({
|
|
222
222
|
mutationFn: async (i) => {
|
|
223
|
-
const u = await
|
|
223
|
+
const u = await F.setPrimaryContactPerson(i.dealUuid, i.contactPersonUuid);
|
|
224
224
|
if (u.isErr())
|
|
225
225
|
throw u.error;
|
|
226
226
|
a.notifyDealChanged(i.dealUuid, E.CONTACT_PERSON);
|
|
@@ -262,9 +262,9 @@ function Ga() {
|
|
|
262
262
|
],
|
|
263
263
|
u.map((s) => ({
|
|
264
264
|
...s,
|
|
265
|
-
contactPersons: s.contactPersons.map((
|
|
266
|
-
...
|
|
267
|
-
isPrimary:
|
|
265
|
+
contactPersons: s.contactPersons.map((m) => ({
|
|
266
|
+
...m,
|
|
267
|
+
isPrimary: m.uuid === i.contactPersonUuid
|
|
268
268
|
}))
|
|
269
269
|
}))
|
|
270
270
|
), {
|
|
@@ -289,13 +289,13 @@ function Ga() {
|
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
function Ya() {
|
|
292
|
-
const n =
|
|
292
|
+
const n = $();
|
|
293
293
|
return M({
|
|
294
294
|
queryFn: async ({
|
|
295
295
|
body: a,
|
|
296
296
|
params: t
|
|
297
297
|
}) => {
|
|
298
|
-
const o = await
|
|
298
|
+
const o = await F.unlinkContactPerson(t.dealUuid, a.contactPersonUuid);
|
|
299
299
|
return o.isOk() && n.notifyDealChanged(t.dealUuid, E.CONTACT_PERSON), o;
|
|
300
300
|
},
|
|
301
301
|
queryKeysToInvalidate: {
|
|
@@ -323,7 +323,7 @@ const Za = { class: "flex items-start justify-between" }, Ha = { class: "flex fl
|
|
|
323
323
|
icon: be,
|
|
324
324
|
type: "icon"
|
|
325
325
|
}
|
|
326
|
-
},
|
|
326
|
+
}, m = {
|
|
327
327
|
left: {
|
|
328
328
|
icon: Re,
|
|
329
329
|
type: "icon"
|
|
@@ -332,7 +332,7 @@ const Za = { class: "flex items-start justify-between" }, Ha = { class: "flex fl
|
|
|
332
332
|
function _() {
|
|
333
333
|
o("update");
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function d() {
|
|
336
336
|
o("delete");
|
|
337
337
|
}
|
|
338
338
|
function g() {
|
|
@@ -348,8 +348,8 @@ const Za = { class: "flex items-start justify-between" }, Ha = { class: "flex fl
|
|
|
348
348
|
"entity-type": e(ge).INDIVIDUAL,
|
|
349
349
|
uuid: e(u),
|
|
350
350
|
class: "-m-xs"
|
|
351
|
-
}, null, 8, ["label", "entity-type", "uuid"])) :
|
|
352
|
-
t.description ? (c(), O("p", Ja, G(t.description), 1)) :
|
|
351
|
+
}, null, 8, ["label", "entity-type", "uuid"])) : T("", !0),
|
|
352
|
+
t.description ? (c(), O("p", Ja, G(t.description), 1)) : T("", !0)
|
|
353
353
|
]),
|
|
354
354
|
S("div", Xa, [
|
|
355
355
|
l(Ke, {
|
|
@@ -375,9 +375,9 @@ const Za = { class: "flex items-start justify-between" }, Ha = { class: "flex fl
|
|
|
375
375
|
}, null, 8, ["label"]),
|
|
376
376
|
l(e(me), {
|
|
377
377
|
"is-destructive": !0,
|
|
378
|
-
config:
|
|
378
|
+
config: m,
|
|
379
379
|
label: e(i).t("wise_crm.info_dialog.sidebar.overview.delete_contact_person"),
|
|
380
|
-
onSelect:
|
|
380
|
+
onSelect: d
|
|
381
381
|
}, null, 8, ["label"])
|
|
382
382
|
]),
|
|
383
383
|
_: 1
|
|
@@ -392,17 +392,17 @@ const Za = { class: "flex items-start justify-between" }, Ha = { class: "flex fl
|
|
|
392
392
|
key: 0,
|
|
393
393
|
label: t.contactPerson.email,
|
|
394
394
|
icon: e(ze)
|
|
395
|
-
}, null, 8, ["label", "icon"])) :
|
|
395
|
+
}, null, 8, ["label", "icon"])) : T("", !0),
|
|
396
396
|
t.contactPerson.mobilePhone !== null ? (c(), y(z, {
|
|
397
397
|
key: 1,
|
|
398
398
|
label: t.contactPerson.mobilePhone,
|
|
399
399
|
icon: e(Ge)
|
|
400
|
-
}, null, 8, ["label", "icon"])) :
|
|
400
|
+
}, null, 8, ["label", "icon"])) : T("", !0),
|
|
401
401
|
t.contactPerson.phone !== null ? (c(), y(z, {
|
|
402
402
|
key: 2,
|
|
403
403
|
label: t.contactPerson.phone,
|
|
404
404
|
icon: e(Ye)
|
|
405
|
-
}, null, 8, ["label", "icon"])) :
|
|
405
|
+
}, null, 8, ["label", "icon"])) : T("", !0)
|
|
406
406
|
])
|
|
407
407
|
]),
|
|
408
408
|
_: 1
|
|
@@ -410,13 +410,13 @@ const Za = { class: "flex items-start justify-between" }, Ha = { class: "flex fl
|
|
|
410
410
|
}
|
|
411
411
|
});
|
|
412
412
|
function at() {
|
|
413
|
-
const n =
|
|
413
|
+
const n = $();
|
|
414
414
|
return M({
|
|
415
415
|
queryFn: async ({
|
|
416
416
|
body: a,
|
|
417
417
|
params: t
|
|
418
418
|
}) => {
|
|
419
|
-
const o = await
|
|
419
|
+
const o = await F.linkContactPerson(
|
|
420
420
|
t.dealUuid,
|
|
421
421
|
a.contactPersonUuid,
|
|
422
422
|
a.contactInfo
|
|
@@ -477,24 +477,24 @@ const re = /* @__PURE__ */ x({
|
|
|
477
477
|
},
|
|
478
478
|
emits: ["createNewContactPerson"],
|
|
479
479
|
setup(n, { emit: a }) {
|
|
480
|
-
const t = n, o = a, i = I(), u = t.form.register("email"), s = t.form.register("phone"),
|
|
480
|
+
const t = n, o = a, i = I(), u = t.form.register("email"), s = t.form.register("phone"), m = t.form.register("mobile"), _ = t.form.register("existingContactPerson"), d = V(null);
|
|
481
481
|
async function g(f) {
|
|
482
|
-
if (
|
|
482
|
+
if (d.value = f, _.setValue(f?.uuid ?? null), f === null)
|
|
483
483
|
return;
|
|
484
484
|
const b = await He.getByUuid(f.uuid);
|
|
485
485
|
if (b.isErr())
|
|
486
486
|
return;
|
|
487
487
|
const h = b.value;
|
|
488
|
-
u.setValue(h.email), s.setValue(h.phone),
|
|
488
|
+
u.setValue(h.email), s.setValue(h.phone), m.setValue(h.mobilePhone);
|
|
489
489
|
}
|
|
490
490
|
return (f, b) => (c(), y(e(ie), null, {
|
|
491
491
|
default: r(() => [
|
|
492
492
|
l(e(K), null, {
|
|
493
493
|
default: r(() => [
|
|
494
494
|
l(Ze, {
|
|
495
|
-
modelValue:
|
|
495
|
+
modelValue: d.value,
|
|
496
496
|
"onUpdate:modelValue": [
|
|
497
|
-
b[0] || (b[0] = (h) =>
|
|
497
|
+
b[0] || (b[0] = (h) => d.value = h),
|
|
498
498
|
g
|
|
499
499
|
],
|
|
500
500
|
label: e(i).t("wise_crm.contact.create_dialog.form.fields.contact_person"),
|
|
@@ -503,7 +503,7 @@ const re = /* @__PURE__ */ x({
|
|
|
503
503
|
]),
|
|
504
504
|
_: 1
|
|
505
505
|
}),
|
|
506
|
-
|
|
506
|
+
d.value !== null ? (c(), y(e(K), { key: 0 }, {
|
|
507
507
|
default: r(() => [
|
|
508
508
|
l(e(R), {
|
|
509
509
|
sm: 1,
|
|
@@ -513,7 +513,7 @@ const re = /* @__PURE__ */ x({
|
|
|
513
513
|
default: r(() => [
|
|
514
514
|
l(re, {
|
|
515
515
|
email: e(u),
|
|
516
|
-
"mobile-phone": e(
|
|
516
|
+
"mobile-phone": e(m),
|
|
517
517
|
phone: e(s)
|
|
518
518
|
}, null, 8, ["email", "mobile-phone", "phone"])
|
|
519
519
|
]),
|
|
@@ -521,7 +521,7 @@ const re = /* @__PURE__ */ x({
|
|
|
521
521
|
})
|
|
522
522
|
]),
|
|
523
523
|
_: 1
|
|
524
|
-
})
|
|
524
|
+
})) : T("", !0)
|
|
525
525
|
]),
|
|
526
526
|
_: 1
|
|
527
527
|
}));
|
|
@@ -552,7 +552,7 @@ const re = /* @__PURE__ */ x({
|
|
|
552
552
|
},
|
|
553
553
|
setup(n) {
|
|
554
554
|
const a = n, t = a.form.register("firstName"), o = a.form.register("lastName"), i = a.form.register("email"), u = a.form.register("mobilePhone"), s = a.form.register("phone");
|
|
555
|
-
return (
|
|
555
|
+
return (m, _) => (c(), y(e(ie), null, {
|
|
556
556
|
default: r(() => [
|
|
557
557
|
l(e(K), null, {
|
|
558
558
|
default: r(() => [
|
|
@@ -621,7 +621,7 @@ const re = /* @__PURE__ */ x({
|
|
|
621
621
|
},
|
|
622
622
|
emits: ["close", "createNewContactPerson"],
|
|
623
623
|
setup(n, { emit: a }) {
|
|
624
|
-
const t = n, o = a, i = I(), u = q(), s = Pe(),
|
|
624
|
+
const t = n, o = a, i = I(), u = q(), s = Pe(), m = at(), _ = Xe(), d = V(t.isCreatingNewContactPerson), g = Z({
|
|
625
625
|
schema: ot,
|
|
626
626
|
onSubmit: async (p) => {
|
|
627
627
|
try {
|
|
@@ -640,7 +640,7 @@ const re = /* @__PURE__ */ x({
|
|
|
640
640
|
}
|
|
641
641
|
const k = C.value;
|
|
642
642
|
if (!t.isCreatingNewContactPerson) {
|
|
643
|
-
const j = await
|
|
643
|
+
const j = await m.execute({
|
|
644
644
|
body: {
|
|
645
645
|
contactPersonUuid: k,
|
|
646
646
|
contactInfo: {
|
|
@@ -685,15 +685,15 @@ const re = /* @__PURE__ */ x({
|
|
|
685
685
|
s.unableToSave();
|
|
686
686
|
}
|
|
687
687
|
}), b = U(
|
|
688
|
-
() =>
|
|
688
|
+
() => d.value ? g : f
|
|
689
689
|
);
|
|
690
690
|
function h() {
|
|
691
|
-
|
|
691
|
+
d.value = !0;
|
|
692
692
|
}
|
|
693
693
|
async function P(p, C) {
|
|
694
694
|
if (p !== null)
|
|
695
695
|
try {
|
|
696
|
-
await
|
|
696
|
+
await m.execute({
|
|
697
697
|
body: {
|
|
698
698
|
contactPersonUuid: p,
|
|
699
699
|
contactInfo: C
|
|
@@ -724,7 +724,7 @@ const re = /* @__PURE__ */ x({
|
|
|
724
724
|
title: e(i).t("wise_crm.info_dialog.contact_person_create.title"),
|
|
725
725
|
description: e(i).t("wise_crm.info_dialog.contact_person_create.description")
|
|
726
726
|
}, null, 8, ["title", "description"]),
|
|
727
|
-
|
|
727
|
+
d.value ? (c(), y(e(pe), {
|
|
728
728
|
key: 0,
|
|
729
729
|
form: e(g),
|
|
730
730
|
"prompt-on-unsaved-changes": !1
|
|
@@ -780,13 +780,13 @@ const re = /* @__PURE__ */ x({
|
|
|
780
780
|
}
|
|
781
781
|
});
|
|
782
782
|
function rt() {
|
|
783
|
-
const n =
|
|
783
|
+
const n = $();
|
|
784
784
|
return M({
|
|
785
785
|
queryFn: async ({
|
|
786
786
|
body: a,
|
|
787
787
|
params: t
|
|
788
788
|
}) => {
|
|
789
|
-
const o = await
|
|
789
|
+
const o = await F.updateContactPerson(t.dealUuid, t.contactPersonUuid, a.form);
|
|
790
790
|
return o.isOk() && n.notifyDealChanged(t.dealUuid, E.CONTACT_PERSON), o;
|
|
791
791
|
},
|
|
792
792
|
queryKeysToInvalidate: {
|
|
@@ -807,7 +807,7 @@ function st(n, a) {
|
|
|
807
807
|
contactPersonUuid: a,
|
|
808
808
|
dealUuid: n
|
|
809
809
|
},
|
|
810
|
-
queryFn: () =>
|
|
810
|
+
queryFn: () => F.getContactPerson(n.value, a.value)
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
813
|
const ut = N.object({
|
|
@@ -829,10 +829,10 @@ const ut = N.object({
|
|
|
829
829
|
},
|
|
830
830
|
emits: ["close"],
|
|
831
831
|
setup(n, { emit: a }) {
|
|
832
|
-
const t = n, o = a, i = I(), u = q(), s = rt(),
|
|
832
|
+
const t = n, o = a, i = I(), u = q(), s = rt(), m = st(
|
|
833
833
|
U(() => t.dealUuid),
|
|
834
834
|
U(() => t.contactPersonUuid)
|
|
835
|
-
), _ = U(() =>
|
|
835
|
+
), _ = U(() => m.result.value.isOk() ? m.result.value.getValue() : null), d = Z({
|
|
836
836
|
initialState: U(() => _.value === null ? null : {
|
|
837
837
|
email: _.value.email,
|
|
838
838
|
firstName: _.value.firstName,
|
|
@@ -844,7 +844,7 @@ const ut = N.object({
|
|
|
844
844
|
onSubmit: async (C) => {
|
|
845
845
|
await v(C);
|
|
846
846
|
}
|
|
847
|
-
}), g =
|
|
847
|
+
}), g = d.register("firstName"), f = d.register("lastName"), b = d.register("email"), h = d.register("mobilePhone"), P = d.register("phone");
|
|
848
848
|
async function v(C) {
|
|
849
849
|
try {
|
|
850
850
|
await s.execute({
|
|
@@ -864,7 +864,7 @@ const ut = N.object({
|
|
|
864
864
|
o("close");
|
|
865
865
|
}
|
|
866
866
|
return (C, k) => (c(), y(e(De), {
|
|
867
|
-
form: e(
|
|
867
|
+
form: e(d),
|
|
868
868
|
size: "md",
|
|
869
869
|
onClose: p
|
|
870
870
|
}, {
|
|
@@ -912,7 +912,7 @@ const ut = N.object({
|
|
|
912
912
|
]),
|
|
913
913
|
_: 1
|
|
914
914
|
}),
|
|
915
|
-
l(ve, { form: e(
|
|
915
|
+
l(ve, { form: e(d) }, null, 8, ["form"])
|
|
916
916
|
]),
|
|
917
917
|
_: 1
|
|
918
918
|
}, 8, ["title"])
|
|
@@ -921,11 +921,11 @@ const ut = N.object({
|
|
|
921
921
|
})
|
|
922
922
|
]),
|
|
923
923
|
_: 1
|
|
924
|
-
})) :
|
|
924
|
+
})) : T("", !0),
|
|
925
925
|
l(e(ee), null, {
|
|
926
926
|
right: r(() => [
|
|
927
927
|
l(e(ae), {
|
|
928
|
-
"is-loading": e(
|
|
928
|
+
"is-loading": e(d).isSubmitting.value,
|
|
929
929
|
label: e(i).t("wise_crm.shared.save_changes")
|
|
930
930
|
}, null, 8, ["is-loading", "label"])
|
|
931
931
|
]),
|
|
@@ -951,13 +951,13 @@ const mt = { class: "p-lg" }, ft = /* @__PURE__ */ x({
|
|
|
951
951
|
deal: {}
|
|
952
952
|
},
|
|
953
953
|
setup(n) {
|
|
954
|
-
const a = n, t = I(), o = q(), i = Aa(), u = Ba(), s = Qa(),
|
|
954
|
+
const a = n, t = I(), o = q(), i = Aa(), u = Ba(), s = Qa(), m = aa({
|
|
955
955
|
persistInUrl: !1
|
|
956
956
|
}), _ = dt({
|
|
957
957
|
params: {
|
|
958
|
-
search:
|
|
958
|
+
search: m.debouncedSearch
|
|
959
959
|
}
|
|
960
|
-
}),
|
|
960
|
+
}), d = V(a.deal.dealLanguage), g = V(a.deal.dealSource), f = V(
|
|
961
961
|
a.deal.owner ? {
|
|
962
962
|
uuid: a.deal.owner.uuid,
|
|
963
963
|
name: a.deal.owner.name
|
|
@@ -977,10 +977,10 @@ const mt = { class: "p-lg" }, ft = /* @__PURE__ */ x({
|
|
|
977
977
|
}
|
|
978
978
|
const v = te(Object.values(Ee)), p = te(Object.values(Ve)), C = ta();
|
|
979
979
|
function k(w) {
|
|
980
|
-
|
|
980
|
+
m.updateSearch(w);
|
|
981
981
|
}
|
|
982
982
|
async function j(w) {
|
|
983
|
-
if (
|
|
983
|
+
if (d.value = w, w !== null)
|
|
984
984
|
try {
|
|
985
985
|
await i.execute({
|
|
986
986
|
body: {
|
|
@@ -1045,9 +1045,9 @@ const mt = { class: "p-lg" }, ft = /* @__PURE__ */ x({
|
|
|
1045
1045
|
"onUpdate:search": k
|
|
1046
1046
|
}, null, 8, ["modelValue", "items", "display-fn", "is-loading"]),
|
|
1047
1047
|
l(e(ne), {
|
|
1048
|
-
modelValue:
|
|
1048
|
+
modelValue: d.value,
|
|
1049
1049
|
"onUpdate:modelValue": [
|
|
1050
|
-
D[1] || (D[1] = (L) =>
|
|
1050
|
+
D[1] || (D[1] = (L) => d.value = L),
|
|
1051
1051
|
j
|
|
1052
1052
|
],
|
|
1053
1053
|
label: e(t).t("wise_crm.deal.form.fields.language"),
|
|
@@ -1093,9 +1093,9 @@ const mt = { class: "p-lg" }, ft = /* @__PURE__ */ x({
|
|
|
1093
1093
|
deal: {}
|
|
1094
1094
|
},
|
|
1095
1095
|
setup(n) {
|
|
1096
|
-
const a = n, t = I(), o = q(), i = Ga(), u = Ya(), s = X(),
|
|
1096
|
+
const a = n, t = I(), o = q(), i = Ga(), u = Ya(), s = X(), m = s.create(it), _ = s.create(ct), d = U(() => a.deal.contactPersons.length > 0), g = U(() => a.deal.contactPersons.toSorted((v, p) => Number(p.isPrimary) - Number(v.isPrimary)));
|
|
1097
1097
|
function f() {
|
|
1098
|
-
|
|
1098
|
+
m.open({
|
|
1099
1099
|
dealUuid: a.deal.uuid
|
|
1100
1100
|
});
|
|
1101
1101
|
}
|
|
@@ -1139,14 +1139,14 @@ const mt = { class: "p-lg" }, ft = /* @__PURE__ */ x({
|
|
|
1139
1139
|
_: 1
|
|
1140
1140
|
}, 8, ["label", "icon"]),
|
|
1141
1141
|
l(ce, {
|
|
1142
|
-
"is-empty": !
|
|
1142
|
+
"is-empty": !d.value,
|
|
1143
1143
|
label: e(t).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
|
|
1144
1144
|
icon: e(sa),
|
|
1145
1145
|
value: "contact-persons",
|
|
1146
1146
|
onAdd: f
|
|
1147
1147
|
}, {
|
|
1148
1148
|
actions: r(() => [
|
|
1149
|
-
|
|
1149
|
+
d.value ? T("", !0) : (c(), y(ua, {
|
|
1150
1150
|
key: 0,
|
|
1151
1151
|
label: e(t).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
|
|
1152
1152
|
icon: e(de),
|
|
@@ -1169,14 +1169,14 @@ const mt = { class: "p-lg" }, ft = /* @__PURE__ */ x({
|
|
|
1169
1169
|
]),
|
|
1170
1170
|
_: 2
|
|
1171
1171
|
}, 1032, ["layout-id"]))), 128)),
|
|
1172
|
-
|
|
1172
|
+
d.value ? (c(), y(e(ka), {
|
|
1173
1173
|
key: 0,
|
|
1174
1174
|
"icon-left": e(de),
|
|
1175
1175
|
label: e(t).t("wise_crm.shared.add"),
|
|
1176
1176
|
variant: "tertiary",
|
|
1177
1177
|
size: "sm",
|
|
1178
1178
|
onClick: f
|
|
1179
|
-
}, null, 8, ["icon-left", "label"])) :
|
|
1179
|
+
}, null, 8, ["icon-left", "label"])) : T("", !0)
|
|
1180
1180
|
]),
|
|
1181
1181
|
_: 1
|
|
1182
1182
|
}, 8, ["is-empty", "label", "icon"])
|
|
@@ -1186,13 +1186,13 @@ const mt = { class: "p-lg" }, ft = /* @__PURE__ */ x({
|
|
|
1186
1186
|
}
|
|
1187
1187
|
});
|
|
1188
1188
|
function _t() {
|
|
1189
|
-
const n =
|
|
1189
|
+
const n = $();
|
|
1190
1190
|
return M({
|
|
1191
1191
|
queryFn: async ({
|
|
1192
1192
|
body: a,
|
|
1193
1193
|
params: t
|
|
1194
1194
|
}) => {
|
|
1195
|
-
const o = await
|
|
1195
|
+
const o = await F.transition(t.dealUuid, a.toBoardColumnUuid);
|
|
1196
1196
|
return o.isOk() && n.notifyDealChanged(t.dealUuid, E.TRANSITION), o;
|
|
1197
1197
|
},
|
|
1198
1198
|
queryKeysToInvalidate: {
|
|
@@ -1223,10 +1223,10 @@ const yt = /* @__PURE__ */ x({
|
|
|
1223
1223
|
}),
|
|
1224
1224
|
emits: ["update:modelValue"],
|
|
1225
1225
|
setup(n) {
|
|
1226
|
-
const a = n, t = I(), o =
|
|
1226
|
+
const a = n, t = I(), o = $(), u = X().create(da), s = $e(n, "modelValue"), m = q(), _ = _t(), d = gt(
|
|
1227
1227
|
U(() => s.value.toColumnUuid),
|
|
1228
1228
|
U(() => o.getOptions().deals?.allowedTransitionTriggerTypes ?? [])
|
|
1229
|
-
), g = U(() => (
|
|
1229
|
+
), g = U(() => (d.result.value.isOk() ? d.result.value.getValue() : []).flatMap((v) => v.triggers.length === 0 ? [
|
|
1230
1230
|
v
|
|
1231
1231
|
] : v.triggers.map((p) => ({
|
|
1232
1232
|
...v,
|
|
@@ -1262,7 +1262,7 @@ const yt = /* @__PURE__ */ x({
|
|
|
1262
1262
|
}
|
|
1263
1263
|
});
|
|
1264
1264
|
} catch (v) {
|
|
1265
|
-
|
|
1265
|
+
m.show(v);
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
@@ -1325,10 +1325,10 @@ const vt = /* @__PURE__ */ x({
|
|
|
1325
1325
|
deal: {}
|
|
1326
1326
|
},
|
|
1327
1327
|
setup(n) {
|
|
1328
|
-
const a = n, o = X().create(fa), i = q(), u = bt(), s = pa(),
|
|
1328
|
+
const a = n, o = X().create(fa), i = q(), u = bt(), s = pa(), m = ht(
|
|
1329
1329
|
U(() => a.deal.uuid)
|
|
1330
|
-
), _ = U(() =>
|
|
1331
|
-
async function
|
|
1330
|
+
), _ = U(() => m.result.value.isOk() ? m.result.value.getValue().data : []);
|
|
1331
|
+
async function d(b) {
|
|
1332
1332
|
await u.execute({
|
|
1333
1333
|
body: b,
|
|
1334
1334
|
params: {
|
|
@@ -1353,11 +1353,11 @@ const vt = /* @__PURE__ */ x({
|
|
|
1353
1353
|
});
|
|
1354
1354
|
}
|
|
1355
1355
|
return (b, h) => (c(), y(_a, {
|
|
1356
|
-
"is-loading": e(
|
|
1356
|
+
"is-loading": e(m).isLoading.value,
|
|
1357
1357
|
notes: _.value,
|
|
1358
|
-
"on-submit":
|
|
1359
|
-
"has-next-page": e(
|
|
1360
|
-
onNext: h[0] || (h[0] = (P) => e(
|
|
1358
|
+
"on-submit": d,
|
|
1359
|
+
"has-next-page": e(m).hasNextPage.value,
|
|
1360
|
+
onNext: h[0] || (h[0] = (P) => e(m).fetchNextPage()),
|
|
1361
1361
|
onDelete: g,
|
|
1362
1362
|
onUpdate: f
|
|
1363
1363
|
}, null, 8, ["is-loading", "notes", "has-next-page"]));
|
|
@@ -1368,12 +1368,12 @@ const vt = /* @__PURE__ */ x({
|
|
|
1368
1368
|
deal: {}
|
|
1369
1369
|
},
|
|
1370
1370
|
setup(n) {
|
|
1371
|
-
const a = n, t = I(), o = ye(), i =
|
|
1371
|
+
const a = n, t = I(), o = ye(), i = $(), u = U(
|
|
1372
1372
|
() => i.getOptions().deals?.headerBadges ?? []
|
|
1373
1373
|
), s = V(
|
|
1374
1374
|
"overview"
|
|
1375
1375
|
/* OVERVIEW */
|
|
1376
|
-
),
|
|
1376
|
+
), m = V({
|
|
1377
1377
|
// There is no uuid available for the initial value, so a placeholder is used
|
|
1378
1378
|
uuid: "",
|
|
1379
1379
|
toColumnUuid: a.deal.boardColumn.uuid,
|
|
@@ -1395,7 +1395,7 @@ const vt = /* @__PURE__ */ x({
|
|
|
1395
1395
|
/* NOTES */
|
|
1396
1396
|
}
|
|
1397
1397
|
]);
|
|
1398
|
-
return (
|
|
1398
|
+
return (d, g) => (c(), O("div", Ct, [
|
|
1399
1399
|
S("div", Ut, [
|
|
1400
1400
|
S("div", wt, [
|
|
1401
1401
|
l(za, {
|
|
@@ -1437,8 +1437,8 @@ const vt = /* @__PURE__ */ x({
|
|
|
1437
1437
|
})
|
|
1438
1438
|
]),
|
|
1439
1439
|
l(yt, {
|
|
1440
|
-
modelValue:
|
|
1441
|
-
"onUpdate:modelValue": g[1] || (g[1] = (f) =>
|
|
1440
|
+
modelValue: m.value,
|
|
1441
|
+
"onUpdate:modelValue": g[1] || (g[1] = (f) => m.value = f),
|
|
1442
1442
|
deal: a.deal
|
|
1443
1443
|
}, null, 8, ["modelValue", "deal"])
|
|
1444
1444
|
]),
|
|
@@ -1469,7 +1469,7 @@ const vt = /* @__PURE__ */ x({
|
|
|
1469
1469
|
}, null, 8, ["deal"])) : s.value === "notes" ? (c(), y(vt, {
|
|
1470
1470
|
key: 1,
|
|
1471
1471
|
deal: a.deal
|
|
1472
|
-
}, null, 8, ["deal"])) :
|
|
1472
|
+
}, null, 8, ["deal"])) : T("", !0)
|
|
1473
1473
|
]),
|
|
1474
1474
|
_: 1
|
|
1475
1475
|
}, 8, ["modelValue", "tabs"])
|
|
@@ -1496,7 +1496,7 @@ const vt = /* @__PURE__ */ x({
|
|
|
1496
1496
|
})) : e(t).result.value.isOk() ? (c(), y(xt, {
|
|
1497
1497
|
key: e(t).result.value.getValue().boardColumn.uuid,
|
|
1498
1498
|
deal: e(t).result.value.getValue()
|
|
1499
|
-
}, null, 8, ["deal"])) :
|
|
1499
|
+
}, null, 8, ["deal"])) : T("", !0)
|
|
1500
1500
|
]),
|
|
1501
1501
|
_: 1
|
|
1502
1502
|
}));
|