@feedmepos/mf-connect 0.1.47-prod → 0.1.48-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-DrjBaKmx.js} +113 -113
- package/dist/{App-DP_jCyej.js → App-eIaytGsZ.js} +632 -622
- package/dist/{Bin-tL4lF6PB.js → Bin-CVp0eFwl.js} +9 -9
- package/dist/{Broadcast-T2a5tN8R.js → Broadcast-DBgBT6yz.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CugJWeBo.js} +18 -18
- package/dist/{Card-Bi-ODgCc.js → Card-DkP6oJVn.js} +239 -239
- package/dist/{Collections-JHWotZ1I.js → Collections-DYb_aeTW.js} +31 -31
- package/dist/{Credit-DQQCXqS0.js → Credit-WVv_PL5D.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js} +756 -753
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js} +96 -96
- package/dist/{Experience-DzTV21vX.js → Experience-BdH44wBG.js} +41 -41
- package/dist/{Game-DUCx2Dl9.js → Game-C7jxRESY.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/{Index-zynxjOOr.js → Index-DYr1p4sh.js} +54 -54
- package/dist/{Marketing-BBHDVRkR.js → Marketing-Djl27fez.js} +24 -24
- package/dist/{Member-B09bj6C3.js → Member-CWXedfTG.js} +63 -63
- package/dist/MemberList-C2TvGi22.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BSUocGg9.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-D8xPA6jM.js} +2286 -2220
- package/dist/{Mission-DAv0e_ZH.js → Mission-BVx9Cqi5.js} +20 -20
- package/dist/{Overview-D0rBTEtP.js → Overview-DyXF9zfB.js} +337 -337
- package/dist/{Point-BeBYi1BT.js → Point-ovkgTwZO.js} +41 -41
- package/dist/{Promotion-BSPU5hP9.js → Promotion-B0Q6GItP.js} +42 -42
- package/dist/{Queue-C5IFJ3iE.js → Queue-BAWG1Hh-.js} +12 -12
- package/dist/{Record-CoFSrv7j.js → Record-CTp80g4A.js} +10 -10
- package/dist/{Reward-COIOBOl-.js → Reward-_Jow1lJ7.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-BV8xCejA.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-DkDAuGY0.js} +381 -381
- package/dist/{Segment-DF5SrucQ.js → Segment-CsdJ1SjK.js} +327 -327
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-DH3oIm2t.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DvVrjpxR.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D5gV89Xk.js} +3 -3
- package/dist/Setting-BZRA50LO.js +1936 -0
- package/dist/{Store-E2_0EIy8.js → Store-CFnCN_7-.js} +238 -238
- package/dist/StoreRewards-B_McpBz-.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-vL0vr-Xn.js} +185 -185
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C1ZlLdme.js} +1 -1
- package/dist/{Tier-CEEHsXkC.js → Tier-CCYFu6kJ.js} +106 -106
- package/dist/{Title-BMAWlGeW.js → Title-7Mg-Ml4z.js} +95 -95
- package/dist/{Transaction-CLsceq-O.js → Transaction-BqZrbpZi.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js} +6 -6
- package/dist/{Voucher-Cd293WYY.js → Voucher-Yty_7SuS.js} +36 -36
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js} +1 -1
- package/dist/{app-aVXsWATU.js → app-2EJP4psh.js} +31 -31
- package/dist/app-Dzon--6x.js +57962 -0
- package/dist/app.js +1 -1
- package/dist/{business-DVlHPzaL.js → business-BehG4fR2.js} +1 -1
- package/dist/{campaign-l-u9A514.js → campaign-BpaiTG4f.js} +10 -10
- package/dist/{campaign-D9KeUWA7.js → campaign-CAcP56Sz.js} +2 -2
- package/dist/{campaign.enum-Cud82tES.js → campaign.enum-BWjI8Hop.js} +1 -1
- package/dist/{campaign.fn-C-UojhHv.js → campaign.fn-PVdB1-V1.js} +166 -166
- package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BYmuqayi.js} +1 -1
- package/dist/{collection.fn-yR-xnV4g.js → collection.fn-CbH8hbWW.js} +2 -2
- package/dist/{dto-Cua1OHMY.js → dto-Dd3Oc4QO.js} +4 -4
- package/dist/{effect-B5-eXNEr.js → effect-DvEQNEl0.js} +1 -1
- package/dist/{email-addresses-BeYh5fr5.js → email-addresses-C-9JrAi8.js} +1 -1
- package/dist/{export-BUF4_DUz.js → export-RWE9Cn-d.js} +4 -4
- package/dist/{helper-CGwOThAl.js → helper-Bl6LdWED.js} +1 -1
- package/dist/{index-Cl2iYM2F.js → index-1bU9cLqV.js} +1 -1
- package/dist/{index-1BGPM6Uy.js → index-BCQMVr1J.js} +1 -1
- package/dist/{index-BmL_b0IR.js → index-Bgnrbk5x.js} +1 -1
- package/dist/{index-knuJv0ti.js → index-Bjf5Z2QE.js} +4 -4
- package/dist/{index-ng2IXlL1.js → index-CFW9ogow.js} +1 -1
- package/dist/{index-DNTd-FNx.js → index-CfgczUMX.js} +2 -2
- package/dist/{index-C-d_4n-1.js → index-CzCqc7ph.js} +1 -1
- package/dist/{index-aMDi62-C.js → index-DX1X6Owa.js} +1 -1
- package/dist/{index-DlFVLRKG.js → index-DZN5WWgq.js} +3 -3
- package/dist/{index-D5KIp8ZB.js → index-DhUvELhc.js} +3 -3
- package/dist/{index-Cx8-ipee.js → index-DpoNuVc-.js} +6 -6
- package/dist/{index-BLdVWQId.js → index-G_XSbrXB.js} +3 -3
- package/dist/{index-hX2mE0gQ.js → index-VVy4GPzJ.js} +1 -1
- package/dist/{index-CB8iWT_p.js → index-wOExBjGo.js} +1 -1
- package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DfgZFSqe.js} +1 -1
- package/dist/{loading-c4b7n9Xp.js → loading-qlqqYGF3.js} +1 -1
- package/dist/{membership-oBIs4sbL.js → membership-Bh_1iu5v.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-AP24H0gk.js → money-DvTB_Fek.js} +1 -1
- package/dist/{number-CwsAYC_2.js → number-DJQ3gi1P.js} +1 -1
- package/dist/objectid-BKU0cEuv.js +145 -0
- package/dist/{plugins-Dn7JDHi7.js → plugins-DJpBrPbQ.js} +2 -2
- package/dist/{reward-4wdoZeXw.js → reward-DZ4KlN9B.js} +1 -1
- package/dist/{rule-_OJza6tn.js → rule-DV0yCGlq.js} +4 -4
- package/dist/{rule-builder-DmlhHAED.js → rule-builder-D6ihVPNO.js} +1 -1
- package/dist/{template-BSQLFHf4.js → template-ElP-JIFL.js} +63 -63
- package/dist/timezone-FaHjut_D.js +1150 -0
- package/dist/{trigger-DC9tDnI2.js → trigger-D8wnJVTA.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-CCVOptFD.js → user-NWV9KppR.js} +1 -1
- package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-CkbS-IDD.js} +112 -112
- package/dist/{xlsx-BVMaOi8M.js → xlsx-CdQE5RZi.js} +226 -226
- package/package.json +5 -4
- 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/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/objectid-CVDLTdni.js +0 -145
- package/dist/usePagination-JoYaROkV.js +0 -223
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { defineComponent as X, ref as
|
|
1
|
+
import { defineComponent as X, ref as x, computed as H, resolveComponent as w, openBlock as b, createBlock as h, unref as t, isRef as Z, withCtx as A, createElementVNode as f, createVNode as d, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as O, onMounted as q, toDisplayString as B } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as Q, components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as G } from "./loading-
|
|
5
|
-
import { u as J, C as ee } from "./membership-
|
|
6
|
-
import { f as j, p as te } from "./plugins-
|
|
7
|
-
import { u as oe } from "./vue-i18n
|
|
4
|
+
import { u as G } from "./loading-qlqqYGF3.js";
|
|
5
|
+
import { u as J, C as ee } from "./membership-Bh_1iu5v.js";
|
|
6
|
+
import { f as j, p as te } from "./plugins-DJpBrPbQ.js";
|
|
7
|
+
import { u as oe } from "./vue-i18n-CkbS-IDD.js";
|
|
8
8
|
import { c as ae } from "./object-qECH92oz.js";
|
|
9
|
-
import { Z as
|
|
10
|
-
import "./index-
|
|
11
|
-
import { F as N } from "./index-
|
|
12
|
-
import { useCoreStore as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
9
|
+
import { Z as _ } from "./zod-Bg2FbC-D.js";
|
|
10
|
+
import "./index-CfgczUMX.js";
|
|
11
|
+
import { F as N } from "./index-DZN5WWgq.js";
|
|
12
|
+
import { useCoreStore as le } from "@feedmepos/mf-common";
|
|
13
|
+
import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js";
|
|
14
|
+
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js";
|
|
15
15
|
import { J as K } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { i as
|
|
18
|
-
import { u as
|
|
19
|
-
import "./index-
|
|
20
|
-
import { C as
|
|
21
|
-
import { e as me } from "./effect-
|
|
16
|
+
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js";
|
|
17
|
+
import { i as de } from "./helper-Bl6LdWED.js";
|
|
18
|
+
import { u as pe, r as P } from "./reward-DZ4KlN9B.js";
|
|
19
|
+
import "./index-1bU9cLqV.js";
|
|
20
|
+
import { C as ce } from "./campaign.fn-PVdB1-V1.js";
|
|
21
|
+
import { e as me } from "./effect-DvEQNEl0.js";
|
|
22
22
|
import { useRouter as ue } from "vue-router";
|
|
23
|
-
import { R as ye } from "./app-
|
|
24
|
-
const fe =
|
|
23
|
+
import { R as ye } from "./app-2EJP4psh.js";
|
|
24
|
+
const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ X({
|
|
25
25
|
__name: "EditRewardSheet",
|
|
26
26
|
emits: ["update"],
|
|
27
|
-
setup(W, { expose:
|
|
28
|
-
const
|
|
29
|
-
var
|
|
30
|
-
return ((
|
|
27
|
+
setup(W, { expose: n, emit: I }) {
|
|
28
|
+
const p = J(), { minor: C } = G, v = x(!1), a = x({}), y = x(), R = H(() => {
|
|
29
|
+
var l;
|
|
30
|
+
return ((l = a.value.option) == null ? void 0 : l.collectibleType) === "CREDIT" ? N.superRefine((e, o) => {
|
|
31
31
|
var i, m, g, r;
|
|
32
|
-
!((m = (i = e.option) == null ? void 0 : i.validityOption) != null && m.validForDay) && !((r = (g = e.option) == null ? void 0 : g.validityOption) != null && r.validBefore) &&
|
|
32
|
+
!((m = (i = e.option) == null ? void 0 : i.validityOption) != null && m.validForDay) && !((r = (g = e.option) == null ? void 0 : g.validityOption) != null && r.validBefore) && o.addIssue({
|
|
33
33
|
code: "custom",
|
|
34
34
|
path: [],
|
|
35
35
|
message: "Credit validity must be set"
|
|
36
36
|
});
|
|
37
37
|
}) : N;
|
|
38
38
|
}), u = H(() => {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
39
|
+
const l = R.value.safeParse(a.value);
|
|
40
|
+
return l.success ? [] : l.error.errors;
|
|
41
41
|
});
|
|
42
|
-
function
|
|
43
|
-
|
|
42
|
+
function F(l, e) {
|
|
43
|
+
l && (y.value = void 0, a.value = e), v.value = l;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const D = I;
|
|
46
46
|
async function S() {
|
|
47
|
-
const
|
|
48
|
-
!
|
|
47
|
+
const l = R.value.safeParse(a.value);
|
|
48
|
+
!l.success || !l.data || (await C(
|
|
49
49
|
async () => {
|
|
50
50
|
var e;
|
|
51
|
-
|
|
52
|
-
((e =
|
|
51
|
+
l.data.option.type === "VOUCHER" && y.value && (l.data.option.collectibleConfig.image = await j.update(
|
|
52
|
+
((e = l.data.option.collectibleConfig) == null ? void 0 : e.image) || j.collectibleImagePath(void 0, y.value),
|
|
53
53
|
y.value
|
|
54
54
|
));
|
|
55
55
|
},
|
|
@@ -57,14 +57,14 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
57
57
|
message: "Uploading reward image",
|
|
58
58
|
successMessage: "Reward image updated"
|
|
59
59
|
}
|
|
60
|
-
),
|
|
60
|
+
), D("update", l.data));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
62
|
+
function T(l) {
|
|
63
|
+
l === "VOUCHER" ? a.value.option = {
|
|
64
64
|
collectible: null,
|
|
65
65
|
type: "VOUCHER",
|
|
66
|
-
collectibleConfig:
|
|
67
|
-
business:
|
|
66
|
+
collectibleConfig: de("VOUCHER", {
|
|
67
|
+
business: le().currentBusiness.value._id
|
|
68
68
|
}),
|
|
69
69
|
earningOption: {
|
|
70
70
|
amount: 1,
|
|
@@ -73,9 +73,9 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
73
73
|
validityOption: {
|
|
74
74
|
validForDay: 7
|
|
75
75
|
}
|
|
76
|
-
} :
|
|
77
|
-
collectible:
|
|
78
|
-
collectibleType:
|
|
76
|
+
} : a.value.option = {
|
|
77
|
+
collectible: p.loyaltyRewards.raw[0]._id,
|
|
78
|
+
collectibleType: p.loyaltyRewards.raw[0].type,
|
|
79
79
|
type: "LOYALTY",
|
|
80
80
|
earningOption: {
|
|
81
81
|
amount: 1,
|
|
@@ -86,17 +86,17 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
(e) => e._id ===
|
|
89
|
+
function $(l) {
|
|
90
|
+
a.value.option.collectible = l, a.value.option.collectibleType = p.loyaltyRewards.raw.find(
|
|
91
|
+
(e) => e._id === l
|
|
92
92
|
).type;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
return
|
|
96
|
-
showSheet:
|
|
97
|
-
}), (
|
|
98
|
-
const
|
|
99
|
-
return b(),
|
|
94
|
+
const V = x();
|
|
95
|
+
return n({
|
|
96
|
+
showSheet: F
|
|
97
|
+
}), (l, e) => {
|
|
98
|
+
const o = w("FmSelect"), i = w("FmForm"), m = w("FmButton"), g = w("FmSideSheet");
|
|
99
|
+
return b(), h(g, {
|
|
100
100
|
"max-width": 560,
|
|
101
101
|
modelValue: t(v),
|
|
102
102
|
"onUpdate:modelValue": [
|
|
@@ -106,15 +106,15 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
106
106
|
header: "Edit reward"
|
|
107
107
|
}, {
|
|
108
108
|
"side-sheet-footer": A(() => [
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
f("div", fe, [
|
|
110
|
+
d(m, {
|
|
111
111
|
variant: "primary",
|
|
112
112
|
type: "button",
|
|
113
113
|
label: "Confirm",
|
|
114
114
|
disabled: t(u).length > 0,
|
|
115
115
|
onClick: e[6] || (e[6] = (r) => S())
|
|
116
116
|
}, null, 8, ["disabled"]),
|
|
117
|
-
|
|
117
|
+
d(m, {
|
|
118
118
|
variant: "secondary",
|
|
119
119
|
type: "button",
|
|
120
120
|
label: "Cancel",
|
|
@@ -123,87 +123,87 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
123
123
|
])
|
|
124
124
|
]),
|
|
125
125
|
default: A(() => [
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
d(K, { json: t(a) }, null, 8, ["json"]),
|
|
127
|
+
d(i, {
|
|
128
128
|
class: "flex flex-col gap-y-24",
|
|
129
129
|
ref_key: "formRef",
|
|
130
|
-
ref:
|
|
130
|
+
ref: V,
|
|
131
131
|
onValidationSuccess: e[5] || (e[5] = (r) => S())
|
|
132
132
|
}, {
|
|
133
133
|
default: A(() => {
|
|
134
|
-
var r, E,
|
|
134
|
+
var r, E, c;
|
|
135
135
|
return [
|
|
136
|
-
|
|
137
|
-
modelValue: t(
|
|
138
|
-
"onUpdate:modelValue": e[0] || (e[0] = (s) => t(
|
|
136
|
+
d(se, {
|
|
137
|
+
modelValue: t(a).name,
|
|
138
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => t(a).name = s),
|
|
139
139
|
label: "Reward Name",
|
|
140
|
-
schema: t(
|
|
141
|
-
"error-text": t(
|
|
140
|
+
schema: t(_).typeAtPath(t(R), "name", []),
|
|
141
|
+
"error-text": t(_).helperText(t(u), "name")
|
|
142
142
|
}, null, 8, ["modelValue", "schema", "error-text"]),
|
|
143
|
-
|
|
143
|
+
d(o, {
|
|
144
144
|
label: "Reward Type",
|
|
145
|
-
disabled: !!t(
|
|
145
|
+
disabled: !!t(a)._id,
|
|
146
146
|
items: [
|
|
147
147
|
{ label: "Voucher", value: "VOUCHER" },
|
|
148
148
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
149
149
|
],
|
|
150
|
-
"model-value": t(
|
|
151
|
-
"onUpdate:modelValue":
|
|
150
|
+
"model-value": t(a).option.type,
|
|
151
|
+
"onUpdate:modelValue": T
|
|
152
152
|
}, null, 8, ["disabled", "model-value"]),
|
|
153
|
-
t(
|
|
153
|
+
t(a).option.type == "LOYALTY" ? (b(), h(o, {
|
|
154
154
|
key: 0,
|
|
155
155
|
label: "Loyalty type",
|
|
156
|
-
items: t(
|
|
157
|
-
"model-value": t(
|
|
158
|
-
"onUpdate:modelValue":
|
|
156
|
+
items: t(p).loyaltyRewards.items,
|
|
157
|
+
"model-value": t(a).option.collectible,
|
|
158
|
+
"onUpdate:modelValue": $
|
|
159
159
|
}, null, 8, ["items", "model-value"])) : k("", !0),
|
|
160
|
-
t(
|
|
161
|
-
|
|
162
|
-
((r = t(
|
|
160
|
+
t(a).option.type === "LOYALTY" ? (b(), M(Y, { key: 1 }, [
|
|
161
|
+
e[10] || (e[10] = f("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
|
|
162
|
+
((r = t(p).loyaltyRewards.items.find(
|
|
163
163
|
(s) => {
|
|
164
|
-
var
|
|
165
|
-
return s.value === ((
|
|
164
|
+
var U;
|
|
165
|
+
return s.value === ((U = t(a)) == null ? void 0 : U.option.collectible);
|
|
166
166
|
}
|
|
167
|
-
)) == null ? void 0 : r.raw.type) !== "TITLE" ? (b(),
|
|
167
|
+
)) == null ? void 0 : r.raw.type) !== "TITLE" ? (b(), h(ne, {
|
|
168
168
|
key: 0,
|
|
169
169
|
class: "mt-[-8px]",
|
|
170
170
|
rules: [
|
|
171
|
-
t(
|
|
172
|
-
t(
|
|
171
|
+
t(_).ruleAtPath(t(R), "option.earningOption", [
|
|
172
|
+
t(a).option.type
|
|
173
173
|
])
|
|
174
174
|
],
|
|
175
|
-
"helper-state": t(
|
|
176
|
-
"error-text": t(
|
|
175
|
+
"helper-state": t(_).helperState(t(u), "option.earningOption"),
|
|
176
|
+
"error-text": t(_).helperText(t(u), "option.earningOption"),
|
|
177
177
|
"fixed-type": !0,
|
|
178
|
-
"model-value": t(
|
|
179
|
-
"onUpdate:modelValue": e[1] || (e[1] = (s) => t(
|
|
178
|
+
"model-value": t(a).option.earningOption,
|
|
179
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => t(a).option.earningOption = s)
|
|
180
180
|
}, null, 8, ["rules", "helper-state", "error-text", "model-value"])) : k("", !0),
|
|
181
|
-
|
|
181
|
+
d(re, {
|
|
182
182
|
class: "!gap-24",
|
|
183
|
-
"for-credit": t(
|
|
183
|
+
"for-credit": t(a).option.type === "LOYALTY" && ((E = t(p).loyaltyRewards.items.find(
|
|
184
184
|
(s) => {
|
|
185
|
-
var
|
|
186
|
-
return s.value === ((
|
|
185
|
+
var U;
|
|
186
|
+
return s.value === ((U = t(a).option) == null ? void 0 : U.collectible);
|
|
187
187
|
}
|
|
188
188
|
)) == null ? void 0 : E.raw.type) === "CREDIT",
|
|
189
|
-
type: t(
|
|
189
|
+
type: t(a).option.type === "VOUCHER" ? "range" : "custom",
|
|
190
190
|
rules: [
|
|
191
|
-
t(
|
|
192
|
-
t(
|
|
191
|
+
t(_).ruleAtPath(t(R), "option.validityOption", [
|
|
192
|
+
t(a).option.type
|
|
193
193
|
])
|
|
194
194
|
],
|
|
195
|
-
"model-value": t(
|
|
196
|
-
"onUpdate:modelValue": e[2] || (e[2] = (s) => t(
|
|
195
|
+
"model-value": t(a).option.validityOption,
|
|
196
|
+
"onUpdate:modelValue": e[2] || (e[2] = (s) => t(a).option.validityOption = s)
|
|
197
197
|
}, null, 8, ["for-credit", "type", "rules", "model-value"])
|
|
198
198
|
], 64)) : k("", !0),
|
|
199
|
-
t(
|
|
199
|
+
t(a).option.type === "VOUCHER" ? (b(), h(ie, {
|
|
200
200
|
key: 2,
|
|
201
201
|
"reward-image": t(y),
|
|
202
|
-
"model-value": ((
|
|
203
|
-
"onUpdate:modelValue": e[3] || (e[3] = (s) => t(
|
|
202
|
+
"model-value": ((c = t(a)) == null ? void 0 : c.option.collectibleConfig) ?? void 0,
|
|
203
|
+
"onUpdate:modelValue": e[3] || (e[3] = (s) => t(a).option.collectibleConfig = s),
|
|
204
204
|
"onUpdate:rewardImage": e[4] || (e[4] = (s) => y.value = s)
|
|
205
205
|
}, null, 8, ["reward-image", "model-value"])) : k("", !0),
|
|
206
|
-
|
|
206
|
+
d(K, { json: t(u) }, null, 8, ["json"])
|
|
207
207
|
];
|
|
208
208
|
}),
|
|
209
209
|
_: 1
|
|
@@ -213,22 +213,19 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
213
213
|
}, 8, ["modelValue"]);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
217
|
-
src: z,
|
|
218
|
-
class: "aspect-square w-[150px]"
|
|
219
|
-
}, null, -1), _e = { class: "flex flex-col gap-16 text-center" }, Fe = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ X({
|
|
216
|
+
}), ve = { class: "px-24 flex flex-col gap-y-16" }, ge = { class: "flex items-center justify-between w-full" }, be = { class: "flex flex-col gap-16 text-center" }, Re = { class: "fm-typo-en-title-sm-800" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ X({
|
|
220
217
|
__name: "Reward",
|
|
221
218
|
setup(W) {
|
|
222
|
-
const { t:
|
|
223
|
-
label:
|
|
219
|
+
const { t: n } = oe(), I = {
|
|
220
|
+
label: n("connect.storeRewards.create"),
|
|
224
221
|
value: "create",
|
|
225
222
|
isPrimary: !0,
|
|
226
223
|
prependIcon: "add"
|
|
227
|
-
},
|
|
224
|
+
}, p = J(), C = pe(), { global: v, minor: a } = G, y = ue(), R = Q(), u = x({
|
|
228
225
|
searchKey: "",
|
|
229
226
|
columnFilters: []
|
|
230
|
-
}),
|
|
231
|
-
function
|
|
227
|
+
}), F = H(() => C.rewards);
|
|
228
|
+
function D(e) {
|
|
232
229
|
y.push({
|
|
233
230
|
name: ye["$connect-STORE_REWARD_COLLECTIONS"],
|
|
234
231
|
params: { id: e }
|
|
@@ -236,66 +233,66 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
236
233
|
}
|
|
237
234
|
const S = [
|
|
238
235
|
{
|
|
239
|
-
header:
|
|
236
|
+
header: n("connect.storeRewards.table.name"),
|
|
240
237
|
accessorFn: (e) => e.name
|
|
241
238
|
},
|
|
242
239
|
{
|
|
243
|
-
header:
|
|
240
|
+
header: n("connect.storeRewards.table.type"),
|
|
244
241
|
cell(e) {
|
|
245
242
|
return e.row.original.collectibleConfig ? ee[e.row.original.collectibleConfig.type].chip() : "N/A";
|
|
246
243
|
}
|
|
247
244
|
},
|
|
248
245
|
{
|
|
249
|
-
header:
|
|
246
|
+
header: n("connect.storeRewards.table.summary"),
|
|
250
247
|
accessorFn: (e) => {
|
|
251
|
-
var
|
|
248
|
+
var o, i;
|
|
252
249
|
if (e.option.type === "VOUCHER")
|
|
253
|
-
return me((i = (
|
|
250
|
+
return me((i = (o = e.option.collectibleConfig) == null ? void 0 : o.extras) == null ? void 0 : i.effect);
|
|
254
251
|
if (e.option.collectibleType == "TITLE") {
|
|
255
|
-
const m =
|
|
252
|
+
const m = p.sortedTitles.find(
|
|
256
253
|
(g) => g._id == e.option.collectible
|
|
257
254
|
);
|
|
258
255
|
return `Get ${m == null ? void 0 : m.name} valid for ${e.option.validityOption.validForDay} days`;
|
|
259
256
|
}
|
|
260
|
-
return `Get ${e.option.earningOption.amount} ${
|
|
257
|
+
return `Get ${e.option.earningOption.amount} ${ce.formattedType(e.option.collectibleType)}`;
|
|
261
258
|
}
|
|
262
259
|
},
|
|
263
260
|
{
|
|
264
|
-
header:
|
|
261
|
+
header: n("connect.storeRewards.table.actions"),
|
|
265
262
|
cell(e) {
|
|
266
|
-
return
|
|
267
|
-
|
|
263
|
+
return O("div", { class: "flex items-center justify-end gap-4" }, [
|
|
264
|
+
O(
|
|
268
265
|
L.FmMenu,
|
|
269
266
|
{
|
|
270
267
|
placement: "bottom-end",
|
|
271
|
-
onClick: (
|
|
272
|
-
|
|
268
|
+
onClick: (o) => {
|
|
269
|
+
o.stopPropagation();
|
|
273
270
|
}
|
|
274
271
|
},
|
|
275
272
|
{
|
|
276
|
-
"menu-button": () =>
|
|
273
|
+
"menu-button": () => O(L.FmButton, {
|
|
277
274
|
icon: "more_vert",
|
|
278
275
|
iconColor: "neutral-gray-400",
|
|
279
276
|
variant: "tertiary"
|
|
280
277
|
}),
|
|
281
278
|
default: () => [
|
|
282
|
-
e.row.original.option.type === "VOUCHER" &&
|
|
279
|
+
e.row.original.option.type === "VOUCHER" && O(L.FmMenuItem, {
|
|
283
280
|
label: "View collections",
|
|
284
|
-
onClick: async (
|
|
285
|
-
|
|
281
|
+
onClick: async (o) => {
|
|
282
|
+
o.stopPropagation(), D(
|
|
286
283
|
e.row.original.option.collectible
|
|
287
284
|
);
|
|
288
285
|
}
|
|
289
286
|
}),
|
|
290
|
-
|
|
287
|
+
O(
|
|
291
288
|
L.FmMenuItem,
|
|
292
289
|
{
|
|
293
|
-
onClick: async (
|
|
294
|
-
|
|
290
|
+
onClick: async (o) => {
|
|
291
|
+
o.stopPropagation(), $(e.row.original);
|
|
295
292
|
}
|
|
296
293
|
},
|
|
297
294
|
{
|
|
298
|
-
label:
|
|
295
|
+
label: O(
|
|
299
296
|
"div",
|
|
300
297
|
{
|
|
301
298
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
@@ -310,29 +307,29 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
310
307
|
]);
|
|
311
308
|
}
|
|
312
309
|
}
|
|
313
|
-
],
|
|
314
|
-
async function
|
|
310
|
+
], T = x();
|
|
311
|
+
async function $(e) {
|
|
315
312
|
await te.remove(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
) && await
|
|
313
|
+
n("connect.storeRewards.delete.confirm"),
|
|
314
|
+
n("connect.storeRewards.delete.title")
|
|
315
|
+
) && await a(
|
|
319
316
|
async () => {
|
|
320
317
|
await P.deleteReward(e._id), await C.readRewards();
|
|
321
318
|
},
|
|
322
319
|
{
|
|
323
|
-
message:
|
|
324
|
-
successMessage:
|
|
320
|
+
message: n("connect.storeRewards.delete.message"),
|
|
321
|
+
successMessage: n("connect.storeRewards.delete.success")
|
|
325
322
|
}
|
|
326
323
|
);
|
|
327
324
|
}
|
|
328
|
-
async function
|
|
329
|
-
var
|
|
325
|
+
async function V(e) {
|
|
326
|
+
var o;
|
|
330
327
|
e || (e = {
|
|
331
328
|
name: "",
|
|
332
329
|
option: {
|
|
333
330
|
type: "LOYALTY",
|
|
334
|
-
collectible:
|
|
335
|
-
collectibleType:
|
|
331
|
+
collectible: p.loyaltyRewards.items[0].value,
|
|
332
|
+
collectibleType: p.loyaltyRewards.items[0].raw.type,
|
|
336
333
|
validityOption: {
|
|
337
334
|
validForDay: 7
|
|
338
335
|
},
|
|
@@ -341,10 +338,10 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
341
338
|
amount: 1
|
|
342
339
|
}
|
|
343
340
|
}
|
|
344
|
-
}), (
|
|
341
|
+
}), (o = T.value) == null || o.showSheet(!0, ae(e));
|
|
345
342
|
}
|
|
346
|
-
async function
|
|
347
|
-
let
|
|
343
|
+
async function l(e) {
|
|
344
|
+
let o = !1;
|
|
348
345
|
e._id && e.option.type === "VOUCHER" && await new Promise((i) => {
|
|
349
346
|
R.open({
|
|
350
347
|
title: "Confirmation",
|
|
@@ -352,17 +349,17 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
352
349
|
primaryActions: { text: "Update all", close: !0 },
|
|
353
350
|
secondaryActions: { text: "Update future only", close: !0 }
|
|
354
351
|
}).onPrimary(async () => {
|
|
355
|
-
|
|
352
|
+
o = !0, i();
|
|
356
353
|
}).onSecondary(async () => {
|
|
357
354
|
i();
|
|
358
355
|
});
|
|
359
|
-
}), await
|
|
356
|
+
}), await a(
|
|
360
357
|
async () => {
|
|
361
358
|
var i;
|
|
362
359
|
e.collectibleConfig = void 0, e._id ? await P.updateReward(e._id, {
|
|
363
360
|
...e,
|
|
364
|
-
updateCollection:
|
|
365
|
-
}) : await P.createReward(e), await C.readRewards(), (i =
|
|
361
|
+
updateCollection: o
|
|
362
|
+
}) : await P.createReward(e), await C.readRewards(), (i = T.value) == null || i.showSheet(!1);
|
|
366
363
|
},
|
|
367
364
|
{
|
|
368
365
|
message: "Updating reward",
|
|
@@ -372,65 +369,68 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
372
369
|
}
|
|
373
370
|
return q(async () => {
|
|
374
371
|
await v(async () => {
|
|
375
|
-
await
|
|
372
|
+
await p.readMembership(), await p.readRewards(), await C.readRewards();
|
|
376
373
|
});
|
|
377
|
-
}), (e,
|
|
378
|
-
const i =
|
|
374
|
+
}), (e, o) => {
|
|
375
|
+
const i = w("FmPageHead"), m = w("FmSearch"), g = w("FmTable"), r = w("FmButton"), E = w("FmCard");
|
|
379
376
|
return b(), M(Y, null, [
|
|
380
|
-
|
|
381
|
-
title: t(
|
|
377
|
+
d(i, {
|
|
378
|
+
title: t(n)("connect.reward.title"),
|
|
382
379
|
actions: [I],
|
|
383
380
|
"back-button": !0,
|
|
384
|
-
"onClick:action":
|
|
385
|
-
"onClick:back":
|
|
386
|
-
var
|
|
387
|
-
return (
|
|
381
|
+
"onClick:action": o[0] || (o[0] = () => V()),
|
|
382
|
+
"onClick:back": o[1] || (o[1] = () => {
|
|
383
|
+
var c;
|
|
384
|
+
return (c = t(y)) == null ? void 0 : c.back();
|
|
388
385
|
})
|
|
389
386
|
}, null, 8, ["title", "actions"]),
|
|
390
|
-
|
|
391
|
-
t(
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
387
|
+
f("div", ve, [
|
|
388
|
+
t(F) && t(F).length > 0 ? (b(), M(Y, { key: 0 }, [
|
|
389
|
+
f("div", ge, [
|
|
390
|
+
o[6] || (o[6] = f("div", { class: "flex gap-8" }, null, -1)),
|
|
391
|
+
d(m, {
|
|
395
392
|
modelValue: t(u).searchKey,
|
|
396
|
-
"onUpdate:modelValue":
|
|
393
|
+
"onUpdate:modelValue": o[2] || (o[2] = (c) => t(u).searchKey = c),
|
|
397
394
|
class: "",
|
|
398
395
|
placeholder: "search",
|
|
399
396
|
collapsible: ""
|
|
400
397
|
}, null, 8, ["modelValue"])
|
|
401
398
|
]),
|
|
402
|
-
|
|
403
|
-
"row-data": t(
|
|
399
|
+
d(g, {
|
|
400
|
+
"row-data": t(F),
|
|
404
401
|
"column-defs": S,
|
|
405
402
|
"search-value": t(u).searchKey,
|
|
406
403
|
"column-filter": t(u).columnFilters,
|
|
407
|
-
onRowClick:
|
|
408
|
-
"hide-footer": t(
|
|
404
|
+
onRowClick: o[3] || (o[3] = (c) => V(c.original)),
|
|
405
|
+
"hide-footer": t(F).length < 10
|
|
409
406
|
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
410
|
-
], 64)) : (b(),
|
|
407
|
+
], 64)) : (b(), h(E, {
|
|
411
408
|
key: 1,
|
|
412
409
|
variant: "outlined",
|
|
413
410
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
414
411
|
}, {
|
|
415
412
|
default: A(() => [
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
413
|
+
o[7] || (o[7] = f("img", {
|
|
414
|
+
src: z,
|
|
415
|
+
class: "aspect-square w-[150px]"
|
|
416
|
+
}, null, -1)),
|
|
417
|
+
f("div", be, [
|
|
418
|
+
f("div", Re, B(t(n)("connect.storeRewards.empty.title")), 1),
|
|
419
|
+
f("div", Ce, B(t(n)("connect.storeRewards.empty.description")), 1)
|
|
420
420
|
]),
|
|
421
|
-
|
|
421
|
+
d(r, {
|
|
422
422
|
variant: "primary",
|
|
423
|
-
label: t(
|
|
424
|
-
onClick:
|
|
423
|
+
label: t(n)("connect.storeRewards.empty.action"),
|
|
424
|
+
onClick: o[4] || (o[4] = (c) => V()),
|
|
425
425
|
icon: "add"
|
|
426
426
|
}, null, 8, ["label"])
|
|
427
427
|
]),
|
|
428
428
|
_: 1
|
|
429
429
|
})),
|
|
430
|
-
|
|
430
|
+
d(we, {
|
|
431
431
|
ref_key: "rewardSheetRef",
|
|
432
|
-
ref:
|
|
433
|
-
onUpdate:
|
|
432
|
+
ref: T,
|
|
433
|
+
onUpdate: o[5] || (o[5] = (c) => l(c))
|
|
434
434
|
}, null, 512)
|
|
435
435
|
])
|
|
436
436
|
], 64);
|
|
@@ -438,5 +438,5 @@ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earni
|
|
|
438
438
|
}
|
|
439
439
|
});
|
|
440
440
|
export {
|
|
441
|
-
|
|
441
|
+
Ke as default
|
|
442
442
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ref as p, defineComponent as T, computed as x, resolveComponent as y, openBlock as U, createBlock as G, unref as e, isRef as $, withCtx as b, createElementVNode as v, createVNode as u, toDisplayString as j } from "vue";
|
|
2
|
-
import { u as B } from "./loading-
|
|
2
|
+
import { u as B } from "./loading-qlqqYGF3.js";
|
|
3
3
|
import { J as P } from "./JsonViewer-v8_C7l5N.js";
|
|
4
|
-
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js";
|
|
5
|
+
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js";
|
|
6
6
|
import { Z as L } from "./zod-Bg2FbC-D.js";
|
|
7
7
|
import { u as V } from "./app-wDQR6dpb.js";
|
|
8
8
|
import { defineStore as N } from "pinia";
|
|
9
|
-
import { r as k } from "./index-
|
|
10
|
-
import "./index-
|
|
11
|
-
import "./index-
|
|
12
|
-
import { c as E } from "./index-
|
|
13
|
-
import "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./index-
|
|
16
|
-
import { u as J } from "./vue-i18n
|
|
9
|
+
import { r as k } from "./index-wOExBjGo.js";
|
|
10
|
+
import "./index-Bjf5Z2QE.js";
|
|
11
|
+
import "./index-CfgczUMX.js";
|
|
12
|
+
import { c as E } from "./index-DpoNuVc-.js";
|
|
13
|
+
import "./index-CFW9ogow.js";
|
|
14
|
+
import "./index-DZN5WWgq.js";
|
|
15
|
+
import "./index-DhUvELhc.js";
|
|
16
|
+
import { u as J } from "./vue-i18n-CkbS-IDD.js";
|
|
17
17
|
import { c as C } from "./object-qECH92oz.js";
|
|
18
18
|
import { useDialog as Z } from "@feedmepos/ui-library";
|
|
19
19
|
const A = N("mf-connect-referral", () => {
|