@wisemen/wise-crm-web 1.1.0 → 1.2.0

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.
Files changed (114) hide show
  1. package/dist/ActivityIcon-DNdtN-M_.js +19 -0
  2. package/dist/AppSkeletonLoader-Dq6pKznm.js +1112 -0
  3. package/dist/AttachmentIcon-BLUd7LaN.js +19 -0
  4. package/dist/BoldIcon-WRYUWz15.js +16 -0
  5. package/dist/BookIcon-Bb3r5y_J.js +19 -0
  6. package/dist/BuildingIcon-DFutRg8d.js +19 -0
  7. package/dist/BuildingsIcon-BVHy6yoa.js +19 -0
  8. package/dist/BulletListIcon-BhOXLSBa.js +16 -0
  9. package/dist/BusinessDetailSidebarProvider-a6VeNUii.js +2946 -0
  10. package/dist/BusinessDetailView-Dz3wDSx5.js +24 -0
  11. package/dist/ChevronDownIcon-BmyTSPND.js +19 -0
  12. package/dist/ClockIcon-BYfZAvIE.js +23 -0
  13. package/dist/ClockPlusIcon-BcNi0Y9I.js +23 -0
  14. package/dist/CopyIcon-2eV8MRv_.js +19 -0
  15. package/dist/CrmDetailHeaderCard-BkA0Z-Cu.js +2523 -0
  16. package/dist/CrmDetailView-BhZEQqUH.js +67 -0
  17. package/dist/DealCommunicationTabView-Drp9MEPu.js +140 -0
  18. package/dist/DealDetailView-DWLudchX.js +1049 -0
  19. package/dist/DealExternalAttachment-B6l0gDqF.js +179 -0
  20. package/dist/DealIcon-BwUWYDxo.js +19 -0
  21. package/dist/DealSendMailDialog-Dqei4933.js +1566 -0
  22. package/dist/DownloadCloudIcon-BSrLGGrY.js +19 -0
  23. package/dist/EditWithLineIcon-BKYDPJOY.js +19 -0
  24. package/dist/Error-za-wClcU.js +13302 -0
  25. package/dist/FileIcon-DL1e1tAu.js +19 -0
  26. package/dist/FilterLinesIcon-DgVMySAE.js +22 -0
  27. package/dist/H1Icon-B6NEsEbj.js +17 -0
  28. package/dist/H2Icon-CNof5Ohu.js +17 -0
  29. package/dist/H3Icon-B2F2Tb6r.js +17 -0
  30. package/dist/HashIcon-C_XttKfW.js +19 -0
  31. package/dist/HomeFilledIcon-DtZ2eXxt.js +16 -0
  32. package/dist/IndividualDetailSidebarProvider-jjRoK1Av.js +609 -0
  33. package/dist/IndividualDetailView-BqIRHn-0.js +24 -0
  34. package/dist/ItalicIcon-DqBns3yy.js +17 -0
  35. package/dist/LayersTreeIcon-DZZCSCY9.js +23 -0
  36. package/dist/LinkBrokenIcon-BNBpWSi7.js +19 -0
  37. package/dist/LinkExternalIcon-B7SHeB1_.js +19 -0
  38. package/dist/LinkIcon-8bCrZEv9.js +17 -0
  39. package/dist/LocationPinIcon-UySRqSfG.js +19 -0
  40. package/dist/MailIcon-BT7gSIZb.js +19 -0
  41. package/dist/MobilePhoneIcon-_KQGnCSS.js +19 -0
  42. package/dist/NumberedListIcon-B-JVTSAe.js +17 -0
  43. package/dist/PhoneIcon-DGGW_MNR.js +19 -0
  44. package/dist/RefreshIcon-D1QWfdPD.js +19 -0
  45. package/dist/SendIcon-BtJ-NCec.js +19 -0
  46. package/dist/SettingsIcon-CWFwJelS.js +25 -0
  47. package/dist/StarOutlineIcon-C-ELTCDQ.js +19 -0
  48. package/dist/StarYellowIcon-7wuNWaQO.js +19 -0
  49. package/dist/ThreeDotsIcon-C56RWk-0.js +32 -0
  50. package/dist/TimeLineMarkerIcon-DLmPwfs6.js +18 -0
  51. package/dist/TrashIcon-o4PWmcYe.js +20 -0
  52. package/dist/UploadCloudIcon-D2tWB0NP.js +19 -0
  53. package/dist/UserCircleIcon-DiDajcIH.js +23 -0
  54. package/dist/UserIcon-Bv1eF7ln.js +22 -0
  55. package/dist/VerticalDotsIcon-YcD73UqY.js +20 -0
  56. package/dist/WalletIcon-CUh92U5K.js +19 -0
  57. package/dist/_plugin-vue_export-helper-D3hKq4w_.js +8 -0
  58. package/dist/client-9P6xe_5g.js +4188 -0
  59. package/dist/index.js +5598 -28
  60. package/dist/style.css +2 -1
  61. package/dist/testing.js +366 -386
  62. package/dist/uuid.util-DpiDKVoj.js +11 -0
  63. package/package.json +17 -17
  64. package/dist/ActivityIcon-xJAmguCr.js +0 -21
  65. package/dist/AttachmentIcon-BE5eNDu2.js +0 -21
  66. package/dist/BoldIcon-gIpFueAk.js +0 -18
  67. package/dist/BookIcon-BcJ7URa7.js +0 -21
  68. package/dist/BuildingIcon-Dg6uZKp9.js +0 -21
  69. package/dist/BuildingsIcon-BFPEpeVP.js +0 -21
  70. package/dist/BulletListIcon-CjJGF99S.js +0 -18
  71. package/dist/BusinessDetailView-Cq7_ziCe.js +0 -27
  72. package/dist/ChevronDownIcon-CsDbkAjy.js +0 -21
  73. package/dist/ClockIcon-DmkNAIk7.js +0 -32
  74. package/dist/ClockPlusIcon-DeHgqDF1.js +0 -32
  75. package/dist/CopyIcon-BsUjyueq.js +0 -21
  76. package/dist/CrmDetailView.vue_vue_type_script_setup_true_lang-Db5HsgF9.js +0 -102
  77. package/dist/DealCommunicationTabView-CQ9vUi3p.js +0 -207
  78. package/dist/DealDetailView-t_v7MuZA.js +0 -1329
  79. package/dist/DealIcon-BJzNx1o6.js +0 -21
  80. package/dist/DownloadCloudIcon-DNPJTdVt.js +0 -21
  81. package/dist/EditWithLineIcon-BXkQTlXs.js +0 -21
  82. package/dist/FileIcon-DSQi3VUb.js +0 -21
  83. package/dist/FilterLinesIcon-YkTZirYE.js +0 -24
  84. package/dist/H1Icon-DsvWrDD0.js +0 -19
  85. package/dist/H2Icon-8xYiqSmR.js +0 -19
  86. package/dist/H3Icon-BdH22r8A.js +0 -19
  87. package/dist/HashIcon-DNclSYC-.js +0 -21
  88. package/dist/HomeFilledIcon-my0TzA9q.js +0 -18
  89. package/dist/IndividualDetailView-CjgKD__T.js +0 -27
  90. package/dist/ItalicIcon-Be9twusP.js +0 -19
  91. package/dist/LayersTreeIcon-DcK6WtJe.js +0 -32
  92. package/dist/LinkBrokenIcon-9wgVs__d.js +0 -21
  93. package/dist/LinkExternalIcon--XtB6wEj.js +0 -21
  94. package/dist/LinkIcon-BzYeqJaA.js +0 -19
  95. package/dist/LocationPinIcon-CSBPPRHC.js +0 -21
  96. package/dist/MailIcon-BgkBOes6.js +0 -21
  97. package/dist/MobilePhoneIcon-BgB_oAAr.js +0 -21
  98. package/dist/NumberedListIcon-Bf4a8S_g.js +0 -19
  99. package/dist/PhoneIcon-BKgg0ufh.js +0 -21
  100. package/dist/RefreshIcon-GJ03jEFx.js +0 -21
  101. package/dist/SendIcon-0ygrHbYx.js +0 -21
  102. package/dist/SettingsIcon-BRNQD8GX.js +0 -28
  103. package/dist/StarOutlineIcon-Gxm2X9hf.js +0 -21
  104. package/dist/StarYellowIcon-BZfRhUd6.js +0 -21
  105. package/dist/ThreeDotsIcon-cBE_pGvU.js +0 -32
  106. package/dist/TimeLineMarkerIcon-j4hDQteY.js +0 -20
  107. package/dist/TrashIcon-BynOxtIY.js +0 -22
  108. package/dist/UploadCloudIcon-BgcrXv_v.js +0 -21
  109. package/dist/UserCircleIcon-Bc1eahfh.js +0 -32
  110. package/dist/UserIcon-CCK-3lX3.js +0 -24
  111. package/dist/VerticalDotsIcon-C5gK8Zmi.js +0 -22
  112. package/dist/WalletIcon-DjqurEH2.js +0 -21
  113. package/dist/index-Cb2tNFVq.js +0 -24606
  114. package/dist/uuid.util-1167NMVR.js +0 -6562
@@ -0,0 +1,609 @@
1
+ import { $ as e, A as t, B as n, F as r, P as i, Q as a, R as o, T as s, W as c, Y as l, c as u, et as d, h as f, i as p, l as m, m as h, n as g, o as _, r as v, s as y, t as b, y as x } from "./Error-za-wClcU.js";
2
+ import { a as S, i as C, l as w, n as T, o as ee, r as te, s as E, t as D, u as O } from "./CrmDetailHeaderCard-BkA0Z-Cu.js";
3
+ import { c as k, l as A, n as ne, t as re, u as j } from "./AppSkeletonLoader-Dq6pKznm.js";
4
+ import { mt as M } from "./client-9P6xe_5g.js";
5
+ import { Fragment as N, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createTextVNode as ie, createVNode as z, defineComponent as B, openBlock as V, ref as H, renderList as U, toDisplayString as W, unref as G, withCtx as K } from "vue";
6
+ import { useI18n as q } from "vue-i18n";
7
+ import { VcButton as J, VcRouterLinkButton as Y, useDialog as X, usePagination as ae, useToast as oe } from "@wisemen/vue-core-components";
8
+ import { useMutation as se, useQueryClient as ce } from "@tanstack/vue-query";
9
+ import { useForm as le } from "formango";
10
+ import { Motion as ue } from "motion-v";
11
+ //#region src/api/queries/individual/individualDetail.query.ts
12
+ function Z(e) {
13
+ return A({
14
+ isEnabled: P(() => e.value !== null),
15
+ queryFn: () => (O(e.value !== null, "individualUuid is null"), x.getByUuid(e.value)),
16
+ queryKey: { wiseCrmIndividualDetail: { individualUuid: e } }
17
+ });
18
+ }
19
+ //#endregion
20
+ //#region src/api/mutations/individual/individualGrant.mutation.ts
21
+ function de() {
22
+ return j({
23
+ queryFn: async ({ body: e, params: t }) => await x.grantUser(t.individualUuid, e),
24
+ queryKeysToInvalidate: { wiseCrmIndividualDetail: { individualUuid: (e) => e.individualUuid } }
25
+ });
26
+ }
27
+ //#endregion
28
+ //#region src/api/queries/individual/individualActivityIndex.query.ts
29
+ function fe(e, t) {
30
+ return k({
31
+ paginationOptions: t,
32
+ queryFn: async (t) => await x.getActivity(e.value, t),
33
+ queryKey: { individualActivityIndex: { paginationOptions: t } }
34
+ });
35
+ }
36
+ //#endregion
37
+ //#region src/individual/sidebar/IndividualDetailSidebarActivityContent.vue
38
+ var pe = /* @__PURE__ */ B({
39
+ __name: "IndividualDetailSidebarActivityContent",
40
+ props: { individual: {} },
41
+ setup(e) {
42
+ let t = e, n = ae({
43
+ isRouteQueryEnabled: !1,
44
+ type: "keyset"
45
+ }), r = fe(P(() => t.individual.uuid), n.paginationOptions), i = P(() => r.data.value.data ?? []);
46
+ async function a() {
47
+ await r.getNextPage();
48
+ }
49
+ return (e, t) => (V(), F(w, {
50
+ "on-next": a,
51
+ "is-loading": G(r).isLoading.value,
52
+ activities: i.value
53
+ }, null, 8, ["is-loading", "activities"]));
54
+ }
55
+ });
56
+ //#endregion
57
+ //#region src/api/mutations/noteIndividualCreate.mutation.ts
58
+ function me() {
59
+ return j({
60
+ queryFn: async ({ body: e, params: t }) => await d.create(e, { individualUuid: t.individualUuid }),
61
+ queryKeysToInvalidate: { noteIndividualIndex: {} }
62
+ });
63
+ }
64
+ //#endregion
65
+ //#region src/api/queries/noteIndividualIndex.query.ts
66
+ function he(e, t) {
67
+ return a({
68
+ queryFn: (t) => d.getIndividualNotes({ pagination: t }, e.value),
69
+ queryKey: { noteIndividualIndex: { params: t?.params } }
70
+ });
71
+ }
72
+ //#endregion
73
+ //#region src/individual/sidebar/IndividualDetailSidebarNotesContent.vue
74
+ var ge = /* @__PURE__ */ B({
75
+ __name: "IndividualDetailSidebarNotesContent",
76
+ props: { individual: {} },
77
+ setup(t) {
78
+ let r = t, i = l(), a = me(), s = e(), c = X(o), u = he(P(() => r.individual.uuid)), d = P(() => u.data?.value?.data ?? []);
79
+ async function f(e) {
80
+ try {
81
+ await a.execute({
82
+ body: e,
83
+ params: { individualUuid: r.individual.uuid }
84
+ });
85
+ } catch (e) {
86
+ i.show(e);
87
+ }
88
+ }
89
+ async function p(e) {
90
+ try {
91
+ await s.execute({ params: { noteUuid: e } });
92
+ } catch (e) {
93
+ i.show(e);
94
+ }
95
+ }
96
+ function m(e) {
97
+ c.open({ note: e });
98
+ }
99
+ return (e, t) => (V(), F(n, {
100
+ "is-loading": G(u).isLoading.value,
101
+ notes: d.value,
102
+ "on-submit": f,
103
+ "has-next-page": G(u).hasNextPage.value,
104
+ onNext: t[0] ||= (e) => G(u).fetchNextPage(),
105
+ onDelete: p,
106
+ onUpdate: m
107
+ }, null, 8, [
108
+ "is-loading",
109
+ "notes",
110
+ "has-next-page"
111
+ ]));
112
+ }
113
+ });
114
+ //#endregion
115
+ //#region src/api/mutations/individual/individualSetPrimaryContactPerson.mutation.ts
116
+ function _e() {
117
+ let e = ce(), t = "wiseCrmIndividualDetail", n = se({
118
+ mutationFn: async (e) => {
119
+ await x.setPrimaryContactPerson(e.individualUuid, e.contactPersonUuid);
120
+ },
121
+ onError: (n, r, i) => {
122
+ e.setQueryData([t, { individualUuid: r.individualUuid }], i?.previousData);
123
+ },
124
+ onMutate: async (n) => {
125
+ await e.cancelQueries({ queryKey: [t] });
126
+ let r = e.getQueryData([t, { individualUuid: n.individualUuid }]);
127
+ return r === void 0 ? {} : (e.setQueryData([t, { individualUuid: n.individualUuid }], {
128
+ ...r,
129
+ contactPersons: r.contactPersons.map((e) => e.uuid === n.contactPersonUuid ? {
130
+ ...e,
131
+ isPrimary: !e.isPrimary
132
+ } : {
133
+ ...e,
134
+ isPrimary: !1
135
+ })
136
+ }), { previousData: r });
137
+ },
138
+ onSettled: (n, r, i, a) => {
139
+ i !== void 0 && e.invalidateQueries({ queryKey: [t, { individualUuid: i.individualUuid }] });
140
+ }
141
+ });
142
+ return {
143
+ isLoading: P(() => n.isPending.value),
144
+ data: P(() => n.data.value),
145
+ execute: async (e) => {
146
+ await n.mutateAsync(e.params);
147
+ }
148
+ };
149
+ }
150
+ //#endregion
151
+ //#region src/api/mutations/individual/individualUnlinkContactPerson.mutation.ts
152
+ function ve() {
153
+ return j({
154
+ queryFn: async ({ body: e, params: t }) => await x.unlinkContactPerson(t.individualUuid, e.contactPersonUuid),
155
+ queryKeysToInvalidate: {
156
+ individualIndex: {},
157
+ wiseCrmIndividualDetail: { individualUuid: (e) => e.individualUuid }
158
+ }
159
+ });
160
+ }
161
+ //#endregion
162
+ //#region src/components/crm-detail/CrmDetailSidebarAccordionCustomerInfo.vue?vue&type=script&setup=true&lang.ts
163
+ var ye = { class: "gap-md flex flex-col" }, be = /* @__PURE__ */ B({
164
+ __name: "CrmDetailSidebarAccordionCustomerInfo",
165
+ props: { individual: {} },
166
+ setup(e) {
167
+ let t = e, n = q();
168
+ return (e, r) => (V(), L("div", ye, [z(_, null, {
169
+ default: K(() => [z(m, {
170
+ label: G(n).t("wise_crm.info_dialog.sidebar.overview.created_at_label", { value: t.individual.createdAt ? G(ne)().toDateTime(t.individual.createdAt) : "-" }),
171
+ icon: "clockPlus"
172
+ }, null, 8, ["label"])]),
173
+ _: 1
174
+ }), z(C, { address: t.individual.address }, null, 8, ["address"])]));
175
+ }
176
+ });
177
+ //#endregion
178
+ //#region src/api/mutations/individual/individualLinkContactPerson.mutation.ts
179
+ function xe() {
180
+ return j({
181
+ queryFn: async ({ body: e, params: t }) => await x.linkContactPerson(t.individualUuid, e.contactPersonUuid, e.position, e.contactInfo),
182
+ queryKeysToInvalidate: {
183
+ individualIndex: {},
184
+ wiseCrmIndividualDetail: { individualUuid: (e) => e.individualUuid }
185
+ }
186
+ });
187
+ }
188
+ //#endregion
189
+ //#region src/individual/dialogs/IndividualContactPersonCreateDialog.vue
190
+ var Se = /* @__PURE__ */ B({
191
+ __name: "IndividualContactPersonCreateDialog",
192
+ props: {
193
+ individualUuid: {},
194
+ isCreatingNewContactPerson: {
195
+ type: Boolean,
196
+ default: !1
197
+ }
198
+ },
199
+ emits: ["close", "createNewContactPerson"],
200
+ setup(e, { emit: t }) {
201
+ let n = e, r = t, i = q(), a = l(), o = xe(), s = f();
202
+ async function c(e) {
203
+ try {
204
+ let t = await s.execute({ body: {
205
+ email: e.email,
206
+ firstName: e.firstName,
207
+ lastName: e.lastName,
208
+ mobilePhone: e.mobilePhone,
209
+ phone: e.phone
210
+ } });
211
+ n.isCreatingNewContactPerson || await o.execute({
212
+ body: {
213
+ contactPersonUuid: t,
214
+ contactInfo: {
215
+ email: e.email,
216
+ mobilePhone: e.mobilePhone,
217
+ phone: e.phone
218
+ },
219
+ position: e.position
220
+ },
221
+ params: { individualUuid: n.individualUuid }
222
+ }), d({
223
+ label: `${e.firstName} ${e.lastName}`,
224
+ value: t
225
+ });
226
+ } catch (e) {
227
+ a.show(e);
228
+ }
229
+ }
230
+ async function u(e, t, r) {
231
+ if (e !== null) try {
232
+ await o.execute({
233
+ body: {
234
+ contactPersonUuid: e,
235
+ contactInfo: t,
236
+ position: r
237
+ },
238
+ params: { individualUuid: n.individualUuid }
239
+ }), d();
240
+ } catch (e) {
241
+ a.show(e);
242
+ }
243
+ }
244
+ function d(e) {
245
+ if (e === void 0) {
246
+ r("close");
247
+ return;
248
+ }
249
+ r("createNewContactPerson", e), r("close");
250
+ }
251
+ return (e, t) => (V(), F(h, {
252
+ title: G(i).t("wise_crm.info_dialog.contact_person_create.title"),
253
+ description: G(i).t("wise_crm.info_dialog.contact_person_create.description"),
254
+ onClose: d
255
+ }, {
256
+ default: K(() => [z(ee, {
257
+ "on-submit": c,
258
+ "on-link-contact-person": u,
259
+ "is-creating-new-contact-person": n.isCreatingNewContactPerson,
260
+ onClose: d
261
+ }, null, 8, ["is-creating-new-contact-person"])]),
262
+ _: 1
263
+ }, 8, ["title", "description"]));
264
+ }
265
+ });
266
+ //#endregion
267
+ //#region src/api/mutations/individual/individualContactPersonUpdate.mutation.ts
268
+ function Ce() {
269
+ return j({
270
+ queryFn: async ({ body: e, params: t }) => await x.updateContactPerson(t.individualUuid, t.contactPersonUuid, e),
271
+ queryKeysToInvalidate: {
272
+ contactPersonDetail: { contactPersonUuid: (e) => e.contactPersonUuid },
273
+ individualIndex: {},
274
+ wiseCrmIndividualDetail: { individualUuid: (e) => e.individualUuid }
275
+ }
276
+ });
277
+ }
278
+ //#endregion
279
+ //#region src/api/queries/individual/individualContactPersonDetail.query.ts
280
+ function we(e, t) {
281
+ return A({
282
+ isEnabled: P(() => e.value !== null && t.value !== null),
283
+ queryFn: () => {
284
+ if (e.value === null) throw Error("Individual UUID is null");
285
+ if (t.value === null) throw Error("Contact Person UUID is null");
286
+ return x.getContactPerson(e.value, t.value);
287
+ },
288
+ queryKey: { contactPersonDetail: { contactPersonUuid: t } }
289
+ });
290
+ }
291
+ //#endregion
292
+ //#region src/individual/content/IndividualContactPersonUpdateForm.vue
293
+ var Te = /* @__PURE__ */ B({
294
+ __name: "IndividualContactPersonUpdateForm",
295
+ props: {
296
+ individualUuid: {},
297
+ contactPerson: {},
298
+ onSubmit: { type: Function }
299
+ },
300
+ setup(e) {
301
+ let t = e, n = q(), a = le({
302
+ initialState: {
303
+ email: t.contactPerson.email,
304
+ firstName: t.contactPerson.firstName,
305
+ lastName: t.contactPerson.lastName,
306
+ mobilePhone: t.contactPerson.mobilePhone,
307
+ phone: t.contactPerson.phone,
308
+ position: t.contactPerson.position
309
+ },
310
+ schema: S,
311
+ onSubmit: async (e) => {
312
+ await t.onSubmit(e);
313
+ }
314
+ });
315
+ return (e, t) => (V(), F(E, { form: G(a) }, {
316
+ actions: K(() => [z(r, null, {
317
+ default: K(() => [z(i, {
318
+ "is-loading": G(a).isSubmitting.value,
319
+ label: G(n).t("wise_crm.shared.save_changes")
320
+ }, null, 8, ["is-loading", "label"])]),
321
+ _: 1
322
+ })]),
323
+ _: 1
324
+ }, 8, ["form"]));
325
+ }
326
+ }), Ee = /* @__PURE__ */ B({
327
+ __name: "IndividualContactPersonUpdateDialog",
328
+ props: {
329
+ contactPersonUuid: {},
330
+ individualUuid: {}
331
+ },
332
+ emits: ["close"],
333
+ setup(e, { emit: t }) {
334
+ let n = e, r = t, i = q(), a = l(), o = we(P(() => n.individualUuid), P(() => n.contactPersonUuid)), s = Ce();
335
+ async function c(e) {
336
+ try {
337
+ await s.execute({
338
+ body: e,
339
+ params: {
340
+ contactPersonUuid: n.contactPersonUuid,
341
+ individualUuid: n.individualUuid
342
+ }
343
+ }), r("close");
344
+ } catch (e) {
345
+ a.show(e);
346
+ }
347
+ }
348
+ function u() {
349
+ r("close");
350
+ }
351
+ return (e, t) => (V(), F(h, {
352
+ title: G(i).t("wise_crm.info_dialog.contact_person_update.title"),
353
+ description: G(i).t("wise_crm.info_dialog.contact_person_create.description"),
354
+ onClose: u
355
+ }, {
356
+ default: K(() => [G(o).data.value ? (V(), F(Te, {
357
+ key: 0,
358
+ "individual-uuid": n.individualUuid,
359
+ "on-submit": c,
360
+ "contact-person": G(o).data.value,
361
+ onClose: u
362
+ }, null, 8, ["individual-uuid", "contact-person"])) : I("", !0)]),
363
+ _: 1
364
+ }, 8, ["title", "description"]));
365
+ }
366
+ }), De = { class: "gap-sm flex" }, Oe = { class: "font-regular flex flex-col items-start" }, Q = { class: "font-semibold" }, ke = { class: "font-regular text-brand-500 text-xs" }, Ae = /* @__PURE__ */ B({
367
+ __name: "IndividualDetailSidebarOverviewContent",
368
+ props: { individual: {} },
369
+ setup(e) {
370
+ let t = e, n = q(), r = l(), i = s(), a = X(Se), o = X(Ee), d = X(c), f = _e(), h = ve(), g = P(() => t.individual.contactPersons.length > 0), v = P(() => t.individual.billingInformationDetail !== null), b = P(() => i.getEntityConfig(M.BUSINESS)?.name.toLowerCase() ?? "");
371
+ function x() {
372
+ a.open({ individualUuid: t.individual.uuid });
373
+ }
374
+ function S(e) {
375
+ o.open({
376
+ contactPersonUuid: e,
377
+ individualUuid: t.individual.uuid
378
+ });
379
+ }
380
+ function C(e) {
381
+ d.open({
382
+ title: n.t("wise_crm.info_dialog.sidebar.overview.delete_contact_person_title"),
383
+ isDestructive: !0,
384
+ isLoading: h.isLoading.value,
385
+ confirmText: n.t("shared.delete"),
386
+ description: n.t("wise_crm.info_dialog.sidebar.overview.delete_contact_person_description"),
387
+ onConfirm: async () => {
388
+ try {
389
+ await h.execute({
390
+ body: { contactPersonUuid: e },
391
+ params: { individualUuid: t.individual.uuid }
392
+ });
393
+ } catch (e) {
394
+ r.show(e);
395
+ } finally {
396
+ d.close();
397
+ }
398
+ }
399
+ });
400
+ }
401
+ function w(e) {
402
+ f.execute({ params: {
403
+ contactPersonUuid: e,
404
+ individualUuid: t.individual.uuid
405
+ } });
406
+ }
407
+ return (r, i) => (V(), F(u, { "default-values": [
408
+ "customer",
409
+ "invoice",
410
+ "contact-persons",
411
+ "linked-businesses"
412
+ ] }, {
413
+ default: K(() => [
414
+ z(y, {
415
+ label: G(n).t("wise_crm.info_dialog.sidebar.overview.customer_info_label"),
416
+ value: "customer",
417
+ icon: "infoCircle"
418
+ }, {
419
+ default: K(() => [z(be, { individual: e.individual }, null, 8, ["individual"])]),
420
+ _: 1
421
+ }, 8, ["label"]),
422
+ z(y, {
423
+ label: G(n).t("wise_crm.info_dialog.sidebar.overview.invoice_label"),
424
+ "is-empty": !v.value,
425
+ value: "invoice",
426
+ icon: "wallet"
427
+ }, {
428
+ default: K(() => [t.individual.billingInformationDetail ? (V(), F(te, {
429
+ key: 0,
430
+ "invoice-address": t.individual.billingInformationDetail.location?.address ?? null,
431
+ "invoice-email": t.individual.billingInformationDetail.invoiceEmail
432
+ }, null, 8, ["invoice-address", "invoice-email"])) : I("", !0)]),
433
+ _: 1
434
+ }, 8, ["label", "is-empty"]),
435
+ z(y, {
436
+ "is-empty": !g.value,
437
+ label: G(n).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
438
+ value: "contact-persons",
439
+ icon: "userCircle",
440
+ onAdd: x
441
+ }, {
442
+ actions: K(() => [g.value ? I("", !0) : (V(), F(p, {
443
+ key: 0,
444
+ label: G(n).t("wise_crm.info_dialog.sidebar.overview.contact_persons_label"),
445
+ class: "z-1",
446
+ icon: "plus",
447
+ onClick: x
448
+ }, null, 8, ["label"]))]),
449
+ default: K(() => [(V(!0), L(N, null, U(t.individual.contactPersons, (e) => (V(), F(G(ue), {
450
+ key: e.uuid,
451
+ "layout-id": e.uuid
452
+ }, {
453
+ default: K(() => [z(T, {
454
+ "contact-person": e,
455
+ "on-toggle-is-primary": () => w(e.uuid),
456
+ onUpdate: (t) => S(e.uuid),
457
+ onDelete: (t) => C(e.uuid)
458
+ }, null, 8, [
459
+ "contact-person",
460
+ "on-toggle-is-primary",
461
+ "onUpdate",
462
+ "onDelete"
463
+ ])]),
464
+ _: 2
465
+ }, 1032, ["layout-id"]))), 128)), g.value ? (V(), F(G(J), {
466
+ key: 0,
467
+ size: "sm",
468
+ variant: "tertiary",
469
+ "icon-left": "plus",
470
+ onClick: x
471
+ }, {
472
+ default: K(() => [ie(W(G(n).t("wise_crm.shared.add")), 1)]),
473
+ _: 1
474
+ })) : I("", !0)]),
475
+ _: 1
476
+ }, 8, ["is-empty", "label"]),
477
+ t.individual.linkedBusinesses.length > 0 ? (V(), F(y, {
478
+ key: 0,
479
+ "is-edit-button-hidden": !0,
480
+ label: G(n).t("wise_crm.info_dialog.sidebar.overview.linked_business_label", { label: b.value }),
481
+ value: "linked-businesses",
482
+ icon: "building"
483
+ }, {
484
+ default: K(() => [(V(!0), L(N, null, U(t.individual.linkedBusinesses, (e) => (V(), F(_, {
485
+ key: e.uuid,
486
+ class: "gap-lg flex flex-col"
487
+ }, {
488
+ default: K(() => [
489
+ R("div", De, [R("div", Oe, [z(G(Y), {
490
+ to: {
491
+ name: "business-detail",
492
+ params: { businessUuid: e.uuid }
493
+ },
494
+ "class-config": { root: "p-0 bg-transparent! h-min hover:underline" },
495
+ variant: "tertiary"
496
+ }, {
497
+ default: K(() => [R("span", Q, W(e.name), 1)]),
498
+ _: 2
499
+ }, 1032, ["to"]), R("p", ke, W(e.position), 1)])]),
500
+ z(m, {
501
+ label: e.email ?? "-",
502
+ icon: "mail"
503
+ }, null, 8, ["label"]),
504
+ z(m, {
505
+ label: e.mobilePhone ?? e.phone ?? "-",
506
+ icon: "phone"
507
+ }, null, 8, ["label"])
508
+ ]),
509
+ _: 2
510
+ }, 1024))), 128))]),
511
+ _: 1
512
+ }, 8, ["label"])) : I("", !0)
513
+ ]),
514
+ _: 1
515
+ }));
516
+ }
517
+ }), $ = /* @__PURE__ */ function(e) {
518
+ return e.ACTIVITY = "activity", e.NOTES = "notes", e.OVERVIEW = "overview", e;
519
+ }($ || {}), je = /* @__PURE__ */ B({
520
+ __name: "IndividualDetailSidebar",
521
+ props: { individual: {} },
522
+ setup(e) {
523
+ let n = e, r = q();
524
+ oe();
525
+ let i = s();
526
+ l(), de();
527
+ let a = H($.OVERVIEW), o = P(() => [
528
+ {
529
+ icon: "infoCircle",
530
+ label: r.t("wise_crm.shared.overview"),
531
+ value: $.OVERVIEW
532
+ },
533
+ {
534
+ icon: "activity",
535
+ label: r.t("wise_crm.shared.activity"),
536
+ value: $.ACTIVITY
537
+ },
538
+ {
539
+ icon: "book",
540
+ label: r.t("wise_crm.shared.notes"),
541
+ value: $.NOTES
542
+ }
543
+ ]), c = P(() => i.getEntityConfig(M.INDIVIDUAL));
544
+ return (r, s) => (V(), F(t, {
545
+ color: G(i).getEntityConfig(G(M).INDIVIDUAL)?.color ?? null,
546
+ class: "flex h-full flex-col"
547
+ }, {
548
+ default: K(() => [z(D, {
549
+ "entity-type": G(M).INDIVIDUAL,
550
+ name: `${n.individual.firstName} ${n.individual.lastName}`,
551
+ address: n.individual.address,
552
+ email: n.individual.email,
553
+ "mobile-phone": n.individual.mobilePhone,
554
+ "entity-name": c.value?.name ?? null,
555
+ phone: n.individual.phone
556
+ }, {
557
+ actions: K(() => [I("", !0)]),
558
+ _: 1
559
+ }, 8, [
560
+ "entity-type",
561
+ "name",
562
+ "address",
563
+ "email",
564
+ "mobile-phone",
565
+ "entity-name",
566
+ "phone"
567
+ ]), z(v, {
568
+ modelValue: a.value,
569
+ "onUpdate:modelValue": s[0] ||= (e) => a.value = e,
570
+ tabs: o.value
571
+ }, {
572
+ default: K(() => [a.value === $.OVERVIEW ? (V(), F(Ae, {
573
+ key: 0,
574
+ individual: e.individual
575
+ }, null, 8, ["individual"])) : a.value === $.ACTIVITY ? (V(), F(pe, {
576
+ key: 1,
577
+ individual: e.individual
578
+ }, null, 8, ["individual"])) : I("", !0), a.value === $.NOTES ? (V(), F(ge, {
579
+ key: 2,
580
+ individual: n.individual
581
+ }, null, 8, ["individual"])) : I("", !0)]),
582
+ _: 1
583
+ }, 8, ["modelValue", "tabs"])]),
584
+ _: 1
585
+ }, 8, ["color"]));
586
+ }
587
+ }), Me = /* @__PURE__ */ B({
588
+ __name: "IndividualDetailSidebarProvider",
589
+ props: { individualUuid: {} },
590
+ setup(e) {
591
+ let t = e, n = q(), r = Z(P(() => t.individualUuid)), i = P(() => r.data.value ?? null);
592
+ return (e, t) => (V(), F(g, null, {
593
+ default: K(() => [G(r).isError.value ? (V(), F(b, {
594
+ key: 0,
595
+ message: G(n).t("error.business_details.description"),
596
+ title: G(n).t("error.business_details.title")
597
+ }, null, 8, ["message", "title"])) : G(r).isLoading.value ? (V(), F(re, {
598
+ key: 1,
599
+ class: "h-full"
600
+ })) : i.value ? (V(), F(je, {
601
+ key: 2,
602
+ individual: i.value
603
+ }, null, 8, ["individual"])) : I("", !0)]),
604
+ _: 1
605
+ }));
606
+ }
607
+ });
608
+ //#endregion
609
+ export { Z as n, Me as t };
@@ -0,0 +1,24 @@
1
+ import { mt as e } from "./client-9P6xe_5g.js";
2
+ import { t } from "./IndividualDetailSidebarProvider-jjRoK1Av.js";
3
+ import { t as n } from "./CrmDetailView-BhZEQqUH.js";
4
+ import { createBlock as r, createVNode as i, defineComponent as a, openBlock as o, unref as s, withCtx as c } from "vue";
5
+ import { useRouteParams as l } from "@vueuse/router";
6
+ //#endregion
7
+ //#region src/individual/views/detail/IndividualDetailView.vue
8
+ var u = /* @__PURE__ */ a({
9
+ __name: "IndividualDetailView",
10
+ props: { tabs: {} },
11
+ setup(a) {
12
+ let u = a, d = l("individualUuid");
13
+ return (a, l) => (o(), r(n, {
14
+ key: s(d),
15
+ tabs: u.tabs,
16
+ "entity-type": s(e).INDIVIDUAL
17
+ }, {
18
+ sidebar: c(() => [i(t, { "individual-uuid": s(d) }, null, 8, ["individual-uuid"])]),
19
+ _: 1
20
+ }, 8, ["tabs", "entity-type"]));
21
+ }
22
+ });
23
+ //#endregion
24
+ export { u as default };
@@ -0,0 +1,17 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-D3hKq4w_.js";
2
+ import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
3
+ //#region src/icons/ItalicIcon.vue
4
+ var i = {}, a = {
5
+ viewBox: "0 0 32 32",
6
+ fill: "none",
7
+ xmlns: "http://www.w3.org/2000/svg"
8
+ };
9
+ function o(e, i) {
10
+ return r(), t("svg", a, [...i[0] ||= [n("path", {
11
+ d: "M14 8V11H16.21L12.79 19H10V22H18V19H15.79L19.21 11H22V8H14Z",
12
+ fill: "currentColor"
13
+ }, null, -1)]]);
14
+ }
15
+ var s = /* @__PURE__ */ e(i, [["render", o]]);
16
+ //#endregion
17
+ export { s as default };
@@ -0,0 +1,23 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-D3hKq4w_.js";
2
+ import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
3
+ //#region src/icons/LayersTreeIcon.vue
4
+ var i = {}, a = {
5
+ viewBox: "0 0 16 16",
6
+ fill: "none"
7
+ };
8
+ function o(e, i) {
9
+ return r(), t("svg", a, [...i[0] ||= [n("g", { "clip-path": "url(#clip0_19745_40246)" }, [n("path", {
10
+ d: "M1.33331 8L7.76147 11.2141C7.84892 11.2578 7.89265 11.2797 7.93851 11.2883C7.97914 11.2959 8.02082 11.2959 8.06145 11.2883C8.10731 11.2797 8.15104 11.2578 8.23849 11.2141L14.6666 8M1.33331 11.3333L7.76147 14.5474C7.84892 14.5911 7.89265 14.613 7.93851 14.6216C7.97914 14.6292 8.02082 14.6292 8.06145 14.6216C8.10731 14.613 8.15104 14.5911 8.23849 14.5474L14.6666 11.3333M1.33331 4.66667L7.76147 1.45259C7.84892 1.40887 7.89265 1.387 7.93851 1.3784C7.97914 1.37078 8.02082 1.37078 8.06145 1.3784C8.10731 1.387 8.15104 1.40887 8.23849 1.45259L14.6666 4.66667L8.23849 7.88075C8.15104 7.92447 8.10731 7.94634 8.06145 7.95494C8.02082 7.96256 7.97914 7.96256 7.93851 7.95494C7.89265 7.94634 7.84892 7.92447 7.76147 7.88075L1.33331 4.66667Z",
11
+ class: "stroke-current",
12
+ "stroke-width": "1.5",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round"
15
+ })], -1), n("defs", null, [n("clipPath", { id: "clip0_19745_40246" }, [n("rect", {
16
+ width: "16",
17
+ height: "16",
18
+ fill: "white"
19
+ })])], -1)]]);
20
+ }
21
+ var s = /* @__PURE__ */ e(i, [["render", o]]);
22
+ //#endregion
23
+ export { s as default };
@@ -0,0 +1,19 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-D3hKq4w_.js";
2
+ import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
3
+ //#region src/icons/LinkBrokenIcon.vue
4
+ var i = {}, a = {
5
+ viewBox: "0 0 22 22",
6
+ fill: "none"
7
+ };
8
+ function o(e, i) {
9
+ return r(), t("svg", a, [...i[0] ||= [n("path", {
10
+ d: "M7.5 14.5L14.5 7.49998M8 3V1M14 19V21M3 8H1M19 14H21M3.91421 3.91421L2.5 2.5M18.0858 18.0857L19.5 19.4999M11 16.6568L8.87871 18.7781C7.31662 20.3402 4.78396 20.3402 3.22186 18.7781C1.65976 17.216 1.65976 14.6833 3.22186 13.1212L5.34318 10.9999M16.6569 10.9999L18.7782 8.87859C20.3403 7.31649 20.3403 4.78383 18.7782 3.22174C17.2161 1.65964 14.6835 1.65964 13.1214 3.22174L11 5.34306",
11
+ stroke: "currentColor",
12
+ "stroke-width": "2",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round"
15
+ }, null, -1)]]);
16
+ }
17
+ var s = /* @__PURE__ */ e(i, [["render", o]]);
18
+ //#endregion
19
+ export { s as default };