@feedmepos/mf-connect 0.1.63-prod → 0.1.65-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-CG3hA6fW.js → Analytic-C5DE9NQJ.js} +27 -28
- package/dist/{App-CQUFVNES.js → App-DgEd6GLa.js} +7 -7
- package/dist/{Bin-whBityJo.js → Bin-DyWpGeoP.js} +8 -8
- package/dist/{Broadcast-BRgmIWF2.js → Broadcast-eqjJulx4.js} +10 -11
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DfATb_0G.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BfgttR2V.js} +6 -6
- package/dist/{Card-BgIT9bSV.js → Card-hFexO-iT.js} +16 -16
- package/dist/{Collections-DgBll2HL.js → Collections-BtBugjnH.js} +179 -165
- package/dist/{Credit-FVqQqTve.js → Credit-98wQjJxS.js} +10 -11
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CIApefkS.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-IrMeqHYK.js} +31 -31
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CVRvxR02.js → EffectSheet.vue_vue_type_style_index_0_lang-QM5-F282.js} +6 -6
- package/dist/{Experience-C23g_MfA.js → Experience-eVl9fAYr.js} +27 -28
- package/dist/{Game-CqbQTIqS.js → Game-C1oQthuo.js} +11 -12
- package/dist/{Index-D32I90Uf.js → Index-BACzirfP.js} +10 -10
- package/dist/{Marketing-ApmF9GMZ.js → Marketing-BOuh3JQF.js} +6 -6
- package/dist/{Member-p-MDnwdo.js → Member-DHcw5SAF.js} +10 -10
- package/dist/{MemberList-CWS216Oq.js → MemberList-BNVIjVXb.js} +25 -25
- package/dist/{MemberTransactions-1NaCYExP.js → MemberTransactions-DMpNrtT4.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Ds28eMF3.js → MessageInput.vue_vue_type_script_setup_true_lang-MYkwax61.js} +7 -7
- package/dist/{Mission-D2EklQ6k.js → Mission-O9thc-xh.js} +19 -20
- package/dist/{Overview-Q2_jChHL.js → Overview-DYDTEJpf.js} +18 -18
- package/dist/{Point-D7IFoiQ5.js → Point-AoMfVDyc.js} +10 -11
- package/dist/{Promotion-BMKAj_VJ.js → Promotion-Bdmmnd5n.js} +11 -12
- package/dist/{Queue-CckukUf2.js → Queue-C59v4zpR.js} +10 -10
- package/dist/{Record-sjJx9Rxr.js → Record-DJimfMy6.js} +8 -8
- package/dist/{Reward-C33_2GAs.js → Reward-DoRA5oe0.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-4Ah1HGJW.js → RewardGroup.vue_vue_type_script_setup_true_lang-ys_Vh6MC.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CpDZBVmB.js → RuleGroup.vue_vue_type_script_setup_true_lang-ClQbIu9q.js} +13 -13
- package/dist/{Segment-CR4_Y82e.js → Segment-B1bvEg9R.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CDZw5i96.js → SelectItems.vue_vue_type_script_setup_true_lang-BKdjRWtr.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-pW_AdLpP.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CDOOVRwr.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BS62Yf0v.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CvZRK_DV.js} +3 -3
- package/dist/{Setting-D4RTLzZM.js → Setting-puwRxs7w.js} +12 -12
- package/dist/{SettingAdvertisements-Cc9IMI41.js → SettingAdvertisements-D0e9lyCy.js} +65 -63
- package/dist/Store-BSbLeEpY.js +1924 -0
- package/dist/{StoreRewards-CzrZS5Au.js → StoreRewards-DDtlg3wU.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Ci3xQrAn.js → StoreTransactions.vue_vue_type_script_setup_true_lang-xWPIvf68.js} +361 -343
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DG7dPhv0.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-6gvUWrB_.js} +1 -1
- package/dist/{Tier-9-iKsHxM.js → Tier-C3ZY5wI7.js} +97 -98
- package/dist/{Title-C6TY3BbS.js → Title-D9FHvMc0.js} +27 -28
- package/dist/{Transaction-BGxgNf0y.js → Transaction-hopVsT0g.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-xiH9sxVn.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CsL3d7xM.js} +6 -6
- package/dist/{Voucher-Cdh0PqeF.js → Voucher-D1WfKPnA.js} +132 -117
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BRw2nedI.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BCorf-T-.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D6En5sRQ.js → ZodTextField.vue_vue_type_script_setup_true_lang-fp4U_C6t.js} +1 -1
- package/dist/{app-DIFcDSPz.js → app-BOEkcROx.js} +1 -1
- package/dist/{app-qOoNoXsj.js → app-VcIY7uz8.js} +496 -454
- package/dist/app.js +1 -1
- package/dist/{business-D8WOIwU3.js → business-CxrnbBG7.js} +1 -1
- package/dist/{campaign-B5Zcg5dG.js → campaign-DOOGvk7s.js} +9 -9
- package/dist/campaign-OdVtlvIh.js +213 -0
- package/dist/{campaign.enum-BVGqtpbT.js → campaign.enum-jzknDWsU.js} +1 -1
- package/dist/{campaign.fn-BJksX0lC.js → campaign.fn-C8KE-0gy.js} +40 -40
- package/dist/{collectible.enum-CDt5sCg-.js → collectible.enum-GH2dIJq0.js} +1 -1
- package/dist/{collection.fn-BmkwrIEt.js → collection.fn-BAhwf5Jh.js} +2 -2
- package/dist/{dto-BazhL1Wz.js → dto-B7m1l1UL.js} +4 -4
- package/dist/{effect-CERxlyga.js → effect-Cu0scI-k.js} +1 -1
- package/dist/{email-addresses-XWcL2s8u.js → email-addresses-C0c1x8Vz.js} +1 -1
- package/dist/{export-Ctk6xkHX.js → export-BR2VkJmz.js} +3 -3
- package/dist/{helper-C36sBB0k.js → helper-DNkQl8J2.js} +1 -1
- package/dist/{index-CYHzkVmf.js → index-BsQsj910.js} +3 -3
- package/dist/{index-BHPj_XYw.js → index-ByfJpxsf.js} +4 -4
- package/dist/{index-B9gRFG1Q.js → index-C23lCiVv.js} +1 -1
- package/dist/{index-Dz55oJOD.js → index-CO55xRbh.js} +530 -523
- package/dist/{index-D-cA3r-f.js → index-C_rW5Zzv.js} +1 -1
- package/dist/{index-1xCqie-s.js → index-CszV-kA7.js} +1 -1
- package/dist/{index-COJnc6ip.js → index-DWMboOMi.js} +1 -1
- package/dist/{index-Dr1iOdke.js → index-Dfi4M9Ap.js} +112 -104
- package/dist/{index-BSdS5JkE.js → index-DlgPQvBd.js} +1 -1
- package/dist/{index-BGirRSvf.js → index-Drvx6WWC.js} +1 -1
- package/dist/{index-Ctu4ZSkP.js → index-RkjhZsEw.js} +1 -1
- package/dist/{index-BhcuNARt.js → index-WCOWzb_D.js} +3 -3
- package/dist/{index-BAjS-mNm.js → index-WY8Y3SjU.js} +3 -3
- package/dist/{index.esm2017-CwEbNcAn.js → index.esm2017-DBFvix-C.js} +1 -1
- package/dist/{loading-DsAWzrAU.js → loading-DfP4ZQcW.js} +1 -1
- package/dist/{membership-CIWA-YIz.js → membership-CiLwVV-2.js} +3 -3
- package/dist/{money-B8_RYpfI.js → money-B92Ui9aH.js} +1 -1
- package/dist/{number-ClNyxrPX.js → number-CHYDMZpy.js} +1 -1
- package/dist/{objectid-B7Hb21TR.js → objectid-CsToJ4hH.js} +6 -6
- package/dist/{plugins-BaCcQwW_.js → plugins-GAf1L8Pd.js} +2 -2
- package/dist/{reward-Br3L7Y4x.js → reward-FLVXCKuH.js} +1 -1
- package/dist/{rule-CELh8Paa.js → rule-BHV4bC-1.js} +3 -3
- package/dist/{rule-builder-Dw3JpYy8.js → rule-builder-5WcDxoUM.js} +1 -1
- package/dist/{template-BIOneLeZ.js → template-C-y0046H.js} +4 -4
- package/dist/{timezone-Jr40C0YQ.js → timezone-Bdf9qSCF.js} +1 -1
- package/dist/{trigger-Bl_yRkKF.js → trigger-CjZQ4Gch.js} +4 -4
- package/dist/{user-C3J0hjK-.js → user-C5qgJUwB.js} +1 -1
- package/dist/{vue-i18n-DbCbvmTz.js → vue-i18n-6i4pn5bC.js} +99 -99
- package/dist/{xlsx-ClGRNHcc.js → xlsx-C4iuxJ6i.js} +166 -166
- package/package.json +1 -1
- package/dist/Store-BTE44D1j.js +0 -1842
- package/dist/campaign-IEgssyOs.js +0 -94
- package/dist/index-DTvC-nBb.js +0 -124
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var te = Object.defineProperty;
|
|
2
|
-
var ae = (g, i,
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { h as
|
|
2
|
+
var ae = (g, i, c) => i in g ? te(g, i, { enumerable: !0, configurable: !0, writable: !0, value: c }) : g[i] = c;
|
|
3
|
+
var J = (g, i, c) => ae(g, typeof i != "symbol" ? i + "" : i, c);
|
|
4
|
+
import { defineComponent as X, ref as f, computed as A, watch as O, resolveComponent as d, openBlock as S, createBlock as K, unref as o, isRef as Q, withCtx as P, createElementVNode as v, createVNode as r, createElementBlock as D, Fragment as E, renderList as le, createCommentVNode as q, onMounted as ne, h as j } from "vue";
|
|
5
|
+
import { h as W } from "./moment-D7p2TMB-.js";
|
|
6
6
|
import { components as se } from "@feedmepos/ui-library";
|
|
7
|
-
import "./index-
|
|
7
|
+
import "./index-WY8Y3SjU.js";
|
|
8
8
|
import { J as re } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
-
import { u as
|
|
9
|
+
import { u as Z } from "./loading-DfP4ZQcW.js";
|
|
10
10
|
import { u as ie } from "./app-wDQR6dpb.js";
|
|
11
|
-
import { useRoute as
|
|
12
|
-
import { c as
|
|
11
|
+
import { useRoute as ee, useRouter as ue } from "vue-router";
|
|
12
|
+
import { c as M, u as de } from "./campaign-OdVtlvIh.js";
|
|
13
13
|
import { e as p } from "./index-vh86FiIQ.js";
|
|
14
|
-
import { u as
|
|
15
|
-
import { g as
|
|
16
|
-
import { u as
|
|
17
|
-
import { a as
|
|
18
|
-
import { m as
|
|
19
|
-
import { o as
|
|
20
|
-
const
|
|
14
|
+
import { u as G, w as ce } from "./xlsx-C4iuxJ6i.js";
|
|
15
|
+
import { g as me } from "./user-C5qgJUwB.js";
|
|
16
|
+
import { u as pe, _ as fe } from "./usePagination-Ds-cuHop.js";
|
|
17
|
+
import { a as ge } from "./plugins-GAf1L8Pd.js";
|
|
18
|
+
import { m as Ce } from "./index-CszV-kA7.js";
|
|
19
|
+
import { o as be } from "./objectId-dwaoBfJX.js";
|
|
20
|
+
const ve = { class: "space-y-16" }, he = { class: "gap-16 grid grid-cols-2" }, ye = { class: "flex items-center gap-8" }, xe = /* @__PURE__ */ X({
|
|
21
21
|
__name: "CreateCollectionSheet",
|
|
22
22
|
emits: ["success"],
|
|
23
|
-
setup(g, { expose: i, emit:
|
|
24
|
-
const { minor:
|
|
25
|
-
function
|
|
23
|
+
setup(g, { expose: i, emit: c }) {
|
|
24
|
+
const { minor: I } = Z, k = ee(), h = f(), V = f(!1), L = c, C = f(!1);
|
|
25
|
+
function U(s) {
|
|
26
26
|
C.value = s, s && (a.value = {
|
|
27
27
|
quantity: 1,
|
|
28
28
|
code: "",
|
|
@@ -45,7 +45,7 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
45
45
|
suffix: "",
|
|
46
46
|
pattern: "########"
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), T = [
|
|
49
49
|
{
|
|
50
50
|
label: "Bulk codes",
|
|
51
51
|
value: "bulk",
|
|
@@ -56,7 +56,7 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
56
56
|
value: "single",
|
|
57
57
|
sublabel: "Enter your own custom codes"
|
|
58
58
|
}
|
|
59
|
-
],
|
|
59
|
+
], R = [
|
|
60
60
|
{
|
|
61
61
|
label: "Alphanumeric",
|
|
62
62
|
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
@@ -69,12 +69,12 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
69
69
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
70
70
|
{ label: "Numbers", value: "0123456789" },
|
|
71
71
|
{ label: "Custom", value: "" }
|
|
72
|
-
],
|
|
73
|
-
async function
|
|
72
|
+
], _ = f(R[0].value), n = f("bulk"), w = f(!1), z = A(() => k.params.id);
|
|
73
|
+
async function B(s) {
|
|
74
74
|
var e;
|
|
75
|
-
await ((e =
|
|
75
|
+
await ((e = h.value) == null ? void 0 : e.validateInputs()), V.value && await I(
|
|
76
76
|
async () => {
|
|
77
|
-
await
|
|
77
|
+
await M.createCollectionByCampaignId(z.value, s), await L("success");
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
message: "Creating claim(s)",
|
|
@@ -83,52 +83,52 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
i({
|
|
86
|
-
showSheet:
|
|
87
|
-
}),
|
|
88
|
-
() =>
|
|
86
|
+
showSheet: U
|
|
87
|
+
}), O(
|
|
88
|
+
() => n.value,
|
|
89
89
|
(s, e) => {
|
|
90
90
|
e != s && (a.value.code = "", a.value.codeConfig.length = 8, a.value.codeConfig.charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", a.value.codeConfig.prefix = "", a.value.codeConfig.suffix = "", a.value.codeConfig.pattern = "########");
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
|
-
function
|
|
94
|
-
if (
|
|
93
|
+
function N(s) {
|
|
94
|
+
if (n.value !== "single") return !1;
|
|
95
95
|
const e = s.split(`
|
|
96
|
-
`).map((
|
|
96
|
+
`).map((l) => l.trim()).filter(Boolean);
|
|
97
97
|
return new Set(e).size !== e.length;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Y(s) {
|
|
100
100
|
return /[ \t]/.test(s);
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return O(
|
|
103
103
|
() => a.value.codeConfig.length,
|
|
104
104
|
(s, e) => {
|
|
105
105
|
s != e && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(s))));
|
|
106
106
|
}
|
|
107
|
-
),
|
|
107
|
+
), O(
|
|
108
108
|
() => a.value.codeConfig.pattern,
|
|
109
109
|
(s, e) => {
|
|
110
110
|
s != e && (a.value.codeConfig.length = (a.value.codeConfig.pattern.match(/#/g) || []).length);
|
|
111
111
|
}
|
|
112
112
|
), (s, e) => {
|
|
113
|
-
const
|
|
114
|
-
return
|
|
113
|
+
const l = d("FmRadio"), b = d("FmRadioGroup"), y = d("FmSwitch"), u = d("FmStepperField"), F = d("FmSelect"), x = d("FmTextField"), m = d("FmTextarea"), $ = d("FmForm"), H = d("FmButton"), oe = d("FmSideSheet");
|
|
114
|
+
return S(), K(oe, {
|
|
115
115
|
"max-width": 560,
|
|
116
116
|
"dismiss-away": !0,
|
|
117
117
|
header: "Create collection",
|
|
118
118
|
modelValue: o(C),
|
|
119
119
|
"onUpdate:modelValue": [
|
|
120
|
-
e[14] || (e[14] = (t) =>
|
|
120
|
+
e[14] || (e[14] = (t) => Q(C) ? C.value = t : null),
|
|
121
121
|
e[15] || (e[15] = (t) => C.value = t)
|
|
122
122
|
]
|
|
123
123
|
}, {
|
|
124
|
-
"side-sheet-footer":
|
|
125
|
-
|
|
126
|
-
r(
|
|
124
|
+
"side-sheet-footer": P(() => [
|
|
125
|
+
v("div", ye, [
|
|
126
|
+
r(H, {
|
|
127
127
|
label: "Save",
|
|
128
|
-
onClick: e[12] || (e[12] = (t) =>
|
|
128
|
+
onClick: e[12] || (e[12] = (t) => B(o(a))),
|
|
129
129
|
loading: o(ie)().isLoading
|
|
130
130
|
}, null, 8, ["loading"]),
|
|
131
|
-
r(
|
|
131
|
+
r(H, {
|
|
132
132
|
label: "Cancel",
|
|
133
133
|
type: "button",
|
|
134
134
|
variant: "tertiary",
|
|
@@ -136,25 +136,25 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
136
136
|
})
|
|
137
137
|
])
|
|
138
138
|
]),
|
|
139
|
-
default:
|
|
139
|
+
default: P(() => [
|
|
140
140
|
r(re, { json: o(a) }, null, 8, ["json"]),
|
|
141
|
-
r(
|
|
141
|
+
r($, {
|
|
142
142
|
ref_key: "form",
|
|
143
|
-
ref:
|
|
143
|
+
ref: h,
|
|
144
144
|
class: "space-y-40",
|
|
145
|
-
onValidationSuccess: e[10] || (e[10] = (t) =>
|
|
146
|
-
onValidationFailed: e[11] || (e[11] = (t) =>
|
|
145
|
+
onValidationSuccess: e[10] || (e[10] = (t) => V.value = !0),
|
|
146
|
+
onValidationFailed: e[11] || (e[11] = (t) => V.value = !1)
|
|
147
147
|
}, {
|
|
148
|
-
default:
|
|
149
|
-
|
|
150
|
-
e[16] || (e[16] =
|
|
151
|
-
r(
|
|
152
|
-
modelValue: o(
|
|
153
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) =>
|
|
148
|
+
default: P(() => [
|
|
149
|
+
v("div", null, [
|
|
150
|
+
e[16] || (e[16] = v("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
|
|
151
|
+
r(b, {
|
|
152
|
+
modelValue: o(n),
|
|
153
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => Q(n) ? n.value = t : null),
|
|
154
154
|
inline: !1
|
|
155
155
|
}, {
|
|
156
|
-
default:
|
|
157
|
-
(
|
|
156
|
+
default: P(() => [
|
|
157
|
+
(S(), D(E, null, le(T, (t) => r(l, {
|
|
158
158
|
key: t.value,
|
|
159
159
|
value: t.value,
|
|
160
160
|
label: t.label,
|
|
@@ -164,19 +164,19 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
164
164
|
_: 1
|
|
165
165
|
}, 8, ["modelValue"])
|
|
166
166
|
]),
|
|
167
|
-
|
|
168
|
-
e[17] || (e[17] =
|
|
169
|
-
o(
|
|
170
|
-
r(
|
|
171
|
-
"model-value": o(
|
|
167
|
+
v("div", ve, [
|
|
168
|
+
e[17] || (e[17] = v("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
|
|
169
|
+
o(n) === "bulk" ? (S(), D(E, { key: 0 }, [
|
|
170
|
+
r(y, {
|
|
171
|
+
"model-value": o(w),
|
|
172
172
|
"label-placement": "right",
|
|
173
173
|
value: "true",
|
|
174
174
|
label: "Advance code setting",
|
|
175
175
|
required: !0,
|
|
176
|
-
"onUpdate:modelValue": e[1] || (e[1] = () =>
|
|
176
|
+
"onUpdate:modelValue": e[1] || (e[1] = () => w.value = !o(w))
|
|
177
177
|
}, null, 8, ["model-value"]),
|
|
178
|
-
o(
|
|
179
|
-
r(
|
|
178
|
+
o(w) ? (S(), D(E, { key: 0 }, [
|
|
179
|
+
r(u, {
|
|
180
180
|
modelValue: o(a).codeConfig.length,
|
|
181
181
|
"onUpdate:modelValue": e[2] || (e[2] = (t) => o(a).codeConfig.length = t),
|
|
182
182
|
label: "Code length",
|
|
@@ -188,42 +188,42 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
188
188
|
],
|
|
189
189
|
required: !0
|
|
190
190
|
}, null, 8, ["modelValue", "rules"]),
|
|
191
|
-
r(
|
|
191
|
+
r(F, {
|
|
192
192
|
label: "Charset",
|
|
193
|
-
"model-value": o(
|
|
194
|
-
items:
|
|
193
|
+
"model-value": o(_),
|
|
194
|
+
items: R,
|
|
195
195
|
"helper-text": o(a).codeConfig.charset.length > 62 ? `${o(a).codeConfig.charset.substring(0, 62)}...` : o(a).codeConfig.charset,
|
|
196
196
|
"onUpdate:modelValue": e[3] || (e[3] = (t) => {
|
|
197
|
-
|
|
197
|
+
_.value = t, o(a).codeConfig.charset = t;
|
|
198
198
|
})
|
|
199
199
|
}, null, 8, ["model-value", "helper-text"]),
|
|
200
|
-
o(
|
|
200
|
+
o(_) === "" ? (S(), K(x, {
|
|
201
201
|
key: 0,
|
|
202
202
|
modelValue: o(a).codeConfig.charset,
|
|
203
203
|
"onUpdate:modelValue": e[4] || (e[4] = (t) => o(a).codeConfig.charset = t),
|
|
204
204
|
label: "Custom Charset",
|
|
205
205
|
required: ""
|
|
206
|
-
}, null, 8, ["modelValue"])) :
|
|
207
|
-
|
|
208
|
-
r(
|
|
206
|
+
}, null, 8, ["modelValue"])) : q("", !0),
|
|
207
|
+
v("div", he, [
|
|
208
|
+
r(x, {
|
|
209
209
|
modelValue: o(a).codeConfig.prefix,
|
|
210
210
|
"onUpdate:modelValue": e[5] || (e[5] = (t) => o(a).codeConfig.prefix = t),
|
|
211
211
|
label: "Prefix (Optional)"
|
|
212
212
|
}, null, 8, ["modelValue"]),
|
|
213
|
-
r(
|
|
213
|
+
r(x, {
|
|
214
214
|
modelValue: o(a).codeConfig.suffix,
|
|
215
215
|
"onUpdate:modelValue": e[6] || (e[6] = (t) => o(a).codeConfig.suffix = t),
|
|
216
216
|
label: "Suffix (Optional)"
|
|
217
217
|
}, null, 8, ["modelValue"])
|
|
218
218
|
]),
|
|
219
|
-
r(
|
|
219
|
+
r(x, {
|
|
220
220
|
modelValue: o(a).codeConfig.pattern,
|
|
221
221
|
"onUpdate:modelValue": e[7] || (e[7] = (t) => o(a).codeConfig.pattern = t),
|
|
222
222
|
label: "Pattern",
|
|
223
223
|
required: !0
|
|
224
224
|
}, null, 8, ["modelValue"])
|
|
225
|
-
], 64)) :
|
|
226
|
-
r(
|
|
225
|
+
], 64)) : q("", !0),
|
|
226
|
+
r(x, {
|
|
227
227
|
modelValue: o(a).quantity,
|
|
228
228
|
"onUpdate:modelValue": e[8] || (e[8] = (t) => o(a).quantity = t),
|
|
229
229
|
label: "Number of code",
|
|
@@ -234,19 +234,19 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
234
234
|
required: !0,
|
|
235
235
|
"helper-text": `${o(a).quantity} claim will be created`
|
|
236
236
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
237
|
-
], 64)) :
|
|
238
|
-
o(
|
|
237
|
+
], 64)) : q("", !0),
|
|
238
|
+
o(n) !== "bulk" ? (S(), K(m, {
|
|
239
239
|
key: 1,
|
|
240
240
|
modelValue: o(a).code,
|
|
241
241
|
"onUpdate:modelValue": e[9] || (e[9] = (t) => o(a).code = t),
|
|
242
242
|
label: "Custom Code",
|
|
243
243
|
rules: [
|
|
244
|
-
(t) => o(
|
|
245
|
-
(t) => !
|
|
246
|
-
(t) => !
|
|
244
|
+
(t) => o(n) != "single" || !!t || "Custom code is required",
|
|
245
|
+
(t) => !N(t) || "Custom code must be unique",
|
|
246
|
+
(t) => !Y(t) || "Custom code must not contain space"
|
|
247
247
|
],
|
|
248
248
|
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
249
|
-
}, null, 8, ["modelValue", "rules"])) :
|
|
249
|
+
}, null, 8, ["modelValue", "rules"])) : q("", !0)
|
|
250
250
|
])
|
|
251
251
|
]),
|
|
252
252
|
_: 1
|
|
@@ -257,42 +257,54 @@ const be = { class: "space-y-16" }, ve = { class: "gap-16 grid grid-cols-2" }, h
|
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
|
-
class
|
|
260
|
+
class Se {
|
|
261
261
|
constructor() {
|
|
262
|
-
|
|
262
|
+
J(this, "data", []);
|
|
263
263
|
}
|
|
264
264
|
addRecord(i) {
|
|
265
265
|
this.data.push(i);
|
|
266
266
|
}
|
|
267
267
|
buildExcel() {
|
|
268
|
-
const i =
|
|
269
|
-
return
|
|
268
|
+
const i = G.book_new(), c = G.json_to_sheet(this.data);
|
|
269
|
+
return G.book_append_sheet(i, c, "Collection"), i;
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" },
|
|
272
|
+
const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, we = { class: "flex items-center justify-end py-4 xs:hidden" }, Ye = /* @__PURE__ */ X({
|
|
273
273
|
__name: "Collections",
|
|
274
274
|
setup(g) {
|
|
275
|
-
|
|
275
|
+
function i(e) {
|
|
276
|
+
return e.hideInApp === !1;
|
|
277
|
+
}
|
|
278
|
+
const c = ue(), I = ee(), k = f(), h = A(() => I.params.id), V = f(!1), { custom: L } = Z, C = de(), U = A(
|
|
279
|
+
() => C.campaigns.voucher.find(
|
|
280
|
+
(e) => {
|
|
281
|
+
var l;
|
|
282
|
+
return ((l = e._id) == null ? void 0 : l.toString()) === h.value;
|
|
283
|
+
}
|
|
284
|
+
)
|
|
285
|
+
), a = A(
|
|
286
|
+
() => !!U.value && !i(U.value)
|
|
287
|
+
), T = [
|
|
276
288
|
{
|
|
277
289
|
header: "ID/Code",
|
|
278
290
|
accessorKey: "_id",
|
|
279
|
-
cell(
|
|
280
|
-
return
|
|
281
|
-
|
|
291
|
+
cell(e) {
|
|
292
|
+
return j("div", { class: "flex items-center" }, [
|
|
293
|
+
j(se.FmIcon, {
|
|
282
294
|
name: "content_copy",
|
|
283
295
|
outline: !0,
|
|
284
296
|
size: "sm",
|
|
285
297
|
class: "cursor-pointer mr-4",
|
|
286
298
|
onClick: (l) => {
|
|
287
|
-
l.preventDefault(), l.stopPropagation(),
|
|
288
|
-
|
|
299
|
+
l.preventDefault(), l.stopPropagation(), ge(
|
|
300
|
+
e.row.original.code || e.row.original._id.toString()
|
|
289
301
|
);
|
|
290
302
|
}
|
|
291
303
|
}),
|
|
292
|
-
|
|
304
|
+
j(
|
|
293
305
|
"div",
|
|
294
306
|
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
295
|
-
|
|
307
|
+
e.row.original.code || e.row.original._id.toString()
|
|
296
308
|
)
|
|
297
309
|
]);
|
|
298
310
|
}
|
|
@@ -301,16 +313,16 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
|
|
|
301
313
|
header: "User",
|
|
302
314
|
accessorKey: "user",
|
|
303
315
|
enableSorting: !1,
|
|
304
|
-
cell(
|
|
305
|
-
const l =
|
|
306
|
-
return
|
|
316
|
+
cell(e) {
|
|
317
|
+
const l = e.row.original.pf_user;
|
|
318
|
+
return me(l);
|
|
307
319
|
}
|
|
308
320
|
},
|
|
309
321
|
{
|
|
310
322
|
header: "Phone",
|
|
311
|
-
accessorFn: (
|
|
323
|
+
accessorFn: (e) => {
|
|
312
324
|
var l;
|
|
313
|
-
return ((l =
|
|
325
|
+
return ((l = e.pf_user) == null ? void 0 : l.phoneNumber) || "-";
|
|
314
326
|
},
|
|
315
327
|
accessorKey: "pf_user.phoneNumber"
|
|
316
328
|
},
|
|
@@ -321,59 +333,59 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
|
|
|
321
333
|
{
|
|
322
334
|
header: "Created at",
|
|
323
335
|
accessorKey: "_id",
|
|
324
|
-
accessorFn: (
|
|
336
|
+
accessorFn: (e) => W(be(e._id.toString())).format("DD MMM YYYY")
|
|
325
337
|
},
|
|
326
338
|
{
|
|
327
339
|
header: "Nearest expired at",
|
|
328
340
|
accessorKey: "expiryBalance",
|
|
329
|
-
accessorFn: (
|
|
341
|
+
accessorFn: (e) => {
|
|
330
342
|
var l;
|
|
331
|
-
return
|
|
343
|
+
return e.expiryBalance && e.expiryBalance.length ? W((l = e.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
332
344
|
}
|
|
333
345
|
}
|
|
334
|
-
],
|
|
335
|
-
"$connect-STORE_REWARD_COLLECTIONS":
|
|
336
|
-
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS":
|
|
337
|
-
},
|
|
338
|
-
const l =
|
|
339
|
-
return (b) => l(
|
|
340
|
-
}, { tableMeta:
|
|
341
|
-
async function
|
|
342
|
-
var
|
|
343
|
-
await
|
|
346
|
+
], R = {
|
|
347
|
+
"$connect-STORE_REWARD_COLLECTIONS": Ce.readCollectionsByRewardId,
|
|
348
|
+
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": M.readCollectionsByCampaignId
|
|
349
|
+
}, _ = (e) => {
|
|
350
|
+
const l = R[I.name];
|
|
351
|
+
return (b) => l(e, b);
|
|
352
|
+
}, { tableMeta: n, rowData: w, onSort: z, debouncedFetchData: B, onSearch: N } = pe(_(h.value));
|
|
353
|
+
async function Y() {
|
|
354
|
+
var e;
|
|
355
|
+
await B(), (e = k.value) == null || e.showSheet(!1);
|
|
344
356
|
}
|
|
345
|
-
async function
|
|
346
|
-
|
|
357
|
+
async function s() {
|
|
358
|
+
V.value || L(
|
|
347
359
|
async () => {
|
|
348
|
-
var
|
|
349
|
-
const
|
|
360
|
+
var y;
|
|
361
|
+
const e = new Se(), l = (await M.readCollectionsByCampaignId(h.value, {
|
|
350
362
|
limit: 1,
|
|
351
363
|
skip: 0,
|
|
352
364
|
sortBy: p.sortBy,
|
|
353
365
|
descending: p.descending
|
|
354
366
|
})).meta.totalResources ?? 0, b = p.rowsPerPage;
|
|
355
|
-
for (let
|
|
356
|
-
const
|
|
367
|
+
for (let u = 0; u < l; u += b) {
|
|
368
|
+
const F = {
|
|
357
369
|
...p,
|
|
358
370
|
limit: b,
|
|
359
371
|
skip: p.page - 1,
|
|
360
372
|
sortBy: p.sortBy,
|
|
361
373
|
descending: p.descending
|
|
362
|
-
},
|
|
363
|
-
|
|
364
|
-
|
|
374
|
+
}, x = await M.readCollectionsByCampaignId(
|
|
375
|
+
h.value,
|
|
376
|
+
F
|
|
365
377
|
);
|
|
366
|
-
for await (const m of
|
|
367
|
-
const
|
|
368
|
-
Id: (m == null ? void 0 : m.code) || ((
|
|
378
|
+
for await (const m of x.resources) {
|
|
379
|
+
const $ = {
|
|
380
|
+
Id: (m == null ? void 0 : m.code) || ((y = m._id) == null ? void 0 : y.toString()) || "",
|
|
369
381
|
Balance: (m == null ? void 0 : m.balance) || 0
|
|
370
382
|
};
|
|
371
|
-
|
|
383
|
+
e.addRecord($);
|
|
372
384
|
}
|
|
373
385
|
p.page++;
|
|
374
386
|
}
|
|
375
|
-
await
|
|
376
|
-
|
|
387
|
+
await ce(
|
|
388
|
+
e.buildExcel(),
|
|
377
389
|
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
378
390
|
{
|
|
379
391
|
bookType: "xlsx",
|
|
@@ -383,70 +395,72 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
|
|
|
383
395
|
), p.page = 1;
|
|
384
396
|
},
|
|
385
397
|
{
|
|
386
|
-
isLoading:
|
|
398
|
+
isLoading: V
|
|
387
399
|
}
|
|
388
400
|
);
|
|
389
401
|
}
|
|
390
402
|
return ne(async () => {
|
|
391
|
-
await
|
|
392
|
-
}), (
|
|
393
|
-
const b =
|
|
394
|
-
return
|
|
403
|
+
await B();
|
|
404
|
+
}), (e, l) => {
|
|
405
|
+
const b = d("FmPageHead"), y = d("FmSearch");
|
|
406
|
+
return S(), D(E, null, [
|
|
395
407
|
r(b, {
|
|
396
408
|
title: "Collections",
|
|
397
409
|
"back-button": !0,
|
|
398
410
|
actions: [
|
|
399
411
|
{ label: "Export", value: "export", isPrimary: !1 },
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
412
|
+
...o(a) ? [
|
|
413
|
+
{
|
|
414
|
+
label: "Create collection",
|
|
415
|
+
value: "create",
|
|
416
|
+
isPrimary: !0
|
|
417
|
+
}
|
|
418
|
+
] : []
|
|
405
419
|
],
|
|
406
|
-
"onClick:back": l[0] || (l[0] = (
|
|
407
|
-
"onClick:action": l[1] || (l[1] = (
|
|
408
|
-
var
|
|
409
|
-
|
|
420
|
+
"onClick:back": l[0] || (l[0] = (u) => o(c).back()),
|
|
421
|
+
"onClick:action": l[1] || (l[1] = (u) => {
|
|
422
|
+
var F;
|
|
423
|
+
u === "create" && ((F = o(k)) == null || F.showSheet(!0)), u === "export" && s();
|
|
410
424
|
})
|
|
411
|
-
}),
|
|
412
|
-
|
|
413
|
-
r(
|
|
425
|
+
}, null, 8, ["actions"]),
|
|
426
|
+
v("div", Ve, [
|
|
427
|
+
r(y, {
|
|
414
428
|
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
415
|
-
modelValue: o(
|
|
429
|
+
modelValue: o(n).searchValue,
|
|
416
430
|
"onUpdate:modelValue": [
|
|
417
|
-
l[2] || (l[2] = (
|
|
418
|
-
o(
|
|
431
|
+
l[2] || (l[2] = (u) => o(n).searchValue = u),
|
|
432
|
+
o(N)
|
|
419
433
|
],
|
|
420
434
|
placeholder: "Search",
|
|
421
435
|
collapsible: ""
|
|
422
436
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
423
|
-
|
|
424
|
-
r(
|
|
425
|
-
modelValue: o(
|
|
437
|
+
v("div", we, [
|
|
438
|
+
r(y, {
|
|
439
|
+
modelValue: o(n).searchValue,
|
|
426
440
|
"onUpdate:modelValue": [
|
|
427
|
-
l[3] || (l[3] = (
|
|
428
|
-
o(
|
|
441
|
+
l[3] || (l[3] = (u) => o(n).searchValue = u),
|
|
442
|
+
o(N)
|
|
429
443
|
],
|
|
430
444
|
placeholder: "Search",
|
|
431
445
|
collapsible: ""
|
|
432
446
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
433
447
|
]),
|
|
434
|
-
r(
|
|
435
|
-
loading: o(
|
|
436
|
-
"row-data": o(
|
|
437
|
-
"column-defs":
|
|
438
|
-
"row-count": o(
|
|
439
|
-
"page-count": o(
|
|
440
|
-
"page-index": o(
|
|
441
|
-
"page-size": o(
|
|
448
|
+
r(fe, {
|
|
449
|
+
loading: o(n).isLoading,
|
|
450
|
+
"row-data": o(w),
|
|
451
|
+
"column-defs": T,
|
|
452
|
+
"row-count": o(n).totalRows,
|
|
453
|
+
"page-count": o(n).pageCount,
|
|
454
|
+
"page-index": o(n).pageIndex,
|
|
455
|
+
"page-size": o(n).pageSize,
|
|
442
456
|
"shrink-at": !1,
|
|
443
|
-
onSortChange: o(
|
|
444
|
-
onPageChange: l[4] || (l[4] = (
|
|
457
|
+
onSortChange: o(z),
|
|
458
|
+
onPageChange: l[4] || (l[4] = (u) => o(B)({ pageSize: u.pageSize, pageIndex: u.pageIndex }))
|
|
445
459
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
446
|
-
r(
|
|
460
|
+
r(xe, {
|
|
447
461
|
ref_key: "sheetRef",
|
|
448
|
-
ref:
|
|
449
|
-
onSuccess:
|
|
462
|
+
ref: k,
|
|
463
|
+
onSuccess: Y
|
|
450
464
|
}, null, 512)
|
|
451
465
|
])
|
|
452
466
|
], 64);
|
|
@@ -454,5 +468,5 @@ const Ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Se = { class: "flex
|
|
|
454
468
|
}
|
|
455
469
|
});
|
|
456
470
|
export {
|
|
457
|
-
|
|
471
|
+
Ye as default
|
|
458
472
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { defineComponent as N, ref as L, computed as j, h as M, onMounted as H, resolveComponent as m, openBlock as d, createElementBlock as y, Fragment as h, createVNode as i, unref as t, createElementVNode as n, withCtx as C, renderList as q, createBlock as w, resolveDynamicComponent as O, toDisplayString as g, createCommentVNode as z } from "vue";
|
|
2
2
|
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as J, components as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as W } from "./plugins-
|
|
5
|
-
import { u as X } from "./loading-
|
|
6
|
-
import { u as Y } from "./business-
|
|
7
|
-
import { u as Z } from "./campaign-
|
|
8
|
-
import { g as ee, a as S, b as V } from "./campaign-
|
|
9
|
-
import { u as oe } from "./vue-i18n-
|
|
4
|
+
import { p as W } from "./plugins-GAf1L8Pd.js";
|
|
5
|
+
import { u as X } from "./loading-DfP4ZQcW.js";
|
|
6
|
+
import { u as Y } from "./business-CxrnbBG7.js";
|
|
7
|
+
import { u as Z, c as _ } from "./campaign-OdVtlvIh.js";
|
|
8
|
+
import { g as ee, a as S, b as V } from "./campaign-DOOGvk7s.js";
|
|
9
|
+
import { u as oe } from "./vue-i18n-6i4pn5bC.js";
|
|
10
10
|
import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
-
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { u as ne } from "./template-
|
|
13
|
-
|
|
14
|
-
const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Ie = /* @__PURE__ */ N({
|
|
11
|
+
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-IrMeqHYK.js";
|
|
12
|
+
import { u as ne } from "./template-C-y0046H.js";
|
|
13
|
+
const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Be = /* @__PURE__ */ N({
|
|
15
14
|
__name: "Credit",
|
|
16
15
|
setup(ge) {
|
|
17
16
|
const { t: r } = oe(), B = {
|
|
@@ -224,5 +223,5 @@ const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-
|
|
|
224
223
|
}
|
|
225
224
|
});
|
|
226
225
|
export {
|
|
227
|
-
|
|
226
|
+
Be as default
|
|
228
227
|
};
|