@feedmepos/mf-connect 0.0.16-beta.10 → 0.0.16-beta.12
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-BVk0jPDU.js → Analytic-DIc9BYb0.js} +32 -20
- package/dist/{App-BbAalq1k.js → App-BzzL9_Jw.js} +33 -27
- package/dist/Broadcast-dVPgK5QV.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DiU3MnH0.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-TnEPvafD.js} +18 -11
- package/dist/{Card-B5in1RMa.js → Card-Bj2Yd2pr.js} +178 -158
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-Fkb_zzqZ.js +453 -0
- package/dist/{Credit-Bc9EzdsC.js → Credit-DHn9OkE8.js} +78 -69
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C1ZXQski.js +2788 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D6mWny8y.js +344 -0
- package/dist/{Experience-CgKak5ik.js → Experience-DX3aJihS.js} +64 -55
- package/dist/{Game-QhfKqrN_.js → Game-CcVQvETd.js} +54 -45
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/{Marketing-CSx4N7UJ.js → Marketing-B9kykWEh.js} +79 -72
- package/dist/{Member-CY6WMD8D.js → Member-RoJSCSC5.js} +25 -22
- package/dist/{MemberList-8iRwm7Sz.js → MemberList-BUDxqMEK.js} +321 -307
- package/dist/{MemberTransactions-CknqkWO3.js → MemberTransactions-Bh_tT1Rp.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Cj3-JHOX.js +432 -0
- package/dist/{Mission-BTy1p7lU.js → Mission-DDvgCLy0.js} +50 -40
- package/dist/{Point-A6B_ggSy.js → Point-BbPkt4kF.js} +67 -58
- package/dist/Promotion-DEo-lxpX.js +221 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BGjeTeqS.js +1751 -0
- package/dist/{Segment-CFVXtyEj.js → Segment-DAcpZWIN.js} +145 -130
- package/dist/{Setting-Jmtw-_DV.js → Setting-CgXohUPt.js} +167 -154
- package/dist/{Store-DQypT-7e.js → Store-BVyHbQ8o.js} +504 -489
- package/dist/{StoreRewards-M-utm0iI.js → StoreRewards-sccMDbkj.js} +124 -108
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B60mQ5kq.js → StoreTransactions.vue_vue_type_script_setup_true_lang--sdQ_l8g.js} +131 -123
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CXlkvt2u.js +139 -0
- package/dist/{Tier-D1jymeLK.js → Tier--P27XXbB.js} +144 -125
- package/dist/{Title-DN9DIP2k.js → Title-B27S3SxD.js} +107 -90
- package/dist/{Transaction-BAJvAoU6.js → Transaction-CYTtwwHY.js} +2 -2
- package/dist/Voucher-BZ8PKgO5.js +488 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-CnKzqAcN.js +53428 -0
- package/dist/app-FfENBuoE.js +5381 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +2 -1
- package/dist/business-CXyP9G7A.js +78 -0
- package/dist/campaign-0aM2KYOy.js +96 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/collection.fn-FicQhH1t.js +26 -0
- package/dist/dto-BiYLkVdL.js +1169 -0
- package/dist/effect-Cg-eNEjg.js +61 -0
- package/dist/{export-DjeNY5Pc.js → export-D7BuObOL.js} +19 -16
- package/dist/helper-DvD-D7c7.js +71 -0
- package/dist/index-B1Q0GAWp.js +95 -0
- package/dist/index-B4UZgSB-.js +28058 -0
- package/dist/index-B6c-fUij.js +203 -0
- package/dist/index-BP_5cfKa.js +38 -0
- package/dist/index-BRXg5Si1.js +2071 -0
- package/dist/index-BuDwICBJ.js +761 -0
- package/dist/index-CDMC-8iO.js +94 -0
- package/dist/index-CcZt3OrE.js +73 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DA-fzkRR.js +1737 -0
- package/dist/index-Dbd4WA4r.js +61 -0
- package/dist/index-Dkeb_9ER.js +8832 -0
- package/dist/index-DmdKoKk_.js +298 -0
- package/dist/index-G-88ujCM.js +3 -0
- package/dist/loading-uCNeZibp.js +32697 -0
- package/dist/lodash-B5I3zXaY.js +3678 -0
- package/dist/membership-DFRO9TyM.js +221 -0
- package/dist/moment-BWErdI6_.js +2578 -0
- package/dist/money-OtkT4Pzp.js +15 -0
- package/dist/number-Cg3NCouc.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/rule-Ch2HRiGw.js +1973 -0
- package/dist/rule-builder-B_M9yvEe.js +89 -0
- package/dist/template-1o0LbOoJ.js +190 -0
- package/dist/usePagination-BeF5K3M7.js +223 -0
- package/dist/vue-i18n-AtGIa4qH.js +2365 -0
- package/dist/xlsx-pChq0adn.js +15491 -0
- package/dist/zod-W_PvIofQ.js +90 -0
- package/package.json +3 -3
- package/dist/Collections-CFCZ9YIG.js +0 -4
- package/dist/MainLayout-JbHzENFy.js +0 -4
- package/dist/app-BpzzygYP.js +0 -87765
- package/dist/money-DKGIIplY.js +0 -15
- package/dist/number-tPodRxTN.js +0 -12
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { defineComponent as P, ref as k, computed as $, onMounted as z, resolveComponent as x, openBlock as R, createBlock as E, unref as n, withCtx as N, createVNode as
|
|
1
|
+
import { defineComponent as P, ref as k, computed as $, onMounted as z, resolveComponent as x, openBlock as R, createBlock as E, unref as n, withCtx as N, createVNode as g, normalizeClass as U, createCommentVNode as re, createElementVNode as I, toDisplayString as q, createElementBlock as L, Fragment as le, renderList as se, mergeModels as K, useModel as ie, watch as j, onBeforeMount as ce, h as c } from "vue";
|
|
2
2
|
import { components as S } from "@feedmepos/ui-library";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { d as ue } from "./index-B6c-fUij.js";
|
|
4
|
+
import { a as X } from "./loading-uCNeZibp.js";
|
|
5
|
+
import { s as de } from "./index-Dbd4WA4r.js";
|
|
6
|
+
import { h as b } from "./moment-BWErdI6_.js";
|
|
7
|
+
import { s as Y } from "./index-CuvNtC_M.js";
|
|
8
|
+
import { f as H } from "./number-Cg3NCouc.js";
|
|
9
|
+
import { u as me } from "./business-CXyP9G7A.js";
|
|
10
|
+
import { u as J, _ as Q } from "./usePagination-BeF5K3M7.js";
|
|
5
11
|
import { g as Z } from "./user-Bm4KttFq.js";
|
|
6
|
-
import { B as ee, a as te } from "./export-
|
|
7
|
-
|
|
12
|
+
import { B as ee, a as te } from "./export-D7BuObOL.js";
|
|
13
|
+
import { o as A } from "./objectId-dwaoBfJX.js";
|
|
14
|
+
import { g as G, a as pe, S as fe, b as ge } from "./index-B4UZgSB-.js";
|
|
15
|
+
function ye(r) {
|
|
8
16
|
let s = "";
|
|
9
|
-
switch (
|
|
17
|
+
switch (r) {
|
|
10
18
|
case "PORTAL":
|
|
11
19
|
s = "ADMIN";
|
|
12
20
|
break;
|
|
@@ -29,34 +37,34 @@ function ye(o) {
|
|
|
29
37
|
s = "COUNTER REDEEM";
|
|
30
38
|
break;
|
|
31
39
|
default:
|
|
32
|
-
s =
|
|
40
|
+
s = r;
|
|
33
41
|
break;
|
|
34
42
|
}
|
|
35
43
|
return s;
|
|
36
44
|
}
|
|
37
|
-
function be(
|
|
38
|
-
var s, l, p, d,
|
|
39
|
-
switch ((s =
|
|
45
|
+
function be(r) {
|
|
46
|
+
var s, l, p, d, o, y;
|
|
47
|
+
switch ((s = r == null ? void 0 : r.pf_collectible) == null ? void 0 : s.type) {
|
|
40
48
|
case "VOUCHER":
|
|
41
|
-
return `${(l =
|
|
49
|
+
return `${(l = r.pf_collectible) == null ? void 0 : l.type} (${(p = r.pf_collectible) == null ? void 0 : p.name})`;
|
|
42
50
|
case "TITLE":
|
|
43
|
-
return `${(d =
|
|
51
|
+
return `${(d = r.pf_collectible) == null ? void 0 : d.type} (${(o = r.pf_collectible) == null ? void 0 : o.name})`;
|
|
44
52
|
case "POINT":
|
|
45
53
|
return "Experience";
|
|
46
54
|
case "COIN":
|
|
47
55
|
return "Point";
|
|
48
56
|
default:
|
|
49
|
-
return
|
|
57
|
+
return de((y = r == null ? void 0 : r.pf_collectible) == null ? void 0 : y.type);
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
|
-
function he(
|
|
53
|
-
switch (
|
|
60
|
+
function he(r) {
|
|
61
|
+
switch (r) {
|
|
54
62
|
case "ONLINE":
|
|
55
63
|
return "Online";
|
|
56
64
|
case "COIN":
|
|
57
65
|
return "Point";
|
|
58
66
|
default:
|
|
59
|
-
return
|
|
67
|
+
return r;
|
|
60
68
|
}
|
|
61
69
|
}
|
|
62
70
|
const T = {
|
|
@@ -102,38 +110,38 @@ const T = {
|
|
|
102
110
|
}
|
|
103
111
|
},
|
|
104
112
|
emits: ["update:model-value"],
|
|
105
|
-
setup(
|
|
106
|
-
const l =
|
|
107
|
-
if (!
|
|
113
|
+
setup(r, { emit: s }) {
|
|
114
|
+
const l = r, p = s, d = k(!1), o = k({}), y = $(() => {
|
|
115
|
+
if (!o.value || Object.keys(o.value).length == l.items.length)
|
|
108
116
|
return "All";
|
|
109
117
|
{
|
|
110
|
-
const m = Object.keys(
|
|
118
|
+
const m = Object.keys(o.value).length;
|
|
111
119
|
return `${m > 0 ? m : "None"} selected`;
|
|
112
120
|
}
|
|
113
121
|
});
|
|
114
122
|
function D(m) {
|
|
115
|
-
|
|
123
|
+
o.value[m] ? delete o.value[m] : o.value[m] = !0, p("update:model-value", Object.keys(o.value));
|
|
116
124
|
}
|
|
117
125
|
function C() {
|
|
118
|
-
Object.keys(
|
|
126
|
+
Object.keys(o.value).length > 0 ? o.value = {} : o.value = l.items.reduce((m, t) => (m[t.value] = !0, m), {}), p("update:model-value", Object.keys(o.value));
|
|
119
127
|
}
|
|
120
128
|
return z(() => {
|
|
121
|
-
|
|
129
|
+
o.value = l.modelValue.reduce(
|
|
122
130
|
(m, t) => (m[t] = !0, m),
|
|
123
131
|
{}
|
|
124
132
|
), l.modelValue.length == 0;
|
|
125
133
|
}), (m, t) => {
|
|
126
|
-
const u = x("FmIcon"), _ = x("FmChip"), w = x("FmMenuItem"),
|
|
127
|
-
return R(), E(
|
|
128
|
-
placement:
|
|
129
|
-
disabled:
|
|
134
|
+
const u = x("FmIcon"), _ = x("FmChip"), w = x("FmMenuItem"), f = x("FmMenu");
|
|
135
|
+
return R(), E(f, {
|
|
136
|
+
placement: r.placement || "bottom-end",
|
|
137
|
+
disabled: r.disabled == !0,
|
|
130
138
|
"model-value": n(d),
|
|
131
139
|
onMenuChanged: t[0] || (t[0] = (e) => d.value = e),
|
|
132
140
|
"close-on-click": !1
|
|
133
141
|
}, {
|
|
134
142
|
"menu-button": N(() => [
|
|
135
|
-
|
|
136
|
-
label:
|
|
143
|
+
g(_, {
|
|
144
|
+
label: r.label,
|
|
137
145
|
class: U(l.class || "text-fm-color-neutral-gray-400 cursor-pointer")
|
|
138
146
|
}, {
|
|
139
147
|
default: N(() => [
|
|
@@ -143,9 +151,9 @@ const T = {
|
|
|
143
151
|
class: U(l.class),
|
|
144
152
|
outline: "",
|
|
145
153
|
size: "sm"
|
|
146
|
-
}, null, 8, ["name", "class"])) :
|
|
147
|
-
I("div", ve,
|
|
148
|
-
|
|
154
|
+
}, null, 8, ["name", "class"])) : re("", !0),
|
|
155
|
+
I("div", ve, q(l.label) + " " + q(r.showItemLabel ? n(y) : ""), 1),
|
|
156
|
+
g(u, {
|
|
149
157
|
name: n(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
150
158
|
class: U(l.class),
|
|
151
159
|
outline: "",
|
|
@@ -156,8 +164,8 @@ const T = {
|
|
|
156
164
|
}, 8, ["label", "class"])
|
|
157
165
|
]),
|
|
158
166
|
default: N(() => [
|
|
159
|
-
|
|
160
|
-
"model-value": Object.keys(n(
|
|
167
|
+
g(w, {
|
|
168
|
+
"model-value": Object.keys(n(o)).length === l.items.length,
|
|
161
169
|
label: "All",
|
|
162
170
|
"has-checkbox": !0,
|
|
163
171
|
indeterminate: !0,
|
|
@@ -168,7 +176,7 @@ const T = {
|
|
|
168
176
|
value: e.value,
|
|
169
177
|
label: e.label,
|
|
170
178
|
"has-checkbox": !0,
|
|
171
|
-
"model-value": n(
|
|
179
|
+
"model-value": n(o)[e.value],
|
|
172
180
|
"onUpdate:modelValue": (a) => D(e.value)
|
|
173
181
|
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
174
182
|
]),
|
|
@@ -176,7 +184,7 @@ const T = {
|
|
|
176
184
|
}, 8, ["placement", "disabled", "model-value"]);
|
|
177
185
|
};
|
|
178
186
|
}
|
|
179
|
-
}),
|
|
187
|
+
}), O = "YYYY-MM-DD", ae = /* @__PURE__ */ P({
|
|
180
188
|
__name: "DateRangeChip",
|
|
181
189
|
props: /* @__PURE__ */ K({
|
|
182
190
|
modelValue: {
|
|
@@ -187,21 +195,21 @@ const T = {
|
|
|
187
195
|
dateRange: {
|
|
188
196
|
type: Object,
|
|
189
197
|
default: () => ({
|
|
190
|
-
startDate: b().subtract(7, "day").format(
|
|
191
|
-
endDate: b().endOf("day").format(
|
|
198
|
+
startDate: b().subtract(7, "day").format(O),
|
|
199
|
+
endDate: b().endOf("day").format(O)
|
|
192
200
|
})
|
|
193
201
|
},
|
|
194
202
|
dateRangeModifiers: {}
|
|
195
203
|
}),
|
|
196
204
|
emits: /* @__PURE__ */ K(["update:model-value"], ["update:dateRange"]),
|
|
197
|
-
setup(
|
|
198
|
-
const l =
|
|
199
|
-
startDate: d.value.startDate ? b(d.value.startDate).format(
|
|
200
|
-
endDate: d.value.endDate ? b(d.value.endDate).format(
|
|
205
|
+
setup(r, { emit: s }) {
|
|
206
|
+
const l = r, p = s, d = ie(r, "dateRange"), o = $(() => d.value ? `${y.value.startDate ?? "Start"} - ${y.value.endDate ?? "End"}` : "No dates selected."), y = $(() => ({
|
|
207
|
+
startDate: d.value.startDate ? b(d.value.startDate).format(O) : void 0,
|
|
208
|
+
endDate: d.value.endDate ? b(d.value.endDate).format(O) : void 0
|
|
201
209
|
}));
|
|
202
210
|
return z(() => {
|
|
203
211
|
d.value = l.modelValue;
|
|
204
|
-
}),
|
|
212
|
+
}), j(
|
|
205
213
|
() => d.value,
|
|
206
214
|
() => {
|
|
207
215
|
p("update:model-value", y.value);
|
|
@@ -214,8 +222,8 @@ const T = {
|
|
|
214
222
|
"show-predefined-range": ""
|
|
215
223
|
}, {
|
|
216
224
|
"trigger-button": N(() => [
|
|
217
|
-
|
|
218
|
-
label: n(
|
|
225
|
+
g(m, {
|
|
226
|
+
label: n(o),
|
|
219
227
|
icon: "calendar_month",
|
|
220
228
|
"right-icon": "keyboard_arrow_down",
|
|
221
229
|
class: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
@@ -229,16 +237,16 @@ const T = {
|
|
|
229
237
|
class _e extends ee {
|
|
230
238
|
}
|
|
231
239
|
const W = () => {
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
234
|
-
return
|
|
240
|
+
const r = fe.getBusinessId();
|
|
241
|
+
if (!r) throw new Error("Invalid business ID");
|
|
242
|
+
return ge(`businesses/${r}/transactions`, {
|
|
235
243
|
noIdRequired: !0
|
|
236
244
|
});
|
|
237
245
|
}, M = {
|
|
238
|
-
async readAll(
|
|
239
|
-
const l =
|
|
246
|
+
async readAll(r, s) {
|
|
247
|
+
const l = G(
|
|
240
248
|
await W().get("", {
|
|
241
|
-
params: { ...
|
|
249
|
+
params: { ...r, ...s }
|
|
242
250
|
})
|
|
243
251
|
);
|
|
244
252
|
return {
|
|
@@ -246,10 +254,10 @@ const W = () => {
|
|
|
246
254
|
resources: l.resources
|
|
247
255
|
};
|
|
248
256
|
},
|
|
249
|
-
async readStoreTransactions(
|
|
250
|
-
const l =
|
|
257
|
+
async readStoreTransactions(r, s) {
|
|
258
|
+
const l = G(
|
|
251
259
|
await W().get("/store", {
|
|
252
|
-
params: { ...
|
|
260
|
+
params: { ...r, ...s }
|
|
253
261
|
})
|
|
254
262
|
);
|
|
255
263
|
return {
|
|
@@ -257,18 +265,18 @@ const W = () => {
|
|
|
257
265
|
resources: l.resources
|
|
258
266
|
};
|
|
259
267
|
},
|
|
260
|
-
async readBills(
|
|
261
|
-
return (await
|
|
268
|
+
async readBills(r, s, l) {
|
|
269
|
+
return (await pe("").get(`/restaurants/${r}/receipt?start=${s}&end=${l}`)).data;
|
|
262
270
|
}
|
|
263
|
-
}, Se = { class: "hidden xs:flex items-center justify-end" }, xe = { class: "flex items-center justify-between" }, we = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, De = { class: "xs:hidden" },
|
|
271
|
+
}, Se = { class: "hidden xs:flex items-center justify-end" }, xe = { class: "flex items-center justify-between" }, we = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, De = { class: "xs:hidden" }, Le = /* @__PURE__ */ P({
|
|
264
272
|
__name: "CollectionTransactions",
|
|
265
273
|
props: {
|
|
266
274
|
user: {
|
|
267
275
|
type: String
|
|
268
276
|
}
|
|
269
277
|
},
|
|
270
|
-
setup(
|
|
271
|
-
const s =
|
|
278
|
+
setup(r) {
|
|
279
|
+
const s = me(), l = r, p = k(!1), d = [
|
|
272
280
|
{
|
|
273
281
|
header: "Transaction ID",
|
|
274
282
|
accessorKey: "_id",
|
|
@@ -283,7 +291,7 @@ const W = () => {
|
|
|
283
291
|
size: "sm",
|
|
284
292
|
class: "cursor-pointer mr-4",
|
|
285
293
|
onClick: (a) => {
|
|
286
|
-
a.preventDefault(), a.stopPropagation(),
|
|
294
|
+
a.preventDefault(), a.stopPropagation(), X(e.row.original._id.toString());
|
|
287
295
|
}
|
|
288
296
|
}),
|
|
289
297
|
c(
|
|
@@ -306,14 +314,14 @@ const W = () => {
|
|
|
306
314
|
// accessorKey: 'totalAmount',
|
|
307
315
|
enableSorting: !1,
|
|
308
316
|
cell(e) {
|
|
309
|
-
var v, i, F,
|
|
310
|
-
const a =
|
|
317
|
+
var v, i, F, V;
|
|
318
|
+
const a = H(
|
|
311
319
|
e.row.original.expiryAmount.reduce(
|
|
312
|
-
(ne,
|
|
320
|
+
(ne, oe) => ne + oe.amount,
|
|
313
321
|
e.row.original.amount ?? 0
|
|
314
322
|
),
|
|
315
323
|
2
|
|
316
|
-
), h = (i = (v = e.row.original.expiryAmount) == null ? void 0 : v[0]) != null && i.expiredAt ? b((
|
|
324
|
+
), h = (i = (v = e.row.original.expiryAmount) == null ? void 0 : v[0]) != null && i.expiredAt ? b((V = (F = e.row.original.expiryAmount) == null ? void 0 : F[0]) == null ? void 0 : V.expiredAt).format(
|
|
317
325
|
"D MMM YYYY"
|
|
318
326
|
) : "";
|
|
319
327
|
return c("div", { class: "flex items-center" }, [
|
|
@@ -418,7 +426,7 @@ const W = () => {
|
|
|
418
426
|
]);
|
|
419
427
|
}
|
|
420
428
|
}
|
|
421
|
-
],
|
|
429
|
+
], o = k({
|
|
422
430
|
search: "",
|
|
423
431
|
"pf_collectible.type": [],
|
|
424
432
|
"metadata.location": [],
|
|
@@ -427,13 +435,13 @@ const W = () => {
|
|
|
427
435
|
endDate: b().endOf("day").toISOString()
|
|
428
436
|
},
|
|
429
437
|
source: []
|
|
430
|
-
}), { tableMeta: y, rowData: D, onSort: C, debouncedFetchData: m, onSearch: t } =
|
|
438
|
+
}), { tableMeta: y, rowData: D, onSort: C, debouncedFetchData: m, onSearch: t } = J(async (e) => {
|
|
431
439
|
const a = {
|
|
432
|
-
...
|
|
440
|
+
...o.value,
|
|
433
441
|
user: l.user,
|
|
434
442
|
dateRange: {
|
|
435
|
-
start: new Date(
|
|
436
|
-
end: new Date(
|
|
443
|
+
start: new Date(o.value.dateRange.startDate).toISOString(),
|
|
444
|
+
end: new Date(o.value.dateRange.endDate).toISOString()
|
|
437
445
|
}
|
|
438
446
|
}, h = await M.readAll(e, a);
|
|
439
447
|
return {
|
|
@@ -443,23 +451,23 @@ const W = () => {
|
|
|
443
451
|
}),
|
|
444
452
|
meta: h.meta
|
|
445
453
|
};
|
|
446
|
-
}), u = k([]), _ =
|
|
447
|
-
|
|
448
|
-
|
|
454
|
+
}), u = k([]), _ = ue.options.map((e) => ({ label: Y(T.getReason(e)), value: e })), w = s.locations.map((e) => ({ label: e.name, value: e._id }));
|
|
455
|
+
j(
|
|
456
|
+
o,
|
|
449
457
|
() => {
|
|
450
458
|
m();
|
|
451
459
|
},
|
|
452
460
|
{ deep: !0 }
|
|
453
461
|
);
|
|
454
|
-
async function
|
|
462
|
+
async function f() {
|
|
455
463
|
try {
|
|
456
464
|
p.value = !0;
|
|
457
465
|
const e = {
|
|
458
|
-
...
|
|
466
|
+
...o.value,
|
|
459
467
|
user: l.user,
|
|
460
468
|
dateRange: {
|
|
461
|
-
start: new Date(
|
|
462
|
-
end: new Date(
|
|
469
|
+
start: new Date(o.value.dateRange.startDate).toISOString(),
|
|
470
|
+
end: new Date(o.value.dateRange.endDate).toISOString()
|
|
463
471
|
}
|
|
464
472
|
};
|
|
465
473
|
await te({
|
|
@@ -472,9 +480,9 @@ const W = () => {
|
|
|
472
480
|
CreatedAt: b(A(a._id.toString())).format(
|
|
473
481
|
"D MMM YYYY, hh:mmA"
|
|
474
482
|
),
|
|
475
|
-
Amount:
|
|
483
|
+
Amount: H(
|
|
476
484
|
a.expiryAmount.reduce(
|
|
477
|
-
(F,
|
|
485
|
+
(F, V) => F + V.amount,
|
|
478
486
|
a.amount ?? 0
|
|
479
487
|
),
|
|
480
488
|
2
|
|
@@ -501,35 +509,35 @@ const W = () => {
|
|
|
501
509
|
const h = x("FmSearch"), v = x("FmButton");
|
|
502
510
|
return R(), L("div", null, [
|
|
503
511
|
I("div", Se, [
|
|
504
|
-
|
|
512
|
+
g(h, {
|
|
505
513
|
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
506
|
-
modelValue: n(
|
|
507
|
-
"onUpdate:modelValue": a[0] || (a[0] = (i) => n(
|
|
514
|
+
modelValue: n(o).search,
|
|
515
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => n(o).search = i),
|
|
508
516
|
placeholder: "Search",
|
|
509
517
|
collapsible: ""
|
|
510
518
|
}, null, 8, ["modelValue"]),
|
|
511
|
-
|
|
519
|
+
g(v, {
|
|
512
520
|
icon: "ios_share",
|
|
513
521
|
variant: "tertiary",
|
|
514
|
-
onClick:
|
|
522
|
+
onClick: f
|
|
515
523
|
})
|
|
516
524
|
]),
|
|
517
525
|
I("div", xe, [
|
|
518
526
|
I("div", we, [
|
|
519
|
-
|
|
527
|
+
g(B, {
|
|
520
528
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
521
529
|
"right-icon": "keyboard_arrow_down",
|
|
522
|
-
modelValue: n(
|
|
523
|
-
"onUpdate:modelValue": a[1] || (a[1] = (i) => n(
|
|
530
|
+
modelValue: n(o)["metadata.location"],
|
|
531
|
+
"onUpdate:modelValue": a[1] || (a[1] = (i) => n(o)["metadata.location"] = i),
|
|
524
532
|
icon: "storefront",
|
|
525
533
|
"show-item-label": !0,
|
|
526
534
|
items: n(w)
|
|
527
535
|
}, null, 8, ["modelValue", "items"]),
|
|
528
|
-
|
|
536
|
+
g(B, {
|
|
529
537
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
530
538
|
"right-icon": "keyboard_arrow_down",
|
|
531
|
-
modelValue: n(
|
|
532
|
-
"onUpdate:modelValue": a[2] || (a[2] = (i) => n(
|
|
539
|
+
modelValue: n(o)["pf_collectible.type"],
|
|
540
|
+
"onUpdate:modelValue": a[2] || (a[2] = (i) => n(o)["pf_collectible.type"] = i),
|
|
533
541
|
label: "Type: ",
|
|
534
542
|
"show-item-label": !0,
|
|
535
543
|
items: [
|
|
@@ -543,42 +551,42 @@ const W = () => {
|
|
|
543
551
|
{ label: "Stamp", value: "STAMP" }
|
|
544
552
|
]
|
|
545
553
|
}, null, 8, ["modelValue"]),
|
|
546
|
-
|
|
554
|
+
g(B, {
|
|
547
555
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
548
556
|
"right-icon": "keyboard_arrow_down",
|
|
549
|
-
modelValue: n(
|
|
550
|
-
"onUpdate:modelValue": a[3] || (a[3] = (i) => n(
|
|
557
|
+
modelValue: n(o).source,
|
|
558
|
+
"onUpdate:modelValue": a[3] || (a[3] = (i) => n(o).source = i),
|
|
551
559
|
label: "Source: ",
|
|
552
560
|
"show-item-label": !0,
|
|
553
561
|
items: n(_)
|
|
554
562
|
}, null, 8, ["modelValue", "items"]),
|
|
555
|
-
|
|
563
|
+
g(ae, {
|
|
556
564
|
"model-value": {
|
|
557
|
-
startDate: n(
|
|
558
|
-
endDate: n(
|
|
565
|
+
startDate: n(o).dateRange.startDate,
|
|
566
|
+
endDate: n(o).dateRange.endDate
|
|
559
567
|
},
|
|
560
|
-
"onUpdate:modelValue": a[4] || (a[4] = (i) => n(
|
|
568
|
+
"onUpdate:modelValue": a[4] || (a[4] = (i) => n(o).dateRange = {
|
|
561
569
|
startDate: n(b)(i.startDate).startOf("d").toISOString(),
|
|
562
570
|
endDate: n(b)(i.endDate).endOf("d").toISOString()
|
|
563
571
|
})
|
|
564
572
|
}, null, 8, ["model-value"])
|
|
565
573
|
]),
|
|
566
|
-
|
|
574
|
+
g(h, {
|
|
567
575
|
class: "xs:hidden",
|
|
568
|
-
modelValue: n(
|
|
569
|
-
"onUpdate:modelValue": a[5] || (a[5] = (i) => n(
|
|
576
|
+
modelValue: n(o).search,
|
|
577
|
+
"onUpdate:modelValue": a[5] || (a[5] = (i) => n(o).search = i),
|
|
570
578
|
placeholder: "Search",
|
|
571
579
|
collapsible: ""
|
|
572
580
|
}, null, 8, ["modelValue"]),
|
|
573
581
|
I("div", De, [
|
|
574
|
-
|
|
582
|
+
g(v, {
|
|
575
583
|
icon: "ios_share",
|
|
576
584
|
variant: "tertiary",
|
|
577
|
-
onClick:
|
|
585
|
+
onClick: f
|
|
578
586
|
})
|
|
579
587
|
])
|
|
580
588
|
]),
|
|
581
|
-
|
|
589
|
+
g(Q, {
|
|
582
590
|
loading: n(y).isLoading,
|
|
583
591
|
"row-data": n(D),
|
|
584
592
|
"row-count": n(y).totalRows,
|
|
@@ -601,15 +609,15 @@ const W = () => {
|
|
|
601
609
|
});
|
|
602
610
|
class Ce extends ee {
|
|
603
611
|
}
|
|
604
|
-
const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex gap-8 items-center" }, Fe = { class: "flex gap-8 items-center xs:hidden" },
|
|
612
|
+
const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex gap-8 items-center" }, Fe = { class: "flex gap-8 items-center xs:hidden" }, je = /* @__PURE__ */ P({
|
|
605
613
|
__name: "StoreTransactions",
|
|
606
614
|
props: {
|
|
607
615
|
user: {
|
|
608
616
|
type: String
|
|
609
617
|
}
|
|
610
618
|
},
|
|
611
|
-
setup(
|
|
612
|
-
const s =
|
|
619
|
+
setup(r) {
|
|
620
|
+
const s = r, l = [
|
|
613
621
|
{
|
|
614
622
|
header: "Transaction ID",
|
|
615
623
|
meta: {
|
|
@@ -623,7 +631,7 @@ const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
623
631
|
size: "sm",
|
|
624
632
|
class: "cursor-pointer mr-4 shrink-0",
|
|
625
633
|
onClick: (u) => {
|
|
626
|
-
u.preventDefault(), u.stopPropagation(),
|
|
634
|
+
u.preventDefault(), u.stopPropagation(), X(t.row.original._id.toString());
|
|
627
635
|
}
|
|
628
636
|
}),
|
|
629
637
|
c("div", { class: "truncate" }, t.row.original._id.toString())
|
|
@@ -693,14 +701,14 @@ const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
693
701
|
startDate: b().subtract(7, "day").toISOString(),
|
|
694
702
|
endDate: b().toISOString()
|
|
695
703
|
}
|
|
696
|
-
}), { tableMeta: d, rowData:
|
|
704
|
+
}), { tableMeta: d, rowData: o, onSort: y, debouncedFetchData: D, onSearch: C } = J(async (t) => {
|
|
697
705
|
const u = {
|
|
698
706
|
...p.value.dateRange,
|
|
699
707
|
user: s.user
|
|
700
708
|
};
|
|
701
709
|
return await M.readStoreTransactions(t, u);
|
|
702
710
|
});
|
|
703
|
-
|
|
711
|
+
j(
|
|
704
712
|
p,
|
|
705
713
|
() => {
|
|
706
714
|
D();
|
|
@@ -716,7 +724,7 @@ const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
716
724
|
user: s.user
|
|
717
725
|
}),
|
|
718
726
|
transformRecord: (t) => {
|
|
719
|
-
var u, _, w,
|
|
727
|
+
var u, _, w, f, e;
|
|
720
728
|
return {
|
|
721
729
|
TransactionId: ((u = t._id) == null ? void 0 : u.toString()) || "",
|
|
722
730
|
CreatedAt: b(A(t._id.toString())).format(
|
|
@@ -726,7 +734,7 @@ const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
726
734
|
Location: t.location ? t.pf_location.name : "Online Store",
|
|
727
735
|
PaymentType: ((_ = t.paymentType) == null ? void 0 : _.type) || "N/A",
|
|
728
736
|
PaymentExtra: ((w = t.paymentType) == null ? void 0 : w.extra) || "",
|
|
729
|
-
User: ((
|
|
737
|
+
User: ((f = t.pf_member) == null ? void 0 : f.name) || "",
|
|
730
738
|
PhoneNumber: ((e = t.pf_member) == null ? void 0 : e.phoneNumber) || "",
|
|
731
739
|
Status: t.status || ""
|
|
732
740
|
};
|
|
@@ -738,43 +746,43 @@ const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
738
746
|
return R(), L("div", null, [
|
|
739
747
|
I("div", Ie, [
|
|
740
748
|
I("div", Re, [
|
|
741
|
-
|
|
749
|
+
g(ae, {
|
|
742
750
|
modelValue: n(p).dateRange,
|
|
743
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
751
|
+
"onUpdate:modelValue": u[0] || (u[0] = (f) => n(p).dateRange = f)
|
|
744
752
|
}, null, 8, ["modelValue"])
|
|
745
753
|
]),
|
|
746
754
|
I("div", Fe, [
|
|
747
|
-
|
|
755
|
+
g(_, {
|
|
748
756
|
modelValue: n(d).searchValue,
|
|
749
757
|
"onUpdate:modelValue": [
|
|
750
|
-
u[1] || (u[1] = (
|
|
758
|
+
u[1] || (u[1] = (f) => n(d).searchValue = f),
|
|
751
759
|
n(C)
|
|
752
760
|
],
|
|
753
761
|
placeholder: "Search",
|
|
754
762
|
collapsible: ""
|
|
755
763
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
756
|
-
|
|
764
|
+
g(w, {
|
|
757
765
|
icon: "ios_share",
|
|
758
766
|
variant: "tertiary",
|
|
759
767
|
onClick: m
|
|
760
768
|
})
|
|
761
769
|
])
|
|
762
770
|
]),
|
|
763
|
-
|
|
771
|
+
g(Q, {
|
|
764
772
|
loading: n(d).isLoading,
|
|
765
|
-
"row-data": n(
|
|
773
|
+
"row-data": n(o),
|
|
766
774
|
"row-count": n(d).totalRows,
|
|
767
775
|
"column-defs": l.filter(
|
|
768
|
-
(
|
|
776
|
+
(f) => !s.user || f.header !== "User" && f.header !== "Phone No."
|
|
769
777
|
),
|
|
770
778
|
"page-count": n(d).pageCount,
|
|
771
779
|
"page-index": n(d).pageIndex,
|
|
772
780
|
"page-size": n(d).pageSize,
|
|
773
781
|
"shrink-at": !1,
|
|
774
782
|
onSortChange: n(y),
|
|
775
|
-
onPageChange: u[2] || (u[2] = (
|
|
776
|
-
pageSize:
|
|
777
|
-
pageIndex:
|
|
783
|
+
onPageChange: u[2] || (u[2] = (f) => n(D)({
|
|
784
|
+
pageSize: f.pageSize,
|
|
785
|
+
pageIndex: f.pageIndex
|
|
778
786
|
}))
|
|
779
787
|
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "page-count", "page-index", "page-size", "onSortChange"])
|
|
780
788
|
]);
|
|
@@ -782,6 +790,6 @@ const Ie = { class: "flex items-center justify-between" }, Re = { class: "flex g
|
|
|
782
790
|
}
|
|
783
791
|
});
|
|
784
792
|
export {
|
|
785
|
-
|
|
786
|
-
|
|
793
|
+
Le as _,
|
|
794
|
+
je as a
|
|
787
795
|
};
|