@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.80
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-CJap-Cat.js → Analytic-LOK5TzX0.js} +31 -32
- package/dist/{App-CLTtX1QT.js → App-Bk5Z5u5_.js} +617 -607
- package/dist/AuditLogs-Rezf9EeA.js +1991 -0
- package/dist/{Bin-C2xMLxoE.js → Bin-B8yzS5bD.js} +10 -10
- package/dist/Broadcast-CZ0QCvua.js +266 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-iJQS2Ck9.js} +6 -6
- package/dist/{Card-BPrCNLQy.js → Card-BQOv5yB9.js} +145 -140
- package/dist/Collections-qenPlCd2.js +540 -0
- package/dist/Credit-BJLskbVu.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-DKWCWOU_.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dw1qQfnG.js +351 -0
- package/dist/Experience-BjfEiGT8.js +259 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-C013Tr1o.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-Gw_tFjen.js +330 -0
- package/dist/Grab-Bdv7SaB9.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-Ba4L39GL.js} +49 -48
- package/dist/{Index-DMdNgISh.js → Index-C67U3YDJ.js} +54 -54
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-pQ8sF5KW.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-o-eN3J4i.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-DPjqCyJ5.js} +1 -1
- package/dist/Marketing-DtEooXof.js +166 -0
- package/dist/MarketingMaterialEdit-Balw055Y.js +1065 -0
- package/dist/{Member-CnSXGQi_.js → Member-QA7TQnyw.js} +38 -37
- package/dist/{MemberList-DcpEKV1D.js → MemberList-CSJQFYlh.js} +486 -491
- package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-D-46vda_.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-6a7_lw74.js} +13443 -10607
- package/dist/Mission-DJVxFbX5.js +334 -0
- package/dist/{Overview-elpi-jpI.js → Overview-Btkh3oiI.js} +24 -25
- package/dist/Point-CVdF9GtN.js +262 -0
- package/dist/Promotion-BtmlvUd3.js +396 -0
- package/dist/{Queue-GvBhNEFe.js → Queue-BfiCMsLC.js} +23 -24
- package/dist/{Record-CbSxgo8i.js → Record-B07QGPli.js} +10 -10
- package/dist/Review-BeZ90jW9.js +621 -0
- package/dist/ReviewFacebookCallback-CwAcKaib.js +243 -0
- package/dist/ReviewGoogleCallback-CVK6Yc5E.js +213 -0
- package/dist/{Reward-QCGlrq89.js → Reward-CyXqNpAa.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-BICsdgSh.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BgKGNK7y.js +1912 -0
- package/dist/{Segment-5PndnEUa.js → Segment-B9g57O7g.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-BwDOXE87.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DXDcJLYF.js} +12 -12
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CROBk6cD.js +226 -0
- package/dist/Setting-BHteqZv6.js +2039 -0
- package/dist/SettingAdvertisements-CubrbuSL.js +264 -0
- package/dist/Store-u6LYUnmp.js +1996 -0
- package/dist/StoreRewards-D9h0YnEx.js +535 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-vrYqDGOa.js +1129 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-WgNstmNx.js +7007 -0
- package/dist/{Tier-BKKxG29r.js → Tier-CBdi4sPT.js} +561 -480
- package/dist/{Title-CReZgw8V.js → Title-BegmN7hs.js} +151 -149
- package/dist/{Transaction-HWCmSVaJ.js → Transaction-C6XMd9_r.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BBf4BP4m.js} +7 -7
- package/dist/Voucher-D6hSas_z.js +421 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-ZOlAZ_q5.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bs8TNiCY.js} +2 -2
- package/dist/app-Duwed9mD.js +59309 -0
- package/dist/app.js +1 -1
- package/dist/{business-Bc-EMd2p.js → business-6oZ8Rgui.js} +11 -8
- package/dist/campaign-CzenWLhs.js +219 -0
- package/dist/campaign-PYce7g0o.js +253 -0
- package/dist/campaign.enum-KHniCp5a.js +26 -0
- package/dist/campaign.fn-dOSgHJcU.js +776 -0
- package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-BZA1DKIB.js} +1 -1
- package/dist/{collection.fn-AjDNdFe1.js → collection.fn-CyfrdKBf.js} +2 -2
- package/dist/dto-DYmM2ud_.js +222 -0
- package/dist/duplicateCampaign-BXaDK8Q6.js +51 -0
- package/dist/effect-DBI_JHbP.js +89 -0
- package/dist/{email-addresses-B0SzUCQM.js → email-addresses-BNs-WN79.js} +2 -2
- package/dist/{export-Bgz6WcNZ.js → export-DTCCKE2m.js} +4 -4
- package/dist/{helper-B1vFwohM.js → helper-CeYr7Anh.js} +22 -7
- package/dist/index-38u-cCwD.js +3431 -0
- package/dist/{index-Cm2sBagk.js → index-BdjY7GRO.js} +1 -1
- package/dist/index-CGMiuxyf.js +85 -0
- package/dist/index-CQZbm9P5.js +8912 -0
- package/dist/index-Cal60fAm.js +48 -0
- package/dist/{index-DT2viYsL.js → index-CnRLkzpg.js} +617 -191
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-CSQY21Zb.js → index-D-kPBF9C.js} +3 -3
- package/dist/{index-DVQnrex_.js → index-DcFYm1fy.js} +3 -3
- package/dist/index-DjONNxbl.js +30289 -0
- package/dist/{index-26SopNpv.js → index-ItaoypTr.js} +1 -1
- package/dist/index-_jxXI4_v.js +28899 -0
- package/dist/{index-DwT9RLst.js → index-nXfjG8UQ.js} +23 -12
- package/dist/{index-BIRmS75g.js → index-pHQfP2e7.js} +1 -1
- package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-CokFPnqn.js} +185 -185
- package/dist/{loading-C6Ouh0mG.js → loading-fZQi5zP8.js} +1 -1
- package/dist/{lodash-B5I3zXaY.js → lodash-R-DIRmbj.js} +1 -1
- package/dist/{membership-DU0BwIj8.js → membership-CApN5ZJ1.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-Bg7GuE5s.js → money-C6I6vVy2.js} +1 -1
- package/dist/{number-Ddmqo5D_.js → number-Dq4d381U.js} +1 -1
- package/dist/objectid-Kv5GREBk.js +145 -0
- package/dist/{campaign-BeF8kTyg.js → plugins-9_UvAdJ2.js} +784 -777
- package/dist/remy-NLAa-9Qg.js +46 -0
- package/dist/{reward-CN4gvn4c.js → reward-DXHGeGYY.js} +1 -1
- package/dist/{rule-CpiqqR0c.js → rule-B_XgRDr-.js} +505 -487
- package/dist/rule-builder-BMXyzu8k.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-CnyTUzQU.js +188 -0
- package/dist/timezone-Izs3ibB-.js +1156 -0
- package/dist/trigger-Dda3NmaE.js +213 -0
- package/dist/usePagination-Byxk4XVn.js +220 -0
- package/dist/user-BZxO8qdh.js +55 -0
- package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DDbkmbSf.js} +433 -433
- package/dist/{xlsx-qJHsnW7k.js → xlsx-D8yNl8dN.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-Xp7TePRP.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-DW4rwNOn.js +0 -1887
- package/dist/Broadcast-Dhc0j16O.js +0 -227
- package/dist/Collections-CsUJEmqz.js +0 -465
- package/dist/Credit-Mqa-0XJd.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-DWWLxIq-.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
- package/dist/Experience-BD5C3old.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-D4xsi8Ym.js +0 -278
- package/dist/Marketing-axcQYl8k.js +0 -20073
- package/dist/Mission-BHZiL-GH.js +0 -296
- package/dist/Point-gKvdggAl.js +0 -226
- package/dist/Promotion-7x2F_sFX.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
- package/dist/Setting-Cab47wfH.js +0 -1936
- package/dist/Store-BFL3T9B5.js +0 -1842
- package/dist/StoreRewards-C43dCJtM.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
- package/dist/Voucher-BhUAcPZg.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-BGaUIdCr.js +0 -7086
- package/dist/app-DccKBdW_.js +0 -33357
- package/dist/campaign-DbJZEU7P.js +0 -96
- package/dist/campaign.enum-PBKYGUQY.js +0 -20
- package/dist/campaign.fn-Cq-4LfQj.js +0 -758
- package/dist/dto-8NvMMYAb.js +0 -214
- package/dist/effect-DZhcEQ5g.js +0 -78
- package/dist/index-CQQedv0M.js +0 -32260
- package/dist/index-CTgQRqQR.js +0 -30038
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DGaywhpY.js +0 -76
- package/dist/index-DOfLDlI8.js +0 -8861
- package/dist/index-DVpAocyR.js +0 -3120
- package/dist/index-DlJGd8RC.js +0 -121
- package/dist/index-Dm65CTdy.js +0 -38
- package/dist/objectid-MCaJXAgq.js +0 -145
- package/dist/plugins-C-CRzeyC.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-DmkJng-x.js +0 -89
- package/dist/template-DTZgnkl5.js +0 -190
- package/dist/trigger-CPjJ73Rc.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-8VIt8A1x.js +0 -54
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as N, computed as f, ref as V, onMounted as H, resolveComponent as _, openBlock as c, createElementBlock as u, createVNode as i, withCtx as
|
|
2
|
-
import {
|
|
3
|
-
import "./index-
|
|
1
|
+
import { defineComponent as N, computed as f, ref as V, onMounted as H, resolveComponent as _, openBlock as c, createElementBlock as u, createVNode as i, withCtx as F, createElementVNode as p, toDisplayString as q, normalizeClass as A, Fragment as x, renderList as S, createCommentVNode as B } from "vue";
|
|
2
|
+
import { F as D } from "./app-Duwed9mD.js";
|
|
3
|
+
import "./index-DjONNxbl.js";
|
|
4
4
|
import { c as E } from "./object-qECH92oz.js";
|
|
5
|
-
const
|
|
5
|
+
const M = { class: "flex flex-col flex-nowrap" }, T = { class: "flex gap-16 items-center w-full" }, $ = { class: "flex grow items-center" }, z = { class: "grow text-fm-color-typo-secondary" }, K = { key: 0 }, J = { class: "px-16" }, X = /* @__PURE__ */ N({
|
|
6
6
|
__name: "SelectItems",
|
|
7
7
|
props: {
|
|
8
8
|
initialValue: {
|
|
@@ -22,8 +22,8 @@ const J = { class: "flex flex-col flex-nowrap" }, M = { class: "flex gap-16 item
|
|
|
22
22
|
default: 380
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const m =
|
|
25
|
+
setup(j, { expose: O }) {
|
|
26
|
+
const m = j, b = D(), w = f(() => b.menu.value || {
|
|
27
27
|
_id: "",
|
|
28
28
|
modules: {
|
|
29
29
|
catalog: [],
|
|
@@ -78,7 +78,7 @@ const J = { class: "flex flex-col flex-nowrap" }, M = { class: "flex gap-16 item
|
|
|
78
78
|
return n ? Object.entries(C.value).reduce((e, [t, l]) => {
|
|
79
79
|
if (l.name.toLowerCase().includes(n))
|
|
80
80
|
return e[t] = l, e;
|
|
81
|
-
const a = Object.entries(l.items).reduce((d, [
|
|
81
|
+
const a = Object.entries(l.items).reduce((d, [g, o]) => (o.name.toLowerCase().includes(n) && (d[g] = o), d), {});
|
|
82
82
|
return Object.keys(a).length > 0 && (e[t] = { ...l, items: a }), e;
|
|
83
83
|
}, {}) : C.value;
|
|
84
84
|
}), s = V({}), y = V(""), G = f(() => Object.values(s.value).filter((n) => !!n).length);
|
|
@@ -88,12 +88,12 @@ const J = { class: "flex flex-col flex-nowrap" }, M = { class: "flex gap-16 item
|
|
|
88
88
|
H(async () => {
|
|
89
89
|
await b.store.getMenu(), I(m.initialValue);
|
|
90
90
|
});
|
|
91
|
-
function
|
|
91
|
+
function h(n) {
|
|
92
92
|
const e = Object.keys(v.value[n].items), t = e.filter((l) => s.value[l]);
|
|
93
93
|
return t.length ? t.length === e.length ? !0 : null : !1;
|
|
94
94
|
}
|
|
95
95
|
function U(n) {
|
|
96
|
-
const e = Object.keys(v.value[n].items), t =
|
|
96
|
+
const e = Object.keys(v.value[n].items), t = h(n), l = E(s.value);
|
|
97
97
|
for (const a of e)
|
|
98
98
|
l[a] = t !== !0;
|
|
99
99
|
s.value = l;
|
|
@@ -107,21 +107,21 @@ const J = { class: "flex flex-col flex-nowrap" }, M = { class: "flex gap-16 item
|
|
|
107
107
|
m.onComplete(n);
|
|
108
108
|
}
|
|
109
109
|
}), (n, e) => {
|
|
110
|
-
const t = _("fm-button"), l = _("FmTextField"), a = _("fm-list-item"), d = _("fm-checkbox"),
|
|
111
|
-
return c(), u("div",
|
|
110
|
+
const t = _("fm-button"), l = _("FmTextField"), a = _("fm-list-item"), d = _("fm-checkbox"), g = _("fm-list");
|
|
111
|
+
return c(), u("div", M, [
|
|
112
112
|
i(a, {
|
|
113
113
|
tag: "div",
|
|
114
114
|
clickable: !1
|
|
115
115
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
p("div",
|
|
118
|
-
p("div",
|
|
116
|
+
default: F(() => [
|
|
117
|
+
p("div", T, [
|
|
118
|
+
p("div", $, [
|
|
119
119
|
i(t, {
|
|
120
120
|
icon: "sync",
|
|
121
121
|
variant: "tertiary",
|
|
122
122
|
onClick: e[0] || (e[0] = () => I([]))
|
|
123
123
|
}),
|
|
124
|
-
p("span",
|
|
124
|
+
p("span", z, q(G.value) + " product(s) selected ", 1)
|
|
125
125
|
]),
|
|
126
126
|
i(l, {
|
|
127
127
|
modelValue: y.value,
|
|
@@ -134,18 +134,18 @@ const J = { class: "flex flex-col flex-nowrap" }, M = { class: "flex gap-16 item
|
|
|
134
134
|
]),
|
|
135
135
|
_: 1
|
|
136
136
|
}),
|
|
137
|
-
i(
|
|
137
|
+
i(g, {
|
|
138
138
|
class: A(["grow overflow-y-auto", `max-h-${m.maxHeight ? `[${m.maxHeight}px]` : "full"}`])
|
|
139
139
|
}, {
|
|
140
|
-
default:
|
|
141
|
-
(c(!0), u(x, null,
|
|
140
|
+
default: F(() => [
|
|
141
|
+
(c(!0), u(x, null, S(v.value, (o) => (c(), u(x, {
|
|
142
142
|
key: o.id
|
|
143
143
|
}, [
|
|
144
|
-
Object.keys(o.items).length > 0 ? (c(), u("div",
|
|
145
|
-
p("div",
|
|
144
|
+
Object.keys(o.items).length > 0 ? (c(), u("div", K, [
|
|
145
|
+
p("div", J, [
|
|
146
146
|
i(d, {
|
|
147
|
-
"model-value":
|
|
148
|
-
indeterminate:
|
|
147
|
+
"model-value": h(o.id) ?? !1,
|
|
148
|
+
indeterminate: h(o.id) === null,
|
|
149
149
|
label: o.name,
|
|
150
150
|
value: "",
|
|
151
151
|
name: "",
|
|
@@ -154,7 +154,7 @@ const J = { class: "flex flex-col flex-nowrap" }, M = { class: "flex gap-16 item
|
|
|
154
154
|
"onUpdate:modelValue": () => U(o.id)
|
|
155
155
|
}, null, 8, ["model-value", "indeterminate", "label", "onUpdate:modelValue"])
|
|
156
156
|
]),
|
|
157
|
-
(c(!0), u(x, null,
|
|
157
|
+
(c(!0), u(x, null, S(o.items, (r) => (c(), u("div", {
|
|
158
158
|
key: r.id,
|
|
159
159
|
class: "pl-48"
|
|
160
160
|
}, [
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as L, ref as p, computed as C, onMounted as P, resolveComponent as i, openBlock as $, createBlock as D, unref as e, isRef as H, withCtx as S, createElementVNode as v, createVNode as c, toDisplayString as w } from "vue";
|
|
2
|
-
import { u as O } from "./loading-
|
|
3
|
-
import { p as Z } from "./plugins-
|
|
2
|
+
import { u as O } from "./loading-fZQi5zP8.js";
|
|
3
|
+
import { p as Z } from "./plugins-9_UvAdJ2.js";
|
|
4
4
|
import { u as q } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { m as z } from "./index-
|
|
6
|
-
import "./index-
|
|
7
|
-
import { b as G } from "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./index-
|
|
11
|
-
import { Z as d } from "./zod-
|
|
12
|
-
import { z as Y } from "./app-
|
|
13
|
-
import { u as j } from "./vue-i18n-
|
|
14
|
-
import { c as J } from "./
|
|
5
|
+
import { m as z } from "./index-CGMiuxyf.js";
|
|
6
|
+
import "./index-CnRLkzpg.js";
|
|
7
|
+
import { b as G } from "./index-38u-cCwD.js";
|
|
8
|
+
import "./index-CQZbm9P5.js";
|
|
9
|
+
import "./index-DjONNxbl.js";
|
|
10
|
+
import "./index-D-kPBF9C.js";
|
|
11
|
+
import { Z as d } from "./zod-Xp7TePRP.js";
|
|
12
|
+
import { z as Y } from "./app-Duwed9mD.js";
|
|
13
|
+
import { u as j } from "./vue-i18n-DDbkmbSf.js";
|
|
14
|
+
import { c as J } from "./campaign-CzenWLhs.js";
|
|
15
15
|
const K = { class: "fm-typo-en-body-lg-600" }, Q = { class: "fm-typo-en-body-lg-400" }, W = { class: "flex items-center gap-8" }, fe = /* @__PURE__ */ L({
|
|
16
16
|
__name: "SendCollectionSheet",
|
|
17
17
|
emits: ["success"],
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { defineComponent as O, ref as p, computed as g, watch as T, onMounted as q, resolveComponent as x, openBlock as I, createBlock as G, unref as t, isRef as k, withCtx as z, createElementVNode as n, createVNode as s, toDisplayString as f, createElementBlock as H, createCommentVNode as K } from "vue";
|
|
2
|
+
import { J as Q } from "./JsonViewer-v8_C7l5N.js";
|
|
3
|
+
import { _ as F } from "./FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js";
|
|
4
|
+
import { u as W } from "./loading-fZQi5zP8.js";
|
|
5
|
+
import { u as X } from "./app-wDQR6dpb.js";
|
|
6
|
+
import { l as Y } from "./lodash-R-DIRmbj.js";
|
|
7
|
+
import { m as Z } from "./index-CGMiuxyf.js";
|
|
8
|
+
import { c as ee } from "./campaign-CzenWLhs.js";
|
|
9
|
+
const ae = { class: "space-y-16" }, te = { class: "fm-typo-en-body-md-600" }, oe = { class: "flex items-center justify-end" }, le = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
|
|
12
|
+
}, ne = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, se = { class: "flex gap-8 items-center" }, ie = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, re = { class: "flex gap-8 items-center" }, ue = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, de = { class: "flex gap-8" }, ce = { class: "flex items-center gap-8" }, Se = /* @__PURE__ */ O({
|
|
13
|
+
__name: "SendVoucherSheet",
|
|
14
|
+
emits: ["success"],
|
|
15
|
+
setup(me, { expose: M, emit: R }) {
|
|
16
|
+
const { minor: j } = W, h = p(""), r = p({}), N = R, m = p(!1), i = p([]);
|
|
17
|
+
function P(o) {
|
|
18
|
+
m.value = !0, h.value = o.campaignId, i.value = [];
|
|
19
|
+
}
|
|
20
|
+
function S() {
|
|
21
|
+
m.value = !1;
|
|
22
|
+
}
|
|
23
|
+
const B = [
|
|
24
|
+
{
|
|
25
|
+
header: "Name",
|
|
26
|
+
accessorFn: (o) => o.name || "No Profile"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
header: "Phone",
|
|
30
|
+
accessorFn: (o) => o.phoneNumber || "-"
|
|
31
|
+
}
|
|
32
|
+
], e = p({
|
|
33
|
+
searchValue: "",
|
|
34
|
+
pageSize: 10,
|
|
35
|
+
pageCount: 0,
|
|
36
|
+
pageIndex: 0,
|
|
37
|
+
totalRows: 0,
|
|
38
|
+
isLoading: !1
|
|
39
|
+
}), u = p([]), L = g(() => e.value.pageIndex + 1), _ = g(
|
|
40
|
+
() => e.value.pageIndex * e.value.pageSize
|
|
41
|
+
), U = g(
|
|
42
|
+
() => Math.min(
|
|
43
|
+
_.value + e.value.pageSize,
|
|
44
|
+
e.value.totalRows
|
|
45
|
+
)
|
|
46
|
+
), w = g(() => e.value.pageIndex > 0), C = g(
|
|
47
|
+
() => e.value.pageIndex < e.value.pageCount - 1
|
|
48
|
+
), b = async (o) => {
|
|
49
|
+
e.value.pageSize = o.pageSize, e.value.pageIndex = o.pageIndex, e.value.isLoading = !0, u.value = [];
|
|
50
|
+
try {
|
|
51
|
+
const a = await Z.read({
|
|
52
|
+
limit: o.pageSize,
|
|
53
|
+
skip: o.pageIndex,
|
|
54
|
+
sortBy: "_id",
|
|
55
|
+
search: e.value.searchValue,
|
|
56
|
+
descending: !1
|
|
57
|
+
});
|
|
58
|
+
u.value = a.resources, e.value.totalRows = a.meta.totalResources ?? 0, e.value.pageCount = a.meta.totalPages ?? 0, r.value = {}, i.value.forEach((d) => {
|
|
59
|
+
const y = u.value.findIndex((c) => c._id == d);
|
|
60
|
+
y > -1 && (r.value[y] = !0);
|
|
61
|
+
});
|
|
62
|
+
} finally {
|
|
63
|
+
e.value.isLoading = !1;
|
|
64
|
+
}
|
|
65
|
+
}, $ = Y.debounce(async () => {
|
|
66
|
+
await b({ pageSize: e.value.pageSize, pageIndex: 0 });
|
|
67
|
+
}, 500), v = async (o) => {
|
|
68
|
+
await b({ pageSize: e.value.pageSize, pageIndex: o });
|
|
69
|
+
}, A = async (o) => {
|
|
70
|
+
await b({ pageSize: o, pageIndex: 0 });
|
|
71
|
+
};
|
|
72
|
+
function E() {
|
|
73
|
+
u.value.length > 0 && (i.value = i.value.filter(
|
|
74
|
+
(o) => !u.value.some((a) => a._id === o) || // Keep if not in current page
|
|
75
|
+
Object.entries(r.value).some(
|
|
76
|
+
([a, d]) => d && u.value[a]._id === o
|
|
77
|
+
// Keep if selected in current page
|
|
78
|
+
)
|
|
79
|
+
));
|
|
80
|
+
for (const [o, a] of Object.entries(r.value))
|
|
81
|
+
if (a) {
|
|
82
|
+
const d = u.value[o]._id;
|
|
83
|
+
i.value.includes(d) || i.value.push(d);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async function D(o) {
|
|
87
|
+
i.value.length < 1 || await j(
|
|
88
|
+
async () => {
|
|
89
|
+
await ee.sendCollection(h.value, {
|
|
90
|
+
memberId: i.value
|
|
91
|
+
}), await N("success"), S();
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
message: "Sending claim(s)",
|
|
95
|
+
successMessage: "Claim(s) created"
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
return T(r, E, { deep: !0 }), M({
|
|
100
|
+
showSheet: P,
|
|
101
|
+
hideSheet: S
|
|
102
|
+
}), q(async () => {
|
|
103
|
+
await b(e.value);
|
|
104
|
+
}), (o, a) => {
|
|
105
|
+
const d = x("FmSearch"), y = x("FmTable"), c = x("FmButton"), J = x("FmSideSheet");
|
|
106
|
+
return I(), G(J, {
|
|
107
|
+
"max-width": 560,
|
|
108
|
+
"dismiss-away": !0,
|
|
109
|
+
header: "Send voucher to",
|
|
110
|
+
modelValue: t(m),
|
|
111
|
+
"onUpdate:modelValue": [
|
|
112
|
+
a[8] || (a[8] = (l) => k(m) ? m.value = l : null),
|
|
113
|
+
a[9] || (a[9] = (l) => m.value = l)
|
|
114
|
+
]
|
|
115
|
+
}, {
|
|
116
|
+
"side-sheet-footer": z(() => [
|
|
117
|
+
n("div", ce, [
|
|
118
|
+
s(c, {
|
|
119
|
+
label: "Send",
|
|
120
|
+
loading: t(X)().isLoading,
|
|
121
|
+
onClick: D
|
|
122
|
+
}, null, 8, ["loading"]),
|
|
123
|
+
s(c, {
|
|
124
|
+
label: "Cancel",
|
|
125
|
+
type: "button",
|
|
126
|
+
variant: "tertiary",
|
|
127
|
+
onClick: a[7] || (a[7] = (l) => m.value = !1)
|
|
128
|
+
})
|
|
129
|
+
])
|
|
130
|
+
]),
|
|
131
|
+
default: z(() => [
|
|
132
|
+
s(Q, { json: t(i) }, null, 8, ["json"]),
|
|
133
|
+
n("div", ae, [
|
|
134
|
+
n("div", te, f(t(i).length) + " members selected ", 1),
|
|
135
|
+
n("div", oe, [
|
|
136
|
+
s(d, {
|
|
137
|
+
class: "mt-4",
|
|
138
|
+
modelValue: t(e).searchValue,
|
|
139
|
+
"onUpdate:modelValue": [
|
|
140
|
+
a[0] || (a[0] = (l) => t(e).searchValue = l),
|
|
141
|
+
t($)
|
|
142
|
+
],
|
|
143
|
+
placeholder: "Search Member",
|
|
144
|
+
collapsible: ""
|
|
145
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
146
|
+
]),
|
|
147
|
+
s(y, {
|
|
148
|
+
modelValue: t(r),
|
|
149
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => k(r) ? r.value = l : null),
|
|
150
|
+
selection: "multiple",
|
|
151
|
+
loading: t(e).isLoading,
|
|
152
|
+
"row-data": t(u),
|
|
153
|
+
"column-defs": B,
|
|
154
|
+
"page-size": t(e).pageSize,
|
|
155
|
+
"page-count": t(e).pageCount,
|
|
156
|
+
"fetch-fn": void 0,
|
|
157
|
+
"hide-footer": ""
|
|
158
|
+
}, null, 8, ["modelValue", "loading", "row-data", "page-size", "page-count"]),
|
|
159
|
+
t(e).totalRows > t(e).pageSize ? (I(), H("div", le, [
|
|
160
|
+
n("div", ne, [
|
|
161
|
+
n("div", se, [
|
|
162
|
+
a[10] || (a[10] = n("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
|
163
|
+
s(F, {
|
|
164
|
+
items: [
|
|
165
|
+
{ label: "10", value: 10 },
|
|
166
|
+
{ label: "20", value: 20 },
|
|
167
|
+
{ label: "50", value: 50 }
|
|
168
|
+
],
|
|
169
|
+
value: t(e).pageSize,
|
|
170
|
+
"onUpdate:modelValue": A
|
|
171
|
+
}, null, 8, ["value"])
|
|
172
|
+
]),
|
|
173
|
+
n("span", ie, f(t(_) + 1) + " - " + f(t(U)) + " of " + f(t(e).totalRows) + " items ", 1)
|
|
174
|
+
]),
|
|
175
|
+
n("div", re, [
|
|
176
|
+
s(F, {
|
|
177
|
+
items: Array.from(Array(t(e).pageCount), (l, V) => ({
|
|
178
|
+
label: (V + 1).toString(),
|
|
179
|
+
value: V + 1
|
|
180
|
+
})),
|
|
181
|
+
value: t(L),
|
|
182
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => v(l - 1))
|
|
183
|
+
}, null, 8, ["items", "value"]),
|
|
184
|
+
n("span", ue, " of " + f(t(e).pageCount) + " pages ", 1),
|
|
185
|
+
n("div", de, [
|
|
186
|
+
s(c, {
|
|
187
|
+
disabled: !t(w),
|
|
188
|
+
icon: "first_page",
|
|
189
|
+
"icon-color": "neutral-black",
|
|
190
|
+
variant: "tertiary",
|
|
191
|
+
onClick: a[3] || (a[3] = (l) => v(0))
|
|
192
|
+
}, null, 8, ["disabled"]),
|
|
193
|
+
s(c, {
|
|
194
|
+
disabled: !t(w),
|
|
195
|
+
icon: "chevron_left",
|
|
196
|
+
"icon-color": "neutral-black",
|
|
197
|
+
variant: "tertiary",
|
|
198
|
+
onClick: a[4] || (a[4] = (l) => v(t(e).pageIndex - 1))
|
|
199
|
+
}, null, 8, ["disabled"]),
|
|
200
|
+
s(c, {
|
|
201
|
+
disabled: !t(C),
|
|
202
|
+
icon: "chevron_right",
|
|
203
|
+
"icon-color": "neutral-black",
|
|
204
|
+
variant: "tertiary",
|
|
205
|
+
onClick: a[5] || (a[5] = (l) => v(t(e).pageIndex + 1))
|
|
206
|
+
}, null, 8, ["disabled"]),
|
|
207
|
+
s(c, {
|
|
208
|
+
disabled: !t(C),
|
|
209
|
+
icon: "last_page",
|
|
210
|
+
"icon-color": "neutral-black",
|
|
211
|
+
variant: "tertiary",
|
|
212
|
+
onClick: a[6] || (a[6] = (l) => v(t(e).pageCount - 1))
|
|
213
|
+
}, null, 8, ["disabled"])
|
|
214
|
+
])
|
|
215
|
+
])
|
|
216
|
+
])) : K("", !0)
|
|
217
|
+
])
|
|
218
|
+
]),
|
|
219
|
+
_: 1
|
|
220
|
+
}, 8, ["modelValue"]);
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
export {
|
|
225
|
+
Se as _
|
|
226
|
+
};
|