@wisemen/wise-crm-web 2.0.0-alpha.44 → 2.0.0-alpha.46
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 +70 -0
- package/dist/{BusinessDetailView-CUqP54YS.js → BusinessDetailView-CM4wS4C9.js} +29 -34
- package/dist/{CrmDetailSidebarMapCard.vue_vue_type_script_setup_true_lang-CeS10J7W.js → CrmDetailSidebarMapCard.vue_vue_type_script_setup_true_lang-CteTxdvx.js} +148 -149
- package/dist/{CrmDetailView.vue_vue_type_script_setup_true_lang-CTukbqp5.js → CrmDetailView.vue_vue_type_script_setup_true_lang-CMzz9bVK.js} +1 -1
- package/dist/{DealCommunicationTabView-CioSYkKm.js → DealCommunicationTabView-CdMDvlw4.js} +1 -1
- package/dist/{DealDetailView-2iuxQ5Tc.js → DealDetailView-D6tIAHwr.js} +2 -2
- package/dist/{IndividualDetailView-BdTovUI2.js → IndividualDetailView-DxhwyWj1.js} +46 -51
- package/dist/{index-D4L5GVbr.js → index-DoUWBza_.js} +2362 -2264
- package/dist/index.d.ts +76 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as b, computed as
|
|
2
|
-
import { UITooltip as H, UIIconButton as Q, UIText as
|
|
3
|
-
import { q as O, p as oe, W as K, ai as be, r as
|
|
1
|
+
import { defineComponent as b, computed as P, openBlock as n, createBlock as c, unref as e, withCtx as s, createElementVNode as d, resolveDynamicComponent as F, createElementBlock as _, toDisplayString as m, createVNode as a, renderSlot as J, createCommentVNode as p, Fragment as C, renderList as j, createTextVNode as z, ref as ce, mergeProps as y } from "vue";
|
|
2
|
+
import { UITooltip as H, UIIconButton as Q, UIText as ue, UIBadgeGroup as de, UIBadge as G, UITimeline as me, UITimelineItem as pe, UIDialogBody as Z, UIFormLayout as X, UIFormFieldGroup as Y, UIFormFieldGrid as T, UITextField as U, toFormField as v, UIPhoneNumberField as B, UIDialogFooter as ee, UIDialogFooterSubmit as te, UIDialogFooterCancel as fe, UIDropdownMenu as _e, UIDropdownMenuGroup as ge, UIDropdownMenuItem as R } from "@wisemen/vue-core-design-system";
|
|
3
|
+
import { q as O, p as oe, W as K, ai as be, r as le, j as he, aj as ye, f as ve, ak as xe, I as ae, al as we, t as W, am as ke, z as Pe, u as Ce, a3 as $e, a9 as ne, A as E, a4 as Ie, a5 as Ne, a7 as Se, a6 as A, a8 as re, $ as Ue, a0 as Fe, a1 as Ae, a2 as De, an as ze } from "./index-DoUWBza_.js";
|
|
4
4
|
import { bs as se } from "./uuid.util-DUuuAgdg.js";
|
|
5
5
|
import { useClipboard as Ve } from "@vueuse/core";
|
|
6
6
|
import { useI18n as $ } from "vue-i18n";
|
|
7
|
-
import { m as Me, C as q, f as M, c as Te, l as Be } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { m as Me, C as q, f as M, c as Te, l as Be } from "./CrmDetailView.vue_vue_type_script_setup_true_lang-CMzz9bVK.js";
|
|
8
8
|
import { RouterLink as Ee } from "vue-router";
|
|
9
9
|
import V, { z as f } from "zod";
|
|
10
10
|
import { GoogleMap as Le } from "vue3-google-map";
|
|
@@ -14,8 +14,8 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
14
14
|
type: {},
|
|
15
15
|
value: {}
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const t =
|
|
17
|
+
setup(l) {
|
|
18
|
+
const t = l, o = $(), i = P(() => {
|
|
19
19
|
switch (t.type) {
|
|
20
20
|
case "address":
|
|
21
21
|
return K;
|
|
@@ -26,7 +26,7 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
26
26
|
default:
|
|
27
27
|
return O;
|
|
28
28
|
}
|
|
29
|
-
}), r =
|
|
29
|
+
}), r = P(() => {
|
|
30
30
|
switch (t.type) {
|
|
31
31
|
case "email":
|
|
32
32
|
return `mailto:${t.value}`;
|
|
@@ -37,7 +37,7 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
37
37
|
default:
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
-
}), h =
|
|
40
|
+
}), h = P(() => {
|
|
41
41
|
switch (t.type) {
|
|
42
42
|
case "email":
|
|
43
43
|
return o.t("component.contact_tooltip.aria_label.email", {
|
|
@@ -54,19 +54,19 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
54
54
|
default:
|
|
55
55
|
return t.value;
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), u = Ve({
|
|
58
58
|
source: t.value
|
|
59
59
|
});
|
|
60
60
|
function g() {
|
|
61
|
-
|
|
61
|
+
u.copy(t.value);
|
|
62
62
|
}
|
|
63
63
|
return (x, I) => (n(), c(e(H), null, {
|
|
64
64
|
trigger: s(() => [
|
|
65
65
|
(n(), c(F(r.value ? "a" : "div"), {
|
|
66
66
|
href: r.value,
|
|
67
67
|
"aria-label": h.value,
|
|
68
|
-
target:
|
|
69
|
-
rel:
|
|
68
|
+
target: l.type === "address" ? "_blank" : void 0,
|
|
69
|
+
rel: l.type === "address" ? "noopener noreferrer" : void 0,
|
|
70
70
|
class: "flex aspect-square size-8 items-center justify-center rounded-full border-none bg-gray-50/50 p-xs ring-brand-500 ring-offset-2 duration-300 outline-none focus-visible:ring-2 data-[loading=false]:not-disabled:hover:bg-gray-50/30 dark:bg-brand-950"
|
|
71
71
|
}, {
|
|
72
72
|
default: s(() => [
|
|
@@ -76,18 +76,18 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
76
76
|
}, 8, ["href", "aria-label", "target", "rel"]))
|
|
77
77
|
]),
|
|
78
78
|
content: s(() => [
|
|
79
|
-
|
|
79
|
+
d("div", je, [
|
|
80
80
|
(n(), c(F(i.value), { class: "size-4" })),
|
|
81
|
-
|
|
81
|
+
l.type === "email" ? (n(), _("a", {
|
|
82
82
|
key: 0,
|
|
83
83
|
href: `mailto:${t.value}`,
|
|
84
84
|
class: "underline ring-brand-500 ring-offset-1 duration-200 outline-none focus-visible:ring-2"
|
|
85
|
-
}, m(t.value), 9, Ge)) :
|
|
85
|
+
}, m(t.value), 9, Ge)) : l.type === "phone" ? (n(), _("a", {
|
|
86
86
|
key: 1,
|
|
87
87
|
href: `tel:${t.value}`,
|
|
88
88
|
class: "underline ring-brand-500 ring-offset-1 duration-200 outline-none focus-visible:ring-2"
|
|
89
89
|
}, m(t.value), 9, Oe)) : (n(), _("p", Ke, m(t.value), 1)),
|
|
90
|
-
|
|
90
|
+
a(e(Q), {
|
|
91
91
|
label: e(o).t("wise_crm.info_dialog.copy_to_clipboard"),
|
|
92
92
|
icon: e(be),
|
|
93
93
|
variant: "tertiary",
|
|
@@ -110,16 +110,16 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
110
110
|
mobilePhone: {},
|
|
111
111
|
phone: {}
|
|
112
112
|
},
|
|
113
|
-
setup(
|
|
114
|
-
const t =
|
|
113
|
+
setup(l) {
|
|
114
|
+
const t = l;
|
|
115
115
|
return (o, i) => (n(), _("div", qe, [
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
d("div", Je, [
|
|
117
|
+
a(e(ue), {
|
|
118
118
|
text: t.name,
|
|
119
119
|
as: "h2",
|
|
120
120
|
class: "min-w-0 flex-1 text-xl font-bold text-primary"
|
|
121
121
|
}, null, 8, ["text"]),
|
|
122
|
-
|
|
122
|
+
d("div", Re, [
|
|
123
123
|
J(o.$slots, "actions"),
|
|
124
124
|
t.email !== null ? (n(), c(L, {
|
|
125
125
|
key: 0,
|
|
@@ -133,14 +133,14 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
133
133
|
}, null, 8, ["value"])) : p("", !0),
|
|
134
134
|
t.address !== null ? (n(), c(L, {
|
|
135
135
|
key: 2,
|
|
136
|
-
value: e(
|
|
136
|
+
value: e(le).format(t.address),
|
|
137
137
|
type: "address"
|
|
138
138
|
}, null, 8, ["value"])) : p("", !0)
|
|
139
139
|
])
|
|
140
140
|
]),
|
|
141
|
-
|
|
141
|
+
a(e(de), null, {
|
|
142
142
|
default: s(() => [
|
|
143
|
-
|
|
143
|
+
a(e(G), {
|
|
144
144
|
icon: t.entityType === e(se).BUSINESS ? e(he) : e(ye),
|
|
145
145
|
label: t.entityName ?? "-",
|
|
146
146
|
variant: "translucent",
|
|
@@ -160,12 +160,12 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
160
160
|
props: {
|
|
161
161
|
activity: {}
|
|
162
162
|
},
|
|
163
|
-
setup(
|
|
164
|
-
const t =
|
|
163
|
+
setup(l) {
|
|
164
|
+
const t = l;
|
|
165
165
|
function o(r) {
|
|
166
166
|
return r === null ? "" : typeof r == "object" ? JSON.stringify(r) : r.toString();
|
|
167
167
|
}
|
|
168
|
-
const i =
|
|
168
|
+
const i = P(() => t.activity.message.split(" ").map((r) => r === "[note]" ? {
|
|
169
169
|
text: t.activity.content?.note?.name ?? "",
|
|
170
170
|
type: "text"
|
|
171
171
|
} : r === "[contactPerson]" ? {
|
|
@@ -181,54 +181,54 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
181
181
|
type: "text"
|
|
182
182
|
}));
|
|
183
183
|
return (r, h) => (n(), _("div", We, [
|
|
184
|
-
(n(!0), _(C, null, j(i.value, (
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
(n(!0), _(C, null, j(i.value, (u) => (n(), _(C, { key: u }, [
|
|
185
|
+
u.type === "text" ? (n(), _("span", He, m(u.text), 1)) : p("", !0),
|
|
186
|
+
u.type === "link" && u.route !== void 0 ? (n(), c(e(Ee), {
|
|
187
187
|
key: 1,
|
|
188
|
-
to:
|
|
188
|
+
to: u.route,
|
|
189
189
|
class: "hover:text-brand text-sm font-medium text-primary hover:underline"
|
|
190
190
|
}, {
|
|
191
191
|
default: s(() => [
|
|
192
|
-
z(m(
|
|
192
|
+
z(m(u.text), 1)
|
|
193
193
|
]),
|
|
194
194
|
_: 2
|
|
195
195
|
}, 1032, ["to"])) : p("", !0)
|
|
196
196
|
], 64))), 128)),
|
|
197
197
|
t.activity.changes.length > 0 ? (n(), c(e(H), { key: 0 }, {
|
|
198
198
|
trigger: s(() => [
|
|
199
|
-
(n(), c(F(e(
|
|
199
|
+
(n(), c(F(e(ae)), { class: "size-3 text-tertiary" }))
|
|
200
200
|
]),
|
|
201
201
|
content: s(() => [
|
|
202
|
-
|
|
202
|
+
a(ve, {
|
|
203
203
|
cols: 1,
|
|
204
204
|
class: "max-w-80 p-lg"
|
|
205
205
|
}, {
|
|
206
206
|
default: s(() => [
|
|
207
|
-
(n(!0), _(C, null, j(t.activity.changes, (
|
|
208
|
-
key: JSON.stringify(
|
|
207
|
+
(n(!0), _(C, null, j(t.activity.changes, (u) => (n(), _("div", {
|
|
208
|
+
key: JSON.stringify(u),
|
|
209
209
|
class: "flex flex-col gap-sm"
|
|
210
210
|
}, [
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
d("div", Qe, [
|
|
212
|
+
d("p", Ze, m(u.key) + ": ", 1),
|
|
213
|
+
u.oldValue !== null ? (n(), c(e(G), {
|
|
214
214
|
key: 0,
|
|
215
215
|
"class-config": {
|
|
216
216
|
root: "rounded-sm border-none whitespace-pre-wrap"
|
|
217
217
|
},
|
|
218
|
-
label: o(
|
|
218
|
+
label: o(u.oldValue),
|
|
219
219
|
size: "sm",
|
|
220
220
|
variant: "translucent",
|
|
221
221
|
color: "error"
|
|
222
222
|
}, null, 8, ["label"])) : p("", !0),
|
|
223
|
-
|
|
223
|
+
u.oldValue !== null && u.value !== null ? (n(), c(F(e(xe)), {
|
|
224
224
|
key: 1,
|
|
225
225
|
class: "size-3"
|
|
226
226
|
})) : p("", !0),
|
|
227
|
-
|
|
227
|
+
a(e(G), {
|
|
228
228
|
"class-config": {
|
|
229
229
|
root: "rounded-sm border-none whitespace-pre-wrap"
|
|
230
230
|
},
|
|
231
|
-
label: o(
|
|
231
|
+
label: o(u.value),
|
|
232
232
|
size: "sm",
|
|
233
233
|
variant: "translucent",
|
|
234
234
|
color: "success"
|
|
@@ -248,16 +248,16 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
248
248
|
props: {
|
|
249
249
|
activity: {}
|
|
250
250
|
},
|
|
251
|
-
setup(
|
|
252
|
-
const t =
|
|
251
|
+
setup(l) {
|
|
252
|
+
const t = l;
|
|
253
253
|
function o(i) {
|
|
254
254
|
return we.isToday(i) ? W().fromNow(i.toInstant()) : W().toDate(i.toPlainDate());
|
|
255
255
|
}
|
|
256
256
|
return (i, r) => (n(), _(C, null, [
|
|
257
|
-
|
|
257
|
+
a(Xe, {
|
|
258
258
|
activity: t.activity
|
|
259
259
|
}, null, 8, ["activity"]),
|
|
260
|
-
|
|
260
|
+
d("p", Ye, m(o(t.activity.createdAt)) + " · " + m(t.activity.changedBy), 1)
|
|
261
261
|
], 64));
|
|
262
262
|
}
|
|
263
263
|
}), St = /* @__PURE__ */ b({
|
|
@@ -267,12 +267,12 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
267
267
|
activities: {},
|
|
268
268
|
onNext: { type: Function }
|
|
269
269
|
},
|
|
270
|
-
setup(
|
|
271
|
-
const t =
|
|
270
|
+
setup(l) {
|
|
271
|
+
const t = l, o = $(), i = P(() => !t.isLoading && t.activities.length === 0);
|
|
272
272
|
async function r() {
|
|
273
273
|
await t.onNext();
|
|
274
274
|
}
|
|
275
|
-
return (h,
|
|
275
|
+
return (h, u) => (n(), c(ke, {
|
|
276
276
|
"on-next": r,
|
|
277
277
|
class: "h-full"
|
|
278
278
|
}, {
|
|
@@ -282,13 +282,13 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
282
282
|
size: "md"
|
|
283
283
|
}, {
|
|
284
284
|
default: s(() => [
|
|
285
|
-
(n(!0), _(C, null, j(
|
|
285
|
+
(n(!0), _(C, null, j(l.activities, (g, x) => (n(), c(e(pe), {
|
|
286
286
|
key: JSON.stringify(g),
|
|
287
|
-
icon: e(
|
|
288
|
-
"is-last": x ===
|
|
287
|
+
icon: e(ae),
|
|
288
|
+
"is-last": x === l.activities.length - 1
|
|
289
289
|
}, {
|
|
290
290
|
default: s(() => [
|
|
291
|
-
|
|
291
|
+
a(et, { activity: g }, null, 8, ["activity"])
|
|
292
292
|
]),
|
|
293
293
|
_: 2
|
|
294
294
|
}, 1032, ["icon", "is-last"]))), 128))
|
|
@@ -299,7 +299,7 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
299
299
|
key: 1,
|
|
300
300
|
title: e(o).t("wise_crm.info_dialog.activity.empty_state.title"),
|
|
301
301
|
description: e(o).t("wise_crm.info_dialog.activity.empty_state.description"),
|
|
302
|
-
icon: e(
|
|
302
|
+
icon: e(Pe)
|
|
303
303
|
}, null, 8, ["title", "description", "icon"])) : p("", !0)
|
|
304
304
|
]),
|
|
305
305
|
_: 1
|
|
@@ -311,47 +311,47 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
311
311
|
form: {}
|
|
312
312
|
},
|
|
313
313
|
emits: ["createNewContactPerson"],
|
|
314
|
-
setup(
|
|
315
|
-
const o =
|
|
314
|
+
setup(l, { emit: t }) {
|
|
315
|
+
const o = l, i = t, r = $(), h = Ce(), u = o.form.register("position"), g = o.form.register("email"), x = o.form.register("phone"), I = o.form.register("mobile"), w = o.form.register("existingContactPerson"), N = ce(null);
|
|
316
316
|
async function ie(D) {
|
|
317
317
|
if (N.value = D, D === null) {
|
|
318
318
|
w.setValue(null);
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
321
|
w.setValue(D.uuid);
|
|
322
|
-
const
|
|
323
|
-
if (
|
|
324
|
-
h.show(
|
|
322
|
+
const k = await Ie.getByUuid(D.uuid);
|
|
323
|
+
if (k.isErr()) {
|
|
324
|
+
h.show(k.error);
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
|
-
const S =
|
|
327
|
+
const S = k.value;
|
|
328
328
|
g.setValue(S.email), x.setValue(S.phone), I.setValue(S.mobilePhone);
|
|
329
329
|
}
|
|
330
|
-
return (D,
|
|
331
|
-
|
|
330
|
+
return (D, k) => (n(), _(C, null, [
|
|
331
|
+
a(e(Z), null, {
|
|
332
332
|
default: s(() => [
|
|
333
|
-
|
|
333
|
+
a(e(X), null, {
|
|
334
334
|
default: s(() => [
|
|
335
|
-
|
|
335
|
+
a(e(Y), null, {
|
|
336
336
|
default: s(() => [
|
|
337
|
-
|
|
337
|
+
a(e(T), {
|
|
338
338
|
sm: 1,
|
|
339
339
|
lg: 1
|
|
340
340
|
}, {
|
|
341
341
|
default: s(() => [
|
|
342
|
-
|
|
342
|
+
a($e, {
|
|
343
343
|
modelValue: N.value,
|
|
344
344
|
"onUpdate:modelValue": [
|
|
345
|
-
|
|
345
|
+
k[0] || (k[0] = (S) => N.value = S),
|
|
346
346
|
ie
|
|
347
347
|
],
|
|
348
348
|
"is-touched": e(w).isTouched.value,
|
|
349
349
|
"error-message": e(w).isTouched.value ? e(w).errors.value[0]?.message ?? null : null,
|
|
350
350
|
label: e(r).t("wise_crm.contact.create_dialog.form.fields.contact_person"),
|
|
351
351
|
onBlur: e(w).onBlur,
|
|
352
|
-
onCreateNew:
|
|
352
|
+
onCreateNew: k[1] || (k[1] = (S) => i("createNewContactPerson"))
|
|
353
353
|
}, null, 8, ["modelValue", "is-touched", "error-message", "label", "onBlur"]),
|
|
354
|
-
N.value !== null ? (n(), c(e(U), y({ key: 0 }, e(v)(e(
|
|
354
|
+
N.value !== null ? (n(), c(e(U), y({ key: 0 }, e(v)(e(u)), {
|
|
355
355
|
label: e(r).t("wise_crm.contact.create_dialog.form.fields.position"),
|
|
356
356
|
placeholder: e(r).t("wise_crm.contact.create_dialog.form.fields.position")
|
|
357
357
|
}), null, 16, ["label", "placeholder"])) : p("", !0)
|
|
@@ -366,33 +366,33 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
366
366
|
title: e(r).t("wise_crm.shared.contact_info")
|
|
367
367
|
}, {
|
|
368
368
|
default: s(() => [
|
|
369
|
-
|
|
369
|
+
a(e(T), {
|
|
370
370
|
sm: 1,
|
|
371
371
|
lg: 1,
|
|
372
372
|
variant: "card"
|
|
373
373
|
}, {
|
|
374
374
|
default: s(() => [
|
|
375
|
-
|
|
375
|
+
a(e(U), y(e(v)(e(g)), {
|
|
376
376
|
label: e(r).t("wise_crm.contact.create_dialog.form.fields.email"),
|
|
377
377
|
placeholder: e(r).t("wise_crm.contact.create_dialog.form.fields.email")
|
|
378
378
|
}), null, 16, ["label", "placeholder"]),
|
|
379
|
-
|
|
379
|
+
a(E, null, {
|
|
380
380
|
default: s(() => [
|
|
381
381
|
z(m(e(r).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
|
|
382
382
|
]),
|
|
383
383
|
_: 1
|
|
384
384
|
}),
|
|
385
|
-
|
|
385
|
+
a(e(B), y(e(v)(e(I)), {
|
|
386
386
|
label: e(r).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
|
|
387
387
|
placeholder: e(r).t("wise_crm.contact.create_dialog.form.fields.mobile_phone")
|
|
388
388
|
}), null, 16, ["label", "placeholder"]),
|
|
389
|
-
|
|
389
|
+
a(E, null, {
|
|
390
390
|
default: s(() => [
|
|
391
391
|
z(m(e(r).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
|
|
392
392
|
]),
|
|
393
393
|
_: 1
|
|
394
394
|
}),
|
|
395
|
-
|
|
395
|
+
a(e(B), y(e(v)(e(x)), {
|
|
396
396
|
label: e(r).t("wise_crm.contact.create_dialog.form.fields.phone"),
|
|
397
397
|
placeholder: e(r).t("wise_crm.contact.create_dialog.form.fields.phone")
|
|
398
398
|
}), null, 16, ["label", "placeholder"])
|
|
@@ -408,9 +408,9 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
408
408
|
]),
|
|
409
409
|
_: 1
|
|
410
410
|
}),
|
|
411
|
-
|
|
411
|
+
a(e(ee), null, {
|
|
412
412
|
right: s(() => [
|
|
413
|
-
|
|
413
|
+
a(e(te), {
|
|
414
414
|
"is-loading": o.form.isSubmitting.value,
|
|
415
415
|
label: e(r).t("wise_crm.shared.add")
|
|
416
416
|
}, null, 8, ["is-loading", "label"])
|
|
@@ -424,28 +424,28 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
424
424
|
props: {
|
|
425
425
|
form: {}
|
|
426
426
|
},
|
|
427
|
-
setup(
|
|
428
|
-
const t =
|
|
427
|
+
setup(l) {
|
|
428
|
+
const t = l, o = $(), i = t.form.register("firstName"), r = t.form.register("lastName"), h = t.form.register("email"), u = t.form.register("mobilePhone"), g = t.form.register("position"), x = t.form.register("phone");
|
|
429
429
|
return (I, w) => (n(), c(e(Z), null, {
|
|
430
430
|
default: s(() => [
|
|
431
|
-
|
|
431
|
+
a(e(X), null, {
|
|
432
432
|
default: s(() => [
|
|
433
|
-
|
|
433
|
+
a(e(Y), null, {
|
|
434
434
|
default: s(() => [
|
|
435
|
-
|
|
435
|
+
a(e(T), {
|
|
436
436
|
sm: 1,
|
|
437
437
|
lg: 2
|
|
438
438
|
}, {
|
|
439
439
|
default: s(() => [
|
|
440
|
-
|
|
440
|
+
a(e(U), y(e(v)(e(i)), {
|
|
441
441
|
label: e(o).t("wise_crm.contact.create_dialog.form.fields.first_name"),
|
|
442
442
|
placeholder: e(o).t("wise_crm.contact.create_dialog.form.fields.first_name")
|
|
443
443
|
}), null, 16, ["label", "placeholder"]),
|
|
444
|
-
|
|
444
|
+
a(e(U), y(e(v)(e(r)), {
|
|
445
445
|
label: e(o).t("wise_crm.contact.create_dialog.form.fields.last_name"),
|
|
446
446
|
placeholder: e(o).t("wise_crm.contact.create_dialog.form.fields.last_name")
|
|
447
447
|
}), null, 16, ["label", "placeholder"]),
|
|
448
|
-
|
|
448
|
+
a(e(U), y(e(v)(e(g)), {
|
|
449
449
|
label: e(o).t("wise_crm.contact.create_dialog.form.fields.position"),
|
|
450
450
|
placeholder: e(o).t("wise_crm.contact.create_dialog.form.fields.position"),
|
|
451
451
|
class: "col-span-2"
|
|
@@ -456,44 +456,44 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
456
456
|
]),
|
|
457
457
|
_: 1
|
|
458
458
|
}),
|
|
459
|
-
|
|
459
|
+
a(ne, {
|
|
460
460
|
title: e(o).t("wise_crm.shared.contact_info")
|
|
461
461
|
}, {
|
|
462
462
|
default: s(() => [
|
|
463
|
-
|
|
463
|
+
a(e(T), {
|
|
464
464
|
sm: 1,
|
|
465
465
|
lg: 1,
|
|
466
466
|
variant: "card"
|
|
467
467
|
}, {
|
|
468
468
|
default: s(() => [
|
|
469
|
-
|
|
469
|
+
a(e(U), y(e(v)(e(h)), {
|
|
470
470
|
label: e(o).t("wise_crm.contact.create_dialog.form.fields.email"),
|
|
471
471
|
placeholder: e(o).t("wise_crm.contact.create_dialog.form.fields.email")
|
|
472
472
|
}), null, 16, ["label", "placeholder"]),
|
|
473
|
-
|
|
473
|
+
a(E, null, {
|
|
474
474
|
default: s(() => [
|
|
475
475
|
z(m(e(o).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
|
|
476
476
|
]),
|
|
477
477
|
_: 1
|
|
478
478
|
}),
|
|
479
|
-
|
|
479
|
+
a(e(B), y(e(v)(e(u)), {
|
|
480
480
|
label: e(o).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
|
|
481
481
|
placeholder: e(o).t("wise_crm.contact.create_dialog.form.fields.mobile_phone")
|
|
482
482
|
}), null, 16, ["label", "placeholder"]),
|
|
483
|
-
|
|
483
|
+
a(E, null, {
|
|
484
484
|
default: s(() => [
|
|
485
485
|
z(m(e(o).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)
|
|
486
486
|
]),
|
|
487
487
|
_: 1
|
|
488
488
|
}),
|
|
489
|
-
|
|
489
|
+
a(e(B), y(e(v)(e(x)), {
|
|
490
490
|
label: e(o).t("wise_crm.contact.create_dialog.form.fields.phone"),
|
|
491
491
|
placeholder: e(o).t("wise_crm.contact.create_dialog.form.fields.phone")
|
|
492
492
|
}), null, 16, ["label", "placeholder"])
|
|
493
493
|
]),
|
|
494
494
|
_: 1
|
|
495
495
|
}),
|
|
496
|
-
|
|
496
|
+
a(Ne, {
|
|
497
497
|
form: t.form
|
|
498
498
|
}, null, 8, ["form"])
|
|
499
499
|
]),
|
|
@@ -514,24 +514,24 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
514
514
|
existingForm: {}
|
|
515
515
|
},
|
|
516
516
|
emits: ["update:isNewMode"],
|
|
517
|
-
setup(
|
|
518
|
-
const o =
|
|
519
|
-
return (h,
|
|
517
|
+
setup(l, { emit: t }) {
|
|
518
|
+
const o = l, i = t, r = $();
|
|
519
|
+
return (h, u) => (n(), _(C, null, [
|
|
520
520
|
o.isNewMode ? (n(), c(ot, {
|
|
521
521
|
key: 0,
|
|
522
522
|
form: o.createForm
|
|
523
523
|
}, null, 8, ["form"])) : (n(), c(tt, {
|
|
524
524
|
key: 1,
|
|
525
525
|
form: o.existingForm,
|
|
526
|
-
onCreateNewContactPerson:
|
|
526
|
+
onCreateNewContactPerson: u[0] || (u[0] = (g) => i("update:isNewMode", !0))
|
|
527
527
|
}, null, 8, ["form"])),
|
|
528
528
|
o.isNewMode ? (n(), c(e(ee), { key: 2 }, {
|
|
529
529
|
right: s(() => [
|
|
530
|
-
|
|
530
|
+
a(e(fe), {
|
|
531
531
|
label: e(r).t("wise_crm.contact.create_dialog.form.back"),
|
|
532
|
-
onClick:
|
|
532
|
+
onClick: u[1] || (u[1] = (g) => i("update:isNewMode", !1))
|
|
533
533
|
}, null, 8, ["label"]),
|
|
534
|
-
|
|
534
|
+
a(e(te), {
|
|
535
535
|
"is-loading": o.createForm.isSubmitting.value,
|
|
536
536
|
label: e(r).t("wise_crm.shared.create")
|
|
537
537
|
}, null, 8, ["is-loading", "label"])
|
|
@@ -553,8 +553,8 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
553
553
|
mobilePhone: A.nullable(),
|
|
554
554
|
phone: A.nullable(),
|
|
555
555
|
position: f.string().nullable()
|
|
556
|
-
}).superRefine((
|
|
557
|
-
|
|
556
|
+
}).superRefine((l, t) => {
|
|
557
|
+
l.email !== null && l.email !== "" || l.mobilePhone !== null && l.mobilePhone !== "" || l.phone !== null && l.phone !== "" || t.addIssue({
|
|
558
558
|
code: f.ZodIssueCode.custom,
|
|
559
559
|
message: re.global.t("wise_crm.form.errors.at_least_one")
|
|
560
560
|
});
|
|
@@ -565,25 +565,25 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
565
565
|
mobilePhone: A.nullable(),
|
|
566
566
|
phone: A.nullable(),
|
|
567
567
|
position: f.string().nullable()
|
|
568
|
-
}).superRefine((
|
|
569
|
-
|
|
568
|
+
}).superRefine((l, t) => {
|
|
569
|
+
l.email !== null && l.email !== "" || l.mobilePhone !== null && l.mobilePhone !== "" || l.phone !== null && l.phone !== "" || t.addIssue({
|
|
570
570
|
code: f.ZodIssueCode.custom,
|
|
571
571
|
message: re.global.t("wise_crm.form.errors.at_least_one")
|
|
572
572
|
});
|
|
573
|
-
}),
|
|
573
|
+
}), lt = { class: "font-semibold text-primary" }, at = { class: "flex flex-col gap-sm" }, zt = /* @__PURE__ */ b({
|
|
574
574
|
__name: "CrmDetailSidebarAccordionBillingInformation",
|
|
575
575
|
props: {
|
|
576
576
|
invoiceAddress: {},
|
|
577
577
|
invoiceEmail: {}
|
|
578
578
|
},
|
|
579
|
-
setup(
|
|
580
|
-
const t =
|
|
579
|
+
setup(l) {
|
|
580
|
+
const t = l;
|
|
581
581
|
return (o, i) => (n(), c(q, { class: "flex flex-col gap-md" }, {
|
|
582
582
|
default: s(() => [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
label: t.invoiceAddress !== null ? e(
|
|
583
|
+
d("p", lt, m(t.invoiceEmail), 1),
|
|
584
|
+
d("div", at, [
|
|
585
|
+
a(M, {
|
|
586
|
+
label: t.invoiceAddress !== null ? e(le).formatShort(t.invoiceAddress) : "-",
|
|
587
587
|
icon: e(K)
|
|
588
588
|
}, null, 8, ["label", "icon"])
|
|
589
589
|
])
|
|
@@ -598,13 +598,13 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
598
598
|
onToggleIsPrimary: { type: Function }
|
|
599
599
|
},
|
|
600
600
|
emits: ["delete", "update"],
|
|
601
|
-
setup(
|
|
602
|
-
const o =
|
|
601
|
+
setup(l, { emit: t }) {
|
|
602
|
+
const o = l, i = t, r = $(), h = {
|
|
603
603
|
left: {
|
|
604
604
|
icon: Ue,
|
|
605
605
|
type: "icon"
|
|
606
606
|
}
|
|
607
|
-
},
|
|
607
|
+
}, u = {
|
|
608
608
|
left: {
|
|
609
609
|
icon: Fe,
|
|
610
610
|
type: "icon"
|
|
@@ -621,24 +621,24 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
621
621
|
}
|
|
622
622
|
return (w, N) => (n(), c(q, { class: "flex flex-col gap-lg" }, {
|
|
623
623
|
default: s(() => [
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
624
|
+
d("div", nt, [
|
|
625
|
+
d("div", rt, [
|
|
626
|
+
a(Te, {
|
|
627
627
|
"entity-type": e(se).INDIVIDUAL,
|
|
628
628
|
uuid: o.contactPerson.uuid,
|
|
629
629
|
label: `${o.contactPerson.firstName} ${o.contactPerson.lastName}`,
|
|
630
630
|
class: "-ml-xs"
|
|
631
631
|
}, null, 8, ["entity-type", "uuid", "label"]),
|
|
632
|
-
|
|
632
|
+
d("p", st, m(o.contactPerson.position), 1)
|
|
633
633
|
]),
|
|
634
|
-
|
|
635
|
-
|
|
634
|
+
d("div", it, [
|
|
635
|
+
a(Be, {
|
|
636
636
|
"is-active": o.contactPerson.isPrimary,
|
|
637
637
|
onClick: I
|
|
638
638
|
}, null, 8, ["is-active"]),
|
|
639
|
-
|
|
639
|
+
a(e(_e), { "popover-align": "end" }, {
|
|
640
640
|
trigger: s(() => [
|
|
641
|
-
|
|
641
|
+
a(e(Q), {
|
|
642
642
|
icon: e(Ae),
|
|
643
643
|
variant: "tertiary",
|
|
644
644
|
size: "sm",
|
|
@@ -646,20 +646,19 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
646
646
|
}, null, 8, ["icon"])
|
|
647
647
|
]),
|
|
648
648
|
content: s(() => [
|
|
649
|
-
|
|
649
|
+
a(e(ge), null, {
|
|
650
650
|
default: s(() => [
|
|
651
|
-
|
|
651
|
+
a(e(R), {
|
|
652
652
|
config: h,
|
|
653
653
|
label: e(r).t("wise_crm.info_dialog.sidebar.overview.update_contact_person"),
|
|
654
654
|
onSelect: g
|
|
655
655
|
}, null, 8, ["label"]),
|
|
656
|
-
|
|
656
|
+
a(e(R), {
|
|
657
657
|
"is-destructive": !0,
|
|
658
|
-
|
|
659
|
-
config: d,
|
|
658
|
+
config: u,
|
|
660
659
|
label: e(r).t("wise_crm.info_dialog.sidebar.overview.delete_contact_person"),
|
|
661
660
|
onSelect: x
|
|
662
|
-
}, null, 8, ["
|
|
661
|
+
}, null, 8, ["label"])
|
|
663
662
|
]),
|
|
664
663
|
_: 1
|
|
665
664
|
})
|
|
@@ -668,7 +667,7 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
668
667
|
})
|
|
669
668
|
])
|
|
670
669
|
]),
|
|
671
|
-
|
|
670
|
+
d("div", ct, [
|
|
672
671
|
o.contactPerson.email !== null ? (n(), c(M, {
|
|
673
672
|
key: 0,
|
|
674
673
|
label: o.contactPerson.email,
|
|
@@ -690,23 +689,23 @@ const je = { class: "flex items-center gap-sm p-sm px-md text-brand-500" }, Ge =
|
|
|
690
689
|
}));
|
|
691
690
|
}
|
|
692
691
|
});
|
|
693
|
-
function Mt(
|
|
692
|
+
function Mt(l, t) {
|
|
694
693
|
const o = new Map(
|
|
695
|
-
|
|
694
|
+
l.value.map((i) => [
|
|
696
695
|
i.key,
|
|
697
|
-
i.useIsVisible?.(t) ??
|
|
696
|
+
i.useIsVisible?.(t) ?? P(() => !0)
|
|
698
697
|
])
|
|
699
698
|
);
|
|
700
|
-
return
|
|
699
|
+
return P(() => l.value.filter((i) => o.get(i.key)?.value ?? !0));
|
|
701
700
|
}
|
|
702
|
-
const
|
|
701
|
+
const ut = /* @__PURE__ */ b({
|
|
703
702
|
__name: "AppGoogleMaps",
|
|
704
703
|
props: {
|
|
705
704
|
center: {},
|
|
706
705
|
zoom: {}
|
|
707
706
|
},
|
|
708
|
-
setup(
|
|
709
|
-
const t =
|
|
707
|
+
setup(l) {
|
|
708
|
+
const t = l, o = ze();
|
|
710
709
|
return (i, r) => e(o).googleMapsApiKey.value ? (n(), c(e(Le), {
|
|
711
710
|
key: 0,
|
|
712
711
|
"api-key": e(o).googleMapsApiKey.value,
|
|
@@ -718,33 +717,33 @@ const dt = /* @__PURE__ */ b({
|
|
|
718
717
|
"disable-default-ui": !0
|
|
719
718
|
}, null, 8, ["api-key", "zoom", "center"])) : p("", !0);
|
|
720
719
|
}
|
|
721
|
-
}),
|
|
720
|
+
}), dt = { class: "absolute top-3 left-3 z-2 rounded-full bg-brand-500 px-md py-xxs font-medium text-(--brand-contrast)" }, mt = { class: "absolute inset-0 z-1 flex flex-col items-center justify-center bg-linear-to-t from-primary from-10% to-transparent" }, pt = { class: "flex flex-col items-center gap-md" }, ft = { class: "rounded-full border border-secondary bg-primary p-sm" }, _t = { class: "text-center" }, gt = { class: "font-semibold text-primary" }, bt = { class: "text-primary" }, Tt = /* @__PURE__ */ b({
|
|
722
721
|
__name: "CrmDetailSidebarMapCard",
|
|
723
722
|
props: {
|
|
724
723
|
address: {}
|
|
725
724
|
},
|
|
726
|
-
setup(
|
|
727
|
-
const t =
|
|
725
|
+
setup(l) {
|
|
726
|
+
const t = l, o = $();
|
|
728
727
|
return (i, r) => t.address !== null ? (n(), c(q, {
|
|
729
728
|
key: 0,
|
|
730
729
|
class: "relative overflow-hidden p-0!"
|
|
731
730
|
}, {
|
|
732
731
|
default: s(() => [
|
|
733
|
-
|
|
734
|
-
|
|
732
|
+
d("div", dt, [
|
|
733
|
+
d("p", null, m(e(o).t("wise_crm.shared.home_address")), 1)
|
|
735
734
|
]),
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
735
|
+
d("div", mt, [
|
|
736
|
+
d("div", pt, [
|
|
737
|
+
d("div", ft, [
|
|
739
738
|
(n(), c(F(e(K)), { class: "size-4 text-brand-500" }))
|
|
740
739
|
]),
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
740
|
+
d("div", _t, [
|
|
741
|
+
d("p", gt, m(t.address?.street) + " " + m(t.address?.streetNumber), 1),
|
|
742
|
+
d("p", bt, m(t.address?.postalCode) + " " + m(t.address?.city), 1)
|
|
744
743
|
])
|
|
745
744
|
])
|
|
746
745
|
]),
|
|
747
|
-
|
|
746
|
+
a(ut, {
|
|
748
747
|
center: {
|
|
749
748
|
lat: t.address?.coordinates.lat ?? 0,
|
|
750
749
|
lng: t.address?.coordinates.lng ?? 0
|