@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-beta.80
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-C84B4MSt.js +427 -0
- package/dist/{App-SRz4257n.js → App-CnbbBVSn.js} +441 -420
- package/dist/AuditLogs-KOxiG5Q0.js +1887 -0
- package/dist/Bin-BBSQDzD4.js +166 -0
- package/dist/{Broadcast-DmkrJGp2.js → Broadcast-DlvPEqW7.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CZXSxA9u.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-M1Za3MaN.js} +14 -10
- package/dist/Card-BluWm_EY.js +905 -0
- package/dist/Collections-DtHJpxRT.js +464 -0
- package/dist/{Credit-CcNrq9qk.js → Credit-Be2pcBVn.js} +36 -34
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-sqq_sO_a.js +2182 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js → EffectSheet.vue_vue_type_style_index_0_lang-CBsYx54P.js} +49 -49
- package/dist/{Experience-DNsQLzDH.js → Experience-CLPyvgs0.js} +32 -30
- package/dist/FileSaver.min-NlMItPOc.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-5kEG7o4J.js +278 -0
- package/dist/Index-BSZi21Wo.js +259 -0
- package/dist/Marketing-CE1Sq3Pb.js +20071 -0
- package/dist/Member-DaBqmOYX.js +287 -0
- package/dist/MemberList-jIriR6B0.js +1606 -0
- package/dist/MemberTransactions-BGEZwpPO.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-GCEQCVOt.js → MessageInput.vue_vue_type_script_setup_true_lang-CSlafowP.js} +152 -137
- package/dist/Mission-BOByUsYC.js +296 -0
- package/dist/Overview-BQQs8TsL.js +1079 -0
- package/dist/{Point-Ck8EG_3k.js → Point-BuRBh_HC.js} +55 -53
- package/dist/Promotion-Py2WWNt0.js +289 -0
- package/dist/Queue-On8_svkl.js +260 -0
- package/dist/Record-CSWkHs9Y.js +341 -0
- package/dist/Reward-BLVyFkAH.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BW8kuoLt.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DC8JEmEC.js +1728 -0
- package/dist/Segment-BjBskgf9.js +880 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CrVw6j2M.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-oaAVUxO4.js +188 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKOTgzL-.js +147 -0
- package/dist/Setting-CAMlhgGd.js +1932 -0
- package/dist/Store-0qvNbHne.js +1842 -0
- package/dist/StoreRewards-CjcHvUNa.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CdZ7QIaf.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-vJaZIDrx.js} +1 -1
- package/dist/{Tier-CJ9-d8Zg.js → Tier-D_pHKGSv.js} +350 -334
- package/dist/{Title-DZCpvg4q.js → Title-DgdtJ87h.js} +245 -222
- package/dist/{Transaction-DpnTxlbf.js → Transaction-CKlLWcjS.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-2GOvljvv.js +130 -0
- package/dist/Voucher-Cg6zQSAy.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-rpjQkheM.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js → ZodTextField.vue_vue_type_script_setup_true_lang-BRdY-P8U.js} +1 -1
- package/dist/{app-DzAexOqx.js → app-CScRp4SA.js} +2709 -1265
- package/dist/app-jGYefKeR.js +33357 -0
- package/dist/app.js +1 -1
- package/dist/business-DYhO4gjc.js +79 -0
- package/dist/campaign-BgXy1Ngd.js +1810 -0
- package/dist/{campaign-winsqufa.js → campaign-CZ5pMrUu.js} +2 -2
- package/dist/campaign.enum-CWBDlzqp.js +20 -0
- package/dist/campaign.fn-HHZ5mQKe.js +758 -0
- package/dist/collectible.enum-MvoLHpuA.js +19 -0
- package/dist/{collection.fn-CI5Llblg.js → collection.fn-BHUoLJPj.js} +2 -2
- package/dist/dto-DXdR0em1.js +214 -0
- package/dist/{effect-CdkrIYgX.js → effect-HLuo1A_f.js} +33 -16
- package/dist/email-addresses-DU4ehcHM.js +705 -0
- package/dist/{export-DGxfief1.js → export-BDRHAxZr.js} +5 -5
- package/dist/{helper-B8RqcTNu.js → helper-JhFOw8n-.js} +1 -1
- package/dist/{index-OzicErwL.js → index-BG_GpbnZ.js} +24 -21
- package/dist/{index-Cw_aXFH6.js → index-BZWr1bgh.js} +269 -173
- package/dist/{loading-DuEFUCwF.js → index-Bs-tzd5F.js} +4609 -4886
- package/dist/{index-wzdbEEcZ.js → index-C2nNcNjw.js} +1 -1
- package/dist/index-CIF8DeC8.js +54 -0
- package/dist/{index-HZC9LLAX.js → index-CqT8uK3R.js} +48 -4
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-9w43_U1v.js → index-DVj1MyZp.js} +1506 -1480
- package/dist/{index-CZgQVRsm.js → index-GmHsjd7O.js} +1 -1
- package/dist/index-QDEKR2Rj.js +115 -0
- package/dist/{index-A34xEz20.js → index-cYKPj4fA.js} +2246 -871
- package/dist/index-eRBO4PzZ.js +56 -0
- package/dist/index-fS6fmvFv.js +29556 -0
- package/dist/index-l8E6r07W.js +32 -0
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-CppSMh_U.js → index.esm2017-B-YrQ0sw.js} +206 -206
- package/dist/loading-C09t0mFj.js +71 -0
- package/dist/{membership-nsMtWeTC.js → membership-tHAn3VRs.js} +80 -66
- package/dist/money-DYVCca49.js +15 -0
- package/dist/number-VYuUME2F.js +12 -0
- package/dist/objectid-BTO4csVa.js +145 -0
- package/dist/plugins-CXgvBDMF.js +208 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-DX9TZrk4.js +36 -0
- package/dist/{rule-CPIMqt1h.js → rule-CbCZqulx.js} +185 -178
- package/dist/{rule-builder-CSs5XRKP.js → rule-builder-J8K_fjI-.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CJZoYavu.js → template-BtYJpEBa.js} +5 -5
- package/dist/trigger-D6dpZFSN.js +144 -0
- package/dist/user-C0QvWk-o.js +54 -0
- package/dist/vue-i18n-cz2_cPSz.js +2365 -0
- package/dist/{xlsx-BZlnYinX.js → xlsx-BIPQrY49.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-5QztrYSp.js +0 -622
- package/dist/Card-BsjFTVsH.js +0 -825
- package/dist/Collections-7wqZHOax.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js +0 -2813
- package/dist/Game-DlzDerT7.js +0 -255
- package/dist/Marketing-BqhpaG4o.js +0 -316
- package/dist/Member-AFgZcdtz.js +0 -69
- package/dist/MemberList-BKgrLz2C.js +0 -1733
- package/dist/MemberTransactions-BwT3zE2a.js +0 -38
- package/dist/Mission-BTAia7AS.js +0 -261
- package/dist/Promotion-0v3kvsK3.js +0 -247
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BkFm7tXq.js +0 -1753
- package/dist/Segment-BenLupqV.js +0 -437
- package/dist/Setting-0fpREqpJ.js +0 -1901
- package/dist/Store-BDGwe4ar.js +0 -1511
- package/dist/StoreRewards-TDZt9H1V.js +0 -401
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js +0 -890
- package/dist/Voucher-DsP_rh8I.js +0 -490
- package/dist/app-Cg2pTZJK.js +0 -53428
- package/dist/business-Cw_qGw8y.js +0 -78
- package/dist/dto-ozu1smC3.js +0 -2770
- package/dist/index-BLACZ3-L.js +0 -206
- package/dist/index-BaozRfWB.js +0 -762
- package/dist/index-CjVmULNd.js +0 -99
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DAEmawcj.js +0 -298
- package/dist/index-Oxr-mU6h.js +0 -29193
- package/dist/money-BGZPFtUc.js +0 -15
- package/dist/number-4J0xvXP9.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
- package/dist/vue-i18n-CCyiVzOE.js +0 -2365
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, ref as F, computed as j, onMounted as q, resolveComponent as g, openBlock as d, createBlock as b, unref as e, isRef as Y, withCtx as S, createElementVNode as s, createVNode as c, createElementBlock as O, createTextVNode as z, resolveDynamicComponent as M, toDisplayString as $, Fragment as D, createCommentVNode as U, h } from "vue";
|
|
2
|
-
import { _ as J } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { components as k } from "@feedmepos/ui-library";
|
|
4
|
-
import "./index-CZgQVRsm.js";
|
|
5
|
-
import { p as H, u as Q, f as B } from "./loading-DuEFUCwF.js";
|
|
6
|
-
import { C as Z, u as X } from "./membership-nsMtWeTC.js";
|
|
7
|
-
import { u as ee } from "./vue-i18n-CCyiVzOE.js";
|
|
8
|
-
import { F as te } from "./index-9w43_U1v.js";
|
|
9
|
-
import { c as oe } from "./object-qECH92oz.js";
|
|
10
|
-
import { u as K } from "./app-wDQR6dpb.js";
|
|
11
|
-
import { u as ae } from "./business-Cw_qGw8y.js";
|
|
12
|
-
import { useCoreStore as ne } from "@feedmepos/mf-common";
|
|
13
|
-
import { Z as v } from "./zod-Bg2FbC-D.js";
|
|
14
|
-
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js";
|
|
15
|
-
import { _ as re } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
16
|
-
import { _ as ie } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js";
|
|
17
|
-
import { _ as le, a as me } from "./EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js";
|
|
18
|
-
import { i as ce, t as de } from "./helper-B8RqcTNu.js";
|
|
19
|
-
import { useRouter as ue } from "vue-router";
|
|
20
|
-
import { m as N } from "./index-HZC9LLAX.js";
|
|
21
|
-
import { R as T } from "./app-DzAexOqx.js";
|
|
22
|
-
const pe = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "flex flex-col space-y-16 pr-12"
|
|
25
|
-
}, fe = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, ye = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, we = { class: "flex items-center gap-8" }, ge = /* @__PURE__ */ G({
|
|
26
|
-
__name: "EditRewardSheet",
|
|
27
|
-
emits: ["update"],
|
|
28
|
-
setup(W, { expose: n, emit: P }) {
|
|
29
|
-
const p = P, I = ae(), V = ne(), f = F(!1), a = F(), _ = F(), i = te, l = j(
|
|
30
|
-
() => {
|
|
31
|
-
var r;
|
|
32
|
-
return Z[((r = a.value) == null ? void 0 : r.type) || "VOUCHER"];
|
|
33
|
-
}
|
|
34
|
-
), A = j(() => {
|
|
35
|
-
const r = i.safeParse(a.value);
|
|
36
|
-
return r.success ? [] : r.error.errors;
|
|
37
|
-
});
|
|
38
|
-
function L() {
|
|
39
|
-
const r = i.safeParse(a.value);
|
|
40
|
-
r.success && p("update", r.data);
|
|
41
|
-
}
|
|
42
|
-
function x(r, t, o = {
|
|
43
|
-
isStoreReward: !1,
|
|
44
|
-
type: "VOUCHER"
|
|
45
|
-
}) {
|
|
46
|
-
f.value = r, r && (_.value = void 0, a.value = t || ce(o.type, {
|
|
47
|
-
business: V.currentBusiness.value._id,
|
|
48
|
-
noCampaign: o.isStoreReward == !0
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
return q(async () => {
|
|
52
|
-
await I.readLocations();
|
|
53
|
-
}), n({
|
|
54
|
-
showSheet: x,
|
|
55
|
-
data: a,
|
|
56
|
-
rewardImage: _
|
|
57
|
-
}), (r, t) => {
|
|
58
|
-
const o = g("FmTextarea"), y = g("FmHelperText"), u = g("FmButton"), C = g("FmSideSheet");
|
|
59
|
-
return d(), b(C, {
|
|
60
|
-
"max-width": 560,
|
|
61
|
-
modelValue: e(f),
|
|
62
|
-
"onUpdate:modelValue": t[7] || (t[7] = (R) => Y(f) ? f.value = R : null),
|
|
63
|
-
header: "Store setting"
|
|
64
|
-
}, {
|
|
65
|
-
"side-sheet-footer": S(() => [
|
|
66
|
-
s("div", we, [
|
|
67
|
-
c(u, {
|
|
68
|
-
label: "Submit",
|
|
69
|
-
onClick: L,
|
|
70
|
-
disabled: e(A).length > 0 || e(K)().isLoading,
|
|
71
|
-
loading: e(K)().isLoading
|
|
72
|
-
}, null, 8, ["disabled", "loading"]),
|
|
73
|
-
c(u, {
|
|
74
|
-
label: "Cancel",
|
|
75
|
-
onClick: t[6] || (t[6] = (R) => x(!1)),
|
|
76
|
-
variant: "tertiary"
|
|
77
|
-
})
|
|
78
|
-
])
|
|
79
|
-
]),
|
|
80
|
-
default: S(() => {
|
|
81
|
-
var R, E, w;
|
|
82
|
-
return [
|
|
83
|
-
e(a) ? (d(), O("div", pe, [
|
|
84
|
-
s("div", fe, [
|
|
85
|
-
t[8] || (t[8] = z(" Reward information ")),
|
|
86
|
-
(d(), b(M(e(l).chip())))
|
|
87
|
-
]),
|
|
88
|
-
c(se, {
|
|
89
|
-
modelValue: e(a).name,
|
|
90
|
-
"onUpdate:modelValue": t[0] || (t[0] = (m) => e(a).name = m),
|
|
91
|
-
label: `${e(l).name} name`,
|
|
92
|
-
schema: e(v).typeAtPath(e(i), "name", [e(a).type])
|
|
93
|
-
}, null, 8, ["modelValue", "label", "schema"]),
|
|
94
|
-
c(o, {
|
|
95
|
-
class: "!mb-[-16px]",
|
|
96
|
-
modelValue: e(a).description,
|
|
97
|
-
"onUpdate:modelValue": t[1] || (t[1] = (m) => e(a).description = m),
|
|
98
|
-
rules: [e(v).ruleAtPath(e(i), "description", [e(a).type])]
|
|
99
|
-
}, {
|
|
100
|
-
label: S(() => [
|
|
101
|
-
(d(), b(M(
|
|
102
|
-
e(v).toInputLabel(
|
|
103
|
-
e(v).typeAtPath(e(i), "description", [e(a).type]),
|
|
104
|
-
`${e(l).name} description`
|
|
105
|
-
)
|
|
106
|
-
)))
|
|
107
|
-
]),
|
|
108
|
-
_: 1
|
|
109
|
-
}, 8, ["modelValue", "rules"]),
|
|
110
|
-
s("div", ye, [
|
|
111
|
-
s("div", null, $(e(l).name) + " description should not exceed 200 characters. ", 1),
|
|
112
|
-
s("div", null, $(((R = e(a).description) == null ? void 0 : R.length) ?? 0) + "/200", 1)
|
|
113
|
-
]),
|
|
114
|
-
c(re, {
|
|
115
|
-
class: "w-1/2 xs:w-2/3",
|
|
116
|
-
"aspect-ratio": "16/9",
|
|
117
|
-
file: e(_) ?? void 0,
|
|
118
|
-
thumbnail: e(a).image ?? void 0,
|
|
119
|
-
"onUpdate:file": t[2] || (t[2] = async (m) => {
|
|
120
|
-
_.value = m, m || (e(a).image = null);
|
|
121
|
-
})
|
|
122
|
-
}, {
|
|
123
|
-
label: S(() => [
|
|
124
|
-
(d(), b(M(
|
|
125
|
-
e(v).toInputLabel(
|
|
126
|
-
e(v).typeAtPath(e(i), "image", [e(a).type]),
|
|
127
|
-
`${e(l).name} image`
|
|
128
|
-
)
|
|
129
|
-
)))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}, 8, ["file", "thumbnail"]),
|
|
133
|
-
e(a).type === "VOUCHER" ? (d(), O(D, { key: 0 }, [
|
|
134
|
-
t[9] || (t[9] = s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
|
|
135
|
-
c(le, {
|
|
136
|
-
"model-value": e(a).extras.effect,
|
|
137
|
-
"onUpdate:modelValue": t[3] || (t[3] = (m) => {
|
|
138
|
-
e(a).extras.effect = m;
|
|
139
|
-
})
|
|
140
|
-
}, null, 8, ["model-value"]),
|
|
141
|
-
e(a).extras.effect == null ? (d(), b(y, {
|
|
142
|
-
key: 0,
|
|
143
|
-
class: "!mt-8",
|
|
144
|
-
text: "Effect is required",
|
|
145
|
-
state: "error"
|
|
146
|
-
})) : U("", !0),
|
|
147
|
-
t[10] || (t[10] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1)),
|
|
148
|
-
c(me, {
|
|
149
|
-
"model-value": e(a).options,
|
|
150
|
-
"no-campaign": e(a).noCampaign,
|
|
151
|
-
"onUpdate:modelValue": t[4] || (t[4] = (m) => e(a).options = m),
|
|
152
|
-
schema: e(v).typeAtPath(e(i), "options", ["VOUCHER"])
|
|
153
|
-
}, null, 8, ["model-value", "no-campaign", "schema"])
|
|
154
|
-
], 64)) : U("", !0),
|
|
155
|
-
t[11] || (t[11] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
|
|
156
|
-
e(a).type === "VOUCHER" ? (d(), b(ie, {
|
|
157
|
-
key: 1,
|
|
158
|
-
"model-value": ((w = (E = e(a).extras) == null ? void 0 : E.targetLocation) == null ? void 0 : w.map(String)) ?? null,
|
|
159
|
-
type: "select",
|
|
160
|
-
"onUpdate:modelValue": t[5] || (t[5] = (m) => {
|
|
161
|
-
e(a).extras.targetLocation = m;
|
|
162
|
-
}),
|
|
163
|
-
rules: [
|
|
164
|
-
e(v).ruleAtPath(e(i), "extras.targetLocation", ["VOUCHER"])
|
|
165
|
-
]
|
|
166
|
-
}, null, 8, ["model-value", "rules"])) : U("", !0)
|
|
167
|
-
])) : U("", !0)
|
|
168
|
-
];
|
|
169
|
-
}),
|
|
170
|
-
_: 1
|
|
171
|
-
}, 8, ["modelValue"]);
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
}), ve = { class: "px-24 flex flex-col gap-y-16" }, Re = { class: "flex items-center justify-between w-full" }, be = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ G({
|
|
175
|
-
__name: "StoreRewards",
|
|
176
|
-
setup(W) {
|
|
177
|
-
const { t: n } = ee(), P = {
|
|
178
|
-
label: n("connect.storeRewards.create"),
|
|
179
|
-
value: "create",
|
|
180
|
-
isPrimary: !0,
|
|
181
|
-
prependIcon: "add"
|
|
182
|
-
}, p = X(), { global: I, minor: V } = Q, f = ue(), a = F({
|
|
183
|
-
searchKey: "",
|
|
184
|
-
columnFilters: []
|
|
185
|
-
}), _ = [
|
|
186
|
-
{
|
|
187
|
-
header: n("connect.storeRewards.table.name"),
|
|
188
|
-
accessorFn: (t) => t.name
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
id: "type",
|
|
192
|
-
header: n("connect.storeRewards.table.type"),
|
|
193
|
-
accessorFn: (t) => t.type,
|
|
194
|
-
cell(t) {
|
|
195
|
-
return Z[t.row.original.type].chip();
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
header: n("connect.storeRewards.table.validity"),
|
|
200
|
-
accessorFn: (t) => de(
|
|
201
|
-
"validityOption" in t.options ? t.options.validityOption || {} : {}
|
|
202
|
-
)
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
header: n("connect.storeRewards.table.used"),
|
|
206
|
-
meta: {
|
|
207
|
-
textAlign: "left"
|
|
208
|
-
},
|
|
209
|
-
accessorFn: (t) => t.currentReceive ?? 0
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
header: n("connect.storeRewards.table.actions"),
|
|
213
|
-
cell(t) {
|
|
214
|
-
return h("div", { class: "flex items-center justify-end gap-4" }, [
|
|
215
|
-
h(
|
|
216
|
-
k.FmMenu,
|
|
217
|
-
{
|
|
218
|
-
placement: "bottom-end",
|
|
219
|
-
onClick: (o) => {
|
|
220
|
-
o.stopPropagation();
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"menu-button": () => h(k.FmButton, {
|
|
225
|
-
icon: "more_vert",
|
|
226
|
-
iconColor: "neutral-gray-400",
|
|
227
|
-
variant: "tertiary"
|
|
228
|
-
}),
|
|
229
|
-
default: () => [
|
|
230
|
-
h(k.FmMenuItem, {
|
|
231
|
-
label: "View collections",
|
|
232
|
-
onClick: async (o) => {
|
|
233
|
-
o.stopPropagation(), A(t.row.original._id);
|
|
234
|
-
}
|
|
235
|
-
}),
|
|
236
|
-
// h(components.FmMenuItem, {
|
|
237
|
-
// label: 'View transactions',
|
|
238
|
-
// onClick: async (event: Event) => {
|
|
239
|
-
// event.stopPropagation();
|
|
240
|
-
// onViewTransactions(props.row.original._id as string);
|
|
241
|
-
// },
|
|
242
|
-
// }),
|
|
243
|
-
h(
|
|
244
|
-
k.FmMenuItem,
|
|
245
|
-
{
|
|
246
|
-
onClick: async (o) => {
|
|
247
|
-
o.stopPropagation(), L(t.row.original);
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
label: h(
|
|
252
|
-
"div",
|
|
253
|
-
{
|
|
254
|
-
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
255
|
-
},
|
|
256
|
-
"Remove"
|
|
257
|
-
)
|
|
258
|
-
}
|
|
259
|
-
)
|
|
260
|
-
]
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
]);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
], i = j(
|
|
267
|
-
() => p.bundleRewards.filter((t) => t.type == "VOUCHER")
|
|
268
|
-
), l = F();
|
|
269
|
-
function A(t) {
|
|
270
|
-
f.push({
|
|
271
|
-
name: T["$connect-STORE_REWARD_COLLECTIONS"],
|
|
272
|
-
params: { id: t }
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
async function L(t) {
|
|
276
|
-
if (t.type === "TITLE") {
|
|
277
|
-
await H.confirm(
|
|
278
|
-
n("connect.storeRewards.remove.message"),
|
|
279
|
-
n("connect.storeRewards.remove.title"),
|
|
280
|
-
n("connect.storeRewards.remove.action")
|
|
281
|
-
) && await f.push({ name: T["$connect-PROGRAM_TITLE"] });
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
await H.remove(
|
|
285
|
-
n("connect.storeRewards.delete.confirm"),
|
|
286
|
-
n("connect.storeRewards.delete.title")
|
|
287
|
-
) && await V(
|
|
288
|
-
async () => {
|
|
289
|
-
await N.deleteReward(t._id), await p.readMembership(), await p.readRewards();
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
message: n("connect.storeRewards.delete.message"),
|
|
293
|
-
successMessage: n("connect.storeRewards.delete.success")
|
|
294
|
-
}
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
async function x(t) {
|
|
298
|
-
var y;
|
|
299
|
-
const o = t ? oe(p.bundleRewards.find((u) => u._id === t)) : void 0;
|
|
300
|
-
if ((o == null ? void 0 : o.type) === "TITLE") {
|
|
301
|
-
await H.confirm(
|
|
302
|
-
"You cannot edit a title here, please edit it at the Program > Title section.",
|
|
303
|
-
"Update reward",
|
|
304
|
-
"Go to title section"
|
|
305
|
-
) && await f.push({ name: T["$connect-PROGRAM_TITLE"] });
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
(y = l.value) == null || y.showSheet(!0, o, {
|
|
309
|
-
isStoreReward: !0,
|
|
310
|
-
type: "VOUCHER"
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
async function r(t) {
|
|
314
|
-
await V(
|
|
315
|
-
async () => {
|
|
316
|
-
var o, y, u, C;
|
|
317
|
-
(o = l.value) != null && o.rewardImage && t.image ? await B.delete(t.image) : (y = l.value) != null && y.rewardImage && (t.image = await B.update(
|
|
318
|
-
t.image || B.collectibleImagePath(
|
|
319
|
-
void 0,
|
|
320
|
-
l.value.rewardImage
|
|
321
|
-
),
|
|
322
|
-
(u = l.value) == null ? void 0 : u.rewardImage
|
|
323
|
-
)), t._id ? await N.updateReward(t._id, t) : await N.createReward(t), await p.readRewards(), (C = l.value) == null || C.showSheet(!1);
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
message: "Updating reward",
|
|
327
|
-
successMessage: "Reward updated successfully"
|
|
328
|
-
}
|
|
329
|
-
);
|
|
330
|
-
}
|
|
331
|
-
return q(async () => {
|
|
332
|
-
await I(async () => {
|
|
333
|
-
await p.readMembership(), await p.readRewards();
|
|
334
|
-
});
|
|
335
|
-
}), (t, o) => {
|
|
336
|
-
const y = g("FmPageHead"), u = g("FmSearch"), C = g("FmTable"), R = g("FmButton"), E = g("FmCard");
|
|
337
|
-
return d(), O(D, null, [
|
|
338
|
-
c(y, {
|
|
339
|
-
title: e(n)("connect.storeRewards.title"),
|
|
340
|
-
description: e(n)("connect.storeRewards.description"),
|
|
341
|
-
actions: [P],
|
|
342
|
-
"back-button": !0,
|
|
343
|
-
"onClick:action": o[0] || (o[0] = () => x()),
|
|
344
|
-
"onClick:back": o[1] || (o[1] = () => e(f).push({ name: e(T)["$connect-STORE"] }))
|
|
345
|
-
}, null, 8, ["title", "description", "actions"]),
|
|
346
|
-
s("div", ve, [
|
|
347
|
-
e(i) && e(i).length > 0 ? (d(), O(D, { key: 0 }, [
|
|
348
|
-
s("div", Re, [
|
|
349
|
-
o[6] || (o[6] = s("div", { class: "flex gap-8" }, null, -1)),
|
|
350
|
-
c(u, {
|
|
351
|
-
modelValue: e(a).searchKey,
|
|
352
|
-
"onUpdate:modelValue": o[2] || (o[2] = (w) => e(a).searchKey = w),
|
|
353
|
-
class: "",
|
|
354
|
-
placeholder: "search",
|
|
355
|
-
collapsible: ""
|
|
356
|
-
}, null, 8, ["modelValue"])
|
|
357
|
-
]),
|
|
358
|
-
c(C, {
|
|
359
|
-
"row-data": e(i),
|
|
360
|
-
"column-defs": _,
|
|
361
|
-
"search-value": e(a).searchKey,
|
|
362
|
-
"column-filter": e(a).columnFilters,
|
|
363
|
-
onRowClick: o[3] || (o[3] = (w) => x(w.original._id)),
|
|
364
|
-
"hide-footer": e(i).length < 10
|
|
365
|
-
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
366
|
-
], 64)) : (d(), b(E, {
|
|
367
|
-
key: 1,
|
|
368
|
-
variant: "outlined",
|
|
369
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
370
|
-
}, {
|
|
371
|
-
default: S(() => [
|
|
372
|
-
o[7] || (o[7] = s("img", {
|
|
373
|
-
src: J,
|
|
374
|
-
class: "aspect-square w-[150px]"
|
|
375
|
-
}, null, -1)),
|
|
376
|
-
s("div", be, [
|
|
377
|
-
s("div", _e, $(e(n)("connect.storeRewards.empty.title")), 1),
|
|
378
|
-
s("div", xe, $(e(n)("connect.storeRewards.empty.description")), 1)
|
|
379
|
-
]),
|
|
380
|
-
c(R, {
|
|
381
|
-
variant: "primary",
|
|
382
|
-
label: e(n)("connect.storeRewards.empty.action"),
|
|
383
|
-
onClick: o[4] || (o[4] = (w) => x()),
|
|
384
|
-
icon: "add"
|
|
385
|
-
}, null, 8, ["label"])
|
|
386
|
-
]),
|
|
387
|
-
_: 1
|
|
388
|
-
})),
|
|
389
|
-
c(ge, {
|
|
390
|
-
ref_key: "rewardSheetRef",
|
|
391
|
-
ref: l,
|
|
392
|
-
onUpdate: o[5] || (o[5] = (w) => r(w))
|
|
393
|
-
}, null, 512)
|
|
394
|
-
])
|
|
395
|
-
], 64);
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
export {
|
|
400
|
-
Ke as default
|
|
401
|
-
};
|