@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.2
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/{App-DHAyGCKP.js → App-BWBeJksP.js} +118 -106
- package/dist/AuditLogs-CWVUX5o0.js +2013 -0
- package/dist/{Bin-BxyU2xtK.js → Bin-jXmZpGfg.js} +8 -8
- package/dist/{Broadcast-BJjehb02.js → Broadcast-C76pTADb.js} +18 -17
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -6
- package/dist/{Card-BYDuADCn.js → Card-qXn83BYu.js} +19 -19
- package/dist/{Collections-BlPEkNm8.js → Collections-DGXUQSbz.js} +197 -185
- package/dist/{Credit-D9Eqxv2E.js → Credit-CpmrPZx9.js} +18 -17
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js +3377 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
- package/dist/{Experience-DGumSpYK.js → Experience-CuOq7hd3.js} +35 -34
- package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-Cjv6SzrG.js} +1 -1
- package/dist/{Game-DDsYLdKu.js → Game-D0KfLD-b.js} +16 -15
- package/dist/Grab-L1h7bHD7.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
- package/dist/{Index-DwRbFOsj.js → Index-DxwMHEV3.js} +10 -10
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
- package/dist/LoyaltyDashboard-B5wg1EUC.js +1082 -0
- package/dist/{MainLayout-BEUAguIP.js → MainLayout-Cgi3Z3EM.js} +1 -1
- package/dist/{Marketing-WdhEZvmz.js → Marketing-Cl5OSBI1.js} +4 -4
- package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-CzYTbdJd.js} +214 -211
- package/dist/{Member-jL3RMGsZ.js → Member-D29x5Cic.js} +20 -20
- package/dist/{MemberList-B1bdPK63.js → MemberList-DDPe6Ymr.js} +50 -51
- package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-3mboVWAx.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +11 -11
- package/dist/{Mission-CoXzS7U6.js → Mission-CMPc4NLe.js} +35 -34
- package/dist/{Overview-B16wZUSV.js → Overview-sJ2kuP4U.js} +19 -19
- package/dist/{Point-CORBv0y2.js → Point-BBP4UEhf.js} +30 -29
- package/dist/{Promotion-DQ4WnFkH.js → Promotion-Bt0RLGsd.js} +111 -105
- package/dist/{Queue-BW97QEY2.js → Queue-CzVsoIDM.js} +43 -43
- package/dist/{Record-DZOhwf13.js → Record-CAoGgaxo.js} +10 -10
- package/dist/Review-CVBJlwGK.js +959 -0
- package/dist/ReviewFacebookCallback-RGWdxXYf.js +243 -0
- package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
- package/dist/{Reward-Bi9mpuyH.js → Reward-CrpFlr0a.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js +1911 -0
- package/dist/{Segment-COhS8SPv.js → Segment-Cy-QwYQQ.js} +77 -78
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +3 -3
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js} +4 -4
- package/dist/{Setting-BNtYrzdN.js → Setting-DEQIJ4fY.js} +259 -248
- package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-NuwjCPLN.js} +13 -13
- package/dist/{Store-iTgtmUVL.js → Store-Cw2J_ecA.js} +24 -24
- package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-BK5rDAaK.js} +16 -16
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js +1130 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js +7007 -0
- package/dist/{Tier-BbZMbFSd.js → Tier-CwZ40RYc.js} +544 -469
- package/dist/{Title-Co5XWIJm.js → Title-DU7KmsK2.js} +93 -92
- package/dist/{Transaction-CoUbt5rr.js → Transaction-Uh5Ozt93.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
- package/dist/{Voucher-CXojttH0.js → Voucher-BF6ARaRe.js} +28 -27
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
- package/dist/{app-_LtKE4PZ.js → app-DlECkPwT.js} +3408 -2913
- package/dist/app.js +4 -3
- package/dist/{business-CchrWCX9.js → business-BSe9C-xG.js} +1 -1
- package/dist/{campaign-N2x2N6OP.js → campaign-BNS2RxKc.js} +114 -64
- package/dist/{campaign-D2RzC0L1.js → campaign-CXw3jpdr.js} +13 -7
- package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-CnMa2Tia.js} +3 -2
- package/dist/{campaign.fn-Da4r_dvc.js → campaign.fn-CNOinW8t.js} +131 -131
- package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-BIvEz79q.js} +1 -1
- package/dist/duplicateCampaign-Co2TdbrL.js +51 -0
- package/dist/{effect-DADvE7lZ.js → effect-Bt8PE3-M.js} +1 -1
- package/dist/{email-addresses-DzUHQuVs.js → email-addresses-Dh95ALqP.js} +2 -2
- package/dist/{export-uzECYleM.js → export-DIIgAwP7.js} +3 -3
- package/dist/{helper-DMsYRFIM.js → helper-8zEdQ9jm.js} +1 -1
- package/dist/{index-CEVpWmjC.js → index-0BNEvaYc.js} +7 -7
- package/dist/{index-r8TuEpzi.js → index-BAlFstx4.js} +1 -1
- package/dist/{index-C2h4SP0A.js → index-BP5qSDQw.js} +806 -205
- package/dist/{index-KYtKBtvK.js → index-Bqxe3Gbq.js} +3 -3
- package/dist/{index-CrPHsZg1.js → index-CWypTyOP.js} +1554 -1270
- package/dist/{index-DXl_Qtu-.js → index-CfxDirFl.js} +1 -1
- package/dist/{index-Bc-pgOn6.js → index-DDp0nMys.js} +1 -1
- package/dist/index-DW4-mTTG.js +52 -0
- package/dist/{timezone-B_KZGqyd.js → index-DdCPfF8x.js} +21 -20
- package/dist/index-IPOrNVQw.js +67 -0
- package/dist/{index-XJX8_Wlh.js → index-SsUBL4IR.js} +1 -1
- package/dist/{index-Ct1Qf7kH.js → index-VS1hWlhk.js} +1 -1
- package/dist/{index-B9RmImNP.js → index-ZKJoXi1-.js} +3 -3
- package/dist/{index-DQ6H1MEw.js → index-rwlkBKrS.js} +1996 -1968
- package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CgR02aQB.js} +209 -209
- package/dist/{loading-DK8UdxtS.js → loading-CxY9qhzD.js} +1 -1
- package/dist/{lodash-CgcQgDO8.js → lodash-CELsN1M_.js} +1 -1
- package/dist/{membership-Cs4GzRnn.js → membership-BoQMuerb.js} +3 -3
- package/dist/{money-TgbWserQ.js → money-CH913hGN.js} +1 -1
- package/dist/{number-fLCh4B45.js → number-CO-WbLdr.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-BM2Ygj-U.js +145 -0
- package/dist/{plugins-DYcrIMpx.js → plugins-YK45gSb1.js} +94 -95
- package/dist/{reward-uQ8Oz8Fd.js → reward-3aFPahH6.js} +1 -1
- package/dist/{rule-BcbgF0xS.js → rule-DC9my0Vg.js} +505 -487
- package/dist/style.css +1 -1
- package/dist/template-tDq12e1p.js +188 -0
- package/dist/{trigger-c-_77EFL.js → trigger-DoPHRgKt.js} +5 -5
- package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
- package/dist/{usePagination-C3cT5BmC.js → usePagination-C8FUj5q_.js} +1 -1
- package/dist/{user-CRIo5MyA.js → user-Dhlhrnf8.js} +1 -1
- package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-B-92uhPn.js} +175 -175
- package/dist/{xlsx-Bw1AshOG.js → xlsx-Dmxne1eM.js} +166 -166
- package/dist/{zod-CzlTW8Al.js → zod-Dcdy9Dm3.js} +1 -1
- package/package.json +8 -4
- package/dist/Analytic-Ccb5IKBy.js +0 -426
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
- package/dist/collection.fn-BqDPyvUe.js +0 -26
- package/dist/dto-CstKk_3g.js +0 -216
- package/dist/index-_KlH62Ed.js +0 -55
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-CVxLIQ5K.js +0 -145
- package/dist/rule-builder-CIkRKgap.js +0 -102
- package/dist/template-wZEVj8lZ.js +0 -236
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
var ie = Object.defineProperty;
|
|
2
|
-
var ue = (
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as ae, ref as C, computed as D, watch as W, resolveComponent as p, openBlock as
|
|
2
|
+
var ue = (y, u, v) => u in y ? ie(y, u, { enumerable: !0, configurable: !0, writable: !0, value: v }) : y[u] = v;
|
|
3
|
+
var Z = (y, u, v) => ue(y, typeof u != "symbol" ? u + "" : u, v);
|
|
4
|
+
import { defineComponent as ae, ref as C, computed as D, watch as W, resolveComponent as p, openBlock as w, createBlock as Q, unref as o, isRef as ee, withCtx as Y, createElementVNode as V, createVNode as i, createElementBlock as T, Fragment as L, renderList as ce, createCommentVNode as q, h, onMounted as de } from "vue";
|
|
5
5
|
import { h as E } from "./moment-D7p2TMB-.js";
|
|
6
|
-
import { components as
|
|
7
|
-
import "./index-
|
|
6
|
+
import { components as X } from "@feedmepos/ui-library";
|
|
7
|
+
import "./index-Bqxe3Gbq.js";
|
|
8
8
|
import { J as me } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
-
import { u as le } from "./loading-
|
|
9
|
+
import { u as le } from "./loading-CxY9qhzD.js";
|
|
10
10
|
import { u as pe } from "./app-wDQR6dpb.js";
|
|
11
11
|
import { useRoute as ne, useRouter as fe } from "vue-router";
|
|
12
|
-
import { c as re, u as ge } from "./campaign-
|
|
13
|
-
import { e as
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { m as ye } from "./index-r8TuEpzi.js";
|
|
12
|
+
import { c as re, u as ge } from "./campaign-CXw3jpdr.js";
|
|
13
|
+
import { e as b } from "./index-vh86FiIQ.js";
|
|
14
|
+
import { u as J, w as ve } from "./xlsx-Dmxne1eM.js";
|
|
15
|
+
import { u as he, _ as be } from "./usePagination-C8FUj5q_.js";
|
|
16
|
+
import { c as te } from "./plugins-YK45gSb1.js";
|
|
17
|
+
import { m as Ce } from "./index-BAlFstx4.js";
|
|
19
18
|
import { o as oe } from "./objectId-dwaoBfJX.js";
|
|
20
|
-
const
|
|
19
|
+
const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, Se = { class: "flex items-center gap-8" }, Ve = /* @__PURE__ */ ae({
|
|
21
20
|
__name: "CreateCollectionSheet",
|
|
22
21
|
emits: ["success"],
|
|
23
|
-
setup(
|
|
24
|
-
const { minor: M } = le, P = ne(),
|
|
22
|
+
setup(y, { expose: u, emit: v }) {
|
|
23
|
+
const { minor: M } = le, P = ne(), F = C(), k = C(!1), $ = v, x = C(!1);
|
|
25
24
|
function R(r) {
|
|
26
|
-
|
|
25
|
+
x.value = r, r && (n.value = {
|
|
27
26
|
quantity: 1,
|
|
28
27
|
code: "",
|
|
29
28
|
codeConfig: {
|
|
@@ -56,7 +55,7 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
|
|
|
56
55
|
value: "single",
|
|
57
56
|
sublabel: "Enter your own custom codes"
|
|
58
57
|
}
|
|
59
|
-
],
|
|
58
|
+
], A = [
|
|
60
59
|
{
|
|
61
60
|
label: "Alphanumeric",
|
|
62
61
|
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
@@ -69,10 +68,10 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
|
|
|
69
68
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
70
69
|
{ label: "Numbers", value: "0123456789" },
|
|
71
70
|
{ label: "Custom", value: "" }
|
|
72
|
-
],
|
|
73
|
-
async function
|
|
74
|
-
var
|
|
75
|
-
await ((
|
|
71
|
+
], U = C(A[0].value), f = C("bulk"), _ = C(!1), K = D(() => P.params.id);
|
|
72
|
+
async function N(r) {
|
|
73
|
+
var t;
|
|
74
|
+
await ((t = F.value) == null ? void 0 : t.validateInputs()), k.value && await M(
|
|
76
75
|
async () => {
|
|
77
76
|
await re.createCollectionByCampaignId(K.value, r), await $("success");
|
|
78
77
|
},
|
|
@@ -86,164 +85,164 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
|
|
|
86
85
|
showSheet: R
|
|
87
86
|
}), W(
|
|
88
87
|
() => f.value,
|
|
89
|
-
(r,
|
|
90
|
-
|
|
88
|
+
(r, t) => {
|
|
89
|
+
t != r && (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
90
|
}
|
|
92
91
|
);
|
|
93
92
|
function g(r) {
|
|
94
93
|
if (f.value !== "single") return !1;
|
|
95
|
-
const
|
|
96
|
-
`).map((
|
|
97
|
-
return new Set(
|
|
94
|
+
const t = r.split(`
|
|
95
|
+
`).map((B) => B.trim()).filter(Boolean);
|
|
96
|
+
return new Set(t).size !== t.length;
|
|
98
97
|
}
|
|
99
98
|
function j(r) {
|
|
100
99
|
return /[ \t]/.test(r);
|
|
101
100
|
}
|
|
102
101
|
return W(
|
|
103
102
|
() => n.value.codeConfig.length,
|
|
104
|
-
(r,
|
|
105
|
-
r !=
|
|
103
|
+
(r, t) => {
|
|
104
|
+
r != t && (n.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(r))));
|
|
106
105
|
}
|
|
107
106
|
), W(
|
|
108
107
|
() => n.value.codeConfig.pattern,
|
|
109
|
-
(r,
|
|
110
|
-
r !=
|
|
108
|
+
(r, t) => {
|
|
109
|
+
r != t && (n.value.codeConfig.length = (n.value.codeConfig.pattern.match(/#/g) || []).length);
|
|
111
110
|
}
|
|
112
|
-
), (r,
|
|
113
|
-
const
|
|
114
|
-
return
|
|
111
|
+
), (r, t) => {
|
|
112
|
+
const B = p("FmRadio"), O = p("FmRadioGroup"), H = p("FmSwitch"), l = p("FmStepperField"), e = p("FmSelect"), c = p("FmTextField"), d = p("FmTextarea"), s = p("FmForm"), S = p("FmButton"), G = p("FmSideSheet");
|
|
113
|
+
return w(), Q(G, {
|
|
115
114
|
"max-width": 560,
|
|
116
115
|
"dismiss-away": !0,
|
|
117
116
|
header: "Create collection",
|
|
118
|
-
modelValue:
|
|
117
|
+
modelValue: o(x),
|
|
119
118
|
"onUpdate:modelValue": [
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
t[14] || (t[14] = (a) => ee(x) ? x.value = a : null),
|
|
120
|
+
t[15] || (t[15] = (a) => x.value = a)
|
|
122
121
|
]
|
|
123
122
|
}, {
|
|
124
123
|
"side-sheet-footer": Y(() => [
|
|
125
|
-
|
|
126
|
-
i(
|
|
124
|
+
V("div", Se, [
|
|
125
|
+
i(S, {
|
|
127
126
|
label: "Save",
|
|
128
|
-
onClick:
|
|
129
|
-
loading:
|
|
127
|
+
onClick: t[12] || (t[12] = (a) => N(o(n))),
|
|
128
|
+
loading: o(pe)().isLoading
|
|
130
129
|
}, null, 8, ["loading"]),
|
|
131
|
-
i(
|
|
130
|
+
i(S, {
|
|
132
131
|
label: "Cancel",
|
|
133
132
|
type: "button",
|
|
134
133
|
variant: "tertiary",
|
|
135
|
-
onClick:
|
|
134
|
+
onClick: t[13] || (t[13] = (a) => x.value = !1)
|
|
136
135
|
})
|
|
137
136
|
])
|
|
138
137
|
]),
|
|
139
138
|
default: Y(() => [
|
|
140
|
-
i(me, { json:
|
|
139
|
+
i(me, { json: o(n) }, null, 8, ["json"]),
|
|
141
140
|
i(s, {
|
|
142
141
|
ref_key: "form",
|
|
143
|
-
ref:
|
|
142
|
+
ref: F,
|
|
144
143
|
class: "space-y-40",
|
|
145
|
-
onValidationSuccess:
|
|
146
|
-
onValidationFailed:
|
|
144
|
+
onValidationSuccess: t[10] || (t[10] = (a) => k.value = !0),
|
|
145
|
+
onValidationFailed: t[11] || (t[11] = (a) => k.value = !1)
|
|
147
146
|
}, {
|
|
148
147
|
default: Y(() => [
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
V("div", null, [
|
|
149
|
+
t[16] || (t[16] = V("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
|
|
151
150
|
i(O, {
|
|
152
|
-
modelValue:
|
|
153
|
-
"onUpdate:modelValue":
|
|
151
|
+
modelValue: o(f),
|
|
152
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => ee(f) ? f.value = a : null),
|
|
154
153
|
inline: !1
|
|
155
154
|
}, {
|
|
156
155
|
default: Y(() => [
|
|
157
|
-
(
|
|
158
|
-
key:
|
|
159
|
-
value:
|
|
160
|
-
label:
|
|
161
|
-
sublabel:
|
|
156
|
+
(w(), T(L, null, ce(z, (a) => i(B, {
|
|
157
|
+
key: a.value,
|
|
158
|
+
value: a.value,
|
|
159
|
+
label: a.label,
|
|
160
|
+
sublabel: a.sublabel
|
|
162
161
|
}, null, 8, ["value", "label", "sublabel"])), 64))
|
|
163
162
|
]),
|
|
164
163
|
_: 1
|
|
165
164
|
}, 8, ["modelValue"])
|
|
166
165
|
]),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
V("div", ye, [
|
|
167
|
+
t[17] || (t[17] = V("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
|
|
168
|
+
o(f) === "bulk" ? (w(), T(L, { key: 0 }, [
|
|
170
169
|
i(H, {
|
|
171
|
-
"model-value":
|
|
170
|
+
"model-value": o(_),
|
|
172
171
|
"label-placement": "right",
|
|
173
172
|
value: "true",
|
|
174
173
|
label: "Advance code setting",
|
|
175
174
|
required: !0,
|
|
176
|
-
"onUpdate:modelValue":
|
|
175
|
+
"onUpdate:modelValue": t[1] || (t[1] = () => _.value = !o(_))
|
|
177
176
|
}, null, 8, ["model-value"]),
|
|
178
|
-
|
|
177
|
+
o(_) ? (w(), T(L, { key: 0 }, [
|
|
179
178
|
i(l, {
|
|
180
|
-
modelValue:
|
|
181
|
-
"onUpdate:modelValue":
|
|
179
|
+
modelValue: o(n).codeConfig.length,
|
|
180
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(n).codeConfig.length = a),
|
|
182
181
|
label: "Code length",
|
|
183
182
|
max: 16,
|
|
184
183
|
min: 1,
|
|
185
184
|
rules: [
|
|
186
|
-
(
|
|
187
|
-
(
|
|
185
|
+
(a) => Number(a) >= 1 || "Code length must at least 1",
|
|
186
|
+
(a) => Number(a) <= 16 || "Code length must less than 16"
|
|
188
187
|
],
|
|
189
188
|
required: !0
|
|
190
189
|
}, null, 8, ["modelValue", "rules"]),
|
|
191
|
-
i(
|
|
190
|
+
i(e, {
|
|
192
191
|
label: "Charset",
|
|
193
|
-
"model-value":
|
|
194
|
-
items:
|
|
195
|
-
"helper-text":
|
|
196
|
-
"onUpdate:modelValue":
|
|
197
|
-
|
|
192
|
+
"model-value": o(U),
|
|
193
|
+
items: A,
|
|
194
|
+
"helper-text": o(n).codeConfig.charset.length > 62 ? `${o(n).codeConfig.charset.substring(0, 62)}...` : o(n).codeConfig.charset,
|
|
195
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => {
|
|
196
|
+
U.value = a, o(n).codeConfig.charset = a;
|
|
198
197
|
})
|
|
199
198
|
}, null, 8, ["model-value", "helper-text"]),
|
|
200
|
-
|
|
199
|
+
o(U) === "" ? (w(), Q(c, {
|
|
201
200
|
key: 0,
|
|
202
|
-
modelValue:
|
|
203
|
-
"onUpdate:modelValue":
|
|
201
|
+
modelValue: o(n).codeConfig.charset,
|
|
202
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => o(n).codeConfig.charset = a),
|
|
204
203
|
label: "Custom Charset",
|
|
205
204
|
required: ""
|
|
206
205
|
}, null, 8, ["modelValue"])) : q("", !0),
|
|
207
|
-
|
|
206
|
+
V("div", xe, [
|
|
208
207
|
i(c, {
|
|
209
|
-
modelValue:
|
|
210
|
-
"onUpdate:modelValue":
|
|
208
|
+
modelValue: o(n).codeConfig.prefix,
|
|
209
|
+
"onUpdate:modelValue": t[5] || (t[5] = (a) => o(n).codeConfig.prefix = a),
|
|
211
210
|
label: "Prefix (Optional)"
|
|
212
211
|
}, null, 8, ["modelValue"]),
|
|
213
212
|
i(c, {
|
|
214
|
-
modelValue:
|
|
215
|
-
"onUpdate:modelValue":
|
|
213
|
+
modelValue: o(n).codeConfig.suffix,
|
|
214
|
+
"onUpdate:modelValue": t[6] || (t[6] = (a) => o(n).codeConfig.suffix = a),
|
|
216
215
|
label: "Suffix (Optional)"
|
|
217
216
|
}, null, 8, ["modelValue"])
|
|
218
217
|
]),
|
|
219
218
|
i(c, {
|
|
220
|
-
modelValue:
|
|
221
|
-
"onUpdate:modelValue":
|
|
219
|
+
modelValue: o(n).codeConfig.pattern,
|
|
220
|
+
"onUpdate:modelValue": t[7] || (t[7] = (a) => o(n).codeConfig.pattern = a),
|
|
222
221
|
label: "Pattern",
|
|
223
222
|
required: !0
|
|
224
223
|
}, null, 8, ["modelValue"])
|
|
225
224
|
], 64)) : q("", !0),
|
|
226
225
|
i(c, {
|
|
227
|
-
modelValue:
|
|
228
|
-
"onUpdate:modelValue":
|
|
226
|
+
modelValue: o(n).quantity,
|
|
227
|
+
"onUpdate:modelValue": t[8] || (t[8] = (a) => o(n).quantity = a),
|
|
229
228
|
label: "Number of code",
|
|
230
229
|
rules: [
|
|
231
|
-
(
|
|
232
|
-
(
|
|
230
|
+
(a) => a >= 1 || "Quantity cannot be less than 1",
|
|
231
|
+
(a) => a <= 1e4 || "Quantity cannot more than 10,000"
|
|
233
232
|
],
|
|
234
233
|
required: !0,
|
|
235
|
-
"helper-text": `${
|
|
234
|
+
"helper-text": `${o(n).quantity} claim will be created`
|
|
236
235
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
237
236
|
], 64)) : q("", !0),
|
|
238
|
-
|
|
237
|
+
o(f) !== "bulk" ? (w(), Q(d, {
|
|
239
238
|
key: 1,
|
|
240
|
-
modelValue:
|
|
241
|
-
"onUpdate:modelValue":
|
|
239
|
+
modelValue: o(n).code,
|
|
240
|
+
"onUpdate:modelValue": t[9] || (t[9] = (a) => o(n).code = a),
|
|
242
241
|
label: "Custom Code",
|
|
243
242
|
rules: [
|
|
244
|
-
(
|
|
245
|
-
(
|
|
246
|
-
(
|
|
243
|
+
(a) => o(f) != "single" || !!a || "Custom code is required",
|
|
244
|
+
(a) => !g(a) || "Custom code must be unique",
|
|
245
|
+
(a) => !j(a) || "Custom code must not contain space"
|
|
247
246
|
],
|
|
248
247
|
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
249
248
|
}, null, 8, ["modelValue", "rules"])) : q("", !0)
|
|
@@ -257,73 +256,73 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
|
|
|
257
256
|
};
|
|
258
257
|
}
|
|
259
258
|
});
|
|
260
|
-
class
|
|
259
|
+
class we {
|
|
261
260
|
constructor() {
|
|
262
|
-
|
|
261
|
+
Z(this, "data", []);
|
|
263
262
|
}
|
|
264
263
|
addRecord(u) {
|
|
265
264
|
this.data.push(u);
|
|
266
265
|
}
|
|
267
266
|
buildExcel() {
|
|
268
|
-
const u =
|
|
269
|
-
return
|
|
267
|
+
const u = J.book_new(), v = J.json_to_sheet(this.data);
|
|
268
|
+
return J.book_append_sheet(u, v, "Collection"), u;
|
|
270
269
|
}
|
|
271
270
|
}
|
|
272
|
-
var
|
|
273
|
-
const
|
|
271
|
+
var Fe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
272
|
+
const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex items-center justify-end py-4 xs:hidden" }, Ke = /* @__PURE__ */ ae({
|
|
274
273
|
__name: "Collections",
|
|
275
|
-
setup(
|
|
274
|
+
setup(y) {
|
|
276
275
|
function u(l) {
|
|
277
276
|
return l.hideInApp === !1;
|
|
278
277
|
}
|
|
279
|
-
const
|
|
280
|
-
function
|
|
281
|
-
var
|
|
282
|
-
return (
|
|
278
|
+
const v = fe(), M = ne(), P = C(), F = D(() => M.params.id), k = C(!1), { custom: $ } = le;
|
|
279
|
+
function x(l) {
|
|
280
|
+
var e;
|
|
281
|
+
return (e = l._id) == null ? void 0 : e.toString();
|
|
283
282
|
}
|
|
284
283
|
function R(l) {
|
|
285
284
|
var d;
|
|
286
|
-
const
|
|
287
|
-
return !
|
|
285
|
+
const e = (d = Fe.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = x(l);
|
|
286
|
+
return !e || !c ? "" : `${e}/c/${c}`;
|
|
288
287
|
}
|
|
289
288
|
function n(l) {
|
|
290
289
|
var d, s;
|
|
291
|
-
const
|
|
292
|
-
return (l.balance || 0) > 0 && (!
|
|
290
|
+
const e = (d = l.user) == null ? void 0 : d.toString(), c = (s = l.business) == null ? void 0 : s.toString();
|
|
291
|
+
return (l.balance || 0) > 0 && (!e || e === c);
|
|
293
292
|
}
|
|
294
293
|
async function z(l) {
|
|
295
|
-
const
|
|
296
|
-
|
|
294
|
+
const e = R(l);
|
|
295
|
+
e && await te(e, {
|
|
297
296
|
successMessage: "Collection link copied to clipboard"
|
|
298
297
|
});
|
|
299
298
|
}
|
|
300
|
-
const
|
|
301
|
-
() =>
|
|
299
|
+
const A = ge(), U = D(
|
|
300
|
+
() => A.campaigns.voucher.find(
|
|
302
301
|
(l) => {
|
|
303
|
-
var
|
|
304
|
-
return ((
|
|
302
|
+
var e;
|
|
303
|
+
return ((e = l._id) == null ? void 0 : e.toString()) === F.value;
|
|
305
304
|
}
|
|
306
305
|
)
|
|
307
306
|
), f = D(
|
|
308
|
-
() => !!
|
|
309
|
-
),
|
|
307
|
+
() => !!U.value && !u(U.value)
|
|
308
|
+
), _ = D(() => [
|
|
310
309
|
{
|
|
311
310
|
header: "ID/Code",
|
|
312
311
|
accessorKey: "_id",
|
|
313
312
|
cell(l) {
|
|
314
|
-
return
|
|
315
|
-
|
|
313
|
+
return h("div", { class: "flex items-center" }, [
|
|
314
|
+
h(X.FmIcon, {
|
|
316
315
|
name: "content_copy",
|
|
317
316
|
outline: !0,
|
|
318
317
|
size: "sm",
|
|
319
318
|
class: "cursor-pointer mr-4",
|
|
320
|
-
onClick: (
|
|
321
|
-
|
|
319
|
+
onClick: (e) => {
|
|
320
|
+
e.preventDefault(), e.stopPropagation(), te(
|
|
322
321
|
l.row.original.code || l.row.original._id.toString()
|
|
323
322
|
);
|
|
324
323
|
}
|
|
325
324
|
}),
|
|
326
|
-
|
|
325
|
+
h(
|
|
327
326
|
"div",
|
|
328
327
|
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
329
328
|
l.row.original.code || l.row.original._id.toString()
|
|
@@ -336,15 +335,28 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
336
335
|
accessorKey: "user",
|
|
337
336
|
enableSorting: !1,
|
|
338
337
|
cell(l) {
|
|
339
|
-
const
|
|
340
|
-
return
|
|
338
|
+
const e = l.row.original.pf_user;
|
|
339
|
+
return h(
|
|
340
|
+
"div",
|
|
341
|
+
{
|
|
342
|
+
class: "flex items-center gap-x-8"
|
|
343
|
+
},
|
|
344
|
+
[
|
|
345
|
+
h(X.FmAvatar, {
|
|
346
|
+
name: e != null && e.photoUrl || e == null ? void 0 : e.name,
|
|
347
|
+
src: (e == null ? void 0 : e.photoUrl) ?? void 0,
|
|
348
|
+
size: "sm"
|
|
349
|
+
}),
|
|
350
|
+
h("span", e == null ? void 0 : e.name)
|
|
351
|
+
]
|
|
352
|
+
);
|
|
341
353
|
}
|
|
342
354
|
},
|
|
343
355
|
{
|
|
344
356
|
header: "Phone",
|
|
345
357
|
accessorFn: (l) => {
|
|
346
|
-
var
|
|
347
|
-
return ((
|
|
358
|
+
var e;
|
|
359
|
+
return ((e = l.pf_user) == null ? void 0 : e.phoneNumber) || "-";
|
|
348
360
|
},
|
|
349
361
|
accessorKey: "pf_user.phoneNumber"
|
|
350
362
|
},
|
|
@@ -361,8 +373,8 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
361
373
|
header: "Nearest expired at",
|
|
362
374
|
accessorKey: "expiryBalance",
|
|
363
375
|
accessorFn: (l) => {
|
|
364
|
-
var
|
|
365
|
-
return l.expiryBalance && l.expiryBalance.length ? E((
|
|
376
|
+
var e;
|
|
377
|
+
return l.expiryBalance && l.expiryBalance.length ? E((e = l.expiryBalance) == null ? void 0 : e[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
366
378
|
}
|
|
367
379
|
},
|
|
368
380
|
...f.value ? [
|
|
@@ -374,16 +386,16 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
374
386
|
maxWidth: "72px"
|
|
375
387
|
},
|
|
376
388
|
cell(l) {
|
|
377
|
-
return n(l.row.original) ?
|
|
378
|
-
|
|
389
|
+
return n(l.row.original) ? h("div", { class: "flex items-center justify-center" }, [
|
|
390
|
+
h(X.FmButton, {
|
|
379
391
|
icon: "share",
|
|
380
392
|
variant: "tertiary",
|
|
381
393
|
iconColor: "neutral-gray-400",
|
|
382
|
-
onClick: async (
|
|
383
|
-
|
|
394
|
+
onClick: async (e) => {
|
|
395
|
+
e.preventDefault(), e.stopPropagation(), await z(l.row.original);
|
|
384
396
|
}
|
|
385
397
|
})
|
|
386
|
-
]) :
|
|
398
|
+
]) : h(
|
|
387
399
|
"div",
|
|
388
400
|
{
|
|
389
401
|
class: "flex items-center justify-center text-fm-color-typo-disabled"
|
|
@@ -394,39 +406,39 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
394
406
|
}
|
|
395
407
|
] : []
|
|
396
408
|
]), K = {
|
|
397
|
-
"$connect-STORE_REWARD_COLLECTIONS":
|
|
409
|
+
"$connect-STORE_REWARD_COLLECTIONS": Ce.readCollectionsByRewardId,
|
|
398
410
|
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": re.readCollectionsByCampaignId
|
|
399
|
-
},
|
|
400
|
-
const
|
|
401
|
-
return (c) =>
|
|
402
|
-
}, { tableMeta: g, rowData: j, onSort: r, debouncedFetchData:
|
|
411
|
+
}, N = (l) => {
|
|
412
|
+
const e = K[M.name];
|
|
413
|
+
return (c) => e(l, c);
|
|
414
|
+
}, { tableMeta: g, rowData: j, onSort: r, debouncedFetchData: t, onSearch: B } = he(N(F.value));
|
|
403
415
|
async function O() {
|
|
404
416
|
var l;
|
|
405
|
-
await
|
|
417
|
+
await t(), (l = P.value) == null || l.showSheet(!1);
|
|
406
418
|
}
|
|
407
419
|
async function H() {
|
|
408
|
-
|
|
420
|
+
k.value || $(
|
|
409
421
|
async () => {
|
|
410
422
|
var s;
|
|
411
|
-
const l = new
|
|
423
|
+
const l = new we(), e = N(F.value), c = (await e({
|
|
412
424
|
limit: 1,
|
|
413
425
|
skip: 0,
|
|
414
|
-
sortBy:
|
|
415
|
-
descending:
|
|
416
|
-
})).meta.totalResources ?? 0, d =
|
|
417
|
-
for (let
|
|
426
|
+
sortBy: b.sortBy,
|
|
427
|
+
descending: b.descending
|
|
428
|
+
})).meta.totalResources ?? 0, d = b.rowsPerPage;
|
|
429
|
+
for (let S = 0; S < c; S += d) {
|
|
418
430
|
const G = {
|
|
419
|
-
...
|
|
431
|
+
...b,
|
|
420
432
|
limit: d,
|
|
421
|
-
skip:
|
|
422
|
-
sortBy:
|
|
423
|
-
descending:
|
|
424
|
-
},
|
|
425
|
-
for await (const m of
|
|
426
|
-
const
|
|
433
|
+
skip: b.page - 1,
|
|
434
|
+
sortBy: b.sortBy,
|
|
435
|
+
descending: b.descending
|
|
436
|
+
}, a = await e(G);
|
|
437
|
+
for await (const m of a.resources) {
|
|
438
|
+
const I = m.pf_user, se = {
|
|
427
439
|
"ID/Code": (m == null ? void 0 : m.code) || ((s = m._id) == null ? void 0 : s.toString()),
|
|
428
|
-
User: (
|
|
429
|
-
Phone: (
|
|
440
|
+
User: (I == null ? void 0 : I.name) || "-",
|
|
441
|
+
Phone: (I == null ? void 0 : I.phoneNumber) || "-",
|
|
430
442
|
Balance: (m == null ? void 0 : m.balance) || 0,
|
|
431
443
|
"Created at": E(
|
|
432
444
|
oe(m._id.toString())
|
|
@@ -438,9 +450,9 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
438
450
|
};
|
|
439
451
|
l.addRecord(se);
|
|
440
452
|
}
|
|
441
|
-
|
|
453
|
+
b.page++;
|
|
442
454
|
}
|
|
443
|
-
await
|
|
455
|
+
await ve(
|
|
444
456
|
l.buildExcel(),
|
|
445
457
|
`vouchers-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
446
458
|
{
|
|
@@ -448,24 +460,24 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
448
460
|
bookSST: !1,
|
|
449
461
|
type: "array"
|
|
450
462
|
}
|
|
451
|
-
),
|
|
463
|
+
), b.page = 1;
|
|
452
464
|
},
|
|
453
465
|
{
|
|
454
|
-
isLoading:
|
|
466
|
+
isLoading: k
|
|
455
467
|
}
|
|
456
468
|
);
|
|
457
469
|
}
|
|
458
470
|
return de(async () => {
|
|
459
|
-
await
|
|
460
|
-
}), (l,
|
|
471
|
+
await t();
|
|
472
|
+
}), (l, e) => {
|
|
461
473
|
const c = p("FmPageHead"), d = p("FmSearch");
|
|
462
|
-
return
|
|
474
|
+
return w(), T(L, null, [
|
|
463
475
|
i(c, {
|
|
464
476
|
title: "Collections",
|
|
465
477
|
"back-button": !0,
|
|
466
478
|
actions: [
|
|
467
479
|
{ label: "Export", value: "export", isPrimary: !1 },
|
|
468
|
-
...
|
|
480
|
+
...o(f) ? [
|
|
469
481
|
{
|
|
470
482
|
label: "Create collection",
|
|
471
483
|
value: "create",
|
|
@@ -473,47 +485,47 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
473
485
|
}
|
|
474
486
|
] : []
|
|
475
487
|
],
|
|
476
|
-
"onClick:back":
|
|
477
|
-
"onClick:action":
|
|
478
|
-
var
|
|
479
|
-
s === "create" && ((
|
|
488
|
+
"onClick:back": e[0] || (e[0] = (s) => o(v).back()),
|
|
489
|
+
"onClick:action": e[1] || (e[1] = (s) => {
|
|
490
|
+
var S;
|
|
491
|
+
s === "create" && ((S = o(P)) == null || S.showSheet(!0)), s === "export" && H();
|
|
480
492
|
})
|
|
481
493
|
}, null, 8, ["actions"]),
|
|
482
|
-
|
|
494
|
+
V("div", ke, [
|
|
483
495
|
i(d, {
|
|
484
496
|
class: "hidden xs:!flex border-b border-fm-color-neutral-gray-100",
|
|
485
|
-
modelValue:
|
|
497
|
+
modelValue: o(g).searchValue,
|
|
486
498
|
"onUpdate:modelValue": [
|
|
487
|
-
|
|
488
|
-
|
|
499
|
+
e[2] || (e[2] = (s) => o(g).searchValue = s),
|
|
500
|
+
o(B)
|
|
489
501
|
],
|
|
490
502
|
placeholder: "Search",
|
|
491
503
|
collapsible: ""
|
|
492
504
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
493
|
-
|
|
505
|
+
V("div", Ue, [
|
|
494
506
|
i(d, {
|
|
495
|
-
modelValue:
|
|
507
|
+
modelValue: o(g).searchValue,
|
|
496
508
|
"onUpdate:modelValue": [
|
|
497
|
-
|
|
498
|
-
|
|
509
|
+
e[3] || (e[3] = (s) => o(g).searchValue = s),
|
|
510
|
+
o(B)
|
|
499
511
|
],
|
|
500
512
|
placeholder: "Search",
|
|
501
513
|
collapsible: ""
|
|
502
514
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
503
515
|
]),
|
|
504
|
-
i(
|
|
505
|
-
loading:
|
|
506
|
-
"row-data":
|
|
507
|
-
"column-defs":
|
|
508
|
-
"row-count":
|
|
509
|
-
"page-count":
|
|
510
|
-
"page-index":
|
|
511
|
-
"page-size":
|
|
516
|
+
i(be, {
|
|
517
|
+
loading: o(g).isLoading,
|
|
518
|
+
"row-data": o(j),
|
|
519
|
+
"column-defs": o(_),
|
|
520
|
+
"row-count": o(g).totalRows,
|
|
521
|
+
"page-count": o(g).pageCount,
|
|
522
|
+
"page-index": o(g).pageIndex,
|
|
523
|
+
"page-size": o(g).pageSize,
|
|
512
524
|
"shrink-at": !1,
|
|
513
|
-
onSortChange:
|
|
514
|
-
onPageChange:
|
|
525
|
+
onSortChange: o(r),
|
|
526
|
+
onPageChange: e[4] || (e[4] = (s) => o(t)({ pageSize: s.pageSize, pageIndex: s.pageIndex }))
|
|
515
527
|
}, null, 8, ["loading", "row-data", "column-defs", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
516
|
-
i(
|
|
528
|
+
i(Ve, {
|
|
517
529
|
ref_key: "sheetRef",
|
|
518
530
|
ref: P,
|
|
519
531
|
onSuccess: O
|
|
@@ -524,5 +536,5 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
|
|
|
524
536
|
}
|
|
525
537
|
});
|
|
526
538
|
export {
|
|
527
|
-
|
|
539
|
+
Ke as default
|
|
528
540
|
};
|