@feedmepos/mf-connect 0.1.69-prod → 0.1.71-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-dZcUmlqk.js → Analytic-DIzZEv_G.js} +10 -10
- package/dist/{App-CP-hV-3p.js → App-DrnbBc_l.js} +7 -7
- package/dist/{Bin-1phi-aIR.js → Bin-Bt_ru3Gd.js} +8 -8
- package/dist/{Broadcast-C7p-UzFt.js → Broadcast-Bn5ZjKqo.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYrrUiGF.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BojGwK_6.js} +6 -6
- package/dist/{Card-DQ9CN4Uf.js → Card-sBhDvBXT.js} +16 -16
- package/dist/Collections-Duct2pSH.js +520 -0
- package/dist/{Credit-CgnQ4PPH.js → Credit-D3mJTvRc.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DiC-2EB0.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-_60iFOeG.js} +30 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CU_KJo82.js → EffectSheet.vue_vue_type_style_index_0_lang-Sk5ub0FZ.js} +6 -6
- package/dist/{Experience-xF0tg8Dk.js → Experience-CIGwlErx.js} +8 -8
- package/dist/{Game-D14ky1ba.js → Game-Canf-7L-.js} +9 -9
- package/dist/{Index-yW7PkhSk.js → Index-25eVdVm7.js} +10 -10
- package/dist/{Marketing-DRvXqtU2.js → Marketing-krqaA6fv.js} +6 -6
- package/dist/{Member-_bof3r3n.js → Member-Bt0NaXiS.js} +10 -10
- package/dist/{MemberList-CCZ6hWys.js → MemberList-CXk-T9r2.js} +25 -25
- package/dist/{MemberTransactions-C9aq8zvp.js → MemberTransactions-Dg-A6a0v.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BJRqGOw0.js → MessageInput.vue_vue_type_script_setup_true_lang-DtpDrupj.js} +7 -7
- package/dist/{Mission-DK_197cn.js → Mission-CsxpvhsB.js} +9 -9
- package/dist/{Overview-CLhIgSIt.js → Overview-BUlq3MuQ.js} +18 -18
- package/dist/{Point-CeYwv2Ml.js → Point-DvPTk5wL.js} +8 -8
- package/dist/{Promotion-43LkVSrQ.js → Promotion-BWygpn4X.js} +9 -9
- package/dist/{Queue-D2xUJNk1.js → Queue-iD4D04Z-.js} +10 -10
- package/dist/{Record-BcgZ6xmc.js → Record-CritfdkX.js} +8 -8
- package/dist/{Reward-1faB12zI.js → Reward-DuZ73-kd.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BBaKKcMb.js → RewardGroup.vue_vue_type_script_setup_true_lang-B1073xkE.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Ds6fytIn.js → RuleGroup.vue_vue_type_script_setup_true_lang-1CJRrkoS.js} +13 -13
- package/dist/{Segment-PKmCcBlB.js → Segment-C8rNVlEi.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DB2XV6yA.js → SelectItems.vue_vue_type_script_setup_true_lang-BmWRTRMe.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CJJO40qe.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BaP2tykA.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-NvxO21UU.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CqICTY8X.js} +3 -3
- package/dist/{Setting-Hg7j7SOU.js → Setting-BwLCOkXJ.js} +12 -12
- package/dist/{SettingAdvertisements-BhJEUn0s.js → SettingAdvertisements-Bjw1RSKB.js} +11 -11
- package/dist/{Store-CWsS9CDU.js → Store-DEtsM22Y.js} +19 -19
- package/dist/{StoreRewards-B6nlpJKT.js → StoreRewards-DVzCi6nY.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DHDAyKox.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DKWElE0N.js} +19 -19
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CLTAGBUD.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CS_3d3zl.js} +1 -1
- package/dist/{Tier-D22gBdSC.js → Tier-qUFmMLZe.js} +19 -19
- package/dist/{Title-C_fVZE1b.js → Title-Qk0xODw6.js} +18 -18
- package/dist/{Transaction-DHcGCN6Y.js → Transaction-Be-VAdL0.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ci6hlCO5.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Lcgh9b36.js} +6 -6
- package/dist/{Voucher-CnYVMafC.js → Voucher-DjiXcyL2.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DeYs5HnB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DHySLFcf.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-YzHyStOB.js → ZodTextField.vue_vue_type_script_setup_true_lang-B0KU6cW2.js} +1 -1
- package/dist/{app-BZaMoaZh.js → app-BYt1acSS.js} +2163 -1107
- package/dist/{app-CR-6G5ya.js → app-CVDxFFOq.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-QVlWr5Oa.js → business-COPU_15m.js} +1 -1
- package/dist/{campaign-BbrGpGak.js → campaign-CANP8DZ7.js} +1 -1
- package/dist/{campaign-DnLFH51S.js → campaign-DRXh3QJ1.js} +9 -9
- package/dist/{campaign.enum-kQr7qhKY.js → campaign.enum-YFcT9qdL.js} +1 -1
- package/dist/{campaign.fn-x0bapd1e.js → campaign.fn-CF0vxr00.js} +116 -116
- package/dist/{collectible.enum-Dx7lCHBV.js → collectible.enum-CKyUdzxK.js} +1 -1
- package/dist/{collection.fn-O_MJ2WID.js → collection.fn-CLGxII_6.js} +2 -2
- package/dist/{dto-wS34PjkI.js → dto-D2FwEDQQ.js} +4 -4
- package/dist/{effect-CGbyGrZY.js → effect-C_AEVoTp.js} +1 -1
- package/dist/{email-addresses-9MIJJcVx.js → email-addresses-BWnpaUzY.js} +1 -1
- package/dist/{export-CV8urg2H.js → export-7MCVnb85.js} +3 -3
- package/dist/{helper-Bd6_Q-xw.js → helper-BwCpzGpj.js} +1 -1
- package/dist/{index-CMi3Van0.js → index-B776PH8X.js} +1 -1
- package/dist/{index-BN3ltUdq.js → index-B7v1Tn5m.js} +1 -1
- package/dist/{index-JGt4QJ6J.js → index-BCcnESMx.js} +1023 -1023
- package/dist/{index-DJWXPfjc.js → index-BRPLDaar.js} +2 -2
- package/dist/{index-DQqE8AZF.js → index-BWctDnVc.js} +3 -3
- package/dist/{index-Dd8nkF3o.js → index-BdTNXQvR.js} +1 -1
- package/dist/{index-DNbekOJ6.js → index-CY9fLTpI.js} +3 -3
- package/dist/{index-BY3_F6NN.js → index-CvWUVGAn.js} +1 -1
- package/dist/{index-BvMd-cvR.js → index-DMD1qL3R.js} +6 -6
- package/dist/{index-ryobEOJ3.js → index-D_Yyiihg.js} +1 -1
- package/dist/{index-C73eoANg.js → index-DhJ4RwuN.js} +1 -1
- package/dist/{index-Cm3jpKMn.js → index-doXz2Xnd.js} +1 -1
- package/dist/{index-CfkuglOp.js → index-vEDs6OGV.js} +4 -4
- package/dist/{index.esm2017-Dj2vWUjQ.js → index.esm2017-BwgUTaPG.js} +1 -1
- package/dist/{loading-ByVqAO0s.js → loading-CpAYlxoG.js} +1 -1
- package/dist/{membership-bIenV-r5.js → membership-CgJ7PFUR.js} +3 -3
- package/dist/{money-BCjG9V51.js → money-CQGmkTRp.js} +1 -1
- package/dist/{number-B-BpPwty.js → number-B_oM4a_k.js} +1 -1
- package/dist/{objectid-BybR4EVj.js → objectid-Dwu4f87A.js} +5 -5
- package/dist/{plugins-CTxDzq0e.js → plugins-Bo72kWn7.js} +2 -2
- package/dist/{reward-Ccb2zKD2.js → reward-CAhovk_1.js} +1 -1
- package/dist/{rule-DZ2TuXLh.js → rule-b2BC4jY8.js} +3 -3
- package/dist/{rule-builder-ByvbSBP0.js → rule-builder-w8uO1XAF.js} +1 -1
- package/dist/{template-D1AMCdZB.js → template-DDBscrPK.js} +4 -4
- package/dist/{timezone-eFG5cjuE.js → timezone-Di5x-2AC.js} +1 -1
- package/dist/{trigger-Bta6ze07.js → trigger-B9EDmE6z.js} +4 -4
- package/dist/{user-rDB9kCal.js → user-BCB96Qct.js} +1 -1
- package/dist/{vue-i18n-BMCWCmoc.js → vue-i18n-DddYl0c6.js} +317 -317
- package/dist/{xlsx-DbxMUoZt.js → xlsx-Dj8VVXnA.js} +166 -166
- package/package.json +1 -1
- package/dist/Collections-BN647eS7.js +0 -518
package/package.json
CHANGED
|
@@ -1,518 +0,0 @@
|
|
|
1
|
-
var ne = Object.defineProperty;
|
|
2
|
-
var re = (h, u, g) => u in h ? ne(h, u, { enumerable: !0, configurable: !0, writable: !0, value: g }) : h[u] = g;
|
|
3
|
-
var W = (h, u, g) => re(h, typeof u != "symbol" ? u + "" : u, g);
|
|
4
|
-
import { defineComponent as ee, ref as C, computed as I, watch as O, resolveComponent as m, openBlock as x, createBlock as H, unref as o, isRef as Q, withCtx as D, createElementVNode as v, createVNode as i, createElementBlock as E, Fragment as M, renderList as se, createCommentVNode as N, h as U, onMounted as ie } from "vue";
|
|
5
|
-
import { h as X } from "./moment-D7p2TMB-.js";
|
|
6
|
-
import { components as J } from "@feedmepos/ui-library";
|
|
7
|
-
import "./index-JGt4QJ6J.js";
|
|
8
|
-
import { J as ue } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
-
import { u as te } from "./loading-ByVqAO0s.js";
|
|
10
|
-
import { u as ce } from "./app-wDQR6dpb.js";
|
|
11
|
-
import { useRoute as oe, useRouter as de } from "vue-router";
|
|
12
|
-
import { c as ae, u as me } from "./campaign-BbrGpGak.js";
|
|
13
|
-
import { e as _ } from "./index-vh86FiIQ.js";
|
|
14
|
-
import { u as G, w as pe } from "./xlsx-DbxMUoZt.js";
|
|
15
|
-
import { g as fe } from "./user-rDB9kCal.js";
|
|
16
|
-
import { u as ge, _ as be } from "./usePagination-Ds-cuHop.js";
|
|
17
|
-
import { a as Z } from "./plugins-CTxDzq0e.js";
|
|
18
|
-
import { m as Ce } from "./index-C73eoANg.js";
|
|
19
|
-
import { o as he } from "./objectId-dwaoBfJX.js";
|
|
20
|
-
const ve = { class: "space-y-16" }, ye = { class: "gap-16 grid grid-cols-2" }, xe = { class: "flex items-center gap-8" }, Se = /* @__PURE__ */ ee({
|
|
21
|
-
__name: "CreateCollectionSheet",
|
|
22
|
-
emits: ["success"],
|
|
23
|
-
setup(h, { expose: u, emit: g }) {
|
|
24
|
-
const { minor: P } = te, B = oe(), S = C(), V = C(!1), T = g, b = C(!1);
|
|
25
|
-
function R(s) {
|
|
26
|
-
b.value = s, s && (n.value = {
|
|
27
|
-
quantity: 1,
|
|
28
|
-
code: "",
|
|
29
|
-
codeConfig: {
|
|
30
|
-
length: 8,
|
|
31
|
-
charset: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
32
|
-
prefix: "",
|
|
33
|
-
suffix: "",
|
|
34
|
-
pattern: "########"
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
const n = C({
|
|
39
|
-
quantity: 1,
|
|
40
|
-
code: "",
|
|
41
|
-
codeConfig: {
|
|
42
|
-
length: 8,
|
|
43
|
-
charset: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
44
|
-
prefix: "",
|
|
45
|
-
suffix: "",
|
|
46
|
-
pattern: "########"
|
|
47
|
-
}
|
|
48
|
-
}), L = [
|
|
49
|
-
{
|
|
50
|
-
label: "Bulk codes",
|
|
51
|
-
value: "bulk",
|
|
52
|
-
sublabel: "Bulk generate unique codes"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: "Custom code",
|
|
56
|
-
value: "single",
|
|
57
|
-
sublabel: "Enter your own custom codes"
|
|
58
|
-
}
|
|
59
|
-
], A = [
|
|
60
|
-
{
|
|
61
|
-
label: "Alphanumeric",
|
|
62
|
-
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: "Alphabetic",
|
|
66
|
-
value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
67
|
-
},
|
|
68
|
-
{ label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
|
|
69
|
-
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
70
|
-
{ label: "Numbers", value: "0123456789" },
|
|
71
|
-
{ label: "Custom", value: "" }
|
|
72
|
-
], w = C(A[0].value), p = C("bulk"), F = C(!1), $ = I(() => B.params.id);
|
|
73
|
-
async function q(s) {
|
|
74
|
-
var e;
|
|
75
|
-
await ((e = S.value) == null ? void 0 : e.validateInputs()), V.value && await P(
|
|
76
|
-
async () => {
|
|
77
|
-
await ae.createCollectionByCampaignId($.value, s), await T("success");
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
message: "Creating claim(s)",
|
|
81
|
-
successMessage: "Claim(s) created"
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
u({
|
|
86
|
-
showSheet: R
|
|
87
|
-
}), O(
|
|
88
|
-
() => p.value,
|
|
89
|
-
(s, e) => {
|
|
90
|
-
e != s && (n.value.code = "", n.value.codeConfig.length = 8, n.value.codeConfig.charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n.value.codeConfig.prefix = "", n.value.codeConfig.suffix = "", n.value.codeConfig.pattern = "########");
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
function f(s) {
|
|
94
|
-
if (p.value !== "single") return !1;
|
|
95
|
-
const e = s.split(`
|
|
96
|
-
`).map((k) => k.trim()).filter(Boolean);
|
|
97
|
-
return new Set(e).size !== e.length;
|
|
98
|
-
}
|
|
99
|
-
function z(s) {
|
|
100
|
-
return /[ \t]/.test(s);
|
|
101
|
-
}
|
|
102
|
-
return O(
|
|
103
|
-
() => n.value.codeConfig.length,
|
|
104
|
-
(s, e) => {
|
|
105
|
-
s != e && (n.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(s))));
|
|
106
|
-
}
|
|
107
|
-
), O(
|
|
108
|
-
() => n.value.codeConfig.pattern,
|
|
109
|
-
(s, e) => {
|
|
110
|
-
s != e && (n.value.codeConfig.length = (n.value.codeConfig.pattern.match(/#/g) || []).length);
|
|
111
|
-
}
|
|
112
|
-
), (s, e) => {
|
|
113
|
-
const k = m("FmRadio"), K = m("FmRadioGroup"), Y = m("FmSwitch"), l = m("FmStepperField"), a = m("FmSelect"), c = m("FmTextField"), d = m("FmTextarea"), r = m("FmForm"), y = m("FmButton"), j = m("FmSideSheet");
|
|
114
|
-
return x(), H(j, {
|
|
115
|
-
"max-width": 560,
|
|
116
|
-
"dismiss-away": !0,
|
|
117
|
-
header: "Create collection",
|
|
118
|
-
modelValue: o(b),
|
|
119
|
-
"onUpdate:modelValue": [
|
|
120
|
-
e[14] || (e[14] = (t) => Q(b) ? b.value = t : null),
|
|
121
|
-
e[15] || (e[15] = (t) => b.value = t)
|
|
122
|
-
]
|
|
123
|
-
}, {
|
|
124
|
-
"side-sheet-footer": D(() => [
|
|
125
|
-
v("div", xe, [
|
|
126
|
-
i(y, {
|
|
127
|
-
label: "Save",
|
|
128
|
-
onClick: e[12] || (e[12] = (t) => q(o(n))),
|
|
129
|
-
loading: o(ce)().isLoading
|
|
130
|
-
}, null, 8, ["loading"]),
|
|
131
|
-
i(y, {
|
|
132
|
-
label: "Cancel",
|
|
133
|
-
type: "button",
|
|
134
|
-
variant: "tertiary",
|
|
135
|
-
onClick: e[13] || (e[13] = (t) => b.value = !1)
|
|
136
|
-
})
|
|
137
|
-
])
|
|
138
|
-
]),
|
|
139
|
-
default: D(() => [
|
|
140
|
-
i(ue, { json: o(n) }, null, 8, ["json"]),
|
|
141
|
-
i(r, {
|
|
142
|
-
ref_key: "form",
|
|
143
|
-
ref: S,
|
|
144
|
-
class: "space-y-40",
|
|
145
|
-
onValidationSuccess: e[10] || (e[10] = (t) => V.value = !0),
|
|
146
|
-
onValidationFailed: e[11] || (e[11] = (t) => V.value = !1)
|
|
147
|
-
}, {
|
|
148
|
-
default: D(() => [
|
|
149
|
-
v("div", null, [
|
|
150
|
-
e[16] || (e[16] = v("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
|
|
151
|
-
i(K, {
|
|
152
|
-
modelValue: o(p),
|
|
153
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) => Q(p) ? p.value = t : null),
|
|
154
|
-
inline: !1
|
|
155
|
-
}, {
|
|
156
|
-
default: D(() => [
|
|
157
|
-
(x(), E(M, null, se(L, (t) => i(k, {
|
|
158
|
-
key: t.value,
|
|
159
|
-
value: t.value,
|
|
160
|
-
label: t.label,
|
|
161
|
-
sublabel: t.sublabel
|
|
162
|
-
}, null, 8, ["value", "label", "sublabel"])), 64))
|
|
163
|
-
]),
|
|
164
|
-
_: 1
|
|
165
|
-
}, 8, ["modelValue"])
|
|
166
|
-
]),
|
|
167
|
-
v("div", ve, [
|
|
168
|
-
e[17] || (e[17] = v("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
|
|
169
|
-
o(p) === "bulk" ? (x(), E(M, { key: 0 }, [
|
|
170
|
-
i(Y, {
|
|
171
|
-
"model-value": o(F),
|
|
172
|
-
"label-placement": "right",
|
|
173
|
-
value: "true",
|
|
174
|
-
label: "Advance code setting",
|
|
175
|
-
required: !0,
|
|
176
|
-
"onUpdate:modelValue": e[1] || (e[1] = () => F.value = !o(F))
|
|
177
|
-
}, null, 8, ["model-value"]),
|
|
178
|
-
o(F) ? (x(), E(M, { key: 0 }, [
|
|
179
|
-
i(l, {
|
|
180
|
-
modelValue: o(n).codeConfig.length,
|
|
181
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) => o(n).codeConfig.length = t),
|
|
182
|
-
label: "Code length",
|
|
183
|
-
max: 16,
|
|
184
|
-
min: 1,
|
|
185
|
-
rules: [
|
|
186
|
-
(t) => Number(t) >= 1 || "Code length must at least 1",
|
|
187
|
-
(t) => Number(t) <= 16 || "Code length must less than 16"
|
|
188
|
-
],
|
|
189
|
-
required: !0
|
|
190
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
191
|
-
i(a, {
|
|
192
|
-
label: "Charset",
|
|
193
|
-
"model-value": o(w),
|
|
194
|
-
items: A,
|
|
195
|
-
"helper-text": o(n).codeConfig.charset.length > 62 ? `${o(n).codeConfig.charset.substring(0, 62)}...` : o(n).codeConfig.charset,
|
|
196
|
-
"onUpdate:modelValue": e[3] || (e[3] = (t) => {
|
|
197
|
-
w.value = t, o(n).codeConfig.charset = t;
|
|
198
|
-
})
|
|
199
|
-
}, null, 8, ["model-value", "helper-text"]),
|
|
200
|
-
o(w) === "" ? (x(), H(c, {
|
|
201
|
-
key: 0,
|
|
202
|
-
modelValue: o(n).codeConfig.charset,
|
|
203
|
-
"onUpdate:modelValue": e[4] || (e[4] = (t) => o(n).codeConfig.charset = t),
|
|
204
|
-
label: "Custom Charset",
|
|
205
|
-
required: ""
|
|
206
|
-
}, null, 8, ["modelValue"])) : N("", !0),
|
|
207
|
-
v("div", ye, [
|
|
208
|
-
i(c, {
|
|
209
|
-
modelValue: o(n).codeConfig.prefix,
|
|
210
|
-
"onUpdate:modelValue": e[5] || (e[5] = (t) => o(n).codeConfig.prefix = t),
|
|
211
|
-
label: "Prefix (Optional)"
|
|
212
|
-
}, null, 8, ["modelValue"]),
|
|
213
|
-
i(c, {
|
|
214
|
-
modelValue: o(n).codeConfig.suffix,
|
|
215
|
-
"onUpdate:modelValue": e[6] || (e[6] = (t) => o(n).codeConfig.suffix = t),
|
|
216
|
-
label: "Suffix (Optional)"
|
|
217
|
-
}, null, 8, ["modelValue"])
|
|
218
|
-
]),
|
|
219
|
-
i(c, {
|
|
220
|
-
modelValue: o(n).codeConfig.pattern,
|
|
221
|
-
"onUpdate:modelValue": e[7] || (e[7] = (t) => o(n).codeConfig.pattern = t),
|
|
222
|
-
label: "Pattern",
|
|
223
|
-
required: !0
|
|
224
|
-
}, null, 8, ["modelValue"])
|
|
225
|
-
], 64)) : N("", !0),
|
|
226
|
-
i(c, {
|
|
227
|
-
modelValue: o(n).quantity,
|
|
228
|
-
"onUpdate:modelValue": e[8] || (e[8] = (t) => o(n).quantity = t),
|
|
229
|
-
label: "Number of code",
|
|
230
|
-
rules: [
|
|
231
|
-
(t) => t >= 1 || "Quantity cannot be less than 1",
|
|
232
|
-
(t) => t <= 1e4 || "Quantity cannot more than 10,000"
|
|
233
|
-
],
|
|
234
|
-
required: !0,
|
|
235
|
-
"helper-text": `${o(n).quantity} claim will be created`
|
|
236
|
-
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
237
|
-
], 64)) : N("", !0),
|
|
238
|
-
o(p) !== "bulk" ? (x(), H(d, {
|
|
239
|
-
key: 1,
|
|
240
|
-
modelValue: o(n).code,
|
|
241
|
-
"onUpdate:modelValue": e[9] || (e[9] = (t) => o(n).code = t),
|
|
242
|
-
label: "Custom Code",
|
|
243
|
-
rules: [
|
|
244
|
-
(t) => o(p) != "single" || !!t || "Custom code is required",
|
|
245
|
-
(t) => !f(t) || "Custom code must be unique",
|
|
246
|
-
(t) => !z(t) || "Custom code must not contain space"
|
|
247
|
-
],
|
|
248
|
-
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
249
|
-
}, null, 8, ["modelValue", "rules"])) : N("", !0)
|
|
250
|
-
])
|
|
251
|
-
]),
|
|
252
|
-
_: 1
|
|
253
|
-
}, 512)
|
|
254
|
-
]),
|
|
255
|
-
_: 1
|
|
256
|
-
}, 8, ["modelValue"]);
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
class Ve {
|
|
261
|
-
constructor() {
|
|
262
|
-
W(this, "data", []);
|
|
263
|
-
}
|
|
264
|
-
addRecord(u) {
|
|
265
|
-
this.data.push(u);
|
|
266
|
-
}
|
|
267
|
-
buildExcel() {
|
|
268
|
-
const u = G.book_new(), g = G.json_to_sheet(this.data);
|
|
269
|
-
return G.book_append_sheet(u, g, "Collection"), u;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
var we = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
|
|
273
|
-
const Fe = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ke = { class: "flex items-center justify-end py-4 xs:hidden" }, Ye = /* @__PURE__ */ ee({
|
|
274
|
-
__name: "Collections",
|
|
275
|
-
setup(h) {
|
|
276
|
-
function u(l) {
|
|
277
|
-
return l.hideInApp === !1;
|
|
278
|
-
}
|
|
279
|
-
const g = de(), P = oe(), B = C(), S = I(() => P.params.id), V = C(!1), { custom: T } = te;
|
|
280
|
-
function b(l) {
|
|
281
|
-
var a;
|
|
282
|
-
return (a = l._id) == null ? void 0 : a.toString();
|
|
283
|
-
}
|
|
284
|
-
function R(l) {
|
|
285
|
-
var d;
|
|
286
|
-
const a = (d = we.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = b(l);
|
|
287
|
-
return !a || !c ? "" : `${a}/c/${c}`;
|
|
288
|
-
}
|
|
289
|
-
function n(l) {
|
|
290
|
-
var d, r;
|
|
291
|
-
const a = (d = l.user) == null ? void 0 : d.toString(), c = (r = l.business) == null ? void 0 : r.toString();
|
|
292
|
-
return (l.balance || 0) > 0 && (!a || a === c);
|
|
293
|
-
}
|
|
294
|
-
async function L(l) {
|
|
295
|
-
const a = R(l);
|
|
296
|
-
a && await Z(a, {
|
|
297
|
-
successMessage: "Collection link copied to clipboard"
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
const A = me(), w = I(
|
|
301
|
-
() => A.campaigns.voucher.find(
|
|
302
|
-
(l) => {
|
|
303
|
-
var a;
|
|
304
|
-
return ((a = l._id) == null ? void 0 : a.toString()) === S.value;
|
|
305
|
-
}
|
|
306
|
-
)
|
|
307
|
-
), p = I(
|
|
308
|
-
() => !!w.value && !u(w.value)
|
|
309
|
-
), F = I(() => [
|
|
310
|
-
{
|
|
311
|
-
header: "ID/Code",
|
|
312
|
-
accessorKey: "_id",
|
|
313
|
-
cell(l) {
|
|
314
|
-
return U("div", { class: "flex items-center" }, [
|
|
315
|
-
U(J.FmIcon, {
|
|
316
|
-
name: "content_copy",
|
|
317
|
-
outline: !0,
|
|
318
|
-
size: "sm",
|
|
319
|
-
class: "cursor-pointer mr-4",
|
|
320
|
-
onClick: (a) => {
|
|
321
|
-
a.preventDefault(), a.stopPropagation(), Z(
|
|
322
|
-
l.row.original.code || l.row.original._id.toString()
|
|
323
|
-
);
|
|
324
|
-
}
|
|
325
|
-
}),
|
|
326
|
-
U(
|
|
327
|
-
"div",
|
|
328
|
-
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
329
|
-
l.row.original.code || l.row.original._id.toString()
|
|
330
|
-
)
|
|
331
|
-
]);
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
header: "User",
|
|
336
|
-
accessorKey: "user",
|
|
337
|
-
enableSorting: !1,
|
|
338
|
-
cell(l) {
|
|
339
|
-
const a = l.row.original.pf_user;
|
|
340
|
-
return fe(a);
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
header: "Phone",
|
|
345
|
-
accessorFn: (l) => {
|
|
346
|
-
var a;
|
|
347
|
-
return ((a = l.pf_user) == null ? void 0 : a.phoneNumber) || "-";
|
|
348
|
-
},
|
|
349
|
-
accessorKey: "pf_user.phoneNumber"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
header: "Balance",
|
|
353
|
-
accessorKey: "balance"
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
header: "Created at",
|
|
357
|
-
accessorKey: "_id",
|
|
358
|
-
accessorFn: (l) => X(he(l._id.toString())).format("DD MMM YYYY")
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
header: "Nearest expired at",
|
|
362
|
-
accessorKey: "expiryBalance",
|
|
363
|
-
accessorFn: (l) => {
|
|
364
|
-
var a;
|
|
365
|
-
return l.expiryBalance && l.expiryBalance.length ? X((a = l.expiryBalance) == null ? void 0 : a[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
...p.value ? [
|
|
369
|
-
{
|
|
370
|
-
header: "Actions",
|
|
371
|
-
accessorKey: "actions",
|
|
372
|
-
enableSorting: !1,
|
|
373
|
-
meta: {
|
|
374
|
-
maxWidth: "72px"
|
|
375
|
-
},
|
|
376
|
-
cell(l) {
|
|
377
|
-
return n(l.row.original) ? U("div", { class: "flex items-center justify-center" }, [
|
|
378
|
-
U(J.FmButton, {
|
|
379
|
-
icon: "share",
|
|
380
|
-
variant: "tertiary",
|
|
381
|
-
iconColor: "neutral-gray-400",
|
|
382
|
-
onClick: async (a) => {
|
|
383
|
-
a.preventDefault(), a.stopPropagation(), await L(l.row.original);
|
|
384
|
-
}
|
|
385
|
-
})
|
|
386
|
-
]) : U(
|
|
387
|
-
"div",
|
|
388
|
-
{
|
|
389
|
-
class: "flex items-center justify-center text-fm-color-typo-disabled"
|
|
390
|
-
},
|
|
391
|
-
"-"
|
|
392
|
-
);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
] : []
|
|
396
|
-
]), $ = {
|
|
397
|
-
"$connect-STORE_REWARD_COLLECTIONS": Ce.readCollectionsByRewardId,
|
|
398
|
-
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": ae.readCollectionsByCampaignId
|
|
399
|
-
}, q = (l) => {
|
|
400
|
-
const a = $[P.name];
|
|
401
|
-
return (c) => a(l, c);
|
|
402
|
-
}, { tableMeta: f, rowData: z, onSort: s, debouncedFetchData: e, onSearch: k } = ge(q(S.value));
|
|
403
|
-
async function K() {
|
|
404
|
-
var l;
|
|
405
|
-
await e(), (l = B.value) == null || l.showSheet(!1);
|
|
406
|
-
}
|
|
407
|
-
async function Y() {
|
|
408
|
-
V.value || T(
|
|
409
|
-
async () => {
|
|
410
|
-
const l = new Ve(), a = q(S.value), c = (await a({
|
|
411
|
-
limit: 1,
|
|
412
|
-
skip: 0,
|
|
413
|
-
sortBy: _.sortBy,
|
|
414
|
-
descending: _.descending
|
|
415
|
-
})).meta.totalResources ?? 0, d = _.rowsPerPage;
|
|
416
|
-
for (let r = 0; r < c; r += d) {
|
|
417
|
-
const y = {
|
|
418
|
-
..._,
|
|
419
|
-
limit: d,
|
|
420
|
-
skip: r,
|
|
421
|
-
sortBy: _.sortBy,
|
|
422
|
-
descending: _.descending
|
|
423
|
-
}, j = await a(y);
|
|
424
|
-
for await (const t of j.resources) {
|
|
425
|
-
const le = {
|
|
426
|
-
Id: b(t),
|
|
427
|
-
Balance: (t == null ? void 0 : t.balance) || 0,
|
|
428
|
-
Url: R(t)
|
|
429
|
-
};
|
|
430
|
-
l.addRecord(le);
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
await pe(
|
|
434
|
-
l.buildExcel(),
|
|
435
|
-
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
436
|
-
{
|
|
437
|
-
bookType: "xlsx",
|
|
438
|
-
bookSST: !1,
|
|
439
|
-
type: "array"
|
|
440
|
-
}
|
|
441
|
-
);
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
isLoading: V
|
|
445
|
-
}
|
|
446
|
-
);
|
|
447
|
-
}
|
|
448
|
-
return ie(async () => {
|
|
449
|
-
await e();
|
|
450
|
-
}), (l, a) => {
|
|
451
|
-
const c = m("FmPageHead"), d = m("FmSearch");
|
|
452
|
-
return x(), E(M, null, [
|
|
453
|
-
i(c, {
|
|
454
|
-
title: "Collections",
|
|
455
|
-
"back-button": !0,
|
|
456
|
-
actions: [
|
|
457
|
-
{ label: "Export", value: "export", isPrimary: !1 },
|
|
458
|
-
...o(p) ? [
|
|
459
|
-
{
|
|
460
|
-
label: "Create collection",
|
|
461
|
-
value: "create",
|
|
462
|
-
isPrimary: !0
|
|
463
|
-
}
|
|
464
|
-
] : []
|
|
465
|
-
],
|
|
466
|
-
"onClick:back": a[0] || (a[0] = (r) => o(g).back()),
|
|
467
|
-
"onClick:action": a[1] || (a[1] = (r) => {
|
|
468
|
-
var y;
|
|
469
|
-
r === "create" && ((y = o(B)) == null || y.showSheet(!0)), r === "export" && Y();
|
|
470
|
-
})
|
|
471
|
-
}, null, 8, ["actions"]),
|
|
472
|
-
v("div", Fe, [
|
|
473
|
-
i(d, {
|
|
474
|
-
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
475
|
-
modelValue: o(f).searchValue,
|
|
476
|
-
"onUpdate:modelValue": [
|
|
477
|
-
a[2] || (a[2] = (r) => o(f).searchValue = r),
|
|
478
|
-
o(k)
|
|
479
|
-
],
|
|
480
|
-
placeholder: "Search",
|
|
481
|
-
collapsible: ""
|
|
482
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
483
|
-
v("div", ke, [
|
|
484
|
-
i(d, {
|
|
485
|
-
modelValue: o(f).searchValue,
|
|
486
|
-
"onUpdate:modelValue": [
|
|
487
|
-
a[3] || (a[3] = (r) => o(f).searchValue = r),
|
|
488
|
-
o(k)
|
|
489
|
-
],
|
|
490
|
-
placeholder: "Search",
|
|
491
|
-
collapsible: ""
|
|
492
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
493
|
-
]),
|
|
494
|
-
i(be, {
|
|
495
|
-
loading: o(f).isLoading,
|
|
496
|
-
"row-data": o(z),
|
|
497
|
-
"column-defs": o(F),
|
|
498
|
-
"row-count": o(f).totalRows,
|
|
499
|
-
"page-count": o(f).pageCount,
|
|
500
|
-
"page-index": o(f).pageIndex,
|
|
501
|
-
"page-size": o(f).pageSize,
|
|
502
|
-
"shrink-at": !1,
|
|
503
|
-
onSortChange: o(s),
|
|
504
|
-
onPageChange: a[4] || (a[4] = (r) => o(e)({ pageSize: r.pageSize, pageIndex: r.pageIndex }))
|
|
505
|
-
}, null, 8, ["loading", "row-data", "column-defs", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
506
|
-
i(Se, {
|
|
507
|
-
ref_key: "sheetRef",
|
|
508
|
-
ref: B,
|
|
509
|
-
onSuccess: K
|
|
510
|
-
}, null, 512)
|
|
511
|
-
])
|
|
512
|
-
], 64);
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
export {
|
|
517
|
-
Ye as default
|
|
518
|
-
};
|