@wisemen/wise-crm-web 2.0.0-alpha.37 → 2.0.0-alpha.39
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/dist/{BusinessDetailView-CeSKs5bI.js → BusinessDetailView-BtA-vvUT.js} +2 -2
- package/dist/{CrmDetailView.vue_vue_type_script_setup_true_lang-DH0nCDqJ.js → CrmDetailView.vue_vue_type_script_setup_true_lang-xCc-CnYZ.js} +11 -11
- package/dist/DealCommunicationTabView-CQLIouhC.js +265 -0
- package/dist/{DealDetailView-DXd9cOxv.js → DealDetailView-B3BWJm2T.js} +127 -131
- package/dist/{IndividualDetailView-B9XhTiMD.js → IndividualDetailView-Be8w3l_5.js} +2 -2
- package/dist/{index-BaYi6FgB.js → index-DC7UPeB1.js} +2043 -2024
- package/dist/index.js +15 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/DealCommunicationTabView-6qBWVkVQ.js +0 -199
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as d, createBlock as g, unref as e, ref as
|
|
2
|
-
import { useRouteParams as
|
|
1
|
+
import { defineComponent as x, openBlock as d, createBlock as g, unref as e, ref as O, useTemplateRef as ke, createElementBlock as V, withCtx as r, createVNode as o, mergeProps as A, createElementVNode as S, toDisplayString as G, nextTick as Te, computed as w, createCommentVNode as T, Fragment as le, createTextVNode as se, renderList as Fe, useModel as $e, mergeModels as Me } from "vue";
|
|
2
|
+
import { useRouteParams as Ee } from "@vueuse/router";
|
|
3
3
|
import { useI18n as I } from "vue-i18n";
|
|
4
|
-
import { br as _e, bw as
|
|
5
|
-
import { _ as qe } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import {
|
|
7
|
-
import { useToast as we, useOverlay as J, UIConfirmDialog as
|
|
8
|
-
import { useMutation as $, useQuery as xe, useOffsetInfiniteQuery as
|
|
4
|
+
import { br as _e, bw as Oe, by as Ve, bB as Le } from "./uuid.util-SYJY4Bt5.js";
|
|
5
|
+
import { _ as qe } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-xCc-CnYZ.js";
|
|
6
|
+
import { f as k, h as ge, i as Ae, j as F, k as E, u as q, l as Qe, E as ye, C as be, n as Be, 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 he, x as B, y as Je, z as ve, 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 Ce, S as sa, V as de, X as ua, Y as ca, Z as da, $ as ma, a0 as Ue, 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, A as wa } from "./index-DC7UPeB1.js";
|
|
7
|
+
import { useToast as we, useOverlay as J, UIConfirmDialog as Da, UIIconButton as oe, UITextField as Y, toFormField as Q, UIDropdownMenu as Pa, UIDropdownMenuGroup as xa, UIDropdownMenuItem as me, UIPhoneNumberField as fe, UIFormLayout as ie, UIFormFieldGroup as K, UIFormFieldGrid as R, UIFormDialog as De, UIDialogHeader as Pe, UIForm as pe, UIDialogBody as X, UIDialogFooter as W, UIDialogFooterSubmit as ee, createAutocompleteOptions as Ia, createSelectOptions as ae, UIAutocomplete as Na, UISelect as te, UIButton as Sa, UIBadge as ne } from "@wisemen/vue-core-design-system";
|
|
8
|
+
import { useMutation as $, useQuery as xe, useOffsetInfiniteQuery as ka, useKeysetInfiniteQuery as Ta } from "@wisemen/vue-core-api-utils";
|
|
9
9
|
import { useForm as Z } from "formango";
|
|
10
10
|
import H, { z as N } from "zod";
|
|
11
11
|
import { Motion as Fa } from "motion-v";
|
|
12
12
|
import { useQueryClient as $a, useMutation as Ma } from "@tanstack/vue-query";
|
|
13
|
-
function
|
|
13
|
+
function Ea() {
|
|
14
14
|
return $({
|
|
15
15
|
queryFn: async ({
|
|
16
16
|
params: n
|
|
17
|
-
}) => await
|
|
17
|
+
}) => await k.delete(n.dealUuid),
|
|
18
18
|
queryKeysToInvalidate: {
|
|
19
19
|
dealIndex: {}
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const Oa = /* @__PURE__ */ x({
|
|
24
24
|
__name: "DealDetailSidebarDeleteButton",
|
|
25
25
|
props: {
|
|
26
26
|
deal: {}
|
|
27
27
|
},
|
|
28
28
|
setup(n) {
|
|
29
|
-
const a = n, t = I(), l = we(), i = ge(), c = J().create(
|
|
29
|
+
const a = n, t = I(), l = we(), i = ge(), c = J().create(Da), m = Ea();
|
|
30
30
|
function f() {
|
|
31
31
|
c.open({
|
|
32
32
|
title: t.t("wise_crm.deal.detail.sidebar.delete.title"),
|
|
@@ -65,10 +65,10 @@ function Va() {
|
|
|
65
65
|
body: a,
|
|
66
66
|
params: t
|
|
67
67
|
}) => {
|
|
68
|
-
const l = await
|
|
68
|
+
const l = await k.update(t.dealUuid, {
|
|
69
69
|
dealLanguage: a.dealLanguage
|
|
70
70
|
});
|
|
71
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
71
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), l;
|
|
72
72
|
},
|
|
73
73
|
queryKeysToInvalidate: {
|
|
74
74
|
dealDetail: {
|
|
@@ -85,10 +85,10 @@ function La() {
|
|
|
85
85
|
body: a,
|
|
86
86
|
params: t
|
|
87
87
|
}) => {
|
|
88
|
-
const l = await
|
|
88
|
+
const l = await k.update(t.dealUuid, {
|
|
89
89
|
dealSource: a.dealSource
|
|
90
90
|
});
|
|
91
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
91
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), l;
|
|
92
92
|
},
|
|
93
93
|
queryKeysToInvalidate: {
|
|
94
94
|
dealDetail: {
|
|
@@ -105,10 +105,10 @@ function qa() {
|
|
|
105
105
|
body: a,
|
|
106
106
|
params: t
|
|
107
107
|
}) => {
|
|
108
|
-
const l = await
|
|
108
|
+
const l = await k.update(t.dealUuid, {
|
|
109
109
|
dealOwner: a.dealOwner
|
|
110
110
|
});
|
|
111
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
111
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), l;
|
|
112
112
|
},
|
|
113
113
|
queryKeysToInvalidate: {
|
|
114
114
|
dealDetail: {
|
|
@@ -125,10 +125,10 @@ function Aa() {
|
|
|
125
125
|
body: a,
|
|
126
126
|
params: t
|
|
127
127
|
}) => {
|
|
128
|
-
const l = await
|
|
128
|
+
const l = await k.update(t.dealUuid, {
|
|
129
129
|
name: a.name
|
|
130
130
|
});
|
|
131
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
131
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.DETAILS), l;
|
|
132
132
|
},
|
|
133
133
|
queryKeysToInvalidate: {
|
|
134
134
|
dealDetail: {
|
|
@@ -147,7 +147,7 @@ const Qa = {
|
|
|
147
147
|
deal: {}
|
|
148
148
|
},
|
|
149
149
|
setup(n) {
|
|
150
|
-
const a = n, t = I(), l = q(), i =
|
|
150
|
+
const a = n, t = I(), l = q(), i = O(!1), s = ke("nameFieldContainerRef"), c = Aa(), m = Z({
|
|
151
151
|
schema: H.object({
|
|
152
152
|
name: H.string().min(1)
|
|
153
153
|
}),
|
|
@@ -169,7 +169,7 @@ const Qa = {
|
|
|
169
169
|
}
|
|
170
170
|
}), f = m.register("name", a.deal.name);
|
|
171
171
|
async function u() {
|
|
172
|
-
i.value = !0, await
|
|
172
|
+
i.value = !0, await Te(), y();
|
|
173
173
|
}
|
|
174
174
|
function y() {
|
|
175
175
|
s.value?.querySelector(
|
|
@@ -220,10 +220,10 @@ const Qa = {
|
|
|
220
220
|
function Ra() {
|
|
221
221
|
const n = $a(), a = F(), t = "dealDetail", l = Ma({
|
|
222
222
|
mutationFn: async (i) => {
|
|
223
|
-
const s = await
|
|
223
|
+
const s = await k.setPrimaryContactPerson(i.dealUuid, i.contactPersonUuid);
|
|
224
224
|
if (s.isErr())
|
|
225
225
|
throw s.error;
|
|
226
|
-
a.notifyDealChanged(i.dealUuid,
|
|
226
|
+
a.notifyDealChanged(i.dealUuid, E.CONTACT_PERSON);
|
|
227
227
|
},
|
|
228
228
|
onError: (i, s, c) => {
|
|
229
229
|
n.setQueryData(
|
|
@@ -295,8 +295,8 @@ function ja() {
|
|
|
295
295
|
body: a,
|
|
296
296
|
params: t
|
|
297
297
|
}) => {
|
|
298
|
-
const l = await
|
|
299
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
298
|
+
const l = await k.unlinkContactPerson(t.dealUuid, a.contactPersonUuid);
|
|
299
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.CONTACT_PERSON), l;
|
|
300
300
|
},
|
|
301
301
|
queryKeysToInvalidate: {
|
|
302
302
|
dealDetail: {
|
|
@@ -348,15 +348,15 @@ const za = { class: "flex items-start justify-between" }, Ga = { class: "flex fl
|
|
|
348
348
|
"entity-type": e(_e).INDIVIDUAL,
|
|
349
349
|
uuid: e(s),
|
|
350
350
|
class: "-m-xs"
|
|
351
|
-
}, null, 8, ["label", "entity-type", "uuid"])) :
|
|
352
|
-
t.description ? (d(), V("p", Ya, G(t.description), 1)) :
|
|
351
|
+
}, null, 8, ["label", "entity-type", "uuid"])) : T("", !0),
|
|
352
|
+
t.description ? (d(), V("p", Ya, G(t.description), 1)) : T("", !0)
|
|
353
353
|
]),
|
|
354
354
|
S("div", Za, [
|
|
355
355
|
o(Ke, {
|
|
356
356
|
"is-active": t.contactPerson.isPrimary,
|
|
357
357
|
onClick: y
|
|
358
358
|
}, null, 8, ["is-active"]),
|
|
359
|
-
o(e(
|
|
359
|
+
o(e(Pa), { "popover-align": "end" }, {
|
|
360
360
|
trigger: r(() => [
|
|
361
361
|
o(e(oe), {
|
|
362
362
|
icon: e(je),
|
|
@@ -375,11 +375,10 @@ const za = { class: "flex items-start justify-between" }, Ga = { class: "flex fl
|
|
|
375
375
|
}, null, 8, ["label"]),
|
|
376
376
|
o(e(me), {
|
|
377
377
|
"is-destructive": !0,
|
|
378
|
-
"is-disabled": t.contactPerson.isPrimary,
|
|
379
378
|
config: m,
|
|
380
379
|
label: e(i).t("wise_crm.info_dialog.sidebar.overview.delete_contact_person"),
|
|
381
380
|
onSelect: u
|
|
382
|
-
}, null, 8, ["
|
|
381
|
+
}, null, 8, ["label"])
|
|
383
382
|
]),
|
|
384
383
|
_: 1
|
|
385
384
|
})
|
|
@@ -393,17 +392,17 @@ const za = { class: "flex items-start justify-between" }, Ga = { class: "flex fl
|
|
|
393
392
|
key: 0,
|
|
394
393
|
label: t.contactPerson.email,
|
|
395
394
|
icon: e(ze)
|
|
396
|
-
}, null, 8, ["label", "icon"])) :
|
|
395
|
+
}, null, 8, ["label", "icon"])) : T("", !0),
|
|
397
396
|
t.contactPerson.mobilePhone !== null ? (d(), g(z, {
|
|
398
397
|
key: 1,
|
|
399
398
|
label: t.contactPerson.mobilePhone,
|
|
400
399
|
icon: e(Ge)
|
|
401
|
-
}, null, 8, ["label", "icon"])) :
|
|
400
|
+
}, null, 8, ["label", "icon"])) : T("", !0),
|
|
402
401
|
t.contactPerson.phone !== null ? (d(), g(z, {
|
|
403
402
|
key: 2,
|
|
404
403
|
label: t.contactPerson.phone,
|
|
405
404
|
icon: e(Ye)
|
|
406
|
-
}, null, 8, ["label", "icon"])) :
|
|
405
|
+
}, null, 8, ["label", "icon"])) : T("", !0)
|
|
407
406
|
])
|
|
408
407
|
]),
|
|
409
408
|
_: 1
|
|
@@ -417,12 +416,12 @@ function Xa() {
|
|
|
417
416
|
body: a,
|
|
418
417
|
params: t
|
|
419
418
|
}) => {
|
|
420
|
-
const l = await
|
|
419
|
+
const l = await k.linkContactPerson(
|
|
421
420
|
t.dealUuid,
|
|
422
421
|
a.contactPersonUuid,
|
|
423
422
|
a.contactInfo
|
|
424
423
|
);
|
|
425
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
424
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.CONTACT_PERSON), l;
|
|
426
425
|
},
|
|
427
426
|
queryKeysToInvalidate: {
|
|
428
427
|
dealDetail: {
|
|
@@ -478,7 +477,7 @@ const re = /* @__PURE__ */ x({
|
|
|
478
477
|
},
|
|
479
478
|
emits: ["createNewContactPerson"],
|
|
480
479
|
setup(n, { emit: a }) {
|
|
481
|
-
const t = n, l = a, i = I(), s = t.form.register("email"), c = t.form.register("phone"), m = t.form.register("mobile"), f = t.form.register("existingContactPerson"), u =
|
|
480
|
+
const t = n, l = a, i = I(), s = t.form.register("email"), c = t.form.register("phone"), m = t.form.register("mobile"), f = t.form.register("existingContactPerson"), u = O(null);
|
|
482
481
|
async function y(h) {
|
|
483
482
|
if (u.value = h, f.setValue(h?.uuid ?? null), h === null)
|
|
484
483
|
return;
|
|
@@ -622,11 +621,11 @@ const re = /* @__PURE__ */ x({
|
|
|
622
621
|
},
|
|
623
622
|
emits: ["close", "createNewContactPerson"],
|
|
624
623
|
setup(n, { emit: a }) {
|
|
625
|
-
const t = n, l = a, i = I(), s = q(), c = we(), m = Xa(), f = Xe(), u =
|
|
624
|
+
const t = n, l = a, i = I(), s = q(), c = we(), m = Xa(), f = Xe(), u = O(t.isCreatingNewContactPerson), y = Z({
|
|
626
625
|
schema: tt,
|
|
627
626
|
onSubmit: async (p) => {
|
|
628
627
|
try {
|
|
629
|
-
const
|
|
628
|
+
const D = await f.execute({
|
|
630
629
|
body: {
|
|
631
630
|
email: p.email,
|
|
632
631
|
firstName: p.firstName,
|
|
@@ -635,11 +634,11 @@ const re = /* @__PURE__ */ x({
|
|
|
635
634
|
phone: p.phone
|
|
636
635
|
}
|
|
637
636
|
});
|
|
638
|
-
if (
|
|
639
|
-
s.show(
|
|
637
|
+
if (D.isErr()) {
|
|
638
|
+
s.show(D.error);
|
|
640
639
|
return;
|
|
641
640
|
}
|
|
642
|
-
const M =
|
|
641
|
+
const M = D.value;
|
|
643
642
|
if (!t.isCreatingNewContactPerson) {
|
|
644
643
|
const j = await m.execute({
|
|
645
644
|
body: {
|
|
@@ -659,12 +658,12 @@ const re = /* @__PURE__ */ x({
|
|
|
659
658
|
return;
|
|
660
659
|
}
|
|
661
660
|
}
|
|
662
|
-
|
|
661
|
+
C({
|
|
663
662
|
label: `${p.firstName} ${p.lastName}`,
|
|
664
663
|
value: M
|
|
665
664
|
});
|
|
666
|
-
} catch (
|
|
667
|
-
s.show(
|
|
665
|
+
} catch (D) {
|
|
666
|
+
s.show(D);
|
|
668
667
|
}
|
|
669
668
|
},
|
|
670
669
|
onSubmitError: () => {
|
|
@@ -691,37 +690,37 @@ const re = /* @__PURE__ */ x({
|
|
|
691
690
|
function b() {
|
|
692
691
|
u.value = !0;
|
|
693
692
|
}
|
|
694
|
-
async function v(p,
|
|
693
|
+
async function v(p, D) {
|
|
695
694
|
if (p !== null)
|
|
696
695
|
try {
|
|
697
696
|
await m.execute({
|
|
698
697
|
body: {
|
|
699
698
|
contactPersonUuid: p,
|
|
700
|
-
contactInfo:
|
|
699
|
+
contactInfo: D
|
|
701
700
|
},
|
|
702
701
|
params: {
|
|
703
702
|
dealUuid: t.dealUuid
|
|
704
703
|
}
|
|
705
|
-
}),
|
|
704
|
+
}), C();
|
|
706
705
|
} catch (M) {
|
|
707
706
|
s.show(M);
|
|
708
707
|
}
|
|
709
708
|
}
|
|
710
|
-
function
|
|
709
|
+
function C(p) {
|
|
711
710
|
if (p === void 0) {
|
|
712
711
|
l("close");
|
|
713
712
|
return;
|
|
714
713
|
}
|
|
715
714
|
l("createNewContactPerson", p), l("close");
|
|
716
715
|
}
|
|
717
|
-
return (p,
|
|
716
|
+
return (p, D) => (d(), g(e(De), {
|
|
718
717
|
form: _.value,
|
|
719
718
|
size: "md",
|
|
720
719
|
"render-own-form-component": "",
|
|
721
|
-
onClose:
|
|
720
|
+
onClose: C
|
|
722
721
|
}, {
|
|
723
722
|
default: r(() => [
|
|
724
|
-
o(e(
|
|
723
|
+
o(e(Pe), {
|
|
725
724
|
title: e(i).t("wise_crm.info_dialog.contact_person_create.title"),
|
|
726
725
|
description: e(i).t("wise_crm.info_dialog.contact_person_create.description")
|
|
727
726
|
}, null, 8, ["title", "description"]),
|
|
@@ -787,8 +786,8 @@ function lt() {
|
|
|
787
786
|
body: a,
|
|
788
787
|
params: t
|
|
789
788
|
}) => {
|
|
790
|
-
const l = await
|
|
791
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
789
|
+
const l = await k.updateContactPerson(t.dealUuid, t.contactPersonUuid, a.form);
|
|
790
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.CONTACT_PERSON), l;
|
|
792
791
|
},
|
|
793
792
|
queryKeysToInvalidate: {
|
|
794
793
|
dealContactPersonDetail: {
|
|
@@ -808,7 +807,7 @@ function ot(n, a) {
|
|
|
808
807
|
contactPersonUuid: a,
|
|
809
808
|
dealUuid: n
|
|
810
809
|
},
|
|
811
|
-
queryFn: () =>
|
|
810
|
+
queryFn: () => k.getContactPerson(n.value, a.value)
|
|
812
811
|
});
|
|
813
812
|
}
|
|
814
813
|
const it = N.object({
|
|
@@ -842,15 +841,15 @@ const it = N.object({
|
|
|
842
841
|
phone: f.value.phone
|
|
843
842
|
}),
|
|
844
843
|
schema: it,
|
|
845
|
-
onSubmit: async (
|
|
846
|
-
await
|
|
844
|
+
onSubmit: async (D) => {
|
|
845
|
+
await C(D);
|
|
847
846
|
}
|
|
848
847
|
}), y = u.register("firstName"), h = u.register("lastName"), _ = u.register("email"), b = u.register("mobilePhone"), v = u.register("phone");
|
|
849
|
-
async function
|
|
848
|
+
async function C(D) {
|
|
850
849
|
try {
|
|
851
850
|
await c.execute({
|
|
852
851
|
body: {
|
|
853
|
-
form:
|
|
852
|
+
form: D
|
|
854
853
|
},
|
|
855
854
|
params: {
|
|
856
855
|
contactPersonUuid: t.contactPersonUuid,
|
|
@@ -864,13 +863,13 @@ const it = N.object({
|
|
|
864
863
|
function p() {
|
|
865
864
|
l("close");
|
|
866
865
|
}
|
|
867
|
-
return (
|
|
866
|
+
return (D, M) => (d(), g(e(De), {
|
|
868
867
|
form: e(u),
|
|
869
868
|
size: "md",
|
|
870
869
|
onClose: p
|
|
871
870
|
}, {
|
|
872
871
|
default: r(() => [
|
|
873
|
-
o(e(
|
|
872
|
+
o(e(Pe), {
|
|
874
873
|
title: e(i).t("wise_crm.info_dialog.contact_person_update.title"),
|
|
875
874
|
description: e(i).t("wise_crm.info_dialog.contact_person_create.description")
|
|
876
875
|
}, null, 8, ["title", "description"]),
|
|
@@ -922,7 +921,7 @@ const it = N.object({
|
|
|
922
921
|
})
|
|
923
922
|
]),
|
|
924
923
|
_: 1
|
|
925
|
-
})) :
|
|
924
|
+
})) : T("", !0),
|
|
926
925
|
o(e(W), null, {
|
|
927
926
|
right: r(() => [
|
|
928
927
|
o(e(ee), {
|
|
@@ -938,7 +937,7 @@ const it = N.object({
|
|
|
938
937
|
}
|
|
939
938
|
});
|
|
940
939
|
function st(n) {
|
|
941
|
-
return
|
|
940
|
+
return ka("userIndex", {
|
|
942
941
|
params: n,
|
|
943
942
|
queryFn: (a) => ea.getAll({
|
|
944
943
|
pagination: a,
|
|
@@ -958,74 +957,74 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
958
957
|
params: {
|
|
959
958
|
search: m.debouncedSearch
|
|
960
959
|
}
|
|
961
|
-
}), u =
|
|
960
|
+
}), u = O(a.deal.dealLanguage), y = O(a.deal.dealSource), h = O(
|
|
962
961
|
a.deal.owner ? {
|
|
963
962
|
uuid: a.deal.owner.uuid,
|
|
964
963
|
name: a.deal.owner.name
|
|
965
964
|
} : null
|
|
966
965
|
), _ = w(() => {
|
|
967
|
-
const
|
|
968
|
-
uuid:
|
|
969
|
-
name: `${
|
|
966
|
+
const U = (f.result.value.isOk() ? f.result.value.getValue().data : []).map((P) => ({
|
|
967
|
+
uuid: P.uuid,
|
|
968
|
+
name: `${P.firstName} ${P.lastName}`
|
|
970
969
|
}));
|
|
971
|
-
return Ia(
|
|
970
|
+
return Ia(U);
|
|
972
971
|
});
|
|
973
|
-
function b(
|
|
974
|
-
return t.t(oa.getI18nKey(
|
|
972
|
+
function b(U) {
|
|
973
|
+
return t.t(oa.getI18nKey(U));
|
|
975
974
|
}
|
|
976
|
-
function v(
|
|
977
|
-
return t.t(ia.getI18nKey(
|
|
975
|
+
function v(U) {
|
|
976
|
+
return t.t(ia.getI18nKey(U));
|
|
978
977
|
}
|
|
979
|
-
const
|
|
980
|
-
function M(
|
|
981
|
-
m.updateSearch(
|
|
978
|
+
const C = ae(Object.values(Oe)), p = ae(Object.values(Ve)), D = ta();
|
|
979
|
+
function M(U) {
|
|
980
|
+
m.updateSearch(U);
|
|
982
981
|
}
|
|
983
|
-
async function j(
|
|
984
|
-
if (u.value =
|
|
982
|
+
async function j(U) {
|
|
983
|
+
if (u.value = U, U !== null)
|
|
985
984
|
try {
|
|
986
985
|
await i.execute({
|
|
987
986
|
body: {
|
|
988
|
-
dealLanguage:
|
|
987
|
+
dealLanguage: U
|
|
989
988
|
},
|
|
990
989
|
params: {
|
|
991
990
|
dealUuid: a.deal.uuid
|
|
992
991
|
}
|
|
993
992
|
});
|
|
994
|
-
} catch (
|
|
995
|
-
l.show(
|
|
993
|
+
} catch (P) {
|
|
994
|
+
l.show(P);
|
|
996
995
|
}
|
|
997
996
|
}
|
|
998
|
-
async function Ne(
|
|
999
|
-
if (y.value =
|
|
997
|
+
async function Ne(U) {
|
|
998
|
+
if (y.value = U, U !== null)
|
|
1000
999
|
try {
|
|
1001
1000
|
await s.execute({
|
|
1002
1001
|
body: {
|
|
1003
|
-
dealSource:
|
|
1002
|
+
dealSource: U
|
|
1004
1003
|
},
|
|
1005
1004
|
params: {
|
|
1006
1005
|
dealUuid: a.deal.uuid
|
|
1007
1006
|
}
|
|
1008
1007
|
});
|
|
1009
|
-
} catch (
|
|
1010
|
-
l.show(
|
|
1008
|
+
} catch (P) {
|
|
1009
|
+
l.show(P);
|
|
1011
1010
|
}
|
|
1012
1011
|
}
|
|
1013
|
-
async function Se(
|
|
1014
|
-
if (h.value =
|
|
1012
|
+
async function Se(U) {
|
|
1013
|
+
if (h.value = U, U !== null)
|
|
1015
1014
|
try {
|
|
1016
1015
|
await c.execute({
|
|
1017
1016
|
body: {
|
|
1018
|
-
dealOwner:
|
|
1017
|
+
dealOwner: U
|
|
1019
1018
|
},
|
|
1020
1019
|
params: {
|
|
1021
1020
|
dealUuid: a.deal.uuid
|
|
1022
1021
|
}
|
|
1023
1022
|
});
|
|
1024
|
-
} catch (
|
|
1025
|
-
l.show(
|
|
1023
|
+
} catch (P) {
|
|
1024
|
+
l.show(P);
|
|
1026
1025
|
}
|
|
1027
1026
|
}
|
|
1028
|
-
return (
|
|
1027
|
+
return (U, P) => (d(), V("div", null, [
|
|
1029
1028
|
o(be, null, {
|
|
1030
1029
|
default: r(() => [
|
|
1031
1030
|
S("form", null, [
|
|
@@ -1034,7 +1033,7 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1034
1033
|
o(e(Na), {
|
|
1035
1034
|
modelValue: h.value,
|
|
1036
1035
|
"onUpdate:modelValue": [
|
|
1037
|
-
|
|
1036
|
+
P[0] || (P[0] = (L) => h.value = L),
|
|
1038
1037
|
Se
|
|
1039
1038
|
],
|
|
1040
1039
|
items: _.value,
|
|
@@ -1048,19 +1047,19 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1048
1047
|
o(e(te), {
|
|
1049
1048
|
modelValue: u.value,
|
|
1050
1049
|
"onUpdate:modelValue": [
|
|
1051
|
-
|
|
1050
|
+
P[1] || (P[1] = (L) => u.value = L),
|
|
1052
1051
|
j
|
|
1053
1052
|
],
|
|
1054
1053
|
label: e(t).t("wise_crm.deal.form.fields.language"),
|
|
1055
1054
|
placeholder: e(t).t("wise_crm.deal.form.fields.language_placeholder"),
|
|
1056
1055
|
"display-fn": b,
|
|
1057
1056
|
"is-loading": e(i).isLoading.value,
|
|
1058
|
-
items: e(
|
|
1057
|
+
items: e(C)
|
|
1059
1058
|
}, null, 8, ["modelValue", "label", "placeholder", "is-loading", "items"]),
|
|
1060
1059
|
o(e(te), {
|
|
1061
1060
|
modelValue: y.value,
|
|
1062
1061
|
"onUpdate:modelValue": [
|
|
1063
|
-
|
|
1062
|
+
P[2] || (P[2] = (L) => y.value = L),
|
|
1064
1063
|
Ne
|
|
1065
1064
|
],
|
|
1066
1065
|
"display-fn": v,
|
|
@@ -1079,7 +1078,7 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1079
1078
|
S("div", ut, [
|
|
1080
1079
|
o(z, {
|
|
1081
1080
|
label: e(t).t("wise_crm.deal.sidebar.created_at", {
|
|
1082
|
-
date: e(
|
|
1081
|
+
date: e(D).toDate(a.deal.createdAt.toPlainDate())
|
|
1083
1082
|
}),
|
|
1084
1083
|
icon: e(la),
|
|
1085
1084
|
"text-color": "text-quaternary",
|
|
@@ -1107,18 +1106,15 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1107
1106
|
});
|
|
1108
1107
|
}
|
|
1109
1108
|
async function _(v) {
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
} catch (U) {
|
|
1120
|
-
l.show(U);
|
|
1121
|
-
}
|
|
1109
|
+
const C = await s.execute({
|
|
1110
|
+
body: {
|
|
1111
|
+
contactPersonUuid: v
|
|
1112
|
+
},
|
|
1113
|
+
params: {
|
|
1114
|
+
dealUuid: a.deal.uuid
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
C.isErr() && l.show(C.error);
|
|
1122
1118
|
}
|
|
1123
1119
|
function b(v) {
|
|
1124
1120
|
i.execute({
|
|
@@ -1128,7 +1124,7 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1128
1124
|
}
|
|
1129
1125
|
});
|
|
1130
1126
|
}
|
|
1131
|
-
return (v,
|
|
1127
|
+
return (v, C) => (d(), g(ra, { "default-values": ["general-info", "contact-persons"] }, {
|
|
1132
1128
|
default: r(() => [
|
|
1133
1129
|
o(ce, {
|
|
1134
1130
|
label: e(t).t("wise_crm.deal.detail.sidebar.accordion.general_info"),
|
|
@@ -1150,7 +1146,7 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1150
1146
|
onAdd: y
|
|
1151
1147
|
}, {
|
|
1152
1148
|
actions: r(() => [
|
|
1153
|
-
u.value ?
|
|
1149
|
+
u.value ? T("", !0) : (d(), g(ua, {
|
|
1154
1150
|
key: 0,
|
|
1155
1151
|
label: e(t).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
|
|
1156
1152
|
icon: e(de),
|
|
@@ -1168,8 +1164,8 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1168
1164
|
"contact-person": p,
|
|
1169
1165
|
"on-toggle-is-primary": () => b(p.uuid),
|
|
1170
1166
|
description: p.phone,
|
|
1171
|
-
onUpdate: (
|
|
1172
|
-
onDelete: (
|
|
1167
|
+
onUpdate: (D) => h(p.uuid),
|
|
1168
|
+
onDelete: (D) => _(p.uuid)
|
|
1173
1169
|
}, null, 8, ["contact-person", "on-toggle-is-primary", "description", "onUpdate", "onDelete"])
|
|
1174
1170
|
]),
|
|
1175
1171
|
_: 2
|
|
@@ -1181,7 +1177,7 @@ const ut = { class: "p-lg" }, ct = /* @__PURE__ */ x({
|
|
|
1181
1177
|
variant: "tertiary",
|
|
1182
1178
|
size: "sm",
|
|
1183
1179
|
onClick: y
|
|
1184
|
-
}, null, 8, ["icon-left", "label"])) :
|
|
1180
|
+
}, null, 8, ["icon-left", "label"])) : T("", !0)
|
|
1185
1181
|
]),
|
|
1186
1182
|
_: 1
|
|
1187
1183
|
}, 8, ["is-empty", "label", "icon"])
|
|
@@ -1197,8 +1193,8 @@ function mt() {
|
|
|
1197
1193
|
body: a,
|
|
1198
1194
|
params: t
|
|
1199
1195
|
}) => {
|
|
1200
|
-
const l = await
|
|
1201
|
-
return l.isOk() && n.notifyDealChanged(t.dealUuid,
|
|
1196
|
+
const l = await k.transition(t.dealUuid, a.toBoardColumnUuid);
|
|
1197
|
+
return l.isOk() && n.notifyDealChanged(t.dealUuid, E.TRANSITION), l;
|
|
1202
1198
|
},
|
|
1203
1199
|
queryKeysToInvalidate: {
|
|
1204
1200
|
dealDetail: {
|
|
@@ -1231,11 +1227,11 @@ const pt = /* @__PURE__ */ x({
|
|
|
1231
1227
|
const a = n, t = I(), l = F(), s = J().create(da), c = $e(n, "modelValue"), m = q(), f = mt(), u = ft(
|
|
1232
1228
|
w(() => c.value.toColumnUuid),
|
|
1233
1229
|
w(() => l.getOptions().deals?.allowedTransitionTriggerTypes ?? [])
|
|
1234
|
-
), y = w(() => (u.result.value.isOk() ? u.result.value.getValue() : []).flatMap((
|
|
1235
|
-
|
|
1236
|
-
] :
|
|
1237
|
-
...
|
|
1238
|
-
toColumnDisplayName:
|
|
1230
|
+
), y = w(() => (u.result.value.isOk() ? u.result.value.getValue() : []).flatMap((C) => C.triggers.length === 0 ? [
|
|
1231
|
+
C
|
|
1232
|
+
] : C.triggers.map((p) => ({
|
|
1233
|
+
...C,
|
|
1234
|
+
toColumnDisplayName: C.toColumnDisplayName,
|
|
1239
1235
|
triggers: [
|
|
1240
1236
|
p
|
|
1241
1237
|
]
|
|
@@ -1266,12 +1262,12 @@ const pt = /* @__PURE__ */ x({
|
|
|
1266
1262
|
dealUuid: a.deal.uuid
|
|
1267
1263
|
}
|
|
1268
1264
|
});
|
|
1269
|
-
} catch (
|
|
1270
|
-
m.show(
|
|
1265
|
+
} catch (C) {
|
|
1266
|
+
m.show(C);
|
|
1271
1267
|
}
|
|
1272
1268
|
}
|
|
1273
1269
|
}
|
|
1274
|
-
return (v,
|
|
1270
|
+
return (v, C) => (d(), g(ma, {
|
|
1275
1271
|
color: c.value?.toColumnColor ?? null
|
|
1276
1272
|
}, {
|
|
1277
1273
|
default: r(() => [
|
|
@@ -1315,7 +1311,7 @@ function _t() {
|
|
|
1315
1311
|
});
|
|
1316
1312
|
}
|
|
1317
1313
|
function gt(n, a) {
|
|
1318
|
-
return
|
|
1314
|
+
return Ta("noteDealIndex", {
|
|
1319
1315
|
params: {
|
|
1320
1316
|
params: a?.params
|
|
1321
1317
|
},
|
|
@@ -1373,10 +1369,10 @@ const yt = /* @__PURE__ */ x({
|
|
|
1373
1369
|
deal: {}
|
|
1374
1370
|
},
|
|
1375
1371
|
setup(n) {
|
|
1376
|
-
const a = n, t = I(), l = ge(), i =
|
|
1372
|
+
const a = n, t = I(), l = ge(), i = O(
|
|
1377
1373
|
"overview"
|
|
1378
1374
|
/* OVERVIEW */
|
|
1379
|
-
), s =
|
|
1375
|
+
), s = O({
|
|
1380
1376
|
// There is no uuid available for the initial value, so a placeholder is used
|
|
1381
1377
|
uuid: "",
|
|
1382
1378
|
toColumnUuid: a.deal.boardColumn.uuid,
|
|
@@ -1405,7 +1401,7 @@ const yt = /* @__PURE__ */ x({
|
|
|
1405
1401
|
deal: a.deal,
|
|
1406
1402
|
class: "min-w-0 flex-1"
|
|
1407
1403
|
}, null, 8, ["deal"]),
|
|
1408
|
-
o(
|
|
1404
|
+
o(Oa, {
|
|
1409
1405
|
deal: a.deal
|
|
1410
1406
|
}, null, 8, ["deal"])
|
|
1411
1407
|
]),
|
|
@@ -1453,13 +1449,13 @@ const yt = /* @__PURE__ */ x({
|
|
|
1453
1449
|
}, null, 8, ["deal"])) : i.value === "notes" ? (d(), g(yt, {
|
|
1454
1450
|
key: 1,
|
|
1455
1451
|
deal: a.deal
|
|
1456
|
-
}, null, 8, ["deal"])) :
|
|
1452
|
+
}, null, 8, ["deal"])) : T("", !0)
|
|
1457
1453
|
]),
|
|
1458
1454
|
_: 1
|
|
1459
1455
|
}, 8, ["modelValue", "tabs"])
|
|
1460
1456
|
]));
|
|
1461
1457
|
}
|
|
1462
|
-
}),
|
|
1458
|
+
}), Dt = /* @__PURE__ */ x({
|
|
1463
1459
|
__name: "DealDetailSidebarProvider",
|
|
1464
1460
|
props: {
|
|
1465
1461
|
dealUuid: {}
|
|
@@ -1480,7 +1476,7 @@ const yt = /* @__PURE__ */ x({
|
|
|
1480
1476
|
})) : e(t).result.value.isOk() ? (d(), g(wt, {
|
|
1481
1477
|
key: e(t).result.value.getValue().boardColumn.uuid,
|
|
1482
1478
|
deal: e(t).result.value.getValue()
|
|
1483
|
-
}, null, 8, ["deal"])) :
|
|
1479
|
+
}, null, 8, ["deal"])) : T("", !0)
|
|
1484
1480
|
]),
|
|
1485
1481
|
_: 1
|
|
1486
1482
|
}));
|
|
@@ -1491,7 +1487,7 @@ const yt = /* @__PURE__ */ x({
|
|
|
1491
1487
|
tabs: {}
|
|
1492
1488
|
},
|
|
1493
1489
|
setup(n) {
|
|
1494
|
-
const a = n, t = I(), l =
|
|
1490
|
+
const a = n, t = I(), l = Ee("dealUuid"), i = w(() => [
|
|
1495
1491
|
...a.tabs,
|
|
1496
1492
|
{
|
|
1497
1493
|
label: w(() => t.t("wise_crm.deal.detail_view.communication_tab_label")),
|
|
@@ -1504,7 +1500,7 @@ const yt = /* @__PURE__ */ x({
|
|
|
1504
1500
|
tabs: i.value
|
|
1505
1501
|
}, {
|
|
1506
1502
|
sidebar: r(() => [
|
|
1507
|
-
o(
|
|
1503
|
+
o(Dt, { "deal-uuid": e(l) }, null, 8, ["deal-uuid"])
|
|
1508
1504
|
]),
|
|
1509
1505
|
_: 1
|
|
1510
1506
|
}, 8, ["entity-type", "tabs"]));
|