@feedmepos/mf-connect 0.0.8 → 0.0.9
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-BxRuK2P2.js → Analytic-CwaN0mge.js} +68 -69
- package/dist/{Broadcast-BqGojAWW.js → Broadcast-Cjx5xzUC.js} +27 -28
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D4mO5aik.js} +34 -34
- package/dist/Card-DbY6YaXk.js +827 -0
- package/dist/{Collections-DvdDRozp.js → Collections-DRN2gzwh.js} +158 -168
- package/dist/{Credit-BeHm7_2S.js → Credit-DOcrzykJ.js} +11 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js} +359 -333
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js → EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js} +5 -5
- package/dist/{Experience-CtDY9u4Y.js → Experience-aQj-3H2Y.js} +11 -12
- package/dist/{Game-DjaYuqcb.js → Game-Cnje-m_M.js} +22 -23
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js → ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js} +8 -8
- package/dist/{MainLayout-B-iAZM2k.js → MainLayout-Cxl9yLPs.js} +1 -1
- package/dist/{Marketing-BJJltAh-.js → Marketing-BYUcbcMU.js} +19 -20
- package/dist/{Member-eJ9Pdi5w.js → Member-D7K9fm_Q.js} +2 -2
- package/dist/MemberList-DbXkxUzF.js +1717 -0
- package/dist/{MemberTransactions-DRET8mSQ.js → MemberTransactions-DED1SYwX.js} +4 -4
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CLqIp5wR.js +203 -0
- package/dist/{Point-DPTOgJbC.js → Point-CQm8whVQ.js} +11 -12
- package/dist/{Promotion-wzkRuNqO.js → Promotion-DzVXy_C9.js} +42 -44
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js → RuleGroup.vue_vue_type_script_setup_true_lang-CeS6KlhP.js} +12 -12
- package/dist/Segment-D3o0D3Uv.js +407 -0
- package/dist/{Setting-CXuZu0-m.js → Setting-pCzenLoL.js} +17 -18
- package/dist/{Store-4Um9keEp.js → Store-DEwEIFYD.js} +18 -19
- package/dist/{StoreRewards-B-UFeyQM.js → StoreRewards-D7vnZN4f.js} +86 -87
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-ALzQU3th.js +793 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js} +1 -1
- package/dist/{Tier-C6KVsxGO.js → Tier-BJbX5CPB.js} +401 -377
- package/dist/{Title-DuN1ahIM.js → Title-C9xV6rBg.js} +274 -248
- package/dist/Transaction-C8OHlhzR.js +36 -0
- package/dist/Voucher-eZwm7N1D.js +481 -0
- package/dist/{app-CxBTTB31.js → app-DgbDbhL-.js} +34 -34
- package/dist/app.js +1 -1
- package/dist/{campaign-B0aXkadj.js → campaign-BkvrUTEJ.js} +2 -2
- package/dist/{dto-BtdVC-Ab.js → dto-YYVhW73A.js} +52 -53
- package/dist/{effect-BUN6rkQM.js → effect-f7DAPYC8.js} +1 -1
- package/dist/export-BXbCXTfd.js +97 -0
- package/dist/{helper-Cpq3x8K5.js → helper-BhvQ9m6d.js} +1 -1
- package/dist/{index-D2Juhkdw.js → index-BhacKx5B.js} +85 -83
- package/dist/{index-DDSLx7vu.js → index-BsEqtUmY.js} +2 -2
- package/dist/{index-0GYrZr4L.js → index-CdtrQ9tR.js} +5 -5
- package/dist/{index-8clzk3uX.js → index-Cfo2A0Se.js} +1 -1
- package/dist/index-Cz5RZlYh.js +73 -0
- package/dist/{index-BTntbYTS.js → index-DQC_1tRF.js} +1 -1
- package/dist/{index-DysVCkrx.js → index-Dd3hrFcQ.js} +3 -3
- package/dist/{index-CK9yJMj7.js → index-FWp9M1yS.js} +5 -5
- package/dist/{index-C6NgUSl2.js → index-VmFlM704.js} +1 -1
- package/dist/{index-BvnZdJBY.js → index-oQLJE4Uw.js} +2 -2
- package/dist/libs/packages/core/src/collectible/collectible.dto.d.ts +6 -0
- package/dist/{plugins-B_d-WFtN.js → loading-DQaawbHE.js} +8204 -8108
- package/dist/{lodash-DsT1nK-T.js → lodash-DzdmTD20.js} +1 -1
- package/dist/{membership-DtD45RXh.js → membership-Dq2-b-S_.js} +3 -3
- package/dist/{money-CFI1TMCS.js → money-vzwOUBrp.js} +1 -1
- package/dist/{number-BBtf4fYz.js → number-CBzs6rfW.js} +1 -1
- package/dist/packages/connect/src/components/campaign/CampaignSummary.vue.d.ts +13 -0
- package/dist/packages/connect/src/composables/export.d.ts +11 -0
- package/dist/packages/connect/src/export/base.export.d.ts +7 -0
- package/dist/packages/connect/src/export/card.export.d.ts +5 -6
- package/dist/packages/connect/src/export/collection-transaction.export.d.ts +14 -0
- package/dist/packages/connect/src/export/index.d.ts +1 -0
- package/dist/packages/connect/src/export/store-transaction.export.d.ts +14 -0
- package/dist/packages/connect/src/helpers/user.d.ts +6 -0
- package/dist/{rule-CB9Qlcx1.js → rule-BR5rrmUV.js} +2 -2
- package/dist/{rule-builder-BIKcA4Bg.js → rule-builder-7GBNrPXt.js} +1 -1
- package/dist/{template-qlb46PGl.js → template-CETJ6lkf.js} +5 -5
- package/dist/{usePagination-CX66ab1Y.js → usePagination-DdZeE4Tt.js} +57 -56
- package/dist/user-Bm4KttFq.js +37 -0
- package/dist/{xlsx-DMaFso0k.js → xlsx-CDAKxZE_.js} +1 -1
- package/package.json +1 -1
- package/dist/Card-Dlj5jQp4.js +0 -792
- package/dist/MemberList-CrhMqUfJ.js +0 -1664
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js +0 -166
- package/dist/Segment-DnsPrP7Q.js +0 -371
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js +0 -660
- package/dist/Transaction-DdfX7Xfe.js +0 -34
- package/dist/Voucher-DarXrxZr.js +0 -454
- package/dist/index-Dg-PMgXV.js +0 -64
- package/dist/loading-Cxp7sI5p.js +0 -100
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
var Z = Object.defineProperty;
|
|
2
|
-
var ee = (b,
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { h as
|
|
6
|
-
import { u as le,
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { u as
|
|
13
|
-
import {
|
|
14
|
-
import { m as ue } from "./index-C6NgUSl2.js";
|
|
2
|
+
var ee = (b, r, d) => r in b ? Z(b, r, { enumerable: !0, configurable: !0, writable: !0, value: d }) : b[r] = d;
|
|
3
|
+
var $ = (b, r, d) => ee(b, typeof r != "symbol" ? r + "" : r, d);
|
|
4
|
+
import { defineComponent as K, ref as g, computed as G, watch as O, resolveComponent as c, openBlock as v, createBlock as L, unref as e, isRef as z, withCtx as U, createElementVNode as h, createVNode as s, createElementBlock as P, Fragment as N, renderList as oe, createCommentVNode as I, onMounted as te } from "vue";
|
|
5
|
+
import { h as j } from "./moment-BWErdI6_.js";
|
|
6
|
+
import { u as ae, J as le, R as ne } from "./app-DgbDbhL-.js";
|
|
7
|
+
import { u as H } from "./loading-DQaawbHE.js";
|
|
8
|
+
import { useRoute as J } from "vue-router";
|
|
9
|
+
import { c as E } from "./index-DQC_1tRF.js";
|
|
10
|
+
import { u as T, w as se } from "./xlsx-CDAKxZE_.js";
|
|
11
|
+
import { g as re } from "./user-Bm4KttFq.js";
|
|
12
|
+
import { u as ie, _ as ue } from "./usePagination-DdZeE4Tt.js";
|
|
13
|
+
import { m as de } from "./index-VmFlM704.js";
|
|
15
14
|
import { o as ce } from "./objectId-dwaoBfJX.js";
|
|
16
|
-
const me = /* @__PURE__ */
|
|
15
|
+
const me = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), pe = { class: "space-y-16" }, fe = /* @__PURE__ */ h("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__ */ K({
|
|
17
16
|
__name: "CreateCollectionSheet",
|
|
18
17
|
emits: ["success"],
|
|
19
|
-
setup(b, { expose:
|
|
20
|
-
const { minor: F } = H,
|
|
21
|
-
function
|
|
22
|
-
C.value = i, i && (
|
|
18
|
+
setup(b, { expose: r, emit: d }) {
|
|
19
|
+
const { minor: F } = H, B = J(), R = g(), k = g(!1), q = d, C = g(!1);
|
|
20
|
+
function m(i) {
|
|
21
|
+
C.value = i, i && (a.value = {
|
|
23
22
|
quantity: 1,
|
|
24
23
|
code: "",
|
|
25
24
|
codeConfig: {
|
|
@@ -31,7 +30,7 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
32
|
}
|
|
34
|
-
const
|
|
33
|
+
const a = g({
|
|
35
34
|
quantity: 1,
|
|
36
35
|
code: "",
|
|
37
36
|
codeConfig: {
|
|
@@ -41,7 +40,7 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
41
40
|
suffix: "",
|
|
42
41
|
pattern: "########"
|
|
43
42
|
}
|
|
44
|
-
}),
|
|
43
|
+
}), A = [
|
|
45
44
|
{
|
|
46
45
|
label: "Bulk codes",
|
|
47
46
|
value: "bulk",
|
|
@@ -52,7 +51,7 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
52
51
|
value: "single",
|
|
53
52
|
sublabel: "Enter your own custom codes"
|
|
54
53
|
}
|
|
55
|
-
],
|
|
54
|
+
], y = [
|
|
56
55
|
{
|
|
57
56
|
label: "Alphanumeric",
|
|
58
57
|
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
@@ -65,12 +64,12 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
65
64
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
66
65
|
{ label: "Numbers", value: "0123456789" },
|
|
67
66
|
{ label: "Custom", value: "" }
|
|
68
|
-
], x = g(
|
|
69
|
-
async function
|
|
67
|
+
], x = g(y[0].value), f = g("bulk"), V = g(!1), n = G(() => B.params.id);
|
|
68
|
+
async function l(i) {
|
|
70
69
|
var o;
|
|
71
|
-
await ((o = R.value) == null ? void 0 : o.validateInputs()),
|
|
70
|
+
await ((o = R.value) == null ? void 0 : o.validateInputs()), k.value && await F(
|
|
72
71
|
async () => {
|
|
73
|
-
await
|
|
72
|
+
await E.createCollectionByCampaignId(n.value, i), await q("success");
|
|
74
73
|
},
|
|
75
74
|
{
|
|
76
75
|
message: "Creating claim(s)",
|
|
@@ -78,33 +77,38 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
78
77
|
}
|
|
79
78
|
);
|
|
80
79
|
}
|
|
81
|
-
return
|
|
82
|
-
showSheet:
|
|
83
|
-
}),
|
|
84
|
-
() =>
|
|
80
|
+
return r({
|
|
81
|
+
showSheet: m
|
|
82
|
+
}), O(
|
|
83
|
+
() => f.value,
|
|
85
84
|
(i, o) => {
|
|
86
|
-
|
|
85
|
+
o != i && (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 = "########");
|
|
86
|
+
}
|
|
87
|
+
), O(
|
|
88
|
+
() => a.value.codeConfig.length,
|
|
89
|
+
(i, o) => {
|
|
90
|
+
i != o && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(i))));
|
|
87
91
|
}
|
|
88
92
|
), (i, o) => {
|
|
89
|
-
const
|
|
90
|
-
return
|
|
93
|
+
const u = c("FmRadio"), S = c("FmRadioGroup"), M = c("FmSwitch"), w = c("FmStepperField"), D = c("FmSelect"), _ = c("FmTextField"), Q = c("FmTextarea"), W = c("FmForm"), Y = c("FmButton"), X = c("FmSideSheet");
|
|
94
|
+
return v(), L(X, {
|
|
91
95
|
"max-width": 560,
|
|
92
96
|
"dismiss-away": !0,
|
|
93
97
|
header: "Create collection",
|
|
94
98
|
modelValue: e(C),
|
|
95
99
|
"onUpdate:modelValue": [
|
|
96
|
-
o[14] || (o[14] = (t) =>
|
|
100
|
+
o[14] || (o[14] = (t) => z(C) ? C.value = t : null),
|
|
97
101
|
o[15] || (o[15] = (t) => C.value = t)
|
|
98
102
|
]
|
|
99
103
|
}, {
|
|
100
|
-
"side-sheet-footer":
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
"side-sheet-footer": U(() => [
|
|
105
|
+
h("div", be, [
|
|
106
|
+
s(Y, {
|
|
103
107
|
label: "Save",
|
|
104
|
-
onClick: o[12] || (o[12] = (t) =>
|
|
105
|
-
loading: e(
|
|
108
|
+
onClick: o[12] || (o[12] = (t) => l(e(a))),
|
|
109
|
+
loading: e(ae)().isLoading
|
|
106
110
|
}, null, 8, ["loading"]),
|
|
107
|
-
|
|
111
|
+
s(Y, {
|
|
108
112
|
label: "Cancel",
|
|
109
113
|
type: "button",
|
|
110
114
|
variant: "tertiary",
|
|
@@ -112,24 +116,25 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
112
116
|
})
|
|
113
117
|
])
|
|
114
118
|
]),
|
|
115
|
-
default:
|
|
116
|
-
|
|
119
|
+
default: U(() => [
|
|
120
|
+
s(le, { json: e(a) }, null, 8, ["json"]),
|
|
121
|
+
s(W, {
|
|
117
122
|
ref_key: "form",
|
|
118
123
|
ref: R,
|
|
119
124
|
class: "space-y-40",
|
|
120
|
-
onValidationSuccess: o[10] || (o[10] = (t) =>
|
|
121
|
-
onValidationFailed: o[11] || (o[11] = (t) =>
|
|
125
|
+
onValidationSuccess: o[10] || (o[10] = (t) => k.value = !0),
|
|
126
|
+
onValidationFailed: o[11] || (o[11] = (t) => k.value = !1)
|
|
122
127
|
}, {
|
|
123
|
-
default:
|
|
124
|
-
|
|
128
|
+
default: U(() => [
|
|
129
|
+
h("div", null, [
|
|
125
130
|
me,
|
|
126
|
-
|
|
127
|
-
modelValue: e(
|
|
128
|
-
"onUpdate:modelValue": o[0] || (o[0] = (t) =>
|
|
131
|
+
s(S, {
|
|
132
|
+
modelValue: e(f),
|
|
133
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => z(f) ? f.value = t : null),
|
|
129
134
|
inline: !1
|
|
130
135
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
(
|
|
136
|
+
default: U(() => [
|
|
137
|
+
(v(), P(N, null, oe(A, (t) => s(u, {
|
|
133
138
|
key: t.value,
|
|
134
139
|
value: t.value,
|
|
135
140
|
label: t.label,
|
|
@@ -139,10 +144,10 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
139
144
|
_: 1
|
|
140
145
|
}, 8, ["modelValue"])
|
|
141
146
|
]),
|
|
142
|
-
|
|
147
|
+
h("div", pe, [
|
|
143
148
|
fe,
|
|
144
|
-
e(
|
|
145
|
-
|
|
149
|
+
e(f) === "bulk" ? (v(), P(N, { key: 0 }, [
|
|
150
|
+
s(M, {
|
|
146
151
|
"model-value": e(V),
|
|
147
152
|
"label-placement": "right",
|
|
148
153
|
value: "true",
|
|
@@ -150,69 +155,74 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
150
155
|
required: !0,
|
|
151
156
|
"onUpdate:modelValue": o[1] || (o[1] = () => V.value = !e(V))
|
|
152
157
|
}, null, 8, ["model-value"]),
|
|
153
|
-
e(V) ? (
|
|
154
|
-
|
|
155
|
-
modelValue: e(
|
|
156
|
-
"onUpdate:modelValue": o[2] || (o[2] = (t) => e(
|
|
158
|
+
e(V) ? (v(), P(N, { key: 0 }, [
|
|
159
|
+
s(w, {
|
|
160
|
+
modelValue: e(a).codeConfig.length,
|
|
161
|
+
"onUpdate:modelValue": o[2] || (o[2] = (t) => e(a).codeConfig.length = t),
|
|
157
162
|
label: "Code length",
|
|
158
|
-
|
|
163
|
+
max: 16,
|
|
164
|
+
min: 1,
|
|
165
|
+
rules: [
|
|
166
|
+
(t) => Number(t) >= 1 || "Code length must at least 1",
|
|
167
|
+
(t) => Number(t) <= 16 || "Code length must less than 16"
|
|
168
|
+
],
|
|
159
169
|
required: !0
|
|
160
170
|
}, null, 8, ["modelValue", "rules"]),
|
|
161
|
-
|
|
171
|
+
s(D, {
|
|
162
172
|
label: "Charset",
|
|
163
173
|
"model-value": e(x),
|
|
164
|
-
items:
|
|
165
|
-
"helper-text": e(
|
|
174
|
+
items: y,
|
|
175
|
+
"helper-text": e(a).codeConfig.charset.length > 62 ? `${e(a).codeConfig.charset.substring(0, 62)}...` : e(a).codeConfig.charset,
|
|
166
176
|
"onUpdate:modelValue": o[3] || (o[3] = (t) => {
|
|
167
|
-
x.value = t, e(
|
|
177
|
+
x.value = t, e(a).codeConfig.charset = t;
|
|
168
178
|
})
|
|
169
179
|
}, null, 8, ["model-value", "helper-text"]),
|
|
170
|
-
e(x) === "" ? (
|
|
180
|
+
e(x) === "" ? (v(), L(_, {
|
|
171
181
|
key: 0,
|
|
172
|
-
modelValue: e(
|
|
173
|
-
"onUpdate:modelValue": o[4] || (o[4] = (t) => e(
|
|
182
|
+
modelValue: e(a).codeConfig.charset,
|
|
183
|
+
"onUpdate:modelValue": o[4] || (o[4] = (t) => e(a).codeConfig.charset = t),
|
|
174
184
|
label: "Custom Charset",
|
|
175
185
|
required: ""
|
|
176
|
-
}, null, 8, ["modelValue"])) :
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
modelValue: e(
|
|
180
|
-
"onUpdate:modelValue": o[5] || (o[5] = (t) => e(
|
|
186
|
+
}, null, 8, ["modelValue"])) : I("", !0),
|
|
187
|
+
h("div", ge, [
|
|
188
|
+
s(_, {
|
|
189
|
+
modelValue: e(a).codeConfig.prefix,
|
|
190
|
+
"onUpdate:modelValue": o[5] || (o[5] = (t) => e(a).codeConfig.prefix = t),
|
|
181
191
|
label: "Prefix (Optional)"
|
|
182
192
|
}, null, 8, ["modelValue"]),
|
|
183
|
-
|
|
184
|
-
modelValue: e(
|
|
185
|
-
"onUpdate:modelValue": o[6] || (o[6] = (t) => e(
|
|
193
|
+
s(_, {
|
|
194
|
+
modelValue: e(a).codeConfig.suffix,
|
|
195
|
+
"onUpdate:modelValue": o[6] || (o[6] = (t) => e(a).codeConfig.suffix = t),
|
|
186
196
|
label: "Suffix (Optional)"
|
|
187
197
|
}, null, 8, ["modelValue"])
|
|
188
198
|
]),
|
|
189
|
-
|
|
190
|
-
modelValue: e(
|
|
191
|
-
"onUpdate:modelValue": o[7] || (o[7] = (t) => e(
|
|
199
|
+
s(_, {
|
|
200
|
+
modelValue: e(a).codeConfig.pattern,
|
|
201
|
+
"onUpdate:modelValue": o[7] || (o[7] = (t) => e(a).codeConfig.pattern = t),
|
|
192
202
|
label: "Pattern",
|
|
193
203
|
required: !0
|
|
194
204
|
}, null, 8, ["modelValue"])
|
|
195
|
-
], 64)) :
|
|
196
|
-
|
|
197
|
-
modelValue: e(
|
|
198
|
-
"onUpdate:modelValue": o[8] || (o[8] = (t) => e(
|
|
205
|
+
], 64)) : I("", !0),
|
|
206
|
+
s(_, {
|
|
207
|
+
modelValue: e(a).quantity,
|
|
208
|
+
"onUpdate:modelValue": o[8] || (o[8] = (t) => e(a).quantity = t),
|
|
199
209
|
label: "Number of code",
|
|
200
210
|
rules: [
|
|
201
211
|
(t) => t >= 1 || "Quantity cannot be less than 1",
|
|
202
212
|
(t) => t <= 1e4 || "Quantity cannot more than 10,000"
|
|
203
213
|
],
|
|
204
214
|
required: !0,
|
|
205
|
-
"helper-text": `${e(
|
|
215
|
+
"helper-text": `${e(a).quantity} claim will be created`
|
|
206
216
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
207
|
-
], 64)) :
|
|
208
|
-
e(
|
|
217
|
+
], 64)) : I("", !0),
|
|
218
|
+
e(f) !== "bulk" ? (v(), L(Q, {
|
|
209
219
|
key: 1,
|
|
210
|
-
modelValue: e(
|
|
211
|
-
"onUpdate:modelValue": o[9] || (o[9] = (t) => e(
|
|
220
|
+
modelValue: e(a).code,
|
|
221
|
+
"onUpdate:modelValue": o[9] || (o[9] = (t) => e(a).code = t),
|
|
212
222
|
label: "Custom Code",
|
|
213
|
-
rules: [(t) => e(
|
|
223
|
+
rules: [(t) => e(f) != "single" || !!t || "Custom code is required"],
|
|
214
224
|
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
215
|
-
}, null, 8, ["modelValue", "rules"])) :
|
|
225
|
+
}, null, 8, ["modelValue", "rules"])) : I("", !0)
|
|
216
226
|
])
|
|
217
227
|
]),
|
|
218
228
|
_: 1
|
|
@@ -223,16 +233,16 @@ const me = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-lg-600" }, "Code t
|
|
|
223
233
|
};
|
|
224
234
|
}
|
|
225
235
|
});
|
|
226
|
-
class
|
|
236
|
+
class he {
|
|
227
237
|
constructor() {
|
|
228
|
-
|
|
238
|
+
$(this, "data", []);
|
|
229
239
|
}
|
|
230
|
-
addRecord(
|
|
231
|
-
this.data.push(
|
|
240
|
+
addRecord(r) {
|
|
241
|
+
this.data.push(r);
|
|
232
242
|
}
|
|
233
243
|
buildExcel() {
|
|
234
|
-
const
|
|
235
|
-
return T.book_append_sheet(
|
|
244
|
+
const r = T.book_new(), d = T.json_to_sheet(this.data);
|
|
245
|
+
return T.book_append_sheet(r, d, "Collection"), r;
|
|
236
246
|
}
|
|
237
247
|
}
|
|
238
248
|
const p = {
|
|
@@ -241,16 +251,10 @@ const p = {
|
|
|
241
251
|
rowsPerPage: 1e3,
|
|
242
252
|
page: 1,
|
|
243
253
|
rowsNumber: 0
|
|
244
|
-
},
|
|
245
|
-
key: 0,
|
|
246
|
-
class: "w-full flex flex-col gap-16 items-center pt-16"
|
|
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({
|
|
254
|
+
}, ve = { class: "px-24 flex flex-col gap-y-32 pb-24" }, ye = { class: "flex items-center justify-end py-4 xs:hidden" }, Ne = /* @__PURE__ */ K({
|
|
251
255
|
__name: "Collections",
|
|
252
256
|
setup(b) {
|
|
253
|
-
const
|
|
257
|
+
const r = J(), d = g(), F = G(() => r.params.id), B = g(!1), { custom: R } = H, k = [
|
|
254
258
|
{
|
|
255
259
|
header: "ID/Code",
|
|
256
260
|
accessorFn: (n) => n.code || n._id
|
|
@@ -260,28 +264,15 @@ const p = {
|
|
|
260
264
|
accessorKey: "user",
|
|
261
265
|
enableSorting: !1,
|
|
262
266
|
cell(n) {
|
|
263
|
-
const
|
|
264
|
-
return
|
|
265
|
-
"div",
|
|
266
|
-
{
|
|
267
|
-
class: "flex items-center gap-x-8"
|
|
268
|
-
},
|
|
269
|
-
[
|
|
270
|
-
M(se.FmAvatar, {
|
|
271
|
-
name: a != null && a.photoUrl || a == null ? void 0 : a.name,
|
|
272
|
-
src: (a == null ? void 0 : a.photoUrl) ?? void 0,
|
|
273
|
-
size: "sm"
|
|
274
|
-
}),
|
|
275
|
-
M("span", a == null ? void 0 : a.name)
|
|
276
|
-
]
|
|
277
|
-
);
|
|
267
|
+
const l = n.row.original.pf_user;
|
|
268
|
+
return re(l);
|
|
278
269
|
}
|
|
279
270
|
},
|
|
280
271
|
{
|
|
281
272
|
header: "Phone",
|
|
282
273
|
accessorFn: (n) => {
|
|
283
|
-
var
|
|
284
|
-
return ((
|
|
274
|
+
var l;
|
|
275
|
+
return ((l = n.pf_user) == null ? void 0 : l.phoneNumber) || "-";
|
|
285
276
|
},
|
|
286
277
|
accessorKey: "pf_user.phoneNumber"
|
|
287
278
|
},
|
|
@@ -292,52 +283,52 @@ const p = {
|
|
|
292
283
|
{
|
|
293
284
|
header: "Created at",
|
|
294
285
|
accessorKey: "_id",
|
|
295
|
-
accessorFn: (n) =>
|
|
286
|
+
accessorFn: (n) => j(ce(n._id.toString())).format("DD MMM YYYY")
|
|
296
287
|
},
|
|
297
288
|
{
|
|
298
289
|
header: "Nearest expired at",
|
|
299
290
|
accessorKey: "expiryBalance",
|
|
300
291
|
accessorFn: (n) => {
|
|
301
|
-
var
|
|
302
|
-
return n.expiryBalance && n.expiryBalance.length ?
|
|
292
|
+
var l;
|
|
293
|
+
return n.expiryBalance && n.expiryBalance.length ? j((l = n.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
303
294
|
}
|
|
304
295
|
}
|
|
305
|
-
],
|
|
306
|
-
"$connect-STORE_REWARD_COLLECTIONS":
|
|
307
|
-
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS":
|
|
296
|
+
], q = {
|
|
297
|
+
"$connect-STORE_REWARD_COLLECTIONS": de.readCollectionsByRewardId,
|
|
298
|
+
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": E.readCollectionsByCampaignId
|
|
308
299
|
}, C = (n) => {
|
|
309
|
-
const
|
|
310
|
-
return (i) =>
|
|
311
|
-
}, { tableMeta:
|
|
300
|
+
const l = q[r.name];
|
|
301
|
+
return (i) => l(n, i);
|
|
302
|
+
}, { tableMeta: m, rowData: a, onSort: A, debouncedFetchData: y, onSearch: x } = ie(C(F.value), {
|
|
312
303
|
key: "_id",
|
|
313
304
|
descending: !1
|
|
314
305
|
});
|
|
315
|
-
async function
|
|
306
|
+
async function f() {
|
|
316
307
|
var n;
|
|
317
|
-
await
|
|
308
|
+
await y(), (n = d.value) == null || n.showSheet(!1);
|
|
318
309
|
}
|
|
319
310
|
async function V() {
|
|
320
|
-
|
|
311
|
+
B.value || R(
|
|
321
312
|
async () => {
|
|
322
313
|
var o;
|
|
323
|
-
const n = new
|
|
314
|
+
const n = new he(), l = (await E.readCollectionsByCampaignId(F.value, {
|
|
324
315
|
limit: 1,
|
|
325
316
|
skip: 0,
|
|
326
317
|
sortBy: p.sortBy,
|
|
327
318
|
descending: p.descending
|
|
328
319
|
})).meta.totalResources ?? 0, i = p.rowsPerPage;
|
|
329
|
-
for (let
|
|
320
|
+
for (let u = 0; u < l; u += i) {
|
|
330
321
|
const S = {
|
|
331
322
|
...p,
|
|
332
323
|
limit: i,
|
|
333
324
|
skip: (p.page - 1) * p.rowsPerPage,
|
|
334
325
|
sortBy: p.sortBy,
|
|
335
326
|
descending: p.descending
|
|
336
|
-
},
|
|
327
|
+
}, M = await E.readCollectionsByCampaignId(
|
|
337
328
|
F.value,
|
|
338
329
|
S
|
|
339
330
|
);
|
|
340
|
-
for await (const w of
|
|
331
|
+
for await (const w of M.resources) {
|
|
341
332
|
const D = {
|
|
342
333
|
Id: (w == null ? void 0 : w.code) || ((o = w._id) == null ? void 0 : o.toString()) || ""
|
|
343
334
|
};
|
|
@@ -345,7 +336,7 @@ const p = {
|
|
|
345
336
|
}
|
|
346
337
|
p.page++;
|
|
347
338
|
}
|
|
348
|
-
await
|
|
339
|
+
await se(
|
|
349
340
|
n.buildExcel(),
|
|
350
341
|
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
351
342
|
{
|
|
@@ -356,16 +347,16 @@ const p = {
|
|
|
356
347
|
), p.page = 1;
|
|
357
348
|
},
|
|
358
349
|
{
|
|
359
|
-
isLoading:
|
|
350
|
+
isLoading: B
|
|
360
351
|
}
|
|
361
352
|
);
|
|
362
353
|
}
|
|
363
|
-
return
|
|
364
|
-
await
|
|
365
|
-
}), (n,
|
|
366
|
-
const i =
|
|
367
|
-
return
|
|
368
|
-
|
|
354
|
+
return te(async () => {
|
|
355
|
+
await y();
|
|
356
|
+
}), (n, l) => {
|
|
357
|
+
const i = c("FmPageHead"), o = c("FmSearch");
|
|
358
|
+
return v(), P(N, null, [
|
|
359
|
+
s(i, {
|
|
369
360
|
title: "Collections",
|
|
370
361
|
"back-button": !0,
|
|
371
362
|
actions: [
|
|
@@ -376,51 +367,50 @@ const p = {
|
|
|
376
367
|
isPrimary: !0
|
|
377
368
|
}
|
|
378
369
|
],
|
|
379
|
-
"onClick:back":
|
|
380
|
-
"onClick:action":
|
|
370
|
+
"onClick:back": l[0] || (l[0] = (u) => e(ne).back()),
|
|
371
|
+
"onClick:action": l[1] || (l[1] = (u) => {
|
|
381
372
|
var S;
|
|
382
|
-
|
|
373
|
+
u === "create" && ((S = e(d)) == null || S.showSheet(!0)), u === "export" && V();
|
|
383
374
|
})
|
|
384
375
|
}),
|
|
385
|
-
|
|
386
|
-
|
|
376
|
+
h("div", ve, [
|
|
377
|
+
s(o, {
|
|
387
378
|
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
388
|
-
modelValue: e(
|
|
379
|
+
modelValue: e(m).searchValue,
|
|
389
380
|
"onUpdate:modelValue": [
|
|
390
|
-
|
|
381
|
+
l[2] || (l[2] = (u) => e(m).searchValue = u),
|
|
391
382
|
e(x)
|
|
392
383
|
],
|
|
393
384
|
placeholder: "Search",
|
|
394
385
|
collapsible: ""
|
|
395
386
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
modelValue: e(
|
|
387
|
+
h("div", ye, [
|
|
388
|
+
s(o, {
|
|
389
|
+
modelValue: e(m).searchValue,
|
|
399
390
|
"onUpdate:modelValue": [
|
|
400
|
-
|
|
391
|
+
l[3] || (l[3] = (u) => e(m).searchValue = u),
|
|
401
392
|
e(x)
|
|
402
393
|
],
|
|
403
394
|
placeholder: "Search",
|
|
404
395
|
collapsible: ""
|
|
405
396
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
406
397
|
]),
|
|
407
|
-
|
|
408
|
-
loading: e(
|
|
409
|
-
"row-data": e(
|
|
410
|
-
"column-defs":
|
|
411
|
-
"row-count": e(
|
|
412
|
-
"page-count": e(
|
|
413
|
-
"page-index": e(
|
|
414
|
-
"page-size": e(
|
|
398
|
+
s(ue, {
|
|
399
|
+
loading: e(m).isLoading,
|
|
400
|
+
"row-data": e(a),
|
|
401
|
+
"column-defs": k,
|
|
402
|
+
"row-count": e(m).totalRows,
|
|
403
|
+
"page-count": e(m).pageCount,
|
|
404
|
+
"page-index": e(m).pageIndex,
|
|
405
|
+
"page-size": e(m).pageSize,
|
|
415
406
|
"shrink-at": !1,
|
|
416
|
-
onSortChange: e(
|
|
417
|
-
onPageChange:
|
|
407
|
+
onSortChange: e(A),
|
|
408
|
+
onPageChange: l[4] || (l[4] = (u) => e(y)({ pageSize: u.pageSize, pageIndex: u.pageIndex }))
|
|
418
409
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
419
|
-
|
|
420
|
-
r(Ce, {
|
|
410
|
+
s(Ce, {
|
|
421
411
|
ref_key: "sheetRef",
|
|
422
|
-
ref:
|
|
423
|
-
onSuccess:
|
|
412
|
+
ref: d,
|
|
413
|
+
onSuccess: f
|
|
424
414
|
}, null, 512)
|
|
425
415
|
])
|
|
426
416
|
], 64);
|
|
@@ -428,5 +418,5 @@ const p = {
|
|
|
428
418
|
}
|
|
429
419
|
});
|
|
430
420
|
export {
|
|
431
|
-
|
|
421
|
+
Ne as default
|
|
432
422
|
};
|
|
@@ -1,15 +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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { g as S, b as V } from "./dto-BtdVC-Ab.js";
|
|
4
|
+
import { u as O, p as Q } from "./loading-DQaawbHE.js";
|
|
5
|
+
import { a as W } from "./app-DgbDbhL-.js";
|
|
6
|
+
import { u as X } from "./campaign-BkvrUTEJ.js";
|
|
7
|
+
import { g as S, b as V } from "./dto-YYVhW73A.js";
|
|
9
8
|
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-
|
|
9
|
+
import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js";
|
|
10
|
+
import { u as ee } from "./template-CETJ6lkf.js";
|
|
11
|
+
import { c as _ } from "./index-DQC_1tRF.js";
|
|
13
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 = [
|
|
14
13
|
ue
|
|
15
14
|
], fe = /* @__PURE__ */ s("img", {
|
|
@@ -18,7 +17,7 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
18
17
|
}, null, -1), ye = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
19
18
|
/* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
|
|
20
19
|
/* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
|
|
21
|
-
], -1),
|
|
20
|
+
], -1), Re = /* @__PURE__ */ U({
|
|
22
21
|
__name: "Credit",
|
|
23
22
|
setup(_e) {
|
|
24
23
|
const R = {
|
|
@@ -26,7 +25,7 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
26
25
|
value: "create",
|
|
27
26
|
isPrimary: !0,
|
|
28
27
|
prependIcon: "add"
|
|
29
|
-
}, L = ee("CREDIT", G()), I = W(), c = X(), { global: B, minor: w } =
|
|
28
|
+
}, L = ee("CREDIT", G()), I = W(), c = X(), { global: B, minor: w } = O, n = k({
|
|
30
29
|
searchKey: "",
|
|
31
30
|
location: null
|
|
32
31
|
}), m = A(
|
|
@@ -64,7 +63,7 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
64
63
|
}
|
|
65
64
|
], v = k();
|
|
66
65
|
async function x(e) {
|
|
67
|
-
await
|
|
66
|
+
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await w(
|
|
68
67
|
async () => {
|
|
69
68
|
await _.delete(e._id), await c.read("CREDIT");
|
|
70
69
|
},
|
|
@@ -211,5 +210,5 @@ const te = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
211
210
|
}
|
|
212
211
|
});
|
|
213
212
|
export {
|
|
214
|
-
|
|
213
|
+
Re as default
|
|
215
214
|
};
|