@wisemen/wise-crm-web 0.2.5 → 1.0.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.
- package/dist/BusinessDetailSidebarProvider-Dm6Dd7Nq.js +2899 -0
- package/dist/{BusinessDetailView-BZpocob4.js → BusinessDetailView-BHVUfCpV.js} +5 -5
- package/dist/{CrmDetailHeaderCard-Jo2OteBb.js → CrmDetailHeaderCard-CiVLyIuw.js} +39 -39
- package/dist/{CrmDetailView-DKHX-JEl.js → CrmDetailView-DaAuWeiB.js} +14 -14
- package/dist/{DealCommunicationTabView-ClflVxHJ.js → DealCommunicationTabView-xq_zOAsr.js} +2 -2
- package/dist/{DealDetailView-ChAFvBBK.js → DealDetailView-C54XpYN1.js} +124 -124
- package/dist/{DealExternalAttachment-ClwtFzpQ.js → DealExternalAttachment-Dp44vkgt.js} +1 -1
- package/dist/{DealSendMailDialog-SWWyaxq8.js → DealSendMailDialog-D11Tgd_A.js} +50 -50
- package/dist/{Error-CX6APxDX.js → Error-X0deDY-N.js} +510 -8
- package/dist/{IndividualDetailSidebarProvider-BJgxw1Jd.js → IndividualDetailSidebarProvider-BvjhFng9.js} +218 -218
- package/dist/{IndividualDetailView-CvGUCWPY.js → IndividualDetailView-Cq8iAwQv.js} +5 -5
- package/dist/{client-CpsHjr8V.js → client-S6BLV3Ct.js} +7 -12
- package/dist/composables/crmConfig.composable.d.ts +1 -0
- package/dist/index.js +375 -375
- package/dist/kbo-client/client/client.gen.d.ts +2 -0
- package/dist/kbo-client/client/index.d.ts +8 -0
- package/dist/kbo-client/client/types.gen.d.ts +117 -0
- package/dist/kbo-client/client/utils.gen.d.ts +33 -0
- package/dist/kbo-client/client.gen.d.ts +12 -0
- package/dist/kbo-client/core/auth.gen.d.ts +18 -0
- package/dist/kbo-client/core/bodySerializer.gen.d.ts +25 -0
- package/dist/kbo-client/core/params.gen.d.ts +43 -0
- package/dist/kbo-client/core/pathSerializer.gen.d.ts +33 -0
- package/dist/kbo-client/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/kbo-client/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/kbo-client/core/types.gen.d.ts +78 -0
- package/dist/kbo-client/core/utils.gen.d.ts +19 -0
- package/dist/kbo-client/index.d.ts +2 -0
- package/dist/kbo-client/sdk.gen.d.ts +72 -0
- package/dist/kbo-client/types.gen.d.ts +2089 -0
- package/dist/kbo-client/zod.gen.d.ts +5943 -0
- package/dist/libs/http.lib.d.ts +3 -1
- package/dist/libs/kboBaseUrl.lib.d.ts +1 -0
- package/dist/models/cbe/search/cbeEnterpriseSearchDto.model.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +2 -1
- package/dist/BusinessDetailSidebarProvider-CXG99iHk.js +0 -2077
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { a as vatNumberSchema, c as AppVatNumberField_default, d as useBusinessCreateMutation, f as useBusinessDetailQuery, i as CustomFieldDefinitionUtil, l as FormFieldset_default, m as businessUuidSchema, n as VatNumberUtil, o as addressFormSchema, p as BusinessService, r as ContactCreateDialogBusinessForm_default, s as CustomFieldDefinitionForm_default, t as BusinessDetailSidebarProvider_default, u as useBusinessIndexQuery } from "./BusinessDetailSidebarProvider-
|
|
3
|
-
import { c as AddressUtil, u as assert } from "./CrmDetailHeaderCard-
|
|
1
|
+
import { A as AppColorProvider_default, C as AppSeparator_default, D as useCrmConfig, G as AppDialogContainer_default, H as AppForm_default, I as AppAndOrSeparator_default, K as AppDialogActions_default, L as useOffsetInfiniteQuery, M as useSearch, N as useRouteQueryState, S as EntityAutocomplete_default, T as useCrm, U as i18nPlugin, V as toFormField, X as LoggerUtil, Y as useApiErrorToast, Z as createI18nKeyMap, b as IndividualUpdateTransformer, dt as en_US_default, g as phoneNumberFormSchema, j as EntityTypeUtil, lt as individualUuidSchema, p as AppUnstyledButton_default, rt as AppGrid_default, t as Error_default, tt as AppInfiniteScroll_default, ut as nl_BE_default, v as useIndividualIndexQuery, w as AppHeightTransition_default, x as AppGlobalFormError_default, y as IndividualService, z as AppDialogHeader_default } from "./Error-X0deDY-N.js";
|
|
2
|
+
import { a as vatNumberSchema, c as AppVatNumberField_default, d as useBusinessCreateMutation, f as useBusinessDetailQuery, i as CustomFieldDefinitionUtil, l as FormFieldset_default, m as businessUuidSchema, n as VatNumberUtil, o as addressFormSchema, p as BusinessService, r as ContactCreateDialogBusinessForm_default, s as CustomFieldDefinitionForm_default, t as BusinessDetailSidebarProvider_default, u as useBusinessIndexQuery } from "./BusinessDetailSidebarProvider-Dm6Dd7Nq.js";
|
|
3
|
+
import { c as AddressUtil, u as assert } from "./CrmDetailHeaderCard-CiVLyIuw.js";
|
|
4
4
|
import { a as AppGroup_default, l as He, n as useDateTimeFormat, s as ZonedDateTimeTransformer, t as AppSkeletonLoader_default, u as ze } from "./AppSkeletonLoader-BAhoOmFD.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ft as DealSource, gt as Locale, ht as GlobalSearchCollectionName, mt as EntityType, rt as viewRecentEntitiesV1, st as BillingInformationRequirement, ut as ClientType, vt as SdkContentLocale, y as searchCollectionsV1 } from "./client-S6BLV3Ct.js";
|
|
6
6
|
import { t as __plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BSi1g3Lh.js";
|
|
7
|
-
import { _ as AnimateHeight_default, a as FormFileUploadDropzoneOverlay_default, c as useMailTemplateDetailQuery, d as ContentLocaleUtil, f as DealService, g as BoardService, h as useUserIndexQuery, i as FormFileUploadItem_default, l as MailTemplateService, m as ButtonTooltip_default, o as FileUploadService, p as TruncateText_default, r as fileReferenceFormSchema, s as AppRichTextField_default, t as DealSendMailDialog_default, u as DealSourceUtil, v as CenterContent_default, y as AppTagsInputField_default } from "./DealSendMailDialog-
|
|
7
|
+
import { _ as AnimateHeight_default, a as FormFileUploadDropzoneOverlay_default, c as useMailTemplateDetailQuery, d as ContentLocaleUtil, f as DealService, g as BoardService, h as useUserIndexQuery, i as FormFileUploadItem_default, l as MailTemplateService, m as ButtonTooltip_default, o as FileUploadService, p as TruncateText_default, r as fileReferenceFormSchema, s as AppRichTextField_default, t as DealSendMailDialog_default, u as DealSourceUtil, v as CenterContent_default, y as AppTagsInputField_default } from "./DealSendMailDialog-D11Tgd_A.js";
|
|
8
8
|
import { t as UuidUtil } from "./uuid.util-C1p-yuFc.js";
|
|
9
|
-
import { o as FileReferenceTransformer } from "./DealExternalAttachment-
|
|
10
|
-
import { n as useIndividualDetailQuery, t as IndividualDetailSidebarProvider_default } from "./IndividualDetailSidebarProvider-
|
|
9
|
+
import { o as FileReferenceTransformer } from "./DealExternalAttachment-Dp44vkgt.js";
|
|
10
|
+
import { n as useIndividualDetailQuery, t as IndividualDetailSidebarProvider_default } from "./IndividualDetailSidebarProvider-BvjhFng9.js";
|
|
11
11
|
import z$1, { z } from "zod";
|
|
12
12
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, h, inject, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toValue, unref, useId, useModel, useTemplateRef, watch, withCtx, withModifiers } from "vue";
|
|
13
13
|
import { useI18n } from "vue-i18n";
|
|
@@ -59,15 +59,15 @@ var OpenCrmDetailTransition_default = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
entityType: {},
|
|
60
60
|
tabs: {}
|
|
61
61
|
},
|
|
62
|
-
setup(
|
|
63
|
-
let
|
|
64
|
-
return (
|
|
65
|
-
color: unref(
|
|
62
|
+
setup(t) {
|
|
63
|
+
let n = t, r = ref(n.tabs[0]?.value ?? ""), i = useCrm();
|
|
64
|
+
return (t, a) => (openBlock(), createBlock(AppColorProvider_default, {
|
|
65
|
+
color: unref(i).getEntityConfig(unref(EntityType).BUSINESS)?.color ?? null,
|
|
66
66
|
class: "relative flex-1"
|
|
67
67
|
}, {
|
|
68
68
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$38, [createElementVNode("div", _hoisted_2$23, [createVNode(unref(VcDialogCloseButton))]), createVNode(unref(VcTabs), {
|
|
69
|
-
modelValue:
|
|
70
|
-
"onUpdate:modelValue":
|
|
69
|
+
modelValue: r.value,
|
|
70
|
+
"onUpdate:modelValue": a[0] ||= (e) => r.value = e,
|
|
71
71
|
"class-config": {
|
|
72
72
|
base: "w-full border-none rounded-full flex justify-center pb-lg pt-lg !overflow-visible",
|
|
73
73
|
list: "rounded-full w-fit",
|
|
@@ -79,14 +79,14 @@ var OpenCrmDetailTransition_default = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
class: "flex w-full flex-col",
|
|
80
80
|
variant: "button-border"
|
|
81
81
|
}, {
|
|
82
|
-
items: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
82
|
+
items: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.tabs, (e) => (openBlock(), createBlock(unref(VcTabsItem), {
|
|
83
83
|
key: e.value,
|
|
84
84
|
value: e.value
|
|
85
85
|
}, {
|
|
86
86
|
default: withCtx(() => [createTextVNode(toDisplayString(e.label), 1)]),
|
|
87
87
|
_: 2
|
|
88
88
|
}, 1032, ["value"]))), 128))]),
|
|
89
|
-
content: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
89
|
+
content: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.tabs, (e) => (openBlock(), createBlock(unref(VcTabsContent), {
|
|
90
90
|
key: e.value,
|
|
91
91
|
value: e.value
|
|
92
92
|
}, {
|
|
@@ -94,7 +94,7 @@ var OpenCrmDetailTransition_default = /* @__PURE__ */ defineComponent({
|
|
|
94
94
|
_: 2
|
|
95
95
|
}, 1032, ["value"]))), 128))]),
|
|
96
96
|
_: 1
|
|
97
|
-
}, 8, ["modelValue"])]), renderSlot(
|
|
97
|
+
}, 8, ["modelValue"])]), renderSlot(t.$slots, "default")]),
|
|
98
98
|
_: 3
|
|
99
99
|
}, 8, ["color"]));
|
|
100
100
|
}
|
|
@@ -264,19 +264,19 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
|
|
|
264
264
|
onSubmit: { type: Function }
|
|
265
265
|
},
|
|
266
266
|
setup(e) {
|
|
267
|
-
let
|
|
268
|
-
initialState: computed(() =>
|
|
269
|
-
billingAddress:
|
|
270
|
-
invoiceCcEmails:
|
|
271
|
-
invoiceEmail:
|
|
272
|
-
purchaseNoteCcEmails:
|
|
273
|
-
purchaseNoteEmail:
|
|
274
|
-
reminderCcEmails:
|
|
275
|
-
reminderEmail:
|
|
267
|
+
let t = e, r = useI18n(), a = useCrmConfig(), o = useForm({
|
|
268
|
+
initialState: computed(() => t.billingInformation === null ? null : {
|
|
269
|
+
billingAddress: t.businessAddress,
|
|
270
|
+
invoiceCcEmails: t.billingInformation.invoiceCcEmails ?? [],
|
|
271
|
+
invoiceEmail: t.billingInformation.invoiceEmail,
|
|
272
|
+
purchaseNoteCcEmails: t.billingInformation.purchaseNoteCcEmails ?? [],
|
|
273
|
+
purchaseNoteEmail: t.billingInformation.purchaseNoteEmail,
|
|
274
|
+
reminderCcEmails: t.billingInformation.reminderCcEmails ?? [],
|
|
275
|
+
reminderEmail: t.billingInformation.reminderEmail
|
|
276
276
|
}),
|
|
277
277
|
schema: createBusinessBillingInformationFormSchema(a.getConfig().billingConfig?.businessBillingInformationRequirement ?? BillingInformationRequirement.EMAIL_OR_ADDRESS),
|
|
278
278
|
onSubmit: async (e) => {
|
|
279
|
-
await
|
|
279
|
+
await t.onSubmit(e);
|
|
280
280
|
}
|
|
281
281
|
}), s = computed(() => `card-update-form-${UuidUtil.getRandom()}`), c = o.register("billingAddress"), l = o.register("invoiceCcEmails", []), d = o.register("invoiceEmail"), p = o.register("purchaseNoteCcEmails", []), g = o.register("purchaseNoteEmail"), y = o.register("reminderCcEmails"), S = o.register("reminderEmail"), A = ref(o.state.value.reminderEmail !== o.state.value.invoiceEmail || JSON.stringify(o.state.value.reminderCcEmails) !== JSON.stringify(o.state.value.invoiceCcEmails)), j = ref(o.state.value.purchaseNoteEmail !== o.state.value.invoiceEmail || JSON.stringify(o.state.value.purchaseNoteCcEmails) !== JSON.stringify(o.state.value.invoiceCcEmails));
|
|
282
282
|
function P(e) {
|
|
@@ -291,28 +291,28 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
|
|
|
291
291
|
function K(e) {
|
|
292
292
|
e || (g.setValue(d.modelValue.value ?? ""), p.setValue(l.modelValue.value ?? []));
|
|
293
293
|
}
|
|
294
|
-
return (e,
|
|
294
|
+
return (e, t) => (openBlock(), createBlock(AppForm_default, {
|
|
295
295
|
id: s.value,
|
|
296
296
|
form: unref(o),
|
|
297
297
|
class: "flex h-full flex-col justify-between"
|
|
298
298
|
}, {
|
|
299
299
|
default: withCtx(() => [createVNode(AppCard_default, {
|
|
300
|
-
title: unref(
|
|
300
|
+
title: unref(r).t("wise_crm.info_dialog.info.billing_information.card.title"),
|
|
301
301
|
icon: "wallet"
|
|
302
302
|
}, {
|
|
303
303
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
|
|
304
304
|
default: withCtx(() => [
|
|
305
305
|
createVNode(unref(VcAddressAutocomplete), mergeProps({
|
|
306
|
-
label: unref(
|
|
307
|
-
placeholder: unref(
|
|
306
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.billing_address"),
|
|
307
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.billing_address")
|
|
308
308
|
}, unref(toFormField)(unref(c))), null, 16, ["label", "placeholder"]),
|
|
309
309
|
createVNode(unref(VcTextField), mergeProps({
|
|
310
|
-
label: unref(
|
|
311
|
-
placeholder: unref(
|
|
310
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_email"),
|
|
311
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.email")
|
|
312
312
|
}, unref(toFormField)(unref(d)), { "onUpdate:modelValue": P }), null, 16, ["label", "placeholder"]),
|
|
313
313
|
createVNode(AppTagsInputField_default, mergeProps({
|
|
314
|
-
label: unref(
|
|
315
|
-
placeholder: unref(
|
|
314
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails"),
|
|
315
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails")
|
|
316
316
|
}, unref(toFormField)(unref(l)), {
|
|
317
317
|
class: "col-span-2",
|
|
318
318
|
"onUpdate:modelValue": H
|
|
@@ -321,12 +321,12 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
|
|
|
321
321
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
|
|
322
322
|
default: withCtx(() => [createVNode(unref(VcSwitch), {
|
|
323
323
|
modelValue: A.value,
|
|
324
|
-
"onUpdate:modelValue": [
|
|
325
|
-
label: unref(
|
|
324
|
+
"onUpdate:modelValue": [t[0] ||= (e) => A.value = e, G],
|
|
325
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.reminder_different_switch"),
|
|
326
326
|
class: "col-span-full"
|
|
327
|
-
}, null, 8, ["modelValue", "label"]), A.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(
|
|
328
|
-
label: unref(
|
|
329
|
-
placeholder: unref(
|
|
327
|
+
}, null, 8, ["modelValue", "label"]), A.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.reminder_email") }, unref(toFormField)(unref(S)), { placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.email") }), null, 16, ["label", "placeholder"]), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(y)), {
|
|
328
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.reminder_cc_emails"),
|
|
329
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.reminder_cc_emails"),
|
|
330
330
|
class: "col-span-2"
|
|
331
331
|
}), null, 16, ["label", "placeholder"])], 64)) : createCommentVNode("", !0)]),
|
|
332
332
|
_: 1
|
|
@@ -337,12 +337,12 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
|
|
|
337
337
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
|
|
338
338
|
default: withCtx(() => [createVNode(unref(VcSwitch), {
|
|
339
339
|
modelValue: j.value,
|
|
340
|
-
"onUpdate:modelValue": [
|
|
341
|
-
label: unref(
|
|
340
|
+
"onUpdate:modelValue": [t[1] ||= (e) => j.value = e, K],
|
|
341
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.purchase_notes_different_switch"),
|
|
342
342
|
class: "col-span-full"
|
|
343
|
-
}, null, 8, ["modelValue", "label"]), j.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(
|
|
344
|
-
label: unref(
|
|
345
|
-
placeholder: unref(
|
|
343
|
+
}, null, 8, ["modelValue", "label"]), j.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(VcTextField), mergeProps({ label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_email") }, unref(toFormField)(unref(g)), { placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.email") }), null, 16, ["label", "placeholder"]), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(p)), {
|
|
344
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_cc_emails"),
|
|
345
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.purchase_note_cc_emails"),
|
|
346
346
|
class: "col-span-2"
|
|
347
347
|
}), null, 16, ["label", "placeholder"])], 64)) : createCommentVNode("", !0)]),
|
|
348
348
|
_: 1
|
|
@@ -363,7 +363,7 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
|
|
|
363
363
|
form: s.value,
|
|
364
364
|
type: "submit"
|
|
365
365
|
}, {
|
|
366
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
366
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t("wise_crm.shared.save_changes")), 1)]),
|
|
367
367
|
_: 1
|
|
368
368
|
}, 8, ["is-loading", "form"])]),
|
|
369
369
|
_: 1
|
|
@@ -377,8 +377,8 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
|
|
|
377
377
|
__name: "BusinessBillingInformationCard",
|
|
378
378
|
props: { businessUuid: {} },
|
|
379
379
|
setup(e) {
|
|
380
|
-
let t = e, n = useApiErrorToast(), r = computed(() => t.businessUuid), i = useBusinessDetailQuery(r), a = useBusinessBillingInformationQuery(r, computed(() => i.data.value === null ? !1 : i.data.value.billingInformation !== null)), o = computed(() => a.data.value?.uuid ?? null), s = useBusinessBillingInformationUpsertMutation(),
|
|
381
|
-
async function
|
|
380
|
+
let t = e, n = useApiErrorToast(), r = computed(() => t.businessUuid), i = useBusinessDetailQuery(r), a = useBusinessBillingInformationQuery(r, computed(() => i.data.value === null ? !1 : i.data.value.billingInformation !== null)), o = computed(() => a.data.value?.uuid ?? null), s = useBusinessBillingInformationUpsertMutation(), c = computed(() => i.data.value?.address ?? null);
|
|
381
|
+
async function l(e) {
|
|
382
382
|
try {
|
|
383
383
|
await s.execute({
|
|
384
384
|
body: e,
|
|
@@ -396,9 +396,9 @@ var BusinessBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompone
|
|
|
396
396
|
class: "h-40"
|
|
397
397
|
})) : (openBlock(), createBlock(BusinessBillingInformationUpdateForm_default, {
|
|
398
398
|
key: 1,
|
|
399
|
-
"business-address":
|
|
399
|
+
"business-address": c.value,
|
|
400
400
|
"business-uuid": r.value,
|
|
401
|
-
"on-submit":
|
|
401
|
+
"on-submit": l,
|
|
402
402
|
"billing-information": unref(a).data.value
|
|
403
403
|
}, null, 8, [
|
|
404
404
|
"business-address",
|
|
@@ -495,29 +495,29 @@ var _hoisted_1$36 = { class: "col-span-4" }, BusinessInfoForm_default = /* @__PU
|
|
|
495
495
|
onSubmit: { type: Function }
|
|
496
496
|
},
|
|
497
497
|
setup(e) {
|
|
498
|
-
let
|
|
498
|
+
let t = e, n = useI18n(), r = useForm({
|
|
499
499
|
initialState: {
|
|
500
|
-
name:
|
|
501
|
-
address:
|
|
502
|
-
companyNumber:
|
|
503
|
-
customFields:
|
|
504
|
-
email:
|
|
505
|
-
language:
|
|
506
|
-
mobilePhone:
|
|
507
|
-
phone:
|
|
508
|
-
vatNumber:
|
|
500
|
+
name: t.business.name,
|
|
501
|
+
address: t.business.address,
|
|
502
|
+
companyNumber: t.business.companyNumber,
|
|
503
|
+
customFields: t.business.customFields ?? null,
|
|
504
|
+
email: t.business.email,
|
|
505
|
+
language: t.business.language,
|
|
506
|
+
mobilePhone: t.business.mobilePhone,
|
|
507
|
+
phone: t.business.phone,
|
|
508
|
+
vatNumber: t.business.vatNumber
|
|
509
509
|
},
|
|
510
|
-
schema: getBusinessUpdateFormSchema(
|
|
510
|
+
schema: getBusinessUpdateFormSchema(t.customFieldDefinitions),
|
|
511
511
|
onSubmit: async (e) => {
|
|
512
|
-
await
|
|
512
|
+
await t.onSubmit(e);
|
|
513
513
|
}
|
|
514
|
-
}), a =
|
|
514
|
+
}), a = r.register("name"), o = r.register("address"), s = r.register("companyNumber"), c = r.register("email"), l = r.register("mobilePhone"), d = r.register("phone"), p = r.register("vatNumber"), g = r.register("language");
|
|
515
515
|
return (e, y) => (openBlock(), createBlock(AppForm_default, {
|
|
516
|
-
form: unref(
|
|
516
|
+
form: unref(r),
|
|
517
517
|
class: "flex h-full flex-col justify-between"
|
|
518
518
|
}, {
|
|
519
519
|
default: withCtx(() => [createVNode(AppCard_default, {
|
|
520
|
-
title: unref(
|
|
520
|
+
title: unref(n).t("wise_crm.info_dialog.info_business_info.card.title"),
|
|
521
521
|
icon: "building"
|
|
522
522
|
}, {
|
|
523
523
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 4 }, {
|
|
@@ -525,28 +525,28 @@ var _hoisted_1$36 = { class: "col-span-4" }, BusinessInfoForm_default = /* @__PU
|
|
|
525
525
|
createElementVNode("div", _hoisted_1$36, [createVNode(AppGrid_default, { cols: 4 }, {
|
|
526
526
|
default: withCtx(() => [
|
|
527
527
|
createVNode(unref(VcTextField), mergeProps({ "is-required": !0 }, unref(toFormField)(unref(a)), {
|
|
528
|
-
label: unref(
|
|
529
|
-
placeholder: unref(
|
|
528
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.name"),
|
|
529
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.name"),
|
|
530
530
|
class: "col-span-2"
|
|
531
531
|
}), null, 16, ["label", "placeholder"]),
|
|
532
532
|
createVNode(AppVatNumberField_default, mergeProps({
|
|
533
|
-
label: unref(
|
|
534
|
-
placeholder: unref(
|
|
533
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.vat_number"),
|
|
534
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.vat_number")
|
|
535
535
|
}, unref(toFormField)(unref(p))), null, 16, ["label", "placeholder"]),
|
|
536
536
|
createVNode(unref(VcTextField), mergeProps({
|
|
537
|
-
label: unref(
|
|
538
|
-
placeholder: unref(
|
|
537
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.company_number"),
|
|
538
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.company_number")
|
|
539
539
|
}, unref(toFormField)(unref(s))), null, 16, ["label", "placeholder"]),
|
|
540
540
|
createVNode(unref(VcAddressAutocomplete), mergeProps({
|
|
541
541
|
"is-required": !0,
|
|
542
|
-
label: unref(
|
|
542
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.address")
|
|
543
543
|
}, unref(toFormField)(unref(o)), { class: "col-span-2" }), null, 16, ["label"]),
|
|
544
|
-
createVNode(unref(VcSelect), mergeProps({ label: unref(
|
|
544
|
+
createVNode(unref(VcSelect), mergeProps({ label: unref(n).t("wise_crm.contact.create_dialog.form.fields.language") }, unref(toFormField)(unref(g)), { "display-fn": (e) => e ? unref(n).t(unref(LocaleEnum).getI18nKey(e)) : "" }), {
|
|
545
545
|
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(Locale)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
|
|
546
546
|
key: e,
|
|
547
547
|
value: e
|
|
548
548
|
}, {
|
|
549
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
549
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(n).t(unref(LocaleEnum).getI18nKey(e))), 1)]),
|
|
550
550
|
_: 2
|
|
551
551
|
}, 1032, ["value"]))), 128))]),
|
|
552
552
|
_: 1
|
|
@@ -555,7 +555,7 @@ var _hoisted_1$36 = { class: "col-span-4" }, BusinessInfoForm_default = /* @__PU
|
|
|
555
555
|
_: 1
|
|
556
556
|
})]),
|
|
557
557
|
createVNode(FormFieldset_default, {
|
|
558
|
-
title: unref(
|
|
558
|
+
title: unref(n).t("wise_crm.shared.contact_info"),
|
|
559
559
|
class: "col-span-4"
|
|
560
560
|
}, {
|
|
561
561
|
default: withCtx(() => [createVNode(AppGrid_default, {
|
|
@@ -564,18 +564,18 @@ var _hoisted_1$36 = { class: "col-span-4" }, BusinessInfoForm_default = /* @__PU
|
|
|
564
564
|
}, {
|
|
565
565
|
default: withCtx(() => [
|
|
566
566
|
createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(c)), {
|
|
567
|
-
label: unref(
|
|
568
|
-
placeholder: unref(
|
|
567
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.email"),
|
|
568
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.email"),
|
|
569
569
|
class: "col-span-2"
|
|
570
570
|
}), null, 16, ["label", "placeholder"]),
|
|
571
571
|
createVNode(unref(VcPhoneNumberField), mergeProps(unref(toFormField)(unref(l)), {
|
|
572
|
-
label: unref(
|
|
573
|
-
placeholder: unref(
|
|
572
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
|
|
573
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
|
|
574
574
|
class: "col-span-2"
|
|
575
575
|
}), null, 16, ["label", "placeholder"]),
|
|
576
576
|
createVNode(unref(VcPhoneNumberField), mergeProps(unref(toFormField)(unref(d)), {
|
|
577
|
-
label: unref(
|
|
578
|
-
placeholder: unref(
|
|
577
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.phone"),
|
|
578
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.phone"),
|
|
579
579
|
class: "col-span-2"
|
|
580
580
|
}), null, 16, ["label", "placeholder"])
|
|
581
581
|
]),
|
|
@@ -584,24 +584,24 @@ var _hoisted_1$36 = { class: "col-span-4" }, BusinessInfoForm_default = /* @__PU
|
|
|
584
584
|
_: 1
|
|
585
585
|
}, 8, ["title"]),
|
|
586
586
|
createVNode(CustomFieldDefinitionForm_default, {
|
|
587
|
-
form: unref(
|
|
588
|
-
"custom-field-definitions":
|
|
587
|
+
form: unref(r),
|
|
588
|
+
"custom-field-definitions": t.customFieldDefinitions,
|
|
589
589
|
class: "col-span-full"
|
|
590
590
|
}, null, 8, ["form", "custom-field-definitions"])
|
|
591
591
|
]),
|
|
592
592
|
_: 1
|
|
593
593
|
})]),
|
|
594
|
-
"header-action": withCtx(() => [createVNode(FormCardSubmitButtonTransition_default, { "is-open": unref(
|
|
594
|
+
"header-action": withCtx(() => [createVNode(FormCardSubmitButtonTransition_default, { "is-open": unref(r).isDirty.value }, {
|
|
595
595
|
default: withCtx(() => [createVNode(unref(VcButton), {
|
|
596
596
|
"class-config": {
|
|
597
597
|
loader: "size-3",
|
|
598
598
|
iconRight: "text-success-500",
|
|
599
599
|
root: "text-xs h-8 px-lg data-[loading=false]:not-disabled:bg-quaternary bg-quaternary border-transparent text-secondary shadow-none"
|
|
600
600
|
},
|
|
601
|
-
"is-loading": unref(
|
|
601
|
+
"is-loading": unref(r).isSubmitting.value,
|
|
602
602
|
type: "submit"
|
|
603
603
|
}, {
|
|
604
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
604
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(n).t("wise_crm.shared.save_changes")), 1)]),
|
|
605
605
|
_: 1
|
|
606
606
|
}, 8, ["is-loading"])]),
|
|
607
607
|
_: 1
|
|
@@ -616,28 +616,28 @@ var _hoisted_1$36 = { class: "col-span-4" }, BusinessInfoForm_default = /* @__PU
|
|
|
616
616
|
props: { businessUuid: {} },
|
|
617
617
|
emits: ["close"],
|
|
618
618
|
setup(e, { emit: t }) {
|
|
619
|
-
let
|
|
620
|
-
async function
|
|
619
|
+
let r = e, i = t, a = useCrmConfig(), o = useApiErrorToast(), s = computed(() => r.businessUuid), c = useBusinessUpdateMutation(), l = useBusinessDetailQuery(computed(() => s.value));
|
|
620
|
+
async function d(e) {
|
|
621
621
|
try {
|
|
622
|
-
await
|
|
622
|
+
await c.execute({
|
|
623
623
|
body: e,
|
|
624
624
|
params: { uuid: s.value }
|
|
625
|
-
}),
|
|
625
|
+
}), p();
|
|
626
626
|
} catch (e) {
|
|
627
627
|
o.show(e);
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function p() {
|
|
631
631
|
i("close");
|
|
632
632
|
}
|
|
633
|
-
return (e, t) => unref(
|
|
633
|
+
return (e, t) => unref(l).isLoading.value ? (openBlock(), createBlock(AppSkeletonLoader_default, {
|
|
634
634
|
key: 0,
|
|
635
635
|
class: "h-100"
|
|
636
|
-
})) : unref(
|
|
636
|
+
})) : unref(l).data.value ? (openBlock(), createBlock(BusinessInfoForm_default, {
|
|
637
637
|
key: 1,
|
|
638
|
-
business: unref(
|
|
638
|
+
business: unref(l).data.value,
|
|
639
639
|
"custom-field-definitions": unref(a).getCustomFieldDefinitionForEntity(unref(EntityType).BUSINESS),
|
|
640
|
-
"on-submit":
|
|
640
|
+
"on-submit": d
|
|
641
641
|
}, null, 8, ["business", "custom-field-definitions"])) : createCommentVNode("", !0);
|
|
642
642
|
}
|
|
643
643
|
}), _hoisted_1$35 = { class: "flex flex-col" }, _hoisted_2$21 = { class: "font-medium" }, _hoisted_3$15 = {
|
|
@@ -1122,14 +1122,14 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$19 = { class: "mx-auto
|
|
|
1122
1122
|
__name: "CrmSearchDialogContent",
|
|
1123
1123
|
props: { onCreateNewContact: { type: Function } },
|
|
1124
1124
|
emits: ["close", "select"],
|
|
1125
|
-
setup(e, { emit:
|
|
1126
|
-
let r = e, i =
|
|
1125
|
+
setup(e, { emit: n }) {
|
|
1126
|
+
let r = e, i = n, a = useI18n(), o = useCrm(), s = ref(""), c = ref(""), l = useDebounceFn((e) => {
|
|
1127
1127
|
s.value = e;
|
|
1128
1128
|
}, 300);
|
|
1129
1129
|
watch(c, (e) => {
|
|
1130
1130
|
l(e);
|
|
1131
1131
|
});
|
|
1132
|
-
let d = [GlobalSearchCollectionName.INDIVIDUAL, GlobalSearchCollectionName.BUSINESS],
|
|
1132
|
+
let d = [GlobalSearchCollectionName.INDIVIDUAL, GlobalSearchCollectionName.BUSINESS], g = useGlobalSearchQuery(computed(() => s.value), computed(() => d ?? [])), _ = computed(() => (g.data.value ?? []).map((e) => e.entity.type === "individual" ? {
|
|
1133
1133
|
id: e.entity.uuid,
|
|
1134
1134
|
address: e.entity.address ? y(e.entity.address) : null,
|
|
1135
1135
|
description: o.getEntityConfig(EntityType.INDIVIDUAL)?.name ?? `${a.t("wise_crm.search.individual_label")}`,
|
|
@@ -1172,7 +1172,7 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$19 = { class: "mx-auto
|
|
|
1172
1172
|
streetNumber: e.streetNumber ?? ""
|
|
1173
1173
|
};
|
|
1174
1174
|
}
|
|
1175
|
-
let S = ref(null), A = computed(() => s.value.length > 0), j = computed(() => A.value && !
|
|
1175
|
+
let S = ref(null), A = computed(() => s.value.length > 0), j = computed(() => A.value && !g.isLoading.value && _.value.length === 0);
|
|
1176
1176
|
function P(e) {
|
|
1177
1177
|
i("select", e.entity.type, e.id);
|
|
1178
1178
|
}
|
|
@@ -1185,14 +1185,14 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$19 = { class: "mx-auto
|
|
|
1185
1185
|
function K(e) {
|
|
1186
1186
|
S.value = e ?? null;
|
|
1187
1187
|
}
|
|
1188
|
-
return (e,
|
|
1188
|
+
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", _hoisted_2$18, [createVNode(AppGroup_default, {
|
|
1189
1189
|
gap: "sm",
|
|
1190
1190
|
align: "center",
|
|
1191
1191
|
class: "flex-1"
|
|
1192
1192
|
}, {
|
|
1193
1193
|
default: withCtx(() => [createVNode(unref(ListboxRoot), {
|
|
1194
1194
|
class: "flex-1",
|
|
1195
|
-
onHighlight:
|
|
1195
|
+
onHighlight: n[2] ||= (e) => K(e?.value?.toString())
|
|
1196
1196
|
}, {
|
|
1197
1197
|
default: withCtx(() => [createVNode(unref(ListboxFilter), {
|
|
1198
1198
|
class: "w-full border-0 bg-transparent text-sm placeholder-gray-500 outline-0 focus:outline-0",
|
|
@@ -1200,7 +1200,7 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$19 = { class: "mx-auto
|
|
|
1200
1200
|
}, {
|
|
1201
1201
|
default: withCtx(() => [createVNode(unref(VcTextField), {
|
|
1202
1202
|
modelValue: c.value,
|
|
1203
|
-
"onUpdate:modelValue":
|
|
1203
|
+
"onUpdate:modelValue": n[0] ||= (e) => c.value = e,
|
|
1204
1204
|
"class-config": {
|
|
1205
1205
|
input: "text-md",
|
|
1206
1206
|
root: "border-none h-auto bg-transparent rounded-none shadow-none outline-none"
|
|
@@ -1241,8 +1241,8 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$19 = { class: "mx-auto
|
|
|
1241
1241
|
key: 1,
|
|
1242
1242
|
"search-term": s.value,
|
|
1243
1243
|
onCreateNewContact: H,
|
|
1244
|
-
onClearSearch:
|
|
1245
|
-
}, null, 8, ["search-term"])) : unref(
|
|
1244
|
+
onClearSearch: n[1] ||= (e) => c.value = ""
|
|
1245
|
+
}, null, 8, ["search-term"])) : unref(g).isLoading ? (openBlock(), createElementBlock("div", _hoisted_11, [createElementVNode("div", _hoisted_12, toDisplayString(unref(a).t("wise_crm.search.searching")), 1)])) : createCommentVNode("", !0)])) : createCommentVNode("", !0)]),
|
|
1246
1246
|
_: 1
|
|
1247
1247
|
})]),
|
|
1248
1248
|
_: 1
|
|
@@ -1394,41 +1394,41 @@ var _hoisted_1$32 = { class: "text-center" }, _hoisted_2$19 = { class: "mx-auto
|
|
|
1394
1394
|
modelModifiers: {}
|
|
1395
1395
|
},
|
|
1396
1396
|
emits: /* @__PURE__ */ mergeModels(["next"], ["update:modelValue"]),
|
|
1397
|
-
setup(t, { emit:
|
|
1398
|
-
let
|
|
1399
|
-
color:
|
|
1400
|
-
icon: EntityTypeUtil.getIcon(
|
|
1401
|
-
label:
|
|
1402
|
-
value:
|
|
1397
|
+
setup(t, { emit: i }) {
|
|
1398
|
+
let a = i, o = useI18n(), s = useCrm(), c = useCrmConfig(), l = useModel(t, "modelValue"), d = computed(() => (c.getConfig().entities ?? [])?.map((e) => ({
|
|
1399
|
+
color: e.color,
|
|
1400
|
+
icon: EntityTypeUtil.getIcon(e.type),
|
|
1401
|
+
label: e.name,
|
|
1402
|
+
value: e.type
|
|
1403
1403
|
})));
|
|
1404
|
-
function
|
|
1405
|
-
|
|
1404
|
+
function g() {
|
|
1405
|
+
a("next");
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1408
|
-
|
|
1407
|
+
function _(e) {
|
|
1408
|
+
l.value = e, g();
|
|
1409
1409
|
}
|
|
1410
|
-
return (
|
|
1410
|
+
return (t, n) => (openBlock(), createBlock(AppDialogContainer_default, { class: "gap-xl flex flex-col" }, {
|
|
1411
1411
|
default: withCtx(() => [createElementVNode("div", null, [createVNode(unref(VcDialogTitle), null, {
|
|
1412
|
-
default: withCtx(() => [createElementVNode("h2", _hoisted_1$30, toDisplayString(unref(
|
|
1412
|
+
default: withCtx(() => [createElementVNode("h2", _hoisted_1$30, toDisplayString(unref(o).t("wise_crm.contact.create_dialog.title")), 1)]),
|
|
1413
1413
|
_: 1
|
|
1414
1414
|
}), createVNode(unref(VcDialogDescription), null, {
|
|
1415
|
-
default: withCtx(() => [createElementVNode("p", _hoisted_2$17, toDisplayString(unref(
|
|
1415
|
+
default: withCtx(() => [createElementVNode("p", _hoisted_2$17, toDisplayString(unref(o).t("wise_crm.contact.create_dialog.description")), 1)]),
|
|
1416
1416
|
_: 1
|
|
1417
|
-
})]), createElementVNode("div", _hoisted_3$11, [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
1418
|
-
key:
|
|
1417
|
+
})]), createElementVNode("div", _hoisted_3$11, [(openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (t) => (openBlock(), createBlock(unref(VcButton), {
|
|
1418
|
+
key: t.value,
|
|
1419
1419
|
"class-config": { root: "h-auto w-auto p-lg rounded-md shadow-none justify-start" },
|
|
1420
1420
|
variant: "secondary",
|
|
1421
1421
|
class: "flex-1",
|
|
1422
|
-
onClick: (
|
|
1422
|
+
onClick: (e) => _(t.value)
|
|
1423
1423
|
}, {
|
|
1424
1424
|
default: withCtx(() => [createVNode(AppColorProvider_default, {
|
|
1425
|
-
"entity-type":
|
|
1426
|
-
color: unref(
|
|
1425
|
+
"entity-type": t.value,
|
|
1426
|
+
color: unref(s).getEntityConfig(t.value)?.color ?? null
|
|
1427
1427
|
}, {
|
|
1428
1428
|
default: withCtx(() => [createElementVNode("span", _hoisted_4$6, [createElementVNode("span", _hoisted_5$3, [createVNode(unref(VcIcon), {
|
|
1429
|
-
icon:
|
|
1429
|
+
icon: t.icon,
|
|
1430
1430
|
class: "size-5"
|
|
1431
|
-
}, null, 8, ["icon"])]), createElementVNode("span", _hoisted_6, toDisplayString(
|
|
1431
|
+
}, null, 8, ["icon"])]), createElementVNode("span", _hoisted_6, toDisplayString(t.label), 1)])]),
|
|
1432
1432
|
_: 2
|
|
1433
1433
|
}, 1032, ["entity-type", "color"])]),
|
|
1434
1434
|
_: 2
|
|
@@ -1453,14 +1453,14 @@ var ContactCreateDialogFooter_default = /* @__PURE__ */ defineComponent({
|
|
|
1453
1453
|
],
|
|
1454
1454
|
setup(e, { emit: t }) {
|
|
1455
1455
|
let n = e, r = t, i = useI18n();
|
|
1456
|
-
function
|
|
1456
|
+
function a() {
|
|
1457
1457
|
r("back");
|
|
1458
1458
|
}
|
|
1459
1459
|
return (e, t) => (openBlock(), createBlock(AppDialogActions_default, null, {
|
|
1460
1460
|
default: withCtx(() => [createVNode(unref(VcButton), {
|
|
1461
1461
|
size: "lg",
|
|
1462
1462
|
variant: "secondary",
|
|
1463
|
-
onClick:
|
|
1463
|
+
onClick: a
|
|
1464
1464
|
}, {
|
|
1465
1465
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("wise_crm.shared.back")), 1)]),
|
|
1466
1466
|
_: 1
|
|
@@ -1512,8 +1512,8 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1512
1512
|
__name: "ContactCreateDialogIndividualForm",
|
|
1513
1513
|
props: { onSubmit: { type: Function } },
|
|
1514
1514
|
emits: ["back"],
|
|
1515
|
-
setup(
|
|
1516
|
-
let
|
|
1515
|
+
setup(t, { emit: o }) {
|
|
1516
|
+
let s = t, c = o, l = useI18n(), d = useCrm(), g = useCrmConfig(), y = computed(() => d.getEntityConfig(EntityType$1.INDIVIDUAL)), S = computed(() => g.getCustomFieldDefinitionForEntity(EntityType$1.INDIVIDUAL).filter((e) => e.isDisplayedOnCreate)), A = useForm({
|
|
1517
1517
|
initialState: {
|
|
1518
1518
|
address: null,
|
|
1519
1519
|
customFields: null,
|
|
@@ -1525,17 +1525,17 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1525
1525
|
},
|
|
1526
1526
|
schema: getIndividualCreateFormSchema(S.value),
|
|
1527
1527
|
onSubmit: async (e) => {
|
|
1528
|
-
await
|
|
1528
|
+
await s.onSubmit(e);
|
|
1529
1529
|
}
|
|
1530
1530
|
}), j = A.register("firstName"), P = A.register("lastName"), H = A.register("phone"), G = A.register("mobilePhone"), K = A.register("email"), _u = A.register("address");
|
|
1531
1531
|
function vu() {
|
|
1532
|
-
|
|
1532
|
+
c("back");
|
|
1533
1533
|
}
|
|
1534
|
-
return (
|
|
1535
|
-
default: withCtx(() => [createVNode(AppColorProvider_default, { color: unref(
|
|
1534
|
+
return (t, n) => (openBlock(), createBlock(AppDialogContainer_default, { class: "gap-xl flex flex-1 flex-col overflow-hidden" }, {
|
|
1535
|
+
default: withCtx(() => [createVNode(AppColorProvider_default, { color: unref(d).getEntityConfig(unref(EntityType$1).INDIVIDUAL)?.color ?? null }, {
|
|
1536
1536
|
default: withCtx(() => [createVNode(AppDialogHeader_default, {
|
|
1537
|
-
title: unref(
|
|
1538
|
-
description: unref(
|
|
1537
|
+
title: unref(l).t("wise_crm.contact.create_dialog.form.title", { value: y.value?.name ?? "-" }),
|
|
1538
|
+
description: unref(l).t("wise_crm.contact.create_dialog.form.description"),
|
|
1539
1539
|
icon: "user"
|
|
1540
1540
|
}, {
|
|
1541
1541
|
"closse-button": withCtx(() => [createVNode(unref(VcDialogCloseButton))]),
|
|
@@ -1552,17 +1552,17 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1552
1552
|
default: withCtx(() => [
|
|
1553
1553
|
createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(j)), {
|
|
1554
1554
|
"is-required": !0,
|
|
1555
|
-
label: unref(
|
|
1556
|
-
placeholder: unref(
|
|
1555
|
+
label: unref(l).t("wise_crm.contact.create_dialog.form.fields.first_name"),
|
|
1556
|
+
placeholder: unref(l).t("wise_crm.contact.create_dialog.form.fields.first_name")
|
|
1557
1557
|
}), null, 16, ["label", "placeholder"]),
|
|
1558
1558
|
createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(P)), {
|
|
1559
1559
|
"is-required": !0,
|
|
1560
|
-
label: unref(
|
|
1561
|
-
placeholder: unref(
|
|
1560
|
+
label: unref(l).t("wise_crm.contact.create_dialog.form.fields.last_name"),
|
|
1561
|
+
placeholder: unref(l).t("wise_crm.contact.create_dialog.form.fields.last_name")
|
|
1562
1562
|
}), null, 16, ["label", "placeholder"]),
|
|
1563
1563
|
createVNode(unref(VcAddressAutocomplete), mergeProps({
|
|
1564
|
-
label: unref(
|
|
1565
|
-
placeholder: unref(
|
|
1564
|
+
label: unref(l).t("wise_crm.contact.create_dialog.form.fields.address"),
|
|
1565
|
+
placeholder: unref(l).t("wise_crm.contact.create_dialog.form.fields.address")
|
|
1566
1566
|
}, unref(toFormField)(unref(_u)), { class: "col-span-2" }), null, 16, ["label", "placeholder"]),
|
|
1567
1567
|
createVNode(CustomFieldDefinitionForm_default, {
|
|
1568
1568
|
"custom-field-definitions": S.value,
|
|
@@ -1570,7 +1570,7 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1570
1570
|
class: "col-span-2"
|
|
1571
1571
|
}, null, 8, ["custom-field-definitions", "form"]),
|
|
1572
1572
|
createVNode(FormFieldset_default, {
|
|
1573
|
-
title: unref(
|
|
1573
|
+
title: unref(l).t("wise_crm.shared.contact_info"),
|
|
1574
1574
|
class: "col-span-2"
|
|
1575
1575
|
}, {
|
|
1576
1576
|
default: withCtx(() => [createVNode(AppGrid_default, {
|
|
@@ -1579,24 +1579,24 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1579
1579
|
}, {
|
|
1580
1580
|
default: withCtx(() => [
|
|
1581
1581
|
createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(K)), {
|
|
1582
|
-
label: unref(
|
|
1583
|
-
placeholder: unref(
|
|
1582
|
+
label: unref(l).t("wise_crm.contact.create_dialog.form.fields.email"),
|
|
1583
|
+
placeholder: unref(l).t("wise_crm.contact.create_dialog.form.fields.email")
|
|
1584
1584
|
}), null, 16, ["label", "placeholder"]),
|
|
1585
1585
|
createVNode(AppAndOrSeparator_default, null, {
|
|
1586
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
1586
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(l).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)]),
|
|
1587
1587
|
_: 1
|
|
1588
1588
|
}),
|
|
1589
1589
|
createVNode(unref(VcPhoneNumberField), mergeProps(unref(toFormField)(unref(G)), {
|
|
1590
|
-
label: unref(
|
|
1591
|
-
placeholder: unref(
|
|
1590
|
+
label: unref(l).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
|
|
1591
|
+
placeholder: unref(l).t("wise_crm.contact.create_dialog.form.fields.mobile_phone")
|
|
1592
1592
|
}), null, 16, ["label", "placeholder"]),
|
|
1593
1593
|
createVNode(AppAndOrSeparator_default, null, {
|
|
1594
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
1594
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(l).t("wise_crm.contact.create_dialog.form.seperator_label")), 1)]),
|
|
1595
1595
|
_: 1
|
|
1596
1596
|
}),
|
|
1597
1597
|
createVNode(unref(VcPhoneNumberField), mergeProps(unref(toFormField)(unref(H)), {
|
|
1598
|
-
label: unref(
|
|
1599
|
-
placeholder: unref(
|
|
1598
|
+
label: unref(l).t("wise_crm.contact.create_dialog.form.fields.phone"),
|
|
1599
|
+
placeholder: unref(l).t("wise_crm.contact.create_dialog.form.fields.phone")
|
|
1600
1600
|
}), null, 16, ["label", "placeholder"])
|
|
1601
1601
|
]),
|
|
1602
1602
|
_: 1
|
|
@@ -1627,7 +1627,7 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1627
1627
|
emits: ["back", "close"],
|
|
1628
1628
|
setup(e, { emit: t }) {
|
|
1629
1629
|
let n = e, r = t, i = useApiErrorToast(), a = useCrm(), o = useBusinessCreateMutation(), s = useIndividualCreateMutation();
|
|
1630
|
-
async function
|
|
1630
|
+
async function c(e) {
|
|
1631
1631
|
try {
|
|
1632
1632
|
let t = await o.execute({ body: e });
|
|
1633
1633
|
if (n.onCreate) {
|
|
@@ -1639,7 +1639,7 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1639
1639
|
i.show(e);
|
|
1640
1640
|
}
|
|
1641
1641
|
}
|
|
1642
|
-
async function
|
|
1642
|
+
async function l(e) {
|
|
1643
1643
|
try {
|
|
1644
1644
|
let t = await s.execute({ body: e });
|
|
1645
1645
|
if (n.onCreate) {
|
|
@@ -1651,17 +1651,17 @@ var ContactCreateDialogIndividualForm_default = /* @__PURE__ */ defineComponent(
|
|
|
1651
1651
|
i.show(e);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function d() {
|
|
1655
1655
|
r("back");
|
|
1656
1656
|
}
|
|
1657
1657
|
return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$29, [n.entityType === unref(EntityType$1).INDIVIDUAL ? (openBlock(), createBlock(ContactCreateDialogIndividualForm_default, {
|
|
1658
1658
|
key: 0,
|
|
1659
|
-
"on-submit":
|
|
1660
|
-
onBack:
|
|
1659
|
+
"on-submit": l,
|
|
1660
|
+
onBack: d
|
|
1661
1661
|
})) : createCommentVNode("", !0), n.entityType === unref(EntityType$1).BUSINESS ? (openBlock(), createBlock(ContactCreateDialogBusinessForm_default, {
|
|
1662
1662
|
key: 1,
|
|
1663
|
-
"on-submit":
|
|
1664
|
-
onBack:
|
|
1663
|
+
"on-submit": c,
|
|
1664
|
+
onBack: d
|
|
1665
1665
|
})) : createCommentVNode("", !0)]));
|
|
1666
1666
|
}
|
|
1667
1667
|
}), ContactCreateDialog_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1819,13 +1819,13 @@ function _sfc_render$2(e, t) {
|
|
|
1819
1819
|
var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$2, [["render", _sfc_render$2]]), _hoisted_1$26 = { class: "p-xl bg-primary relative isolate h-full max-w-150 min-w-100 overflow-hidden rounded-xl shadow-lg" }, _hoisted_2$16 = { class: "text-primary font-semibold" }, _hoisted_3$10 = { class: "text-brand-600 text-4xl font-semibold" }, _hoisted_4$5 = { class: "text-sm" }, WidgetBusinessStatistics_default = /* @__PURE__ */ defineComponent({
|
|
1820
1820
|
__name: "WidgetBusinessStatistics",
|
|
1821
1821
|
emits: ["viewAll"],
|
|
1822
|
-
setup(
|
|
1823
|
-
let
|
|
1824
|
-
function
|
|
1825
|
-
|
|
1822
|
+
setup(t, { emit: n }) {
|
|
1823
|
+
let r = n, i = useI18n(), a = useCrm(), o = useBusinessStatisticsQuery(), s = computed(() => (o.data.value?.monthlyPercentageGrowth ?? 0) < 0 ? "arrowDown" : "arrowUp");
|
|
1824
|
+
function c() {
|
|
1825
|
+
r("viewAll");
|
|
1826
1826
|
}
|
|
1827
|
-
return (
|
|
1828
|
-
color: unref(
|
|
1827
|
+
return (t, n) => (openBlock(), createBlock(AppColorProvider_default, {
|
|
1828
|
+
color: unref(a).getEntityConfig(unref(EntityType).BUSINESS)?.color ?? null,
|
|
1829
1829
|
class: "flex-1"
|
|
1830
1830
|
}, {
|
|
1831
1831
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$26, [
|
|
@@ -1840,17 +1840,17 @@ var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_defau
|
|
|
1840
1840
|
justify: "between",
|
|
1841
1841
|
class: "w-full"
|
|
1842
1842
|
}, {
|
|
1843
|
-
default: withCtx(() => [createElementVNode("p", _hoisted_2$16, toDisplayString(unref(
|
|
1843
|
+
default: withCtx(() => [createElementVNode("p", _hoisted_2$16, toDisplayString(unref(a).getEntityConfig(unref(EntityType).BUSINESS)?.name ?? ""), 1), createVNode(unref(VcButton), {
|
|
1844
1844
|
variant: "tertiary",
|
|
1845
1845
|
"icon-right": "chevronRight",
|
|
1846
|
-
onClick:
|
|
1846
|
+
onClick: c
|
|
1847
1847
|
}, {
|
|
1848
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
1848
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("wise_crm.widgets.view_all")), 1)]),
|
|
1849
1849
|
_: 1
|
|
1850
1850
|
})]),
|
|
1851
1851
|
_: 1
|
|
1852
1852
|
}),
|
|
1853
|
-
createElementVNode("p", _hoisted_3$10, toDisplayString(unref(
|
|
1853
|
+
createElementVNode("p", _hoisted_3$10, toDisplayString(unref(o).data.value?.total ?? 0), 1),
|
|
1854
1854
|
createVNode(AppGroup_default, {
|
|
1855
1855
|
align: "start",
|
|
1856
1856
|
direction: "col"
|
|
@@ -1863,7 +1863,7 @@ var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_defau
|
|
|
1863
1863
|
default: withCtx(() => [createVNode(unref(VcIcon), {
|
|
1864
1864
|
icon: "plus",
|
|
1865
1865
|
class: "size-3"
|
|
1866
|
-
}), createElementVNode("p", _hoisted_4$5, toDisplayString(unref(
|
|
1866
|
+
}), createElementVNode("p", _hoisted_4$5, toDisplayString(unref(i).t("wise_crm.widgets.individuals.value_since_last_month", { count: unref(o).data.value?.monthlyAdded ?? 0 })), 1)]),
|
|
1867
1867
|
_: 1
|
|
1868
1868
|
})]),
|
|
1869
1869
|
_: 1
|
|
@@ -1873,9 +1873,9 @@ var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_defau
|
|
|
1873
1873
|
}, {
|
|
1874
1874
|
default: withCtx(() => [createVNode(AppGroup_default, { gap: "xs" }, {
|
|
1875
1875
|
default: withCtx(() => [createVNode(unref(VcIcon), {
|
|
1876
|
-
icon:
|
|
1876
|
+
icon: s.value,
|
|
1877
1877
|
class: "size-3"
|
|
1878
|
-
}, null, 8, ["icon"]), createElementVNode("p", null, toDisplayString(unref(
|
|
1878
|
+
}, null, 8, ["icon"]), createElementVNode("p", null, toDisplayString(unref(i).t("wise_crm.widgets.individuals.since_last_month", { count: Math.abs(unref(o).data.value?.monthlyPercentageGrowth ?? 0) })), 1)]),
|
|
1879
1879
|
_: 1
|
|
1880
1880
|
})]),
|
|
1881
1881
|
_: 1
|
|
@@ -1887,8 +1887,8 @@ var BackgroundPattern_default = /* @__PURE__ */ __plugin_vue_export_helper_defau
|
|
|
1887
1887
|
}),
|
|
1888
1888
|
createVNode(BackgroundPattern_default, { class: "text-brand-100 absolute top-0 right-0 translate-x-1/2 scale-150" }),
|
|
1889
1889
|
createVNode(BackgroundBuilding_default, { class: "absolute right-10 bottom-0 z-4" }),
|
|
1890
|
-
|
|
1891
|
-
|
|
1890
|
+
n[0] ||= createElementVNode("div", { class: "absolute right-0 bottom-0 z-3 size-45 translate-y-1/2 rounded-full bg-gray-200" }, null, -1),
|
|
1891
|
+
n[1] ||= createElementVNode("div", { class: "bg-brand-400 absolute right-0 bottom-0 z-2 size-40 translate-x-1/4 translate-y-1/2 rounded-full opacity-30 blur-3xl" }, null, -1),
|
|
1892
1892
|
createVNode(BackgroundPattern_default, { class: "text-brand-100 absolute top-0 right-0 z-1 translate-x-1/2 scale-150" })
|
|
1893
1893
|
])]),
|
|
1894
1894
|
_: 1
|
|
@@ -1914,13 +1914,13 @@ function _sfc_render$1(e, t) {
|
|
|
1914
1914
|
var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main$1, [["render", _sfc_render$1]]), _hoisted_1$24 = { class: "p-xl bg-primary relative isolate h-full max-w-150 min-w-100 overflow-hidden rounded-xl shadow-lg" }, _hoisted_2$15 = { class: "text-primary font-semibold" }, _hoisted_3$9 = { class: "text-brand-600 text-4xl font-semibold" }, WidgetIndividualStatistics_default = /* @__PURE__ */ defineComponent({
|
|
1915
1915
|
__name: "WidgetIndividualStatistics",
|
|
1916
1916
|
emits: ["viewAll"],
|
|
1917
|
-
setup(
|
|
1918
|
-
let
|
|
1919
|
-
function
|
|
1920
|
-
|
|
1917
|
+
setup(t, { emit: n }) {
|
|
1918
|
+
let r = n, i = useI18n(), a = useCrm(), o = useIndividualStatisticsQuery();
|
|
1919
|
+
function s() {
|
|
1920
|
+
r("viewAll");
|
|
1921
1921
|
}
|
|
1922
|
-
return (
|
|
1923
|
-
color: unref(
|
|
1922
|
+
return (t, n) => (openBlock(), createBlock(AppColorProvider_default, {
|
|
1923
|
+
color: unref(a).getEntityConfig(unref(EntityType).INDIVIDUAL)?.color ?? null,
|
|
1924
1924
|
class: "flex-1"
|
|
1925
1925
|
}, {
|
|
1926
1926
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$24, [
|
|
@@ -1935,17 +1935,17 @@ var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_defaul
|
|
|
1935
1935
|
justify: "between",
|
|
1936
1936
|
class: "w-full"
|
|
1937
1937
|
}, {
|
|
1938
|
-
default: withCtx(() => [createElementVNode("p", _hoisted_2$15, toDisplayString(unref(
|
|
1938
|
+
default: withCtx(() => [createElementVNode("p", _hoisted_2$15, toDisplayString(unref(a).getEntityConfig(unref(EntityType).INDIVIDUAL)?.name ?? ""), 1), createVNode(unref(VcButton), {
|
|
1939
1939
|
variant: "tertiary",
|
|
1940
1940
|
"icon-right": "chevronRight",
|
|
1941
|
-
onClick:
|
|
1941
|
+
onClick: s
|
|
1942
1942
|
}, {
|
|
1943
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
1943
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("wise_crm.widgets.view_all")), 1)]),
|
|
1944
1944
|
_: 1
|
|
1945
1945
|
})]),
|
|
1946
1946
|
_: 1
|
|
1947
1947
|
}),
|
|
1948
|
-
createElementVNode("p", _hoisted_3$9, toDisplayString(unref(
|
|
1948
|
+
createElementVNode("p", _hoisted_3$9, toDisplayString(unref(o).data.value?.total ?? 0), 1),
|
|
1949
1949
|
createVNode(AppGroup_default, {
|
|
1950
1950
|
align: "start",
|
|
1951
1951
|
direction: "col"
|
|
@@ -1958,7 +1958,7 @@ var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_defaul
|
|
|
1958
1958
|
default: withCtx(() => [createVNode(unref(VcIcon), {
|
|
1959
1959
|
icon: "plus",
|
|
1960
1960
|
class: "size-3"
|
|
1961
|
-
}), createElementVNode("p", null, toDisplayString(unref(
|
|
1961
|
+
}), createElementVNode("p", null, toDisplayString(unref(i).t("wise_crm.widgets.individuals.value_since_last_month", { count: unref(o).data.value?.monthlyAdded ?? 0 })), 1)]),
|
|
1962
1962
|
_: 1
|
|
1963
1963
|
})]),
|
|
1964
1964
|
_: 1
|
|
@@ -1968,9 +1968,9 @@ var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_defaul
|
|
|
1968
1968
|
}, {
|
|
1969
1969
|
default: withCtx(() => [createVNode(AppGroup_default, { gap: "xs" }, {
|
|
1970
1970
|
default: withCtx(() => [createVNode(unref(VcIcon), {
|
|
1971
|
-
icon: (unref(
|
|
1971
|
+
icon: (unref(o).data.value?.monthlyPercentageGrowth ?? 0) < 0 ? "arrowDown" : "arrowUp",
|
|
1972
1972
|
class: "size-3"
|
|
1973
|
-
}, null, 8, ["icon"]), createElementVNode("p", null, toDisplayString(unref(
|
|
1973
|
+
}, null, 8, ["icon"]), createElementVNode("p", null, toDisplayString(unref(i).t("wise_crm.widgets.individuals.since_last_month", { count: Math.abs(unref(o).data.value?.monthlyPercentageGrowth ?? 0) })), 1)]),
|
|
1974
1974
|
_: 1
|
|
1975
1975
|
})]),
|
|
1976
1976
|
_: 1
|
|
@@ -1981,8 +1981,8 @@ var BackgroundAvatar_default = /* @__PURE__ */ __plugin_vue_export_helper_defaul
|
|
|
1981
1981
|
_: 1
|
|
1982
1982
|
}),
|
|
1983
1983
|
createVNode(BackgroundAvatar_default, { class: "absolute right-10 bottom-0 z-4" }),
|
|
1984
|
-
|
|
1985
|
-
|
|
1984
|
+
n[0] ||= createElementVNode("div", { class: "absolute right-0 bottom-0 z-3 size-45 translate-y-1/2 rounded-full bg-gray-200" }, null, -1),
|
|
1985
|
+
n[1] ||= createElementVNode("div", { class: "bg-brand-400 absolute right-0 bottom-0 z-2 size-40 translate-x-1/4 translate-y-1/2 rounded-full opacity-30 blur-3xl" }, null, -1),
|
|
1986
1986
|
createVNode(BackgroundPattern_default, { class: "text-brand-100 absolute top-0 right-0 z-1 translate-x-1/2 scale-150" })
|
|
1987
1987
|
])]),
|
|
1988
1988
|
_: 1
|
|
@@ -2070,12 +2070,12 @@ var _hoisted_1$23 = { class: "gap-sm flex items-center" }, _hoisted_2$14 = { cla
|
|
|
2070
2070
|
}, CrmOverviewContent_default = /* @__PURE__ */ defineComponent({
|
|
2071
2071
|
__name: "CrmOverviewContent",
|
|
2072
2072
|
setup(e) {
|
|
2073
|
-
let t = useRouter(),
|
|
2073
|
+
let t = useRouter(), r = useCrm(), i = useCrmConfig(), a = useContactCreateDialog();
|
|
2074
2074
|
function o() {
|
|
2075
2075
|
a.open();
|
|
2076
2076
|
}
|
|
2077
2077
|
function s(e, t) {
|
|
2078
|
-
e === EntityType.INDIVIDUAL &&
|
|
2078
|
+
e === EntityType.INDIVIDUAL && r.openIndividualDetail(t), e === EntityType.BUSINESS && r.openBusinessDetail(t);
|
|
2079
2079
|
}
|
|
2080
2080
|
function c() {
|
|
2081
2081
|
t.push({ name: i.getOptions().widgets?.entityStatistics?.viewAllIndividualRouteName });
|
|
@@ -4023,36 +4023,36 @@ var _hoisted_1$12 = { class: "bg-tertiary border-secondary asp p-sm flex size-6
|
|
|
4023
4023
|
column: {}
|
|
4024
4024
|
},
|
|
4025
4025
|
emits: ["openDeal"],
|
|
4026
|
-
setup(
|
|
4027
|
-
let
|
|
4028
|
-
boardColumnUuid: [
|
|
4029
|
-
dealOwnerUuids:
|
|
4030
|
-
})) } }),
|
|
4031
|
-
function
|
|
4032
|
-
|
|
4026
|
+
setup(t, { emit: n }) {
|
|
4027
|
+
let r = t, i = n, a = useDealIndexQuery({ params: { filters: computed(() => ({
|
|
4028
|
+
boardColumnUuid: [r.column.uuid],
|
|
4029
|
+
dealOwnerUuids: r.selectedOwnerUuid ? [r.selectedOwnerUuid] : void 0
|
|
4030
|
+
})) } }), o = computed(() => a.data.value.data ?? []), s = computed(() => a.data.value?.meta.total ?? 0);
|
|
4031
|
+
function c(e) {
|
|
4032
|
+
i("openDeal", e);
|
|
4033
4033
|
}
|
|
4034
|
-
return (
|
|
4035
|
-
createElementVNode("div", _hoisted_2$7, [createVNode(AppColorProvider_default, { color:
|
|
4034
|
+
return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
4035
|
+
createElementVNode("div", _hoisted_2$7, [createVNode(AppColorProvider_default, { color: r.column.color }, {
|
|
4036
4036
|
default: withCtx(() => [createVNode(unref(VcBadge), {
|
|
4037
4037
|
"class-config": { root: "data-[variant=translucent]:rounded-md" },
|
|
4038
4038
|
color: "brand",
|
|
4039
4039
|
variant: "translucent"
|
|
4040
4040
|
}, {
|
|
4041
|
-
default: withCtx(() => [createTextVNode(toDisplayString(`${
|
|
4041
|
+
default: withCtx(() => [createTextVNode(toDisplayString(`${s.value} ${r.column.displayName}`), 1)]),
|
|
4042
4042
|
_: 1
|
|
4043
4043
|
})]),
|
|
4044
4044
|
_: 1
|
|
4045
4045
|
}, 8, ["color"])]),
|
|
4046
|
-
|
|
4046
|
+
n[0] ||= createElementVNode("div", { class: "bg-quaternary h-px w-full" }, null, -1),
|
|
4047
4047
|
createVNode(AppGroup_default, {
|
|
4048
4048
|
direction: "col",
|
|
4049
4049
|
class: "flex-1 overflow-y-auto"
|
|
4050
4050
|
}, {
|
|
4051
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
4051
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (e) => (openBlock(), createBlock(DealOverviewColumnItem_default, {
|
|
4052
4052
|
key: e.uuid,
|
|
4053
4053
|
deal: e,
|
|
4054
|
-
"board-column-config":
|
|
4055
|
-
onOpenDeal:
|
|
4054
|
+
"board-column-config": r.column.config,
|
|
4055
|
+
onOpenDeal: c
|
|
4056
4056
|
}, null, 8, ["deal", "board-column-config"]))), 128))]),
|
|
4057
4057
|
_: 1
|
|
4058
4058
|
})
|
|
@@ -4091,49 +4091,49 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
|
|
|
4091
4091
|
stepper: {}
|
|
4092
4092
|
},
|
|
4093
4093
|
setup(e) {
|
|
4094
|
-
let
|
|
4095
|
-
for (let e = 0; e <
|
|
4094
|
+
let n = e, i = useI18n(), a = computed(() => {
|
|
4095
|
+
for (let e = 0; e < n.stepper.index.value; e++) if (!n.stepper.findStepAt(e)?.isValid) return !1;
|
|
4096
4096
|
return !0;
|
|
4097
4097
|
});
|
|
4098
|
-
function
|
|
4099
|
-
return
|
|
4098
|
+
function o(e) {
|
|
4099
|
+
return n.stepper.current.value.id === e;
|
|
4100
4100
|
}
|
|
4101
|
-
let
|
|
4102
|
-
function
|
|
4103
|
-
|
|
4101
|
+
let s = computed(() => !a.value || !n.stepper.current.value.isValid());
|
|
4102
|
+
function c() {
|
|
4103
|
+
n.form.blurAll(), !(!a.value || !n.stepper.current.value.isValid()) && n.stepper.goToNext();
|
|
4104
4104
|
}
|
|
4105
|
-
return (
|
|
4105
|
+
return (a, l) => (openBlock(), createElementBlock("div", null, [createVNode(AppSeparator_default), createVNode(AppDialogContainer_default, { class: "flex items-center justify-between" }, {
|
|
4106
4106
|
default: withCtx(() => [
|
|
4107
4107
|
createVNode(unref(VcButton), {
|
|
4108
4108
|
"is-disabled": e.stepper.isFirst.value,
|
|
4109
4109
|
variant: "secondary",
|
|
4110
4110
|
onClick: e.stepper.goToPrevious
|
|
4111
4111
|
}, {
|
|
4112
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
4112
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("shared.previous")), 1)]),
|
|
4113
4113
|
_: 1
|
|
4114
4114
|
}, 8, ["is-disabled", "onClick"]),
|
|
4115
4115
|
createElementVNode("div", _hoisted_1$9, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.stepper.steps.value, (e) => (openBlock(), createElementBlock("div", {
|
|
4116
4116
|
key: e.id,
|
|
4117
4117
|
class: normalizeClass([{
|
|
4118
|
-
"bg-brand-500":
|
|
4119
|
-
"bg-quaternary": !
|
|
4118
|
+
"bg-brand-500": o(e.id),
|
|
4119
|
+
"bg-quaternary": !o(e.id)
|
|
4120
4120
|
}, "size-2 rounded-full"])
|
|
4121
4121
|
}, null, 2))), 128))]),
|
|
4122
4122
|
e.stepper.isLast.value ? (openBlock(), createBlock(unref(VcButton), {
|
|
4123
4123
|
key: 1,
|
|
4124
|
-
"is-loading":
|
|
4124
|
+
"is-loading": n.isLoading,
|
|
4125
4125
|
"icon-left": "plus",
|
|
4126
4126
|
type: "submit"
|
|
4127
4127
|
}, {
|
|
4128
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
4128
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("shared.add")), 1)]),
|
|
4129
4129
|
_: 1
|
|
4130
4130
|
}, 8, ["is-loading"])) : (openBlock(), createBlock(unref(VcButton), {
|
|
4131
4131
|
key: 0,
|
|
4132
|
-
"is-disabled":
|
|
4132
|
+
"is-disabled": s.value,
|
|
4133
4133
|
class: "dark:text-gray-950",
|
|
4134
|
-
onClick:
|
|
4134
|
+
onClick: c
|
|
4135
4135
|
}, {
|
|
4136
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
4136
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(i).t("shared.next")), 1)]),
|
|
4137
4137
|
_: 1
|
|
4138
4138
|
}, 8, ["is-disabled"]))
|
|
4139
4139
|
]),
|
|
@@ -4144,43 +4144,43 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
|
|
|
4144
4144
|
__name: "DealCreateDialogExtraInfoForm",
|
|
4145
4145
|
props: { form: {} },
|
|
4146
4146
|
setup(e) {
|
|
4147
|
-
let
|
|
4148
|
-
function
|
|
4149
|
-
return
|
|
4147
|
+
let t = e, n = useI18n(), r = t.form.register("name", `${n.t("wise_crm.deal.form.fields.quote")}: ${t.form.state.value.clientId?.name}`), i = t.form.register("dealLanguage"), a = t.form.register("dealSource");
|
|
4148
|
+
function o(e) {
|
|
4149
|
+
return n.t(ContentLocaleUtil.getI18nKey(e));
|
|
4150
4150
|
}
|
|
4151
|
-
function
|
|
4152
|
-
return
|
|
4151
|
+
function s(e) {
|
|
4152
|
+
return n.t(DealSourceUtil.getI18nKey(e));
|
|
4153
4153
|
}
|
|
4154
|
-
return (e,
|
|
4154
|
+
return (e, t) => (openBlock(), createBlock(AppGrid_default, { cols: 2 }, {
|
|
4155
4155
|
default: withCtx(() => [
|
|
4156
4156
|
createVNode(unref(VcTextField), mergeProps({
|
|
4157
|
-
label: unref(
|
|
4158
|
-
placeholder: unref(
|
|
4159
|
-
}, unref(toFormField)(unref(
|
|
4160
|
-
createVNode(unref(VcSelect), mergeProps(unref(toFormField)(unref(
|
|
4161
|
-
"display-fn":
|
|
4162
|
-
label: unref(
|
|
4163
|
-
placeholder: unref(
|
|
4157
|
+
label: unref(n).t("wise_crm.deal.form.fields.name"),
|
|
4158
|
+
placeholder: unref(n).t("wise_crm.deal.form.fields.name_placeholder")
|
|
4159
|
+
}, unref(toFormField)(unref(r)), { class: "col-span-full" }), null, 16, ["label", "placeholder"]),
|
|
4160
|
+
createVNode(unref(VcSelect), mergeProps(unref(toFormField)(unref(i)), {
|
|
4161
|
+
"display-fn": o,
|
|
4162
|
+
label: unref(n).t("wise_crm.deal.form.fields.language"),
|
|
4163
|
+
placeholder: unref(n).t("wise_crm.deal.form.fields.language_placeholder")
|
|
4164
4164
|
}), {
|
|
4165
4165
|
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(SdkContentLocale)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
|
|
4166
4166
|
key: e,
|
|
4167
4167
|
value: e
|
|
4168
4168
|
}, {
|
|
4169
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
4169
|
+
default: withCtx(() => [createTextVNode(toDisplayString(o(e)), 1)]),
|
|
4170
4170
|
_: 2
|
|
4171
4171
|
}, 1032, ["value"]))), 128))]),
|
|
4172
4172
|
_: 1
|
|
4173
4173
|
}, 16, ["label", "placeholder"]),
|
|
4174
4174
|
createVNode(unref(VcSelect), mergeProps({
|
|
4175
|
-
"display-fn":
|
|
4176
|
-
label: unref(
|
|
4177
|
-
placeholder: unref(
|
|
4178
|
-
}, unref(toFormField)(unref(
|
|
4175
|
+
"display-fn": s,
|
|
4176
|
+
label: unref(n).t("wise_crm.deal.form.fields.source"),
|
|
4177
|
+
placeholder: unref(n).t("wise_crm.deal.form.fields.source_placeholder")
|
|
4178
|
+
}, unref(toFormField)(unref(a))), {
|
|
4179
4179
|
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(DealSource)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
|
|
4180
4180
|
key: e,
|
|
4181
4181
|
value: e
|
|
4182
4182
|
}, {
|
|
4183
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
4183
|
+
default: withCtx(() => [createTextVNode(toDisplayString(s(e)), 1)]),
|
|
4184
4184
|
_: 2
|
|
4185
4185
|
}, 1032, ["value"]))), 128))]),
|
|
4186
4186
|
_: 1
|
|
@@ -4200,29 +4200,29 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
|
|
|
4200
4200
|
}),
|
|
4201
4201
|
emits: /* @__PURE__ */ mergeModels(["createNew"], ["update:modelValue"]),
|
|
4202
4202
|
setup(e, { emit: t }) {
|
|
4203
|
-
let n = e, r = t, i = useI18n(), a = useModel(e, "modelValue"), o = ref(!0), s = useSearch({ persistInUrl: !1 }),
|
|
4203
|
+
let n = e, r = t, i = useI18n(), a = useModel(e, "modelValue"), o = ref(!0), s = useSearch({ persistInUrl: !1 }), l = useBusinessIndexQuery({ params: { search: s.debouncedSearch } }, computed(() => !o.value)), p = useDebounceFn((e) => {
|
|
4204
4204
|
e !== null && (o.value = e.length === 0 || e.trim().length === 0, s.updateSearch(e));
|
|
4205
|
-
}, 300),
|
|
4206
|
-
async function
|
|
4207
|
-
await
|
|
4205
|
+
}, 300), g = computed(() => l.data.value?.data ?? []);
|
|
4206
|
+
async function _(e) {
|
|
4207
|
+
await p(e);
|
|
4208
4208
|
}
|
|
4209
|
-
function
|
|
4209
|
+
function y() {
|
|
4210
4210
|
r("createNew");
|
|
4211
4211
|
}
|
|
4212
|
-
function
|
|
4213
|
-
return
|
|
4212
|
+
function S(e) {
|
|
4213
|
+
return g.value.find((t) => t.uuid === e)?.name ?? "";
|
|
4214
4214
|
}
|
|
4215
4215
|
return (e, t) => (openBlock(), createBlock(EntityAutocomplete_default, {
|
|
4216
4216
|
modelValue: a.value,
|
|
4217
4217
|
"onUpdate:modelValue": t[0] ||= (e) => a.value = e,
|
|
4218
4218
|
"is-required": n.isRequired,
|
|
4219
|
-
"display-fn":
|
|
4219
|
+
"display-fn": S,
|
|
4220
4220
|
label: n.label,
|
|
4221
|
-
options:
|
|
4222
|
-
"is-loading": unref(
|
|
4221
|
+
options: g.value,
|
|
4222
|
+
"is-loading": unref(l).isFetching.value,
|
|
4223
4223
|
placeholder: unref(i).t("component.select.search_placeholder"),
|
|
4224
|
-
onCreateNew:
|
|
4225
|
-
onSearch:
|
|
4224
|
+
onCreateNew: y,
|
|
4225
|
+
onSearch: _
|
|
4226
4226
|
}, {
|
|
4227
4227
|
option: withCtx(({ option: e, isHighlighted: t }) => [createElementVNode("div", { class: normalizeClass([{ "bg-brand-50": t }, "p-md px-lg flex flex-col rounded-md"]) }, [createElementVNode("span", _hoisted_1$8, toDisplayString(e.name), 1), createElementVNode("span", _hoisted_2$6, toDisplayString(e.email) + " | " + toDisplayString(unref(VatNumberUtil).format(e.vatNumber)), 1)], 2)]),
|
|
4228
4228
|
_: 1
|
|
@@ -4278,15 +4278,15 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
|
|
|
4278
4278
|
},
|
|
4279
4279
|
emits: ["createNewBusiness"],
|
|
4280
4280
|
setup(e, { emit: t }) {
|
|
4281
|
-
let n = e,
|
|
4282
|
-
function
|
|
4283
|
-
|
|
4281
|
+
let n = e, a = t, o = useI18n();
|
|
4282
|
+
function s() {
|
|
4283
|
+
a("createNewBusiness");
|
|
4284
4284
|
}
|
|
4285
|
-
return (t,
|
|
4285
|
+
return (t, a) => (openBlock(), createBlock(AppForm_default, { form: n.form }, {
|
|
4286
4286
|
default: withCtx(() => [createVNode(AppDialogContainer_default, { class: "flex flex-col" }, {
|
|
4287
4287
|
default: withCtx(() => [createVNode(AppDialogHeader_default, {
|
|
4288
4288
|
title: n.stepper.current.value.title,
|
|
4289
|
-
description: unref(
|
|
4289
|
+
description: unref(o).t("wise_crm.deal.create.title"),
|
|
4290
4290
|
icon: "deal"
|
|
4291
4291
|
}, {
|
|
4292
4292
|
"closse-button": withCtx(() => [createVNode(unref(VcDialogCloseButton))]),
|
|
@@ -4294,7 +4294,7 @@ var _hoisted_1$9 = { class: "gap-md flex" }, AppDialogStepper_default = /* @__PU
|
|
|
4294
4294
|
}, 8, ["title", "description"]), createElementVNode("div", _hoisted_1$7, [e.stepper.isCurrent("select-business") ? (openBlock(), createBlock(DealCreateDialogSelectBusinessForm_default, {
|
|
4295
4295
|
key: 0,
|
|
4296
4296
|
form: n.form,
|
|
4297
|
-
onCreateNew:
|
|
4297
|
+
onCreateNew: s
|
|
4298
4298
|
}, null, 8, ["form"])) : createCommentVNode("", !0), e.stepper.isCurrent("extra-info") ? (openBlock(), createBlock(DealCreateDialogExtraInfoForm_default, {
|
|
4299
4299
|
key: 1,
|
|
4300
4300
|
form: n.form
|
|
@@ -4327,7 +4327,7 @@ var DealCreateDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4327
4327
|
__name: "DealCreateDialog",
|
|
4328
4328
|
emits: ["close"],
|
|
4329
4329
|
setup(e, { emit: t }) {
|
|
4330
|
-
let n = t, r = useI18n(), i = useApiErrorToast(), a = useDealCreateMutation(), o = useBusinessCreateMutation(), s = ref(!1),
|
|
4330
|
+
let n = t, r = useI18n(), i = useApiErrorToast(), a = useDealCreateMutation(), o = useBusinessCreateMutation(), s = ref(!1), c = useForm({
|
|
4331
4331
|
schema: dealCreateFormSchema,
|
|
4332
4332
|
onSubmit: async (e) => {
|
|
4333
4333
|
try {
|
|
@@ -4336,27 +4336,27 @@ var DealCreateDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4336
4336
|
i.show(e);
|
|
4337
4337
|
}
|
|
4338
4338
|
}
|
|
4339
|
-
}),
|
|
4339
|
+
}), l = c.register("clientId"), d = computed(() => c.register("dealSource").isValid.value && c.register("dealLanguage").isValid.value && c.register("name").isValid.value), p = useFormStepper(computed(() => s.value ? [] : [{
|
|
4340
4340
|
id: "select-business",
|
|
4341
4341
|
title: r.t("wise_crm.deal.create.steps.select_business"),
|
|
4342
|
-
isValid: () =>
|
|
4342
|
+
isValid: () => c.register("clientId").isValid.value
|
|
4343
4343
|
}, {
|
|
4344
4344
|
id: "extra-info",
|
|
4345
4345
|
title: r.t("wise_crm.deal.create.steps.extra_info"),
|
|
4346
|
-
isValid: () =>
|
|
4346
|
+
isValid: () => d.value
|
|
4347
4347
|
}]));
|
|
4348
|
-
function
|
|
4348
|
+
function g() {
|
|
4349
4349
|
s.value = !0;
|
|
4350
4350
|
}
|
|
4351
|
-
async function
|
|
4351
|
+
async function _(e) {
|
|
4352
4352
|
let t = await o.execute({ body: e });
|
|
4353
|
-
s.value = !1,
|
|
4353
|
+
s.value = !1, l.setValue({
|
|
4354
4354
|
uuid: t,
|
|
4355
4355
|
name: e.name,
|
|
4356
4356
|
type: ClientType.BUSINESS
|
|
4357
|
-
}),
|
|
4357
|
+
}), p.goToNext();
|
|
4358
4358
|
}
|
|
4359
|
-
function
|
|
4359
|
+
function y() {
|
|
4360
4360
|
s.value = !1;
|
|
4361
4361
|
}
|
|
4362
4362
|
function A() {
|
|
@@ -4369,14 +4369,14 @@ var DealCreateDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
4369
4369
|
default: withCtx(() => [createVNode(AnimateHeight_default, null, {
|
|
4370
4370
|
default: withCtx(() => [s.value ? (openBlock(), createBlock(ContactCreateDialogBusinessForm_default, {
|
|
4371
4371
|
key: 0,
|
|
4372
|
-
"on-submit":
|
|
4373
|
-
onBack:
|
|
4372
|
+
"on-submit": _,
|
|
4373
|
+
onBack: y
|
|
4374
4374
|
})) : (openBlock(), createBlock(DealCreateDialogStepperForm_default, {
|
|
4375
4375
|
key: 1,
|
|
4376
|
-
form: unref(
|
|
4377
|
-
stepper: unref(
|
|
4378
|
-
"is-submitting": unref(
|
|
4379
|
-
onCreateNewBusiness:
|
|
4376
|
+
form: unref(c),
|
|
4377
|
+
stepper: unref(p),
|
|
4378
|
+
"is-submitting": unref(c).isSubmitting.value,
|
|
4379
|
+
onCreateNewBusiness: g
|
|
4380
4380
|
}, null, 8, [
|
|
4381
4381
|
"form",
|
|
4382
4382
|
"stepper",
|
|
@@ -4411,24 +4411,24 @@ var DealSettingsDialogMailTemplateFooter_default = /* @__PURE__ */ defineCompone
|
|
|
4411
4411
|
} },
|
|
4412
4412
|
emits: ["cancel"],
|
|
4413
4413
|
setup(e, { emit: t }) {
|
|
4414
|
-
let n = e,
|
|
4415
|
-
function
|
|
4416
|
-
|
|
4414
|
+
let n = e, i = t, a = useI18n();
|
|
4415
|
+
function o() {
|
|
4416
|
+
i("cancel");
|
|
4417
4417
|
}
|
|
4418
4418
|
return (e, t) => (openBlock(), createBlock(AppDialogContainer_default, { class: "border-secondary pt-lg gap-md flex justify-between border-t" }, {
|
|
4419
4419
|
default: withCtx(() => [createVNode(unref(VcButton), {
|
|
4420
4420
|
class: "flex-1",
|
|
4421
4421
|
variant: "secondary",
|
|
4422
|
-
onClick:
|
|
4422
|
+
onClick: o
|
|
4423
4423
|
}, {
|
|
4424
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
4424
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(a).t("wise_crm.form.cancel")), 1)]),
|
|
4425
4425
|
_: 1
|
|
4426
4426
|
}), createVNode(unref(VcButton), {
|
|
4427
4427
|
"is-loading": n.isSubmitting,
|
|
4428
4428
|
type: "submit",
|
|
4429
4429
|
class: "flex-1"
|
|
4430
4430
|
}, {
|
|
4431
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
4431
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(a).t("wise_crm.form.save")), 1)]),
|
|
4432
4432
|
_: 1
|
|
4433
4433
|
}, 8, ["is-loading"])]),
|
|
4434
4434
|
_: 1
|
|
@@ -4674,17 +4674,17 @@ var DealSettingsDialogMailTemplateFooter_default = /* @__PURE__ */ defineCompone
|
|
|
4674
4674
|
__name: "DealSettingsDialogMailTemplateLocaleField",
|
|
4675
4675
|
props: { localeField: {} },
|
|
4676
4676
|
setup(e) {
|
|
4677
|
-
let
|
|
4678
|
-
return (e,
|
|
4677
|
+
let t = e, n = useI18n(), r = t.localeField.register("subject"), i = t.localeField.register("message"), a = t.localeField.register("attachments", []);
|
|
4678
|
+
return (e, t) => (openBlock(), createBlock(AppGrid_default, { cols: 1 }, {
|
|
4679
4679
|
default: withCtx(() => [
|
|
4680
4680
|
createVNode(unref(VcTextField), mergeProps({
|
|
4681
|
-
label: unref(
|
|
4682
|
-
placeholder: unref(
|
|
4683
|
-
}, unref(toFormField)(unref(
|
|
4684
|
-
createVNode(AppRichTextField_default, mergeProps({ label: unref(
|
|
4685
|
-
createVNode(FormFileUpload_default, mergeProps(unref(toFormField)(unref(
|
|
4681
|
+
label: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.subject_label"),
|
|
4682
|
+
placeholder: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.subject_placeholder")
|
|
4683
|
+
}, unref(toFormField)(unref(r))), null, 16, ["label", "placeholder"]),
|
|
4684
|
+
createVNode(AppRichTextField_default, mergeProps({ label: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.message_label") }, unref(toFormField)(unref(i))), null, 16, ["label"]),
|
|
4685
|
+
createVNode(FormFileUpload_default, mergeProps(unref(toFormField)(unref(a)), {
|
|
4686
4686
|
accept: ["application/pdf", "image/*"],
|
|
4687
|
-
label: unref(
|
|
4687
|
+
label: unref(n).t("wise_crm.deal.settings.mail_template.locale_field.default_attachments_label")
|
|
4688
4688
|
}), null, 16, ["label"])
|
|
4689
4689
|
]),
|
|
4690
4690
|
_: 1
|
|
@@ -4706,12 +4706,12 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
|
|
|
4706
4706
|
__name: "DealSettingsDialogMailTemplateFormFields",
|
|
4707
4707
|
props: { mailTemplate: {} },
|
|
4708
4708
|
emits: ["cancel", "close"],
|
|
4709
|
-
setup(e, { emit:
|
|
4710
|
-
let
|
|
4709
|
+
setup(e, { emit: t }) {
|
|
4710
|
+
let n = e, a = t, o = useI18n(), s = useApiErrorToast(), c = useMailTemplateUpdateMutation(), l = ref(n.mailTemplate.locales[0]?.language ?? ""), d = useForm({
|
|
4711
4711
|
initialState: {
|
|
4712
|
-
defaultBCC:
|
|
4713
|
-
defaultCC:
|
|
4714
|
-
locales:
|
|
4712
|
+
defaultBCC: n.mailTemplate.defaultBCC,
|
|
4713
|
+
defaultCC: n.mailTemplate.defaultCC,
|
|
4714
|
+
locales: n.mailTemplate.locales.map((e) => ({
|
|
4715
4715
|
attachments: e.attachments.map(FileReferenceTransformer.toForm),
|
|
4716
4716
|
language: e.language,
|
|
4717
4717
|
message: e.message,
|
|
@@ -4722,26 +4722,26 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
|
|
|
4722
4722
|
schema: mailTemplateUpdateFormSchema,
|
|
4723
4723
|
onSubmit: async (e) => {
|
|
4724
4724
|
try {
|
|
4725
|
-
await
|
|
4725
|
+
await c.execute({
|
|
4726
4726
|
body: e,
|
|
4727
|
-
params: { mailTemplateUuid:
|
|
4727
|
+
params: { mailTemplateUuid: n.mailTemplate.uuid }
|
|
4728
4728
|
});
|
|
4729
4729
|
} catch (e) {
|
|
4730
|
-
|
|
4730
|
+
s.show(e);
|
|
4731
4731
|
} finally {
|
|
4732
|
-
|
|
4732
|
+
A();
|
|
4733
4733
|
}
|
|
4734
4734
|
}
|
|
4735
|
-
}),
|
|
4736
|
-
function
|
|
4737
|
-
|
|
4735
|
+
}), p = d.register("defaultCC"), g = d.register("defaultBCC");
|
|
4736
|
+
function y() {
|
|
4737
|
+
a("cancel");
|
|
4738
4738
|
}
|
|
4739
|
-
function
|
|
4740
|
-
|
|
4739
|
+
function A() {
|
|
4740
|
+
a("close");
|
|
4741
4741
|
}
|
|
4742
|
-
return (e,
|
|
4742
|
+
return (e, t) => (openBlock(), createElementBlock("div", _hoisted_1$4, [createVNode(AppDialogContainer_default, null, {
|
|
4743
4743
|
default: withCtx(() => [createVNode(AppDialogHeader_default, {
|
|
4744
|
-
title:
|
|
4744
|
+
title: n.mailTemplate.displayName,
|
|
4745
4745
|
description: "Deal settings",
|
|
4746
4746
|
icon: "settings"
|
|
4747
4747
|
}, {
|
|
@@ -4750,36 +4750,36 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
|
|
|
4750
4750
|
}, 8, ["title"])]),
|
|
4751
4751
|
_: 1
|
|
4752
4752
|
}), createElementVNode("div", _hoisted_2$3, [createVNode(AppForm_default, {
|
|
4753
|
-
form: unref(
|
|
4753
|
+
form: unref(d),
|
|
4754
4754
|
class: "flex flex-1 flex-col overflow-hidden"
|
|
4755
4755
|
}, {
|
|
4756
4756
|
default: withCtx(() => [createVNode(AppDialogContainer_default, { class: "flex flex-1 flex-col overflow-y-auto" }, {
|
|
4757
4757
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 1 }, {
|
|
4758
4758
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 1 }, {
|
|
4759
|
-
default: withCtx(() => [createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(
|
|
4759
|
+
default: withCtx(() => [createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(p)), {
|
|
4760
4760
|
label: "Default CC",
|
|
4761
4761
|
placeholder: "Default CC"
|
|
4762
|
-
}), null, 16), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(
|
|
4762
|
+
}), null, 16), createVNode(AppTagsInputField_default, mergeProps(unref(toFormField)(unref(g)), {
|
|
4763
4763
|
label: "Default BCC",
|
|
4764
4764
|
placeholder: "Default BCC"
|
|
4765
4765
|
}), null, 16)]),
|
|
4766
4766
|
_: 1
|
|
4767
4767
|
}), createVNode(unref(VcTabs), {
|
|
4768
4768
|
modelValue: l.value,
|
|
4769
|
-
"onUpdate:modelValue":
|
|
4769
|
+
"onUpdate:modelValue": t[0] ||= (e) => l.value = e
|
|
4770
4770
|
}, {
|
|
4771
|
-
items: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
4771
|
+
items: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.mailTemplate.locales, (e) => (openBlock(), createBlock(unref(VcTabsItem), {
|
|
4772
4772
|
key: e.uuid,
|
|
4773
4773
|
value: e.language
|
|
4774
4774
|
}, {
|
|
4775
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
4775
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(o).t(unref(ContentLocaleUtil).getI18nKey(e.language))), 1)]),
|
|
4776
4776
|
_: 2
|
|
4777
4777
|
}, 1032, ["value"]))), 128))]),
|
|
4778
|
-
content: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
4778
|
+
content: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.mailTemplate.locales, (e, t) => (openBlock(), createBlock(unref(VcTabsContent), {
|
|
4779
4779
|
key: e.uuid,
|
|
4780
4780
|
value: e.language
|
|
4781
4781
|
}, {
|
|
4782
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_3$2, [createVNode(DealSettingsDialogMailTemplateLocaleField_default, { "locale-field": unref(
|
|
4782
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_3$2, [createVNode(DealSettingsDialogMailTemplateLocaleField_default, { "locale-field": unref(d).register(`locales.${t}`) }, null, 8, ["locale-field"])])]),
|
|
4783
4783
|
_: 2
|
|
4784
4784
|
}, 1032, ["value"]))), 128))]),
|
|
4785
4785
|
_: 1
|
|
@@ -4788,8 +4788,8 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
|
|
|
4788
4788
|
})]),
|
|
4789
4789
|
_: 1
|
|
4790
4790
|
}), createVNode(DealSettingsDialogMailTemplateFooter_default, {
|
|
4791
|
-
"is-submitting": unref(
|
|
4792
|
-
onCancel:
|
|
4791
|
+
"is-submitting": unref(d).isSubmitting.value,
|
|
4792
|
+
onCancel: y
|
|
4793
4793
|
}, null, 8, ["is-submitting"])]),
|
|
4794
4794
|
_: 1
|
|
4795
4795
|
}, 8, ["form"])])]));
|
|
@@ -4820,17 +4820,17 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
|
|
|
4820
4820
|
__name: "DealSettingsDialogMailTemplate",
|
|
4821
4821
|
emits: ["close"],
|
|
4822
4822
|
setup(e, { emit: t }) {
|
|
4823
|
-
let n = t,
|
|
4824
|
-
function
|
|
4825
|
-
|
|
4826
|
-
}
|
|
4827
|
-
function o() {
|
|
4828
|
-
i.value = null;
|
|
4823
|
+
let n = t, i = useMailTemplateIndexQuery(), a = ref(null);
|
|
4824
|
+
function o(e) {
|
|
4825
|
+
a.value = e;
|
|
4829
4826
|
}
|
|
4830
4827
|
function s() {
|
|
4828
|
+
a.value = null;
|
|
4829
|
+
}
|
|
4830
|
+
function c() {
|
|
4831
4831
|
n("close");
|
|
4832
4832
|
}
|
|
4833
|
-
return (e, t) =>
|
|
4833
|
+
return (e, t) => a.value === null ? (openBlock(), createBlock(AppDialogContainer_default, { key: 0 }, {
|
|
4834
4834
|
default: withCtx(() => [createVNode(AppDialogHeader_default, {
|
|
4835
4835
|
title: "Mailing templates",
|
|
4836
4836
|
description: "Deal settings",
|
|
@@ -4838,12 +4838,12 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
|
|
|
4838
4838
|
}, {
|
|
4839
4839
|
"closse-button": withCtx(() => [createVNode(unref(VcDialogCloseButton))]),
|
|
4840
4840
|
_: 1
|
|
4841
|
-
}), createElementVNode("div", _hoisted_1$2, [createVNode(AppInfiniteScroll_default, { "on-next": unref(
|
|
4841
|
+
}), createElementVNode("div", _hoisted_1$2, [createVNode(AppInfiniteScroll_default, { "on-next": unref(i).fetchNextPage }, {
|
|
4842
4842
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
|
|
4843
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
4843
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i).data.value.data, (e) => (openBlock(), createBlock(AppUnstyledButton_default, {
|
|
4844
4844
|
key: e.uuid,
|
|
4845
4845
|
class: "border-primary p-sm flex items-center justify-center rounded-md border hover:bg-gray-50",
|
|
4846
|
-
onClick: (t) =>
|
|
4846
|
+
onClick: (t) => o(e)
|
|
4847
4847
|
}, {
|
|
4848
4848
|
default: withCtx(() => [createTextVNode(toDisplayString(e.name), 1)]),
|
|
4849
4849
|
_: 2
|
|
@@ -4855,10 +4855,10 @@ var _hoisted_1$4 = { class: "flex flex-1 flex-col overflow-hidden" }, _hoisted_2
|
|
|
4855
4855
|
_: 1
|
|
4856
4856
|
})) : (openBlock(), createBlock(DealSettingsDialogMailTemplateForm_default, {
|
|
4857
4857
|
key: 1,
|
|
4858
|
-
"mail-template-uuid":
|
|
4859
|
-
"mail-template-name":
|
|
4860
|
-
onClose:
|
|
4861
|
-
onCancel:
|
|
4858
|
+
"mail-template-uuid": a.value.uuid,
|
|
4859
|
+
"mail-template-name": a.value.name,
|
|
4860
|
+
onClose: c,
|
|
4861
|
+
onCancel: s
|
|
4862
4862
|
}, null, 8, ["mail-template-uuid", "mail-template-name"]));
|
|
4863
4863
|
}
|
|
4864
4864
|
}), DealSettingsDialog_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4991,38 +4991,38 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
|
|
|
4991
4991
|
onSubmit: { type: Function }
|
|
4992
4992
|
},
|
|
4993
4993
|
setup(e) {
|
|
4994
|
-
let
|
|
4995
|
-
initialState: computed(() =>
|
|
4996
|
-
billingAddress:
|
|
4997
|
-
invoiceCcEmails:
|
|
4998
|
-
invoiceEmail:
|
|
4994
|
+
let t = e, r = useI18n(), a = useCrmConfig(), o = useForm({
|
|
4995
|
+
initialState: computed(() => t.billingInformation === null ? null : {
|
|
4996
|
+
billingAddress: t.individualAddress,
|
|
4997
|
+
invoiceCcEmails: t.billingInformation.invoiceCcEmails ?? [],
|
|
4998
|
+
invoiceEmail: t.billingInformation.invoiceEmail
|
|
4999
4999
|
}),
|
|
5000
5000
|
schema: createIndividualBillingInformationFormSchema(a.getConfig().billingConfig.individualBillingInformationRequirement ?? BillingInformationRequirement.EMAIL_OR_ADDRESS),
|
|
5001
5001
|
onSubmit: async (e) => {
|
|
5002
|
-
await
|
|
5002
|
+
await t.onSubmit(e);
|
|
5003
5003
|
}
|
|
5004
5004
|
}), s = o.register("billingAddress"), c = o.register("invoiceCcEmails", []), l = o.register("invoiceEmail");
|
|
5005
|
-
return (e,
|
|
5005
|
+
return (e, t) => (openBlock(), createBlock(AppForm_default, {
|
|
5006
5006
|
form: unref(o),
|
|
5007
5007
|
class: "flex h-full flex-col justify-between"
|
|
5008
5008
|
}, {
|
|
5009
5009
|
default: withCtx(() => [createVNode(AppCard_default, {
|
|
5010
|
-
title: unref(
|
|
5010
|
+
title: unref(r).t("wise_crm.info_dialog.info.billing_information.card.title"),
|
|
5011
5011
|
icon: "wallet"
|
|
5012
5012
|
}, {
|
|
5013
5013
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
|
|
5014
5014
|
default: withCtx(() => [
|
|
5015
5015
|
createVNode(unref(VcAddressAutocomplete), mergeProps({
|
|
5016
|
-
label: unref(
|
|
5017
|
-
placeholder: unref(
|
|
5016
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.billing_address"),
|
|
5017
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.billing_address")
|
|
5018
5018
|
}, unref(toFormField)(unref(s))), null, 16, ["label", "placeholder"]),
|
|
5019
5019
|
createVNode(unref(VcTextField), mergeProps({
|
|
5020
|
-
label: unref(
|
|
5021
|
-
placeholder: unref(
|
|
5020
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_email"),
|
|
5021
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.email")
|
|
5022
5022
|
}, unref(toFormField)(unref(l))), null, 16, ["label", "placeholder"]),
|
|
5023
5023
|
createVNode(AppTagsInputField_default, mergeProps({
|
|
5024
|
-
label: unref(
|
|
5025
|
-
placeholder: unref(
|
|
5024
|
+
label: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails"),
|
|
5025
|
+
placeholder: unref(r).t("wise_crm.info_dialog.business.information.billing_information.invoice_cc_emails")
|
|
5026
5026
|
}, unref(toFormField)(unref(c)), { class: "col-span-2" }), null, 16, ["label", "placeholder"])
|
|
5027
5027
|
]),
|
|
5028
5028
|
_: 1
|
|
@@ -5037,7 +5037,7 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
|
|
|
5037
5037
|
"is-loading": unref(o).isSubmitting.value,
|
|
5038
5038
|
type: "submit"
|
|
5039
5039
|
}, {
|
|
5040
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
5040
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(r).t("wise_crm.shared.save_changes")), 1)]),
|
|
5041
5041
|
_: 1
|
|
5042
5042
|
}, 8, ["is-loading"])]),
|
|
5043
5043
|
_: 1
|
|
@@ -5051,8 +5051,8 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
|
|
|
5051
5051
|
__name: "IndividualBillingInformationCard",
|
|
5052
5052
|
props: { individualUuid: {} },
|
|
5053
5053
|
setup(e) {
|
|
5054
|
-
let t = e, n = useApiErrorToast(), r = useIndividualBillingInformationUpsertMutation(), i = computed(() => t.individualUuid), a = useIndividualDetailQuery(i), o = computed(() => a.data.value === null ? !1 : a.data.value.billingInformationDetail !== null), s = useIndividualBillingInformationQuery(i, computed(() => o.value)),
|
|
5055
|
-
async function
|
|
5054
|
+
let t = e, n = useApiErrorToast(), r = useIndividualBillingInformationUpsertMutation(), i = computed(() => t.individualUuid), a = useIndividualDetailQuery(i), o = computed(() => a.data.value === null ? !1 : a.data.value.billingInformationDetail !== null), s = useIndividualBillingInformationQuery(i, computed(() => o.value)), c = computed(() => s.data.value?.billingLocation?.address ?? null);
|
|
5055
|
+
async function l(e) {
|
|
5056
5056
|
try {
|
|
5057
5057
|
await r.execute({
|
|
5058
5058
|
body: e,
|
|
@@ -5067,9 +5067,9 @@ var IndividualBillingInformationUpdateForm_default = /* @__PURE__ */ defineCompo
|
|
|
5067
5067
|
class: "h-40"
|
|
5068
5068
|
})) : (openBlock(), createBlock(IndividualBillingInformationUpdateForm_default, {
|
|
5069
5069
|
key: 1,
|
|
5070
|
-
"individual-address":
|
|
5070
|
+
"individual-address": c.value,
|
|
5071
5071
|
"individual-uuid": i.value,
|
|
5072
|
-
"on-submit":
|
|
5072
|
+
"on-submit": l,
|
|
5073
5073
|
"billing-information": unref(s).data.value
|
|
5074
5074
|
}, null, 8, [
|
|
5075
5075
|
"individual-address",
|
|
@@ -5117,32 +5117,32 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
|
|
|
5117
5117
|
onSubmit: { type: Function }
|
|
5118
5118
|
},
|
|
5119
5119
|
setup(e) {
|
|
5120
|
-
let
|
|
5121
|
-
initialState: IndividualUpdateTransformer.toForm(
|
|
5122
|
-
schema: getIndividualUpdateFormSchema(
|
|
5120
|
+
let t = e, n = useI18n(), r = useForm({
|
|
5121
|
+
initialState: IndividualUpdateTransformer.toForm(t.individual),
|
|
5122
|
+
schema: getIndividualUpdateFormSchema(t.customFieldDefinitions),
|
|
5123
5123
|
onSubmit: async (e) => {
|
|
5124
|
-
await
|
|
5124
|
+
await t.onSubmit(e);
|
|
5125
5125
|
}
|
|
5126
|
-
}), a =
|
|
5126
|
+
}), a = r.register("firstName"), o = r.register("lastName"), s = r.register("language"), c = r.register("address"), l = r.register("email"), d = r.register("mobilePhone"), p = r.register("phone");
|
|
5127
5127
|
return (e, g) => (openBlock(), createBlock(AppForm_default, {
|
|
5128
|
-
form: unref(
|
|
5128
|
+
form: unref(r),
|
|
5129
5129
|
class: "flex h-full flex-col justify-between"
|
|
5130
5130
|
}, {
|
|
5131
5131
|
default: withCtx(() => [createVNode(AppCard_default, {
|
|
5132
|
-
title: unref(
|
|
5132
|
+
title: unref(n).t("wise_crm.info_dialog.info_individual_info.card.title"),
|
|
5133
5133
|
icon: "infoCircle"
|
|
5134
5134
|
}, {
|
|
5135
|
-
"header-action": withCtx(() => [createVNode(unref(FormCardSubmitButtonTransition_default), { "is-open": unref(
|
|
5135
|
+
"header-action": withCtx(() => [createVNode(unref(FormCardSubmitButtonTransition_default), { "is-open": unref(r).isDirty.value }, {
|
|
5136
5136
|
default: withCtx(() => [createVNode(unref(VcButton), {
|
|
5137
5137
|
"class-config": {
|
|
5138
5138
|
loader: "size-3",
|
|
5139
5139
|
iconRight: "text-success-500",
|
|
5140
5140
|
root: "text-xs h-8 px-lg data-[loading=false]:not-disabled:bg-quaternary bg-quaternary border-transparent text-seconday shadow-none"
|
|
5141
5141
|
},
|
|
5142
|
-
"is-loading": unref(
|
|
5142
|
+
"is-loading": unref(r).isSubmitting.value,
|
|
5143
5143
|
type: "submit"
|
|
5144
5144
|
}, {
|
|
5145
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
5145
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(n).t("wise_crm.shared.save_changes")), 1)]),
|
|
5146
5146
|
_: 1
|
|
5147
5147
|
}, 8, ["is-loading"])]),
|
|
5148
5148
|
_: 1
|
|
@@ -5150,39 +5150,39 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
|
|
|
5150
5150
|
default: withCtx(() => [createVNode(AppGrid_default, { cols: 2 }, {
|
|
5151
5151
|
default: withCtx(() => [
|
|
5152
5152
|
createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(a)), {
|
|
5153
|
-
label: unref(
|
|
5154
|
-
placeholder: unref(
|
|
5153
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.first_name"),
|
|
5154
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.first_name")
|
|
5155
5155
|
}), null, 16, ["label", "placeholder"]),
|
|
5156
5156
|
createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(o)), {
|
|
5157
|
-
label: unref(
|
|
5158
|
-
placeholder: unref(
|
|
5157
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.last_name"),
|
|
5158
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.last_name")
|
|
5159
5159
|
}), null, 16, ["label", "placeholder"]),
|
|
5160
|
-
createVNode(unref(VcAddressAutocomplete), mergeProps({ label: unref(
|
|
5160
|
+
createVNode(unref(VcAddressAutocomplete), mergeProps({ label: unref(n).t("wise_crm.contact.create_dialog.form.fields.address") }, unref(toFormField)(unref(c))), null, 16, ["label"]),
|
|
5161
5161
|
createVNode(unref(VcTextField), mergeProps(unref(toFormField)(unref(l)), {
|
|
5162
|
-
label: unref(
|
|
5163
|
-
placeholder: unref(
|
|
5162
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.email"),
|
|
5163
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.email")
|
|
5164
5164
|
}), null, 16, ["label", "placeholder"]),
|
|
5165
5165
|
createVNode(unref(VcPhoneNumberField), mergeProps({
|
|
5166
|
-
label: unref(
|
|
5167
|
-
placeholder: unref(
|
|
5166
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.mobile_phone"),
|
|
5167
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.mobile_phone")
|
|
5168
5168
|
}, unref(toFormField)(unref(d))), null, 16, ["label", "placeholder"]),
|
|
5169
5169
|
createVNode(unref(VcPhoneNumberField), mergeProps(unref(toFormField)(unref(p)), {
|
|
5170
|
-
label: unref(
|
|
5171
|
-
placeholder: unref(
|
|
5170
|
+
label: unref(n).t("wise_crm.contact.create_dialog.form.fields.phone"),
|
|
5171
|
+
placeholder: unref(n).t("wise_crm.contact.create_dialog.form.fields.phone")
|
|
5172
5172
|
}), null, 16, ["label", "placeholder"]),
|
|
5173
|
-
createVNode(unref(VcSelect), mergeProps({ label: unref(
|
|
5173
|
+
createVNode(unref(VcSelect), mergeProps({ label: unref(n).t("wise_crm.contact.create_dialog.form.fields.language") }, unref(toFormField)(unref(s)), { "display-fn": (e) => e ? unref(n).t(unref(LocaleEnum).getI18nKey(e)) : "" }), {
|
|
5174
5174
|
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(Locale)), (e) => (openBlock(), createBlock(unref(VcSelectItem), {
|
|
5175
5175
|
key: e,
|
|
5176
5176
|
value: e
|
|
5177
5177
|
}, {
|
|
5178
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
5178
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(n).t(unref(LocaleEnum).getI18nKey(e))), 1)]),
|
|
5179
5179
|
_: 2
|
|
5180
5180
|
}, 1032, ["value"]))), 128))]),
|
|
5181
5181
|
_: 1
|
|
5182
5182
|
}, 16, ["label", "display-fn"]),
|
|
5183
5183
|
createVNode(CustomFieldDefinitionForm_default, {
|
|
5184
|
-
form: unref(
|
|
5185
|
-
"custom-field-definitions":
|
|
5184
|
+
form: unref(r),
|
|
5185
|
+
"custom-field-definitions": t.customFieldDefinitions
|
|
5186
5186
|
}, null, 8, ["form", "custom-field-definitions"])
|
|
5187
5187
|
]),
|
|
5188
5188
|
_: 1
|
|
@@ -5196,8 +5196,8 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
|
|
|
5196
5196
|
__name: "IndividualInfoUpdateCard",
|
|
5197
5197
|
props: { individualUuid: {} },
|
|
5198
5198
|
setup(e) {
|
|
5199
|
-
let t = e,
|
|
5200
|
-
async function
|
|
5199
|
+
let t = e, r = useCrmConfig(), i = useApiErrorToast(), a = computed(() => t.individualUuid), o = useIndividualDetailQuery(a), s = useIndividualUpdateMutation();
|
|
5200
|
+
async function c(e) {
|
|
5201
5201
|
try {
|
|
5202
5202
|
await s.execute({
|
|
5203
5203
|
body: e,
|
|
@@ -5212,9 +5212,9 @@ var IndividualCustomerInfoForm_default = /* @__PURE__ */ defineComponent({
|
|
|
5212
5212
|
class: "h-100"
|
|
5213
5213
|
})) : unref(o).data.value ? (openBlock(), createBlock(IndividualCustomerInfoForm_default, {
|
|
5214
5214
|
key: 1,
|
|
5215
|
-
"on-submit":
|
|
5215
|
+
"on-submit": c,
|
|
5216
5216
|
individual: unref(o).data.value,
|
|
5217
|
-
"custom-field-definitions": unref(
|
|
5217
|
+
"custom-field-definitions": unref(r).getCustomFieldDefinitionForEntity(unref(EntityType).INDIVIDUAL)
|
|
5218
5218
|
}, null, 8, ["individual", "custom-field-definitions"])) : createCommentVNode("", !0);
|
|
5219
5219
|
}
|
|
5220
5220
|
}), individualDialogContextKey = Symbol("individualDialogContext");
|
|
@@ -5312,7 +5312,7 @@ function businessRoutes(e) {
|
|
|
5312
5312
|
to: e.route.name
|
|
5313
5313
|
})) },
|
|
5314
5314
|
path: "/business/:businessUuid",
|
|
5315
|
-
component: () => import("./BusinessDetailView-
|
|
5315
|
+
component: () => import("./BusinessDetailView-BHVUfCpV.js"),
|
|
5316
5316
|
redirect: { name: e[0].route.name },
|
|
5317
5317
|
children: e.map((e) => e.route)
|
|
5318
5318
|
}];
|
|
@@ -5321,7 +5321,7 @@ function dealRoutes(e) {
|
|
|
5321
5321
|
let t = [...e.map((e) => e.route), {
|
|
5322
5322
|
name: "deal-communication",
|
|
5323
5323
|
path: "communication",
|
|
5324
|
-
component: () => import("./DealCommunicationTabView-
|
|
5324
|
+
component: () => import("./DealCommunicationTabView-xq_zOAsr.js")
|
|
5325
5325
|
}];
|
|
5326
5326
|
return [{
|
|
5327
5327
|
name: "deal-detail",
|
|
@@ -5330,7 +5330,7 @@ function dealRoutes(e) {
|
|
|
5330
5330
|
to: e.route.name
|
|
5331
5331
|
})) },
|
|
5332
5332
|
path: "/deals/:dealUuid",
|
|
5333
|
-
component: () => import("./DealDetailView-
|
|
5333
|
+
component: () => import("./DealDetailView-C54XpYN1.js"),
|
|
5334
5334
|
redirect: { name: t[0].name },
|
|
5335
5335
|
children: t
|
|
5336
5336
|
}];
|
|
@@ -5343,7 +5343,7 @@ function individualRoutes(e) {
|
|
|
5343
5343
|
to: e.route.name
|
|
5344
5344
|
})) },
|
|
5345
5345
|
path: "/individual/:individualUuid",
|
|
5346
|
-
component: () => import("./IndividualDetailView-
|
|
5346
|
+
component: () => import("./IndividualDetailView-Cq8iAwQv.js"),
|
|
5347
5347
|
redirect: { name: e[0].route.name },
|
|
5348
5348
|
children: e.map((e) => e.route)
|
|
5349
5349
|
}];
|