@feedmepos/mf-connect 0.0.7 → 0.0.8
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-D-E67IbN.js → Analytic-BxRuK2P2.js} +8 -8
- package/dist/{Broadcast-NjpOa4PK.js → Broadcast-BqGojAWW.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-7KnDJ-sV.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js} +8 -8
- package/dist/{Card-BOEkf7wo.js → Card-Dlj5jQp4.js} +54 -54
- package/dist/{Collections-sLYCpBxu.js → Collections-DvdDRozp.js} +181 -186
- package/dist/{Credit-DU2_9ex7.js → Credit-BeHm7_2S.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CBO6OHrM.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js} +170 -160
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CTvGOX7T.js → EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js} +2999 -2978
- package/dist/{Experience-DGNdVxuU.js → Experience-CtDY9u4Y.js} +8 -8
- package/dist/{Game-B1i79HLc.js → Game-DjaYuqcb.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DzdMpEl_.js → ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js} +1 -1
- package/dist/{MainLayout-CfgDdm6k.js → MainLayout-B-iAZM2k.js} +1 -1
- package/dist/{Marketing-CBre7DEM.js → Marketing-BJJltAh-.js} +6 -6
- package/dist/{Member-BfvuL8GL.js → Member-eJ9Pdi5w.js} +2 -2
- package/dist/{MemberList-CQ17Q4V7.js → MemberList-CrhMqUfJ.js} +12 -12
- package/dist/{MemberTransactions-Cviim4GX.js → MemberTransactions-DRET8mSQ.js} +2 -2
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-j31pc2Wx.js → MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js} +2 -2
- package/dist/{Point-9ta-6dJv.js → Point-DPTOgJbC.js} +8 -8
- package/dist/{Promotion-CBmH5FNG.js → Promotion-wzkRuNqO.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-r9Q-pOrs.js → RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js} +12 -12
- package/dist/{Segment-ZUtFZM5W.js → Segment-DnsPrP7Q.js} +10 -10
- package/dist/{Setting-TQdqaKPQ.js → Setting-CXuZu0-m.js} +9 -9
- package/dist/{Store-DX1ALcTQ.js → Store-4Um9keEp.js} +12 -12
- package/dist/{StoreRewards-Bd1ZFUQM.js → StoreRewards-B-UFeyQM.js} +10 -10
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-D0L-LkOm.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js} +5 -5
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C0xL6Ua_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js} +1 -1
- package/dist/Tier-C6KVsxGO.js +818 -0
- package/dist/{Title-YJtGygMA.js → Title-DuN1ahIM.js} +236 -236
- package/dist/{Transaction-DmvmaPk6.js → Transaction-DdfX7Xfe.js} +1 -1
- package/dist/{Voucher-D88gJYa3.js → Voucher-DarXrxZr.js} +99 -94
- package/dist/{app-g6ra_l_x.js → app-CxBTTB31.js} +1266 -1251
- package/dist/app.js +1 -1
- package/dist/{campaign-DdY0vnwY.js → campaign-B0aXkadj.js} +7 -7
- package/dist/dto-BtdVC-Ab.js +1093 -0
- package/dist/{effect-CghM-w8z.js → effect-BUN6rkQM.js} +1 -1
- package/dist/{helper-xWsMhdHl.js → helper-Cpq3x8K5.js} +1 -1
- package/dist/{index-CVSXd2FW.js → index-0GYrZr4L.js} +138 -132
- package/dist/{index-Dz8i7yJ_.js → index-8clzk3uX.js} +1 -1
- package/dist/{index-D71HFulf.js → index-BTntbYTS.js} +1 -1
- package/dist/{index-B4ootZIL.js → index-BvnZdJBY.js} +2 -2
- package/dist/{index-Cl-b6jYW.js → index-C6NgUSl2.js} +1 -1
- package/dist/{index-Bp8rb1uM.js → index-CK9yJMj7.js} +34 -34
- package/dist/{index-BSF_A6Bx.js → index-D2Juhkdw.js} +2 -2
- package/dist/{index-C5UTq5_2.js → index-DDSLx7vu.js} +2 -2
- package/dist/{index-gLwPyXKM.js → index-Dg-PMgXV.js} +1 -1
- package/dist/index-DysVCkrx.js +1735 -0
- package/dist/libs/packages/core/src/campaign/campaign.enum.d.ts +6 -0
- package/dist/libs/packages/core/src/campaign/campaign.fn.d.ts +2 -0
- package/dist/libs/packages/core/src/template/templates.d.ts +7 -0
- package/dist/{loading-DClM7b3o.js → loading-Cxp7sI5p.js} +2 -2
- package/dist/{lodash-wTDGx83S.js → lodash-DsT1nK-T.js} +1 -1
- package/dist/{membership-BEDm55VI.js → membership-DtD45RXh.js} +4 -4
- package/dist/{money-CPy2C0LJ.js → money-CFI1TMCS.js} +1 -1
- package/dist/{number-ROACK3bi.js → number-BBtf4fYz.js} +1 -1
- package/dist/packages/connect/src/api/index.d.ts +3 -0
- package/dist/packages/connect/src/api/settings/index.d.ts +1 -1
- package/dist/packages/connect/src/main.d.ts +1 -1
- package/dist/{plugins-CJou3ejy.js → plugins-B_d-WFtN.js} +4 -4
- package/dist/{rule-Cp7qN96m.js → rule-CB9Qlcx1.js} +2 -2
- package/dist/{rule-builder-OR4oX_mq.js → rule-builder-BIKcA4Bg.js} +1 -1
- package/dist/{template-Dk2sky27.js → template-qlb46PGl.js} +5 -5
- package/dist/{usePagination-DRHXkOF-.js → usePagination-CX66ab1Y.js} +1 -1
- package/dist/{xlsx-C5St1Lch.js → xlsx-DMaFso0k.js} +1 -1
- package/package.json +2 -2
- package/dist/Tier-DAUABM7F.js +0 -818
- package/dist/dto-BQHDb7XC.js +0 -353
- package/dist/index-CPU_mtDw.js +0 -1742
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { h as
|
|
6
|
-
import { u as
|
|
7
|
-
import { components as
|
|
8
|
-
import "./plugins-
|
|
9
|
-
import { u as
|
|
10
|
-
import { useRoute as
|
|
11
|
-
import { c as
|
|
12
|
-
import {
|
|
13
|
-
import { u as
|
|
14
|
-
import { m as
|
|
15
|
-
import { o as
|
|
16
|
-
const
|
|
1
|
+
var Z = Object.defineProperty;
|
|
2
|
+
var ee = (b, s, u) => s in b ? Z(b, s, { enumerable: !0, configurable: !0, writable: !0, value: u }) : b[s] = u;
|
|
3
|
+
var z = (b, s, u) => ee(b, typeof s != "symbol" ? s + "" : s, u);
|
|
4
|
+
import { defineComponent as j, ref as g, computed as G, watch as oe, resolveComponent as m, openBlock as h, createBlock as L, unref as e, isRef as O, withCtx as N, createElementVNode as f, createVNode as r, createElementBlock as U, Fragment as P, renderList as te, createCommentVNode as B, onMounted as ae, h as M } from "vue";
|
|
5
|
+
import { h as K } from "./moment-BWErdI6_.js";
|
|
6
|
+
import { u as le, b as ne } from "./app-CxBTTB31.js";
|
|
7
|
+
import { components as se } from "@feedmepos/ui-library";
|
|
8
|
+
import "./plugins-B_d-WFtN.js";
|
|
9
|
+
import { u as H } from "./loading-Cxp7sI5p.js";
|
|
10
|
+
import { useRoute as Q } from "vue-router";
|
|
11
|
+
import { c as A } from "./index-BTntbYTS.js";
|
|
12
|
+
import { u as T, w as re } from "./xlsx-DMaFso0k.js";
|
|
13
|
+
import { u as ie, _ as de } from "./usePagination-CX66ab1Y.js";
|
|
14
|
+
import { m as ue } from "./index-C6NgUSl2.js";
|
|
15
|
+
import { o as ce } from "./objectId-dwaoBfJX.js";
|
|
16
|
+
const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), pe = { class: "space-y-16" }, fe = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), ge = { class: "gap-16 grid grid-cols-2" }, be = { class: "flex items-center gap-8" }, Ce = /* @__PURE__ */ j({
|
|
17
17
|
__name: "CreateCollectionSheet",
|
|
18
18
|
emits: ["success"],
|
|
19
|
-
setup(
|
|
20
|
-
const { minor:
|
|
21
|
-
function
|
|
22
|
-
|
|
19
|
+
setup(b, { expose: s, emit: u }) {
|
|
20
|
+
const { minor: F } = H, I = Q(), R = g(), _ = g(!1), E = u, C = g(!1);
|
|
21
|
+
function c(i) {
|
|
22
|
+
C.value = i, i && (l.value = {
|
|
23
23
|
quantity: 1,
|
|
24
24
|
code: "",
|
|
25
25
|
codeConfig: {
|
|
@@ -41,7 +41,7 @@ const ue = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
41
41
|
suffix: "",
|
|
42
42
|
pattern: "########"
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), q = [
|
|
45
45
|
{
|
|
46
46
|
label: "Bulk codes",
|
|
47
47
|
value: "bulk",
|
|
@@ -52,7 +52,7 @@ const ue = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
52
52
|
value: "single",
|
|
53
53
|
sublabel: "Enter your own custom codes"
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], v = [
|
|
56
56
|
{
|
|
57
57
|
label: "Alphanumeric",
|
|
58
58
|
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
@@ -65,12 +65,12 @@ const ue = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
65
65
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
66
66
|
{ label: "Numbers", value: "0123456789" },
|
|
67
67
|
{ label: "Custom", value: "" }
|
|
68
|
-
],
|
|
69
|
-
async function
|
|
68
|
+
], x = g(v[0].value), y = g("bulk"), V = g(!1), n = G(() => I.params.id);
|
|
69
|
+
async function a(i) {
|
|
70
70
|
var o;
|
|
71
|
-
await ((o =
|
|
71
|
+
await ((o = R.value) == null ? void 0 : o.validateInputs()), _.value && await F(
|
|
72
72
|
async () => {
|
|
73
|
-
await
|
|
73
|
+
await A.createCollectionByCampaignId(n.value, i), await E("success");
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
message: "Creating claim(s)",
|
|
@@ -78,58 +78,58 @@ const ue = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
|
-
return
|
|
82
|
-
showSheet:
|
|
83
|
-
}),
|
|
81
|
+
return s({
|
|
82
|
+
showSheet: c
|
|
83
|
+
}), oe(
|
|
84
84
|
() => l.value.codeConfig.length,
|
|
85
|
-
(
|
|
86
|
-
|
|
85
|
+
(i, o) => {
|
|
86
|
+
i != o && (l.value.codeConfig.pattern = "#".repeat(Number(i)));
|
|
87
87
|
}
|
|
88
|
-
), (
|
|
89
|
-
const
|
|
90
|
-
return
|
|
88
|
+
), (i, o) => {
|
|
89
|
+
const d = m("FmRadio"), S = m("FmRadioGroup"), $ = m("FmSwitch"), w = m("FmStepperField"), D = m("FmSelect"), k = m("FmTextField"), W = m("FmTextarea"), J = m("FmForm"), Y = m("FmButton"), X = m("FmSideSheet");
|
|
90
|
+
return h(), L(X, {
|
|
91
91
|
"max-width": 560,
|
|
92
92
|
"dismiss-away": !0,
|
|
93
93
|
header: "Create collection",
|
|
94
|
-
modelValue: e(
|
|
94
|
+
modelValue: e(C),
|
|
95
95
|
"onUpdate:modelValue": [
|
|
96
|
-
o[14] || (o[14] = (t) =>
|
|
97
|
-
o[15] || (o[15] = (t) =>
|
|
96
|
+
o[14] || (o[14] = (t) => O(C) ? C.value = t : null),
|
|
97
|
+
o[15] || (o[15] = (t) => C.value = t)
|
|
98
98
|
]
|
|
99
99
|
}, {
|
|
100
|
-
"side-sheet-footer":
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
"side-sheet-footer": N(() => [
|
|
101
|
+
f("div", be, [
|
|
102
|
+
r(Y, {
|
|
103
103
|
label: "Save",
|
|
104
|
-
onClick: o[12] || (o[12] = (t) =>
|
|
105
|
-
loading: e(
|
|
104
|
+
onClick: o[12] || (o[12] = (t) => a(e(l))),
|
|
105
|
+
loading: e(le)().isLoading
|
|
106
106
|
}, null, 8, ["loading"]),
|
|
107
|
-
|
|
107
|
+
r(Y, {
|
|
108
108
|
label: "Cancel",
|
|
109
109
|
type: "button",
|
|
110
110
|
variant: "tertiary",
|
|
111
|
-
onClick: o[13] || (o[13] = (t) =>
|
|
111
|
+
onClick: o[13] || (o[13] = (t) => C.value = !1)
|
|
112
112
|
})
|
|
113
113
|
])
|
|
114
114
|
]),
|
|
115
|
-
default:
|
|
116
|
-
|
|
115
|
+
default: N(() => [
|
|
116
|
+
r(J, {
|
|
117
117
|
ref_key: "form",
|
|
118
|
-
ref:
|
|
118
|
+
ref: R,
|
|
119
119
|
class: "space-y-40",
|
|
120
|
-
onValidationSuccess: o[10] || (o[10] = (t) =>
|
|
121
|
-
onValidationFailed: o[11] || (o[11] = (t) =>
|
|
120
|
+
onValidationSuccess: o[10] || (o[10] = (t) => _.value = !0),
|
|
121
|
+
onValidationFailed: o[11] || (o[11] = (t) => _.value = !1)
|
|
122
122
|
}, {
|
|
123
|
-
default:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
modelValue: e(
|
|
128
|
-
"onUpdate:modelValue": o[0] || (o[0] = (t) =>
|
|
123
|
+
default: N(() => [
|
|
124
|
+
f("div", null, [
|
|
125
|
+
me,
|
|
126
|
+
r(S, {
|
|
127
|
+
modelValue: e(y),
|
|
128
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => O(y) ? y.value = t : null),
|
|
129
129
|
inline: !1
|
|
130
130
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
(
|
|
131
|
+
default: N(() => [
|
|
132
|
+
(h(), U(P, null, te(q, (t) => r(d, {
|
|
133
133
|
key: t.value,
|
|
134
134
|
value: t.value,
|
|
135
135
|
label: t.label,
|
|
@@ -139,61 +139,61 @@ const ue = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
139
139
|
_: 1
|
|
140
140
|
}, 8, ["modelValue"])
|
|
141
141
|
]),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
e(
|
|
145
|
-
|
|
146
|
-
"model-value": e(
|
|
142
|
+
f("div", pe, [
|
|
143
|
+
fe,
|
|
144
|
+
e(y) === "bulk" ? (h(), U(P, { key: 0 }, [
|
|
145
|
+
r($, {
|
|
146
|
+
"model-value": e(V),
|
|
147
147
|
"label-placement": "right",
|
|
148
148
|
value: "true",
|
|
149
149
|
label: "Advance code setting",
|
|
150
150
|
required: !0,
|
|
151
|
-
"onUpdate:modelValue": o[1] || (o[1] = () =>
|
|
151
|
+
"onUpdate:modelValue": o[1] || (o[1] = () => V.value = !e(V))
|
|
152
152
|
}, null, 8, ["model-value"]),
|
|
153
|
-
e(
|
|
154
|
-
|
|
153
|
+
e(V) ? (h(), U(P, { key: 0 }, [
|
|
154
|
+
r(w, {
|
|
155
155
|
modelValue: e(l).codeConfig.length,
|
|
156
156
|
"onUpdate:modelValue": o[2] || (o[2] = (t) => e(l).codeConfig.length = t),
|
|
157
157
|
label: "Code length",
|
|
158
158
|
rules: [(t) => Number(t) >= 1 || "Code length must at least 1"],
|
|
159
159
|
required: !0
|
|
160
160
|
}, null, 8, ["modelValue", "rules"]),
|
|
161
|
-
|
|
161
|
+
r(D, {
|
|
162
162
|
label: "Charset",
|
|
163
|
-
"model-value": e(
|
|
164
|
-
items:
|
|
163
|
+
"model-value": e(x),
|
|
164
|
+
items: v,
|
|
165
165
|
"helper-text": e(l).codeConfig.charset.length > 62 ? `${e(l).codeConfig.charset.substring(0, 62)}...` : e(l).codeConfig.charset,
|
|
166
166
|
"onUpdate:modelValue": o[3] || (o[3] = (t) => {
|
|
167
|
-
|
|
167
|
+
x.value = t, e(l).codeConfig.charset = t;
|
|
168
168
|
})
|
|
169
169
|
}, null, 8, ["model-value", "helper-text"]),
|
|
170
|
-
e(
|
|
170
|
+
e(x) === "" ? (h(), L(k, {
|
|
171
171
|
key: 0,
|
|
172
172
|
modelValue: e(l).codeConfig.charset,
|
|
173
173
|
"onUpdate:modelValue": o[4] || (o[4] = (t) => e(l).codeConfig.charset = t),
|
|
174
174
|
label: "Custom Charset",
|
|
175
175
|
required: ""
|
|
176
|
-
}, null, 8, ["modelValue"])) :
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
}, null, 8, ["modelValue"])) : B("", !0),
|
|
177
|
+
f("div", ge, [
|
|
178
|
+
r(k, {
|
|
179
179
|
modelValue: e(l).codeConfig.prefix,
|
|
180
180
|
"onUpdate:modelValue": o[5] || (o[5] = (t) => e(l).codeConfig.prefix = t),
|
|
181
181
|
label: "Prefix (Optional)"
|
|
182
182
|
}, null, 8, ["modelValue"]),
|
|
183
|
-
|
|
183
|
+
r(k, {
|
|
184
184
|
modelValue: e(l).codeConfig.suffix,
|
|
185
185
|
"onUpdate:modelValue": o[6] || (o[6] = (t) => e(l).codeConfig.suffix = t),
|
|
186
186
|
label: "Suffix (Optional)"
|
|
187
187
|
}, null, 8, ["modelValue"])
|
|
188
188
|
]),
|
|
189
|
-
|
|
189
|
+
r(k, {
|
|
190
190
|
modelValue: e(l).codeConfig.pattern,
|
|
191
191
|
"onUpdate:modelValue": o[7] || (o[7] = (t) => e(l).codeConfig.pattern = t),
|
|
192
192
|
label: "Pattern",
|
|
193
193
|
required: !0
|
|
194
194
|
}, null, 8, ["modelValue"])
|
|
195
|
-
], 64)) :
|
|
196
|
-
|
|
195
|
+
], 64)) : B("", !0),
|
|
196
|
+
r(k, {
|
|
197
197
|
modelValue: e(l).quantity,
|
|
198
198
|
"onUpdate:modelValue": o[8] || (o[8] = (t) => e(l).quantity = t),
|
|
199
199
|
label: "Number of code",
|
|
@@ -204,15 +204,15 @@ const ue = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
204
204
|
required: !0,
|
|
205
205
|
"helper-text": `${e(l).quantity} claim will be created`
|
|
206
206
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
207
|
-
], 64)) :
|
|
208
|
-
e(
|
|
207
|
+
], 64)) : B("", !0),
|
|
208
|
+
e(y) !== "bulk" ? (h(), L(W, {
|
|
209
209
|
key: 1,
|
|
210
210
|
modelValue: e(l).code,
|
|
211
211
|
"onUpdate:modelValue": o[9] || (o[9] = (t) => e(l).code = t),
|
|
212
212
|
label: "Custom Code",
|
|
213
|
-
rules: [(t) => e(
|
|
213
|
+
rules: [(t) => e(y) != "single" || !!t || "Custom code is required"],
|
|
214
214
|
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
215
|
-
}, null, 8, ["modelValue", "rules"])) :
|
|
215
|
+
}, null, 8, ["modelValue", "rules"])) : B("", !0)
|
|
216
216
|
])
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
@@ -223,34 +223,34 @@ const ue = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
|
-
class
|
|
226
|
+
class ye {
|
|
227
227
|
constructor() {
|
|
228
|
-
|
|
228
|
+
z(this, "data", []);
|
|
229
229
|
}
|
|
230
|
-
addRecord(
|
|
231
|
-
this.data.push(
|
|
230
|
+
addRecord(s) {
|
|
231
|
+
this.data.push(s);
|
|
232
232
|
}
|
|
233
233
|
buildExcel() {
|
|
234
|
-
const
|
|
235
|
-
return
|
|
234
|
+
const s = T.book_new(), u = T.json_to_sheet(this.data);
|
|
235
|
+
return T.book_append_sheet(s, u, "Collection"), s;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
const
|
|
238
|
+
const p = {
|
|
239
239
|
sortBy: "_id",
|
|
240
240
|
descending: !1,
|
|
241
241
|
rowsPerPage: 1e3,
|
|
242
242
|
page: 1,
|
|
243
243
|
rowsNumber: 0
|
|
244
|
-
}, he = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ve = { class: "flex items-center justify-end py-4 xs:hidden" },
|
|
244
|
+
}, he = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ve = { class: "flex items-center justify-end py-4 xs:hidden" }, xe = {
|
|
245
245
|
key: 0,
|
|
246
246
|
class: "w-full flex flex-col gap-16 items-center pt-16"
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
],
|
|
247
|
+
}, Ve = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1), Se = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1), we = [
|
|
248
|
+
Ve,
|
|
249
|
+
Se
|
|
250
|
+
], De = /* @__PURE__ */ j({
|
|
251
251
|
__name: "Collections",
|
|
252
|
-
setup(
|
|
253
|
-
const
|
|
252
|
+
setup(b) {
|
|
253
|
+
const s = Q(), u = g(), F = G(() => s.params.id), I = g(!1), { custom: R } = H, _ = [
|
|
254
254
|
{
|
|
255
255
|
header: "ID/Code",
|
|
256
256
|
accessorFn: (n) => n.code || n._id
|
|
@@ -261,18 +261,18 @@ const b = {
|
|
|
261
261
|
enableSorting: !1,
|
|
262
262
|
cell(n) {
|
|
263
263
|
const a = n.row.original.pf_user;
|
|
264
|
-
return
|
|
264
|
+
return M(
|
|
265
265
|
"div",
|
|
266
266
|
{
|
|
267
267
|
class: "flex items-center gap-x-8"
|
|
268
268
|
},
|
|
269
269
|
[
|
|
270
|
-
|
|
270
|
+
M(se.FmAvatar, {
|
|
271
271
|
name: a != null && a.photoUrl || a == null ? void 0 : a.name,
|
|
272
272
|
src: (a == null ? void 0 : a.photoUrl) ?? void 0,
|
|
273
273
|
size: "sm"
|
|
274
274
|
}),
|
|
275
|
-
|
|
275
|
+
M("span", a == null ? void 0 : a.name)
|
|
276
276
|
]
|
|
277
277
|
);
|
|
278
278
|
}
|
|
@@ -282,7 +282,8 @@ const b = {
|
|
|
282
282
|
accessorFn: (n) => {
|
|
283
283
|
var a;
|
|
284
284
|
return ((a = n.pf_user) == null ? void 0 : a.phoneNumber) || "-";
|
|
285
|
-
}
|
|
285
|
+
},
|
|
286
|
+
accessorKey: "pf_user.phoneNumber"
|
|
286
287
|
},
|
|
287
288
|
{
|
|
288
289
|
header: "Balance",
|
|
@@ -291,68 +292,58 @@ const b = {
|
|
|
291
292
|
{
|
|
292
293
|
header: "Created at",
|
|
293
294
|
accessorKey: "_id",
|
|
294
|
-
accessorFn: (n) =>
|
|
295
|
+
accessorFn: (n) => K(ce(n._id.toString())).format("DD MMM YYYY")
|
|
295
296
|
},
|
|
296
297
|
{
|
|
297
298
|
header: "Nearest expired at",
|
|
299
|
+
accessorKey: "expiryBalance",
|
|
298
300
|
accessorFn: (n) => {
|
|
299
301
|
var a;
|
|
300
|
-
return n.expiryBalance && n.expiryBalance.length ?
|
|
302
|
+
return n.expiryBalance && n.expiryBalance.length ? K((a = n.expiryBalance) == null ? void 0 : a[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
301
303
|
}
|
|
302
304
|
}
|
|
303
|
-
],
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
});
|
|
315
|
-
y.value = d.resources, s.value.totalRows = d.meta.totalResources ?? 0, s.value.pageCount = d.meta.totalPages ?? 0, s.value.isLoading = !1;
|
|
316
|
-
}, s = g({
|
|
317
|
-
searchValue: "",
|
|
318
|
-
pageSize: 10,
|
|
319
|
-
pageCount: 0,
|
|
320
|
-
pageIndex: 0,
|
|
321
|
-
totalRows: 0,
|
|
322
|
-
isLoading: !1
|
|
323
|
-
}), y = g([]);
|
|
324
|
-
async function l() {
|
|
305
|
+
], E = {
|
|
306
|
+
"$connect-STORE_REWARD_COLLECTIONS": ue.readCollectionsByRewardId,
|
|
307
|
+
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": A.readCollectionsByCampaignId
|
|
308
|
+
}, C = (n) => {
|
|
309
|
+
const a = E[s.name];
|
|
310
|
+
return (i) => a(n, i);
|
|
311
|
+
}, { tableMeta: c, rowData: l, onSort: q, debouncedFetchData: v, onSearch: x } = ie(C(F.value), {
|
|
312
|
+
key: "_id",
|
|
313
|
+
descending: !1
|
|
314
|
+
});
|
|
315
|
+
async function y() {
|
|
325
316
|
var n;
|
|
326
|
-
await
|
|
317
|
+
await v(), (n = u.value) == null || n.showSheet(!1);
|
|
327
318
|
}
|
|
328
|
-
async function
|
|
329
|
-
|
|
319
|
+
async function V() {
|
|
320
|
+
I.value || R(
|
|
330
321
|
async () => {
|
|
331
|
-
var
|
|
332
|
-
const n = new
|
|
322
|
+
var o;
|
|
323
|
+
const n = new ye(), a = (await A.readCollectionsByCampaignId(F.value, {
|
|
333
324
|
limit: 1,
|
|
334
325
|
skip: 0,
|
|
335
|
-
sortBy:
|
|
336
|
-
descending:
|
|
337
|
-
})).meta.totalResources ?? 0,
|
|
338
|
-
for (let
|
|
339
|
-
const
|
|
340
|
-
...
|
|
341
|
-
limit:
|
|
342
|
-
skip: (
|
|
343
|
-
sortBy:
|
|
344
|
-
descending:
|
|
345
|
-
},
|
|
346
|
-
|
|
347
|
-
|
|
326
|
+
sortBy: p.sortBy,
|
|
327
|
+
descending: p.descending
|
|
328
|
+
})).meta.totalResources ?? 0, i = p.rowsPerPage;
|
|
329
|
+
for (let d = 0; d < a; d += i) {
|
|
330
|
+
const S = {
|
|
331
|
+
...p,
|
|
332
|
+
limit: i,
|
|
333
|
+
skip: (p.page - 1) * p.rowsPerPage,
|
|
334
|
+
sortBy: p.sortBy,
|
|
335
|
+
descending: p.descending
|
|
336
|
+
}, $ = await A.readCollectionsByCampaignId(
|
|
337
|
+
F.value,
|
|
338
|
+
S
|
|
348
339
|
);
|
|
349
|
-
for await (const
|
|
350
|
-
const
|
|
351
|
-
Id: (
|
|
340
|
+
for await (const w of $.resources) {
|
|
341
|
+
const D = {
|
|
342
|
+
Id: (w == null ? void 0 : w.code) || ((o = w._id) == null ? void 0 : o.toString()) || ""
|
|
352
343
|
};
|
|
353
|
-
n.addRecord(
|
|
344
|
+
n.addRecord(D);
|
|
354
345
|
}
|
|
355
|
-
|
|
346
|
+
p.page++;
|
|
356
347
|
}
|
|
357
348
|
await re(
|
|
358
349
|
n.buildExcel(),
|
|
@@ -362,22 +353,19 @@ const b = {
|
|
|
362
353
|
bookSST: !1,
|
|
363
354
|
type: "array"
|
|
364
355
|
}
|
|
365
|
-
),
|
|
356
|
+
), p.page = 1;
|
|
366
357
|
},
|
|
367
358
|
{
|
|
368
|
-
isLoading:
|
|
359
|
+
isLoading: I
|
|
369
360
|
}
|
|
370
361
|
);
|
|
371
362
|
}
|
|
372
|
-
return
|
|
373
|
-
()
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
const u = m("FmPageHead"), d = m("FmSearch"), x = m("FmTable");
|
|
379
|
-
return C(), S(U, null, [
|
|
380
|
-
i(u, {
|
|
363
|
+
return ae(async () => {
|
|
364
|
+
await v();
|
|
365
|
+
}), (n, a) => {
|
|
366
|
+
const i = m("FmPageHead"), o = m("FmSearch");
|
|
367
|
+
return h(), U(P, null, [
|
|
368
|
+
r(i, {
|
|
381
369
|
title: "Collections",
|
|
382
370
|
"back-button": !0,
|
|
383
371
|
actions: [
|
|
@@ -388,44 +376,51 @@ const b = {
|
|
|
388
376
|
isPrimary: !0
|
|
389
377
|
}
|
|
390
378
|
],
|
|
391
|
-
"onClick:back": a[0] || (a[0] = (
|
|
392
|
-
"onClick:action": a[1] || (a[1] = (
|
|
393
|
-
var
|
|
394
|
-
|
|
379
|
+
"onClick:back": a[0] || (a[0] = (d) => e(ne).back()),
|
|
380
|
+
"onClick:action": a[1] || (a[1] = (d) => {
|
|
381
|
+
var S;
|
|
382
|
+
d === "create" && ((S = e(u)) == null || S.showSheet(!0)), d === "export" && V();
|
|
395
383
|
})
|
|
396
384
|
}),
|
|
397
|
-
|
|
398
|
-
|
|
385
|
+
f("div", he, [
|
|
386
|
+
r(o, {
|
|
399
387
|
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
400
|
-
modelValue: e(
|
|
401
|
-
"onUpdate:modelValue":
|
|
388
|
+
modelValue: e(c).searchValue,
|
|
389
|
+
"onUpdate:modelValue": [
|
|
390
|
+
a[2] || (a[2] = (d) => e(c).searchValue = d),
|
|
391
|
+
e(x)
|
|
392
|
+
],
|
|
402
393
|
placeholder: "Search",
|
|
403
394
|
collapsible: ""
|
|
404
|
-
}, null, 8, ["modelValue"]),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
modelValue: e(
|
|
408
|
-
"onUpdate:modelValue":
|
|
395
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
396
|
+
f("div", ve, [
|
|
397
|
+
r(o, {
|
|
398
|
+
modelValue: e(c).searchValue,
|
|
399
|
+
"onUpdate:modelValue": [
|
|
400
|
+
a[3] || (a[3] = (d) => e(c).searchValue = d),
|
|
401
|
+
e(x)
|
|
402
|
+
],
|
|
409
403
|
placeholder: "Search",
|
|
410
404
|
collapsible: ""
|
|
411
|
-
}, null, 8, ["modelValue"])
|
|
405
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
412
406
|
]),
|
|
413
|
-
|
|
414
|
-
loading: e(
|
|
415
|
-
"row-data": e(
|
|
416
|
-
"column-defs":
|
|
417
|
-
"row-count": e(
|
|
418
|
-
"page-count": e(
|
|
419
|
-
"
|
|
420
|
-
"
|
|
407
|
+
r(de, {
|
|
408
|
+
loading: e(c).isLoading,
|
|
409
|
+
"row-data": e(l),
|
|
410
|
+
"column-defs": _,
|
|
411
|
+
"row-count": e(c).totalRows,
|
|
412
|
+
"page-count": e(c).pageCount,
|
|
413
|
+
"page-index": e(c).pageIndex,
|
|
414
|
+
"page-size": e(c).pageSize,
|
|
421
415
|
"shrink-at": !1,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
416
|
+
onSortChange: e(q),
|
|
417
|
+
onPageChange: a[4] || (a[4] = (d) => e(v)({ pageSize: d.pageSize, pageIndex: d.pageIndex }))
|
|
418
|
+
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
419
|
+
e(l).length == 0 && !e(c).isLoading ? (h(), U("div", xe, we)) : B("", !0),
|
|
420
|
+
r(Ce, {
|
|
426
421
|
ref_key: "sheetRef",
|
|
427
|
-
ref:
|
|
428
|
-
onSuccess:
|
|
422
|
+
ref: u,
|
|
423
|
+
onSuccess: y
|
|
429
424
|
}, null, 512)
|
|
430
425
|
])
|
|
431
426
|
], 64);
|
|
@@ -433,5 +428,5 @@ const b = {
|
|
|
433
428
|
}
|
|
434
429
|
});
|
|
435
430
|
export {
|
|
436
|
-
|
|
431
|
+
De as default
|
|
437
432
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as U, ref as k, computed as A, onMounted as N, resolveComponent as i, openBlock as l, createElementBlock as f, Fragment as g, createVNode as r, unref as o, createElementVNode as s, withCtx as h, renderList as j, createBlock as C, resolveDynamicComponent as M, toDisplayString as y, createCommentVNode as H, h as q } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as O } from "./plugins-
|
|
5
|
-
import { u as Q } from "./loading-
|
|
6
|
-
import { a as W } from "./app-
|
|
7
|
-
import { u as X } from "./campaign-
|
|
8
|
-
import { g as S, b as V } from "./dto-
|
|
4
|
+
import { p as O } from "./plugins-B_d-WFtN.js";
|
|
5
|
+
import { u as Q } from "./loading-Cxp7sI5p.js";
|
|
6
|
+
import { a as W } from "./app-CxBTTB31.js";
|
|
7
|
+
import { u as X } from "./campaign-B0aXkadj.js";
|
|
8
|
+
import { g as S, b as V } from "./dto-BtdVC-Ab.js";
|
|
9
9
|
import { _ as Y } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
-
import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { u as ee } from "./template-
|
|
12
|
-
import { c as _ } from "./index-
|
|
10
|
+
import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js";
|
|
11
|
+
import { u as ee } from "./template-qlb46PGl.js";
|
|
12
|
+
import { c as _ } from "./index-BTntbYTS.js";
|
|
13
13
|
const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-center justify-between w-full" }, ae = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, ne = { class: "flex w-full gap-4 items-center" }, re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, le = { class: "fm-typo-en-body-lg-600" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { key: 0 }, ue = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), pe = [
|
|
14
14
|
ue
|
|
15
15
|
], fe = /* @__PURE__ */ s("img", {
|