@feedmepos/mf-connect 0.1.20-prod → 0.1.22-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-DaYL4IwZ.js → Analytic-CWvtQiXv.js} +10 -10
- package/dist/{App-CnRrmva6.js → App-BqAI4Hkg.js} +7 -7
- package/dist/{Bin-Bf8yL56G.js → Bin-BJRETFYp.js} +7 -7
- package/dist/{Broadcast-CyqZZRc1.js → Broadcast-BVNKXpst.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBAGO9mc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BeauGnZ8.js} +6 -6
- package/dist/{Card-BHOw7yjA.js → Card-BH5HR_Xt.js} +14 -14
- package/dist/{Collections-DQYk52tc.js → Collections-DUzS8_tu.js} +5 -5
- package/dist/{Credit-BVD4wCLN.js → Credit-DVyhB8Fx.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-EdpoxZlh.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BzSJIIBN.js} +28 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-1tSUOxmX.js → EffectSheet.vue_vue_type_style_index_0_lang-CtgRejaJ.js} +45 -45
- package/dist/{Experience-BKTJKeqW.js → Experience-Uz-PdyS0.js} +8 -8
- package/dist/{Game-DDnwUySW.js → Game-yRSag2UH.js} +8 -8
- package/dist/{Index-Cf6d9PW1.js → Index-D54c-_3K.js} +9 -9
- package/dist/{MainLayout-DpZC6o3R.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +19 -53
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/{Marketing-Dm2ECeZM.js → Marketing-wYfRoaP3.js} +12 -12
- package/dist/{Member-Bjx7KU3k.js → Member-BeX0-b7n.js} +4 -4
- package/dist/{MemberList-BEiuLggu.js → MemberList-B2dwBE3o.js} +23 -23
- package/dist/{MemberTransactions-C3YdUquh.js → MemberTransactions-jhOw4vzq.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-B8b8FbZX.js +447 -0
- package/dist/{Mission-CZ-jJd14.js → Mission-DzBDmz68.js} +8 -8
- package/dist/{Overview-CgbAmJNJ.js → Overview-DZ1-IMkf.js} +16 -16
- package/dist/{Point-Bt3nTcqr.js → Point-aP-KiJV2.js} +8 -8
- package/dist/{Promotion-DnMvO6sH.js → Promotion-NYlrI4Ur.js} +9 -9
- package/dist/{Record-DGSd8OoA.js → Record-C3FG6v0j.js} +6 -6
- package/dist/{Reward-DjSvoVKB.js → Reward-BkgfktZX.js} +14 -14
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CD5NQYu7.js → RewardGroup.vue_vue_type_script_setup_true_lang-CBkgYcan.js} +10 -10
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DL9sCsHT.js → RuleGroup.vue_vue_type_script_setup_true_lang-DgTRcfYy.js} +181 -178
- package/dist/{Segment-CwyALcvm.js → Segment-BdCYCRF-.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BpM7WgFp.js → SelectItems.vue_vue_type_script_setup_true_lang-DIWVzxxW.js} +2 -2
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Bwa2RvTx.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BBXjK-Kc.js} +3 -3
- package/dist/Setting-CklTyVlf.js +1930 -0
- package/dist/{Store-BTejxCBe.js → Store-Ciud1AgX.js} +145 -143
- package/dist/StoreRewards-DUrZvdAy.js +422 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B-z5tu9A.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DabfW0cB.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CpIVuHaf.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C4g0D2WQ.js} +1 -1
- package/dist/{Tier-njMn6MiO.js → Tier-BcJfsKXP.js} +19 -19
- package/dist/{Title-Db8js_gS.js → Title-rtBtv9oZ.js} +100 -100
- package/dist/{Transaction-D9TjDeKD.js → Transaction-6fAgm3SK.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Bod8YjzJ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bjvkwpb4.js} +6 -6
- package/dist/{Voucher--yr4TQ-G.js → Voucher-DsSs5cTE.js} +34 -34
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CeL94a07.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CrSH0qWc.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BCc_w9J8.js → ZodTextField.vue_vue_type_script_setup_true_lang-DxDO6zJg.js} +1 -1
- package/dist/{app-BqAFUCz8.js → app-Cz0McG8i.js} +40 -40
- package/dist/{app-Ugrk96Pp.js → app-fPygt_FG.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-CTwB-cPM.js → business-wZVszwRW.js} +1 -1
- package/dist/{campaign-DwL2D9J5.js → campaign-B-WMI4r4.js} +9 -9
- package/dist/{campaign-CKZMkxH5.js → campaign-CXOSMRjR.js} +2 -2
- package/dist/{campaign.enum-uKI06HHx.js → campaign.enum-xd3odOwZ.js} +1 -1
- package/dist/{campaign.fn-Dp8mlrpN.js → campaign.fn-CeIsYBHA.js} +41 -41
- package/dist/{collectible.enum-Bw421zWp.js → collectible.enum-B7uqKLHE.js} +1 -1
- package/dist/{collection.fn-D2zmqc53.js → collection.fn-Cj3PpbiS.js} +2 -2
- package/dist/{dto-FP61IJwc.js → dto-CVyFNO4G.js} +7 -7
- package/dist/{effect-BE4EnD4B.js → effect-D8WiNma1.js} +35 -18
- package/dist/{email-addresses-D8_sMdak.js → email-addresses-CZGh6TJT.js} +1 -1
- package/dist/{export-kgzxrVkq.js → export-B-yEeKMb.js} +3 -3
- package/dist/{helper-BI6pWRqN.js → helper-rlgqVAdj.js} +1 -1
- package/dist/{index-DTbigOhK.js → index-BC2la2BP.js} +1 -1
- package/dist/{index-COe4sMRZ.js → index-BSWItpEw.js} +1 -1
- package/dist/{index-sLN88aCQ.js → index-BYP79OMe.js} +225 -218
- package/dist/{index-DcBjYW9W.js → index-C73nKr6T.js} +1 -1
- package/dist/{index-BUXc2Nw5.js → index-C9Eegvas.js} +1 -1
- package/dist/{index-BpBt6Y8F.js → index-CH0xVjYG.js} +1 -1
- package/dist/{index-DoHEyLZn.js → index-CgA8VVym.js} +3 -3
- package/dist/{index-aOnN-LXC.js → index-Cr8x5i6a.js} +12 -5
- package/dist/{index-DLIjZTu7.js → index-DENLOr_f.js} +21 -16
- package/dist/index-DVko1T2G.js +29556 -0
- package/dist/{index-Cga6gx-T.js → index-szngpT22.js} +1 -1
- package/dist/{index-fCUvdTQu.js → index-yzjCyahZ.js} +91 -73
- package/dist/{index.esm2017-CWKGaTMR.js → index.esm2017-B852lCgd.js} +38 -38
- package/dist/{loading-GiUoU2Fa.js → loading-YQhP-YKE.js} +4 -4
- package/dist/{membership-Bt_7SvV0.js → membership-C6EfMXD7.js} +3 -3
- package/dist/{money-BZq33xlW.js → money-CSas0WMX.js} +1 -1
- package/dist/{number-DFHYy76W.js → number-DBcS6xgD.js} +1 -1
- package/dist/objectid-VFD2vEs_.js +145 -0
- package/dist/{reward-Dy_FLF01.js → reward-BIMasAXq.js} +1 -1
- package/dist/{rule-zl6tGcQA.js → rule-BRALPXUn.js} +8 -4
- package/dist/{rule-builder-BpZ5uHIv.js → rule-builder-CBcoUD6U.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-BKEUsA_B.js → template-GsgcvRB8.js} +4 -4
- package/dist/{trigger-ChT3kWh_.js → trigger-B8pRScE6.js} +4 -4
- package/dist/{usePagination-DWyHwAZT.js → usePagination-BtU3EXqo.js} +1 -1
- package/dist/{user-CX5C_btL.js → user-CBmfFwbE.js} +1 -1
- package/dist/{vue-i18n--AFmNvm8.js → vue-i18n-C5G5eOJh.js} +327 -327
- package/package.json +2 -2
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-ChUeeW90.js +0 -215
- package/dist/Setting-CCxSOD98.js +0 -1877
- package/dist/StoreRewards-DrUIjbjC.js +0 -401
- package/dist/index-CaJmkfzc.js +0 -29000
- package/dist/objectid-C6apWPpH.js +0 -145
|
@@ -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 R, unref as e, isRef as Y, withCtx as S, createElementVNode as n, createVNode as m, createElementBlock as T, createTextVNode as z, resolveDynamicComponent as M, toDisplayString as O, Fragment as D, createCommentVNode as U, h as C } from "vue";
|
|
2
|
-
import { _ as J } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { components as $ } from "@feedmepos/ui-library";
|
|
4
|
-
import "./index-DTbigOhK.js";
|
|
5
|
-
import { p as H, u as Q, f as B } from "./loading-GiUoU2Fa.js";
|
|
6
|
-
import { C as Z, u as X } from "./membership-Bt_7SvV0.js";
|
|
7
|
-
import { u as ee } from "./vue-i18n--AFmNvm8.js";
|
|
8
|
-
import { F as te } from "./index-DLIjZTu7.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-CTwB-cPM.js";
|
|
12
|
-
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
13
|
-
import { Z as _ } from "./zod-Bg2FbC-D.js";
|
|
14
|
-
import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BCc_w9J8.js";
|
|
15
|
-
import { _ as re } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
16
|
-
import { _ as ie } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CpIVuHaf.js";
|
|
17
|
-
import { _ as le, a as ce } from "./EffectSheet.vue_vue_type_style_index_0_lang-1tSUOxmX.js";
|
|
18
|
-
import { i as me, t as de } from "./helper-BI6pWRqN.js";
|
|
19
|
-
import { useRouter as ue } from "vue-router";
|
|
20
|
-
import { m as N } from "./index-aOnN-LXC.js";
|
|
21
|
-
import { R as k } from "./app-BqAFUCz8.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 = /* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1), ge = /* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1), _e = /* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1), ve = { class: "flex items-center gap-8" }, Re = /* @__PURE__ */ G({
|
|
26
|
-
__name: "EditRewardSheet",
|
|
27
|
-
emits: ["update"],
|
|
28
|
-
setup(W, { expose: s, emit: P }) {
|
|
29
|
-
const p = P, I = ae(), V = se(), f = F(!1), o = F(), b = F(), i = te, l = j(
|
|
30
|
-
() => {
|
|
31
|
-
var r;
|
|
32
|
-
return Z[((r = o.value) == null ? void 0 : r.type) || "VOUCHER"];
|
|
33
|
-
}
|
|
34
|
-
), A = j(() => {
|
|
35
|
-
const r = i.safeParse(o.value);
|
|
36
|
-
return r.success ? [] : r.error.errors;
|
|
37
|
-
});
|
|
38
|
-
function L() {
|
|
39
|
-
const r = i.safeParse(o.value);
|
|
40
|
-
r.success && p("update", r.data);
|
|
41
|
-
}
|
|
42
|
-
function h(r, t, a = {
|
|
43
|
-
isStoreReward: !1,
|
|
44
|
-
type: "VOUCHER"
|
|
45
|
-
}) {
|
|
46
|
-
f.value = r, r && (b.value = void 0, o.value = t || me(a.type, {
|
|
47
|
-
business: V.currentBusiness.value._id,
|
|
48
|
-
noCampaign: a.isStoreReward == !0
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
return q(async () => {
|
|
52
|
-
await I.readLocations();
|
|
53
|
-
}), s({
|
|
54
|
-
showSheet: h,
|
|
55
|
-
data: o,
|
|
56
|
-
rewardImage: b
|
|
57
|
-
}), (r, t) => {
|
|
58
|
-
const a = g("FmTextarea"), y = g("FmHelperText"), u = g("FmButton"), x = g("FmSideSheet");
|
|
59
|
-
return d(), R(x, {
|
|
60
|
-
"max-width": 560,
|
|
61
|
-
modelValue: e(f),
|
|
62
|
-
"onUpdate:modelValue": t[7] || (t[7] = (v) => Y(f) ? f.value = v : null),
|
|
63
|
-
header: "Store setting"
|
|
64
|
-
}, {
|
|
65
|
-
"side-sheet-footer": S(() => [
|
|
66
|
-
n("div", ve, [
|
|
67
|
-
m(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
|
-
m(u, {
|
|
74
|
-
label: "Cancel",
|
|
75
|
-
onClick: t[6] || (t[6] = (v) => h(!1)),
|
|
76
|
-
variant: "tertiary"
|
|
77
|
-
})
|
|
78
|
-
])
|
|
79
|
-
]),
|
|
80
|
-
default: S(() => {
|
|
81
|
-
var v, E, w;
|
|
82
|
-
return [
|
|
83
|
-
e(o) ? (d(), T("div", pe, [
|
|
84
|
-
n("div", fe, [
|
|
85
|
-
z(" Reward information "),
|
|
86
|
-
(d(), R(M(e(l).chip())))
|
|
87
|
-
]),
|
|
88
|
-
m(ne, {
|
|
89
|
-
modelValue: e(o).name,
|
|
90
|
-
"onUpdate:modelValue": t[0] || (t[0] = (c) => e(o).name = c),
|
|
91
|
-
label: `${e(l).name} name`,
|
|
92
|
-
schema: e(_).typeAtPath(e(i), "name", [e(o).type])
|
|
93
|
-
}, null, 8, ["modelValue", "label", "schema"]),
|
|
94
|
-
m(a, {
|
|
95
|
-
class: "!mb-[-16px]",
|
|
96
|
-
modelValue: e(o).description,
|
|
97
|
-
"onUpdate:modelValue": t[1] || (t[1] = (c) => e(o).description = c),
|
|
98
|
-
rules: [e(_).ruleAtPath(e(i), "description", [e(o).type])]
|
|
99
|
-
}, {
|
|
100
|
-
label: S(() => [
|
|
101
|
-
(d(), R(M(
|
|
102
|
-
e(_).toInputLabel(
|
|
103
|
-
e(_).typeAtPath(e(i), "description", [e(o).type]),
|
|
104
|
-
`${e(l).name} description`
|
|
105
|
-
)
|
|
106
|
-
)))
|
|
107
|
-
]),
|
|
108
|
-
_: 1
|
|
109
|
-
}, 8, ["modelValue", "rules"]),
|
|
110
|
-
n("div", ye, [
|
|
111
|
-
n("div", null, O(e(l).name) + " description should not exceed 200 characters. ", 1),
|
|
112
|
-
n("div", null, O(((v = e(o).description) == null ? void 0 : v.length) ?? 0) + "/200", 1)
|
|
113
|
-
]),
|
|
114
|
-
m(re, {
|
|
115
|
-
class: "w-1/2 xs:w-2/3",
|
|
116
|
-
"aspect-ratio": "16/9",
|
|
117
|
-
file: e(b) ?? void 0,
|
|
118
|
-
thumbnail: e(o).image ?? void 0,
|
|
119
|
-
"onUpdate:file": t[2] || (t[2] = async (c) => {
|
|
120
|
-
b.value = c, c || (e(o).image = null);
|
|
121
|
-
})
|
|
122
|
-
}, {
|
|
123
|
-
label: S(() => [
|
|
124
|
-
(d(), R(M(
|
|
125
|
-
e(_).toInputLabel(
|
|
126
|
-
e(_).typeAtPath(e(i), "image", [e(o).type]),
|
|
127
|
-
`${e(l).name} image`
|
|
128
|
-
)
|
|
129
|
-
)))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}, 8, ["file", "thumbnail"]),
|
|
133
|
-
e(o).type === "VOUCHER" ? (d(), T(D, { key: 0 }, [
|
|
134
|
-
we,
|
|
135
|
-
m(le, {
|
|
136
|
-
"model-value": e(o).extras.effect,
|
|
137
|
-
"onUpdate:modelValue": t[3] || (t[3] = (c) => {
|
|
138
|
-
e(o).extras.effect = c;
|
|
139
|
-
})
|
|
140
|
-
}, null, 8, ["model-value"]),
|
|
141
|
-
e(o).extras.effect == null ? (d(), R(y, {
|
|
142
|
-
key: 0,
|
|
143
|
-
class: "!mt-8",
|
|
144
|
-
text: "Effect is required",
|
|
145
|
-
state: "error"
|
|
146
|
-
})) : U("", !0),
|
|
147
|
-
ge,
|
|
148
|
-
m(ce, {
|
|
149
|
-
"model-value": e(o).options,
|
|
150
|
-
"no-campaign": e(o).noCampaign,
|
|
151
|
-
"onUpdate:modelValue": t[4] || (t[4] = (c) => e(o).options = c),
|
|
152
|
-
schema: e(_).typeAtPath(e(i), "options", ["VOUCHER"])
|
|
153
|
-
}, null, 8, ["model-value", "no-campaign", "schema"])
|
|
154
|
-
], 64)) : U("", !0),
|
|
155
|
-
_e,
|
|
156
|
-
e(o).type === "VOUCHER" ? (d(), R(ie, {
|
|
157
|
-
key: 1,
|
|
158
|
-
"model-value": ((w = (E = e(o).extras) == null ? void 0 : E.targetLocation) == null ? void 0 : w.map(String)) ?? null,
|
|
159
|
-
type: "select",
|
|
160
|
-
"onUpdate:modelValue": t[5] || (t[5] = (c) => {
|
|
161
|
-
e(o).extras.targetLocation = c;
|
|
162
|
-
}),
|
|
163
|
-
rules: [
|
|
164
|
-
e(_).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
|
-
}), be = { class: "px-24 flex flex-col gap-y-16" }, he = { class: "flex items-center justify-between w-full" }, xe = /* @__PURE__ */ n("div", { class: "flex gap-8" }, null, -1), Ce = /* @__PURE__ */ n("img", {
|
|
175
|
-
src: J,
|
|
176
|
-
class: "aspect-square w-[150px]"
|
|
177
|
-
}, null, -1), Se = { class: "flex flex-col gap-16 text-center" }, Fe = { class: "fm-typo-en-title-sm-800" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ye = /* @__PURE__ */ G({
|
|
178
|
-
__name: "StoreRewards",
|
|
179
|
-
setup(W) {
|
|
180
|
-
const { t: s } = ee(), P = {
|
|
181
|
-
label: s("connect.storeRewards.create"),
|
|
182
|
-
value: "create",
|
|
183
|
-
isPrimary: !0,
|
|
184
|
-
prependIcon: "add"
|
|
185
|
-
}, p = X(), { global: I, minor: V } = Q, f = ue(), o = F({
|
|
186
|
-
searchKey: "",
|
|
187
|
-
columnFilters: []
|
|
188
|
-
}), b = [
|
|
189
|
-
{
|
|
190
|
-
header: s("connect.storeRewards.table.name"),
|
|
191
|
-
accessorFn: (t) => t.name
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
id: "type",
|
|
195
|
-
header: s("connect.storeRewards.table.type"),
|
|
196
|
-
accessorFn: (t) => t.type,
|
|
197
|
-
cell(t) {
|
|
198
|
-
return Z[t.row.original.type].chip();
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
header: s("connect.storeRewards.table.validity"),
|
|
203
|
-
accessorFn: (t) => de(
|
|
204
|
-
"validityOption" in t.options ? t.options.validityOption || {} : {}
|
|
205
|
-
)
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
header: s("connect.storeRewards.table.used"),
|
|
209
|
-
meta: {
|
|
210
|
-
textAlign: "left"
|
|
211
|
-
},
|
|
212
|
-
accessorFn: (t) => t.currentReceive ?? 0
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
header: s("connect.storeRewards.table.actions"),
|
|
216
|
-
cell(t) {
|
|
217
|
-
return C("div", { class: "flex items-center justify-end gap-4" }, [
|
|
218
|
-
C(
|
|
219
|
-
$.FmMenu,
|
|
220
|
-
{
|
|
221
|
-
placement: "bottom-end",
|
|
222
|
-
onClick: (a) => {
|
|
223
|
-
a.stopPropagation();
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"menu-button": () => C($.FmButton, {
|
|
228
|
-
icon: "more_vert",
|
|
229
|
-
iconColor: "neutral-gray-400",
|
|
230
|
-
variant: "tertiary"
|
|
231
|
-
}),
|
|
232
|
-
default: () => [
|
|
233
|
-
C($.FmMenuItem, {
|
|
234
|
-
label: "View collections",
|
|
235
|
-
onClick: async (a) => {
|
|
236
|
-
a.stopPropagation(), A(t.row.original._id);
|
|
237
|
-
}
|
|
238
|
-
}),
|
|
239
|
-
// h(components.FmMenuItem, {
|
|
240
|
-
// label: 'View transactions',
|
|
241
|
-
// onClick: async (event: Event) => {
|
|
242
|
-
// event.stopPropagation();
|
|
243
|
-
// onViewTransactions(props.row.original._id as string);
|
|
244
|
-
// },
|
|
245
|
-
// }),
|
|
246
|
-
C(
|
|
247
|
-
$.FmMenuItem,
|
|
248
|
-
{
|
|
249
|
-
onClick: async (a) => {
|
|
250
|
-
a.stopPropagation(), L(t.row.original);
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
label: C(
|
|
255
|
-
"div",
|
|
256
|
-
{
|
|
257
|
-
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
258
|
-
},
|
|
259
|
-
"Remove"
|
|
260
|
-
)
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
]);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
], i = j(
|
|
270
|
-
() => p.bundleRewards.filter((t) => t.type == "VOUCHER")
|
|
271
|
-
), l = F();
|
|
272
|
-
function A(t) {
|
|
273
|
-
f.push({
|
|
274
|
-
name: k["$connect-STORE_REWARD_COLLECTIONS"],
|
|
275
|
-
params: { id: t }
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
async function L(t) {
|
|
279
|
-
if (t.type === "TITLE") {
|
|
280
|
-
await H.confirm(
|
|
281
|
-
s("connect.storeRewards.remove.message"),
|
|
282
|
-
s("connect.storeRewards.remove.title"),
|
|
283
|
-
s("connect.storeRewards.remove.action")
|
|
284
|
-
) && await f.push({ name: k["$connect-PROGRAM_TITLE"] });
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
await H.remove(
|
|
288
|
-
s("connect.storeRewards.delete.confirm"),
|
|
289
|
-
s("connect.storeRewards.delete.title")
|
|
290
|
-
) && await V(
|
|
291
|
-
async () => {
|
|
292
|
-
await N.deleteReward(t._id), await p.readMembership(), await p.readRewards();
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
message: s("connect.storeRewards.delete.message"),
|
|
296
|
-
successMessage: s("connect.storeRewards.delete.success")
|
|
297
|
-
}
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
async function h(t) {
|
|
301
|
-
var y;
|
|
302
|
-
const a = t ? oe(p.bundleRewards.find((u) => u._id === t)) : void 0;
|
|
303
|
-
if ((a == null ? void 0 : a.type) === "TITLE") {
|
|
304
|
-
await H.confirm(
|
|
305
|
-
"You cannot edit a title here, please edit it at the Program > Title section.",
|
|
306
|
-
"Update reward",
|
|
307
|
-
"Go to title section"
|
|
308
|
-
) && await f.push({ name: k["$connect-PROGRAM_TITLE"] });
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
(y = l.value) == null || y.showSheet(!0, a, {
|
|
312
|
-
isStoreReward: !0,
|
|
313
|
-
type: "VOUCHER"
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
async function r(t) {
|
|
317
|
-
await V(
|
|
318
|
-
async () => {
|
|
319
|
-
var a, y, u, x;
|
|
320
|
-
(a = l.value) != null && a.rewardImage && t.image ? await B.delete(t.image) : (y = l.value) != null && y.rewardImage && (t.image = await B.update(
|
|
321
|
-
t.image || B.collectibleImagePath(
|
|
322
|
-
void 0,
|
|
323
|
-
l.value.rewardImage
|
|
324
|
-
),
|
|
325
|
-
(u = l.value) == null ? void 0 : u.rewardImage
|
|
326
|
-
)), t._id ? await N.updateReward(t._id, t) : await N.createReward(t), await p.readRewards(), (x = l.value) == null || x.showSheet(!1);
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
message: "Updating reward",
|
|
330
|
-
successMessage: "Reward updated successfully"
|
|
331
|
-
}
|
|
332
|
-
);
|
|
333
|
-
}
|
|
334
|
-
return q(async () => {
|
|
335
|
-
await I(async () => {
|
|
336
|
-
await p.readMembership(), await p.readRewards();
|
|
337
|
-
});
|
|
338
|
-
}), (t, a) => {
|
|
339
|
-
const y = g("FmPageHead"), u = g("FmSearch"), x = g("FmTable"), v = g("FmButton"), E = g("FmCard");
|
|
340
|
-
return d(), T(D, null, [
|
|
341
|
-
m(y, {
|
|
342
|
-
title: e(s)("connect.storeRewards.title"),
|
|
343
|
-
description: e(s)("connect.storeRewards.description"),
|
|
344
|
-
actions: [P],
|
|
345
|
-
"back-button": !0,
|
|
346
|
-
"onClick:action": a[0] || (a[0] = () => h()),
|
|
347
|
-
"onClick:back": a[1] || (a[1] = () => e(f).push({ name: e(k)["$connect-STORE"] }))
|
|
348
|
-
}, null, 8, ["title", "description", "actions"]),
|
|
349
|
-
n("div", be, [
|
|
350
|
-
e(i) && e(i).length > 0 ? (d(), T(D, { key: 0 }, [
|
|
351
|
-
n("div", he, [
|
|
352
|
-
xe,
|
|
353
|
-
m(u, {
|
|
354
|
-
modelValue: e(o).searchKey,
|
|
355
|
-
"onUpdate:modelValue": a[2] || (a[2] = (w) => e(o).searchKey = w),
|
|
356
|
-
class: "",
|
|
357
|
-
placeholder: "search",
|
|
358
|
-
collapsible: ""
|
|
359
|
-
}, null, 8, ["modelValue"])
|
|
360
|
-
]),
|
|
361
|
-
m(x, {
|
|
362
|
-
"row-data": e(i),
|
|
363
|
-
"column-defs": b,
|
|
364
|
-
"search-value": e(o).searchKey,
|
|
365
|
-
"column-filter": e(o).columnFilters,
|
|
366
|
-
onRowClick: a[3] || (a[3] = (w) => h(w.original._id)),
|
|
367
|
-
"hide-footer": e(i).length < 10
|
|
368
|
-
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
369
|
-
], 64)) : (d(), R(E, {
|
|
370
|
-
key: 1,
|
|
371
|
-
variant: "outlined",
|
|
372
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
373
|
-
}, {
|
|
374
|
-
default: S(() => [
|
|
375
|
-
Ce,
|
|
376
|
-
n("div", Se, [
|
|
377
|
-
n("div", Fe, O(e(s)("connect.storeRewards.empty.title")), 1),
|
|
378
|
-
n("div", Ve, O(e(s)("connect.storeRewards.empty.description")), 1)
|
|
379
|
-
]),
|
|
380
|
-
m(v, {
|
|
381
|
-
variant: "primary",
|
|
382
|
-
label: e(s)("connect.storeRewards.empty.action"),
|
|
383
|
-
onClick: a[4] || (a[4] = (w) => h()),
|
|
384
|
-
icon: "add"
|
|
385
|
-
}, null, 8, ["label"])
|
|
386
|
-
]),
|
|
387
|
-
_: 1
|
|
388
|
-
})),
|
|
389
|
-
m(Re, {
|
|
390
|
-
ref_key: "rewardSheetRef",
|
|
391
|
-
ref: l,
|
|
392
|
-
onUpdate: a[5] || (a[5] = (w) => r(w))
|
|
393
|
-
}, null, 512)
|
|
394
|
-
])
|
|
395
|
-
], 64);
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
export {
|
|
400
|
-
Ye as default
|
|
401
|
-
};
|