@feedmepos/mf-connect 0.1.38-beta.9 → 0.1.38-beta.92
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-3MN2saaU.js → Analytic-CWhVZ2N2.js} +31 -32
- package/dist/{App-Co8X5Wdy.js → App-BzHDZ550.js} +741 -728
- package/dist/AuditLogs-DjJOfxWr.js +2013 -0
- package/dist/{Bin-8a56ZDib.js → Bin-H9Mc0kOX.js} +10 -10
- package/dist/Broadcast-BlKv9pTl.js +266 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVXlfq31.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bfpr1EuT.js} +6 -6
- package/dist/{Card-B8_09LJu.js → Card-ByEYCMZi.js} +145 -140
- package/dist/Collections-BjlqpQR0.js +540 -0
- package/dist/Credit-DyBVTpfr.js +260 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DP50lRfA.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BCQxJpVP.js +351 -0
- package/dist/Experience-Cf6lxdu_.js +259 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-BIgeA5yw.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
- package/dist/Game-CCgsa5as.js +330 -0
- package/dist/Grab-oIvB2uUc.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-BuiY288K.js} +49 -48
- package/dist/{Index-DLF71mx_.js → Index--bmiSYq2.js} +54 -54
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BQMZvHq2.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bj6wuosW.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-DTva8da3.js} +1 -1
- package/dist/Marketing-D-5rvdRJ.js +236 -0
- package/dist/MarketingMaterialEdit-CZvsnFG5.js +1036 -0
- package/dist/{Member-Bkw4aqtv.js → Member-CxKA1iM1.js} +38 -37
- package/dist/{MemberList-a3PdVYB3.js → MemberList-CmBZ6w5v.js} +485 -489
- package/dist/{MemberTransactions-CPDBd-n3.js → MemberTransactions-Dc9uE1Jy.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-pbN8pN1m.js → MessageInput.vue_vue_type_script_setup_true_lang-DiOsNoiJ.js} +10392 -9967
- package/dist/Mission-D9ruHJsQ.js +334 -0
- package/dist/{Overview-De97NDoe.js → Overview-B4eiwvqi.js} +34 -34
- package/dist/Point-MXmcuDtD.js +262 -0
- package/dist/Promotion-CBoCcEhJ.js +397 -0
- package/dist/{Queue-ISVZxCE2.js → Queue-if5Lji0q.js} +18 -18
- package/dist/{Record-2FMByNC6.js → Record-XLXvSqlF.js} +15 -14
- package/dist/Review-BKIkmxLd.js +621 -0
- package/dist/ReviewFacebookCallback-B6TIL_H7.js +243 -0
- package/dist/ReviewGoogleCallback-D3sQbfuc.js +213 -0
- package/dist/{Reward-DPRyQ37x.js → Reward-DaymLqOP.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Ba7-3bL-.js → RewardGroup.vue_vue_type_script_setup_true_lang-cGyeUFlK.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BOJdm376.js +1912 -0
- package/dist/Segment-o7srzt8o.js +1015 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DZbyDVid.js → SelectItems.vue_vue_type_script_setup_true_lang-DnA83SVT.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-ioMFYIwK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-RKn_DhW0.js} +12 -12
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-mzGtatEl.js +226 -0
- package/dist/Setting-Clbp5X2E.js +2039 -0
- package/dist/SettingAdvertisements-D9KTw00Q.js +264 -0
- package/dist/Store-DApDz7rO.js +1996 -0
- package/dist/StoreRewards-DTraNhDh.js +537 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BusvWI37.js +1130 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D5HOiiLG.js +7007 -0
- package/dist/{Tier-CwRj0oJ1.js → Tier-BWiO5an3.js} +562 -480
- package/dist/{Title-EII5OxSP.js → Title-Dur74Of5.js} +151 -149
- package/dist/{Transaction-1MTkAfej.js → Transaction-x3fZwXdy.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BlQVWQHJ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-9XLlfUdp.js} +7 -7
- package/dist/Voucher-DH7x7NAS.js +421 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CNn4GR2l.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CTeGK4bk.js → ZodTextField.vue_vue_type_script_setup_true_lang-W-qWPW20.js} +2 -2
- package/dist/app-IRmnrMb8.js +59647 -0
- package/dist/app.js +1 -1
- package/dist/{business-DjnN-J4U.js → business-BZG7VHN8.js} +11 -8
- package/dist/campaign-BUvMmYOk.js +219 -0
- package/dist/campaign-BeRxvBzZ.js +254 -0
- package/dist/campaign.enum-BmFHrnub.js +26 -0
- package/dist/campaign.fn-B0sgTkC-.js +776 -0
- package/dist/{collectible.enum-r6N115Lu.js → collectible.enum-J0aolcpF.js} +1 -1
- package/dist/{collection.fn-CSsfVv26.js → collection.fn-BOhZm8S0.js} +2 -2
- package/dist/dto-CSNH3rWF.js +222 -0
- package/dist/duplicateCampaign-CAOL6p7n.js +51 -0
- package/dist/effect-DTL3F8d_.js +89 -0
- package/dist/{email-addresses-D8uheCCF.js → email-addresses-Bw8rSTHa.js} +2 -2
- package/dist/{export-Ver6WiX6.js → export-CY5VAxnU.js} +4 -4
- package/dist/{helper-Bg4xoFbh.js → helper-1sIKNm6C.js} +22 -7
- package/dist/{index-Dn_bmcns.js → index-BX_igCG6.js} +3 -3
- package/dist/index-B_-tEYD0.js +3625 -0
- package/dist/{index-BZZ4iF4-.js → index-BultP2zY.js} +23 -12
- package/dist/index-CAIsxBzT.js +48 -0
- package/dist/index-CVbL8J7-.js +85 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-D4JOeJJJ.js → index-D4Bx6J2q.js} +1 -1
- package/dist/{index-hJUxCNsF.js → index-DO2AYnVc.js} +1 -1
- package/dist/index-DPmqQmoC.js +30289 -0
- package/dist/{index-CNhr0_Zx.js → index-DoupH575.js} +617 -191
- package/dist/{index-Bb0CHeNx.js → index-DpXwZYX4.js} +3 -3
- package/dist/{index-BPQyQc4q.js → index-Gr5htFUW.js} +1 -1
- package/dist/index-KC-9_cY4.js +8910 -0
- package/dist/index-nMxh2OZ2.js +28900 -0
- package/dist/{index.esm2017-hK1Mi9yY.js → index.esm2017-0cVB_6L1.js} +122 -122
- package/dist/{loading-kIQFOTwH.js → loading-BUAN8WyV.js} +4 -3
- package/dist/{lodash-B5I3zXaY.js → lodash-C7OD0MNW.js} +1 -1
- package/dist/{membership--xR-HZoa.js → membership-CZkPkDiM.js} +38 -18
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-c-ITXnlg.js → money-CdTox5sS.js} +1 -1
- package/dist/{number-DfZSBLOY.js → number-CxHO_EhJ.js} +1 -1
- package/dist/objectid-DL2GZe9v.js +145 -0
- package/dist/{campaign-BpJ1O6KS.js → plugins-BR4hQ6yY.js} +677 -699
- package/dist/remy-D_Deb3ue.js +13 -0
- package/dist/{reward-CE0ifMHS.js → reward-DWwwkcS3.js} +1 -1
- package/dist/{rule-DrjdmpaB.js → rule-CY_w8dsS.js} +505 -487
- package/dist/rule-builder-DMdUBkxB.js +102 -0
- package/dist/string-Gcy5IM_H.js +32 -0
- package/dist/style.css +11 -2
- package/dist/template-tuIzBpOC.js +188 -0
- package/dist/timezone-Dt3UFIE2.js +1156 -0
- package/dist/trigger-B9pWO76n.js +213 -0
- package/dist/useMarketingMaterialActions-C7XoKutU.js +96 -0
- package/dist/usePagination-Dvqiv0Ms.js +220 -0
- package/dist/{user-Cl3IotYV.js → user-DlrL0A8u.js} +15 -14
- package/dist/{vue-i18n-DKh0SMhL.js → vue-i18n-B2srUL0h.js} +449 -449
- package/dist/{xlsx-BDBzdOuM.js → xlsx-B9pnBbNc.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-CO0ds3MB.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-DTq6IAuc.js +0 -1887
- package/dist/Broadcast-UreS5Kiq.js +0 -227
- package/dist/Collections-B0I5ULxR.js +0 -465
- package/dist/Credit-B4Ad8DWP.js +0 -222
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DjgACf9F.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-y5JnuIev.js +0 -347
- package/dist/Experience-xO5KpTTm.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-ChgrVvz5.js +0 -278
- package/dist/Marketing-BlmRXSGl.js +0 -20073
- package/dist/Mission-B07wK0HX.js +0 -296
- package/dist/Point-Ckj9QIeH.js +0 -226
- package/dist/Promotion-aGNCOeRN.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DWj-421v.js +0 -1751
- package/dist/Segment-CRMNJ11X.js +0 -882
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cfp8XXdO.js +0 -147
- package/dist/Setting-c0FWRZsD.js +0 -1936
- package/dist/Store-Bm1_15s8.js +0 -1842
- package/dist/StoreRewards-BCQHHfay.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfTF2l-D.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-rvhoxo0w.js +0 -139
- package/dist/Voucher-CYvjCb-v.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-63Jr71dJ.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-BJLHk8ao.js +0 -33357
- package/dist/app-BzIk1ojT.js +0 -7086
- package/dist/campaign-BHNS5kXt.js +0 -96
- package/dist/campaign.enum-CJDWE_Om.js +0 -20
- package/dist/campaign.fn-C0HQE9uh.js +0 -758
- package/dist/dto-Byq51uVH.js +0 -214
- package/dist/effect-Do3yTM-_.js +0 -78
- package/dist/index-B1V9UnI9.js +0 -76
- package/dist/index-BM9CWjC6.js +0 -38
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-D6VxioBg.js +0 -30038
- package/dist/index-DGKlRWn3.js +0 -32260
- package/dist/index-DLKyOu7W.js +0 -8861
- package/dist/index-DyYF6HYL.js +0 -121
- package/dist/index-UXtH44XQ.js +0 -3120
- package/dist/objectid-DKbha9-x.js +0 -145
- package/dist/plugins-DtakupKW.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-B_hCyq3x.js +0 -89
- package/dist/template-WI4a-lFY.js +0 -190
- package/dist/trigger-DieDHht3.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as h, computed as U, onMounted as j, resolveComponent as r, openBlock as l, createElementBlock as y, Fragment as b, createVNode as i, unref as t, createElementVNode as n, withCtx as v, renderList as E, createBlock as w, resolveDynamicComponent as H, toDisplayString as d, createCommentVNode as q, h as z } from "vue";
|
|
2
|
-
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as J, components as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as W } from "./plugins-DtakupKW.js";
|
|
5
|
-
import { u as X } from "./loading-kIQFOTwH.js";
|
|
6
|
-
import { u as Y } from "./business-DjnN-J4U.js";
|
|
7
|
-
import { u as Z } from "./campaign-BHNS5kXt.js";
|
|
8
|
-
import { a as B, b as A, g as ee } from "./campaign-BpJ1O6KS.js";
|
|
9
|
-
import { u as te } from "./vue-i18n-DKh0SMhL.js";
|
|
10
|
-
import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
11
|
-
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DjgACf9F.js";
|
|
12
|
-
import { u as ne } from "./template-WI4a-lFY.js";
|
|
13
|
-
import { c as _ } from "./index-DyYF6HYL.js";
|
|
14
|
-
const se = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, pe = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { key: 0 }, ge = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ N({
|
|
15
|
-
__name: "Broadcast",
|
|
16
|
-
setup(be) {
|
|
17
|
-
const { t: s } = te(), V = {
|
|
18
|
-
label: s("connect.campaign.common.createCampaign"),
|
|
19
|
-
value: "create",
|
|
20
|
-
isPrimary: !0,
|
|
21
|
-
prependIcon: "add"
|
|
22
|
-
}, D = ne("BROADCAST", J()), R = Y(), m = Z(), { global: L, minor: C } = X, T = h((/* @__PURE__ */ new Date()).toISOString()), c = h({
|
|
23
|
-
searchKey: "",
|
|
24
|
-
location: null
|
|
25
|
-
}), f = U(
|
|
26
|
-
() => m.campaigns.broadcast.filter(
|
|
27
|
-
(e) => !c.value.location || !e.targetLocation || e.targetLocation.includes(c.value.location)
|
|
28
|
-
)
|
|
29
|
-
), I = [
|
|
30
|
-
{
|
|
31
|
-
header: "Broadcast title",
|
|
32
|
-
accessorFn: (e) => e.name
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
header: "Status",
|
|
36
|
-
accessorFn: (e) => ee(e),
|
|
37
|
-
cell(e) {
|
|
38
|
-
return B(e.row.original);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
header: "Summary",
|
|
43
|
-
accessorFn: (e) => A(e)
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
header: "Message sent",
|
|
47
|
-
accessorFn: (e) => e.currentReceive ?? "N/A"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
header: "Actions",
|
|
51
|
-
cell(e) {
|
|
52
|
-
return z(Q.FmButton, {
|
|
53
|
-
variant: "tertiary",
|
|
54
|
-
icon: "delete",
|
|
55
|
-
iconColor: "neutral-gray-400",
|
|
56
|
-
onClick: (o) => {
|
|
57
|
-
o.stopPropagation(), S(e.row.original);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
], x = h();
|
|
63
|
-
async function S(e) {
|
|
64
|
-
await W.remove(
|
|
65
|
-
s("connect.campaign.common.remove.confirm", { name: e.name })
|
|
66
|
-
) && await C(
|
|
67
|
-
async () => {
|
|
68
|
-
await _.delete(e._id), await m.read("BROADCAST");
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
message: s("connect.campaign.common.remove.removing", { name: e.name }),
|
|
72
|
-
successMessage: s("connect.campaign.common.remove.removed", {
|
|
73
|
-
name: e.name
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
async function g(e) {
|
|
79
|
-
T.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await o() : D.open(async (p) => {
|
|
80
|
-
await o(p);
|
|
81
|
-
});
|
|
82
|
-
async function o(p) {
|
|
83
|
-
var u;
|
|
84
|
-
(u = x.value) == null || u.showSheet(
|
|
85
|
-
!0,
|
|
86
|
-
"BROADCAST",
|
|
87
|
-
e ? await _.readById(e._id) : void 0,
|
|
88
|
-
p
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
async function K(e) {
|
|
93
|
-
await C(
|
|
94
|
-
async () => {
|
|
95
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("BROADCAST");
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
message: s(
|
|
99
|
-
`connect.campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
|
|
100
|
-
),
|
|
101
|
-
successMessage: s("connect.campaign.broadcast.update.success", {
|
|
102
|
-
action: e.campaign._id ? "updated" : "created"
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
return j(async () => {
|
|
108
|
-
await L(async () => {
|
|
109
|
-
await m.read("BROADCAST");
|
|
110
|
-
});
|
|
111
|
-
}), (e, o) => {
|
|
112
|
-
const p = r("FmPageHead"), u = r("FmSearch"), O = r("FmTable"), F = r("FmButton"), $ = r("FmListItem"), P = r("FmList"), M = r("FmCard");
|
|
113
|
-
return l(), y(b, null, [
|
|
114
|
-
i(p, {
|
|
115
|
-
title: t(s)("connect.campaign.broadcast.title"),
|
|
116
|
-
actions: t(f).length > 0 ? [V] : [],
|
|
117
|
-
"onClick:action": o[0] || (o[0] = () => g())
|
|
118
|
-
}, null, 8, ["title", "actions"]),
|
|
119
|
-
n("div", se, [
|
|
120
|
-
i(u, {
|
|
121
|
-
modelValue: t(c).searchKey,
|
|
122
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(c).searchKey = a),
|
|
123
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
124
|
-
placeholder: t(s)("connect.campaign.common.search"),
|
|
125
|
-
collapsible: ""
|
|
126
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
127
|
-
t(m).campaigns.broadcast && t(m).campaigns.broadcast.length > 0 ? (l(), y(b, { key: 0 }, [
|
|
128
|
-
n("div", ce, [
|
|
129
|
-
n("div", ie, [
|
|
130
|
-
i(oe, {
|
|
131
|
-
modelValue: t(c).location,
|
|
132
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(c).location = a),
|
|
133
|
-
label: `${t(s)("connect.campaign.common.location")}: `,
|
|
134
|
-
"show-item-label": !0,
|
|
135
|
-
icon: "storefront",
|
|
136
|
-
placement: "bottom-start",
|
|
137
|
-
items: t(R).locationItems
|
|
138
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
139
|
-
]),
|
|
140
|
-
i(u, {
|
|
141
|
-
modelValue: t(c).searchKey,
|
|
142
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(c).searchKey = a),
|
|
143
|
-
class: "xs:hidden",
|
|
144
|
-
placeholder: "search",
|
|
145
|
-
collapsible: ""
|
|
146
|
-
}, null, 8, ["modelValue"])
|
|
147
|
-
]),
|
|
148
|
-
i(O, {
|
|
149
|
-
class: "xs:hidden",
|
|
150
|
-
"row-data": t(f),
|
|
151
|
-
"column-defs": I,
|
|
152
|
-
"search-value": t(c).searchKey,
|
|
153
|
-
"column-filter": [],
|
|
154
|
-
onRowClick: o[4] || (o[4] = (a) => g(a.original)),
|
|
155
|
-
"hide-footer": !0
|
|
156
|
-
}, null, 8, ["row-data", "search-value"]),
|
|
157
|
-
i(P, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
158
|
-
default: v(() => [
|
|
159
|
-
(l(!0), y(b, null, E(t(f).filter(
|
|
160
|
-
(a) => a.name.toLowerCase().includes(t(c).searchKey.toLowerCase())
|
|
161
|
-
), (a) => (l(), w($, {
|
|
162
|
-
key: a._id.toString(),
|
|
163
|
-
onClick: (k) => g(a),
|
|
164
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
165
|
-
}, {
|
|
166
|
-
default: v(() => [
|
|
167
|
-
n("div", re, [
|
|
168
|
-
n("div", le, [
|
|
169
|
-
(l(), w(H(t(B)(a)))),
|
|
170
|
-
n("div", me, d(a.currentReceive ?? 0) + " sent ", 1)
|
|
171
|
-
]),
|
|
172
|
-
n("div", de, [
|
|
173
|
-
n("div", pe, d(a.name), 1),
|
|
174
|
-
n("div", ue, d(t(A)(a)), 1)
|
|
175
|
-
])
|
|
176
|
-
]),
|
|
177
|
-
i(F, {
|
|
178
|
-
icon: "delete",
|
|
179
|
-
"icon-color": "neutral-gray-400",
|
|
180
|
-
variant: "tertiary",
|
|
181
|
-
onClick: (k) => (k.stopPropagation(), S(a))
|
|
182
|
-
}, null, 8, ["onClick"])
|
|
183
|
-
]),
|
|
184
|
-
_: 2
|
|
185
|
-
}, 1032, ["onClick"]))), 128))
|
|
186
|
-
]),
|
|
187
|
-
_: 1
|
|
188
|
-
}),
|
|
189
|
-
t(f).length == 0 ? (l(), y("div", fe, [
|
|
190
|
-
n("div", ge, d(t(s)("connect.campaign.common.noResults")), 1)
|
|
191
|
-
])) : q("", !0)
|
|
192
|
-
], 64)) : (l(), w(M, {
|
|
193
|
-
key: 1,
|
|
194
|
-
variant: "outlined",
|
|
195
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
196
|
-
}, {
|
|
197
|
-
default: v(() => [
|
|
198
|
-
o[6] || (o[6] = n("img", {
|
|
199
|
-
src: G,
|
|
200
|
-
class: "aspect-square w-[150px]"
|
|
201
|
-
}, null, -1)),
|
|
202
|
-
n("div", ye, [
|
|
203
|
-
n("div", _e, d(t(s)("connect.campaign.broadcast.create.title")), 1),
|
|
204
|
-
n("div", he, d(t(s)("connect.campaign.broadcast.create.description")), 1)
|
|
205
|
-
]),
|
|
206
|
-
i(F, {
|
|
207
|
-
variant: "primary",
|
|
208
|
-
label: t(s)("connect.campaign.broadcast.create.button"),
|
|
209
|
-
icon: "add",
|
|
210
|
-
onClick: o[5] || (o[5] = (a) => g())
|
|
211
|
-
}, null, 8, ["label"])
|
|
212
|
-
]),
|
|
213
|
-
_: 1
|
|
214
|
-
})),
|
|
215
|
-
i(ae, {
|
|
216
|
-
ref_key: "sheetRef",
|
|
217
|
-
ref: x,
|
|
218
|
-
"onSubmit:modelValue": K
|
|
219
|
-
}, null, 512)
|
|
220
|
-
])
|
|
221
|
-
], 64);
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
export {
|
|
226
|
-
Te as default
|
|
227
|
-
};
|
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
var ae = Object.defineProperty;
|
|
2
|
-
var le = (g, i, d) => i in g ? ae(g, i, { enumerable: !0, configurable: !0, writable: !0, value: d }) : g[i] = d;
|
|
3
|
-
var O = (g, i, d) => le(g, typeof i != "symbol" ? i + "" : i, d);
|
|
4
|
-
import { defineComponent as J, ref as f, computed as Q, watch as K, resolveComponent as u, openBlock as y, createBlock as z, unref as o, isRef as j, withCtx as I, createElementVNode as h, createVNode as r, createElementBlock as N, Fragment as P, renderList as ne, createCommentVNode as R, onMounted as se, h as S } from "vue";
|
|
5
|
-
import { h as G } from "./moment-BWErdI6_.js";
|
|
6
|
-
import { components as H } from "@feedmepos/ui-library";
|
|
7
|
-
import "./index-DGKlRWn3.js";
|
|
8
|
-
import { J as re } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
-
import { u as W } from "./loading-kIQFOTwH.js";
|
|
10
|
-
import { u as ie } from "./app-wDQR6dpb.js";
|
|
11
|
-
import { useRoute as X, useRouter as ue } from "vue-router";
|
|
12
|
-
import { c as q } from "./index-DyYF6HYL.js";
|
|
13
|
-
import { e as p } from "./index-vh86FiIQ.js";
|
|
14
|
-
import { u as Y, w as de } from "./xlsx-BDBzdOuM.js";
|
|
15
|
-
import { u as ce, _ as me } from "./usePagination-BeF5K3M7.js";
|
|
16
|
-
import { a as pe } from "./plugins-DtakupKW.js";
|
|
17
|
-
import { m as fe } from "./index-hJUxCNsF.js";
|
|
18
|
-
import { o as ge } from "./objectId-dwaoBfJX.js";
|
|
19
|
-
const be = { class: "space-y-16" }, Ce = { class: "gap-16 grid grid-cols-2" }, ve = { class: "flex items-center gap-8" }, he = /* @__PURE__ */ J({
|
|
20
|
-
__name: "CreateCollectionSheet",
|
|
21
|
-
emits: ["success"],
|
|
22
|
-
setup(g, { expose: i, emit: d }) {
|
|
23
|
-
const { minor: w } = W, F = X(), k = f(), _ = f(!1), A = d, b = f(!1);
|
|
24
|
-
function D(s) {
|
|
25
|
-
b.value = s, s && (a.value = {
|
|
26
|
-
quantity: 1,
|
|
27
|
-
code: "",
|
|
28
|
-
codeConfig: {
|
|
29
|
-
length: 8,
|
|
30
|
-
charset: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
31
|
-
prefix: "",
|
|
32
|
-
suffix: "",
|
|
33
|
-
pattern: "########"
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
const a = f({
|
|
38
|
-
quantity: 1,
|
|
39
|
-
code: "",
|
|
40
|
-
codeConfig: {
|
|
41
|
-
length: 8,
|
|
42
|
-
charset: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
43
|
-
prefix: "",
|
|
44
|
-
suffix: "",
|
|
45
|
-
pattern: "########"
|
|
46
|
-
}
|
|
47
|
-
}), E = [
|
|
48
|
-
{
|
|
49
|
-
label: "Bulk codes",
|
|
50
|
-
value: "bulk",
|
|
51
|
-
sublabel: "Bulk generate unique codes"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: "Custom code",
|
|
55
|
-
value: "single",
|
|
56
|
-
sublabel: "Enter your own custom codes"
|
|
57
|
-
}
|
|
58
|
-
], U = [
|
|
59
|
-
{
|
|
60
|
-
label: "Alphanumeric",
|
|
61
|
-
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
label: "Alphabetic",
|
|
65
|
-
value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
66
|
-
},
|
|
67
|
-
{ label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
|
|
68
|
-
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
69
|
-
{ label: "Numbers", value: "0123456789" },
|
|
70
|
-
{ label: "Custom", value: "" }
|
|
71
|
-
], x = f(U[0].value), c = f("bulk"), V = f(!1), M = Q(() => F.params.id);
|
|
72
|
-
async function n(s) {
|
|
73
|
-
var e;
|
|
74
|
-
await ((e = k.value) == null ? void 0 : e.validateInputs()), _.value && await w(
|
|
75
|
-
async () => {
|
|
76
|
-
await q.createCollectionByCampaignId(M.value, s), await A("success");
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
message: "Creating claim(s)",
|
|
80
|
-
successMessage: "Claim(s) created"
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
i({
|
|
85
|
-
showSheet: D
|
|
86
|
-
}), K(
|
|
87
|
-
() => c.value,
|
|
88
|
-
(s, e) => {
|
|
89
|
-
e != s && (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 = "########");
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
function l(s) {
|
|
93
|
-
if (c.value !== "single") return !1;
|
|
94
|
-
const e = s.split(`
|
|
95
|
-
`).map((v) => v.trim()).filter(Boolean);
|
|
96
|
-
return new Set(e).size !== e.length;
|
|
97
|
-
}
|
|
98
|
-
function C(s) {
|
|
99
|
-
return /[ \t]/.test(s);
|
|
100
|
-
}
|
|
101
|
-
return K(
|
|
102
|
-
() => a.value.codeConfig.length,
|
|
103
|
-
(s, e) => {
|
|
104
|
-
s != e && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(s))));
|
|
105
|
-
}
|
|
106
|
-
), (s, e) => {
|
|
107
|
-
const v = u("FmRadio"), L = u("FmRadioGroup"), m = u("FmSwitch"), T = u("FmStepperField"), Z = u("FmSelect"), B = u("FmTextField"), ee = u("FmTextarea"), oe = u("FmForm"), $ = u("FmButton"), te = u("FmSideSheet");
|
|
108
|
-
return y(), z(te, {
|
|
109
|
-
"max-width": 560,
|
|
110
|
-
"dismiss-away": !0,
|
|
111
|
-
header: "Create collection",
|
|
112
|
-
modelValue: o(b),
|
|
113
|
-
"onUpdate:modelValue": [
|
|
114
|
-
e[14] || (e[14] = (t) => j(b) ? b.value = t : null),
|
|
115
|
-
e[15] || (e[15] = (t) => b.value = t)
|
|
116
|
-
]
|
|
117
|
-
}, {
|
|
118
|
-
"side-sheet-footer": I(() => [
|
|
119
|
-
h("div", ve, [
|
|
120
|
-
r($, {
|
|
121
|
-
label: "Save",
|
|
122
|
-
onClick: e[12] || (e[12] = (t) => n(o(a))),
|
|
123
|
-
loading: o(ie)().isLoading
|
|
124
|
-
}, null, 8, ["loading"]),
|
|
125
|
-
r($, {
|
|
126
|
-
label: "Cancel",
|
|
127
|
-
type: "button",
|
|
128
|
-
variant: "tertiary",
|
|
129
|
-
onClick: e[13] || (e[13] = (t) => b.value = !1)
|
|
130
|
-
})
|
|
131
|
-
])
|
|
132
|
-
]),
|
|
133
|
-
default: I(() => [
|
|
134
|
-
r(re, { json: o(a) }, null, 8, ["json"]),
|
|
135
|
-
r(oe, {
|
|
136
|
-
ref_key: "form",
|
|
137
|
-
ref: k,
|
|
138
|
-
class: "space-y-40",
|
|
139
|
-
onValidationSuccess: e[10] || (e[10] = (t) => _.value = !0),
|
|
140
|
-
onValidationFailed: e[11] || (e[11] = (t) => _.value = !1)
|
|
141
|
-
}, {
|
|
142
|
-
default: I(() => [
|
|
143
|
-
h("div", null, [
|
|
144
|
-
e[16] || (e[16] = h("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
|
|
145
|
-
r(L, {
|
|
146
|
-
modelValue: o(c),
|
|
147
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) => j(c) ? c.value = t : null),
|
|
148
|
-
inline: !1
|
|
149
|
-
}, {
|
|
150
|
-
default: I(() => [
|
|
151
|
-
(y(), N(P, null, ne(E, (t) => r(v, {
|
|
152
|
-
key: t.value,
|
|
153
|
-
value: t.value,
|
|
154
|
-
label: t.label,
|
|
155
|
-
sublabel: t.sublabel
|
|
156
|
-
}, null, 8, ["value", "label", "sublabel"])), 64))
|
|
157
|
-
]),
|
|
158
|
-
_: 1
|
|
159
|
-
}, 8, ["modelValue"])
|
|
160
|
-
]),
|
|
161
|
-
h("div", be, [
|
|
162
|
-
e[17] || (e[17] = h("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
|
|
163
|
-
o(c) === "bulk" ? (y(), N(P, { key: 0 }, [
|
|
164
|
-
r(m, {
|
|
165
|
-
"model-value": o(V),
|
|
166
|
-
"label-placement": "right",
|
|
167
|
-
value: "true",
|
|
168
|
-
label: "Advance code setting",
|
|
169
|
-
required: !0,
|
|
170
|
-
"onUpdate:modelValue": e[1] || (e[1] = () => V.value = !o(V))
|
|
171
|
-
}, null, 8, ["model-value"]),
|
|
172
|
-
o(V) ? (y(), N(P, { key: 0 }, [
|
|
173
|
-
r(T, {
|
|
174
|
-
modelValue: o(a).codeConfig.length,
|
|
175
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) => o(a).codeConfig.length = t),
|
|
176
|
-
label: "Code length",
|
|
177
|
-
max: 16,
|
|
178
|
-
min: 1,
|
|
179
|
-
rules: [
|
|
180
|
-
(t) => Number(t) >= 1 || "Code length must at least 1",
|
|
181
|
-
(t) => Number(t) <= 16 || "Code length must less than 16"
|
|
182
|
-
],
|
|
183
|
-
required: !0
|
|
184
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
185
|
-
r(Z, {
|
|
186
|
-
label: "Charset",
|
|
187
|
-
"model-value": o(x),
|
|
188
|
-
items: U,
|
|
189
|
-
"helper-text": o(a).codeConfig.charset.length > 62 ? `${o(a).codeConfig.charset.substring(0, 62)}...` : o(a).codeConfig.charset,
|
|
190
|
-
"onUpdate:modelValue": e[3] || (e[3] = (t) => {
|
|
191
|
-
x.value = t, o(a).codeConfig.charset = t;
|
|
192
|
-
})
|
|
193
|
-
}, null, 8, ["model-value", "helper-text"]),
|
|
194
|
-
o(x) === "" ? (y(), z(B, {
|
|
195
|
-
key: 0,
|
|
196
|
-
modelValue: o(a).codeConfig.charset,
|
|
197
|
-
"onUpdate:modelValue": e[4] || (e[4] = (t) => o(a).codeConfig.charset = t),
|
|
198
|
-
label: "Custom Charset",
|
|
199
|
-
required: ""
|
|
200
|
-
}, null, 8, ["modelValue"])) : R("", !0),
|
|
201
|
-
h("div", Ce, [
|
|
202
|
-
r(B, {
|
|
203
|
-
modelValue: o(a).codeConfig.prefix,
|
|
204
|
-
"onUpdate:modelValue": e[5] || (e[5] = (t) => o(a).codeConfig.prefix = t),
|
|
205
|
-
label: "Prefix (Optional)"
|
|
206
|
-
}, null, 8, ["modelValue"]),
|
|
207
|
-
r(B, {
|
|
208
|
-
modelValue: o(a).codeConfig.suffix,
|
|
209
|
-
"onUpdate:modelValue": e[6] || (e[6] = (t) => o(a).codeConfig.suffix = t),
|
|
210
|
-
label: "Suffix (Optional)"
|
|
211
|
-
}, null, 8, ["modelValue"])
|
|
212
|
-
]),
|
|
213
|
-
r(B, {
|
|
214
|
-
modelValue: o(a).codeConfig.pattern,
|
|
215
|
-
"onUpdate:modelValue": e[7] || (e[7] = (t) => o(a).codeConfig.pattern = t),
|
|
216
|
-
label: "Pattern",
|
|
217
|
-
required: !0
|
|
218
|
-
}, null, 8, ["modelValue"])
|
|
219
|
-
], 64)) : R("", !0),
|
|
220
|
-
r(B, {
|
|
221
|
-
modelValue: o(a).quantity,
|
|
222
|
-
"onUpdate:modelValue": e[8] || (e[8] = (t) => o(a).quantity = t),
|
|
223
|
-
label: "Number of code",
|
|
224
|
-
rules: [
|
|
225
|
-
(t) => t >= 1 || "Quantity cannot be less than 1",
|
|
226
|
-
(t) => t <= 1e4 || "Quantity cannot more than 10,000"
|
|
227
|
-
],
|
|
228
|
-
required: !0,
|
|
229
|
-
"helper-text": `${o(a).quantity} claim will be created`
|
|
230
|
-
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
231
|
-
], 64)) : R("", !0),
|
|
232
|
-
o(c) !== "bulk" ? (y(), z(ee, {
|
|
233
|
-
key: 1,
|
|
234
|
-
modelValue: o(a).code,
|
|
235
|
-
"onUpdate:modelValue": e[9] || (e[9] = (t) => o(a).code = t),
|
|
236
|
-
label: "Custom Code",
|
|
237
|
-
rules: [
|
|
238
|
-
(t) => o(c) != "single" || !!t || "Custom code is required",
|
|
239
|
-
(t) => !l(t) || "Custom code must be unique",
|
|
240
|
-
(t) => !C(t) || "Custom code must not contain space"
|
|
241
|
-
],
|
|
242
|
-
placeholder: "(For multiple codes, please enter in the new row.)"
|
|
243
|
-
}, null, 8, ["modelValue", "rules"])) : R("", !0)
|
|
244
|
-
])
|
|
245
|
-
]),
|
|
246
|
-
_: 1
|
|
247
|
-
}, 512)
|
|
248
|
-
]),
|
|
249
|
-
_: 1
|
|
250
|
-
}, 8, ["modelValue"]);
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
class xe {
|
|
255
|
-
constructor() {
|
|
256
|
-
O(this, "data", []);
|
|
257
|
-
}
|
|
258
|
-
addRecord(i) {
|
|
259
|
-
this.data.push(i);
|
|
260
|
-
}
|
|
261
|
-
buildExcel() {
|
|
262
|
-
const i = Y.book_new(), d = Y.json_to_sheet(this.data);
|
|
263
|
-
return Y.book_append_sheet(i, d, "Collection"), i;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
const ye = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ve = { class: "flex items-center justify-end py-4 xs:hidden" }, Le = /* @__PURE__ */ J({
|
|
267
|
-
__name: "Collections",
|
|
268
|
-
setup(g) {
|
|
269
|
-
const i = ue(), d = X(), w = f(), F = Q(() => d.params.id), k = f(!1), { custom: _ } = W, A = [
|
|
270
|
-
{
|
|
271
|
-
header: "ID/Code",
|
|
272
|
-
accessorKey: "_id",
|
|
273
|
-
cell(n) {
|
|
274
|
-
return S("div", { class: "flex items-center" }, [
|
|
275
|
-
S(H.FmIcon, {
|
|
276
|
-
name: "content_copy",
|
|
277
|
-
outline: !0,
|
|
278
|
-
size: "sm",
|
|
279
|
-
class: "cursor-pointer mr-4",
|
|
280
|
-
onClick: (l) => {
|
|
281
|
-
l.preventDefault(), l.stopPropagation(), pe(
|
|
282
|
-
n.row.original.code || n.row.original._id.toString()
|
|
283
|
-
);
|
|
284
|
-
}
|
|
285
|
-
}),
|
|
286
|
-
S(
|
|
287
|
-
"div",
|
|
288
|
-
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
289
|
-
n.row.original.code || n.row.original._id.toString()
|
|
290
|
-
)
|
|
291
|
-
]);
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
header: "User",
|
|
296
|
-
accessorKey: "user",
|
|
297
|
-
enableSorting: !1,
|
|
298
|
-
cell(n) {
|
|
299
|
-
const l = n.row.original.pf_user;
|
|
300
|
-
return S(
|
|
301
|
-
"div",
|
|
302
|
-
{
|
|
303
|
-
class: "flex items-center gap-x-8"
|
|
304
|
-
},
|
|
305
|
-
[
|
|
306
|
-
S(H.FmAvatar, {
|
|
307
|
-
name: l != null && l.photoUrl || l == null ? void 0 : l.name,
|
|
308
|
-
src: (l == null ? void 0 : l.photoUrl) ?? void 0,
|
|
309
|
-
size: "sm"
|
|
310
|
-
}),
|
|
311
|
-
S("span", l == null ? void 0 : l.name)
|
|
312
|
-
]
|
|
313
|
-
);
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
header: "Phone",
|
|
318
|
-
accessorFn: (n) => {
|
|
319
|
-
var l;
|
|
320
|
-
return ((l = n.pf_user) == null ? void 0 : l.phoneNumber) || "-";
|
|
321
|
-
},
|
|
322
|
-
accessorKey: "pf_user.phoneNumber"
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
header: "Balance",
|
|
326
|
-
accessorKey: "balance"
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
header: "Created at",
|
|
330
|
-
accessorKey: "_id",
|
|
331
|
-
accessorFn: (n) => G(ge(n._id.toString())).format("DD MMM YYYY")
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
header: "Nearest expired at",
|
|
335
|
-
accessorKey: "expiryBalance",
|
|
336
|
-
accessorFn: (n) => {
|
|
337
|
-
var l;
|
|
338
|
-
return n.expiryBalance && n.expiryBalance.length ? G((l = n.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
], b = {
|
|
342
|
-
"$connect-STORE_REWARD_COLLECTIONS": fe.readCollectionsByRewardId,
|
|
343
|
-
"$connect-CAMPAIGN_VOUCHER_COLLECTIONS": q.readCollectionsByCampaignId
|
|
344
|
-
}, D = (n) => {
|
|
345
|
-
const l = b[d.name];
|
|
346
|
-
return (C) => l(n, C);
|
|
347
|
-
}, { tableMeta: a, rowData: E, onSort: U, debouncedFetchData: x, onSearch: c } = ce(D(F.value));
|
|
348
|
-
async function V() {
|
|
349
|
-
var n;
|
|
350
|
-
await x(), (n = w.value) == null || n.showSheet(!1);
|
|
351
|
-
}
|
|
352
|
-
async function M() {
|
|
353
|
-
k.value || _(
|
|
354
|
-
async () => {
|
|
355
|
-
var s;
|
|
356
|
-
const n = new xe(), l = (await q.readCollectionsByCampaignId(F.value, {
|
|
357
|
-
limit: 1,
|
|
358
|
-
skip: 0,
|
|
359
|
-
sortBy: p.sortBy,
|
|
360
|
-
descending: p.descending
|
|
361
|
-
})).meta.totalResources ?? 0, C = p.rowsPerPage;
|
|
362
|
-
for (let e = 0; e < l; e += C) {
|
|
363
|
-
const v = {
|
|
364
|
-
...p,
|
|
365
|
-
limit: C,
|
|
366
|
-
skip: p.page - 1,
|
|
367
|
-
sortBy: p.sortBy,
|
|
368
|
-
descending: p.descending
|
|
369
|
-
}, L = await q.readCollectionsByCampaignId(
|
|
370
|
-
F.value,
|
|
371
|
-
v
|
|
372
|
-
);
|
|
373
|
-
for await (const m of L.resources) {
|
|
374
|
-
const T = {
|
|
375
|
-
Id: (m == null ? void 0 : m.code) || ((s = m._id) == null ? void 0 : s.toString()) || "",
|
|
376
|
-
Balance: (m == null ? void 0 : m.balance) || 0
|
|
377
|
-
};
|
|
378
|
-
n.addRecord(T);
|
|
379
|
-
}
|
|
380
|
-
p.page++;
|
|
381
|
-
}
|
|
382
|
-
await de(
|
|
383
|
-
n.buildExcel(),
|
|
384
|
-
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
385
|
-
{
|
|
386
|
-
bookType: "xlsx",
|
|
387
|
-
bookSST: !1,
|
|
388
|
-
type: "array"
|
|
389
|
-
}
|
|
390
|
-
), p.page = 1;
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
isLoading: k
|
|
394
|
-
}
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
return se(async () => {
|
|
398
|
-
await x();
|
|
399
|
-
}), (n, l) => {
|
|
400
|
-
const C = u("FmPageHead"), s = u("FmSearch");
|
|
401
|
-
return y(), N(P, null, [
|
|
402
|
-
r(C, {
|
|
403
|
-
title: "Collections",
|
|
404
|
-
"back-button": !0,
|
|
405
|
-
actions: [
|
|
406
|
-
{ label: "Export", value: "export", isPrimary: !1 },
|
|
407
|
-
{
|
|
408
|
-
label: "Create collection",
|
|
409
|
-
value: "create",
|
|
410
|
-
isPrimary: !0
|
|
411
|
-
}
|
|
412
|
-
],
|
|
413
|
-
"onClick:back": l[0] || (l[0] = (e) => o(i).back()),
|
|
414
|
-
"onClick:action": l[1] || (l[1] = (e) => {
|
|
415
|
-
var v;
|
|
416
|
-
e === "create" && ((v = o(w)) == null || v.showSheet(!0)), e === "export" && M();
|
|
417
|
-
})
|
|
418
|
-
}),
|
|
419
|
-
h("div", ye, [
|
|
420
|
-
r(s, {
|
|
421
|
-
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
422
|
-
modelValue: o(a).searchValue,
|
|
423
|
-
"onUpdate:modelValue": [
|
|
424
|
-
l[2] || (l[2] = (e) => o(a).searchValue = e),
|
|
425
|
-
o(c)
|
|
426
|
-
],
|
|
427
|
-
placeholder: "Search",
|
|
428
|
-
collapsible: ""
|
|
429
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
430
|
-
h("div", Ve, [
|
|
431
|
-
r(s, {
|
|
432
|
-
modelValue: o(a).searchValue,
|
|
433
|
-
"onUpdate:modelValue": [
|
|
434
|
-
l[3] || (l[3] = (e) => o(a).searchValue = e),
|
|
435
|
-
o(c)
|
|
436
|
-
],
|
|
437
|
-
placeholder: "Search",
|
|
438
|
-
collapsible: ""
|
|
439
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
440
|
-
]),
|
|
441
|
-
r(me, {
|
|
442
|
-
loading: o(a).isLoading,
|
|
443
|
-
"row-data": o(E),
|
|
444
|
-
"column-defs": A,
|
|
445
|
-
"row-count": o(a).totalRows,
|
|
446
|
-
"page-count": o(a).pageCount,
|
|
447
|
-
"page-index": o(a).pageIndex,
|
|
448
|
-
"page-size": o(a).pageSize,
|
|
449
|
-
"shrink-at": !1,
|
|
450
|
-
onSortChange: o(U),
|
|
451
|
-
onPageChange: l[4] || (l[4] = (e) => o(x)({ pageSize: e.pageSize, pageIndex: e.pageIndex }))
|
|
452
|
-
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
453
|
-
r(he, {
|
|
454
|
-
ref_key: "sheetRef",
|
|
455
|
-
ref: w,
|
|
456
|
-
onSuccess: V
|
|
457
|
-
}, null, 512)
|
|
458
|
-
])
|
|
459
|
-
], 64);
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
});
|
|
463
|
-
export {
|
|
464
|
-
Le as default
|
|
465
|
-
};
|