@feedmepos/mf-connect 0.1.47-prod → 0.1.49-prod
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/{Analytic-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
- package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
- package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
- package/dist/Broadcast-CbF3d_N7.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
- package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
- package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
- package/dist/Credit-DiTnwnFe.js +228 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
- package/dist/Experience-CjMVeGsX.js +229 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
- package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
- package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
- package/dist/MemberList-CZtriA_Q.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
- package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
- package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
- package/dist/Point-51MD49EM.js +232 -0
- package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
- package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
- package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
- package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
- package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
- package/dist/Setting-DGDgmP84.js +1936 -0
- package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
- package/dist/StoreRewards-DFF_0g59.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
- package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
- package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
- package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
- package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
- package/dist/app-DaFoFS2V.js +57962 -0
- package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
- package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
- package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
- package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
- package/dist/campaign.fn-B-xvcbEb.js +758 -0
- package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
- package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
- package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
- package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
- package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
- package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
- package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
- package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
- package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
- package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
- package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
- package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
- package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
- package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
- package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
- package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
- package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
- package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
- package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
- package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
- package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
- package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
- package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
- package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
- package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
- package/dist/objectid-BQJRv_jX.js +145 -0
- package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
- package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
- package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
- package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
- package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
- package/dist/timezone-B64-HrWi.js +1150 -0
- package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
- package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
- package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
- package/package.json +5 -4
- package/dist/Broadcast-T2a5tN8R.js +0 -227
- package/dist/Credit-DQQCXqS0.js +0 -222
- package/dist/Experience-DzTV21vX.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/MemberList-DLSLGQ02.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Point-BeBYi1BT.js +0 -226
- package/dist/Setting-Dt0sG_hk.js +0 -1936
- package/dist/StoreRewards-DuSsWnTE.js +0 -423
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
- package/dist/app-jRT7vsk_.js +0 -33357
- package/dist/campaign.fn-C-UojhHv.js +0 -758
- package/dist/objectid-CVDLTdni.js +0 -145
- package/dist/usePagination-JoYaROkV.js +0 -223
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { defineComponent as j, ref as y, watch as X, onMounted as I, resolveComponent as x, openBlock as d, createBlock as A, withCtx as L, createVNode as h, unref as t, createElementVNode as i, createElementBlock as k, Fragment as $, renderList as D, computed as G, toDisplayString as O, isRef as T, createSlots as Y, createCommentVNode as V, createTextVNode as ee, reactive as te, onBeforeMount as ae } from "vue";
|
|
2
|
-
import { _ as
|
|
3
|
-
import "./index-
|
|
4
|
-
import "./campaign-
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { c as R } from "./index-
|
|
7
|
-
import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as le } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import "./index-DWBeauin.js";
|
|
4
|
+
import "./campaign-DMZnXtyb.js";
|
|
5
|
+
import { useRouter as ne } from "vue-router";
|
|
6
|
+
import { c as R } from "./index-Ba5-z1MU.js";
|
|
7
|
+
import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js";
|
|
8
8
|
import { Z as se } from "./zod-Bg2FbC-D.js";
|
|
9
|
-
import { F as re } from "./dto-
|
|
9
|
+
import { F as re } from "./dto-DpRkSGg6.js";
|
|
10
10
|
import { J as ie } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
-
import "./index-
|
|
11
|
+
import "./index-sFyvCun2.js";
|
|
12
12
|
import { useSnackbar as ue } from "@feedmepos/ui-library";
|
|
13
13
|
import { u as ce } from "./app-wDQR6dpb.js";
|
|
14
|
-
import { u as me } from "./loading-
|
|
15
|
-
import { C as de } from "./campaign.fn-
|
|
14
|
+
import { u as me } from "./loading-CZH88Duq.js";
|
|
15
|
+
import { C as de } from "./campaign.fn-B-xvcbEb.js";
|
|
16
16
|
import { g as pe } from "./object-qECH92oz.js";
|
|
17
|
-
import { u as ve } from "./campaign-
|
|
18
|
-
import { u as fe } from "./membership-
|
|
19
|
-
import { u as ye } from "./vue-i18n
|
|
20
|
-
const
|
|
17
|
+
import { u as ve } from "./campaign-C1hWNRWr.js";
|
|
18
|
+
import { u as fe } from "./membership-GNRX1fEK.js";
|
|
19
|
+
import { u as ye } from "./vue-i18n-2D47GxQX.js";
|
|
20
|
+
const ge = { class: "ml-32 flex flex-col" }, _e = /* @__PURE__ */ j({
|
|
21
21
|
__name: "CampaignCard",
|
|
22
22
|
props: {
|
|
23
23
|
title: {},
|
|
@@ -26,43 +26,43 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:model-value"],
|
|
28
28
|
setup(U, { emit: b }) {
|
|
29
|
-
const
|
|
30
|
-
o ? p.value =
|
|
31
|
-
},
|
|
32
|
-
p.value = o, r.value = o.length ===
|
|
29
|
+
const c = U, v = b, S = (o) => {
|
|
30
|
+
o ? p.value = c.items.map((a) => a.value) : p.value = [], r.value = o, v("update:model-value", p.value);
|
|
31
|
+
}, g = (o) => {
|
|
32
|
+
p.value = o, r.value = o.length === c.items.length, v("update:model-value", o);
|
|
33
33
|
}, r = y(!1), p = y([]);
|
|
34
34
|
return X(
|
|
35
|
-
() =>
|
|
35
|
+
() => c.modelValue,
|
|
36
36
|
() => {
|
|
37
|
-
p.value =
|
|
38
|
-
(o) =>
|
|
37
|
+
p.value = c.modelValue.filter(
|
|
38
|
+
(o) => c.items.find((a) => a.value === o)
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
), I(() => {
|
|
42
|
-
p.value =
|
|
43
|
-
(o) =>
|
|
42
|
+
p.value = c.modelValue.filter(
|
|
43
|
+
(o) => c.items.find((a) => a.value === o)
|
|
44
44
|
);
|
|
45
45
|
}), (o, a) => {
|
|
46
|
-
const
|
|
47
|
-
return d(), A(
|
|
46
|
+
const _ = x("FmCheckbox"), n = x("FmCard");
|
|
47
|
+
return d(), A(n, {
|
|
48
48
|
variant: "outlined",
|
|
49
49
|
class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
|
|
50
50
|
}, {
|
|
51
51
|
default: L(() => [
|
|
52
|
-
h(
|
|
52
|
+
h(_, {
|
|
53
53
|
"model-value": t(r),
|
|
54
54
|
value: "1",
|
|
55
|
-
label:
|
|
55
|
+
label: c.title,
|
|
56
56
|
indeterminate: t(p).length > 0,
|
|
57
57
|
"onUpdate:modelValue": S
|
|
58
58
|
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
59
|
-
i("div",
|
|
60
|
-
(d(!0), k($, null, D(
|
|
61
|
-
key:
|
|
59
|
+
i("div", ge, [
|
|
60
|
+
(d(!0), k($, null, D(c.items, (l, u) => (d(), A(_, {
|
|
61
|
+
key: u,
|
|
62
62
|
"model-value": t(p),
|
|
63
|
-
label:
|
|
64
|
-
value:
|
|
65
|
-
"onUpdate:modelValue":
|
|
63
|
+
label: l.label,
|
|
64
|
+
value: l.value,
|
|
65
|
+
"onUpdate:modelValue": g
|
|
66
66
|
}, null, 8, ["model-value", "label", "value"]))), 128))
|
|
67
67
|
])
|
|
68
68
|
]),
|
|
@@ -84,40 +84,40 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
84
84
|
},
|
|
85
85
|
emits: ["update:model-value"],
|
|
86
86
|
setup(U, { emit: b }) {
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
(
|
|
87
|
+
const c = y(""), v = y([]), S = U, g = b, r = G(() => Object.entries(S.campaigns).reduce((o, [a, _]) => {
|
|
88
|
+
const n = _.filter(
|
|
89
|
+
(l) => l.label.toLowerCase().includes(c.value.toLowerCase())
|
|
90
90
|
);
|
|
91
|
-
return
|
|
91
|
+
return n.length > 0 && (o[a] = n), o;
|
|
92
92
|
}, {}));
|
|
93
93
|
function p(o, a) {
|
|
94
94
|
v.value = v.value.filter(
|
|
95
|
-
(
|
|
96
|
-
), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])],
|
|
95
|
+
(_) => !a.map((n) => n.value).includes(_)
|
|
96
|
+
), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])], g("update:model-value", v.value);
|
|
97
97
|
}
|
|
98
98
|
return I(() => {
|
|
99
99
|
v.value = S.modelValue;
|
|
100
100
|
}), (o, a) => {
|
|
101
|
-
const
|
|
101
|
+
const _ = x("FmTextField");
|
|
102
102
|
return d(), k($, null, [
|
|
103
103
|
h(ie, { json: U.campaigns }, null, 8, ["json"]),
|
|
104
104
|
i("div", he, [
|
|
105
105
|
i("div", be, [
|
|
106
106
|
i("div", xe, O(t(v).length) + " campaign(s) linked ", 1),
|
|
107
|
-
h(
|
|
108
|
-
modelValue: t(
|
|
109
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
107
|
+
h(_, {
|
|
108
|
+
modelValue: t(c),
|
|
109
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => T(c) ? c.value = n : null),
|
|
110
110
|
"prepend-icon": "search",
|
|
111
111
|
placeholder: "Search",
|
|
112
112
|
class: "w-full"
|
|
113
113
|
}, null, 8, ["modelValue"])
|
|
114
114
|
]),
|
|
115
115
|
i("div", Ce, [
|
|
116
|
-
(d(!0), k($, null, D(t(r), (
|
|
116
|
+
(d(!0), k($, null, D(t(r), (n, l) => (d(), A(_e, {
|
|
117
117
|
"model-value": t(v),
|
|
118
|
-
title:
|
|
119
|
-
items:
|
|
120
|
-
"onUpdate:modelValue": (
|
|
118
|
+
title: l,
|
|
119
|
+
items: n,
|
|
120
|
+
"onUpdate:modelValue": (u) => p(u, n)
|
|
121
121
|
}, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
|
|
122
122
|
])
|
|
123
123
|
])
|
|
@@ -127,26 +127,26 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
127
127
|
}), Ve = { class: "flex items-center gap-x-8" }, Se = {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: "space-y-16 pr-12"
|
|
130
|
-
}, we =
|
|
130
|
+
}, we = { class: "flex items-center gap-x-16" }, Fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ae = { class: "mt-16" }, $e = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Ue = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Pe = { class: "flex items-center gap-8" }, Le = /* @__PURE__ */ j({
|
|
131
131
|
__name: "AnalyticSheet",
|
|
132
132
|
emits: ["success"],
|
|
133
|
-
setup(U, { expose: b, emit:
|
|
134
|
-
const v =
|
|
133
|
+
setup(U, { expose: b, emit: c }) {
|
|
134
|
+
const v = c, S = ce();
|
|
135
135
|
ue();
|
|
136
|
-
const
|
|
136
|
+
const g = y(!1), r = y(!1), p = {
|
|
137
137
|
name: "",
|
|
138
138
|
campaigns: []
|
|
139
|
-
}, o = y(""), a = y({ ...p }),
|
|
140
|
-
}),
|
|
141
|
-
const s =
|
|
139
|
+
}, o = y(""), a = y({ ...p }), _ = re.superRefine((s, e) => {
|
|
140
|
+
}), n = y([]), l = y(null), { global: u, minor: w } = me, P = G(() => {
|
|
141
|
+
const s = _.safeParse(a.value);
|
|
142
142
|
return s.success ? [] : s.error.errors;
|
|
143
143
|
});
|
|
144
144
|
function M(s) {
|
|
145
145
|
var e;
|
|
146
|
-
|
|
146
|
+
g.value = !0, s ? (l.value = { ...s }, a.value = { ...s, campaigns: (e = s.pf_campaigns) == null ? void 0 : e.map((m) => m._id) }) : (l.value = null, a.value = { ...p });
|
|
147
147
|
}
|
|
148
148
|
function F() {
|
|
149
|
-
|
|
149
|
+
g.value = !1, l.value = null;
|
|
150
150
|
}
|
|
151
151
|
function K() {
|
|
152
152
|
r.value = !0;
|
|
@@ -159,7 +159,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
159
159
|
search: "",
|
|
160
160
|
descending: !0
|
|
161
161
|
});
|
|
162
|
-
|
|
162
|
+
n.value = s.resources.filter(
|
|
163
163
|
(e) => !["MEMBERSHIP", "REWARD_POOL"].includes(e.type) && !["ISSUE_REWARD"].includes("event" in e ? e == null ? void 0 : e.event.type : "")
|
|
164
164
|
);
|
|
165
165
|
}
|
|
@@ -169,7 +169,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
169
169
|
value: C._id
|
|
170
170
|
}));
|
|
171
171
|
return pe(
|
|
172
|
-
|
|
172
|
+
n.value,
|
|
173
173
|
(m) => de.formattedType(m.type),
|
|
174
174
|
s
|
|
175
175
|
);
|
|
@@ -191,11 +191,11 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
191
191
|
e != null && e > -1 && ((C = a.value.campaigns) == null || C.splice(e, 1));
|
|
192
192
|
}
|
|
193
193
|
async function Z() {
|
|
194
|
-
|
|
194
|
+
_.safeParse(a.value).success && await w(
|
|
195
195
|
async () => {
|
|
196
196
|
var e;
|
|
197
|
-
|
|
198
|
-
(e =
|
|
197
|
+
l.value ? await R.updateGroup(
|
|
198
|
+
(e = l.value) == null ? void 0 : e._id,
|
|
199
199
|
a.value
|
|
200
200
|
) : await R.createGroup(a.value), v("success"), F();
|
|
201
201
|
},
|
|
@@ -209,7 +209,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
209
209
|
await w(
|
|
210
210
|
async () => {
|
|
211
211
|
var s;
|
|
212
|
-
await R.deleteGroup((s =
|
|
212
|
+
await R.deleteGroup((s = l.value) == null ? void 0 : s._id), v("success"), F();
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
message: "Deleting group",
|
|
@@ -225,15 +225,15 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
225
225
|
}), (s, e) => {
|
|
226
226
|
const m = x("FmButton"), C = x("FmTextField"), B = x("FmList"), E = x("FmSideSheet");
|
|
227
227
|
return d(), A(E, {
|
|
228
|
-
modelValue: t(
|
|
229
|
-
"onUpdate:modelValue": e[7] || (e[7] = (f) => T(
|
|
230
|
-
header: t(
|
|
228
|
+
modelValue: t(g),
|
|
229
|
+
"onUpdate:modelValue": e[7] || (e[7] = (f) => T(g) ? g.value = f : null),
|
|
230
|
+
header: t(l) ? "Edit group" : "Add group",
|
|
231
231
|
"dismiss-away": "",
|
|
232
232
|
"close-button": !0,
|
|
233
233
|
"max-width": 550
|
|
234
234
|
}, Y({
|
|
235
235
|
"side-sheet-footer": L(() => [
|
|
236
|
-
i("div",
|
|
236
|
+
i("div", Pe, [
|
|
237
237
|
t(r) ? V("", !0) : (d(), k($, { key: 0 }, [
|
|
238
238
|
h(m, {
|
|
239
239
|
label: "Submit",
|
|
@@ -245,7 +245,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
245
245
|
onClick: e[4] || (e[4] = (f) => F()),
|
|
246
246
|
variant: "tertiary"
|
|
247
247
|
}),
|
|
248
|
-
t(
|
|
248
|
+
t(l) ? (d(), A(m, {
|
|
249
249
|
key: 0,
|
|
250
250
|
label: "Delete",
|
|
251
251
|
variant: "plain",
|
|
@@ -262,16 +262,16 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
262
262
|
]),
|
|
263
263
|
default: L(() => [
|
|
264
264
|
t(r) ? V("", !0) : (d(), k("div", Se, [
|
|
265
|
-
|
|
265
|
+
e[9] || (e[9] = i("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1)),
|
|
266
266
|
h(oe, {
|
|
267
267
|
modelValue: t(a).name,
|
|
268
268
|
"onUpdate:modelValue": e[1] || (e[1] = (f) => t(a).name = f),
|
|
269
269
|
label: "Name",
|
|
270
|
-
schema: t(se).typeAtPath(t(
|
|
270
|
+
schema: t(se).typeAtPath(t(_), "name")
|
|
271
271
|
}, null, 8, ["modelValue", "schema"]),
|
|
272
|
-
|
|
273
|
-
i("div",
|
|
274
|
-
i("div",
|
|
272
|
+
e[10] || (e[10] = i("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1)),
|
|
273
|
+
i("div", we, [
|
|
274
|
+
i("div", Fe, O(t(a).campaigns.length) + " campaign(s) linked ", 1),
|
|
275
275
|
h(C, {
|
|
276
276
|
modelValue: t(o),
|
|
277
277
|
"onUpdate:modelValue": e[2] || (e[2] = (f) => T(o) ? o.value = f : null),
|
|
@@ -293,17 +293,17 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
293
293
|
"onUpdate:modelValue": e[3] || (e[3] = (f) => t(a).campaigns = f),
|
|
294
294
|
campaigns: t(N)
|
|
295
295
|
}, null, 8, ["modelValue", "campaigns"])) : V("", !0),
|
|
296
|
-
i("div",
|
|
296
|
+
i("div", Ae, [
|
|
297
297
|
t(r) ? V("", !0) : (d(!0), k($, { key: 0 }, D(t(q), (f, Q) => (d(), k("div", null, [
|
|
298
|
-
i("div",
|
|
298
|
+
i("div", $e, O(Q), 1),
|
|
299
299
|
h(B, { separator: !0 }, {
|
|
300
300
|
default: L(() => [
|
|
301
|
-
(d(!0), k($, null, D(f, (H) => (d(), k("div",
|
|
301
|
+
(d(!0), k($, null, D(f, (H) => (d(), k("div", Ue, [
|
|
302
302
|
i("div", null, O(H.label), 1),
|
|
303
303
|
i("div", null, [
|
|
304
304
|
h(m, {
|
|
305
305
|
icon: "delete",
|
|
306
|
-
onClick: (
|
|
306
|
+
onClick: (Re) => J(H.value),
|
|
307
307
|
variant: "tertiary"
|
|
308
308
|
}, null, 8, ["onClick"])
|
|
309
309
|
])
|
|
@@ -325,7 +325,7 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
325
325
|
variant: "tertiary",
|
|
326
326
|
onClick: e[0] || (e[0] = (f) => r.value = !1)
|
|
327
327
|
}),
|
|
328
|
-
ee("Link campaign ")
|
|
328
|
+
e[8] || (e[8] = ee("Link campaign ", -1))
|
|
329
329
|
])
|
|
330
330
|
]),
|
|
331
331
|
key: "0"
|
|
@@ -333,65 +333,62 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
333
333
|
]), 1032, ["modelValue", "header"]);
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
}),
|
|
337
|
-
src: ne,
|
|
338
|
-
class: "w-[150px]"
|
|
339
|
-
}, null, -1), De = /* @__PURE__ */ i("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Analytics Dashboard Temporarily Unavailable ", -1), Te = /* @__PURE__ */ i("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " We apologize for the inconvenience. The analytics dashboard is currently under maintenance to improve your experience. Please check back later for updates on system availability. ", -1), rt = /* @__PURE__ */ j({
|
|
336
|
+
}), Ge = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Me = { class: "space-y-16" }, Be = { class: "flex items-center justify-end" }, at = /* @__PURE__ */ j({
|
|
340
337
|
__name: "Analytic",
|
|
341
338
|
setup(U) {
|
|
342
|
-
const { t: b } = ye(),
|
|
339
|
+
const { t: b } = ye(), c = {
|
|
343
340
|
label: b("connect.analytic.addGroup"),
|
|
344
341
|
value: "create",
|
|
345
342
|
isPrimary: !0,
|
|
346
343
|
prependIcon: "add"
|
|
347
|
-
}, v = ve(), S = y(),
|
|
344
|
+
}, v = ve(), S = y(), g = y([]), r = y(""), p = te({
|
|
348
345
|
totalCampaign: 0,
|
|
349
346
|
totalProgram: 0,
|
|
350
347
|
totalMember: 0
|
|
351
348
|
}), o = y("1");
|
|
352
349
|
b("connect.analytic.summary.totalCampaign"), b("connect.analytic.summary.totalProgram"), b("connect.analytic.summary.totalMember");
|
|
353
|
-
function a(
|
|
354
|
-
var
|
|
355
|
-
o.value = (/* @__PURE__ */ new Date()).toISOString(), (
|
|
350
|
+
function a(l) {
|
|
351
|
+
var u;
|
|
352
|
+
o.value = (/* @__PURE__ */ new Date()).toISOString(), (u = S.value) == null || u.showSheet(l);
|
|
356
353
|
}
|
|
357
|
-
async function
|
|
354
|
+
async function _() {
|
|
358
355
|
await v.readGroups();
|
|
359
|
-
const
|
|
356
|
+
const l = await R.readAllGrouped({
|
|
360
357
|
limit: 100,
|
|
361
358
|
skip: 0,
|
|
362
359
|
sortBy: "_id",
|
|
363
360
|
search: "",
|
|
364
361
|
descending: !0
|
|
365
362
|
});
|
|
366
|
-
|
|
363
|
+
g.value = l.resources;
|
|
367
364
|
}
|
|
368
|
-
G(() =>
|
|
369
|
-
var
|
|
370
|
-
return
|
|
365
|
+
G(() => g.value.filter((l) => {
|
|
366
|
+
var u;
|
|
367
|
+
return l.name.includes(r.value) || ((u = l.pf_campaigns) == null ? void 0 : u.filter((w) => w.name.includes(r.value)).length);
|
|
371
368
|
}));
|
|
372
|
-
const
|
|
373
|
-
return
|
|
374
|
-
var
|
|
375
|
-
return !
|
|
369
|
+
const n = fe();
|
|
370
|
+
return ne(), y(!0), G(() => {
|
|
371
|
+
var l, u, w, P;
|
|
372
|
+
return !n.storeOption || !n.storeOption.company ? -1 : !n.payoutAccount || !n.payoutAccount.enable || n.payoutAccount.status != "APPROVED" ? 0 : (u = (l = n.store) == null ? void 0 : l.categories) != null && u.length ? (P = (w = n.store) == null ? void 0 : w.categories) != null && P.some(
|
|
376
373
|
(M) => M.bundles.some((F) => F.isFeedvibe)
|
|
377
374
|
) ? 3 : 2 : 1;
|
|
378
375
|
}), ae(async () => {
|
|
379
|
-
await
|
|
380
|
-
}), (
|
|
376
|
+
await n.readMemberStore(), await n.readMembership(), await n.readPayoutAccount();
|
|
377
|
+
}), (l, u) => {
|
|
381
378
|
const w = x("FmPageHead"), P = x("FmSearch"), M = x("FmCard");
|
|
382
379
|
return x("FmButton"), x("FmIcon"), d(), k($, null, [
|
|
383
380
|
h(w, {
|
|
384
381
|
title: t(b)("connect.analytic.title"),
|
|
385
|
-
actions: t(
|
|
386
|
-
"onClick:action":
|
|
382
|
+
actions: t(g).length > 0 ? [c] : [],
|
|
383
|
+
"onClick:action": u[0] || (u[0] = (F) => a())
|
|
387
384
|
}, null, 8, ["title", "actions"]),
|
|
388
|
-
i("div",
|
|
389
|
-
i("div",
|
|
390
|
-
i("div",
|
|
385
|
+
i("div", Ge, [
|
|
386
|
+
i("div", Me, [
|
|
387
|
+
i("div", Be, [
|
|
391
388
|
h(P, {
|
|
392
389
|
class: "xs:hidden",
|
|
393
390
|
modelValue: t(r),
|
|
394
|
-
"onUpdate:modelValue":
|
|
391
|
+
"onUpdate:modelValue": u[1] || (u[1] = (F) => T(r) ? r.value = F : null),
|
|
395
392
|
placeholder: t(b)("connect.analytic.search"),
|
|
396
393
|
collapsible: ""
|
|
397
394
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -399,23 +396,26 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
399
396
|
V("", !0)
|
|
400
397
|
]),
|
|
401
398
|
V("", !0),
|
|
402
|
-
t(
|
|
399
|
+
t(g).length ? V("", !0) : (d(), A(M, {
|
|
403
400
|
key: 1,
|
|
404
401
|
variant: "outlined",
|
|
405
402
|
class: "flex flex-col gap-y-24 items-center p-16"
|
|
406
403
|
}, {
|
|
407
|
-
default: L(() => [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
404
|
+
default: L(() => [...u[7] || (u[7] = [
|
|
405
|
+
i("img", {
|
|
406
|
+
src: le,
|
|
407
|
+
class: "w-[150px]"
|
|
408
|
+
}, null, -1),
|
|
409
|
+
i("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Analytics Dashboard Temporarily Unavailable ", -1),
|
|
410
|
+
i("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " We apologize for the inconvenience. The analytics dashboard is currently under maintenance to improve your experience. Please check back later for updates on system availability. ", -1)
|
|
411
|
+
])]),
|
|
412
412
|
_: 1
|
|
413
413
|
})),
|
|
414
414
|
V("", !0),
|
|
415
|
-
h(
|
|
415
|
+
h(Le, {
|
|
416
416
|
ref_key: "sheetRef",
|
|
417
417
|
ref: S,
|
|
418
|
-
onSuccess:
|
|
418
|
+
onSuccess: _
|
|
419
419
|
}, null, 512)
|
|
420
420
|
])
|
|
421
421
|
], 64);
|
|
@@ -423,5 +423,5 @@ const _e = { class: "ml-32 flex flex-col" }, ge = /* @__PURE__ */ j({
|
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
export {
|
|
426
|
-
|
|
426
|
+
at as default
|
|
427
427
|
};
|