@feedmepos/mf-connect 0.0.8 → 0.0.9
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-BxRuK2P2.js → Analytic-CwaN0mge.js} +68 -69
- package/dist/{Broadcast-BqGojAWW.js → Broadcast-Cjx5xzUC.js} +27 -28
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D4mO5aik.js} +34 -34
- package/dist/Card-DbY6YaXk.js +827 -0
- package/dist/{Collections-DvdDRozp.js → Collections-DRN2gzwh.js} +158 -168
- package/dist/{Credit-BeHm7_2S.js → Credit-DOcrzykJ.js} +11 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js} +359 -333
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js → EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js} +5 -5
- package/dist/{Experience-CtDY9u4Y.js → Experience-aQj-3H2Y.js} +11 -12
- package/dist/{Game-DjaYuqcb.js → Game-Cnje-m_M.js} +22 -23
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js → ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js} +8 -8
- package/dist/{MainLayout-B-iAZM2k.js → MainLayout-Cxl9yLPs.js} +1 -1
- package/dist/{Marketing-BJJltAh-.js → Marketing-BYUcbcMU.js} +19 -20
- package/dist/{Member-eJ9Pdi5w.js → Member-D7K9fm_Q.js} +2 -2
- package/dist/MemberList-DbXkxUzF.js +1717 -0
- package/dist/{MemberTransactions-DRET8mSQ.js → MemberTransactions-DED1SYwX.js} +4 -4
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CLqIp5wR.js +203 -0
- package/dist/{Point-DPTOgJbC.js → Point-CQm8whVQ.js} +11 -12
- package/dist/{Promotion-wzkRuNqO.js → Promotion-DzVXy_C9.js} +42 -44
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js → RuleGroup.vue_vue_type_script_setup_true_lang-CeS6KlhP.js} +12 -12
- package/dist/Segment-D3o0D3Uv.js +407 -0
- package/dist/{Setting-CXuZu0-m.js → Setting-pCzenLoL.js} +17 -18
- package/dist/{Store-4Um9keEp.js → Store-DEwEIFYD.js} +18 -19
- package/dist/{StoreRewards-B-UFeyQM.js → StoreRewards-D7vnZN4f.js} +86 -87
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-ALzQU3th.js +793 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js} +1 -1
- package/dist/{Tier-C6KVsxGO.js → Tier-BJbX5CPB.js} +401 -377
- package/dist/{Title-DuN1ahIM.js → Title-C9xV6rBg.js} +274 -248
- package/dist/Transaction-C8OHlhzR.js +36 -0
- package/dist/Voucher-eZwm7N1D.js +481 -0
- package/dist/{app-CxBTTB31.js → app-DgbDbhL-.js} +34 -34
- package/dist/app.js +1 -1
- package/dist/{campaign-B0aXkadj.js → campaign-BkvrUTEJ.js} +2 -2
- package/dist/{dto-BtdVC-Ab.js → dto-YYVhW73A.js} +52 -53
- package/dist/{effect-BUN6rkQM.js → effect-f7DAPYC8.js} +1 -1
- package/dist/export-BXbCXTfd.js +97 -0
- package/dist/{helper-Cpq3x8K5.js → helper-BhvQ9m6d.js} +1 -1
- package/dist/{index-D2Juhkdw.js → index-BhacKx5B.js} +85 -83
- package/dist/{index-DDSLx7vu.js → index-BsEqtUmY.js} +2 -2
- package/dist/{index-0GYrZr4L.js → index-CdtrQ9tR.js} +5 -5
- package/dist/{index-8clzk3uX.js → index-Cfo2A0Se.js} +1 -1
- package/dist/index-Cz5RZlYh.js +73 -0
- package/dist/{index-BTntbYTS.js → index-DQC_1tRF.js} +1 -1
- package/dist/{index-DysVCkrx.js → index-Dd3hrFcQ.js} +3 -3
- package/dist/{index-CK9yJMj7.js → index-FWp9M1yS.js} +5 -5
- package/dist/{index-C6NgUSl2.js → index-VmFlM704.js} +1 -1
- package/dist/{index-BvnZdJBY.js → index-oQLJE4Uw.js} +2 -2
- package/dist/libs/packages/core/src/collectible/collectible.dto.d.ts +6 -0
- package/dist/{plugins-B_d-WFtN.js → loading-DQaawbHE.js} +8204 -8108
- package/dist/{lodash-DsT1nK-T.js → lodash-DzdmTD20.js} +1 -1
- package/dist/{membership-DtD45RXh.js → membership-Dq2-b-S_.js} +3 -3
- package/dist/{money-CFI1TMCS.js → money-vzwOUBrp.js} +1 -1
- package/dist/{number-BBtf4fYz.js → number-CBzs6rfW.js} +1 -1
- package/dist/packages/connect/src/components/campaign/CampaignSummary.vue.d.ts +13 -0
- package/dist/packages/connect/src/composables/export.d.ts +11 -0
- package/dist/packages/connect/src/export/base.export.d.ts +7 -0
- package/dist/packages/connect/src/export/card.export.d.ts +5 -6
- package/dist/packages/connect/src/export/collection-transaction.export.d.ts +14 -0
- package/dist/packages/connect/src/export/index.d.ts +1 -0
- package/dist/packages/connect/src/export/store-transaction.export.d.ts +14 -0
- package/dist/packages/connect/src/helpers/user.d.ts +6 -0
- package/dist/{rule-CB9Qlcx1.js → rule-BR5rrmUV.js} +2 -2
- package/dist/{rule-builder-BIKcA4Bg.js → rule-builder-7GBNrPXt.js} +1 -1
- package/dist/{template-qlb46PGl.js → template-CETJ6lkf.js} +5 -5
- package/dist/{usePagination-CX66ab1Y.js → usePagination-DdZeE4Tt.js} +57 -56
- package/dist/user-Bm4KttFq.js +37 -0
- package/dist/{xlsx-DMaFso0k.js → xlsx-CDAKxZE_.js} +1 -1
- package/package.json +1 -1
- package/dist/Card-Dlj5jQp4.js +0 -792
- package/dist/MemberList-CrhMqUfJ.js +0 -1664
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js +0 -166
- package/dist/Segment-DnsPrP7Q.js +0 -371
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js +0 -660
- package/dist/Transaction-DdfX7Xfe.js +0 -34
- package/dist/Voucher-DarXrxZr.js +0 -454
- package/dist/index-Dg-PMgXV.js +0 -64
- package/dist/loading-Cxp7sI5p.js +0 -100
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as V, computed as N, onMounted as Z, resolveComponent as p, openBlock as u, createBlock as
|
|
1
|
+
import { defineComponent as Y, ref as V, computed as N, onMounted as Z, resolveComponent as p, openBlock as u, createBlock as v, unref as e, isRef as z, withCtx as x, createElementVNode as s, createVNode as n, createElementBlock as I, createTextVNode as J, resolveDynamicComponent as H, toDisplayString as K, Fragment as j, createCommentVNode as U, h as C } from "vue";
|
|
2
2
|
import { _ as Q } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { components as $ } from "@feedmepos/ui-library";
|
|
4
|
-
import { a as X, u as q,
|
|
5
|
-
import { u as ee } from "./loading-
|
|
6
|
-
import { C as _, u as te } from "./membership-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { c as ae } from "./object-qECH92oz.js";
|
|
4
|
+
import { a as X, u as q, b as k } from "./app-DgbDbhL-.js";
|
|
5
|
+
import { u as ee, p as M, f as B } from "./loading-DQaawbHE.js";
|
|
6
|
+
import { C as _, u as te } from "./membership-Dq2-b-S_.js";
|
|
7
|
+
import { F as ae } from "./index-BhacKx5B.js";
|
|
8
|
+
import { c as oe } from "./object-qECH92oz.js";
|
|
10
9
|
import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
11
10
|
import { useCoreStore as le } from "@feedmepos/mf-common";
|
|
12
11
|
import { _ as se, Z as w } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
|
|
13
|
-
import { _ as ie } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { _ as me, a as de } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
16
|
-
import { i as ce, t as ue } from "./helper-
|
|
12
|
+
import { _ as ie } from "./ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js";
|
|
13
|
+
import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js";
|
|
14
|
+
import { _ as me, a as de } from "./EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js";
|
|
15
|
+
import { i as ce, t as ue } from "./helper-BhvQ9m6d.js";
|
|
17
16
|
import { useRouter as pe } from "vue-router";
|
|
18
|
-
import { m as D } from "./index-
|
|
17
|
+
import { m as D } from "./index-VmFlM704.js";
|
|
19
18
|
const fe = {
|
|
20
19
|
key: 0,
|
|
21
20
|
class: "flex flex-col space-y-16 pr-12"
|
|
22
|
-
}, ye = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, we = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, ge = /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1),
|
|
21
|
+
}, ye = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, we = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, ge = /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1), be = /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, " Usage configuration ", -1), ve = /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1), _e = { class: "flex items-center gap-8" }, he = /* @__PURE__ */ Y({
|
|
23
22
|
__name: "EditRewardSheet",
|
|
24
23
|
emits: ["update"],
|
|
25
24
|
setup(W, { expose: O, emit: f }) {
|
|
26
|
-
const A = f, S = X(), h = le(), i = V(!1),
|
|
25
|
+
const A = f, S = X(), h = le(), i = V(!1), o = V(), y = V(), l = ae, g = N(
|
|
27
26
|
() => {
|
|
28
|
-
var
|
|
29
|
-
return _[((
|
|
27
|
+
var a;
|
|
28
|
+
return _[((a = o.value) == null ? void 0 : a.type) || "VOUCHER"];
|
|
30
29
|
}
|
|
31
30
|
), P = N(() => {
|
|
32
|
-
const
|
|
33
|
-
return
|
|
31
|
+
const a = l.safeParse(o.value);
|
|
32
|
+
return a.success ? [] : a.error.errors;
|
|
34
33
|
});
|
|
35
34
|
function F() {
|
|
36
|
-
const
|
|
37
|
-
|
|
35
|
+
const a = l.safeParse(o.value);
|
|
36
|
+
a.success && A("update", a.data);
|
|
38
37
|
}
|
|
39
|
-
function E(
|
|
38
|
+
function E(a, t, m = {
|
|
40
39
|
isStoreReward: !1,
|
|
41
40
|
type: "VOUCHER"
|
|
42
41
|
}) {
|
|
43
|
-
i.value =
|
|
42
|
+
i.value = a, a && (y.value = void 0, o.value = t || ce(m.type, {
|
|
44
43
|
business: h.currentBusiness.value._id,
|
|
45
44
|
noCampaign: m.isStoreReward == !0
|
|
46
45
|
}));
|
|
@@ -49,14 +48,14 @@ const fe = {
|
|
|
49
48
|
await S.readLocations();
|
|
50
49
|
}), O({
|
|
51
50
|
showSheet: E,
|
|
52
|
-
data:
|
|
51
|
+
data: o,
|
|
53
52
|
rewardImage: y
|
|
54
|
-
}), (
|
|
53
|
+
}), (a, t) => {
|
|
55
54
|
const m = p("FmTextarea"), c = p("FmHelperText"), R = p("FmSwitch"), T = p("FmButton"), L = p("FmSideSheet");
|
|
56
|
-
return u(),
|
|
55
|
+
return u(), v(L, {
|
|
57
56
|
"max-width": 560,
|
|
58
57
|
modelValue: e(i),
|
|
59
|
-
"onUpdate:modelValue": t[8] || (t[8] = (
|
|
58
|
+
"onUpdate:modelValue": t[8] || (t[8] = (b) => z(i) ? i.value = b : null),
|
|
60
59
|
header: "Store setting"
|
|
61
60
|
}, {
|
|
62
61
|
"side-sheet-footer": x(() => [
|
|
@@ -69,35 +68,35 @@ const fe = {
|
|
|
69
68
|
}, null, 8, ["disabled", "loading"]),
|
|
70
69
|
n(T, {
|
|
71
70
|
label: "Cancel",
|
|
72
|
-
onClick: t[7] || (t[7] = (
|
|
71
|
+
onClick: t[7] || (t[7] = (b) => E(!1)),
|
|
73
72
|
variant: "tertiary"
|
|
74
73
|
})
|
|
75
74
|
])
|
|
76
75
|
]),
|
|
77
76
|
default: x(() => {
|
|
78
|
-
var
|
|
77
|
+
var b, d, G;
|
|
79
78
|
return [
|
|
80
|
-
e(
|
|
79
|
+
e(o) ? (u(), I("div", fe, [
|
|
81
80
|
s("div", ye, [
|
|
82
81
|
J(" Reward information "),
|
|
83
|
-
(u(),
|
|
82
|
+
(u(), v(H(e(g).chip())))
|
|
84
83
|
]),
|
|
85
84
|
n(se, {
|
|
86
|
-
modelValue: e(
|
|
87
|
-
"onUpdate:modelValue": t[0] || (t[0] = (r) => e(
|
|
85
|
+
modelValue: e(o).name,
|
|
86
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e(o).name = r),
|
|
88
87
|
label: `${e(g).name} name`,
|
|
89
|
-
schema: e(w).typeAtPath(e(l), "name", [e(
|
|
88
|
+
schema: e(w).typeAtPath(e(l), "name", [e(o).type])
|
|
90
89
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
91
90
|
n(m, {
|
|
92
91
|
class: "!mb-[-16px]",
|
|
93
|
-
modelValue: e(
|
|
94
|
-
"onUpdate:modelValue": t[1] || (t[1] = (r) => e(
|
|
95
|
-
rules: [e(w).ruleAtPath(e(l), "description", [e(
|
|
92
|
+
modelValue: e(o).description,
|
|
93
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => e(o).description = r),
|
|
94
|
+
rules: [e(w).ruleAtPath(e(l), "description", [e(o).type])]
|
|
96
95
|
}, {
|
|
97
96
|
label: x(() => [
|
|
98
|
-
(u(),
|
|
97
|
+
(u(), v(H(
|
|
99
98
|
e(w).toInputLabel(
|
|
100
|
-
e(w).typeAtPath(e(l), "description", [e(
|
|
99
|
+
e(w).typeAtPath(e(l), "description", [e(o).type]),
|
|
101
100
|
`${e(g).name} description`
|
|
102
101
|
)
|
|
103
102
|
)))
|
|
@@ -106,67 +105,67 @@ const fe = {
|
|
|
106
105
|
}, 8, ["modelValue", "rules"]),
|
|
107
106
|
s("div", we, [
|
|
108
107
|
s("div", null, K(e(g).name) + " description should not exceed 200 characters. ", 1),
|
|
109
|
-
s("div", null, K(((
|
|
108
|
+
s("div", null, K(((b = e(o).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
|
|
110
109
|
]),
|
|
111
110
|
n(ie, {
|
|
112
111
|
class: "w-1/2 xs:w-2/3",
|
|
113
112
|
"aspect-ratio": "16/9",
|
|
114
113
|
file: e(y) ?? void 0,
|
|
115
|
-
thumbnail: e(
|
|
114
|
+
thumbnail: e(o).image ?? void 0,
|
|
116
115
|
"onUpdate:file": t[2] || (t[2] = async (r) => {
|
|
117
|
-
y.value = r, r || (e(
|
|
116
|
+
y.value = r, r || (e(o).image = null);
|
|
118
117
|
})
|
|
119
118
|
}, {
|
|
120
119
|
label: x(() => [
|
|
121
|
-
(u(),
|
|
120
|
+
(u(), v(H(
|
|
122
121
|
e(w).toInputLabel(
|
|
123
|
-
e(w).typeAtPath(e(l), "image", [e(
|
|
122
|
+
e(w).typeAtPath(e(l), "image", [e(o).type]),
|
|
124
123
|
`${e(g).name} image`
|
|
125
124
|
)
|
|
126
125
|
)))
|
|
127
126
|
]),
|
|
128
127
|
_: 1
|
|
129
128
|
}, 8, ["file", "thumbnail"]),
|
|
130
|
-
e(
|
|
129
|
+
e(o).type === "VOUCHER" ? (u(), I(j, { key: 0 }, [
|
|
131
130
|
ge,
|
|
132
131
|
n(me, {
|
|
133
|
-
"model-value": e(
|
|
132
|
+
"model-value": e(o).extras.effect,
|
|
134
133
|
"onUpdate:modelValue": t[3] || (t[3] = (r) => {
|
|
135
|
-
e(
|
|
134
|
+
e(o).extras.effect = r;
|
|
136
135
|
})
|
|
137
136
|
}, null, 8, ["model-value"]),
|
|
138
|
-
e(
|
|
137
|
+
e(o).extras.effect == null ? (u(), v(c, {
|
|
139
138
|
key: 0,
|
|
140
139
|
class: "!mt-8",
|
|
141
140
|
text: "Effect is required",
|
|
142
141
|
state: "error"
|
|
143
142
|
})) : U("", !0),
|
|
144
|
-
|
|
143
|
+
be,
|
|
145
144
|
n(de, {
|
|
146
|
-
"model-value": e(
|
|
147
|
-
"no-campaign": e(
|
|
148
|
-
"onUpdate:modelValue": t[4] || (t[4] = (r) => e(
|
|
145
|
+
"model-value": e(o).options,
|
|
146
|
+
"no-campaign": e(o).noCampaign,
|
|
147
|
+
"onUpdate:modelValue": t[4] || (t[4] = (r) => e(o).options = r),
|
|
149
148
|
schema: e(w).typeAtPath(e(l), "options", ["VOUCHER"])
|
|
150
149
|
}, null, 8, ["model-value", "no-campaign", "schema"])
|
|
151
150
|
], 64)) : U("", !0),
|
|
152
|
-
|
|
153
|
-
e(
|
|
151
|
+
ve,
|
|
152
|
+
e(o).type === "VOUCHER" ? (u(), v(re, {
|
|
154
153
|
key: 1,
|
|
155
|
-
"model-value": ((G = (d = e(
|
|
154
|
+
"model-value": ((G = (d = e(o).extras) == null ? void 0 : d.targetLocation) == null ? void 0 : G.map(String)) ?? null,
|
|
156
155
|
type: "select",
|
|
157
156
|
"onUpdate:modelValue": t[5] || (t[5] = (r) => {
|
|
158
|
-
e(
|
|
157
|
+
e(o).extras.targetLocation = r;
|
|
159
158
|
}),
|
|
160
159
|
rules: [
|
|
161
160
|
e(w).ruleAtPath(e(l), "extras.targetLocation", ["VOUCHER"])
|
|
162
161
|
]
|
|
163
162
|
}, null, 8, ["model-value", "rules"])) : U("", !0),
|
|
164
163
|
n(R, {
|
|
165
|
-
modelValue: e(
|
|
166
|
-
"onUpdate:modelValue": t[6] || (t[6] = (r) => e(
|
|
164
|
+
modelValue: e(o).internal,
|
|
165
|
+
"onUpdate:modelValue": t[6] || (t[6] = (r) => e(o).internal = r),
|
|
167
166
|
"label-placement": "right",
|
|
168
167
|
label: "Internal only",
|
|
169
|
-
sublabel: `${e(_)[e(
|
|
168
|
+
sublabel: `${e(_)[e(o).type].name} will not be shown to customer`
|
|
170
169
|
}, null, 8, ["modelValue", "sublabel"])
|
|
171
170
|
])) : U("", !0)
|
|
172
171
|
];
|
|
@@ -181,7 +180,7 @@ const fe = {
|
|
|
181
180
|
}, null, -1), Ve = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
182
181
|
/* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Create rewards"),
|
|
183
182
|
/* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Create rewards for your customers to redeem inside their bundle. ")
|
|
184
|
-
], -1),
|
|
183
|
+
], -1), Ge = /* @__PURE__ */ Y({
|
|
185
184
|
__name: "StoreRewards",
|
|
186
185
|
setup(W) {
|
|
187
186
|
const O = {
|
|
@@ -192,23 +191,23 @@ const fe = {
|
|
|
192
191
|
}, f = te(), { global: A, minor: S } = ee, h = pe(), i = V({
|
|
193
192
|
searchKey: "",
|
|
194
193
|
columnFilters: []
|
|
195
|
-
}),
|
|
194
|
+
}), o = [
|
|
196
195
|
{
|
|
197
196
|
header: "Reward title",
|
|
198
|
-
accessorFn: (
|
|
197
|
+
accessorFn: (a) => a.name
|
|
199
198
|
},
|
|
200
199
|
{
|
|
201
200
|
id: "type",
|
|
202
201
|
header: "Reward type",
|
|
203
|
-
accessorFn: (
|
|
204
|
-
cell(
|
|
205
|
-
return _[
|
|
202
|
+
accessorFn: (a) => a.type,
|
|
203
|
+
cell(a) {
|
|
204
|
+
return _[a.row.original.type].chip();
|
|
206
205
|
}
|
|
207
206
|
},
|
|
208
207
|
{
|
|
209
208
|
header: "Validity",
|
|
210
|
-
accessorFn: (
|
|
211
|
-
"validityOption" in
|
|
209
|
+
accessorFn: (a) => ue(
|
|
210
|
+
"validityOption" in a.options ? a.options.validityOption || {} : {}
|
|
212
211
|
)
|
|
213
212
|
},
|
|
214
213
|
{
|
|
@@ -216,11 +215,11 @@ const fe = {
|
|
|
216
215
|
meta: {
|
|
217
216
|
textAlign: "right"
|
|
218
217
|
},
|
|
219
|
-
accessorFn: (
|
|
218
|
+
accessorFn: (a) => a.currentReceive ?? 0
|
|
220
219
|
},
|
|
221
220
|
{
|
|
222
221
|
header: "Actions",
|
|
223
|
-
cell(
|
|
222
|
+
cell(a) {
|
|
224
223
|
return C("div", { class: "flex items-center justify-end gap-4" }, [
|
|
225
224
|
C(
|
|
226
225
|
$.FmMenu,
|
|
@@ -240,7 +239,7 @@ const fe = {
|
|
|
240
239
|
C($.FmMenuItem, {
|
|
241
240
|
label: "View collections",
|
|
242
241
|
onClick: async (t) => {
|
|
243
|
-
t.stopPropagation(), g(
|
|
242
|
+
t.stopPropagation(), g(a.row.original._id);
|
|
244
243
|
}
|
|
245
244
|
}),
|
|
246
245
|
// h(components.FmMenuItem, {
|
|
@@ -254,7 +253,7 @@ const fe = {
|
|
|
254
253
|
$.FmMenuItem,
|
|
255
254
|
{
|
|
256
255
|
onClick: async (t) => {
|
|
257
|
-
t.stopPropagation(), P(
|
|
256
|
+
t.stopPropagation(), P(a.row.original);
|
|
258
257
|
}
|
|
259
258
|
},
|
|
260
259
|
{
|
|
@@ -274,16 +273,16 @@ const fe = {
|
|
|
274
273
|
}
|
|
275
274
|
}
|
|
276
275
|
], y = N(
|
|
277
|
-
() => f.bundleRewards.filter((
|
|
276
|
+
() => f.bundleRewards.filter((a) => a.type == "VOUCHER")
|
|
278
277
|
), l = V();
|
|
279
|
-
function g(
|
|
278
|
+
function g(a) {
|
|
280
279
|
h.push({
|
|
281
280
|
name: k["$connect-STORE_REWARD_COLLECTIONS"],
|
|
282
|
-
params: { id:
|
|
281
|
+
params: { id: a }
|
|
283
282
|
});
|
|
284
283
|
}
|
|
285
|
-
async function P(
|
|
286
|
-
if (
|
|
284
|
+
async function P(a) {
|
|
285
|
+
if (a.type === "TITLE") {
|
|
287
286
|
await M.confirm(
|
|
288
287
|
"You cannot remove a title here, please remove it at the Program > Title section.",
|
|
289
288
|
"Delete reward",
|
|
@@ -296,14 +295,14 @@ const fe = {
|
|
|
296
295
|
"Delete reward"
|
|
297
296
|
) && await S(
|
|
298
297
|
async () => {
|
|
299
|
-
await D.deleteReward(
|
|
298
|
+
await D.deleteReward(a._id), await f.readMembership(), await f.readRewards();
|
|
300
299
|
},
|
|
301
300
|
{ message: "Deleting reward", successMessage: "Reward deleted" }
|
|
302
301
|
);
|
|
303
302
|
}
|
|
304
|
-
async function F(
|
|
303
|
+
async function F(a) {
|
|
305
304
|
var m;
|
|
306
|
-
const t =
|
|
305
|
+
const t = a ? oe(f.bundleRewards.find((c) => c._id === a)) : void 0;
|
|
307
306
|
if ((t == null ? void 0 : t.type) === "TITLE") {
|
|
308
307
|
await M.confirm(
|
|
309
308
|
"You cannot edit a title here, please edit it at the Program > Title section.",
|
|
@@ -317,17 +316,17 @@ const fe = {
|
|
|
317
316
|
type: "VOUCHER"
|
|
318
317
|
});
|
|
319
318
|
}
|
|
320
|
-
async function E(
|
|
319
|
+
async function E(a) {
|
|
321
320
|
await S(
|
|
322
321
|
async () => {
|
|
323
322
|
var t, m, c, R;
|
|
324
|
-
(t = l.value) != null && t.rewardImage &&
|
|
325
|
-
|
|
323
|
+
(t = l.value) != null && t.rewardImage && a.image ? await B.delete(a.image) : (m = l.value) != null && m.rewardImage && (a.image = await B.update(
|
|
324
|
+
a.image || B.collectibleImagePath(
|
|
326
325
|
void 0,
|
|
327
326
|
l.value.rewardImage
|
|
328
327
|
),
|
|
329
328
|
(c = l.value) == null ? void 0 : c.rewardImage
|
|
330
|
-
)),
|
|
329
|
+
)), a._id ? await D.updateReward(a._id, a) : await D.createReward(a), await f.readRewards(), (R = l.value) == null || R.showSheet(!1);
|
|
331
330
|
},
|
|
332
331
|
{
|
|
333
332
|
message: "Updating reward",
|
|
@@ -339,8 +338,8 @@ const fe = {
|
|
|
339
338
|
await A(async () => {
|
|
340
339
|
await f.readMembership(), await f.readRewards();
|
|
341
340
|
});
|
|
342
|
-
}), (
|
|
343
|
-
const m = p("FmPageHead"), c = p("FmMenuItem"), R = p("FmSearch"), T = p("FmTable"), L = p("FmButton"),
|
|
341
|
+
}), (a, t) => {
|
|
342
|
+
const m = p("FmPageHead"), c = p("FmMenuItem"), R = p("FmSearch"), T = p("FmTable"), L = p("FmButton"), b = p("FmCard");
|
|
344
343
|
return u(), I(j, null, [
|
|
345
344
|
n(m, {
|
|
346
345
|
title: "Rewards",
|
|
@@ -396,13 +395,13 @@ const fe = {
|
|
|
396
395
|
]),
|
|
397
396
|
n(T, {
|
|
398
397
|
"row-data": e(y),
|
|
399
|
-
"column-defs":
|
|
398
|
+
"column-defs": o,
|
|
400
399
|
"search-value": e(i).searchKey,
|
|
401
400
|
"column-filter": e(i).columnFilters,
|
|
402
401
|
onRowClick: t[6] || (t[6] = (d) => F(d.original._id)),
|
|
403
402
|
"hide-footer": e(y).length < 10
|
|
404
403
|
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
405
|
-
], 64)) : (u(), b
|
|
404
|
+
], 64)) : (u(), v(b, {
|
|
406
405
|
key: 1,
|
|
407
406
|
variant: "outlined",
|
|
408
407
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
@@ -430,5 +429,5 @@ const fe = {
|
|
|
430
429
|
}
|
|
431
430
|
});
|
|
432
431
|
export {
|
|
433
|
-
|
|
432
|
+
Ge as default
|
|
434
433
|
};
|