@feedmepos/mf-connect 0.1.0-beta.9 → 0.1.0-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-D1vIDmhJ.js +620 -0
- package/dist/{App-DQUbRsdA.js → App-DHrfWG8l.js} +249 -250
- package/dist/Broadcast-B2rxZAZi.js +216 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-BFllvG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2a9rcXK.js} +20 -20
- package/dist/Card-Dr6pTTM0.js +824 -0
- package/dist/Collections-0tbg0MFt.js +441 -0
- package/dist/Credit-KbB_7Jq-.js +214 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C_ZKNWzb.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-we7ADwFk.js} +999 -1018
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-VBNyvZCJ.js +344 -0
- package/dist/Experience-C_Q9Iml8.js +211 -0
- package/dist/Game-BwODw7M6.js +250 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
- package/dist/Marketing-QOKTAS_T.js +309 -0
- package/dist/Member-d7RIGRm1.js +92 -0
- package/dist/MemberList-CK9629ew.js +1737 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-zSxSnUkK.js → MemberTransactions-D-pnlXiP.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-3VS7JnK6.js +203 -0
- package/dist/Mission-BAKDm4VZ.js +248 -0
- package/dist/Point-Puu0jKz0.js +220 -0
- package/dist/Promotion-DRIaUvJi.js +244 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CTKKhH-r.js → RuleGroup.vue_vue_type_script_setup_true_lang-DTdfYGya.js} +557 -557
- package/dist/Segment-DpBxGuuu.js +435 -0
- package/dist/Setting-DLB2ywCp.js +1870 -0
- package/dist/Store-8DO6ITWc.js +1513 -0
- package/dist/StoreRewards-DZfqUeYR.js +429 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-2Jqj_rKv.js → StoreTransactions.vue_vue_type_script_setup_true_lang-RTfozD01.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BkdSj0cX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BGI78ycg.js} +1 -1
- package/dist/{Tier-Cpl0FV8L.js → Tier-BnQRujpX.js} +453 -481
- package/dist/{Title-CbMDd1Et.js → Title-BPf1tUFx.js} +295 -314
- package/dist/Transaction-ese0oNrz.js +36 -0
- package/dist/Voucher--gtOZQx1.js +485 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/app-Bt59niI-.js +2974 -0
- package/dist/{app-VxaUCtgl.js → app-DHE61XdR.js} +1 -1
- package/dist/app.js +3 -5
- package/dist/{business-DR7jpnLz.js → business-BSo7EPan.js} +1 -1
- package/dist/{campaign-MqcTb329.js → campaign-CsOje3Ap.js} +3 -5
- package/dist/{collection.fn-CvEoe61K.js → collection.fn-BYQfFJOr.js} +2 -2
- package/dist/dto-CfEXSCq6.js +1145 -0
- package/dist/{effect-BjjQeiQg.js → effect-Bn_ofYS3.js} +9 -9
- package/dist/{export-B8cvWh5n.js → export-CMR243CF.js} +3 -3
- package/dist/{helper-DfgVNY7B.js → helper-BqOQRtvW.js} +1 -1
- package/dist/index-BLDYTxnc.js +28058 -0
- package/dist/{index-C2JNcGc-.js → index-BWnFs-Cb.js} +281 -299
- package/dist/{index-B5NufbUt.js → index-BaBNmzUb.js} +1 -1
- package/dist/{index-CWR3qYjb.js → index-Boo5np6l.js} +1 -1
- package/dist/{index-BsfWRB8R.js → index-CC1GV8OW.js} +1 -1
- package/dist/{index-0UYoh1-7.js → index-CHO4_zsT.js} +1 -1
- package/dist/{index-2P9w5u3m.js → index-DEZsrQ2f.js} +3 -3
- package/dist/{index-C7zMfUgy.js → index-D_f2lmK2.js} +1 -1
- package/dist/{index-Dap5R3vr.js → index-Da142OER.js} +66 -78
- package/dist/index-DbP04yeg.js +11 -0
- package/dist/{index-DBy30v8N.js → index-DtPe-TEm.js} +3 -3
- package/dist/{index-CJ8Uh2Ja.js → index-FvlaxwGB.js} +3 -3
- package/dist/{index.esm2017-D1X3PgpO.js → index.esm2017-ePm--Atp.js} +55 -55
- package/dist/{loading-CJ3nOovJ.js → loading-KNmEMBUB.js} +460 -469
- package/dist/{membership-B1cmSRyk.js → membership-DKoVIS1a.js} +3 -3
- package/dist/money-CkD3zl5C.js +15 -0
- package/dist/number-BDsGpOXm.js +12 -0
- package/dist/{rule-ChWyR-0j.js → rule-CzamI50_.js} +2 -2
- package/dist/{rule-builder-CSmOONdb.js → rule-builder-DHf6wfaQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-Cug7aRK0.js → template-CFAIPoD7.js} +63 -63
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{xlsx-CfgPFFvp.js → xlsx-BDJMaozs.js} +517 -517
- package/package.json +4 -7
- package/dist/Analytic-CMXUjK_F.js +0 -622
- package/dist/Broadcast-DowFtHv6.js +0 -223
- package/dist/Card-C7rhL0pV.js +0 -825
- package/dist/Collections-B-1wlk3r.js +0 -453
- package/dist/Credit-DDjozmoF.js +0 -220
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-pwMuIgs5.js +0 -345
- package/dist/Experience-BbE-c1Op.js +0 -221
- package/dist/Game-DQdRpaN-.js +0 -255
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-Dgmxzg4h.js +0 -316
- package/dist/Member-w23oRVwN.js +0 -69
- package/dist/MemberList-BLIdjznQ.js +0 -1735
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Dy_lMdZA.js +0 -432
- package/dist/Mission-Cjt0E083.js +0 -261
- package/dist/Point-CQJL3Ewu.js +0 -222
- package/dist/Promotion-BYViH3bu.js +0 -247
- package/dist/Segment-B9Jj1ak0.js +0 -437
- package/dist/Setting-DXWbgRxs.js +0 -1901
- package/dist/Store-Dswk2e_z.js +0 -1511
- package/dist/StoreRewards-CNUhG_Ue.js +0 -401
- package/dist/Transaction-BB-kk-84.js +0 -39
- package/dist/Voucher-b1_Jlm6X.js +0 -490
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-pG-SrXp9.js +0 -56
- package/dist/app-DCHKJoql.js +0 -5639
- package/dist/dto-jcK3TGB7.js +0 -2770
- package/dist/index-Cv7pLAYq.js +0 -3
- package/dist/index-LrSSauN2.js +0 -29193
- package/dist/money-BEATdGS6.js +0 -15
- package/dist/number-CeAYAKCp.js +0 -12
- package/dist/vue-i18n-BRhKDHdF.js +0 -2365
- package/dist/zod-Bg2FbC-D.js +0 -90
|
@@ -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-Cv7pLAYq.js";
|
|
5
|
-
import { p as H, u as Q, f as B } from "./loading-CJ3nOovJ.js";
|
|
6
|
-
import { C as Z, u as X } from "./membership-B1cmSRyk.js";
|
|
7
|
-
import { u as ee } from "./vue-i18n-BRhKDHdF.js";
|
|
8
|
-
import { F as te } from "./index-C7zMfUgy.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-DR7jpnLz.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-pG-SrXp9.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-BkdSj0cX.js";
|
|
17
|
-
import { _ as le, a as me } from "./EffectSheet.vue_vue_type_style_index_0_lang-pwMuIgs5.js";
|
|
18
|
-
import { i as ce, t as de } from "./helper-DfgVNY7B.js";
|
|
19
|
-
import { useRouter as ue } from "vue-router";
|
|
20
|
-
import { m as N } from "./index-BsfWRB8R.js";
|
|
21
|
-
import { R as T } from "./app-DCHKJoql.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
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
|
|
2
|
-
import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-2Jqj_rKv.js";
|
|
3
|
-
import { u as C } from "./vue-i18n-BRhKDHdF.js";
|
|
4
|
-
const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
|
|
5
|
-
__name: "Transaction",
|
|
6
|
-
setup(V) {
|
|
7
|
-
const { t: n } = C(), a = [
|
|
8
|
-
{
|
|
9
|
-
label: n("connect.transaction.tabs.collection"),
|
|
10
|
-
value: "collection"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
label: n("connect.transaction.tabs.store"),
|
|
14
|
-
value: "store"
|
|
15
|
-
}
|
|
16
|
-
], e = f(a[0]);
|
|
17
|
-
return (B, c) => {
|
|
18
|
-
const i = s("FmPageHead"), u = s("FmTabs");
|
|
19
|
-
return t(), v(b, null, [
|
|
20
|
-
r(i, {
|
|
21
|
-
title: o(n)("connect.transaction.title")
|
|
22
|
-
}, null, 8, ["title"]),
|
|
23
|
-
k("div", T, [
|
|
24
|
-
r(u, {
|
|
25
|
-
"model-value": o(e).value,
|
|
26
|
-
items: a,
|
|
27
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) => e.value = a.find((_) => _.value === p))
|
|
28
|
-
}, null, 8, ["model-value"]),
|
|
29
|
-
(t(), l(x, null, [
|
|
30
|
-
o(e).value == "collection" ? (t(), l(m(g), { key: 0 })) : o(e).value == "store" ? (t(), l(m(y), { key: 1 })) : F("", !0)
|
|
31
|
-
], 1024))
|
|
32
|
-
])
|
|
33
|
-
], 64);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
export {
|
|
38
|
-
P as default
|
|
39
|
-
};
|