@feedmepos/mf-connect 0.0.16-beta.10 → 0.0.16-beta.12
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-BVk0jPDU.js → Analytic-DIc9BYb0.js} +32 -20
- package/dist/{App-BbAalq1k.js → App-BzzL9_Jw.js} +33 -27
- package/dist/Broadcast-dVPgK5QV.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-TnEPvafD.js} +18 -11
- package/dist/{Card-B5in1RMa.js → Card-Bj2Yd2pr.js} +178 -158
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-Fkb_zzqZ.js +453 -0
- package/dist/{Credit-Bc9EzdsC.js → Credit-DHn9OkE8.js} +78 -69
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C1ZXQski.js +2788 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D6mWny8y.js +344 -0
- package/dist/{Experience-CgKak5ik.js → Experience-DX3aJihS.js} +64 -55
- package/dist/{Game-QhfKqrN_.js → Game-CcVQvETd.js} +54 -45
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/{Marketing-CSx4N7UJ.js → Marketing-B9kykWEh.js} +79 -72
- package/dist/{Member-CY6WMD8D.js → Member-RoJSCSC5.js} +25 -22
- package/dist/{MemberList-8iRwm7Sz.js → MemberList-BUDxqMEK.js} +321 -307
- package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bh_tT1Rp.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Cj3-JHOX.js +432 -0
- package/dist/{Mission-BTy1p7lU.js → Mission-DDvgCLy0.js} +50 -40
- package/dist/{Point-A6B_ggSy.js → Point-BbPkt4kF.js} +67 -58
- package/dist/Promotion-DEo-lxpX.js +221 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BGjeTeqS.js +1751 -0
- package/dist/{Segment-CFVXtyEj.js → Segment-DAcpZWIN.js} +145 -130
- package/dist/{Setting-Jmtw-_DV.js → Setting-CgXohUPt.js} +167 -154
- package/dist/{Store-DQypT-7e.js → Store-BVyHbQ8o.js} +504 -489
- package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-sccMDbkj.js} +124 -108
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang--sdQ_l8g.js} +131 -123
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CXlkvt2u.js +139 -0
- package/dist/{Tier-D1jymeLK.js → Tier--P27XXbB.js} +144 -125
- package/dist/{Title-DN9DIP2k.js → Title-B27S3SxD.js} +107 -90
- package/dist/{Transaction-BAJvAoU6.js → Transaction-CYTtwwHY.js} +2 -2
- package/dist/Voucher-BZ8PKgO5.js +488 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-CnKzqAcN.js +53428 -0
- package/dist/app-FfENBuoE.js +5381 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +2 -1
- package/dist/business-CXyP9G7A.js +78 -0
- package/dist/campaign-0aM2KYOy.js +96 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/collection.fn-FicQhH1t.js +26 -0
- package/dist/dto-BiYLkVdL.js +1169 -0
- package/dist/effect-Cg-eNEjg.js +61 -0
- package/dist/{export-DjeNY5Pc.js → export-D7BuObOL.js} +19 -16
- package/dist/helper-DvD-D7c7.js +71 -0
- package/dist/index-B1Q0GAWp.js +95 -0
- package/dist/index-B4UZgSB-.js +28058 -0
- package/dist/index-B6c-fUij.js +203 -0
- package/dist/index-BP_5cfKa.js +38 -0
- package/dist/index-BRXg5Si1.js +2071 -0
- package/dist/index-BuDwICBJ.js +761 -0
- package/dist/index-CDMC-8iO.js +94 -0
- package/dist/index-CcZt3OrE.js +73 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DA-fzkRR.js +1737 -0
- package/dist/index-Dbd4WA4r.js +61 -0
- package/dist/index-Dkeb_9ER.js +8832 -0
- package/dist/index-DmdKoKk_.js +298 -0
- package/dist/index-G-88ujCM.js +3 -0
- package/dist/loading-uCNeZibp.js +32697 -0
- package/dist/lodash-B5I3zXaY.js +3678 -0
- package/dist/membership-DFRO9TyM.js +221 -0
- package/dist/moment-BWErdI6_.js +2578 -0
- package/dist/money-OtkT4Pzp.js +15 -0
- package/dist/number-Cg3NCouc.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/rule-Ch2HRiGw.js +1973 -0
- package/dist/rule-builder-B_M9yvEe.js +89 -0
- package/dist/template-1o0LbOoJ.js +190 -0
- package/dist/usePagination-BeF5K3M7.js +223 -0
- package/dist/vue-i18n-AtGIa4qH.js +2365 -0
- package/dist/xlsx-pChq0adn.js +15491 -0
- package/dist/zod-W_PvIofQ.js +90 -0
- package/package.json +3 -3
- package/dist/Collections-CFCZ9YIG.js +0 -4
- package/dist/MainLayout-JbHzENFy.js +0 -4
- package/dist/app-BpzzygYP.js +0 -87765
- package/dist/money-DKGIIplY.js +0 -15
- package/dist/number-tPodRxTN.js +0 -12
|
@@ -1,46 +1,62 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { components as
|
|
4
|
-
import
|
|
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-G-88ujCM.js";
|
|
5
|
+
import { p as H, u as Q, f as B } from "./loading-uCNeZibp.js";
|
|
6
|
+
import { C as Z, u as X } from "./membership-DFRO9TyM.js";
|
|
7
|
+
import { u as ee } from "./vue-i18n-AtGIa4qH.js";
|
|
8
|
+
import { F as te } from "./index-Dkeb_9ER.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-CXyP9G7A.js";
|
|
12
|
+
import { useCoreStore as ne } from "@feedmepos/mf-common";
|
|
13
|
+
import { Z as v } from "./zod-W_PvIofQ.js";
|
|
14
|
+
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.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-CXlkvt2u.js";
|
|
17
|
+
import { _ as le, a as me } from "./EffectSheet.vue_vue_type_style_index_0_lang-D6mWny8y.js";
|
|
18
|
+
import { i as ce, t as de } from "./helper-DvD-D7c7.js";
|
|
5
19
|
import { useRouter as ue } from "vue-router";
|
|
20
|
+
import { m as N } from "./index-B1Q0GAWp.js";
|
|
21
|
+
import { R as T } from "./app-FfENBuoE.js";
|
|
6
22
|
const pe = {
|
|
7
23
|
key: 0,
|
|
8
24
|
class: "flex flex-col space-y-16 pr-12"
|
|
9
|
-
}, 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__ */
|
|
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({
|
|
10
26
|
__name: "EditRewardSheet",
|
|
11
27
|
emits: ["update"],
|
|
12
|
-
setup(W, { expose: n, emit:
|
|
13
|
-
const p =
|
|
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(
|
|
14
30
|
() => {
|
|
15
|
-
var
|
|
16
|
-
return Z[((
|
|
31
|
+
var r;
|
|
32
|
+
return Z[((r = a.value) == null ? void 0 : r.type) || "VOUCHER"];
|
|
17
33
|
}
|
|
18
34
|
), A = j(() => {
|
|
19
|
-
const
|
|
20
|
-
return
|
|
35
|
+
const r = i.safeParse(a.value);
|
|
36
|
+
return r.success ? [] : r.error.errors;
|
|
21
37
|
});
|
|
22
38
|
function L() {
|
|
23
|
-
const
|
|
24
|
-
|
|
39
|
+
const r = i.safeParse(a.value);
|
|
40
|
+
r.success && p("update", r.data);
|
|
25
41
|
}
|
|
26
|
-
function
|
|
42
|
+
function x(r, t, o = {
|
|
27
43
|
isStoreReward: !1,
|
|
28
44
|
type: "VOUCHER"
|
|
29
45
|
}) {
|
|
30
|
-
f.value =
|
|
31
|
-
business:
|
|
46
|
+
f.value = r, r && (_.value = void 0, a.value = t || ce(o.type, {
|
|
47
|
+
business: V.currentBusiness.value._id,
|
|
32
48
|
noCampaign: o.isStoreReward == !0
|
|
33
49
|
}));
|
|
34
50
|
}
|
|
35
51
|
return q(async () => {
|
|
36
|
-
await
|
|
52
|
+
await I.readLocations();
|
|
37
53
|
}), n({
|
|
38
|
-
showSheet:
|
|
54
|
+
showSheet: x,
|
|
39
55
|
data: a,
|
|
40
|
-
rewardImage:
|
|
41
|
-
}), (
|
|
56
|
+
rewardImage: _
|
|
57
|
+
}), (r, t) => {
|
|
42
58
|
const o = g("FmTextarea"), y = g("FmHelperText"), u = g("FmButton"), C = g("FmSideSheet");
|
|
43
|
-
return
|
|
59
|
+
return d(), b(C, {
|
|
44
60
|
"max-width": 560,
|
|
45
61
|
modelValue: e(f),
|
|
46
62
|
"onUpdate:modelValue": t[7] || (t[7] = (R) => Y(f) ? f.value = R : null),
|
|
@@ -48,125 +64,125 @@ const pe = {
|
|
|
48
64
|
}, {
|
|
49
65
|
"side-sheet-footer": S(() => [
|
|
50
66
|
s("div", we, [
|
|
51
|
-
|
|
67
|
+
c(u, {
|
|
52
68
|
label: "Submit",
|
|
53
69
|
onClick: L,
|
|
54
|
-
disabled: e(A).length > 0 || e(
|
|
55
|
-
loading: e(
|
|
70
|
+
disabled: e(A).length > 0 || e(K)().isLoading,
|
|
71
|
+
loading: e(K)().isLoading
|
|
56
72
|
}, null, 8, ["disabled", "loading"]),
|
|
57
|
-
|
|
73
|
+
c(u, {
|
|
58
74
|
label: "Cancel",
|
|
59
|
-
onClick: t[6] || (t[6] = (R) =>
|
|
75
|
+
onClick: t[6] || (t[6] = (R) => x(!1)),
|
|
60
76
|
variant: "tertiary"
|
|
61
77
|
})
|
|
62
78
|
])
|
|
63
79
|
]),
|
|
64
80
|
default: S(() => {
|
|
65
|
-
var R,
|
|
81
|
+
var R, E, w;
|
|
66
82
|
return [
|
|
67
|
-
e(a) ? (
|
|
83
|
+
e(a) ? (d(), O("div", pe, [
|
|
68
84
|
s("div", fe, [
|
|
69
85
|
t[8] || (t[8] = z(" Reward information ")),
|
|
70
|
-
(
|
|
86
|
+
(d(), b(M(e(l).chip())))
|
|
71
87
|
]),
|
|
72
|
-
|
|
88
|
+
c(se, {
|
|
73
89
|
modelValue: e(a).name,
|
|
74
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
75
|
-
label: `${e(
|
|
90
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => e(a).name = m),
|
|
91
|
+
label: `${e(l).name} name`,
|
|
76
92
|
schema: e(v).typeAtPath(e(i), "name", [e(a).type])
|
|
77
93
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
78
|
-
|
|
94
|
+
c(o, {
|
|
79
95
|
class: "!mb-[-16px]",
|
|
80
96
|
modelValue: e(a).description,
|
|
81
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
97
|
+
"onUpdate:modelValue": t[1] || (t[1] = (m) => e(a).description = m),
|
|
82
98
|
rules: [e(v).ruleAtPath(e(i), "description", [e(a).type])]
|
|
83
99
|
}, {
|
|
84
100
|
label: S(() => [
|
|
85
|
-
(
|
|
101
|
+
(d(), b(M(
|
|
86
102
|
e(v).toInputLabel(
|
|
87
103
|
e(v).typeAtPath(e(i), "description", [e(a).type]),
|
|
88
|
-
`${e(
|
|
104
|
+
`${e(l).name} description`
|
|
89
105
|
)
|
|
90
106
|
)))
|
|
91
107
|
]),
|
|
92
108
|
_: 1
|
|
93
109
|
}, 8, ["modelValue", "rules"]),
|
|
94
110
|
s("div", ye, [
|
|
95
|
-
s("div", null, $(e(
|
|
111
|
+
s("div", null, $(e(l).name) + " description should not exceed 200 characters. ", 1),
|
|
96
112
|
s("div", null, $(((R = e(a).description) == null ? void 0 : R.length) ?? 0) + "/200", 1)
|
|
97
113
|
]),
|
|
98
|
-
|
|
114
|
+
c(re, {
|
|
99
115
|
class: "w-1/2 xs:w-2/3",
|
|
100
116
|
"aspect-ratio": "16/9",
|
|
101
|
-
file: e(
|
|
117
|
+
file: e(_) ?? void 0,
|
|
102
118
|
thumbnail: e(a).image ?? void 0,
|
|
103
|
-
"onUpdate:file": t[2] || (t[2] = async (
|
|
104
|
-
|
|
119
|
+
"onUpdate:file": t[2] || (t[2] = async (m) => {
|
|
120
|
+
_.value = m, m || (e(a).image = null);
|
|
105
121
|
})
|
|
106
122
|
}, {
|
|
107
123
|
label: S(() => [
|
|
108
|
-
(
|
|
124
|
+
(d(), b(M(
|
|
109
125
|
e(v).toInputLabel(
|
|
110
126
|
e(v).typeAtPath(e(i), "image", [e(a).type]),
|
|
111
|
-
`${e(
|
|
127
|
+
`${e(l).name} image`
|
|
112
128
|
)
|
|
113
129
|
)))
|
|
114
130
|
]),
|
|
115
131
|
_: 1
|
|
116
132
|
}, 8, ["file", "thumbnail"]),
|
|
117
|
-
e(a).type === "VOUCHER" ? (
|
|
133
|
+
e(a).type === "VOUCHER" ? (d(), O(D, { key: 0 }, [
|
|
118
134
|
t[9] || (t[9] = s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
|
|
119
|
-
|
|
135
|
+
c(le, {
|
|
120
136
|
"model-value": e(a).extras.effect,
|
|
121
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
122
|
-
e(a).extras.effect =
|
|
137
|
+
"onUpdate:modelValue": t[3] || (t[3] = (m) => {
|
|
138
|
+
e(a).extras.effect = m;
|
|
123
139
|
})
|
|
124
140
|
}, null, 8, ["model-value"]),
|
|
125
|
-
e(a).extras.effect == null ? (
|
|
141
|
+
e(a).extras.effect == null ? (d(), b(y, {
|
|
126
142
|
key: 0,
|
|
127
143
|
class: "!mt-8",
|
|
128
144
|
text: "Effect is required",
|
|
129
145
|
state: "error"
|
|
130
|
-
})) :
|
|
146
|
+
})) : U("", !0),
|
|
131
147
|
t[10] || (t[10] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1)),
|
|
132
|
-
|
|
148
|
+
c(me, {
|
|
133
149
|
"model-value": e(a).options,
|
|
134
150
|
"no-campaign": e(a).noCampaign,
|
|
135
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
151
|
+
"onUpdate:modelValue": t[4] || (t[4] = (m) => e(a).options = m),
|
|
136
152
|
schema: e(v).typeAtPath(e(i), "options", ["VOUCHER"])
|
|
137
153
|
}, null, 8, ["model-value", "no-campaign", "schema"])
|
|
138
|
-
], 64)) :
|
|
154
|
+
], 64)) : U("", !0),
|
|
139
155
|
t[11] || (t[11] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
|
|
140
|
-
e(a).type === "VOUCHER" ? (
|
|
156
|
+
e(a).type === "VOUCHER" ? (d(), b(ie, {
|
|
141
157
|
key: 1,
|
|
142
|
-
"model-value": ((w = (
|
|
158
|
+
"model-value": ((w = (E = e(a).extras) == null ? void 0 : E.targetLocation) == null ? void 0 : w.map(String)) ?? null,
|
|
143
159
|
type: "select",
|
|
144
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
145
|
-
e(a).extras.targetLocation =
|
|
160
|
+
"onUpdate:modelValue": t[5] || (t[5] = (m) => {
|
|
161
|
+
e(a).extras.targetLocation = m;
|
|
146
162
|
}),
|
|
147
163
|
rules: [
|
|
148
164
|
e(v).ruleAtPath(e(i), "extras.targetLocation", ["VOUCHER"])
|
|
149
165
|
]
|
|
150
|
-
}, null, 8, ["model-value", "rules"])) :
|
|
151
|
-
])) :
|
|
166
|
+
}, null, 8, ["model-value", "rules"])) : U("", !0)
|
|
167
|
+
])) : U("", !0)
|
|
152
168
|
];
|
|
153
169
|
}),
|
|
154
170
|
_: 1
|
|
155
171
|
}, 8, ["modelValue"]);
|
|
156
172
|
};
|
|
157
173
|
}
|
|
158
|
-
}), 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" },
|
|
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({
|
|
159
175
|
__name: "StoreRewards",
|
|
160
176
|
setup(W) {
|
|
161
|
-
const { t: n } =
|
|
177
|
+
const { t: n } = ee(), P = {
|
|
162
178
|
label: n("connect.storeRewards.create"),
|
|
163
179
|
value: "create",
|
|
164
180
|
isPrimary: !0,
|
|
165
181
|
prependIcon: "add"
|
|
166
|
-
}, p =
|
|
182
|
+
}, p = X(), { global: I, minor: V } = Q, f = ue(), a = F({
|
|
167
183
|
searchKey: "",
|
|
168
184
|
columnFilters: []
|
|
169
|
-
}),
|
|
185
|
+
}), _ = [
|
|
170
186
|
{
|
|
171
187
|
header: n("connect.storeRewards.table.name"),
|
|
172
188
|
accessorFn: (t) => t.name
|
|
@@ -181,7 +197,7 @@ const pe = {
|
|
|
181
197
|
},
|
|
182
198
|
{
|
|
183
199
|
header: n("connect.storeRewards.table.validity"),
|
|
184
|
-
accessorFn: (t) =>
|
|
200
|
+
accessorFn: (t) => de(
|
|
185
201
|
"validityOption" in t.options ? t.options.validityOption || {} : {}
|
|
186
202
|
)
|
|
187
203
|
},
|
|
@@ -197,7 +213,7 @@ const pe = {
|
|
|
197
213
|
cell(t) {
|
|
198
214
|
return h("div", { class: "flex items-center justify-end gap-4" }, [
|
|
199
215
|
h(
|
|
200
|
-
|
|
216
|
+
k.FmMenu,
|
|
201
217
|
{
|
|
202
218
|
placement: "bottom-end",
|
|
203
219
|
onClick: (o) => {
|
|
@@ -205,13 +221,13 @@ const pe = {
|
|
|
205
221
|
}
|
|
206
222
|
},
|
|
207
223
|
{
|
|
208
|
-
"menu-button": () => h(
|
|
224
|
+
"menu-button": () => h(k.FmButton, {
|
|
209
225
|
icon: "more_vert",
|
|
210
226
|
iconColor: "neutral-gray-400",
|
|
211
227
|
variant: "tertiary"
|
|
212
228
|
}),
|
|
213
229
|
default: () => [
|
|
214
|
-
h(
|
|
230
|
+
h(k.FmMenuItem, {
|
|
215
231
|
label: "View collections",
|
|
216
232
|
onClick: async (o) => {
|
|
217
233
|
o.stopPropagation(), A(t.row.original._id);
|
|
@@ -225,7 +241,7 @@ const pe = {
|
|
|
225
241
|
// },
|
|
226
242
|
// }),
|
|
227
243
|
h(
|
|
228
|
-
|
|
244
|
+
k.FmMenuItem,
|
|
229
245
|
{
|
|
230
246
|
onClick: async (o) => {
|
|
231
247
|
o.stopPropagation(), L(t.row.original);
|
|
@@ -249,28 +265,28 @@ const pe = {
|
|
|
249
265
|
}
|
|
250
266
|
], i = j(
|
|
251
267
|
() => p.bundleRewards.filter((t) => t.type == "VOUCHER")
|
|
252
|
-
),
|
|
268
|
+
), l = F();
|
|
253
269
|
function A(t) {
|
|
254
270
|
f.push({
|
|
255
|
-
name:
|
|
271
|
+
name: T["$connect-STORE_REWARD_COLLECTIONS"],
|
|
256
272
|
params: { id: t }
|
|
257
273
|
});
|
|
258
274
|
}
|
|
259
275
|
async function L(t) {
|
|
260
276
|
if (t.type === "TITLE") {
|
|
261
|
-
await
|
|
277
|
+
await H.confirm(
|
|
262
278
|
n("connect.storeRewards.remove.message"),
|
|
263
279
|
n("connect.storeRewards.remove.title"),
|
|
264
280
|
n("connect.storeRewards.remove.action")
|
|
265
|
-
) && await f.push({ name:
|
|
281
|
+
) && await f.push({ name: T["$connect-PROGRAM_TITLE"] });
|
|
266
282
|
return;
|
|
267
283
|
}
|
|
268
|
-
await
|
|
284
|
+
await H.remove(
|
|
269
285
|
n("connect.storeRewards.delete.confirm"),
|
|
270
286
|
n("connect.storeRewards.delete.title")
|
|
271
|
-
) && await
|
|
287
|
+
) && await V(
|
|
272
288
|
async () => {
|
|
273
|
-
await
|
|
289
|
+
await N.deleteReward(t._id), await p.readMembership(), await p.readRewards();
|
|
274
290
|
},
|
|
275
291
|
{
|
|
276
292
|
message: n("connect.storeRewards.delete.message"),
|
|
@@ -278,33 +294,33 @@ const pe = {
|
|
|
278
294
|
}
|
|
279
295
|
);
|
|
280
296
|
}
|
|
281
|
-
async function
|
|
297
|
+
async function x(t) {
|
|
282
298
|
var y;
|
|
283
|
-
const o = t ?
|
|
299
|
+
const o = t ? oe(p.bundleRewards.find((u) => u._id === t)) : void 0;
|
|
284
300
|
if ((o == null ? void 0 : o.type) === "TITLE") {
|
|
285
|
-
await
|
|
301
|
+
await H.confirm(
|
|
286
302
|
"You cannot edit a title here, please edit it at the Program > Title section.",
|
|
287
303
|
"Update reward",
|
|
288
304
|
"Go to title section"
|
|
289
|
-
) && await f.push({ name:
|
|
305
|
+
) && await f.push({ name: T["$connect-PROGRAM_TITLE"] });
|
|
290
306
|
return;
|
|
291
307
|
}
|
|
292
|
-
(y =
|
|
308
|
+
(y = l.value) == null || y.showSheet(!0, o, {
|
|
293
309
|
isStoreReward: !0,
|
|
294
310
|
type: "VOUCHER"
|
|
295
311
|
});
|
|
296
312
|
}
|
|
297
|
-
async function
|
|
298
|
-
await
|
|
313
|
+
async function r(t) {
|
|
314
|
+
await V(
|
|
299
315
|
async () => {
|
|
300
316
|
var o, y, u, C;
|
|
301
|
-
(o =
|
|
302
|
-
t.image ||
|
|
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(
|
|
303
319
|
void 0,
|
|
304
|
-
|
|
320
|
+
l.value.rewardImage
|
|
305
321
|
),
|
|
306
|
-
(u =
|
|
307
|
-
)), t._id ? await
|
|
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);
|
|
308
324
|
},
|
|
309
325
|
{
|
|
310
326
|
message: "Updating reward",
|
|
@@ -313,25 +329,25 @@ const pe = {
|
|
|
313
329
|
);
|
|
314
330
|
}
|
|
315
331
|
return q(async () => {
|
|
316
|
-
await
|
|
332
|
+
await I(async () => {
|
|
317
333
|
await p.readMembership(), await p.readRewards();
|
|
318
334
|
});
|
|
319
335
|
}), (t, o) => {
|
|
320
|
-
const y = g("FmPageHead"), u = g("FmSearch"), C = g("FmTable"), R = g("FmButton"),
|
|
321
|
-
return
|
|
322
|
-
|
|
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, {
|
|
323
339
|
title: e(n)("connect.storeRewards.title"),
|
|
324
340
|
description: e(n)("connect.storeRewards.description"),
|
|
325
|
-
actions: [
|
|
341
|
+
actions: [P],
|
|
326
342
|
"back-button": !0,
|
|
327
|
-
"onClick:action": o[0] || (o[0] = () =>
|
|
328
|
-
"onClick:back": o[1] || (o[1] = () => e(f).push({ name: e(
|
|
343
|
+
"onClick:action": o[0] || (o[0] = () => x()),
|
|
344
|
+
"onClick:back": o[1] || (o[1] = () => e(f).push({ name: e(T)["$connect-STORE"] }))
|
|
329
345
|
}, null, 8, ["title", "description", "actions"]),
|
|
330
346
|
s("div", ve, [
|
|
331
|
-
e(i) && e(i).length > 0 ? (
|
|
347
|
+
e(i) && e(i).length > 0 ? (d(), O(D, { key: 0 }, [
|
|
332
348
|
s("div", Re, [
|
|
333
349
|
o[6] || (o[6] = s("div", { class: "flex gap-8" }, null, -1)),
|
|
334
|
-
|
|
350
|
+
c(u, {
|
|
335
351
|
modelValue: e(a).searchKey,
|
|
336
352
|
"onUpdate:modelValue": o[2] || (o[2] = (w) => e(a).searchKey = w),
|
|
337
353
|
class: "",
|
|
@@ -339,41 +355,41 @@ const pe = {
|
|
|
339
355
|
collapsible: ""
|
|
340
356
|
}, null, 8, ["modelValue"])
|
|
341
357
|
]),
|
|
342
|
-
|
|
358
|
+
c(C, {
|
|
343
359
|
"row-data": e(i),
|
|
344
|
-
"column-defs":
|
|
360
|
+
"column-defs": _,
|
|
345
361
|
"search-value": e(a).searchKey,
|
|
346
362
|
"column-filter": e(a).columnFilters,
|
|
347
|
-
onRowClick: o[3] || (o[3] = (w) =>
|
|
363
|
+
onRowClick: o[3] || (o[3] = (w) => x(w.original._id)),
|
|
348
364
|
"hide-footer": e(i).length < 10
|
|
349
365
|
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
350
|
-
], 64)) : (
|
|
366
|
+
], 64)) : (d(), b(E, {
|
|
351
367
|
key: 1,
|
|
352
368
|
variant: "outlined",
|
|
353
369
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
354
370
|
}, {
|
|
355
371
|
default: S(() => [
|
|
356
372
|
o[7] || (o[7] = s("img", {
|
|
357
|
-
src:
|
|
373
|
+
src: J,
|
|
358
374
|
class: "aspect-square w-[150px]"
|
|
359
375
|
}, null, -1)),
|
|
360
376
|
s("div", be, [
|
|
361
|
-
s("div",
|
|
362
|
-
s("div",
|
|
377
|
+
s("div", _e, $(e(n)("connect.storeRewards.empty.title")), 1),
|
|
378
|
+
s("div", xe, $(e(n)("connect.storeRewards.empty.description")), 1)
|
|
363
379
|
]),
|
|
364
|
-
|
|
380
|
+
c(R, {
|
|
365
381
|
variant: "primary",
|
|
366
382
|
label: e(n)("connect.storeRewards.empty.action"),
|
|
367
|
-
onClick: o[4] || (o[4] = (w) =>
|
|
383
|
+
onClick: o[4] || (o[4] = (w) => x()),
|
|
368
384
|
icon: "add"
|
|
369
385
|
}, null, 8, ["label"])
|
|
370
386
|
]),
|
|
371
387
|
_: 1
|
|
372
388
|
})),
|
|
373
|
-
|
|
389
|
+
c(ge, {
|
|
374
390
|
ref_key: "rewardSheetRef",
|
|
375
|
-
ref:
|
|
376
|
-
onUpdate: o[5] || (o[5] = (w) =>
|
|
391
|
+
ref: l,
|
|
392
|
+
onUpdate: o[5] || (o[5] = (w) => r(w))
|
|
377
393
|
}, null, 512)
|
|
378
394
|
])
|
|
379
395
|
], 64);
|
|
@@ -381,5 +397,5 @@ const pe = {
|
|
|
381
397
|
}
|
|
382
398
|
});
|
|
383
399
|
export {
|
|
384
|
-
|
|
400
|
+
Ke as default
|
|
385
401
|
};
|