@feedmepos/mf-connect 0.1.82-prod → 0.1.83-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-D850nvXy.js → Analytic-1OYb8L9c.js} +11 -11
- package/dist/{App-Dwp2SQFt.js → App-oQ4_lEV2.js} +7 -7
- package/dist/{Bin-t3dMVk18.js → Bin-CQ8CYWAf.js} +8 -8
- package/dist/Broadcast-BLq5lca6.js +265 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CFa7asTL.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-0BKgyMxn.js} +6 -6
- package/dist/{Card-DueuT99c.js → Card-BbcMCzvO.js} +19 -19
- package/dist/{Collections-D50oEyeZ.js → Collections-0LOyEUoF.js} +8 -8
- package/dist/Credit-Crrc3MSu.js +259 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js} +245 -241
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L0-aFhRw.js → EffectSheet.vue_vue_type_style_index_0_lang-DQaMkTla.js} +6 -6
- package/dist/Experience-DJiUmONI.js +258 -0
- package/dist/{FileSaver.min-DH3eS7yi.js → FileSaver.min-CFEGc8v5.js} +1 -1
- package/dist/Game-ChHy4S4P.js +329 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BIKcbIag.js → ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js} +1 -1
- package/dist/{Index-BucLJQqP.js → Index-CL5auUCN.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CIoZurPE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-H5IjhmOA.js} +1 -1
- package/dist/{MainLayout-DYGrSfgc.js → MainLayout-Bf4G5U5F.js} +1 -1
- package/dist/{Marketing-CsAIdNjF.js → Marketing-cNwSm-dt.js} +6 -6
- package/dist/{Member-D4HF_VGN.js → Member-fT7a7zFo.js} +11 -11
- package/dist/{MemberList-CPoA4ovd.js → MemberList-gEN36Erj.js} +27 -27
- package/dist/{MemberTransactions-AMv9NeIb.js → MemberTransactions-C4YgiUw-.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhhSwnK0.js → MessageInput.vue_vue_type_script_setup_true_lang-BNDrmYqp.js} +9 -9
- package/dist/Mission-Bz9P2pjX.js +333 -0
- package/dist/{Overview-ByO2p2Wx.js → Overview-BG3Z7Daz.js} +19 -19
- package/dist/Point-BBeSJ5p5.js +261 -0
- package/dist/Promotion-VmaOESn2.js +390 -0
- package/dist/{Queue-BD29Mmbf.js → Queue-DKtUhOBh.js} +11 -11
- package/dist/{Record-CNLiN6YR.js → Record-Cb45m9I8.js} +9 -9
- package/dist/{Reward-Ceo3M1yD.js → Reward-D_uvCEMe.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJWQEL9W.js → RewardGroup.vue_vue_type_script_setup_true_lang-yUUMGEUJ.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CWuWGs6r.js → RuleGroup.vue_vue_type_script_setup_true_lang-CIb7igvo.js} +15 -15
- package/dist/{Segment-BOQUlP-m.js → Segment-BJ8XUyeG.js} +25 -25
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BcXeiz0p.js → SelectItems.vue_vue_type_script_setup_true_lang-ht4qyiQM.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CJ--FC-i.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DC6OQ7Zb.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9emjG6Nc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js} +4 -4
- package/dist/{Setting-CWapXD31.js → Setting-CS1wSxO9.js} +14 -14
- package/dist/{SettingAdvertisements-QEf2eyem.js → SettingAdvertisements-CWP7VthZ.js} +12 -12
- package/dist/{Store-Bfm2olbH.js → Store-cy0uZfSE.js} +22 -22
- package/dist/{StoreRewards-DNDkyxxn.js → StoreRewards-DDAvmlEn.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-zKLbY4Qb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CevWXAb6.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D3-wIOQ7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CPJ4fCu-.js} +1 -1
- package/dist/{Tier-uC45o2AK.js → Tier-CUT_0eYp.js} +22 -22
- package/dist/{Title-zDjlDJCB.js → Title-DcelZU7H.js} +20 -20
- package/dist/{Transaction-Bo9FEjMQ.js → Transaction-CwcJnFIO.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BR5F0bWS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BuDS-vUd.js} +6 -6
- package/dist/{Voucher-B7BTa4Vt.js → Voucher-z6o5rwFx.js} +162 -141
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjrjJW7x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-FVdeM5pH.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DeAkLgaX.js → ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js} +2 -2
- package/dist/{app-CkUBXnib.js → app-BUFlIAB5.js} +73 -43
- package/dist/app.js +1 -1
- package/dist/{business-C8P05bjQ.js → business-CEL6Cxr7.js} +1 -1
- package/dist/{campaign-DcLhSQVQ.js → campaign-Bz3O-DFr.js} +1 -1
- package/dist/{campaign-CyYAvl3p.js → campaign-CfB7ZWIg.js} +8 -8
- package/dist/{campaign.enum-h6B-mP82.js → campaign.enum-CCKHGvL9.js} +1 -1
- package/dist/{campaign.fn-CStjDAoU.js → campaign.fn-Cu0sRSpP.js} +114 -114
- package/dist/{collectible.enum-DT-wjl-a.js → collectible.enum-DeWSJ9OK.js} +1 -1
- package/dist/{collection.fn-14o3RW2e.js → collection.fn-hPDt2qvz.js} +2 -2
- package/dist/{dto-Bv09Baex.js → dto-BKwcpb4T.js} +4 -4
- package/dist/{effect-CF0s7QWQ.js → effect-D070CPN_.js} +1 -1
- package/dist/{email-addresses-B5qrHbxg.js → email-addresses-C0fE6EMy.js} +2 -2
- package/dist/{export-B6nvdBmg.js → export-CG1ypExs.js} +3 -3
- package/dist/{helper-B4-2ut7E.js → helper-C9NBolO7.js} +1 -1
- package/dist/{index-B-y0UTZw.js → index-4gCsL8Hl.js} +6 -6
- package/dist/{index-D5xt8OjL.js → index-6rFsv3Yg.js} +1 -1
- package/dist/{index-BebGg-0n.js → index-B30LtrWw.js} +1 -1
- package/dist/{index-DVb99_67.js → index-B613auFn.js} +1 -1
- package/dist/{index-HhVIn4Bn.js → index-BGi7UFjn.js} +1 -1
- package/dist/{index-DzQjej5Y.js → index-BXSp11TE.js} +4 -4
- package/dist/{index-DRX9TTMn.js → index-CM-qkxMr.js} +3 -3
- package/dist/{index-DesSizn4.js → index-CZoTFXja.js} +3 -3
- package/dist/{index-DG_Ej3ec.js → index-D7AT7i0e.js} +3 -3
- package/dist/{index-DIQ2MyWF.js → index-DDMr6_UT.js} +4 -4
- package/dist/{index-XDg25M5a.js → index-DGNPGZh4.js} +1 -1
- package/dist/{index-CR8brl_k.js → index-DLnZyneY.js} +1 -1
- package/dist/{index-Ct90ybe0.js → index-DcfdUpTw.js} +1 -1
- package/dist/{index.esm2017-1A2eV8x_.js → index.esm2017-D0u5JnGx.js} +1 -1
- package/dist/{loading-B0_BwPgo.js → loading-Rn4BXFlo.js} +1 -1
- package/dist/{lodash-DxIglhqk.js → lodash-Ds-QoR_N.js} +1 -1
- package/dist/{membership-H_whlbUP.js → membership-BjklIT2n.js} +3 -3
- package/dist/{money-DEE8QW6m.js → money-DMyZXL-e.js} +1 -1
- package/dist/{number-BmN5A4Cu.js → number-Cyny8l0t.js} +1 -1
- package/dist/{objectid-B8LZDZOt.js → objectid-Bs1Sha1n.js} +6 -6
- package/dist/{plugins-DTrOHd7d.js → plugins-BdQ8LmZm.js} +3 -3
- package/dist/{reward-CsJhkkaT.js → reward-ZGs3fpY1.js} +1 -1
- package/dist/{rule-ByMxYH4c.js → rule-BH0ICJcx.js} +3 -3
- package/dist/{rule-builder-DwGwUlV1.js → rule-builder-D2sz7Xd9.js} +1 -1
- package/dist/template-_QJbP7yG.js +236 -0
- package/dist/{timezone-Bpe-fhwZ.js → timezone-ulqdIvC-.js} +2 -2
- package/dist/{trigger-CEprJYiD.js → trigger-BiXZCT3j.js} +5 -5
- package/dist/{usePagination-Du6qS5aj.js → usePagination-Ck7buuI_.js} +1 -1
- package/dist/{user-Be8HNWuo.js → user-BWTfkoD6.js} +1 -1
- package/dist/{vue-i18n-fg0FtbNR.js → vue-i18n-CmMTYitu.js} +158 -158
- package/dist/{xlsx-CSQJ3YWk.js → xlsx-BF8PJO-P.js} +1 -1
- package/dist/{zod-BB7zZ5ec.js → zod-C5iXeYjP.js} +1 -1
- package/package.json +1 -1
- package/dist/Broadcast-DORnkgZc.js +0 -232
- package/dist/Credit-CIWSRGuJ.js +0 -225
- package/dist/Experience-qABtjxNP.js +0 -224
- package/dist/Game-D67q1zKd.js +0 -299
- package/dist/Mission-CRinLn7e.js +0 -303
- package/dist/Point-4JqzbNgP.js +0 -227
- package/dist/Promotion-DlWVF6hF.js +0 -358
- package/dist/template-Bdwy6QXF.js +0 -188
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { a as
|
|
6
|
-
import { useCoreStore as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { g as
|
|
11
|
-
import "./
|
|
12
|
-
import
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { u as
|
|
16
|
-
import { T as
|
|
17
|
-
import { useRouter as
|
|
18
|
-
import { R as
|
|
19
|
-
var
|
|
20
|
-
const
|
|
1
|
+
import { defineComponent as te, ref as U, computed as ne, h as m, onMounted as ae, resolveComponent as d, openBlock as u, createElementBlock as T, Fragment as P, createVNode as l, unref as t, createElementVNode as c, withCtx as R, renderList as re, createBlock as h, resolveDynamicComponent as ce, createCommentVNode as L, toDisplayString as _ } from "vue";
|
|
2
|
+
import { _ as ie } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as se, components as p } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
5
|
+
import { a as le, p as me } from "./plugins-BdQ8LmZm.js";
|
|
6
|
+
import { useCoreStore as ue } from "@feedmepos/mf-common";
|
|
7
|
+
import { u as de } from "./loading-Rn4BXFlo.js";
|
|
8
|
+
import { u as pe } from "./business-CEL6Cxr7.js";
|
|
9
|
+
import { u as fe, c as v } from "./campaign-Bz3O-DFr.js";
|
|
10
|
+
import { g as ye, a as $, b as D } from "./campaign-CfB7ZWIg.js";
|
|
11
|
+
import { c as he, p as ge, u as _e } from "./template-_QJbP7yG.js";
|
|
12
|
+
import "./index-DGNPGZh4.js";
|
|
13
|
+
import { _ as ve } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js";
|
|
14
|
+
import { _ as Ce } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js";
|
|
15
|
+
import { u as we } from "./vue-i18n-CmMTYitu.js";
|
|
16
|
+
import { T as be } from "./trigger-BiXZCT3j.js";
|
|
17
|
+
import { useRouter as ke } from "vue-router";
|
|
18
|
+
import { R as K } from "./app-BUFlIAB5.js";
|
|
19
|
+
var xe = { 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", voucherAppUrl: "https://voucher.feedme.cc/" };
|
|
20
|
+
const Fe = { class: "px-24 flex flex-col gap-y-16" }, Ve = { class: "flex items-center justify-between w-full" }, Se = { class: "flex gap-8 overflow-x-auto" }, Ue = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "space-y-4" }, Le = { class: "fm-typo-en-body-lg-600" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Be = { class: "flex flex-col gap-16 text-center" }, Oe = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, no = /* @__PURE__ */ te({
|
|
21
21
|
__name: "Voucher",
|
|
22
|
-
setup(
|
|
23
|
-
const { t: a } =
|
|
22
|
+
setup(Me) {
|
|
23
|
+
const { t: a } = we(), N = {
|
|
24
24
|
label: a("connect.voucher.createCampaign"),
|
|
25
25
|
value: "create",
|
|
26
26
|
isPrimary: !0,
|
|
27
27
|
prependIcon: "add"
|
|
28
|
-
},
|
|
28
|
+
}, I = se(), j = _e("VOUCHER", I), q = pe(), y = fe(), { global: G, minor: E } = de, B = ke(), s = U({
|
|
29
29
|
searchKey: "",
|
|
30
30
|
location: [],
|
|
31
31
|
triggerType: []
|
|
32
|
-
}),
|
|
33
|
-
() =>
|
|
34
|
-
(e) =>
|
|
32
|
+
}), C = ne(
|
|
33
|
+
() => y.campaigns.voucher.filter(
|
|
34
|
+
(e) => W(e) && z(e)
|
|
35
35
|
)
|
|
36
|
-
),
|
|
36
|
+
), X = be.VOUCHER.map((e) => ({
|
|
37
37
|
label: e.name,
|
|
38
38
|
value: e.value
|
|
39
39
|
}));
|
|
40
|
-
function
|
|
41
|
-
const o =
|
|
40
|
+
function W(e) {
|
|
41
|
+
const o = s.value.location;
|
|
42
42
|
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
|
|
43
43
|
(r) => {
|
|
44
|
-
var
|
|
45
|
-
return (
|
|
44
|
+
var i;
|
|
45
|
+
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(r);
|
|
46
46
|
}
|
|
47
47
|
) : e.targetLocation.includes(o);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function k(e) {
|
|
50
50
|
return e.hideInApp === !1;
|
|
51
51
|
}
|
|
52
52
|
function x(e) {
|
|
53
|
-
return e.event.type === "SIMPLE_CLAIM" && !
|
|
53
|
+
return e.event.type === "SIMPLE_CLAIM" && !k(e);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const o =
|
|
55
|
+
function z(e) {
|
|
56
|
+
const o = s.value.triggerType;
|
|
57
57
|
if (!o || o.length === 0) return !0;
|
|
58
58
|
const r = e.event.type;
|
|
59
59
|
return o.includes(r);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const Q = [
|
|
62
62
|
{
|
|
63
63
|
header: a("connect.voucher.voucherTitle"),
|
|
64
64
|
accessorFn: (e) => e.name,
|
|
65
65
|
cell(e) {
|
|
66
66
|
const o = [e.row.original.name];
|
|
67
|
-
return
|
|
67
|
+
return k(e.row.original) && o.push(
|
|
68
68
|
m(p.FmChip, {
|
|
69
69
|
label: "Feedvibe",
|
|
70
70
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
@@ -75,14 +75,14 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
header: a("connect.voucher.status"),
|
|
78
|
-
accessorFn: (e) =>
|
|
78
|
+
accessorFn: (e) => ye(e),
|
|
79
79
|
cell(e) {
|
|
80
|
-
return
|
|
80
|
+
return $(e.row.original);
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
header: a("connect.voucher.summary"),
|
|
85
|
-
accessorFn: (e) =>
|
|
85
|
+
accessorFn: (e) => D(e)
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
header: a("connect.voucher.quota"),
|
|
@@ -107,8 +107,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
107
107
|
variant: "tertiary",
|
|
108
108
|
iconColor: "neutral-gray-400",
|
|
109
109
|
onClick: async (o) => {
|
|
110
|
-
o.stopPropagation(), await
|
|
111
|
-
name:
|
|
110
|
+
o.stopPropagation(), await B.push({
|
|
111
|
+
name: K["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
112
112
|
params: { id: e.row.original._id }
|
|
113
113
|
});
|
|
114
114
|
}
|
|
@@ -129,11 +129,17 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
129
129
|
}),
|
|
130
130
|
default: () => {
|
|
131
131
|
const o = [
|
|
132
|
+
m(p.FmMenuItem, {
|
|
133
|
+
label: a("connect.voucher.duplicate"),
|
|
134
|
+
onClick: async (r) => {
|
|
135
|
+
r.stopPropagation(), await A(e.row.original);
|
|
136
|
+
}
|
|
137
|
+
}),
|
|
132
138
|
m(
|
|
133
139
|
p.FmMenuItem,
|
|
134
140
|
{
|
|
135
141
|
onClick: async (r) => {
|
|
136
|
-
r.stopPropagation(),
|
|
142
|
+
r.stopPropagation(), O(e.row.original);
|
|
137
143
|
}
|
|
138
144
|
},
|
|
139
145
|
{
|
|
@@ -151,8 +157,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
151
157
|
m(p.FmMenuItem, {
|
|
152
158
|
label: a("connect.voucher.send"),
|
|
153
159
|
onClick: async (r) => {
|
|
154
|
-
var
|
|
155
|
-
r.stopPropagation(), (
|
|
160
|
+
var i;
|
|
161
|
+
r.stopPropagation(), (i = V.value) == null || i.showSheet({
|
|
156
162
|
campaignId: e.row.original._id
|
|
157
163
|
});
|
|
158
164
|
}
|
|
@@ -161,8 +167,8 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
161
167
|
m(p.FmMenuItem, {
|
|
162
168
|
label: a("connect.voucher.share"),
|
|
163
169
|
onClick: async (r) => {
|
|
164
|
-
r.stopPropagation(), await
|
|
165
|
-
`https://${
|
|
170
|
+
r.stopPropagation(), await le(
|
|
171
|
+
`https://${ue().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
|
|
166
172
|
{
|
|
167
173
|
successMessage: "Voucher link copied to clipboard"
|
|
168
174
|
}
|
|
@@ -176,11 +182,11 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
176
182
|
]);
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
|
-
],
|
|
180
|
-
async function
|
|
181
|
-
await
|
|
185
|
+
], F = U(), V = U();
|
|
186
|
+
async function O(e) {
|
|
187
|
+
await me.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await E(
|
|
182
188
|
async () => {
|
|
183
|
-
await
|
|
189
|
+
await v.delete(e._id), await y.read("VOUCHER");
|
|
184
190
|
},
|
|
185
191
|
{
|
|
186
192
|
message: a("connect.voucher.removing", { name: e.name }),
|
|
@@ -190,23 +196,30 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
190
196
|
}
|
|
191
197
|
);
|
|
192
198
|
}
|
|
193
|
-
async function
|
|
194
|
-
e ? await o() :
|
|
195
|
-
await o(r);
|
|
199
|
+
async function w(e) {
|
|
200
|
+
e ? await o(await v.readById(e._id)) : j.open(async (r) => {
|
|
201
|
+
await o(void 0, r);
|
|
196
202
|
});
|
|
197
|
-
async function o(r) {
|
|
198
|
-
var
|
|
199
|
-
(
|
|
200
|
-
!0,
|
|
201
|
-
"VOUCHER",
|
|
202
|
-
e ? await b.readById(e._id) : void 0,
|
|
203
|
-
r
|
|
204
|
-
);
|
|
203
|
+
async function o(r, i) {
|
|
204
|
+
var b;
|
|
205
|
+
(b = F.value) == null || b.showSheet(!0, "VOUCHER", r, i);
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
|
-
async function
|
|
208
|
+
async function A(e) {
|
|
209
|
+
var i;
|
|
210
|
+
if (!await he(e.name))
|
|
211
|
+
return;
|
|
212
|
+
const o = await v.readById(e._id), r = ge(o);
|
|
213
|
+
(i = F.value) == null || i.showSheet(
|
|
214
|
+
!0,
|
|
215
|
+
"VOUCHER",
|
|
216
|
+
r,
|
|
217
|
+
o.template
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
async function Z(e) {
|
|
208
221
|
e.campaign._id && await new Promise((o) => {
|
|
209
|
-
|
|
222
|
+
I.open({
|
|
210
223
|
title: "Confirmation",
|
|
211
224
|
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
212
225
|
primaryActions: { text: "Update all", close: !0 },
|
|
@@ -217,9 +230,9 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
217
230
|
}).onSecondary(async () => {
|
|
218
231
|
o();
|
|
219
232
|
});
|
|
220
|
-
}), await
|
|
233
|
+
}), await E(
|
|
221
234
|
async () => {
|
|
222
|
-
e.campaign._id ? await
|
|
235
|
+
e.campaign._id ? await v.update(e.campaign._id, e) : await v.create(e), await y.read("VOUCHER");
|
|
223
236
|
},
|
|
224
237
|
{
|
|
225
238
|
message: a(
|
|
@@ -231,123 +244,131 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
231
244
|
}
|
|
232
245
|
);
|
|
233
246
|
}
|
|
234
|
-
return
|
|
235
|
-
await
|
|
236
|
-
await
|
|
247
|
+
return ae(async () => {
|
|
248
|
+
await G(async () => {
|
|
249
|
+
await y.read("VOUCHER");
|
|
237
250
|
});
|
|
238
251
|
}), (e, o) => {
|
|
239
|
-
const r = d("FmPageHead"),
|
|
240
|
-
return u(),
|
|
252
|
+
const r = d("FmPageHead"), i = d("FmSearch"), b = d("FmTable"), J = d("FmChip"), g = d("FmButton"), Y = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
|
|
253
|
+
return u(), T(P, null, [
|
|
241
254
|
l(r, {
|
|
242
255
|
title: t(a)("connect.voucher.title"),
|
|
243
|
-
actions: t(
|
|
244
|
-
"onClick:action": o[0] || (o[0] = () =>
|
|
256
|
+
actions: t(C).length > 0 ? [N] : [],
|
|
257
|
+
"onClick:action": o[0] || (o[0] = () => w())
|
|
245
258
|
}, null, 8, ["title", "actions"]),
|
|
246
|
-
c("div",
|
|
247
|
-
l(
|
|
248
|
-
modelValue: t(
|
|
249
|
-
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(
|
|
259
|
+
c("div", Fe, [
|
|
260
|
+
l(i, {
|
|
261
|
+
modelValue: t(s).searchKey,
|
|
262
|
+
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(s).searchKey = n),
|
|
250
263
|
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
251
264
|
placeholder: t(a)("connect.voucher.search"),
|
|
252
265
|
collapsible: ""
|
|
253
266
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
254
|
-
t(
|
|
255
|
-
c("div",
|
|
256
|
-
c("div",
|
|
257
|
-
l(
|
|
267
|
+
t(y).campaigns.voucher && t(y).campaigns.voucher.length > 0 ? (u(), T(P, { key: 0 }, [
|
|
268
|
+
c("div", Ve, [
|
|
269
|
+
c("div", Se, [
|
|
270
|
+
l(H, {
|
|
258
271
|
label: `${t(a)("connect.common.location")}: `,
|
|
259
272
|
"right-icon": "keyboard_arrow_down",
|
|
260
|
-
modelValue: t(
|
|
261
|
-
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(
|
|
273
|
+
modelValue: t(s).location,
|
|
274
|
+
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(s).location = n),
|
|
262
275
|
icon: "storefront",
|
|
263
276
|
"show-item-label": !0,
|
|
264
|
-
items: t(
|
|
277
|
+
items: t(q).locationOptions
|
|
265
278
|
}, null, 8, ["label", "modelValue", "items"]),
|
|
266
|
-
l(
|
|
279
|
+
l(H, {
|
|
267
280
|
label: "Type:",
|
|
268
281
|
"right-icon": "keyboard_arrow_down",
|
|
269
|
-
modelValue: t(
|
|
270
|
-
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(
|
|
282
|
+
modelValue: t(s).triggerType,
|
|
283
|
+
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(s).triggerType = n),
|
|
271
284
|
icon: "filter_list",
|
|
272
285
|
"show-item-label": !0,
|
|
273
|
-
items: t(
|
|
286
|
+
items: t(X)
|
|
274
287
|
}, null, 8, ["modelValue", "items"])
|
|
275
288
|
]),
|
|
276
|
-
l(
|
|
277
|
-
modelValue: t(
|
|
278
|
-
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(
|
|
289
|
+
l(i, {
|
|
290
|
+
modelValue: t(s).searchKey,
|
|
291
|
+
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(s).searchKey = n),
|
|
279
292
|
class: "xs:hidden sm:hidden",
|
|
280
293
|
placeholder: t(a)("connect.voucher.search"),
|
|
281
294
|
collapsible: ""
|
|
282
295
|
}, null, 8, ["modelValue", "placeholder"])
|
|
283
296
|
]),
|
|
284
|
-
l(
|
|
297
|
+
l(b, {
|
|
285
298
|
class: "xs:hidden sm:hidden",
|
|
286
|
-
"row-data": t(
|
|
287
|
-
"column-defs":
|
|
288
|
-
"search-value": t(
|
|
299
|
+
"row-data": t(C),
|
|
300
|
+
"column-defs": Q,
|
|
301
|
+
"search-value": t(s).searchKey,
|
|
289
302
|
"column-filter": [],
|
|
290
|
-
onRowClick: o[5] || (o[5] = (n) =>
|
|
291
|
-
"hide-footer": t(
|
|
303
|
+
onRowClick: o[5] || (o[5] = (n) => w(n.original)),
|
|
304
|
+
"hide-footer": t(C).length < 10
|
|
292
305
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
293
|
-
l(
|
|
294
|
-
default:
|
|
295
|
-
(u(!0),
|
|
296
|
-
(n) => n.name.toLowerCase().includes(t(
|
|
297
|
-
), (n) => (u(), h(
|
|
306
|
+
l(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
307
|
+
default: R(() => [
|
|
308
|
+
(u(!0), T(P, null, re(t(C).filter(
|
|
309
|
+
(n) => n.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
|
|
310
|
+
), (n) => (u(), h(Y, {
|
|
298
311
|
key: n._id.toString(),
|
|
299
|
-
onClick: (
|
|
312
|
+
onClick: (S) => w(n),
|
|
300
313
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
301
314
|
}, {
|
|
302
|
-
default:
|
|
303
|
-
var
|
|
315
|
+
default: R(() => {
|
|
316
|
+
var S;
|
|
304
317
|
return [
|
|
305
|
-
c("div",
|
|
306
|
-
c("div",
|
|
307
|
-
(u(), h(
|
|
308
|
-
|
|
318
|
+
c("div", Ue, [
|
|
319
|
+
c("div", Te, [
|
|
320
|
+
(u(), h(ce(t($)(n)))),
|
|
321
|
+
k(n) ? (u(), h(J, {
|
|
309
322
|
key: 0,
|
|
310
323
|
label: "Feedvibe",
|
|
311
324
|
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
312
325
|
compact: ""
|
|
313
|
-
})) :
|
|
314
|
-
c("div",
|
|
326
|
+
})) : L("", !0),
|
|
327
|
+
c("div", Pe, _(((S = n.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0) + " claimed ", 1)
|
|
315
328
|
]),
|
|
316
|
-
c("div",
|
|
317
|
-
c("div",
|
|
318
|
-
c("div",
|
|
329
|
+
c("div", Re, [
|
|
330
|
+
c("div", Le, _(n.name), 1),
|
|
331
|
+
c("div", Ie, _(t(D)(n)), 1)
|
|
319
332
|
])
|
|
320
333
|
]),
|
|
321
|
-
c("div",
|
|
322
|
-
|
|
334
|
+
c("div", Ee, [
|
|
335
|
+
l(g, {
|
|
336
|
+
icon: "content_copy",
|
|
337
|
+
"icon-color": "neutral-gray-400",
|
|
338
|
+
variant: "tertiary",
|
|
339
|
+
onClick: async (f) => {
|
|
340
|
+
f.stopPropagation(), await A(n);
|
|
341
|
+
}
|
|
342
|
+
}, null, 8, ["onClick"]),
|
|
343
|
+
x(n) ? (u(), h(g, {
|
|
323
344
|
key: 0,
|
|
324
345
|
icon: "visibility",
|
|
325
346
|
"icon-color": "neutral-gray-400",
|
|
326
347
|
variant: "tertiary",
|
|
327
|
-
onClick: async (
|
|
328
|
-
|
|
329
|
-
name: t(
|
|
348
|
+
onClick: async (f) => {
|
|
349
|
+
f.stopPropagation(), await t(B).push({
|
|
350
|
+
name: t(K)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
330
351
|
params: { id: n._id }
|
|
331
352
|
});
|
|
332
353
|
}
|
|
333
|
-
}, null, 8, ["onClick"])) :
|
|
334
|
-
x(n) ? (u(), h(
|
|
354
|
+
}, null, 8, ["onClick"])) : L("", !0),
|
|
355
|
+
x(n) ? (u(), h(g, {
|
|
335
356
|
key: 1,
|
|
336
357
|
icon: "send",
|
|
337
358
|
"icon-color": "neutral-gray-400",
|
|
338
359
|
variant: "tertiary",
|
|
339
|
-
onClick: (
|
|
340
|
-
var
|
|
341
|
-
|
|
360
|
+
onClick: (f) => {
|
|
361
|
+
var M;
|
|
362
|
+
f.stopPropagation(), (M = t(V)) == null || M.showSheet({
|
|
342
363
|
campaignId: n._id
|
|
343
364
|
});
|
|
344
365
|
}
|
|
345
|
-
}, null, 8, ["onClick"])) :
|
|
346
|
-
l(
|
|
366
|
+
}, null, 8, ["onClick"])) : L("", !0),
|
|
367
|
+
l(g, {
|
|
347
368
|
icon: "delete",
|
|
348
369
|
"icon-color": "neutral-gray-400",
|
|
349
370
|
variant: "tertiary",
|
|
350
|
-
onClick: (
|
|
371
|
+
onClick: (f) => (f.stopPropagation(), O(n))
|
|
351
372
|
}, null, 8, ["onClick"])
|
|
352
373
|
])
|
|
353
374
|
];
|
|
@@ -357,37 +378,37 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
357
378
|
]),
|
|
358
379
|
_: 1
|
|
359
380
|
})
|
|
360
|
-
], 64)) : (u(), h(
|
|
381
|
+
], 64)) : (u(), h(oe, {
|
|
361
382
|
key: 1,
|
|
362
383
|
variant: "outlined",
|
|
363
384
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
364
385
|
}, {
|
|
365
|
-
default:
|
|
386
|
+
default: R(() => [
|
|
366
387
|
o[7] || (o[7] = c("img", {
|
|
367
|
-
src:
|
|
388
|
+
src: ie,
|
|
368
389
|
class: "aspect-square w-[150px]"
|
|
369
390
|
}, null, -1)),
|
|
370
|
-
c("div",
|
|
371
|
-
c("div",
|
|
372
|
-
c("div",
|
|
391
|
+
c("div", Be, [
|
|
392
|
+
c("div", Oe, _(t(a)("connect.voucher.createVoucherCampaign")), 1),
|
|
393
|
+
c("div", Ae, _(t(a)("connect.voucher.description")), 1)
|
|
373
394
|
]),
|
|
374
|
-
l(
|
|
395
|
+
l(g, {
|
|
375
396
|
variant: "primary",
|
|
376
397
|
label: t(a)("connect.voucher.createVoucherCampaign"),
|
|
377
398
|
icon: "add",
|
|
378
|
-
onClick: o[6] || (o[6] = (n) =>
|
|
399
|
+
onClick: o[6] || (o[6] = (n) => w())
|
|
379
400
|
}, null, 8, ["label"])
|
|
380
401
|
]),
|
|
381
402
|
_: 1
|
|
382
403
|
})),
|
|
383
|
-
l(
|
|
404
|
+
l(ve, {
|
|
384
405
|
ref_key: "sheetRef",
|
|
385
|
-
ref:
|
|
386
|
-
"onSubmit:modelValue":
|
|
406
|
+
ref: F,
|
|
407
|
+
"onSubmit:modelValue": Z
|
|
387
408
|
}, null, 512),
|
|
388
|
-
l(
|
|
409
|
+
l(Ce, {
|
|
389
410
|
ref_key: "sendVoucherSheetRef",
|
|
390
|
-
ref:
|
|
411
|
+
ref: V
|
|
391
412
|
}, null, 512)
|
|
392
413
|
])
|
|
393
414
|
], 64);
|
|
@@ -395,5 +416,5 @@ const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-
|
|
|
395
416
|
}
|
|
396
417
|
});
|
|
397
418
|
export {
|
|
398
|
-
|
|
419
|
+
no as default
|
|
399
420
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as B, ref as k, resolveComponent as g, openBlock as d, createBlock as F, withCtx as y, renderSlot as J, createVNode as m, createTextVNode as U, toDisplayString as f, createElementVNode as s, computed as N, createElementBlock as P, Fragment as w, renderList as K, unref as e, normalizeClass as Q, createCommentVNode as I, resolveDynamicComponent as H } from "vue";
|
|
2
|
-
import { u as G } from "./vue-i18n-
|
|
3
|
-
import { c as j } from "./index-
|
|
4
|
-
import { e as W, F as Y } from "./index-
|
|
5
|
-
import { C as ee } from "./membership-
|
|
6
|
-
import { Z as V } from "./zod-
|
|
7
|
-
import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as le } from "./business-
|
|
2
|
+
import { u as G } from "./vue-i18n-CmMTYitu.js";
|
|
3
|
+
import { c as j } from "./index-CM-qkxMr.js";
|
|
4
|
+
import { e as W, F as Y } from "./index-CZoTFXja.js";
|
|
5
|
+
import { C as ee } from "./membership-BjklIT2n.js";
|
|
6
|
+
import { Z as V } from "./zod-C5iXeYjP.js";
|
|
7
|
+
import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-ht4qyiQM.js";
|
|
8
|
+
import { u as le } from "./business-CEL6Cxr7.js";
|
|
9
9
|
import { useCoreStore as oe } from "@feedmepos/mf-common";
|
|
10
|
-
import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
13
|
-
import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { i as re } from "./helper-
|
|
10
|
+
import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js";
|
|
11
|
+
import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js";
|
|
12
|
+
import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-DQaMkTla.js";
|
|
13
|
+
import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CPJ4fCu-.js";
|
|
14
|
+
import { i as re } from "./helper-C9NBolO7.js";
|
|
15
15
|
const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
|
|
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
|
-
import { Z as d } from "./zod-
|
|
3
|
-
import { u as V } from "./vue-i18n-
|
|
2
|
+
import { Z as d } from "./zod-C5iXeYjP.js";
|
|
3
|
+
import { u as V } from "./vue-i18n-CmMTYitu.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"
|