@feedmepos/mf-connect 0.0.5-beta.31 → 0.0.5-beta.33
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-DQLL4d6x.js → Analytic-CNXMLzgx.js} +7 -7
- package/dist/{Broadcast-BWcdYdz0.js → Broadcast-DVBuSkDe.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CTiYv4jr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CT-_Qy1B.js} +8 -8
- package/dist/{Card-83bPaBjg.js → Card-D_5uRHnr.js} +57 -57
- package/dist/{Collections-DvERgMZ8.js → Collections-MTSTlmAC.js} +138 -127
- package/dist/{Credit-Crm54zmF.js → Credit-Dl53Fmzj.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BP4MkXQG.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BVQaNCIx.js} +667 -574
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DgQeASq4.js +336 -0
- package/dist/{Experience-Q4U18dfR.js → Experience-C7R55M6J.js} +7 -7
- package/dist/{Game-BZLPo-Yg.js → Game-DdkHY9VW.js} +7 -7
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DccxXCOH.js → ImageInput.vue_vue_type_script_setup_true_lang-CJ9721f-.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D2csUJY_.js → LottieAnimation.vue_vue_type_script_setup_true_lang-7cP5gwrs.js} +1 -1
- package/dist/{MainLayout-DadiUZbY.js → MainLayout-D1YpxxJ_.js} +2 -2
- package/dist/{Marketing-DPDlB928.js → Marketing-CpAOzX2I.js} +4 -4
- package/dist/{Member-DKhrNAlF.js → Member-Ba8fLGUn.js} +2 -2
- package/dist/{MemberList-DoNI-fw6.js → MemberList-Dm7mc48L.js} +12 -12
- package/dist/{MemberTransactions-Dss9SCsl.js → MemberTransactions-ha0Z4QkS.js} +2 -2
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-AiPEEyTb.js → MessageInput.vue_vue_type_script_setup_true_lang-DT_mVuKH.js} +4 -4
- package/dist/{Mission-Bv_StyAI.js → Mission-DfB2p7Sz.js} +7 -7
- package/dist/{Point-jvhL0cBo.js → Point-DbKUR_55.js} +7 -7
- package/dist/{Promotion-uu6ygEil.js → Promotion-Bsnw7ZV-.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BBjfeUV8.js → RuleGroup.vue_vue_type_script_setup_true_lang-fMOrvxLX.js} +189 -183
- package/dist/{Segment-DLTHLGIF.js → Segment-DG1mhiAk.js} +9 -9
- package/dist/{Setting-B_y41Yez.js → Setting-BNetobV8.js} +32 -32
- package/dist/{Store-CVFRvb41.js → Store-D2Em8c92.js} +11 -11
- package/dist/{StoreRewards-Cu7wZ0ZU.js → StoreRewards-BtY9ogUE.js} +9 -9
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CKlJt4G6.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BOpoResF.js} +6 -6
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DUo5qVcv.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DsaMVebu.js} +1 -1
- package/dist/{Tier-Db8Lg0Vb.js → Tier-Cxi-c8YH.js} +16 -16
- package/dist/{Title-CvXd5BLT.js → Title-fyQF9ek-.js} +15 -15
- package/dist/{Transaction-Csmzom2v.js → Transaction-97kVB5kR.js} +1 -1
- package/dist/{Voucher-BXET5aJR.js → Voucher-CjSL9itE.js} +9 -9
- package/dist/{app-CNDjscMY.js → app-CbQKMjem.js} +1 -1
- package/dist/{app-DLrqEkpN.js → app-a2-WAW77.js} +33 -33
- package/dist/app.js +1 -1
- package/dist/{campaign-el9UbKPS.js → campaign-D_wE2B1-.js} +2 -2
- package/dist/{collection.fn-DX_vR3D0.js → collection.fn-Cq-r9GkN.js} +2 -2
- package/dist/{dto-nI9tXw_a.js → dto-BU0j3TXO.js} +62 -62
- package/dist/{effect-ClGuF42_.js → effect-CDHcyCAv.js} +1 -1
- package/dist/{export-D2rZkp_a.js → export-vF3NFCH8.js} +3 -3
- package/dist/{helper-rCOz3CsQ.js → helper-BEQFHlPU.js} +1 -1
- package/dist/{index-CPs_BVYE.js → index-63IOen0g.js} +1 -1
- package/dist/{index-CM4H_24q.js → index-7gDA7bIS.js} +2 -2
- package/dist/{index-DbWauIjL.js → index-BJd7ANKi.js} +9 -8
- package/dist/{index-BVIk3CBr.js → index-BuZma8WK.js} +47 -36
- package/dist/{index-DU3kVZJo.js → index-CXVbSINN.js} +22 -21
- package/dist/{index-B5jSpptU.js → index-ClcBl-qS.js} +1 -1
- package/dist/{index-CVWlZHun.js → index-CoibwKhz.js} +3 -3
- package/dist/{index-C-4fybpk.js → index-DkC538IK.js} +2 -2
- package/dist/{index-CNJHOzLv.js → index-aUJ7nL7D.js} +1 -1
- package/dist/{index-B4Kds-ma.js → index-xLyzGpQB.js} +1 -1
- package/dist/{loading-uAAk9Jhw.js → loading-CI_KxaTU.js} +4 -4
- package/dist/{lodash-BrKuGzuq.js → lodash-BxnA-2hs.js} +1 -1
- package/dist/{membership-DxgwKo0i.js → membership-CdrfUzbQ.js} +3 -3
- package/dist/{money-BB8cJhJ9.js → money-BO0w_HQk.js} +1 -1
- package/dist/{number-B7yiKCmJ.js → number-B4kDwfjC.js} +1 -1
- package/dist/{rule-LiZBsce_.js → rule-CJS2jnlF.js} +2 -2
- package/dist/{rule-builder-z8MibNmg.js → rule-builder-xrzpCMQe.js} +1 -1
- package/dist/{template-D5x7w2gg.js → template-Evzdo8_w.js} +6 -6
- package/dist/{usePagination-DokNC372.js → usePagination-eI7ip2jK.js} +1 -1
- package/dist/{xlsx-BMNlmH0N.js → xlsx-9dTB9Owq.js} +1 -1
- package/package.json +1 -1
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-GxapvbsJ.js +0 -330
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var z = (
|
|
4
|
-
import { defineComponent as
|
|
1
|
+
var ee = Object.defineProperty;
|
|
2
|
+
var oe = (b, r, u) => r in b ? ee(b, r, { enumerable: !0, configurable: !0, writable: !0, value: u }) : b[r] = u;
|
|
3
|
+
var z = (b, r, u) => oe(b, typeof r != "symbol" ? r + "" : r, u);
|
|
4
|
+
import { defineComponent as G, ref as g, computed as H, watch as O, resolveComponent as c, openBlock as v, createBlock as L, unref as e, isRef as j, withCtx as R, createElementVNode as h, createVNode as s, createElementBlock as P, Fragment as N, renderList as ae, createCommentVNode as I, onMounted as te, h as T } from "vue";
|
|
5
5
|
import { h as K } from "./moment-BWErdI6_.js";
|
|
6
|
-
import { u as le,
|
|
7
|
-
import { components as
|
|
8
|
-
import { u as
|
|
6
|
+
import { u as le, J as ne, R as se } from "./app-a2-WAW77.js";
|
|
7
|
+
import { components as re } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as J } from "./loading-CI_KxaTU.js";
|
|
9
9
|
import { useRoute as Q } from "vue-router";
|
|
10
|
-
import { c as A } from "./index-
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { m as
|
|
14
|
-
import { o as
|
|
15
|
-
const
|
|
10
|
+
import { c as A } from "./index-ClcBl-qS.js";
|
|
11
|
+
import { u as Y, w as ie } from "./xlsx-9dTB9Owq.js";
|
|
12
|
+
import { u as de, _ as ue } from "./usePagination-eI7ip2jK.js";
|
|
13
|
+
import { m as ce } from "./index-63IOen0g.js";
|
|
14
|
+
import { o as me } from "./objectId-dwaoBfJX.js";
|
|
15
|
+
const pe = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), fe = { class: "space-y-16" }, ge = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), be = { class: "gap-16 grid grid-cols-2" }, Ce = { class: "flex items-center gap-8" }, he = /* @__PURE__ */ G({
|
|
16
16
|
__name: "CreateCollectionSheet",
|
|
17
17
|
emits: ["success"],
|
|
18
|
-
setup(
|
|
19
|
-
const { minor: w } =
|
|
18
|
+
setup(b, { expose: r, emit: u }) {
|
|
19
|
+
const { minor: w } = J, B = Q(), U = g(), k = g(!1), E = u, C = g(!1);
|
|
20
20
|
function m(i) {
|
|
21
|
-
|
|
21
|
+
C.value = i, i && (l.value = {
|
|
22
22
|
quantity: 1,
|
|
23
23
|
code: "",
|
|
24
24
|
codeConfig: {
|
|
@@ -30,7 +30,7 @@ const me = /* @__PURE__ */ y("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
const l =
|
|
33
|
+
const l = g({
|
|
34
34
|
quantity: 1,
|
|
35
35
|
code: "",
|
|
36
36
|
codeConfig: {
|
|
@@ -51,7 +51,7 @@ const me = /* @__PURE__ */ y("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
51
51
|
value: "single",
|
|
52
52
|
sublabel: "Enter your own custom codes"
|
|
53
53
|
}
|
|
54
|
-
],
|
|
54
|
+
], x = [
|
|
55
55
|
{
|
|
56
56
|
label: "Alphanumeric",
|
|
57
57
|
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
@@ -64,8 +64,8 @@ const me = /* @__PURE__ */ y("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
64
64
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
65
65
|
{ label: "Numbers", value: "0123456789" },
|
|
66
66
|
{ label: "Custom", value: "" }
|
|
67
|
-
],
|
|
68
|
-
async function
|
|
67
|
+
], y = g(x[0].value), f = g("bulk"), V = g(!1), n = H(() => B.params.id);
|
|
68
|
+
async function t(i) {
|
|
69
69
|
var o;
|
|
70
70
|
await ((o = U.value) == null ? void 0 : o.validateInputs()), k.value && await w(
|
|
71
71
|
async () => {
|
|
@@ -77,71 +77,77 @@ const me = /* @__PURE__ */ y("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return r({
|
|
81
81
|
showSheet: m
|
|
82
|
-
}),
|
|
82
|
+
}), O(
|
|
83
|
+
() => f.value,
|
|
84
|
+
(i, o) => {
|
|
85
|
+
o != i && (l.value.code = "", l.value.codeConfig.length = 8, l.value.codeConfig.charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", l.value.codeConfig.prefix = "", l.value.codeConfig.suffix = "", l.value.codeConfig.pattern = "########");
|
|
86
|
+
}
|
|
87
|
+
), O(
|
|
83
88
|
() => l.value.codeConfig.length,
|
|
84
89
|
(i, o) => {
|
|
85
|
-
i != o && (l.value.codeConfig.pattern = "#".repeat(Number(i)));
|
|
90
|
+
i != o && (l.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(i))));
|
|
86
91
|
}
|
|
87
92
|
), (i, o) => {
|
|
88
|
-
const d = c("FmRadio"), S = c("FmRadioGroup"),
|
|
89
|
-
return
|
|
93
|
+
const d = c("FmRadio"), S = c("FmRadioGroup"), M = c("FmSwitch"), F = c("FmStepperField"), D = c("FmSelect"), _ = c("FmTextField"), W = c("FmTextarea"), X = c("FmForm"), $ = c("FmButton"), Z = c("FmSideSheet");
|
|
94
|
+
return v(), L(Z, {
|
|
90
95
|
"max-width": 560,
|
|
91
96
|
"dismiss-away": !0,
|
|
92
97
|
header: "Create collection",
|
|
93
|
-
modelValue: e(
|
|
98
|
+
modelValue: e(C),
|
|
94
99
|
"onUpdate:modelValue": [
|
|
95
|
-
o[14] || (o[14] = (
|
|
96
|
-
o[15] || (o[15] = (
|
|
100
|
+
o[14] || (o[14] = (a) => j(C) ? C.value = a : null),
|
|
101
|
+
o[15] || (o[15] = (a) => C.value = a)
|
|
97
102
|
]
|
|
98
103
|
}, {
|
|
99
104
|
"side-sheet-footer": R(() => [
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
h("div", Ce, [
|
|
106
|
+
s($, {
|
|
102
107
|
label: "Save",
|
|
103
|
-
onClick: o[12] || (o[12] = (
|
|
108
|
+
onClick: o[12] || (o[12] = (a) => t(e(l))),
|
|
104
109
|
loading: e(le)().isLoading
|
|
105
110
|
}, null, 8, ["loading"]),
|
|
106
|
-
|
|
111
|
+
s($, {
|
|
107
112
|
label: "Cancel",
|
|
108
113
|
type: "button",
|
|
109
114
|
variant: "tertiary",
|
|
110
|
-
onClick: o[13] || (o[13] = (
|
|
115
|
+
onClick: o[13] || (o[13] = (a) => C.value = !1)
|
|
111
116
|
})
|
|
112
117
|
])
|
|
113
118
|
]),
|
|
114
119
|
default: R(() => [
|
|
115
|
-
|
|
120
|
+
s(ne, { json: e(l) }, null, 8, ["json"]),
|
|
121
|
+
s(X, {
|
|
116
122
|
ref_key: "form",
|
|
117
123
|
ref: U,
|
|
118
124
|
class: "space-y-40",
|
|
119
|
-
onValidationSuccess: o[10] || (o[10] = (
|
|
120
|
-
onValidationFailed: o[11] || (o[11] = (
|
|
125
|
+
onValidationSuccess: o[10] || (o[10] = (a) => k.value = !0),
|
|
126
|
+
onValidationFailed: o[11] || (o[11] = (a) => k.value = !1)
|
|
121
127
|
}, {
|
|
122
128
|
default: R(() => [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
modelValue: e(
|
|
127
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
129
|
+
h("div", null, [
|
|
130
|
+
pe,
|
|
131
|
+
s(S, {
|
|
132
|
+
modelValue: e(f),
|
|
133
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => j(f) ? f.value = a : null),
|
|
128
134
|
inline: !1
|
|
129
135
|
}, {
|
|
130
136
|
default: R(() => [
|
|
131
|
-
(
|
|
132
|
-
key:
|
|
133
|
-
value:
|
|
134
|
-
label:
|
|
135
|
-
sublabel:
|
|
137
|
+
(v(), P(N, null, ae(q, (a) => s(d, {
|
|
138
|
+
key: a.value,
|
|
139
|
+
value: a.value,
|
|
140
|
+
label: a.label,
|
|
141
|
+
sublabel: a.sublabel
|
|
136
142
|
}, null, 8, ["value", "label", "sublabel"])), 64))
|
|
137
143
|
]),
|
|
138
144
|
_: 1
|
|
139
145
|
}, 8, ["modelValue"])
|
|
140
146
|
]),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
e(
|
|
144
|
-
|
|
147
|
+
h("div", fe, [
|
|
148
|
+
ge,
|
|
149
|
+
e(f) === "bulk" ? (v(), P(N, { key: 0 }, [
|
|
150
|
+
s(M, {
|
|
145
151
|
"model-value": e(V),
|
|
146
152
|
"label-placement": "right",
|
|
147
153
|
value: "true",
|
|
@@ -149,67 +155,72 @@ const me = /* @__PURE__ */ y("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
149
155
|
required: !0,
|
|
150
156
|
"onUpdate:modelValue": o[1] || (o[1] = () => V.value = !e(V))
|
|
151
157
|
}, null, 8, ["model-value"]),
|
|
152
|
-
e(V) ? (
|
|
153
|
-
|
|
158
|
+
e(V) ? (v(), P(N, { key: 0 }, [
|
|
159
|
+
s(F, {
|
|
154
160
|
modelValue: e(l).codeConfig.length,
|
|
155
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
161
|
+
"onUpdate:modelValue": o[2] || (o[2] = (a) => e(l).codeConfig.length = a),
|
|
156
162
|
label: "Code length",
|
|
157
|
-
|
|
163
|
+
max: 16,
|
|
164
|
+
min: 1,
|
|
165
|
+
rules: [
|
|
166
|
+
(a) => Number(a) >= 1 || "Code length must at least 1",
|
|
167
|
+
(a) => Number(a) <= 16 || "Code length must less than 16"
|
|
168
|
+
],
|
|
158
169
|
required: !0
|
|
159
170
|
}, null, 8, ["modelValue", "rules"]),
|
|
160
|
-
|
|
171
|
+
s(D, {
|
|
161
172
|
label: "Charset",
|
|
162
|
-
"model-value": e(
|
|
163
|
-
items:
|
|
173
|
+
"model-value": e(y),
|
|
174
|
+
items: x,
|
|
164
175
|
"helper-text": e(l).codeConfig.charset.length > 62 ? `${e(l).codeConfig.charset.substring(0, 62)}...` : e(l).codeConfig.charset,
|
|
165
|
-
"onUpdate:modelValue": o[3] || (o[3] = (
|
|
166
|
-
|
|
176
|
+
"onUpdate:modelValue": o[3] || (o[3] = (a) => {
|
|
177
|
+
y.value = a, e(l).codeConfig.charset = a;
|
|
167
178
|
})
|
|
168
179
|
}, null, 8, ["model-value", "helper-text"]),
|
|
169
|
-
e(
|
|
180
|
+
e(y) === "" ? (v(), L(_, {
|
|
170
181
|
key: 0,
|
|
171
182
|
modelValue: e(l).codeConfig.charset,
|
|
172
|
-
"onUpdate:modelValue": o[4] || (o[4] = (
|
|
183
|
+
"onUpdate:modelValue": o[4] || (o[4] = (a) => e(l).codeConfig.charset = a),
|
|
173
184
|
label: "Custom Charset",
|
|
174
185
|
required: ""
|
|
175
186
|
}, null, 8, ["modelValue"])) : I("", !0),
|
|
176
|
-
|
|
177
|
-
|
|
187
|
+
h("div", be, [
|
|
188
|
+
s(_, {
|
|
178
189
|
modelValue: e(l).codeConfig.prefix,
|
|
179
|
-
"onUpdate:modelValue": o[5] || (o[5] = (
|
|
190
|
+
"onUpdate:modelValue": o[5] || (o[5] = (a) => e(l).codeConfig.prefix = a),
|
|
180
191
|
label: "Prefix (Optional)"
|
|
181
192
|
}, null, 8, ["modelValue"]),
|
|
182
|
-
|
|
193
|
+
s(_, {
|
|
183
194
|
modelValue: e(l).codeConfig.suffix,
|
|
184
|
-
"onUpdate:modelValue": o[6] || (o[6] = (
|
|
195
|
+
"onUpdate:modelValue": o[6] || (o[6] = (a) => e(l).codeConfig.suffix = a),
|
|
185
196
|
label: "Suffix (Optional)"
|
|
186
197
|
}, null, 8, ["modelValue"])
|
|
187
198
|
]),
|
|
188
|
-
|
|
199
|
+
s(_, {
|
|
189
200
|
modelValue: e(l).codeConfig.pattern,
|
|
190
|
-
"onUpdate:modelValue": o[7] || (o[7] = (
|
|
201
|
+
"onUpdate:modelValue": o[7] || (o[7] = (a) => e(l).codeConfig.pattern = a),
|
|
191
202
|
label: "Pattern",
|
|
192
203
|
required: !0
|
|
193
204
|
}, null, 8, ["modelValue"])
|
|
194
205
|
], 64)) : I("", !0),
|
|
195
|
-
|
|
206
|
+
s(_, {
|
|
196
207
|
modelValue: e(l).quantity,
|
|
197
|
-
"onUpdate:modelValue": o[8] || (o[8] = (
|
|
208
|
+
"onUpdate:modelValue": o[8] || (o[8] = (a) => e(l).quantity = a),
|
|
198
209
|
label: "Number of code",
|
|
199
210
|
rules: [
|
|
200
|
-
(
|
|
201
|
-
(
|
|
211
|
+
(a) => a >= 1 || "Quantity cannot be less than 1",
|
|
212
|
+
(a) => a <= 1e4 || "Quantity cannot more than 10,000"
|
|
202
213
|
],
|
|
203
214
|
required: !0,
|
|
204
215
|
"helper-text": `${e(l).quantity} claim will be created`
|
|
205
216
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
206
217
|
], 64)) : I("", !0),
|
|
207
|
-
e(
|
|
218
|
+
e(f) !== "bulk" ? (v(), L(W, {
|
|
208
219
|
key: 1,
|
|
209
220
|
modelValue: e(l).code,
|
|
210
|
-
"onUpdate:modelValue": o[9] || (o[9] = (
|
|
221
|
+
"onUpdate:modelValue": o[9] || (o[9] = (a) => e(l).code = a),
|
|
211
222
|
label: "Custom Code",
|
|
212
|
-
rules: [(
|
|
223
|
+
rules: [(a) => e(f) != "single" || !!a || "Custom code is required"],
|
|
213
224
|
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
214
225
|
}, null, 8, ["modelValue", "rules"])) : I("", !0)
|
|
215
226
|
])
|
|
@@ -222,16 +233,16 @@ const me = /* @__PURE__ */ y("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
222
233
|
};
|
|
223
234
|
}
|
|
224
235
|
});
|
|
225
|
-
class
|
|
236
|
+
class ve {
|
|
226
237
|
constructor() {
|
|
227
238
|
z(this, "data", []);
|
|
228
239
|
}
|
|
229
|
-
addRecord(
|
|
230
|
-
this.data.push(
|
|
240
|
+
addRecord(r) {
|
|
241
|
+
this.data.push(r);
|
|
231
242
|
}
|
|
232
243
|
buildExcel() {
|
|
233
|
-
const
|
|
234
|
-
return
|
|
244
|
+
const r = Y.book_new(), u = Y.json_to_sheet(this.data);
|
|
245
|
+
return Y.book_append_sheet(r, u, "Collection"), r;
|
|
235
246
|
}
|
|
236
247
|
}
|
|
237
248
|
const p = {
|
|
@@ -240,10 +251,10 @@ const p = {
|
|
|
240
251
|
rowsPerPage: 1e3,
|
|
241
252
|
page: 1,
|
|
242
253
|
rowsNumber: 0
|
|
243
|
-
},
|
|
254
|
+
}, xe = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ye = { class: "flex items-center justify-end py-4 xs:hidden" }, Ae = /* @__PURE__ */ G({
|
|
244
255
|
__name: "Collections",
|
|
245
|
-
setup(
|
|
246
|
-
const
|
|
256
|
+
setup(b) {
|
|
257
|
+
const r = Q(), u = g(), w = H(() => r.params.id), B = g(!1), { custom: U } = J, k = [
|
|
247
258
|
{
|
|
248
259
|
header: "ID/Code",
|
|
249
260
|
accessorFn: (n) => n.code || n._id
|
|
@@ -253,19 +264,19 @@ const p = {
|
|
|
253
264
|
accessorKey: "user",
|
|
254
265
|
enableSorting: !1,
|
|
255
266
|
cell(n) {
|
|
256
|
-
const
|
|
267
|
+
const t = n.row.original.pf_user;
|
|
257
268
|
return T(
|
|
258
269
|
"div",
|
|
259
270
|
{
|
|
260
271
|
class: "flex items-center gap-x-8"
|
|
261
272
|
},
|
|
262
273
|
[
|
|
263
|
-
T(
|
|
264
|
-
name:
|
|
265
|
-
src: (
|
|
274
|
+
T(re.FmAvatar, {
|
|
275
|
+
name: t != null && t.photoUrl || t == null ? void 0 : t.name,
|
|
276
|
+
src: (t == null ? void 0 : t.photoUrl) ?? void 0,
|
|
266
277
|
size: "sm"
|
|
267
278
|
}),
|
|
268
|
-
T("span",
|
|
279
|
+
T("span", t == null ? void 0 : t.name)
|
|
269
280
|
]
|
|
270
281
|
);
|
|
271
282
|
}
|
|
@@ -273,8 +284,8 @@ const p = {
|
|
|
273
284
|
{
|
|
274
285
|
header: "Phone",
|
|
275
286
|
accessorFn: (n) => {
|
|
276
|
-
var
|
|
277
|
-
return ((
|
|
287
|
+
var t;
|
|
288
|
+
return ((t = n.pf_user) == null ? void 0 : t.phoneNumber) || "-";
|
|
278
289
|
},
|
|
279
290
|
accessorKey: "pf_user.phoneNumber"
|
|
280
291
|
},
|
|
@@ -285,60 +296,60 @@ const p = {
|
|
|
285
296
|
{
|
|
286
297
|
header: "Created at",
|
|
287
298
|
accessorKey: "_id",
|
|
288
|
-
accessorFn: (n) => K(
|
|
299
|
+
accessorFn: (n) => K(me(n._id.toString())).format("DD MMM YYYY")
|
|
289
300
|
},
|
|
290
301
|
{
|
|
291
302
|
header: "Nearest expired at",
|
|
292
303
|
accessorKey: "expiryBalance",
|
|
293
304
|
accessorFn: (n) => {
|
|
294
|
-
var
|
|
295
|
-
return n.expiryBalance && n.expiryBalance.length ? K((
|
|
305
|
+
var t;
|
|
306
|
+
return n.expiryBalance && n.expiryBalance.length ? K((t = n.expiryBalance) == null ? void 0 : t[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
296
307
|
}
|
|
297
308
|
}
|
|
298
309
|
], E = {
|
|
299
|
-
"$connect-STORE_REWARD_COLLECTIONS":
|
|
310
|
+
"$connect-STORE_REWARD_COLLECTIONS": ce.readCollectionsByRewardId,
|
|
300
311
|
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": A.readCollectionsByCampaignId
|
|
301
|
-
},
|
|
302
|
-
const
|
|
303
|
-
return (i) =>
|
|
304
|
-
}, { tableMeta: m, rowData: l, onSort: q, debouncedFetchData:
|
|
312
|
+
}, C = (n) => {
|
|
313
|
+
const t = E[r.name];
|
|
314
|
+
return (i) => t(n, i);
|
|
315
|
+
}, { tableMeta: m, rowData: l, onSort: q, debouncedFetchData: x, onSearch: y } = de(C(w.value), {
|
|
305
316
|
key: "_id",
|
|
306
317
|
descending: !1
|
|
307
318
|
});
|
|
308
|
-
async function
|
|
319
|
+
async function f() {
|
|
309
320
|
var n;
|
|
310
|
-
await
|
|
321
|
+
await x(), (n = u.value) == null || n.showSheet(!1);
|
|
311
322
|
}
|
|
312
323
|
async function V() {
|
|
313
324
|
B.value || U(
|
|
314
325
|
async () => {
|
|
315
326
|
var o;
|
|
316
|
-
const n = new
|
|
327
|
+
const n = new ve(), t = (await A.readCollectionsByCampaignId(w.value, {
|
|
317
328
|
limit: 1,
|
|
318
329
|
skip: 0,
|
|
319
330
|
sortBy: p.sortBy,
|
|
320
331
|
descending: p.descending
|
|
321
332
|
})).meta.totalResources ?? 0, i = p.rowsPerPage;
|
|
322
|
-
for (let d = 0; d <
|
|
333
|
+
for (let d = 0; d < t; d += i) {
|
|
323
334
|
const S = {
|
|
324
335
|
...p,
|
|
325
336
|
limit: i,
|
|
326
337
|
skip: (p.page - 1) * p.rowsPerPage,
|
|
327
338
|
sortBy: p.sortBy,
|
|
328
339
|
descending: p.descending
|
|
329
|
-
},
|
|
340
|
+
}, M = await A.readCollectionsByCampaignId(
|
|
330
341
|
w.value,
|
|
331
342
|
S
|
|
332
343
|
);
|
|
333
|
-
for await (const F of
|
|
334
|
-
const
|
|
344
|
+
for await (const F of M.resources) {
|
|
345
|
+
const D = {
|
|
335
346
|
Id: (F == null ? void 0 : F.code) || ((o = F._id) == null ? void 0 : o.toString()) || ""
|
|
336
347
|
};
|
|
337
|
-
n.addRecord(
|
|
348
|
+
n.addRecord(D);
|
|
338
349
|
}
|
|
339
350
|
p.page++;
|
|
340
351
|
}
|
|
341
|
-
await
|
|
352
|
+
await ie(
|
|
342
353
|
n.buildExcel(),
|
|
343
354
|
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
344
355
|
{
|
|
@@ -353,12 +364,12 @@ const p = {
|
|
|
353
364
|
}
|
|
354
365
|
);
|
|
355
366
|
}
|
|
356
|
-
return
|
|
357
|
-
await
|
|
358
|
-
}), (n,
|
|
367
|
+
return te(async () => {
|
|
368
|
+
await x();
|
|
369
|
+
}), (n, t) => {
|
|
359
370
|
const i = c("FmPageHead"), o = c("FmSearch");
|
|
360
|
-
return
|
|
361
|
-
|
|
371
|
+
return v(), P(N, null, [
|
|
372
|
+
s(i, {
|
|
362
373
|
title: "Collections",
|
|
363
374
|
"back-button": !0,
|
|
364
375
|
actions: [
|
|
@@ -369,35 +380,35 @@ const p = {
|
|
|
369
380
|
isPrimary: !0
|
|
370
381
|
}
|
|
371
382
|
],
|
|
372
|
-
"onClick:back":
|
|
373
|
-
"onClick:action":
|
|
383
|
+
"onClick:back": t[0] || (t[0] = (d) => e(se).back()),
|
|
384
|
+
"onClick:action": t[1] || (t[1] = (d) => {
|
|
374
385
|
var S;
|
|
375
386
|
d === "create" && ((S = e(u)) == null || S.showSheet(!0)), d === "export" && V();
|
|
376
387
|
})
|
|
377
388
|
}),
|
|
378
|
-
|
|
379
|
-
|
|
389
|
+
h("div", xe, [
|
|
390
|
+
s(o, {
|
|
380
391
|
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
381
392
|
modelValue: e(m).searchValue,
|
|
382
393
|
"onUpdate:modelValue": [
|
|
383
|
-
|
|
384
|
-
e(
|
|
394
|
+
t[2] || (t[2] = (d) => e(m).searchValue = d),
|
|
395
|
+
e(y)
|
|
385
396
|
],
|
|
386
397
|
placeholder: "Search",
|
|
387
398
|
collapsible: ""
|
|
388
399
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
389
|
-
|
|
390
|
-
|
|
400
|
+
h("div", ye, [
|
|
401
|
+
s(o, {
|
|
391
402
|
modelValue: e(m).searchValue,
|
|
392
403
|
"onUpdate:modelValue": [
|
|
393
|
-
|
|
394
|
-
e(
|
|
404
|
+
t[3] || (t[3] = (d) => e(m).searchValue = d),
|
|
405
|
+
e(y)
|
|
395
406
|
],
|
|
396
407
|
placeholder: "Search",
|
|
397
408
|
collapsible: ""
|
|
398
409
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
399
410
|
]),
|
|
400
|
-
|
|
411
|
+
s(ue, {
|
|
401
412
|
loading: e(m).isLoading,
|
|
402
413
|
"row-data": e(l),
|
|
403
414
|
"column-defs": k,
|
|
@@ -407,12 +418,12 @@ const p = {
|
|
|
407
418
|
"page-size": e(m).pageSize,
|
|
408
419
|
"shrink-at": !1,
|
|
409
420
|
onSortChange: e(q),
|
|
410
|
-
onPageChange:
|
|
421
|
+
onPageChange: t[4] || (t[4] = (d) => e(x)({ pageSize: d.pageSize, pageIndex: d.pageIndex }))
|
|
411
422
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
412
|
-
|
|
423
|
+
s(he, {
|
|
413
424
|
ref_key: "sheetRef",
|
|
414
425
|
ref: u,
|
|
415
|
-
onSuccess:
|
|
426
|
+
onSuccess: f
|
|
416
427
|
}, null, 512)
|
|
417
428
|
])
|
|
418
429
|
], 64);
|
|
@@ -420,5 +431,5 @@ const p = {
|
|
|
420
431
|
}
|
|
421
432
|
});
|
|
422
433
|
export {
|
|
423
|
-
|
|
434
|
+
Ae as default
|
|
424
435
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
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 { u as O, p as Q } from "./loading-
|
|
5
|
-
import { a as W } from "./app-
|
|
6
|
-
import { u as X } from "./campaign-
|
|
7
|
-
import { g as S, b as V } from "./dto-
|
|
4
|
+
import { u as O, p as Q } from "./loading-CI_KxaTU.js";
|
|
5
|
+
import { a as W } from "./app-a2-WAW77.js";
|
|
6
|
+
import { u as X } from "./campaign-D_wE2B1-.js";
|
|
7
|
+
import { g as S, b as V } from "./dto-BU0j3TXO.js";
|
|
8
8
|
import { _ as Y } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
9
|
-
import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as ee } from "./template-
|
|
11
|
-
import { c as _ } from "./index-
|
|
9
|
+
import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BVQaNCIx.js";
|
|
10
|
+
import { u as ee } from "./template-Evzdo8_w.js";
|
|
11
|
+
import { c as _ } from "./index-ClcBl-qS.js";
|
|
12
12
|
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 = [
|
|
13
13
|
ue
|
|
14
14
|
], fe = /* @__PURE__ */ s("img", {
|