@wisemen/wise-crm-web 2.0.0-alpha.47 → 2.0.0-alpha.48
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-DSMZ3NXP.js → BusinessDetailView-BI7KMpcO.js} +3 -3
- package/dist/{CrmDetailSidebarMapCard.vue_vue_type_script_setup_true_lang-BaZAgaWb.js → CrmDetailSidebarMapCard.vue_vue_type_script_setup_true_lang-4ArW1tMI.js} +2 -2
- package/dist/{CrmDetailView.vue_vue_type_script_setup_true_lang-C0IN3eAl.js → CrmDetailView.vue_vue_type_script_setup_true_lang-D1xLUXsW.js} +1 -1
- package/dist/{DealCommunicationTabView-iWBwdRbc.js → DealCommunicationTabView-BDVgMTzE.js} +1 -1
- package/dist/{DealDetailView-Dd8fpzTc.js → DealDetailView-DFoo73kk.js} +2 -2
- package/dist/{IndividualDetailView-DzRX5htU.js → IndividualDetailView-C5gYz_lq.js} +3 -3
- package/dist/{index-CF7cfaBi.js → index-HqNzjH0d.js} +309 -309
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as k, openBlock as c, createElementBlock as h, createElementVNode as y, ref as q, onUnmounted as ma, onMounted as We, defineComponent as x, useId as Pt, watch as we, withModifiers as pa, unref as a, renderSlot as Q, createBlock as v, resolveDynamicComponent as be, toDisplayString as T, withCtx as p, readonly as Nt, shallowRef as _a, createVNode as l, mergeProps as A, createCommentVNode as M, useModel as Me, normalizeClass as ae, Fragment as G, renderList as ce, provide as Ti, inject as Li, createTextVNode as Ce, h as te, normalizeStyle as qi, mergeModels as me, createStaticVNode as Mt, toValue as $i, useAttrs as Ri, useTemplateRef as Oi, onBeforeUnmount as Hi } from "vue";
|
|
2
2
|
import { ApiUtil as D, useMutation as Ne, useQuery as pe, useOffsetInfiniteQuery as st, useKeysetInfiniteQuery as Gi } from "@wisemen/vue-core-api-utils";
|
|
3
3
|
import * as t from "zod";
|
|
4
|
-
import
|
|
4
|
+
import F, { z as b } from "zod";
|
|
5
5
|
import { c as j, z as Zi, a as Ki, b as Qi, d as Wi, e as Ji, f as Yi, g as Xi, h as eo, i as to, j as no, k as ao, l as io, m as oo, n as ro, o as so, p as lo, q as co, r as uo, s as mo, t as po, u as _o, v as fo, w as go, x as bo, y as ho, A as vo, B as yo, C as wo, D as Co, E as ko, F as xo, G as Vo, H as Do, I as Io, J as Eo, K as No, L as Ao, M as jo, N as So, O as Fo, P as Bo, Q as Uo, R as zo, S as Po, T as Mo, U as To, V as Lo, W as qo, X as $o, Y as Ro, Z as Oo, _ as Ho, $ as Go, a0 as Zo, a1 as Ko, a2 as Qo, a3 as Wo, a4 as Jo, a5 as Yo, a6 as Xo, a7 as er, a8 as tr, a9 as nr, aa as ar, ab as ir, ac as or, ad as rr, ae as sr, af as lr, ag as cr, ah as ur, ai as dr, aj as mr, ak as pr, al as _r, am as fr, an as gr, ao as br, ap as hr, aq as vr, ar as yr, as as wr, at as Cr, au as kr, av as xr, aw as Vr, ax as Dr, ay as Ir, az as Er, aA as Nr, aB as Ar, aC as jr, aD as Sr, aE as Fr, aF as Br, aG as Ur, aH as zr, aI as Pr, aJ as Mr, aK as Tr, aL as Lr, aM as qr, aN as $r, aO as Rr, aP as Or, aQ as Hr, aR as Gr, aS as Zr, aT as Kr, aU as Qr, aV as Wr, aW as Jr, aX as Yr, aY as Xr, aZ as es, a_ as ts, a$ as ns, b0 as as, b1 as is, b2 as os, b3 as rs, b4 as ss, b5 as ls, b6 as cs, b7 as us, b8 as ds, b9 as ms, ba as ps, bb as _s, bc as fs, bd as gs, be as bs, bf as hs, bg as vs, bh as ys, bi as ws, bj as Cs, bk as ks, bl as xs, bm as Vs, bn as Ds, bo as Is, bp as Es, bq as tt, br as ee, bs as O, bt as ve, bu as Ns, bv as Ye, bw as As, bx as bt, by as He, bz as fa } from "./uuid.util-DUuuAgdg.js";
|
|
6
6
|
import { Temporal as Ge } from "temporal-polyfill";
|
|
7
7
|
import { useToast as Cn, useOverlay as lt, UIConfirmDialog as js, UIButton as Y, UIFormLayout as Te, UIFormFieldGroup as Ae, UIFormFieldGrid as K, UIAddressAutocomplete as ct, toFormField as S, UITextField as W, UITagsField as Re, UISwitch as Hn, UICheckbox as Ss, UIDateField as Fs, createSelectOptions as nt, UISelect as at, UINumberField as Bs, UIRadioGroup as Us, UIRadioGroupItem as zs, UIPhoneNumberField as Pe, useSearch as Tt, defineTableColumns as ga, UITableBodyRowCell as Fe, UITableBodyRowCellText as $e, UIDashboardPageActions as Lt, UISearchField as qt, UITable as kn, UIRowLayout as Xe, UILoader as xn, UIFeaturedIcon as Ps, UIColumnLayout as Vn, UIText as mn, UIEmptyState as ba, UIDialog as Dn, UIDialogFooter as je, UIDialogFooterCancel as $t, UIThemeProvider as Ms, createAutocompleteOptions as jt, UIAutocomplete as In, UIDialogFooterSecondary as ht, UIDialogFooterSubmit as ut, UIDialogFooterPrimary as Ts, UIDialogBody as vt, UIForm as ha, UIFormDialog as Rt, UIDialogHeader as Ee, UIBadge as it, UIScrollable as va, UIClickableElement as Ls, UIAutoFocus as qs, useInjectConfigContext as ya, UIConfigProvider as $s, UIIconButton as et, UITooltip as Rs, UITooltipContent as Os, UIKeyboardShortcut as Hs, BaseFileUploadStatus as Be, UIBaseFileUploadItemReplace as Gs, UIBaseFileUploadItemRemove as Zs, UIBaseFileUploadItem as Ks, UIBaseFileUploadRoot as Qs, UIBaseFileUploadTrigger as Ws, UIBaseFileUploadDropzone as Js, UIAvatarLabel as Ys, UIFormFileUpload as Xs, UITabs as el, UITabsList as tl, UITabsItem as nl, UITabsContent as al, useDialogChin as il, UIDashboardPage as ol } from "@wisemen/vue-core-design-system";
|
|
@@ -3687,13 +3687,13 @@ function ip({
|
|
|
3687
3687
|
...m
|
|
3688
3688
|
}) {
|
|
3689
3689
|
let g;
|
|
3690
|
-
const w = s ?? ((V) => new Promise((
|
|
3690
|
+
const w = s ?? ((V) => new Promise((B) => setTimeout(B, V)));
|
|
3691
3691
|
return {
|
|
3692
3692
|
stream: async function* () {
|
|
3693
|
-
let V = i ?? 3e3,
|
|
3693
|
+
let V = i ?? 3e3, B = 0;
|
|
3694
3694
|
const R = m.signal ?? new AbortController().signal;
|
|
3695
3695
|
for (; !R.aborted; ) {
|
|
3696
|
-
|
|
3696
|
+
B++;
|
|
3697
3697
|
const L = m.headers instanceof Headers ? m.headers : new Headers(m.headers);
|
|
3698
3698
|
g !== void 0 && L.set("Last-Event-ID", g);
|
|
3699
3699
|
try {
|
|
@@ -3704,14 +3704,14 @@ function ip({
|
|
|
3704
3704
|
headers: L,
|
|
3705
3705
|
signal: R
|
|
3706
3706
|
};
|
|
3707
|
-
let
|
|
3708
|
-
d && (
|
|
3709
|
-
const
|
|
3710
|
-
if (!
|
|
3711
|
-
throw new Error(`SSE failed: ${
|
|
3712
|
-
if (!
|
|
3707
|
+
let E = new Request(u, $);
|
|
3708
|
+
d && (E = await d(u, $));
|
|
3709
|
+
const I = await (m.fetch ?? globalThis.fetch)(E);
|
|
3710
|
+
if (!I.ok)
|
|
3711
|
+
throw new Error(`SSE failed: ${I.status} ${I.statusText}`);
|
|
3712
|
+
if (!I.body)
|
|
3713
3713
|
throw new Error("No body in SSE response");
|
|
3714
|
-
const H =
|
|
3714
|
+
const H = I.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
3715
3715
|
let de = "";
|
|
3716
3716
|
const J = () => {
|
|
3717
3717
|
try {
|
|
@@ -3773,10 +3773,10 @@ function ip({
|
|
|
3773
3773
|
}
|
|
3774
3774
|
break;
|
|
3775
3775
|
} catch ($) {
|
|
3776
|
-
if (_?.($), o !== void 0 &&
|
|
3776
|
+
if (_?.($), o !== void 0 && B >= o)
|
|
3777
3777
|
break;
|
|
3778
|
-
const
|
|
3779
|
-
await w(
|
|
3778
|
+
const E = Math.min(V * 2 ** (B - 1), r ?? 3e4);
|
|
3779
|
+
await w(E);
|
|
3780
3780
|
}
|
|
3781
3781
|
}
|
|
3782
3782
|
}()
|
|
@@ -4209,39 +4209,39 @@ function yp(n = {}) {
|
|
|
4209
4209
|
body: ea(m)
|
|
4210
4210
|
};
|
|
4211
4211
|
let C = new Request(g, w);
|
|
4212
|
-
for (const
|
|
4213
|
-
|
|
4214
|
-
const
|
|
4212
|
+
for (const U of r.request.fns)
|
|
4213
|
+
U && (C = await U(C, m));
|
|
4214
|
+
const N = m.fetch;
|
|
4215
4215
|
let V;
|
|
4216
4216
|
try {
|
|
4217
|
-
V = await
|
|
4218
|
-
} catch (
|
|
4219
|
-
let
|
|
4217
|
+
V = await N(C);
|
|
4218
|
+
} catch (U) {
|
|
4219
|
+
let I = U;
|
|
4220
4220
|
for (const H of r.error.fns)
|
|
4221
|
-
H && (
|
|
4222
|
-
if (
|
|
4223
|
-
throw
|
|
4221
|
+
H && (I = await H(U, void 0, C, m));
|
|
4222
|
+
if (I = I || {}, m.throwOnError)
|
|
4223
|
+
throw I;
|
|
4224
4224
|
return m.responseStyle === "data" ? void 0 : {
|
|
4225
|
-
error:
|
|
4225
|
+
error: I,
|
|
4226
4226
|
request: C,
|
|
4227
4227
|
response: void 0
|
|
4228
4228
|
};
|
|
4229
4229
|
}
|
|
4230
|
-
for (const
|
|
4231
|
-
|
|
4232
|
-
const
|
|
4230
|
+
for (const U of r.response.fns)
|
|
4231
|
+
U && (V = await U(V, C, m));
|
|
4232
|
+
const B = {
|
|
4233
4233
|
request: C,
|
|
4234
4234
|
response: V
|
|
4235
4235
|
};
|
|
4236
4236
|
if (V.ok) {
|
|
4237
|
-
const
|
|
4237
|
+
const U = (m.parseAs === "auto" ? pp(V.headers.get("Content-Type")) : m.parseAs) ?? "json";
|
|
4238
4238
|
if (V.status === 204 || V.headers.get("Content-Length") === "0") {
|
|
4239
4239
|
let H;
|
|
4240
|
-
switch (
|
|
4240
|
+
switch (U) {
|
|
4241
4241
|
case "arrayBuffer":
|
|
4242
4242
|
case "blob":
|
|
4243
4243
|
case "text":
|
|
4244
|
-
H = await V[
|
|
4244
|
+
H = await V[U]();
|
|
4245
4245
|
break;
|
|
4246
4246
|
case "formData":
|
|
4247
4247
|
H = new FormData();
|
|
@@ -4255,31 +4255,31 @@ function yp(n = {}) {
|
|
|
4255
4255
|
}
|
|
4256
4256
|
return m.responseStyle === "data" ? H : {
|
|
4257
4257
|
data: H,
|
|
4258
|
-
...
|
|
4258
|
+
...B
|
|
4259
4259
|
};
|
|
4260
4260
|
}
|
|
4261
|
-
let
|
|
4262
|
-
switch (
|
|
4261
|
+
let I;
|
|
4262
|
+
switch (U) {
|
|
4263
4263
|
case "arrayBuffer":
|
|
4264
4264
|
case "blob":
|
|
4265
4265
|
case "formData":
|
|
4266
4266
|
case "text":
|
|
4267
|
-
|
|
4267
|
+
I = await V[U]();
|
|
4268
4268
|
break;
|
|
4269
4269
|
case "json": {
|
|
4270
4270
|
const H = await V.text();
|
|
4271
|
-
|
|
4271
|
+
I = H ? JSON.parse(H) : {};
|
|
4272
4272
|
break;
|
|
4273
4273
|
}
|
|
4274
4274
|
case "stream":
|
|
4275
4275
|
return m.responseStyle === "data" ? V.body : {
|
|
4276
4276
|
data: V.body,
|
|
4277
|
-
...
|
|
4277
|
+
...B
|
|
4278
4278
|
};
|
|
4279
4279
|
}
|
|
4280
|
-
return
|
|
4281
|
-
data:
|
|
4282
|
-
...
|
|
4280
|
+
return U === "json" && (m.responseValidator && await m.responseValidator(I), m.responseTransformer && (I = await m.responseTransformer(I))), m.responseStyle === "data" ? I : {
|
|
4281
|
+
data: I,
|
|
4282
|
+
...B
|
|
4283
4283
|
};
|
|
4284
4284
|
}
|
|
4285
4285
|
const R = await V.text();
|
|
@@ -4289,14 +4289,14 @@ function yp(n = {}) {
|
|
|
4289
4289
|
} catch {
|
|
4290
4290
|
}
|
|
4291
4291
|
const $ = L ?? R;
|
|
4292
|
-
let
|
|
4293
|
-
for (const
|
|
4294
|
-
|
|
4295
|
-
if (
|
|
4296
|
-
throw
|
|
4292
|
+
let E = $;
|
|
4293
|
+
for (const U of r.error.fns)
|
|
4294
|
+
U && (E = await U($, V, C, m));
|
|
4295
|
+
if (E = E || {}, m.throwOnError)
|
|
4296
|
+
throw E;
|
|
4297
4297
|
return m.responseStyle === "data" ? void 0 : {
|
|
4298
|
-
error:
|
|
4299
|
-
...
|
|
4298
|
+
error: E,
|
|
4299
|
+
...B
|
|
4300
4300
|
};
|
|
4301
4301
|
}, d = (f) => (m) => u({
|
|
4302
4302
|
...m,
|
|
@@ -4313,10 +4313,10 @@ function yp(n = {}) {
|
|
|
4313
4313
|
method: f,
|
|
4314
4314
|
serializedBody: ea(g),
|
|
4315
4315
|
url: w,
|
|
4316
|
-
onRequest: async (C,
|
|
4317
|
-
let V = new Request(C,
|
|
4318
|
-
for (const
|
|
4319
|
-
|
|
4316
|
+
onRequest: async (C, N) => {
|
|
4317
|
+
let V = new Request(C, N);
|
|
4318
|
+
for (const B of r.request.fns)
|
|
4319
|
+
B && (V = await B(V, g));
|
|
4320
4320
|
return V;
|
|
4321
4321
|
}
|
|
4322
4322
|
});
|
|
@@ -4917,31 +4917,31 @@ const Pp = /* @__PURE__ */ x({
|
|
|
4917
4917
|
schema: zp(
|
|
4918
4918
|
o.getConfig().billingConfig?.businessBillingInformationRequirement ?? ve.EMAIL_OR_ADDRESS
|
|
4919
4919
|
),
|
|
4920
|
-
onSubmit: async (
|
|
4921
|
-
await e.onSubmit(
|
|
4920
|
+
onSubmit: async (E) => {
|
|
4921
|
+
await e.onSubmit(E);
|
|
4922
4922
|
}
|
|
4923
|
-
}), u = k(() => `card-update-form-${Ns.getRandom()}`), d = s.register("billingAddress"), _ = s.register("invoiceCcEmails", []), f = s.register("invoiceEmail"), m = s.register("purchaseNoteCcEmails", []), g = s.register("purchaseNoteEmail"), w = s.register("reminderCcEmails", []), C = s.register("reminderEmail"),
|
|
4923
|
+
}), u = k(() => `card-update-form-${Ns.getRandom()}`), d = s.register("billingAddress"), _ = s.register("invoiceCcEmails", []), f = s.register("invoiceEmail"), m = s.register("purchaseNoteCcEmails", []), g = s.register("purchaseNoteEmail"), w = s.register("reminderCcEmails", []), C = s.register("reminderEmail"), N = q(
|
|
4924
4924
|
s.state.value.reminderEmail !== s.state.value.invoiceEmail || JSON.stringify(s.state.value.reminderCcEmails) !== JSON.stringify(s.state.value.invoiceCcEmails)
|
|
4925
4925
|
), V = q(
|
|
4926
4926
|
s.state.value.purchaseNoteEmail !== s.state.value.invoiceEmail || JSON.stringify(s.state.value.purchaseNoteCcEmails) !== JSON.stringify(s.state.value.invoiceCcEmails)
|
|
4927
4927
|
);
|
|
4928
|
-
function
|
|
4929
|
-
|
|
4928
|
+
function B(E) {
|
|
4929
|
+
N.value || C.setValue(E ?? ""), V.value || g.setValue(E ?? "");
|
|
4930
4930
|
}
|
|
4931
|
-
function R(
|
|
4932
|
-
|
|
4931
|
+
function R(E) {
|
|
4932
|
+
N.value || w.setValue(E ?? []), V.value || m.setValue(E ?? []);
|
|
4933
4933
|
}
|
|
4934
|
-
function L(
|
|
4935
|
-
|
|
4934
|
+
function L(E) {
|
|
4935
|
+
E || (C.setValue(f.modelValue.value ?? ""), w.setValue(_.modelValue.value ?? []));
|
|
4936
4936
|
}
|
|
4937
|
-
function $(
|
|
4938
|
-
if (
|
|
4937
|
+
function $(E) {
|
|
4938
|
+
if (E) {
|
|
4939
4939
|
g.setValue(null), m.setValue([]);
|
|
4940
4940
|
return;
|
|
4941
4941
|
}
|
|
4942
4942
|
g.setValue(f.modelValue.value ?? ""), m.setValue(_.modelValue.value ?? []);
|
|
4943
4943
|
}
|
|
4944
|
-
return (
|
|
4944
|
+
return (E, U) => (c(), v(Zt, {
|
|
4945
4945
|
id: u.value,
|
|
4946
4946
|
form: a(s),
|
|
4947
4947
|
class: "flex h-full flex-col justify-between"
|
|
@@ -4976,7 +4976,7 @@ const Pp = /* @__PURE__ */ x({
|
|
|
4976
4976
|
l(a(W), A({
|
|
4977
4977
|
label: a(i).t("wise_crm.info_dialog.business.information.billing_information.invoice_email"),
|
|
4978
4978
|
placeholder: a(i).t("wise_crm.info_dialog.business.information.billing_information.email")
|
|
4979
|
-
}, a(S)(a(f)), { "onUpdate:modelValue":
|
|
4979
|
+
}, a(S)(a(f)), { "onUpdate:modelValue": B }), null, 16, ["label", "placeholder"])
|
|
4980
4980
|
]),
|
|
4981
4981
|
_: 1
|
|
4982
4982
|
}),
|
|
@@ -4995,16 +4995,16 @@ const Pp = /* @__PURE__ */ x({
|
|
|
4995
4995
|
_: 1
|
|
4996
4996
|
}),
|
|
4997
4997
|
l(a(Hn), {
|
|
4998
|
-
modelValue:
|
|
4998
|
+
modelValue: N.value,
|
|
4999
4999
|
"onUpdate:modelValue": [
|
|
5000
|
-
|
|
5000
|
+
U[0] || (U[0] = (I) => N.value = I),
|
|
5001
5001
|
L
|
|
5002
5002
|
],
|
|
5003
5003
|
label: a(i).t("wise_crm.info_dialog.business.information.billing_information.reminder_different_switch")
|
|
5004
5004
|
}, null, 8, ["modelValue", "label"]),
|
|
5005
5005
|
l(Xn, { class: "w-full overflow-visible" }, {
|
|
5006
5006
|
default: p(() => [
|
|
5007
|
-
|
|
5007
|
+
N.value ? (c(), v(a(K), {
|
|
5008
5008
|
key: 0,
|
|
5009
5009
|
sm: 1,
|
|
5010
5010
|
lg: 2
|
|
@@ -5030,7 +5030,7 @@ const Pp = /* @__PURE__ */ x({
|
|
|
5030
5030
|
l(a(Hn), {
|
|
5031
5031
|
modelValue: V.value,
|
|
5032
5032
|
"onUpdate:modelValue": [
|
|
5033
|
-
|
|
5033
|
+
U[1] || (U[1] = (I) => V.value = I),
|
|
5034
5034
|
$
|
|
5035
5035
|
],
|
|
5036
5036
|
label: a(i).t("wise_crm.info_dialog.business.information.billing_information.purchase_notes_different_switch")
|
|
@@ -5108,11 +5108,11 @@ const Pp = /* @__PURE__ */ x({
|
|
|
5108
5108
|
businessUuid: o.value
|
|
5109
5109
|
}
|
|
5110
5110
|
});
|
|
5111
|
-
} catch (
|
|
5112
|
-
i.show(
|
|
5111
|
+
} catch (N) {
|
|
5112
|
+
i.show(N);
|
|
5113
5113
|
}
|
|
5114
5114
|
}
|
|
5115
|
-
return (C,
|
|
5115
|
+
return (C, N) => a(d).isLoading.value || a(r).isLoading.value ? (c(), v(Ze, {
|
|
5116
5116
|
key: 0,
|
|
5117
5117
|
class: "h-40"
|
|
5118
5118
|
})) : (c(), v(Pp, {
|
|
@@ -5509,7 +5509,7 @@ const Xp = ["aria-describedby"], e_ = /* @__PURE__ */ x({
|
|
|
5509
5509
|
_: 3
|
|
5510
5510
|
}));
|
|
5511
5511
|
}
|
|
5512
|
-
}), Xt =
|
|
5512
|
+
}), Xt = F.enum(tt);
|
|
5513
5513
|
class Ka {
|
|
5514
5514
|
static i18nKeys = Ht({
|
|
5515
5515
|
"en-US": "wise_crm.enum.language.en",
|
|
@@ -5520,7 +5520,7 @@ class Ka {
|
|
|
5520
5520
|
return this.i18nKeys.get(e);
|
|
5521
5521
|
}
|
|
5522
5522
|
}
|
|
5523
|
-
const ue =
|
|
5523
|
+
const ue = F.literal("").or(F.string().refine((n) => {
|
|
5524
5524
|
try {
|
|
5525
5525
|
const e = xl(n);
|
|
5526
5526
|
return e.isPossible() && e.isValid();
|
|
@@ -5529,12 +5529,12 @@ const ue = B.literal("").or(B.string().refine((n) => {
|
|
|
5529
5529
|
}
|
|
5530
5530
|
}, {
|
|
5531
5531
|
message: Qe.global.t("wise_crm.form.errors.invalid_phone_number")
|
|
5532
|
-
})), en =
|
|
5533
|
-
countryCode:
|
|
5532
|
+
})), en = F.object({
|
|
5533
|
+
countryCode: F.enum(Ye, {
|
|
5534
5534
|
error: Qe.global.t("validation.vat_number.invalid_country_code")
|
|
5535
5535
|
}),
|
|
5536
|
-
number:
|
|
5537
|
-
}), o_ =
|
|
5536
|
+
number: F.string().min(1).regex(/^\d+$/, Qe.global.t("validation.vat_number.numbers_only"))
|
|
5537
|
+
}), o_ = F.instanceof(Ge.PlainDate);
|
|
5538
5538
|
class r_ {
|
|
5539
5539
|
static dateTimeToZonedDateTime(e) {
|
|
5540
5540
|
return e.toZonedDateTime(this.getMyTimezone());
|
|
@@ -5680,7 +5680,7 @@ const l_ = /* @__PURE__ */ x({
|
|
|
5680
5680
|
await e.onSubmit(C);
|
|
5681
5681
|
}
|
|
5682
5682
|
}), r = o.register("name"), s = o.register("address"), u = o.register("companyNumber"), d = o.register("email"), _ = o.register("mobilePhone"), f = o.register("phone"), m = o.register("vatNumber"), g = o.register("language"), w = nt(Object.values(tt));
|
|
5683
|
-
return (C,
|
|
5683
|
+
return (C, N) => (c(), v(Zt, {
|
|
5684
5684
|
form: a(o),
|
|
5685
5685
|
class: "flex h-full flex-col justify-between"
|
|
5686
5686
|
}, {
|
|
@@ -5938,7 +5938,7 @@ class ia {
|
|
|
5938
5938
|
return e?.errors !== void 0;
|
|
5939
5939
|
}
|
|
5940
5940
|
static isZodError(e) {
|
|
5941
|
-
return e instanceof
|
|
5941
|
+
return e instanceof F.ZodError;
|
|
5942
5942
|
}
|
|
5943
5943
|
}
|
|
5944
5944
|
const Un = /* @__PURE__ */ x({
|
|
@@ -8120,7 +8120,7 @@ const Q1 = { class: "w-full" }, W1 = /* @__PURE__ */ x({
|
|
|
8120
8120
|
return (w, C) => (c(), h("div", Q1, [
|
|
8121
8121
|
l(a(In), {
|
|
8122
8122
|
modelValue: r.value,
|
|
8123
|
-
"onUpdate:modelValue": C[0] || (C[0] = (
|
|
8123
|
+
"onUpdate:modelValue": C[0] || (C[0] = (N) => r.value = N),
|
|
8124
8124
|
"display-fn": a(Bt).formatName,
|
|
8125
8125
|
"get-item-config": g,
|
|
8126
8126
|
"is-loading": a(_).isFetching.value || (i.isExternalLoading ?? !1),
|
|
@@ -8136,7 +8136,7 @@ const Q1 = { class: "w-full" }, W1 = /* @__PURE__ */ x({
|
|
|
8136
8136
|
class: "mt-xs w-full",
|
|
8137
8137
|
size: "sm",
|
|
8138
8138
|
variant: "tertiary",
|
|
8139
|
-
onClick: C[1] || (C[1] = (
|
|
8139
|
+
onClick: C[1] || (C[1] = (N) => o("createNew"))
|
|
8140
8140
|
}, null, 8, ["label"])
|
|
8141
8141
|
]));
|
|
8142
8142
|
}
|
|
@@ -8749,13 +8749,13 @@ const df = { class: "w-full" }, mf = /* @__PURE__ */ x({
|
|
|
8749
8749
|
s.show(C.error);
|
|
8750
8750
|
return;
|
|
8751
8751
|
}
|
|
8752
|
-
const
|
|
8752
|
+
const N = C.value;
|
|
8753
8753
|
_.setValue({
|
|
8754
|
-
email:
|
|
8755
|
-
firstName:
|
|
8756
|
-
lastName:
|
|
8757
|
-
mobilePhone:
|
|
8758
|
-
phone:
|
|
8754
|
+
email: N.email,
|
|
8755
|
+
firstName: N.firstName,
|
|
8756
|
+
lastName: N.lastName,
|
|
8757
|
+
mobilePhone: N.mobilePhone,
|
|
8758
|
+
phone: N.phone
|
|
8759
8759
|
}), o("next");
|
|
8760
8760
|
}
|
|
8761
8761
|
function m() {
|
|
@@ -8770,7 +8770,7 @@ const df = { class: "w-full" }, mf = /* @__PURE__ */ x({
|
|
|
8770
8770
|
l(mf, {
|
|
8771
8771
|
modelValue: u.value,
|
|
8772
8772
|
"onUpdate:modelValue": [
|
|
8773
|
-
C[0] || (C[0] = (
|
|
8773
|
+
C[0] || (C[0] = (N) => u.value = N),
|
|
8774
8774
|
f
|
|
8775
8775
|
],
|
|
8776
8776
|
label: a(r).t("wise_crm.contact.create_dialog.form.contact_person"),
|
|
@@ -8811,7 +8811,7 @@ const df = { class: "w-full" }, mf = /* @__PURE__ */ x({
|
|
|
8811
8811
|
function w() {
|
|
8812
8812
|
i.form.blurAll(), d.isValid.value && _.isValid.value && m.isValid.value && f.isValid.value && o("next");
|
|
8813
8813
|
}
|
|
8814
|
-
return (C,
|
|
8814
|
+
return (C, N) => (c(), h(G, null, [
|
|
8815
8815
|
l(a(Te), null, {
|
|
8816
8816
|
default: p(() => [
|
|
8817
8817
|
l(a(Ae), null, {
|
|
@@ -9072,11 +9072,11 @@ const vi = /* @__PURE__ */ Ve(ff, [["render", bf]]), hf = { class: "text-xl font
|
|
|
9072
9072
|
},
|
|
9073
9073
|
emits: ["back"],
|
|
9074
9074
|
setup(n, { emit: e }) {
|
|
9075
|
-
const i = n, o = e, r = P(), s = ne(), u = k(() => s.getCustomFieldDefinitionForEntity(O.INDIVIDUAL).filter((
|
|
9075
|
+
const i = n, o = e, r = P(), s = ne(), u = k(() => s.getCustomFieldDefinitionForEntity(O.INDIVIDUAL).filter((N) => N.isDisplayedOnCreate)), d = i.form.register("firstName"), _ = i.form.register("lastName"), f = i.form.register("phone"), m = i.form.register("mobilePhone"), g = i.form.register("email"), w = i.form.register("address");
|
|
9076
9076
|
function C() {
|
|
9077
9077
|
o("back");
|
|
9078
9078
|
}
|
|
9079
|
-
return (
|
|
9079
|
+
return (N, V) => (c(), h(G, null, [
|
|
9080
9080
|
l(a(vt), null, {
|
|
9081
9081
|
default: p(() => [
|
|
9082
9082
|
l(a(Te), null, {
|
|
@@ -9206,13 +9206,13 @@ function If(n, e) {
|
|
|
9206
9206
|
n.src = e;
|
|
9207
9207
|
}
|
|
9208
9208
|
const Ef = (n) => {
|
|
9209
|
-
var e, i, o, r = "The Google Maps JavaScript API", s = "google", u = "importLibrary", d = "__ib__", _ = document, f = window, m = f[s] || (f[s] = {}), g = m.maps || (m.maps = {}), w = /* @__PURE__ */ new Set(), C = new URLSearchParams(),
|
|
9209
|
+
var e, i, o, r = "The Google Maps JavaScript API", s = "google", u = "importLibrary", d = "__ib__", _ = document, f = window, m = f[s] || (f[s] = {}), g = m.maps || (m.maps = {}), w = /* @__PURE__ */ new Set(), C = new URLSearchParams(), N = () => e || (e = new Promise(async (V, B) => {
|
|
9210
9210
|
await (i = _.createElement("script")), C.set("libraries", [...w] + "");
|
|
9211
9211
|
for (o in n)
|
|
9212
9212
|
C.set(o.replace(/[A-Z]/g, (R) => "_" + R[0].toLowerCase()), n[o]);
|
|
9213
|
-
C.set("callback", s + ".maps." + d), If(i, "https://maps.googleapis.com/maps/api/js?" + C), g[d] = V, i.onerror = () => e =
|
|
9213
|
+
C.set("callback", s + ".maps." + d), If(i, "https://maps.googleapis.com/maps/api/js?" + C), g[d] = V, i.onerror = () => e = B(Error(r + " could not load.")), i.nonce = _.querySelector("script[nonce]")?.nonce || "", _.head.append(i);
|
|
9214
9214
|
}));
|
|
9215
|
-
g[u] ? console.warn(r + " only loads once. Ignoring:", n) : g[u] = (V, ...
|
|
9215
|
+
g[u] ? console.warn(r + " only loads once. Ignoring:", n) : g[u] = (V, ...B) => w.add(V) && N().then(() => g[u](V, ...B));
|
|
9216
9216
|
}, Nf = (n) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(n)}) will be ignored.`, Af = (n) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(n)}) will be ignored.`, jf = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", Sf = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", yi = process.env.NODE_ENV !== "production", Tn = yi ? (n) => {
|
|
9217
9217
|
console.warn(`[@googlemaps/js-api-loader] ${n}`);
|
|
9218
9218
|
} : () => {
|
|
@@ -9324,7 +9324,7 @@ const Lf = /\./g;
|
|
|
9324
9324
|
function ki(n) {
|
|
9325
9325
|
const e = he(), i = ne(), o = _e(), r = Df(), s = Cn(), u = P(), {
|
|
9326
9326
|
geocodeAddress: d
|
|
9327
|
-
} = Mf(), _ = k(() => i.getCustomFieldDefinitionForEntity(O.BUSINESS).filter((
|
|
9327
|
+
} = Mf(), _ = k(() => i.getCustomFieldDefinitionForEntity(O.BUSINESS).filter((E) => E.isDisplayedOnCreate)), f = xe({
|
|
9328
9328
|
initialState: {
|
|
9329
9329
|
childUuid: null,
|
|
9330
9330
|
individualUuid: null,
|
|
@@ -9338,66 +9338,66 @@ function ki(n) {
|
|
|
9338
9338
|
vatNumber: null
|
|
9339
9339
|
},
|
|
9340
9340
|
schema: Tf(_.value),
|
|
9341
|
-
onSubmit: async (
|
|
9342
|
-
const
|
|
9343
|
-
body:
|
|
9341
|
+
onSubmit: async (E) => {
|
|
9342
|
+
const U = await r.execute({
|
|
9343
|
+
body: E
|
|
9344
9344
|
});
|
|
9345
|
-
if (
|
|
9346
|
-
e.show(
|
|
9345
|
+
if (U.isErr()) {
|
|
9346
|
+
e.show(U.error);
|
|
9347
9347
|
return;
|
|
9348
9348
|
}
|
|
9349
|
-
const
|
|
9349
|
+
const I = U.value;
|
|
9350
9350
|
if (n.onCreate) {
|
|
9351
|
-
n.onCreate(
|
|
9351
|
+
n.onCreate(I, E.name, O.BUSINESS), n.onClose();
|
|
9352
9352
|
return;
|
|
9353
9353
|
}
|
|
9354
|
-
o.openBusinessDetail(
|
|
9354
|
+
o.openBusinessDetail(I), n.onClose();
|
|
9355
9355
|
}
|
|
9356
|
-
}), m = f.register("name"), g = f.register("address"), w = f.register("companyNumber"), C = f.register("vatNumber"),
|
|
9356
|
+
}), m = f.register("name"), g = f.register("address"), w = f.register("companyNumber"), C = f.register("vatNumber"), N = q(!1), V = q(!1), B = q(!1);
|
|
9357
9357
|
async function R() {
|
|
9358
9358
|
if (!i.getConfig().businessConfig.viesValidation)
|
|
9359
9359
|
return;
|
|
9360
|
-
const
|
|
9361
|
-
if (
|
|
9360
|
+
const E = C.value.value;
|
|
9361
|
+
if (E === null || E.countryCode === Ye.BE)
|
|
9362
9362
|
return;
|
|
9363
|
-
|
|
9364
|
-
const
|
|
9365
|
-
if (
|
|
9366
|
-
e.show(
|
|
9363
|
+
B.value = !0;
|
|
9364
|
+
const U = await ke.checkVatNumber(E);
|
|
9365
|
+
if (B.value = !1, U.isErr()) {
|
|
9366
|
+
e.show(U.error);
|
|
9367
9367
|
return;
|
|
9368
9368
|
}
|
|
9369
|
-
|
|
9369
|
+
U.value.isValid || f.addErrors([
|
|
9370
9370
|
{
|
|
9371
9371
|
message: u.t("enum.api_error_code.invalid_vat_number"),
|
|
9372
9372
|
path: "vatNumber"
|
|
9373
9373
|
}
|
|
9374
9374
|
]);
|
|
9375
9375
|
}
|
|
9376
|
-
async function L(
|
|
9377
|
-
if (
|
|
9376
|
+
async function L(E) {
|
|
9377
|
+
if (E === null)
|
|
9378
9378
|
return !1;
|
|
9379
|
-
const
|
|
9379
|
+
const U = E.uuid.replace(Lf, "");
|
|
9380
9380
|
V.value = !0;
|
|
9381
|
-
const
|
|
9382
|
-
if (V.value = !1,
|
|
9383
|
-
return e.show(
|
|
9384
|
-
if (
|
|
9381
|
+
const I = await ke.checkVatNumberExistence(U, Ye.BE);
|
|
9382
|
+
if (V.value = !1, I.isErr())
|
|
9383
|
+
return e.show(I.error), !1;
|
|
9384
|
+
if (I.value !== null)
|
|
9385
9385
|
return s.show({
|
|
9386
9386
|
link: {
|
|
9387
9387
|
label: u.t("wise_crm.contact.create_dialog.business_already_exists_toast_link"),
|
|
9388
9388
|
to: {
|
|
9389
9389
|
name: "business-detail",
|
|
9390
9390
|
params: {
|
|
9391
|
-
businessUuid:
|
|
9391
|
+
businessUuid: I.value
|
|
9392
9392
|
}
|
|
9393
9393
|
}
|
|
9394
9394
|
},
|
|
9395
9395
|
message: u.t("wise_crm.contact.create_dialog.business_already_exists_toast_message")
|
|
9396
9396
|
}), !1;
|
|
9397
|
-
if (
|
|
9398
|
-
const H = await d(
|
|
9397
|
+
if (N.value = !0, m.setValue(E.name), E.address !== null) {
|
|
9398
|
+
const H = await d(E.address);
|
|
9399
9399
|
g.setValue({
|
|
9400
|
-
...
|
|
9400
|
+
...E.address,
|
|
9401
9401
|
coordinates: H ?? {
|
|
9402
9402
|
lat: null,
|
|
9403
9403
|
lng: null
|
|
@@ -9408,16 +9408,16 @@ function ki(n) {
|
|
|
9408
9408
|
g.setValue(null);
|
|
9409
9409
|
return C.setValue({
|
|
9410
9410
|
countryCode: Ye.BE,
|
|
9411
|
-
number:
|
|
9412
|
-
}), w.setValue(
|
|
9411
|
+
number: U
|
|
9412
|
+
}), w.setValue(U), await R(), !0;
|
|
9413
9413
|
}
|
|
9414
9414
|
function $() {
|
|
9415
|
-
m.setValue(null), g.setValue(null), w.setValue(null), C.setValue(null),
|
|
9415
|
+
m.setValue(null), g.setValue(null), w.setValue(null), C.setValue(null), N.value = !1;
|
|
9416
9416
|
}
|
|
9417
9417
|
return {
|
|
9418
9418
|
isCheckingExistence: V,
|
|
9419
|
-
isCheckingVatNumber:
|
|
9420
|
-
isDataFromCbe:
|
|
9419
|
+
isCheckingVatNumber: B,
|
|
9420
|
+
isDataFromCbe: N,
|
|
9421
9421
|
checkVatNumberValidity: R,
|
|
9422
9422
|
form: f,
|
|
9423
9423
|
onCreateNewBusiness: $,
|
|
@@ -9434,31 +9434,31 @@ function qf() {
|
|
|
9434
9434
|
}
|
|
9435
9435
|
});
|
|
9436
9436
|
}
|
|
9437
|
-
|
|
9437
|
+
F.object({
|
|
9438
9438
|
address: se.nullable(),
|
|
9439
|
-
email:
|
|
9440
|
-
firstName:
|
|
9441
|
-
lastName:
|
|
9439
|
+
email: F.string().email().nullable(),
|
|
9440
|
+
firstName: F.string().min(1),
|
|
9441
|
+
lastName: F.string().min(1),
|
|
9442
9442
|
mobilePhone: ue.nullable(),
|
|
9443
9443
|
phone: ue.nullable()
|
|
9444
9444
|
}).superRefine((n, e) => {
|
|
9445
9445
|
n.email !== null && n.email !== "" || n.mobilePhone !== null && n.mobilePhone !== "" || n.phone !== null && n.phone !== "" || e.addIssue({
|
|
9446
|
-
code:
|
|
9446
|
+
code: F.ZodIssueCode.custom,
|
|
9447
9447
|
message: Qe.global.t("wise_crm.contact.create_dialog.form.errors.at_least_one_contact_info")
|
|
9448
9448
|
});
|
|
9449
9449
|
});
|
|
9450
9450
|
function $f(n) {
|
|
9451
|
-
return
|
|
9451
|
+
return F.object({
|
|
9452
9452
|
address: se.nullable(),
|
|
9453
|
-
customFields:
|
|
9454
|
-
email:
|
|
9455
|
-
firstName:
|
|
9456
|
-
lastName:
|
|
9453
|
+
customFields: F.object(Je.getZodType(n)).nullable(),
|
|
9454
|
+
email: F.string().email().nullable(),
|
|
9455
|
+
firstName: F.string().min(1),
|
|
9456
|
+
lastName: F.string().min(1),
|
|
9457
9457
|
mobilePhone: ue.nullable(),
|
|
9458
9458
|
phone: ue.nullable()
|
|
9459
9459
|
}).superRefine((e, i) => {
|
|
9460
9460
|
e.email !== null && e.email !== "" || e.mobilePhone !== null && e.mobilePhone !== "" || e.phone !== null && e.phone !== "" || i.addIssue({
|
|
9461
|
-
code:
|
|
9461
|
+
code: F.ZodIssueCode.custom,
|
|
9462
9462
|
message: Qe.global.t("wise_crm.contact.create_dialog.form.errors.at_least_one_contact_info")
|
|
9463
9463
|
});
|
|
9464
9464
|
});
|
|
@@ -9523,20 +9523,20 @@ const xi = /* @__PURE__ */ x({
|
|
|
9523
9523
|
isCheckingVatNumber: g,
|
|
9524
9524
|
isDataFromCbe: w,
|
|
9525
9525
|
checkVatNumberValidity: C,
|
|
9526
|
-
form:
|
|
9526
|
+
form: N,
|
|
9527
9527
|
onCreateNewBusiness: V,
|
|
9528
|
-
onUpdateCbeSearchItem:
|
|
9528
|
+
onUpdateCbeSearchItem: B
|
|
9529
9529
|
} = ki({
|
|
9530
9530
|
onClose: _,
|
|
9531
9531
|
onCreate: i.onCreate
|
|
9532
9532
|
}), R = k(
|
|
9533
9533
|
() => s.getEntityConfig(u.value ?? O.INDIVIDUAL)
|
|
9534
|
-
), L = k(() => u.value === O.INDIVIDUAL), $ = k(() => L.value ? f :
|
|
9535
|
-
function
|
|
9534
|
+
), L = k(() => u.value === O.INDIVIDUAL), $ = k(() => L.value ? f : N), E = q(!1);
|
|
9535
|
+
function U() {
|
|
9536
9536
|
d.goToNext();
|
|
9537
9537
|
}
|
|
9538
|
-
function
|
|
9539
|
-
|
|
9538
|
+
function I(H) {
|
|
9539
|
+
E.value = H === "manual_contact_person" || H === "search_contact_person";
|
|
9540
9540
|
}
|
|
9541
9541
|
return (H, de) => (c(), v(a(Rt), {
|
|
9542
9542
|
form: $.value,
|
|
@@ -9549,14 +9549,14 @@ const xi = /* @__PURE__ */ x({
|
|
|
9549
9549
|
key: 0,
|
|
9550
9550
|
modelValue: u.value,
|
|
9551
9551
|
"onUpdate:modelValue": de[0] || (de[0] = (J) => u.value = J),
|
|
9552
|
-
onNext:
|
|
9552
|
+
onNext: U
|
|
9553
9553
|
}, null, 8, ["modelValue"])) : M("", !0),
|
|
9554
9554
|
a(d).current.value === "form" && u.value ? (c(), h(G, { key: 1 }, [
|
|
9555
9555
|
l(kt, {
|
|
9556
9556
|
color: R.value?.color ?? null
|
|
9557
9557
|
}, {
|
|
9558
9558
|
default: p(() => [
|
|
9559
|
-
|
|
9559
|
+
E.value ? (c(), v(a(Ee), {
|
|
9560
9560
|
key: 1,
|
|
9561
9561
|
title: a(r).t("wise_crm.contact.create_dialog.form.contact_person_title"),
|
|
9562
9562
|
description: a(r).t("wise_crm.contact.create_dialog.form.contact_person_description")
|
|
@@ -9575,14 +9575,14 @@ const xi = /* @__PURE__ */ x({
|
|
|
9575
9575
|
}, null, 8, ["form", "onBack"])) : (c(), v(hi, {
|
|
9576
9576
|
key: 1,
|
|
9577
9577
|
"check-vat-number-validity": a(C),
|
|
9578
|
-
form: a(
|
|
9578
|
+
form: a(N),
|
|
9579
9579
|
"is-checking-existence": a(m),
|
|
9580
9580
|
"is-checking-vat-number": a(g),
|
|
9581
9581
|
"is-data-from-cbe": a(w),
|
|
9582
|
-
"on-update-cbe-search-item": a(
|
|
9582
|
+
"on-update-cbe-search-item": a(B),
|
|
9583
9583
|
onBack: a(d).goToPrevious,
|
|
9584
9584
|
onCreateNewBusiness: a(V),
|
|
9585
|
-
onStepChange:
|
|
9585
|
+
onStepChange: I
|
|
9586
9586
|
}, null, 8, ["check-vat-number-validity", "form", "is-checking-existence", "is-checking-vat-number", "is-data-from-cbe", "on-update-cbe-search-item", "onBack", "onCreateNewBusiness"]))
|
|
9587
9587
|
], 64)) : M("", !0)
|
|
9588
9588
|
]),
|
|
@@ -10199,75 +10199,75 @@ const Ii = /* @__PURE__ */ x({
|
|
|
10199
10199
|
},
|
|
10200
10200
|
emits: ["close", "select"],
|
|
10201
10201
|
setup(n, { emit: e }) {
|
|
10202
|
-
const i = n, o = e, r = P(), s = _e(), u = q(""), d = q(""), _ = En((
|
|
10203
|
-
u.value =
|
|
10202
|
+
const i = n, o = e, r = P(), s = _e(), u = q(""), d = q(""), _ = En((E) => {
|
|
10203
|
+
u.value = E;
|
|
10204
10204
|
}, 300);
|
|
10205
|
-
we(d, (
|
|
10206
|
-
_(
|
|
10205
|
+
we(d, (E) => {
|
|
10206
|
+
_(E);
|
|
10207
10207
|
});
|
|
10208
10208
|
const f = [
|
|
10209
|
-
"
|
|
10210
|
-
"
|
|
10209
|
+
"business",
|
|
10210
|
+
"individual"
|
|
10211
10211
|
], m = Dg(
|
|
10212
10212
|
k(() => u.value),
|
|
10213
10213
|
k(() => f ?? [])
|
|
10214
|
-
), g = k(() => (m.result.value.isOk() ? m.result.value.getValue().data : []).map((
|
|
10215
|
-
id:
|
|
10216
|
-
address:
|
|
10214
|
+
), g = k(() => (m.result.value.isOk() ? m.result.value.getValue().data : []).toSorted((I, H) => f.indexOf(I.collection) - f.indexOf(H.collection)).map((I) => I.entity.type === "individual" ? {
|
|
10215
|
+
id: I.entity.uuid,
|
|
10216
|
+
address: I.entity.address ? w(I.entity.address) : null,
|
|
10217
10217
|
description: s.getEntityConfig(O.INDIVIDUAL)?.name ?? `${r.t("wise_crm.search.individual_label")}`,
|
|
10218
|
-
email:
|
|
10219
|
-
entity:
|
|
10218
|
+
email: I.entity.email,
|
|
10219
|
+
entity: I.entity,
|
|
10220
10220
|
icon: Ke,
|
|
10221
|
-
label:
|
|
10222
|
-
type:
|
|
10223
|
-
} :
|
|
10224
|
-
id:
|
|
10225
|
-
address:
|
|
10221
|
+
label: I.entity.name,
|
|
10222
|
+
type: I.collection
|
|
10223
|
+
} : I.entity.type === "business" ? {
|
|
10224
|
+
id: I.entity.uuid,
|
|
10225
|
+
address: I.entity.address ? w(I.entity.address) : null,
|
|
10226
10226
|
description: s.getEntityConfig(O.BUSINESS)?.name ?? `${r.t("wise_crm.search.business_label")}`,
|
|
10227
10227
|
email: null,
|
|
10228
|
-
entity:
|
|
10228
|
+
entity: I.entity,
|
|
10229
10229
|
icon: pt,
|
|
10230
|
-
label:
|
|
10231
|
-
parentName:
|
|
10232
|
-
type:
|
|
10230
|
+
label: I.entity.name,
|
|
10231
|
+
parentName: I.entity.parentName,
|
|
10232
|
+
type: I.collection
|
|
10233
10233
|
} : {
|
|
10234
|
-
id:
|
|
10234
|
+
id: I.entity.uuid,
|
|
10235
10235
|
address: null,
|
|
10236
10236
|
email: null,
|
|
10237
|
-
entity:
|
|
10237
|
+
entity: I.entity,
|
|
10238
10238
|
icon: Aa,
|
|
10239
|
-
label:
|
|
10240
|
-
type:
|
|
10239
|
+
label: I.entity.name,
|
|
10240
|
+
type: I.collection
|
|
10241
10241
|
}));
|
|
10242
|
-
function w(
|
|
10242
|
+
function w(E) {
|
|
10243
10243
|
return {
|
|
10244
|
-
placeId:
|
|
10245
|
-
bus:
|
|
10246
|
-
city:
|
|
10244
|
+
placeId: E.placeId,
|
|
10245
|
+
bus: E.unit ?? "",
|
|
10246
|
+
city: E.city ?? "",
|
|
10247
10247
|
coordinates: {
|
|
10248
|
-
lat:
|
|
10249
|
-
lng:
|
|
10248
|
+
lat: E?.coordinates?.latitude ?? null,
|
|
10249
|
+
lng: E?.coordinates?.longitude ?? null
|
|
10250
10250
|
},
|
|
10251
|
-
country:
|
|
10252
|
-
postalCode:
|
|
10253
|
-
street:
|
|
10254
|
-
streetNumber:
|
|
10251
|
+
country: E.country ?? "",
|
|
10252
|
+
postalCode: E.postalCode ?? "",
|
|
10253
|
+
street: E.streetName ?? "",
|
|
10254
|
+
streetNumber: E.streetNumber ?? ""
|
|
10255
10255
|
};
|
|
10256
10256
|
}
|
|
10257
|
-
const C = q(null),
|
|
10258
|
-
function
|
|
10259
|
-
o("select",
|
|
10257
|
+
const C = q(null), N = k(() => u.value.length > 0), V = k(() => N.value && !m.isLoading.value && g.value.length === 0);
|
|
10258
|
+
function B(E) {
|
|
10259
|
+
o("select", E.entity.type, E.id);
|
|
10260
10260
|
}
|
|
10261
10261
|
function R() {
|
|
10262
10262
|
i.onCreateNewContact();
|
|
10263
10263
|
}
|
|
10264
|
-
function L(
|
|
10265
|
-
return
|
|
10264
|
+
function L(E) {
|
|
10265
|
+
return E === C.value;
|
|
10266
10266
|
}
|
|
10267
|
-
function $(
|
|
10268
|
-
C.value =
|
|
10267
|
+
function $(E) {
|
|
10268
|
+
C.value = E ?? null;
|
|
10269
10269
|
}
|
|
10270
|
-
return (
|
|
10270
|
+
return (E, U) => (c(), v(Ig, null, {
|
|
10271
10271
|
default: p(() => [
|
|
10272
10272
|
y("div", Ng, [
|
|
10273
10273
|
y("div", Ag, [
|
|
@@ -10279,19 +10279,19 @@ const Ii = /* @__PURE__ */ x({
|
|
|
10279
10279
|
default: p(() => [
|
|
10280
10280
|
l(a(fl), {
|
|
10281
10281
|
class: "flex-1",
|
|
10282
|
-
onHighlight:
|
|
10282
|
+
onHighlight: U[2] || (U[2] = (I) => $(I?.value?.toString()))
|
|
10283
10283
|
}, {
|
|
10284
10284
|
default: p(() => [
|
|
10285
10285
|
y("div", jg, [
|
|
10286
10286
|
l(a(Sn), { class: "size-4 shrink-0 text-quaternary" }),
|
|
10287
10287
|
l(a(gl), {
|
|
10288
10288
|
modelValue: d.value,
|
|
10289
|
-
"onUpdate:modelValue":
|
|
10289
|
+
"onUpdate:modelValue": U[0] || (U[0] = (I) => d.value = I),
|
|
10290
10290
|
placeholder: a(r).t("wise_crm.search.placeholder"),
|
|
10291
10291
|
class: "w-full bg-transparent py-md text-sm text-primary outline-none placeholder:text-placeholder"
|
|
10292
10292
|
}, null, 8, ["modelValue", "placeholder"])
|
|
10293
10293
|
]),
|
|
10294
|
-
|
|
10294
|
+
N.value ? (c(), h("div", Sg, [
|
|
10295
10295
|
l(Ii, { class: "mt-2" }),
|
|
10296
10296
|
g.value.length > 0 ? (c(), v(a(bl), { key: 0 }, {
|
|
10297
10297
|
default: p(() => [
|
|
@@ -10300,23 +10300,23 @@ const Ii = /* @__PURE__ */ x({
|
|
|
10300
10300
|
class: "max-h-80 p-sm"
|
|
10301
10301
|
}, {
|
|
10302
10302
|
default: p(() => [
|
|
10303
|
-
(c(!0), h(G, null, ce(g.value, (
|
|
10304
|
-
key:
|
|
10305
|
-
value:
|
|
10303
|
+
(c(!0), h(G, null, ce(g.value, (I) => (c(), v(a(hl), {
|
|
10304
|
+
key: I.id,
|
|
10305
|
+
value: I.id,
|
|
10306
10306
|
class: ae([[
|
|
10307
|
-
L(
|
|
10307
|
+
L(I.id) ? "bg-secondary" : ""
|
|
10308
10308
|
], "flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors hover:bg-secondary focus:bg-secondary focus:outline-none"]),
|
|
10309
|
-
onClick: (H) =>
|
|
10309
|
+
onClick: (H) => B(I)
|
|
10310
10310
|
}, {
|
|
10311
10311
|
default: p(() => [
|
|
10312
|
-
(c(), v(be(
|
|
10312
|
+
(c(), v(be(I.icon), { class: "size-4 text-tertiary" })),
|
|
10313
10313
|
y("div", Fg, [
|
|
10314
|
-
y("div", Bg, T(
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
y("p", null, T(
|
|
10318
|
-
|
|
10319
|
-
|
|
10314
|
+
y("div", Bg, T(I.label), 1),
|
|
10315
|
+
I.description ? (c(), h("div", Ug, [
|
|
10316
|
+
I.parentName ? (c(), h("p", zg, T(I.parentName), 1)) : M("", !0),
|
|
10317
|
+
y("p", null, T(I.description), 1),
|
|
10318
|
+
I.email ? (c(), h("p", Pg, T(I.email), 1)) : M("", !0),
|
|
10319
|
+
I.address ? (c(), h("p", Mg, T(a(bn).formatShort(I.address)), 1)) : M("", !0)
|
|
10320
10320
|
])) : M("", !0)
|
|
10321
10321
|
])
|
|
10322
10322
|
]),
|
|
@@ -10331,7 +10331,7 @@ const Ii = /* @__PURE__ */ x({
|
|
|
10331
10331
|
key: 1,
|
|
10332
10332
|
"search-term": u.value,
|
|
10333
10333
|
onCreateNewContact: R,
|
|
10334
|
-
onClearSearch:
|
|
10334
|
+
onClearSearch: U[1] || (U[1] = (I) => d.value = "")
|
|
10335
10335
|
}, null, 8, ["search-term"])) : a(m).isLoading ? (c(), h("div", Tg, [
|
|
10336
10336
|
y("div", Lg, T(a(r).t("wise_crm.search.searching")), 1)
|
|
10337
10337
|
])) : M("", !0)
|
|
@@ -10466,8 +10466,8 @@ const Ii = /* @__PURE__ */ x({
|
|
|
10466
10466
|
function _() {
|
|
10467
10467
|
r.value = !1;
|
|
10468
10468
|
}
|
|
10469
|
-
function f(C,
|
|
10470
|
-
r.value = !1, i("select", C,
|
|
10469
|
+
function f(C, N) {
|
|
10470
|
+
r.value = !1, i("select", C, N);
|
|
10471
10471
|
}
|
|
10472
10472
|
function m() {
|
|
10473
10473
|
u.open();
|
|
@@ -10482,7 +10482,7 @@ const Ii = /* @__PURE__ */ x({
|
|
|
10482
10482
|
entityType: O.BUSINESS
|
|
10483
10483
|
});
|
|
10484
10484
|
}
|
|
10485
|
-
return (C,
|
|
10485
|
+
return (C, N) => (c(), h(G, null, [
|
|
10486
10486
|
l(a(Vn), {
|
|
10487
10487
|
gap: "sm",
|
|
10488
10488
|
align: "start"
|
|
@@ -10510,7 +10510,7 @@ const Ii = /* @__PURE__ */ x({
|
|
|
10510
10510
|
}),
|
|
10511
10511
|
l(Rg, {
|
|
10512
10512
|
"is-open": r.value,
|
|
10513
|
-
"onUpdate:isOpen":
|
|
10513
|
+
"onUpdate:isOpen": N[0] || (N[0] = (V) => r.value = V),
|
|
10514
10514
|
"on-create-new-contact": m,
|
|
10515
10515
|
onClose: _,
|
|
10516
10516
|
onSelect: f
|
|
@@ -11375,7 +11375,7 @@ const yb = /* @__PURE__ */ Ve(bb, [["render", vb]]), wb = { class: "h-full" }, C
|
|
|
11375
11375
|
"bg-tertiary": a(u)?.isActive(w.id, w.isActiveOptions)
|
|
11376
11376
|
}, "rounded-md p-xs text-secondary transition-colors hover:bg-tertiary hover:text-primary"]),
|
|
11377
11377
|
type: "button",
|
|
11378
|
-
onClick: (
|
|
11378
|
+
onClick: (N) => w.onClick()
|
|
11379
11379
|
}, [
|
|
11380
11380
|
(c(), v(be(w.icon), { class: "size-4" }))
|
|
11381
11381
|
], 10, Db))), 128))
|
|
@@ -12238,21 +12238,21 @@ const Wb = {
|
|
|
12238
12238
|
mimeType: b.string(),
|
|
12239
12239
|
order: b.number(),
|
|
12240
12240
|
url: b.string().nullable()
|
|
12241
|
-
}), u0 =
|
|
12242
|
-
clientId:
|
|
12243
|
-
uuid:
|
|
12244
|
-
type:
|
|
12241
|
+
}), u0 = F.uuid().brand("MailTemplateUuid"), d0 = F.object({
|
|
12242
|
+
clientId: F.object({
|
|
12243
|
+
uuid: F.uuid(),
|
|
12244
|
+
type: F.enum(bt)
|
|
12245
12245
|
}),
|
|
12246
|
-
dealUuid:
|
|
12246
|
+
dealUuid: F.uuid(),
|
|
12247
12247
|
mailTemplateUuid: u0,
|
|
12248
12248
|
attachments: Ui.array(),
|
|
12249
|
-
bcc:
|
|
12250
|
-
cc:
|
|
12251
|
-
from:
|
|
12252
|
-
replyTo:
|
|
12253
|
-
subject:
|
|
12254
|
-
text:
|
|
12255
|
-
to:
|
|
12249
|
+
bcc: F.array(F.email()).nullable(),
|
|
12250
|
+
cc: F.array(F.email()).nullable(),
|
|
12251
|
+
from: F.email().nullable(),
|
|
12252
|
+
replyTo: F.email().nullable(),
|
|
12253
|
+
subject: F.string().min(1),
|
|
12254
|
+
text: F.string().min(1),
|
|
12255
|
+
to: F.array(F.email()).min(1)
|
|
12256
12256
|
}), m0 = {
|
|
12257
12257
|
key: 0,
|
|
12258
12258
|
class: "p-xl"
|
|
@@ -12277,19 +12277,19 @@ const Wb = {
|
|
|
12277
12277
|
k(() => i.dealUuid)
|
|
12278
12278
|
), g = ub(
|
|
12279
12279
|
k(() => i.dealUuid)
|
|
12280
|
-
), w = k(() => m.result.value.isOk() ? m.result.value.getValue().dealLanguage ?? He.NL_BE : He.NL_BE), C = k(() => m.result.value.isOk() ? m.result.value.getValue().dealNumber : null),
|
|
12280
|
+
), w = k(() => m.result.value.isOk() ? m.result.value.getValue().dealLanguage ?? He.NL_BE : He.NL_BE), C = k(() => m.result.value.isOk() ? m.result.value.getValue().dealNumber : null), N = k(() => g.result.value.isOk() ? g.result.value.getValue().to : []), V = k(() => g.result.value.isOk() ? g.result.value.getValue().cc : []), B = k(() => g.result.value.isOk() ? g.result.value.getValue().bcc : []), R = k(() => {
|
|
12281
12281
|
if (!m.result.value.isOk())
|
|
12282
|
-
return
|
|
12282
|
+
return N.value;
|
|
12283
12283
|
const X = m.result.value.getValue().contactPersons.toSorted((le, It) => Number(It.isPrimary) - Number(le.isPrimary)).map((le) => le.email).filter((le) => le !== null);
|
|
12284
12284
|
return Ie.unique([
|
|
12285
12285
|
...X,
|
|
12286
|
-
...
|
|
12286
|
+
...N.value
|
|
12287
12287
|
]);
|
|
12288
12288
|
}), L = fb(
|
|
12289
12289
|
k(() => i.templateKey)
|
|
12290
|
-
), $ = k(() => L.result.value.isOk() ? L.result.value.getValue() : null),
|
|
12290
|
+
), $ = k(() => L.result.value.isOk() ? L.result.value.getValue() : null), E = k(() => $.value === null ? 0 : $.value.locales.findIndex(
|
|
12291
12291
|
(J) => J.language === w.value
|
|
12292
|
-
)),
|
|
12292
|
+
)), U = xe({
|
|
12293
12293
|
initialState: k(() => {
|
|
12294
12294
|
if ($.value === null)
|
|
12295
12295
|
return null;
|
|
@@ -12298,7 +12298,7 @@ const Wb = {
|
|
|
12298
12298
|
...V.value
|
|
12299
12299
|
], J), le = Ie.unique([
|
|
12300
12300
|
...$.value.defaultBCC ?? [],
|
|
12301
|
-
...
|
|
12301
|
+
...B.value
|
|
12302
12302
|
], [
|
|
12303
12303
|
...J,
|
|
12304
12304
|
...X
|
|
@@ -12311,14 +12311,14 @@ const Wb = {
|
|
|
12311
12311
|
dealUuid: i.dealUuid,
|
|
12312
12312
|
mailTemplateUuid: $.value.uuid,
|
|
12313
12313
|
attachments: [
|
|
12314
|
-
...$.value.locales[
|
|
12314
|
+
...$.value.locales[E.value]?.attachments.map(an.toForm) ?? []
|
|
12315
12315
|
],
|
|
12316
12316
|
bcc: le,
|
|
12317
12317
|
cc: X,
|
|
12318
12318
|
from: null,
|
|
12319
12319
|
replyTo: null,
|
|
12320
|
-
subject:
|
|
12321
|
-
text: $.value.locales[
|
|
12320
|
+
subject: I($.value.locales[E.value]?.subject ?? null),
|
|
12321
|
+
text: $.value.locales[E.value]?.message ?? null,
|
|
12322
12322
|
to: J
|
|
12323
12323
|
};
|
|
12324
12324
|
}),
|
|
@@ -12338,7 +12338,7 @@ const Wb = {
|
|
|
12338
12338
|
H();
|
|
12339
12339
|
}
|
|
12340
12340
|
});
|
|
12341
|
-
function
|
|
12341
|
+
function I(J) {
|
|
12342
12342
|
return J === null || C.value === null ? J : `${J} [${C.value}]`;
|
|
12343
12343
|
}
|
|
12344
12344
|
function H() {
|
|
@@ -12357,7 +12357,7 @@ const Wb = {
|
|
|
12357
12357
|
return We(async () => {
|
|
12358
12358
|
await de();
|
|
12359
12359
|
}), (J, X) => (c(), v(a(Rt), {
|
|
12360
|
-
form: a(
|
|
12360
|
+
form: a(U),
|
|
12361
12361
|
size: "xl",
|
|
12362
12362
|
onClose: H
|
|
12363
12363
|
}, {
|
|
@@ -12377,7 +12377,7 @@ const Wb = {
|
|
|
12377
12377
|
])) : $.value !== null && a(m).result.value.isOk() ? (c(), v(Ai, { key: 1 }, {
|
|
12378
12378
|
default: p(() => [
|
|
12379
12379
|
l(c0, {
|
|
12380
|
-
form: a(
|
|
12380
|
+
form: a(U),
|
|
12381
12381
|
"external-attachments": f.value
|
|
12382
12382
|
}, null, 8, ["form", "external-attachments"])
|
|
12383
12383
|
]),
|
|
@@ -12396,7 +12396,7 @@ const Wb = {
|
|
|
12396
12396
|
onClick: H
|
|
12397
12397
|
}, null, 8, ["label"]),
|
|
12398
12398
|
l(a(ut), {
|
|
12399
|
-
"is-loading": a(
|
|
12399
|
+
"is-loading": a(U).isSubmitting.value,
|
|
12400
12400
|
"is-disabled": d.value,
|
|
12401
12401
|
label: a(r).t("wise_crm.form.send")
|
|
12402
12402
|
}, null, 8, ["is-loading", "is-disabled", "label"])
|
|
@@ -12529,7 +12529,7 @@ function k0() {
|
|
|
12529
12529
|
const w = new Intl.RelativeTimeFormat(n.value, {
|
|
12530
12530
|
numeric: "auto",
|
|
12531
12531
|
style: "long"
|
|
12532
|
-
}), C = m.epochMilliseconds - g.epochMilliseconds,
|
|
12532
|
+
}), C = m.epochMilliseconds - g.epochMilliseconds, N = [
|
|
12533
12533
|
{
|
|
12534
12534
|
ms: 1e3 * 60 * 60 * 24 * 365,
|
|
12535
12535
|
unit: "year"
|
|
@@ -12559,11 +12559,11 @@ function k0() {
|
|
|
12559
12559
|
return e("shared.time_format.now");
|
|
12560
12560
|
for (const {
|
|
12561
12561
|
ms: V,
|
|
12562
|
-
unit:
|
|
12563
|
-
} of
|
|
12562
|
+
unit: B
|
|
12563
|
+
} of N) {
|
|
12564
12564
|
const R = Math.round(C / V);
|
|
12565
12565
|
if (Math.abs(R) >= 1)
|
|
12566
|
-
return w.format(R,
|
|
12566
|
+
return w.format(R, B);
|
|
12567
12567
|
}
|
|
12568
12568
|
return w.format(0, "second");
|
|
12569
12569
|
}
|
|
@@ -12572,7 +12572,7 @@ function k0() {
|
|
|
12572
12572
|
seconds: m
|
|
12573
12573
|
}), {
|
|
12574
12574
|
hours: C,
|
|
12575
|
-
minutes:
|
|
12575
|
+
minutes: N,
|
|
12576
12576
|
seconds: V
|
|
12577
12577
|
} = w;
|
|
12578
12578
|
if (m < 60)
|
|
@@ -12581,7 +12581,7 @@ function k0() {
|
|
|
12581
12581
|
unit: "second",
|
|
12582
12582
|
unitDisplay: g
|
|
12583
12583
|
}).format(V);
|
|
12584
|
-
const
|
|
12584
|
+
const B = new Intl.NumberFormat(n.value, {
|
|
12585
12585
|
style: "unit",
|
|
12586
12586
|
unit: "hour",
|
|
12587
12587
|
unitDisplay: "narrow"
|
|
@@ -12589,8 +12589,8 @@ function k0() {
|
|
|
12589
12589
|
style: "unit",
|
|
12590
12590
|
unit: "minute",
|
|
12591
12591
|
unitDisplay: C === 0 ? "long" : "narrow"
|
|
12592
|
-
}).format(
|
|
12593
|
-
return C === 0 ? R :
|
|
12592
|
+
}).format(N);
|
|
12593
|
+
return C === 0 ? R : N === 0 ? B : `${B} ${R}`;
|
|
12594
12594
|
}
|
|
12595
12595
|
return {
|
|
12596
12596
|
toDate: u,
|
|
@@ -12857,7 +12857,7 @@ const M0 = /* @__PURE__ */ x({
|
|
|
12857
12857
|
const g = nt(Object.values(He)), w = nt(Object.values(fa));
|
|
12858
12858
|
return We(() => {
|
|
12859
12859
|
s.setValue(`${i.t("wise_crm.deal.form.fields.quote")}: ${e.form.state.value.clientId?.name}`);
|
|
12860
|
-
}), (C,
|
|
12860
|
+
}), (C, N) => (c(), v(a(Te), null, {
|
|
12861
12861
|
default: p(() => [
|
|
12862
12862
|
l(a(Ae), null, {
|
|
12863
12863
|
default: p(() => [
|
|
@@ -12939,7 +12939,7 @@ const M0 = /* @__PURE__ */ x({
|
|
|
12939
12939
|
business: L,
|
|
12940
12940
|
type: "business"
|
|
12941
12941
|
})));
|
|
12942
|
-
}),
|
|
12942
|
+
}), N = k({
|
|
12943
12943
|
get: () => s.value === null ? null : {
|
|
12944
12944
|
business: s.value,
|
|
12945
12945
|
type: "business"
|
|
@@ -12952,16 +12952,16 @@ const M0 = /* @__PURE__ */ x({
|
|
|
12952
12952
|
s.value = L?.business ?? null;
|
|
12953
12953
|
}
|
|
12954
12954
|
}), V = k(() => _.isFetching.value || g.isFetching.value || (i.isExternalLoading ?? !1));
|
|
12955
|
-
function
|
|
12955
|
+
function B(L) {
|
|
12956
12956
|
return L.type === "cbe" ? Bt.formatName(L.cbeEnterprise) : L.business.name;
|
|
12957
12957
|
}
|
|
12958
12958
|
function R(L) {
|
|
12959
12959
|
if (L.type === "cbe") {
|
|
12960
|
-
const
|
|
12960
|
+
const E = Bt.formatDescription(L.cbeEnterprise);
|
|
12961
12961
|
return {
|
|
12962
|
-
description:
|
|
12962
|
+
description: E !== null ? {
|
|
12963
12963
|
layout: "block",
|
|
12964
|
-
value:
|
|
12964
|
+
value: E
|
|
12965
12965
|
} : null,
|
|
12966
12966
|
right: {
|
|
12967
12967
|
text: r.t("wise_crm.business.autocomplete.cbe_result_label"),
|
|
@@ -12982,9 +12982,9 @@ const M0 = /* @__PURE__ */ x({
|
|
|
12982
12982
|
}
|
|
12983
12983
|
return (L, $) => (c(), h("div", T0, [
|
|
12984
12984
|
l(a(In), {
|
|
12985
|
-
modelValue:
|
|
12986
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
12987
|
-
"display-fn":
|
|
12985
|
+
modelValue: N.value,
|
|
12986
|
+
"onUpdate:modelValue": $[0] || ($[0] = (E) => N.value = E),
|
|
12987
|
+
"display-fn": B,
|
|
12988
12988
|
"get-item-config": R,
|
|
12989
12989
|
"error-message": i.errorMessage,
|
|
12990
12990
|
"is-loading": V.value,
|
|
@@ -12994,7 +12994,7 @@ const M0 = /* @__PURE__ */ x({
|
|
|
12994
12994
|
label: i.label,
|
|
12995
12995
|
placeholder: a(r).t("component.select.search_placeholder"),
|
|
12996
12996
|
"search-mode": "remote",
|
|
12997
|
-
onBlur: $[1] || ($[1] = (
|
|
12997
|
+
onBlur: $[1] || ($[1] = (E) => o("blur")),
|
|
12998
12998
|
"onUpdate:search": a(w)
|
|
12999
12999
|
}, null, 8, ["modelValue", "error-message", "is-loading", "is-required", "is-touched", "items", "label", "placeholder", "onUpdate:search"]),
|
|
13000
13000
|
l(a(Y), {
|
|
@@ -13002,7 +13002,7 @@ const M0 = /* @__PURE__ */ x({
|
|
|
13002
13002
|
class: "mt-xs w-full",
|
|
13003
13003
|
size: "sm",
|
|
13004
13004
|
variant: "tertiary",
|
|
13005
|
-
onClick: $[2] || ($[2] = (
|
|
13005
|
+
onClick: $[2] || ($[2] = (E) => o("createNew"))
|
|
13006
13006
|
}, null, 8, ["label"])
|
|
13007
13007
|
]));
|
|
13008
13008
|
}
|
|
@@ -13093,15 +13093,15 @@ const M0 = /* @__PURE__ */ x({
|
|
|
13093
13093
|
_: 1
|
|
13094
13094
|
}, 8, ["form"]));
|
|
13095
13095
|
}
|
|
13096
|
-
}), R0 =
|
|
13097
|
-
clientId:
|
|
13098
|
-
uuid:
|
|
13099
|
-
name:
|
|
13100
|
-
type:
|
|
13096
|
+
}), R0 = F.object({
|
|
13097
|
+
clientId: F.object({
|
|
13098
|
+
uuid: F.uuid(),
|
|
13099
|
+
name: F.string(),
|
|
13100
|
+
type: F.enum(bt)
|
|
13101
13101
|
}),
|
|
13102
|
-
name:
|
|
13103
|
-
dealLanguage:
|
|
13104
|
-
dealSource:
|
|
13102
|
+
name: F.string().min(1),
|
|
13103
|
+
dealLanguage: F.enum(He),
|
|
13104
|
+
dealSource: F.enum(fa)
|
|
13105
13105
|
}), O0 = { key: 0 }, H0 = /* @__PURE__ */ x({
|
|
13106
13106
|
__name: "DealCreateDialog",
|
|
13107
13107
|
emits: ["close"],
|
|
@@ -13129,17 +13129,17 @@ const M0 = /* @__PURE__ */ x({
|
|
|
13129
13129
|
isValid: () => g.value
|
|
13130
13130
|
}
|
|
13131
13131
|
]), C = B0(w);
|
|
13132
|
-
function
|
|
13132
|
+
function N() {
|
|
13133
13133
|
i("close");
|
|
13134
13134
|
}
|
|
13135
13135
|
const {
|
|
13136
13136
|
isCheckingExistence: V,
|
|
13137
|
-
isCheckingVatNumber:
|
|
13137
|
+
isCheckingVatNumber: B,
|
|
13138
13138
|
isDataFromCbe: R,
|
|
13139
13139
|
checkVatNumberValidity: L,
|
|
13140
13140
|
form: $,
|
|
13141
|
-
onCreateNewBusiness:
|
|
13142
|
-
onUpdateCbeSearchItem:
|
|
13141
|
+
onCreateNewBusiness: E,
|
|
13142
|
+
onUpdateCbeSearchItem: U
|
|
13143
13143
|
} = ki({
|
|
13144
13144
|
onClose: () => {
|
|
13145
13145
|
},
|
|
@@ -13151,11 +13151,11 @@ const M0 = /* @__PURE__ */ x({
|
|
|
13151
13151
|
}), C.goToNext();
|
|
13152
13152
|
}
|
|
13153
13153
|
});
|
|
13154
|
-
function
|
|
13155
|
-
|
|
13154
|
+
function I() {
|
|
13155
|
+
E(), d.value = !1, u.value = !0;
|
|
13156
13156
|
}
|
|
13157
13157
|
async function H(X) {
|
|
13158
|
-
|
|
13158
|
+
E(), await U(X) && (d.value = !0, u.value = !0);
|
|
13159
13159
|
}
|
|
13160
13160
|
function de() {
|
|
13161
13161
|
u.value = !1, _.value = !1;
|
|
@@ -13163,7 +13163,7 @@ const M0 = /* @__PURE__ */ x({
|
|
|
13163
13163
|
function J(X) {
|
|
13164
13164
|
_.value = X === "manual_contact_person" || X === "search_contact_person";
|
|
13165
13165
|
}
|
|
13166
|
-
return (X, le) => (c(), v(a(Dn), { onClose:
|
|
13166
|
+
return (X, le) => (c(), v(a(Dn), { onClose: N }, {
|
|
13167
13167
|
default: p(() => [
|
|
13168
13168
|
l(Si, null, {
|
|
13169
13169
|
default: p(() => [
|
|
@@ -13182,9 +13182,9 @@ const M0 = /* @__PURE__ */ x({
|
|
|
13182
13182
|
"check-vat-number-validity": a(L),
|
|
13183
13183
|
form: a($),
|
|
13184
13184
|
"is-checking-existence": a(V),
|
|
13185
|
-
"is-checking-vat-number": a(
|
|
13185
|
+
"is-checking-vat-number": a(B),
|
|
13186
13186
|
"is-data-from-cbe": a(R),
|
|
13187
|
-
"on-update-cbe-search-item": a(
|
|
13187
|
+
"on-update-cbe-search-item": a(U),
|
|
13188
13188
|
onBack: de,
|
|
13189
13189
|
onStepChange: J
|
|
13190
13190
|
}, null, 8, ["is-cbe-search-skipped", "check-vat-number-validity", "form", "is-checking-existence", "is-checking-vat-number", "is-data-from-cbe", "on-update-cbe-search-item"])
|
|
@@ -13194,7 +13194,7 @@ const M0 = /* @__PURE__ */ x({
|
|
|
13194
13194
|
stepper: a(C),
|
|
13195
13195
|
"is-checking-cbe-enterprise": a(V),
|
|
13196
13196
|
"is-submitting": a(f).isSubmitting.value,
|
|
13197
|
-
onCreateNewBusiness:
|
|
13197
|
+
onCreateNewBusiness: I,
|
|
13198
13198
|
onSelectCbeEnterprise: H
|
|
13199
13199
|
}, null, 8, ["form", "stepper", "is-checking-cbe-enterprise", "is-submitting"]))
|
|
13200
13200
|
]),
|
|
@@ -13388,16 +13388,16 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13388
13388
|
_: 1
|
|
13389
13389
|
}));
|
|
13390
13390
|
}
|
|
13391
|
-
}), J0 =
|
|
13392
|
-
attachments:
|
|
13393
|
-
language:
|
|
13394
|
-
message:
|
|
13395
|
-
replyTo:
|
|
13396
|
-
subject:
|
|
13397
|
-
}), Y0 =
|
|
13398
|
-
defaultBCC:
|
|
13399
|
-
defaultCC:
|
|
13400
|
-
locales:
|
|
13391
|
+
}), J0 = F.object({
|
|
13392
|
+
attachments: F.array(Ui),
|
|
13393
|
+
language: F.enum(He),
|
|
13394
|
+
message: F.string().min(1),
|
|
13395
|
+
replyTo: F.email().nullable(),
|
|
13396
|
+
subject: F.string().min(1)
|
|
13397
|
+
}), Y0 = F.object({
|
|
13398
|
+
defaultBCC: F.array(F.email()),
|
|
13399
|
+
defaultCC: F.array(F.email()),
|
|
13400
|
+
locales: F.array(J0).min(1)
|
|
13401
13401
|
}), X0 = /* @__PURE__ */ x({
|
|
13402
13402
|
__name: "DealSettingsDialog",
|
|
13403
13403
|
emits: ["close"],
|
|
@@ -13408,20 +13408,20 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13408
13408
|
initialState: k(() => m.value === null ? null : {
|
|
13409
13409
|
defaultBCC: m.value.defaultBCC,
|
|
13410
13410
|
defaultCC: m.value.defaultCC,
|
|
13411
|
-
locales: m.value.locales.map((
|
|
13412
|
-
attachments:
|
|
13413
|
-
language:
|
|
13414
|
-
message:
|
|
13411
|
+
locales: m.value.locales.map((N) => ({
|
|
13412
|
+
attachments: N.attachments.map(an.toForm),
|
|
13413
|
+
language: N.language,
|
|
13414
|
+
message: N.message,
|
|
13415
13415
|
replyTo: null,
|
|
13416
|
-
subject:
|
|
13416
|
+
subject: N.subject
|
|
13417
13417
|
}))
|
|
13418
13418
|
}),
|
|
13419
13419
|
schema: Y0,
|
|
13420
|
-
onSubmit: async (
|
|
13420
|
+
onSubmit: async (N) => {
|
|
13421
13421
|
if (_.value !== null)
|
|
13422
13422
|
try {
|
|
13423
13423
|
await d.execute({
|
|
13424
|
-
body:
|
|
13424
|
+
body: N,
|
|
13425
13425
|
params: {
|
|
13426
13426
|
mailTemplateUuid: _.value.uuid
|
|
13427
13427
|
}
|
|
@@ -13440,7 +13440,7 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13440
13440
|
function C() {
|
|
13441
13441
|
g.reset(), _.value = null;
|
|
13442
13442
|
}
|
|
13443
|
-
return (
|
|
13443
|
+
return (N, V) => (c(), v(a(Rt), {
|
|
13444
13444
|
form: a(g),
|
|
13445
13445
|
chin: a(r).chin.value,
|
|
13446
13446
|
size: "lg",
|
|
@@ -13454,7 +13454,7 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13454
13454
|
description: a(o).t("wise_crm.deal.settings.title")
|
|
13455
13455
|
}, null, 8, ["icon", "title", "description"]),
|
|
13456
13456
|
l(K0, {
|
|
13457
|
-
onSelect: V[0] || (V[0] = (
|
|
13457
|
+
onSelect: V[0] || (V[0] = (B) => _.value = B)
|
|
13458
13458
|
})
|
|
13459
13459
|
], 64)) : (c(), h(G, { key: 1 }, [
|
|
13460
13460
|
l(a(Ee), {
|
|
@@ -13513,24 +13513,24 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13513
13513
|
rn({
|
|
13514
13514
|
disableOperators: !0,
|
|
13515
13515
|
displayFn: (V) => {
|
|
13516
|
-
const
|
|
13516
|
+
const B = gt.toFullName({
|
|
13517
13517
|
firstName: V.firstName ?? "",
|
|
13518
13518
|
lastName: V.lastName ?? ""
|
|
13519
13519
|
}).trim();
|
|
13520
|
-
return
|
|
13520
|
+
return B === "" ? V.email ?? V.uuid : B;
|
|
13521
13521
|
},
|
|
13522
13522
|
icon: Ke,
|
|
13523
13523
|
key: "owner",
|
|
13524
13524
|
label: i.t("wise_crm.deal.filters.owner.label"),
|
|
13525
13525
|
options: async (V) => {
|
|
13526
|
-
const
|
|
13526
|
+
const B = await w0.getAll({
|
|
13527
13527
|
pagination: {
|
|
13528
13528
|
limit: 20,
|
|
13529
13529
|
offset: 0
|
|
13530
13530
|
},
|
|
13531
13531
|
search: V
|
|
13532
13532
|
});
|
|
13533
|
-
return
|
|
13533
|
+
return B.isOk() ? B.value.data : [];
|
|
13534
13534
|
}
|
|
13535
13535
|
}),
|
|
13536
13536
|
rn({
|
|
@@ -13540,14 +13540,14 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13540
13540
|
key: "business",
|
|
13541
13541
|
label: r.getEntityConfig(O.BUSINESS)?.name ?? i.t("wise_crm.deal.filters.business.label"),
|
|
13542
13542
|
options: async (V) => {
|
|
13543
|
-
const
|
|
13543
|
+
const B = await ke.getAll({
|
|
13544
13544
|
pagination: {
|
|
13545
13545
|
limit: 20,
|
|
13546
13546
|
offset: 0
|
|
13547
13547
|
},
|
|
13548
13548
|
search: V
|
|
13549
13549
|
});
|
|
13550
|
-
return
|
|
13550
|
+
return B.isOk() ? B.value.data : [];
|
|
13551
13551
|
}
|
|
13552
13552
|
}),
|
|
13553
13553
|
...u ? [
|
|
@@ -13558,14 +13558,14 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13558
13558
|
key: "individual",
|
|
13559
13559
|
label: r.getEntityConfig(O.INDIVIDUAL)?.name ?? i.t("wise_crm.deal.filters.individual.label"),
|
|
13560
13560
|
options: async (V) => {
|
|
13561
|
-
const
|
|
13561
|
+
const B = await Se.getAll({
|
|
13562
13562
|
pagination: {
|
|
13563
13563
|
limit: 20,
|
|
13564
13564
|
offset: 0
|
|
13565
13565
|
},
|
|
13566
13566
|
search: V
|
|
13567
13567
|
});
|
|
13568
|
-
return
|
|
13568
|
+
return B.isOk() ? B.value.data : [];
|
|
13569
13569
|
}
|
|
13570
13570
|
})
|
|
13571
13571
|
] : []
|
|
@@ -13582,10 +13582,10 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13582
13582
|
}
|
|
13583
13583
|
});
|
|
13584
13584
|
}
|
|
13585
|
-
function
|
|
13585
|
+
function N() {
|
|
13586
13586
|
m.open();
|
|
13587
13587
|
}
|
|
13588
|
-
return (V,
|
|
13588
|
+
return (V, B) => (c(), v(a(ol), {
|
|
13589
13589
|
title: a(i).t("wise_crm.deal.overview_title")
|
|
13590
13590
|
}, {
|
|
13591
13591
|
"page-actions-right": p(() => [
|
|
@@ -13595,7 +13595,7 @@ const K0 = /* @__PURE__ */ x({
|
|
|
13595
13595
|
icon: a(_n),
|
|
13596
13596
|
label: a(i).t("wise_crm.deal.overview.settings"),
|
|
13597
13597
|
variant: "secondary",
|
|
13598
|
-
onClick:
|
|
13598
|
+
onClick: N
|
|
13599
13599
|
}, null, 8, ["icon", "label"]),
|
|
13600
13600
|
l(a(Y), {
|
|
13601
13601
|
"icon-left": a(wt),
|
|
@@ -13972,7 +13972,7 @@ const p2 = /* @__PURE__ */ x({
|
|
|
13972
13972
|
l(a(at), A({
|
|
13973
13973
|
label: a(i).t("wise_crm.contact.create_dialog.form.fields.language")
|
|
13974
13974
|
}, a(S)(a(u)), {
|
|
13975
|
-
"display-fn": (
|
|
13975
|
+
"display-fn": (N) => N ? a(i).t(a(Ka).getI18nKey(N)) : "",
|
|
13976
13976
|
items: a(g)
|
|
13977
13977
|
}), null, 16, ["label", "display-fn", "items"]),
|
|
13978
13978
|
l(Jt, {
|
|
@@ -14178,7 +14178,7 @@ function b2(n) {
|
|
|
14178
14178
|
}))
|
|
14179
14179
|
},
|
|
14180
14180
|
path: "/business/:businessUuid",
|
|
14181
|
-
component: () => import("./BusinessDetailView-
|
|
14181
|
+
component: () => import("./BusinessDetailView-BI7KMpcO.js"),
|
|
14182
14182
|
redirect: {
|
|
14183
14183
|
name: n[0].route.name
|
|
14184
14184
|
},
|
|
@@ -14192,7 +14192,7 @@ function h2(n) {
|
|
|
14192
14192
|
{
|
|
14193
14193
|
name: "deal-communication",
|
|
14194
14194
|
path: "communication",
|
|
14195
|
-
component: () => import("./DealCommunicationTabView-
|
|
14195
|
+
component: () => import("./DealCommunicationTabView-BDVgMTzE.js")
|
|
14196
14196
|
}
|
|
14197
14197
|
];
|
|
14198
14198
|
return [
|
|
@@ -14205,7 +14205,7 @@ function h2(n) {
|
|
|
14205
14205
|
}))
|
|
14206
14206
|
},
|
|
14207
14207
|
path: "/deals/:dealUuid",
|
|
14208
|
-
component: () => import("./DealDetailView-
|
|
14208
|
+
component: () => import("./DealDetailView-DFoo73kk.js"),
|
|
14209
14209
|
redirect: {
|
|
14210
14210
|
name: e[0].name
|
|
14211
14211
|
},
|
|
@@ -14224,7 +14224,7 @@ function v2(n) {
|
|
|
14224
14224
|
}))
|
|
14225
14225
|
},
|
|
14226
14226
|
path: "/individual/:individualUuid",
|
|
14227
|
-
component: () => import("./IndividualDetailView-
|
|
14227
|
+
component: () => import("./IndividualDetailView-C5gYz_lq.js"),
|
|
14228
14228
|
redirect: {
|
|
14229
14229
|
name: n[0].route.name
|
|
14230
14230
|
},
|