@feedmepos/mf-connect 0.1.37-prod → 0.1.38-prod
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-CavR2bzs.js → Analytic-Dc1l0CZK.js} +11 -11
- package/dist/{App-Bpo0XZSs.js → App-BLg0CWv-.js} +6 -6
- package/dist/{Bin-ohZ2CZZR.js → Bin-DDbKIePj.js} +8 -8
- package/dist/{Broadcast-D5x0_-zC.js → Broadcast-CihKie6G.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DbdBGvgR.js} +6 -6
- package/dist/{Card-BM-Lrm5y.js → Card-h1dYFE_s.js} +16 -16
- package/dist/{Collections-Cr4aoJer.js → Collections-DUXdnJqQ.js} +7 -7
- package/dist/{Credit-DzDVFv4H.js → Credit-CsGEuX9p.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-0gMUNtdO.js} +32 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-CQDnl97F.js} +77 -75
- package/dist/{Experience-CjaDdbvZ.js → Experience-CBbqYrql.js} +9 -9
- package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
- package/dist/{Game-BuiTygow.js → Game-CicPpdT5.js} +10 -10
- package/dist/{Index-CQGzUU-w.js → Index-Xgvlt4vk.js} +10 -10
- package/dist/{Marketing-BSspYuhg.js → Marketing-CqOAQgg4.js} +6 -6
- package/dist/{Member-B4S0UNGq.js → Member-D1k4ZQ95.js} +10 -10
- package/dist/{MemberList-CfnUJ3mh.js → MemberList-BdV9sxO_.js} +25 -25
- package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-Q0_4nT4e.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js → MessageInput.vue_vue_type_script_setup_true_lang-COGCJGRc.js} +4 -4
- package/dist/{Mission-BtypT2uF.js → Mission-D-TW52zn.js} +10 -10
- package/dist/{Overview-Be7bUtRO.js → Overview-BleJmxHa.js} +18 -18
- package/dist/{Point-Bw4lnLqp.js → Point-B7BYX9us.js} +9 -9
- package/dist/Promotion-BphlQC55.js +289 -0
- package/dist/{Queue-CpPEVgn8.js → Queue-DJfZqO1f.js} +11 -11
- package/dist/{Record-DQq4P69i.js → Record-Bv1P0s2g.js} +8 -8
- package/dist/{Reward-DJH0eM8u.js → Reward-CRyEjr47.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-Ckqox5Ut.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dp4ku9ep.js} +630 -543
- package/dist/{Segment-BLB4VWNJ.js → Segment-Br0Y5hzV.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-BuB-qwcM.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DanHGQXC.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCKUXnGl.js} +3 -3
- package/dist/{Setting-GRIUo7vg.js → Setting-BPFArJMv.js} +11 -11
- package/dist/{Store-H0UDQpln.js → Store-e_odFoS5.js} +20 -20
- package/dist/{StoreRewards--TNIFaCo.js → StoreRewards-wXhyzIFI.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CVPQt-bn.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CWJmeeo-.js} +1 -1
- package/dist/{Tier-CJufQcIz.js → Tier-GfdGRbTX.js} +20 -20
- package/dist/{Title-BBMgGUld.js → Title-C2ZyFxNf.js} +19 -19
- package/dist/{Transaction-DsucPnfp.js → Transaction-Dv8yYXJS.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CK_4iMCA.js} +6 -6
- package/dist/{Voucher-BPvxKO_w.js → Voucher-CBujqgnF.js} +150 -120
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CgooH4yn.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-B8pgaARn.js} +1 -1
- package/dist/{app-D3MT1deX.js → app-B2Cgyy70.js} +33 -31
- package/dist/{app-Bo0JpadQ.js → app-B8E3wp8L.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/business-BRidHvRK.js +79 -0
- package/dist/{campaign-j1c3ou7l.js → campaign-B0vnIan2.js} +2 -2
- package/dist/{campaign-Z3l7BoMg.js → campaign-B7v0a8YV.js} +9 -9
- package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-NH5faqyS.js} +1 -1
- package/dist/{campaign.fn-rsRhHYZP.js → campaign.fn-BPHARk3Y.js} +123 -123
- package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-Cun9w38h.js} +1 -1
- package/dist/{collection.fn-Bz38mGMa.js → collection.fn-RR5q6jqi.js} +2 -2
- package/dist/{dto-D648NN4s.js → dto-DK1VnGlq.js} +4 -4
- package/dist/{effect-DbMAmVSR.js → effect-CI4ZR8HW.js} +1 -1
- package/dist/{email-addresses-KOVDrRiK.js → email-addresses-bguwgnrW.js} +1 -1
- package/dist/{export-cTZf8Avd.js → export-CcepocZB.js} +3 -3
- package/dist/{helper-BYyfcLqw.js → helper-BM1JTEFS.js} +1 -1
- package/dist/index-B0Slqiqo.js +31 -0
- package/dist/{index-CTPMbFf5.js → index-B6_uPXyL.js} +12 -11
- package/dist/{index-DPBHiqsJ.js → index-BS3AjuVw.js} +1 -1
- package/dist/{index-E-0tTd0_.js → index-BfGdztHf.js} +1 -1
- package/dist/{index-BIaCtk8e.js → index-CBuCx_0r.js} +23 -10
- package/dist/{index-BMl2KZts.js → index-CLkqja9X.js} +11437 -10950
- package/dist/{index-nF9iYTlh.js → index-Cm_6xScD.js} +1 -1
- package/dist/{index-DFKmjCG1.js → index-DHEJX75j.js} +1 -1
- package/dist/index-D_gLVFsk.js +32269 -0
- package/dist/{index-B3p0hmIV.js → index-DbjZHuoG.js} +1 -1
- package/dist/{index-BTb8I_eB.js → index-De1JnaPh.js} +1 -1
- package/dist/{index-B4MqsaBz.js → index-Di6bqaLm.js} +3 -3
- package/dist/{index-CvoShC5J.js → index-DjycZwfg.js} +158 -150
- package/dist/{index-BrKXRxe_.js → index-vs1HgFHz.js} +1 -1
- package/dist/{index.esm2017-DFYwde30.js → index.esm2017-DANlqJ4g.js} +1 -1
- package/dist/{loading-vUArhX_O.js → loading-BXu9ofEu.js} +1 -1
- package/dist/{membership-BHKv29yt.js → membership-BBb7gdZg.js} +3 -3
- package/dist/{money-Bl3_QRkE.js → money-C02BW-pt.js} +1 -1
- package/dist/{number-hh_S9w7k.js → number-D7tIDv2q.js} +1 -1
- package/dist/{objectid-CEyMlMge.js → objectid-oVX5A5oa.js} +3 -3
- package/dist/{plugins-CVes2wzE.js → plugins-B5tuGbFw.js} +2 -2
- package/dist/{reward-ANZOdWzf.js → reward-CE-bnnnQ.js} +1 -1
- package/dist/{rule-BvFk5bQg.js → rule-BN5R8pYj.js} +3 -3
- package/dist/{rule-builder-BSN777PN.js → rule-builder-16JDtaoI.js} +1 -1
- package/dist/{template-Dh9lDLs_.js → template-C-zyZgxl.js} +4 -4
- package/dist/{trigger-C7THbt7R.js → trigger-DCLjl3mM.js} +7 -7
- package/dist/{user-DtNR9JY2.js → user-C7bmFOaT.js} +1 -1
- package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-Cts9OsqE.js} +157 -157
- package/dist/{xlsx-7u9SB0oa.js → xlsx-CJ5ufXk3.js} +1 -1
- package/package.json +2 -2
- package/dist/Promotion-Bg6x0rAh.js +0 -255
- package/dist/business-DMALI7ZO.js +0 -78
- package/dist/index-BsCGyJMY.js +0 -29566
- package/dist/index-Dbd4WA4r.js +0 -61
|
@@ -1,55 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import "./
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { u as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { defineComponent as Y, ref as x, computed as ee, h as m, onMounted as oe, resolveComponent as d, openBlock as u, createElementBlock as V, Fragment as S, createVNode as l, unref as t, createElementVNode as c, withCtx as F, renderList as te, createBlock as y, resolveDynamicComponent as ne, toDisplayString as g, createCommentVNode as E } from "vue";
|
|
2
|
+
import { _ as ae } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as re, components as f } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
|
|
5
|
+
import { p as A, a as ce } from "./plugins-B5tuGbFw.js";
|
|
6
|
+
import { useCoreStore as ie } from "@feedmepos/mf-common";
|
|
7
|
+
import { u as se } from "./loading-BXu9ofEu.js";
|
|
8
|
+
import { u as le } from "./business-BRidHvRK.js";
|
|
9
|
+
import { u as me } from "./campaign-B0vnIan2.js";
|
|
10
|
+
import { g as ue, a as O, b as B } from "./campaign-B7v0a8YV.js";
|
|
11
|
+
import "./index-De1JnaPh.js";
|
|
12
|
+
import { u as de } from "./template-C-zyZgxl.js";
|
|
13
|
+
import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0gMUNtdO.js";
|
|
14
|
+
import { _ as fe } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCKUXnGl.js";
|
|
15
|
+
import { u as he } from "./vue-i18n-Cts9OsqE.js";
|
|
16
|
+
import { T as ye } from "./trigger-DCLjl3mM.js";
|
|
17
|
+
import { useRouter as ge } from "vue-router";
|
|
18
|
+
import { c as w } from "./index-DbjZHuoG.js";
|
|
19
|
+
import { R as H } from "./app-B2Cgyy70.js";
|
|
20
|
+
var _e = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
21
|
+
const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-center justify-between w-full" }, we = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Te = /* @__PURE__ */ c("img", {
|
|
22
|
+
src: ae,
|
|
22
23
|
class: "aspect-square w-[150px]"
|
|
23
|
-
}, null, -1),
|
|
24
|
+
}, null, -1), Ue = { class: "flex flex-col gap-16 text-center" }, Pe = { class: "fm-typo-en-title-sm-800" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ye = /* @__PURE__ */ Y({
|
|
24
25
|
__name: "Voucher",
|
|
25
|
-
setup(
|
|
26
|
-
const { t: a } =
|
|
26
|
+
setup(Re) {
|
|
27
|
+
const { t: a } = he(), $ = {
|
|
27
28
|
label: a("connect.voucher.createCampaign"),
|
|
28
29
|
value: "create",
|
|
29
30
|
isPrimary: !0,
|
|
30
31
|
prependIcon: "add"
|
|
31
|
-
},
|
|
32
|
+
}, L = re(), K = de("VOUCHER", L), N = le(), p = me(), { global: D, minor: T } = se, U = ge(), i = x({
|
|
32
33
|
searchKey: "",
|
|
33
|
-
location:
|
|
34
|
-
|
|
34
|
+
location: [],
|
|
35
|
+
triggerType: []
|
|
36
|
+
}), _ = ee(
|
|
35
37
|
() => p.campaigns.voucher.filter(
|
|
36
|
-
(e) =>
|
|
38
|
+
(e) => q(e) && G(e)
|
|
37
39
|
)
|
|
38
|
-
),
|
|
40
|
+
), j = ye.VOUCHER.map((e) => ({
|
|
41
|
+
label: e.name,
|
|
42
|
+
value: e.value
|
|
43
|
+
}));
|
|
44
|
+
function q(e) {
|
|
45
|
+
const o = i.value.location;
|
|
46
|
+
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
|
|
47
|
+
(r) => {
|
|
48
|
+
var s;
|
|
49
|
+
return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
|
|
50
|
+
}
|
|
51
|
+
) : e.targetLocation.includes(o);
|
|
52
|
+
}
|
|
53
|
+
function G(e) {
|
|
54
|
+
const o = i.value.triggerType;
|
|
55
|
+
if (!o || o.length === 0) return !0;
|
|
56
|
+
const r = e.event.type;
|
|
57
|
+
return o.includes(r);
|
|
58
|
+
}
|
|
59
|
+
const X = [
|
|
39
60
|
{
|
|
40
61
|
header: a("connect.voucher.voucherTitle"),
|
|
41
62
|
accessorFn: (e) => e.name
|
|
42
63
|
},
|
|
43
64
|
{
|
|
44
65
|
header: a("connect.voucher.status"),
|
|
45
|
-
accessorFn: (e) =>
|
|
66
|
+
accessorFn: (e) => ue(e),
|
|
46
67
|
cell(e) {
|
|
47
|
-
return
|
|
68
|
+
return O(e.row.original);
|
|
48
69
|
}
|
|
49
70
|
},
|
|
50
71
|
{
|
|
51
72
|
header: a("connect.voucher.summary"),
|
|
52
|
-
accessorFn: (e) =>
|
|
73
|
+
accessorFn: (e) => B(e)
|
|
53
74
|
},
|
|
54
75
|
{
|
|
55
76
|
header: a("connect.voucher.quota"),
|
|
@@ -69,19 +90,19 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
69
90
|
header: a("connect.voucher.actions"),
|
|
70
91
|
cell(e) {
|
|
71
92
|
return m("div", { class: "flex items-center justify-end" }, [
|
|
72
|
-
m(
|
|
93
|
+
m(f.FmButton, {
|
|
73
94
|
icon: "visibility",
|
|
74
95
|
variant: "tertiary",
|
|
75
96
|
iconColor: "neutral-gray-400",
|
|
76
97
|
onClick: async (o) => {
|
|
77
|
-
o.stopPropagation(), await
|
|
98
|
+
o.stopPropagation(), await U.push({
|
|
78
99
|
name: H["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
79
100
|
params: { id: e.row.original._id }
|
|
80
101
|
});
|
|
81
102
|
}
|
|
82
103
|
}),
|
|
83
104
|
m(
|
|
84
|
-
|
|
105
|
+
f.FmMenu,
|
|
85
106
|
{
|
|
86
107
|
placement: "bottom-end",
|
|
87
108
|
onClick: (o) => {
|
|
@@ -89,7 +110,7 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
89
110
|
}
|
|
90
111
|
},
|
|
91
112
|
{
|
|
92
|
-
"menu-button": () => m(
|
|
113
|
+
"menu-button": () => m(f.FmButton, {
|
|
93
114
|
icon: "more_vert",
|
|
94
115
|
iconColor: "neutral-gray-400",
|
|
95
116
|
variant: "tertiary"
|
|
@@ -97,10 +118,10 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
97
118
|
default: () => {
|
|
98
119
|
const o = [
|
|
99
120
|
m(
|
|
100
|
-
|
|
121
|
+
f.FmMenuItem,
|
|
101
122
|
{
|
|
102
|
-
onClick: async (
|
|
103
|
-
|
|
123
|
+
onClick: async (r) => {
|
|
124
|
+
r.stopPropagation(), I(e.row.original);
|
|
104
125
|
}
|
|
105
126
|
},
|
|
106
127
|
{
|
|
@@ -115,27 +136,27 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
115
136
|
)
|
|
116
137
|
];
|
|
117
138
|
return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
|
|
118
|
-
m(
|
|
139
|
+
m(f.FmMenuItem, {
|
|
119
140
|
label: a("connect.voucher.send"),
|
|
120
|
-
onClick: async (
|
|
121
|
-
var
|
|
122
|
-
|
|
141
|
+
onClick: async (r) => {
|
|
142
|
+
var s;
|
|
143
|
+
r.stopPropagation(), (s = b.value) == null || s.showSheet({
|
|
123
144
|
campaignId: e.row.original._id
|
|
124
145
|
});
|
|
125
146
|
}
|
|
126
147
|
})
|
|
127
148
|
), o.unshift(
|
|
128
|
-
m(
|
|
149
|
+
m(f.FmMenuItem, {
|
|
129
150
|
label: a("connect.voucher.share"),
|
|
130
|
-
onClick: async (
|
|
131
|
-
if (
|
|
151
|
+
onClick: async (r) => {
|
|
152
|
+
if (r.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
|
|
132
153
|
return await A.confirm(
|
|
133
154
|
"Cannot share a voucher that is not a simple claim.",
|
|
134
155
|
"Share Voucher",
|
|
135
156
|
"OK"
|
|
136
157
|
);
|
|
137
|
-
await
|
|
138
|
-
`https://${
|
|
158
|
+
await ce(
|
|
159
|
+
`https://${ie().currentBusiness.value._id}.${_e.appUrl}/vouchers/${e.row.original._id}`,
|
|
139
160
|
{
|
|
140
161
|
successMessage: "Voucher link copied to clipboard"
|
|
141
162
|
}
|
|
@@ -149,9 +170,9 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
149
170
|
]);
|
|
150
171
|
}
|
|
151
172
|
}
|
|
152
|
-
],
|
|
153
|
-
async function
|
|
154
|
-
await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await
|
|
173
|
+
], P = x(), b = x();
|
|
174
|
+
async function I(e) {
|
|
175
|
+
await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await T(
|
|
155
176
|
async () => {
|
|
156
177
|
await w.delete(e._id), await p.read("VOUCHER");
|
|
157
178
|
},
|
|
@@ -164,33 +185,33 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
164
185
|
);
|
|
165
186
|
}
|
|
166
187
|
async function v(e) {
|
|
167
|
-
e ? await o() :
|
|
168
|
-
await o(
|
|
188
|
+
e ? await o() : K.open(async (r) => {
|
|
189
|
+
await o(r);
|
|
169
190
|
});
|
|
170
|
-
async function o(
|
|
171
|
-
var
|
|
172
|
-
(
|
|
191
|
+
async function o(r) {
|
|
192
|
+
var s;
|
|
193
|
+
(s = P.value) == null || s.showSheet(
|
|
173
194
|
!0,
|
|
174
195
|
"VOUCHER",
|
|
175
196
|
e ? await w.readById(e._id) : void 0,
|
|
176
|
-
|
|
197
|
+
r
|
|
177
198
|
);
|
|
178
199
|
}
|
|
179
200
|
}
|
|
180
|
-
async function
|
|
201
|
+
async function W(e) {
|
|
181
202
|
e.campaign._id && await new Promise((o) => {
|
|
182
|
-
|
|
203
|
+
L.open({
|
|
183
204
|
title: "Confirmation",
|
|
184
205
|
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
185
206
|
primaryActions: { text: "Update all", close: !0 },
|
|
186
207
|
secondaryActions: { text: "Update future only", close: !0 }
|
|
187
208
|
}).onPrimary(async () => {
|
|
188
|
-
var
|
|
189
|
-
e.updateCollections = !0, (
|
|
209
|
+
var r;
|
|
210
|
+
e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
|
|
190
211
|
}).onSecondary(async () => {
|
|
191
212
|
o();
|
|
192
213
|
});
|
|
193
|
-
}), await
|
|
214
|
+
}), await T(
|
|
194
215
|
async () => {
|
|
195
216
|
e.campaign._id ? await w.update(e.campaign._id, e) : await w.create(e), await p.read("VOUCHER");
|
|
196
217
|
},
|
|
@@ -204,86 +225,95 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
204
225
|
}
|
|
205
226
|
);
|
|
206
227
|
}
|
|
207
|
-
return
|
|
208
|
-
await
|
|
228
|
+
return oe(async () => {
|
|
229
|
+
await D(async () => {
|
|
209
230
|
await p.read("VOUCHER");
|
|
210
231
|
});
|
|
211
232
|
}), (e, o) => {
|
|
212
|
-
const
|
|
213
|
-
return u(), S
|
|
214
|
-
|
|
233
|
+
const r = d("FmPageHead"), s = d("FmSearch"), z = d("FmTable"), C = d("FmButton"), Q = d("FmListItem"), Z = d("FmList"), J = d("FmCard");
|
|
234
|
+
return u(), V(S, null, [
|
|
235
|
+
l(r, {
|
|
215
236
|
title: t(a)("connect.voucher.title"),
|
|
216
|
-
actions: t(
|
|
237
|
+
actions: t(_).length > 0 ? [$] : [],
|
|
217
238
|
"onClick:action": o[0] || (o[0] = () => v())
|
|
218
239
|
}, null, 8, ["title", "actions"]),
|
|
219
|
-
|
|
220
|
-
s
|
|
240
|
+
c("div", ve, [
|
|
241
|
+
l(s, {
|
|
221
242
|
modelValue: t(i).searchKey,
|
|
222
243
|
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
|
|
223
244
|
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
224
245
|
placeholder: t(a)("connect.voucher.search"),
|
|
225
246
|
collapsible: ""
|
|
226
247
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
227
|
-
t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), S
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
248
|
+
t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), V(S, { key: 0 }, [
|
|
249
|
+
c("div", Ce, [
|
|
250
|
+
c("div", we, [
|
|
251
|
+
l(M, {
|
|
252
|
+
label: `${t(a)("connect.common.location")}: `,
|
|
253
|
+
"right-icon": "keyboard_arrow_down",
|
|
231
254
|
modelValue: t(i).location,
|
|
232
255
|
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
|
|
233
|
-
label: t(a)("connect.voucher.location"),
|
|
234
|
-
"show-item-label": !0,
|
|
235
256
|
icon: "storefront",
|
|
236
|
-
|
|
237
|
-
items: t(
|
|
238
|
-
}, null, 8, ["
|
|
257
|
+
"show-item-label": !0,
|
|
258
|
+
items: t(N).locationOptions
|
|
259
|
+
}, null, 8, ["label", "modelValue", "items"]),
|
|
260
|
+
l(M, {
|
|
261
|
+
label: "Type:",
|
|
262
|
+
"right-icon": "keyboard_arrow_down",
|
|
263
|
+
modelValue: t(i).triggerType,
|
|
264
|
+
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
|
|
265
|
+
icon: "filter_list",
|
|
266
|
+
"show-item-label": !0,
|
|
267
|
+
items: t(j)
|
|
268
|
+
}, null, 8, ["modelValue", "items"])
|
|
239
269
|
]),
|
|
240
|
-
s
|
|
270
|
+
l(s, {
|
|
241
271
|
modelValue: t(i).searchKey,
|
|
242
|
-
"onUpdate:modelValue": o[
|
|
272
|
+
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
|
|
243
273
|
class: "xs:hidden",
|
|
244
274
|
placeholder: t(a)("connect.voucher.search"),
|
|
245
275
|
collapsible: ""
|
|
246
276
|
}, null, 8, ["modelValue", "placeholder"])
|
|
247
277
|
]),
|
|
248
|
-
|
|
278
|
+
l(z, {
|
|
249
279
|
class: "xs:hidden",
|
|
250
|
-
"row-data": t(
|
|
251
|
-
"column-defs":
|
|
280
|
+
"row-data": t(_),
|
|
281
|
+
"column-defs": X,
|
|
252
282
|
"search-value": t(i).searchKey,
|
|
253
283
|
"column-filter": [],
|
|
254
|
-
onRowClick: o[
|
|
255
|
-
"hide-footer": t(
|
|
284
|
+
onRowClick: o[5] || (o[5] = (n) => v(n.original)),
|
|
285
|
+
"hide-footer": t(_).length < 10
|
|
256
286
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
257
|
-
|
|
258
|
-
default:
|
|
259
|
-
(u(!0), S
|
|
287
|
+
l(Z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
288
|
+
default: F(() => [
|
|
289
|
+
(u(!0), V(S, null, te(t(_).filter(
|
|
260
290
|
(n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
261
|
-
), (n) => (u(), y(
|
|
291
|
+
), (n) => (u(), y(Q, {
|
|
262
292
|
key: n._id.toString(),
|
|
263
|
-
onClick: (
|
|
293
|
+
onClick: (k) => v(n),
|
|
264
294
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
265
295
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
var
|
|
296
|
+
default: F(() => {
|
|
297
|
+
var k;
|
|
268
298
|
return [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
(u(), y(
|
|
272
|
-
|
|
299
|
+
c("div", be, [
|
|
300
|
+
c("div", ke, [
|
|
301
|
+
(u(), y(ne(t(O)(n)))),
|
|
302
|
+
c("div", xe, g(((k = n.pf_collectible) == null ? void 0 : k.currentReceive) ?? 0) + " claimed ", 1)
|
|
273
303
|
]),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
304
|
+
c("div", Ve, [
|
|
305
|
+
c("div", Se, g(n.name), 1),
|
|
306
|
+
c("div", Fe, g(t(B)(n)), 1)
|
|
277
307
|
])
|
|
278
308
|
]),
|
|
279
|
-
|
|
309
|
+
c("div", Le, [
|
|
280
310
|
n.event.type === "SIMPLE_CLAIM" ? (u(), y(C, {
|
|
281
311
|
key: 0,
|
|
282
312
|
icon: "visibility",
|
|
283
313
|
"icon-color": "neutral-gray-400",
|
|
284
314
|
variant: "tertiary",
|
|
285
|
-
onClick: async (
|
|
286
|
-
|
|
315
|
+
onClick: async (h) => {
|
|
316
|
+
h.stopPropagation(), await t(U).push({
|
|
287
317
|
name: t(H)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
288
318
|
params: { id: n._id }
|
|
289
319
|
});
|
|
@@ -294,18 +324,18 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
294
324
|
icon: "send",
|
|
295
325
|
"icon-color": "neutral-gray-400",
|
|
296
326
|
variant: "tertiary",
|
|
297
|
-
onClick: (
|
|
327
|
+
onClick: (h) => {
|
|
298
328
|
var R;
|
|
299
|
-
|
|
329
|
+
h.stopPropagation(), (R = t(b)) == null || R.showSheet({
|
|
300
330
|
campaignId: n._id
|
|
301
331
|
});
|
|
302
332
|
}
|
|
303
333
|
}, null, 8, ["onClick"])) : E("", !0),
|
|
304
|
-
|
|
334
|
+
l(C, {
|
|
305
335
|
icon: "delete",
|
|
306
336
|
"icon-color": "neutral-gray-400",
|
|
307
337
|
variant: "tertiary",
|
|
308
|
-
onClick: (
|
|
338
|
+
onClick: (h) => (h.stopPropagation(), I(n))
|
|
309
339
|
}, null, 8, ["onClick"])
|
|
310
340
|
])
|
|
311
341
|
];
|
|
@@ -315,32 +345,32 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
315
345
|
]),
|
|
316
346
|
_: 1
|
|
317
347
|
})
|
|
318
|
-
], 64)) : (u(), y(
|
|
348
|
+
], 64)) : (u(), y(J, {
|
|
319
349
|
key: 1,
|
|
320
350
|
variant: "outlined",
|
|
321
351
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
322
352
|
}, {
|
|
323
|
-
default:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
353
|
+
default: F(() => [
|
|
354
|
+
Te,
|
|
355
|
+
c("div", Ue, [
|
|
356
|
+
c("div", Pe, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
|
|
357
|
+
c("div", Ie, g(t(a)("connect.voucher.description")), 1)
|
|
328
358
|
]),
|
|
329
|
-
|
|
359
|
+
l(C, {
|
|
330
360
|
variant: "primary",
|
|
331
361
|
label: t(a)("connect.voucher.createVoucherCampaign"),
|
|
332
362
|
icon: "add",
|
|
333
|
-
onClick: o[
|
|
363
|
+
onClick: o[6] || (o[6] = (n) => v())
|
|
334
364
|
}, null, 8, ["label"])
|
|
335
365
|
]),
|
|
336
366
|
_: 1
|
|
337
367
|
})),
|
|
338
|
-
|
|
368
|
+
l(pe, {
|
|
339
369
|
ref_key: "sheetRef",
|
|
340
|
-
ref:
|
|
341
|
-
"onSubmit:modelValue":
|
|
370
|
+
ref: P,
|
|
371
|
+
"onSubmit:modelValue": W
|
|
342
372
|
}, null, 512),
|
|
343
|
-
|
|
373
|
+
l(fe, {
|
|
344
374
|
ref_key: "sendVoucherSheetRef",
|
|
345
375
|
ref: b
|
|
346
376
|
}, null, 512)
|
|
@@ -350,5 +380,5 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
350
380
|
}
|
|
351
381
|
});
|
|
352
382
|
export {
|
|
353
|
-
|
|
383
|
+
Ye as default
|
|
354
384
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as U, ref as k, resolveComponent as p, openBlock as d, createBlock as h, withCtx as f, renderSlot as q, createVNode as s, createTextVNode as E, toDisplayString as F, createElementVNode as a, computed as N, createElementBlock as O, Fragment as S, renderList as z, unref as e, normalizeClass as J, createCommentVNode as R, resolveDynamicComponent as H } from "vue";
|
|
2
|
-
import { c as X } from "./index-
|
|
3
|
-
import { e as K, F as Q } from "./index-
|
|
4
|
-
import { C as W } from "./membership-
|
|
2
|
+
import { c as X } from "./index-CLkqja9X.js";
|
|
3
|
+
import { e as K, F as Q } from "./index-B6_uPXyL.js";
|
|
4
|
+
import { C as W } from "./membership-BBb7gdZg.js";
|
|
5
5
|
import { Z as g } from "./zod-Bg2FbC-D.js";
|
|
6
|
-
import { _ as Y } from "./SelectItems.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { u as ee } from "./business-
|
|
6
|
+
import { _ as Y } from "./SelectItems.vue_vue_type_script_setup_true_lang-BuB-qwcM.js";
|
|
7
|
+
import { u as ee } from "./business-BRidHvRK.js";
|
|
8
8
|
import { useCoreStore as te } from "@feedmepos/mf-common";
|
|
9
|
-
import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B8pgaARn.js";
|
|
10
10
|
import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
11
|
-
import { _ as ae, a as ne } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
12
|
-
import { _ as se } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { u as me } from "./vue-i18n-
|
|
14
|
-
import { i as re } from "./helper-
|
|
11
|
+
import { _ as ae, a as ne } from "./EffectSheet.vue_vue_type_style_index_0_lang-CQDnl97F.js";
|
|
12
|
+
import { _ as se } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CWJmeeo-.js";
|
|
13
|
+
import { u as me } from "./vue-i18n-Cts9OsqE.js";
|
|
14
|
+
import { i as re } from "./helper-BM1JTEFS.js";
|
|
15
15
|
const ie = { class: "flex justify-end gap-8 w-full" }, ue = /* @__PURE__ */ U({
|
|
16
16
|
__name: "MenuSheet",
|
|
17
17
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
|
|
2
2
|
import { Z as d } from "./zod-Bg2FbC-D.js";
|
|
3
|
-
import { u as V } from "./vue-i18n-
|
|
3
|
+
import { u as V } from "./vue-i18n-Cts9OsqE.js";
|
|
4
4
|
const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-fm-color-typo-tertiary"
|