@feedmepos/mf-connect 0.1.36-prod → 0.1.38-beta.1
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-O-qZWrFp.js +761 -0
- package/dist/{App-JwvQzmaf.js → App-BWZ2EE71.js} +364 -352
- package/dist/AuditLogs-DlmcFEta.js +1887 -0
- package/dist/{Bin-Boq091DE.js → Bin-C-Ha-4yF.js} +8 -8
- package/dist/{Broadcast-D7BIjPzg.js → Broadcast-Bo3QS8lS.js} +27 -25
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZFe69JWe.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-4vUMzH-l.js} +18 -18
- package/dist/{Card-C7v8otBk.js → Card-Bs1TDE0e.js} +159 -159
- package/dist/{Collections-C_pyDZJp.js → Collections-Dy5RN7Js.js} +103 -91
- package/dist/{Credit-B6I7vIo2.js → Credit-Bqc4dw1s.js} +74 -74
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DHQBxqsk.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js} +490 -488
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-cqK2WTuO.js → EffectSheet.vue_vue_type_style_index_0_lang-BzwADnKp.js} +91 -89
- package/dist/{Experience-RU6iI7eH.js → Experience-C2e2T7B-.js} +42 -42
- 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-B9Ojuamc.js → Game-C86eEhcx.js} +32 -32
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/{Index-Dv-YN9YC.js → Index-BRGweFco.js} +10 -10
- package/dist/Marketing-CnnrnXbS.js +20073 -0
- package/dist/{Member-BX81V3ON.js → Member-B3o0Zhcw.js} +76 -76
- package/dist/MemberList-BpE1IjED.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-C0FinB5E.js → MemberTransactions-C4hao-d9.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DZS17c8D.js → MessageInput.vue_vue_type_script_setup_true_lang-D9zfmqLs.js} +36 -36
- package/dist/{Mission-BV76Qq3Y.js → Mission-BURXfzjd.js} +21 -21
- package/dist/{Overview-CMK4VRZl.js → Overview-D_hrrM4O.js} +335 -335
- package/dist/{Point-CQWKh1jv.js → Point-CJXkJY5Q.js} +43 -41
- package/dist/Promotion-CunJrh42.js +289 -0
- package/dist/{Queue-CFNfJSux.js → Queue-v5Itg9J4.js} +52 -52
- package/dist/{Record-7_ssnQnB.js → Record-DJe4tg9R.js} +9 -9
- package/dist/{Reward-DOe1Tn2f.js → Reward-Y9aHpny5.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BsgR-dCL.js → RewardGroup.vue_vue_type_script_setup_true_lang-1KAjCblO.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BPw5L06B.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js} +635 -548
- package/dist/Segment-DVT8uDn8.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DPsLdEU8.js → SelectItems.vue_vue_type_script_setup_true_lang-BhJ-oVMb.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BAJLRxOM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-b5bjfBvc.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DUUzFkIc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js} +3 -3
- package/dist/{Setting-Bojfmtwf.js → Setting-BU5778gG.js} +432 -432
- package/dist/{Store-dfiUtq-f.js → Store-IWg0POAU.js} +211 -211
- package/dist/StoreRewards-CIjHcVoh.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D8ey57Te.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BcOvr526.js} +1 -1
- package/dist/{Tier-BIDShXJ6.js → Tier-iN30KD7g.js} +107 -107
- package/dist/{Title-CDdkVwEu.js → Title-Duh_Srek.js} +133 -131
- package/dist/{Transaction-lAUnd1c_.js → Transaction-DLBA7Svl.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BwaD8Nwy.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DLD5d43d.js} +6 -6
- package/dist/{Voucher-BARDbixZ.js → Voucher-cTvlMN0Y.js} +153 -123
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DkjojUvD.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CIk3GKLH.js → ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js} +1 -1
- package/dist/{app-Cq8zUKBx.js → app-A3oEKLq5.js} +1 -1
- package/dist/{app-KtD-iU16.js → app-De-yQ1CJ.js} +164 -125
- package/dist/app.js +4 -3
- package/dist/business-B2JBpm4y.js +79 -0
- package/dist/{campaign-NqTts9bj.js → campaign-Bhur0NJx.js} +9 -9
- package/dist/{campaign-DwArKZ1r.js → campaign-vkzui6F2.js} +5 -3
- package/dist/{campaign.enum-DQayyk1f.js → campaign.enum-DCYkKGhd.js} +1 -1
- package/dist/{campaign.fn-6uf_Z5m1.js → campaign.fn--affTEi5.js} +161 -161
- package/dist/{collectible.enum-CgjtJh8V.js → collectible.enum-CLBCnfev.js} +1 -1
- package/dist/{collection.fn-DuqcY399.js → collection.fn-bA8q0KYy.js} +2 -2
- package/dist/{dto-CQRn2lAW.js → dto-RCcWeYE0.js} +4 -4
- package/dist/{effect-B-sUUnjd.js → effect-D7qRfPe_.js} +1 -1
- package/dist/{email-addresses-D-kPsNBn.js → email-addresses-a8PqViID.js} +1 -1
- package/dist/{export-B28oHptg.js → export-BneqNRn4.js} +3 -3
- package/dist/{helper-DuBp_oW-.js → helper-DfvvxOyO.js} +1 -1
- package/dist/{index-CCNfzZ5t.js → index-2LpkG8Ye.js} +1 -1
- package/dist/{index-C2wsUy05.js → index-4kMeSNTr.js} +11447 -10969
- package/dist/{index-BgdUU6Za.js → index-B0T9GDIZ.js} +1 -1
- package/dist/{index-CczG_ilB.js → index-BWTvsoH0.js} +1 -1
- package/dist/index-CMBPIb8x.js +32260 -0
- package/dist/{index-DF4V4vur.js → index-CTKMdxSm.js} +1 -1
- package/dist/index-CVAWGMus.js +56 -0
- package/dist/index-CbsJ6vMJ.js +31 -0
- package/dist/{index-CSWnS__O.js → index-CrFUhsZO.js} +1 -1
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-CmOaBe_x.js → index-CtDqXnOp.js} +535 -460
- package/dist/{index-CECYN1oL.js → index-D0GnMoag.js} +181 -79
- package/dist/{index-BCslSeGm.js → index-DMrIQqFt.js} +1 -1
- package/dist/{index-BZYbNzed.js → index-DeXvASjP.js} +3 -3
- package/dist/{index-CUdis4Jl.js → index-y-7yUm2e.js} +10 -9
- package/dist/{index.esm2017-CVwbgLS0.js → index.esm2017-JtyypweZ.js} +127 -127
- package/dist/{loading-C-BSh5_w.js → loading-a-FqrwqI.js} +1 -1
- package/dist/{membership-BPpTsVq5.js → membership-CGVtil5J.js} +3 -3
- package/dist/{money-BSxQcP_f.js → money-CTc1l_Cq.js} +1 -1
- package/dist/{number-p7RPdTQ7.js → number-W3R-0nYP.js} +1 -1
- package/dist/objectid-BU0Y8iAN.js +145 -0
- package/dist/{plugins-5mIceCPA.js → plugins-D2sSgTSl.js} +2 -2
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/{reward-CaZY5kqg.js → reward-atP8vnNn.js} +1 -1
- package/dist/{rule-builder-yn_upY7a.js → rule-builder-BB29ZJ_C.js} +17 -17
- package/dist/{rule-DB6XK-iD.js → rule-eA5IvnjB.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{template-DbmV0nWD.js → template-DhBeDaAm.js} +64 -64
- package/dist/{trigger-DPl3HG2o.js → trigger-Bq_pZj1J.js} +7 -7
- package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
- package/dist/{user-DzwHXhvX.js → user-B-bhVFIG.js} +1 -1
- package/dist/{vue-i18n-BnN9jlFK.js → vue-i18n-D-h8VDSx.js} +343 -343
- package/dist/{xlsx-CrsYUgcS.js → xlsx-DsByAcZl.js} +226 -226
- package/package.json +5 -3
- package/dist/Analytic-C1LCniPD.js +0 -427
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/Marketing-CFgCJV0g.js +0 -317
- package/dist/MemberList-BjX8ND1p.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Promotion-CnFaEvhL.js +0 -255
- package/dist/Segment-DUP0JWK5.js +0 -882
- package/dist/StoreRewards-DJj-oM2n.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-oRUpDbZ_.js +0 -995
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-bDQs5ACo.js +0 -419
- package/dist/business-CFMUx5qO.js +0 -78
- package/dist/index-CuJ5OZqA.js +0 -29566
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-Dbd4WA4r.js +0 -61
- package/dist/index-mtAI1Gyn.js +0 -44
- package/dist/objectid-DkD1hn1F.js +0 -145
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
|
|
2
|
-
import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as C } from "./vue-i18n-
|
|
2
|
+
import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js";
|
|
3
|
+
import { u as C } from "./vue-i18n-D-h8VDSx.js";
|
|
4
4
|
const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
|
|
5
5
|
__name: "Transaction",
|
|
6
6
|
setup(V) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as y, computed as b, openBlock as i, createBlock as R, unref as l, ref as E, watch as k, resolveComponent as h, createElementBlock as g, createElementVNode as B, Fragment as O, renderList as T, createVNode as V, isRef as U, createCommentVNode as v } from "vue";
|
|
2
|
-
import "./index-
|
|
3
|
-
import { i as C, R as e } from "./rule-builder-
|
|
4
|
-
import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { p as N } from "./plugins-
|
|
6
|
-
import { u as S } from "./membership-
|
|
2
|
+
import "./index-y-7yUm2e.js";
|
|
3
|
+
import { i as C, R as e } from "./rule-builder-BB29ZJ_C.js";
|
|
4
|
+
import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js";
|
|
5
|
+
import { p as N } from "./plugins-D2sSgTSl.js";
|
|
6
|
+
import { u as S } from "./membership-CGVtil5J.js";
|
|
7
7
|
import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
|
|
8
|
-
import { u as x } from "./vue-i18n-
|
|
8
|
+
import { u as x } from "./vue-i18n-D-h8VDSx.js";
|
|
9
9
|
const A = /* @__PURE__ */ y({
|
|
10
10
|
__name: "SegmentConfigurator",
|
|
11
11
|
props: {
|
|
@@ -1,55 +1,73 @@
|
|
|
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
|
-
|
|
22
|
-
class: "aspect-square w-[150px]"
|
|
23
|
-
}, null, -1), Fe = { class: "flex flex-col gap-16 text-center" }, Ve = { class: "fm-typo-en-title-sm-800" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, We = /* @__PURE__ */ z({
|
|
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 h, 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-D2sSgTSl.js";
|
|
6
|
+
import { useCoreStore as ie } from "@feedmepos/mf-common";
|
|
7
|
+
import { u as se } from "./loading-a-FqrwqI.js";
|
|
8
|
+
import { u as le } from "./business-B2JBpm4y.js";
|
|
9
|
+
import { u as me } from "./campaign-vkzui6F2.js";
|
|
10
|
+
import { g as ue, a as O, b as B } from "./campaign-Bhur0NJx.js";
|
|
11
|
+
import "./index-CrFUhsZO.js";
|
|
12
|
+
import { u as de } from "./template-DhBeDaAm.js";
|
|
13
|
+
import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js";
|
|
14
|
+
import { _ as fe } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js";
|
|
15
|
+
import { u as ye } from "./vue-i18n-D-h8VDSx.js";
|
|
16
|
+
import { T as he } from "./trigger-Bq_pZj1J.js";
|
|
17
|
+
import { useRouter as ge } from "vue-router";
|
|
18
|
+
import { c as w } from "./index-BWTvsoH0.js";
|
|
19
|
+
import { R as H } from "./app-De-yQ1CJ.js";
|
|
20
|
+
var _e = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.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 = { class: "flex flex-col gap-16 text-center" }, Ue = { class: "fm-typo-en-title-sm-800" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ Y({
|
|
24
22
|
__name: "Voucher",
|
|
25
|
-
setup(
|
|
26
|
-
const { t: a } =
|
|
23
|
+
setup(Ie) {
|
|
24
|
+
const { t: a } = ye(), $ = {
|
|
27
25
|
label: a("connect.voucher.createCampaign"),
|
|
28
26
|
value: "create",
|
|
29
27
|
isPrimary: !0,
|
|
30
28
|
prependIcon: "add"
|
|
31
|
-
},
|
|
29
|
+
}, L = re(), K = de("VOUCHER", L), N = le(), p = me(), { global: D, minor: T } = se, U = ge(), i = x({
|
|
32
30
|
searchKey: "",
|
|
33
|
-
location:
|
|
34
|
-
|
|
31
|
+
location: [],
|
|
32
|
+
triggerType: []
|
|
33
|
+
}), _ = ee(
|
|
35
34
|
() => p.campaigns.voucher.filter(
|
|
36
|
-
(e) =>
|
|
35
|
+
(e) => q(e) && G(e)
|
|
37
36
|
)
|
|
38
|
-
),
|
|
37
|
+
), j = he.VOUCHER.map((e) => ({
|
|
38
|
+
label: e.name,
|
|
39
|
+
value: e.value
|
|
40
|
+
}));
|
|
41
|
+
function q(e) {
|
|
42
|
+
const o = i.value.location;
|
|
43
|
+
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
|
|
44
|
+
(r) => {
|
|
45
|
+
var s;
|
|
46
|
+
return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
|
|
47
|
+
}
|
|
48
|
+
) : e.targetLocation.includes(o);
|
|
49
|
+
}
|
|
50
|
+
function G(e) {
|
|
51
|
+
const o = i.value.triggerType;
|
|
52
|
+
if (!o || o.length === 0) return !0;
|
|
53
|
+
const r = e.event.type;
|
|
54
|
+
return o.includes(r);
|
|
55
|
+
}
|
|
56
|
+
const X = [
|
|
39
57
|
{
|
|
40
58
|
header: a("connect.voucher.voucherTitle"),
|
|
41
59
|
accessorFn: (e) => e.name
|
|
42
60
|
},
|
|
43
61
|
{
|
|
44
62
|
header: a("connect.voucher.status"),
|
|
45
|
-
accessorFn: (e) =>
|
|
63
|
+
accessorFn: (e) => ue(e),
|
|
46
64
|
cell(e) {
|
|
47
|
-
return
|
|
65
|
+
return O(e.row.original);
|
|
48
66
|
}
|
|
49
67
|
},
|
|
50
68
|
{
|
|
51
69
|
header: a("connect.voucher.summary"),
|
|
52
|
-
accessorFn: (e) =>
|
|
70
|
+
accessorFn: (e) => B(e)
|
|
53
71
|
},
|
|
54
72
|
{
|
|
55
73
|
header: a("connect.voucher.quota"),
|
|
@@ -69,19 +87,19 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
69
87
|
header: a("connect.voucher.actions"),
|
|
70
88
|
cell(e) {
|
|
71
89
|
return m("div", { class: "flex items-center justify-end" }, [
|
|
72
|
-
m(
|
|
90
|
+
m(f.FmButton, {
|
|
73
91
|
icon: "visibility",
|
|
74
92
|
variant: "tertiary",
|
|
75
93
|
iconColor: "neutral-gray-400",
|
|
76
94
|
onClick: async (o) => {
|
|
77
|
-
o.stopPropagation(), await
|
|
95
|
+
o.stopPropagation(), await U.push({
|
|
78
96
|
name: H["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
79
97
|
params: { id: e.row.original._id }
|
|
80
98
|
});
|
|
81
99
|
}
|
|
82
100
|
}),
|
|
83
101
|
m(
|
|
84
|
-
|
|
102
|
+
f.FmMenu,
|
|
85
103
|
{
|
|
86
104
|
placement: "bottom-end",
|
|
87
105
|
onClick: (o) => {
|
|
@@ -89,7 +107,7 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
89
107
|
}
|
|
90
108
|
},
|
|
91
109
|
{
|
|
92
|
-
"menu-button": () => m(
|
|
110
|
+
"menu-button": () => m(f.FmButton, {
|
|
93
111
|
icon: "more_vert",
|
|
94
112
|
iconColor: "neutral-gray-400",
|
|
95
113
|
variant: "tertiary"
|
|
@@ -97,10 +115,10 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
97
115
|
default: () => {
|
|
98
116
|
const o = [
|
|
99
117
|
m(
|
|
100
|
-
|
|
118
|
+
f.FmMenuItem,
|
|
101
119
|
{
|
|
102
|
-
onClick: async (
|
|
103
|
-
|
|
120
|
+
onClick: async (r) => {
|
|
121
|
+
r.stopPropagation(), I(e.row.original);
|
|
104
122
|
}
|
|
105
123
|
},
|
|
106
124
|
{
|
|
@@ -115,27 +133,27 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
115
133
|
)
|
|
116
134
|
];
|
|
117
135
|
return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
|
|
118
|
-
m(
|
|
136
|
+
m(f.FmMenuItem, {
|
|
119
137
|
label: a("connect.voucher.send"),
|
|
120
|
-
onClick: async (
|
|
121
|
-
var
|
|
122
|
-
|
|
138
|
+
onClick: async (r) => {
|
|
139
|
+
var s;
|
|
140
|
+
r.stopPropagation(), (s = b.value) == null || s.showSheet({
|
|
123
141
|
campaignId: e.row.original._id
|
|
124
142
|
});
|
|
125
143
|
}
|
|
126
144
|
})
|
|
127
145
|
), o.unshift(
|
|
128
|
-
m(
|
|
146
|
+
m(f.FmMenuItem, {
|
|
129
147
|
label: a("connect.voucher.share"),
|
|
130
|
-
onClick: async (
|
|
131
|
-
if (
|
|
148
|
+
onClick: async (r) => {
|
|
149
|
+
if (r.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
|
|
132
150
|
return await A.confirm(
|
|
133
151
|
"Cannot share a voucher that is not a simple claim.",
|
|
134
152
|
"Share Voucher",
|
|
135
153
|
"OK"
|
|
136
154
|
);
|
|
137
|
-
await
|
|
138
|
-
`https://${
|
|
155
|
+
await ce(
|
|
156
|
+
`https://${ie().currentBusiness.value._id}.${_e.appUrl}/vouchers/${e.row.original._id}`,
|
|
139
157
|
{
|
|
140
158
|
successMessage: "Voucher link copied to clipboard"
|
|
141
159
|
}
|
|
@@ -149,9 +167,9 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
149
167
|
]);
|
|
150
168
|
}
|
|
151
169
|
}
|
|
152
|
-
],
|
|
153
|
-
async function
|
|
154
|
-
await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await
|
|
170
|
+
], P = x(), b = x();
|
|
171
|
+
async function I(e) {
|
|
172
|
+
await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await T(
|
|
155
173
|
async () => {
|
|
156
174
|
await w.delete(e._id), await p.read("VOUCHER");
|
|
157
175
|
},
|
|
@@ -164,33 +182,33 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
164
182
|
);
|
|
165
183
|
}
|
|
166
184
|
async function v(e) {
|
|
167
|
-
e ? await o() :
|
|
168
|
-
await o(
|
|
185
|
+
e ? await o() : K.open(async (r) => {
|
|
186
|
+
await o(r);
|
|
169
187
|
});
|
|
170
|
-
async function o(
|
|
171
|
-
var
|
|
172
|
-
(
|
|
188
|
+
async function o(r) {
|
|
189
|
+
var s;
|
|
190
|
+
(s = P.value) == null || s.showSheet(
|
|
173
191
|
!0,
|
|
174
192
|
"VOUCHER",
|
|
175
193
|
e ? await w.readById(e._id) : void 0,
|
|
176
|
-
|
|
194
|
+
r
|
|
177
195
|
);
|
|
178
196
|
}
|
|
179
197
|
}
|
|
180
|
-
async function
|
|
198
|
+
async function W(e) {
|
|
181
199
|
e.campaign._id && await new Promise((o) => {
|
|
182
|
-
|
|
200
|
+
L.open({
|
|
183
201
|
title: "Confirmation",
|
|
184
202
|
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
185
203
|
primaryActions: { text: "Update all", close: !0 },
|
|
186
204
|
secondaryActions: { text: "Update future only", close: !0 }
|
|
187
205
|
}).onPrimary(async () => {
|
|
188
|
-
var
|
|
189
|
-
e.updateCollections = !0, (
|
|
206
|
+
var r;
|
|
207
|
+
e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
|
|
190
208
|
}).onSecondary(async () => {
|
|
191
209
|
o();
|
|
192
210
|
});
|
|
193
|
-
}), await
|
|
211
|
+
}), await T(
|
|
194
212
|
async () => {
|
|
195
213
|
e.campaign._id ? await w.update(e.campaign._id, e) : await w.create(e), await p.read("VOUCHER");
|
|
196
214
|
},
|
|
@@ -204,108 +222,117 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
204
222
|
}
|
|
205
223
|
);
|
|
206
224
|
}
|
|
207
|
-
return
|
|
208
|
-
await
|
|
225
|
+
return oe(async () => {
|
|
226
|
+
await D(async () => {
|
|
209
227
|
await p.read("VOUCHER");
|
|
210
228
|
});
|
|
211
229
|
}), (e, o) => {
|
|
212
|
-
const
|
|
213
|
-
return u(), S
|
|
214
|
-
|
|
230
|
+
const r = d("FmPageHead"), s = d("FmSearch"), z = d("FmTable"), C = d("FmButton"), Q = d("FmListItem"), Z = d("FmList"), J = d("FmCard");
|
|
231
|
+
return u(), V(S, null, [
|
|
232
|
+
l(r, {
|
|
215
233
|
title: t(a)("connect.voucher.title"),
|
|
216
|
-
actions: t(
|
|
234
|
+
actions: t(_).length > 0 ? [$] : [],
|
|
217
235
|
"onClick:action": o[0] || (o[0] = () => v())
|
|
218
236
|
}, null, 8, ["title", "actions"]),
|
|
219
|
-
|
|
220
|
-
s
|
|
237
|
+
c("div", ve, [
|
|
238
|
+
l(s, {
|
|
221
239
|
modelValue: t(i).searchKey,
|
|
222
240
|
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
|
|
223
241
|
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
224
242
|
placeholder: t(a)("connect.voucher.search"),
|
|
225
243
|
collapsible: ""
|
|
226
244
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
227
|
-
t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), S
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
245
|
+
t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), V(S, { key: 0 }, [
|
|
246
|
+
c("div", Ce, [
|
|
247
|
+
c("div", we, [
|
|
248
|
+
l(M, {
|
|
249
|
+
label: `${t(a)("connect.common.location")}: `,
|
|
250
|
+
"right-icon": "keyboard_arrow_down",
|
|
231
251
|
modelValue: t(i).location,
|
|
232
252
|
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
|
|
233
|
-
label: t(a)("connect.voucher.location"),
|
|
234
|
-
"show-item-label": !0,
|
|
235
253
|
icon: "storefront",
|
|
236
|
-
|
|
237
|
-
items: t(
|
|
238
|
-
}, null, 8, ["
|
|
254
|
+
"show-item-label": !0,
|
|
255
|
+
items: t(N).locationOptions
|
|
256
|
+
}, null, 8, ["label", "modelValue", "items"]),
|
|
257
|
+
l(M, {
|
|
258
|
+
label: "Type:",
|
|
259
|
+
"right-icon": "keyboard_arrow_down",
|
|
260
|
+
modelValue: t(i).triggerType,
|
|
261
|
+
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
|
|
262
|
+
icon: "filter_list",
|
|
263
|
+
"show-item-label": !0,
|
|
264
|
+
items: t(j)
|
|
265
|
+
}, null, 8, ["modelValue", "items"])
|
|
239
266
|
]),
|
|
240
|
-
s
|
|
267
|
+
l(s, {
|
|
241
268
|
modelValue: t(i).searchKey,
|
|
242
|
-
"onUpdate:modelValue": o[
|
|
269
|
+
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
|
|
243
270
|
class: "xs:hidden",
|
|
244
271
|
placeholder: t(a)("connect.voucher.search"),
|
|
245
272
|
collapsible: ""
|
|
246
273
|
}, null, 8, ["modelValue", "placeholder"])
|
|
247
274
|
]),
|
|
248
|
-
|
|
275
|
+
l(z, {
|
|
249
276
|
class: "xs:hidden",
|
|
250
|
-
"row-data": t(
|
|
251
|
-
"column-defs":
|
|
277
|
+
"row-data": t(_),
|
|
278
|
+
"column-defs": X,
|
|
252
279
|
"search-value": t(i).searchKey,
|
|
253
280
|
"column-filter": [],
|
|
254
|
-
onRowClick: o[
|
|
255
|
-
"hide-footer": t(
|
|
281
|
+
onRowClick: o[5] || (o[5] = (n) => v(n.original)),
|
|
282
|
+
"hide-footer": t(_).length < 10
|
|
256
283
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
257
|
-
|
|
258
|
-
default:
|
|
259
|
-
(u(!0), S
|
|
284
|
+
l(Z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
285
|
+
default: F(() => [
|
|
286
|
+
(u(!0), V(S, null, te(t(_).filter(
|
|
260
287
|
(n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
261
|
-
), (n) => (u(),
|
|
288
|
+
), (n) => (u(), h(Q, {
|
|
262
289
|
key: n._id.toString(),
|
|
263
|
-
onClick: (
|
|
290
|
+
onClick: (k) => v(n),
|
|
264
291
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
265
292
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
var
|
|
293
|
+
default: F(() => {
|
|
294
|
+
var k;
|
|
268
295
|
return [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
(u(),
|
|
272
|
-
|
|
296
|
+
c("div", be, [
|
|
297
|
+
c("div", ke, [
|
|
298
|
+
(u(), h(ne(t(O)(n)))),
|
|
299
|
+
c("div", xe, g(((k = n.pf_collectible) == null ? void 0 : k.currentReceive) ?? 0) + " claimed ", 1)
|
|
273
300
|
]),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
301
|
+
c("div", Ve, [
|
|
302
|
+
c("div", Se, g(n.name), 1),
|
|
303
|
+
c("div", Fe, g(t(B)(n)), 1)
|
|
277
304
|
])
|
|
278
305
|
]),
|
|
279
|
-
|
|
280
|
-
n.event.type === "SIMPLE_CLAIM" ? (u(),
|
|
306
|
+
c("div", Le, [
|
|
307
|
+
n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
|
|
281
308
|
key: 0,
|
|
282
309
|
icon: "visibility",
|
|
283
310
|
"icon-color": "neutral-gray-400",
|
|
284
311
|
variant: "tertiary",
|
|
285
|
-
onClick: async (
|
|
286
|
-
|
|
312
|
+
onClick: async (y) => {
|
|
313
|
+
y.stopPropagation(), await t(U).push({
|
|
287
314
|
name: t(H)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
288
315
|
params: { id: n._id }
|
|
289
316
|
});
|
|
290
317
|
}
|
|
291
318
|
}, null, 8, ["onClick"])) : E("", !0),
|
|
292
|
-
n.event.type === "SIMPLE_CLAIM" ? (u(),
|
|
319
|
+
n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
|
|
293
320
|
key: 1,
|
|
294
321
|
icon: "send",
|
|
295
322
|
"icon-color": "neutral-gray-400",
|
|
296
323
|
variant: "tertiary",
|
|
297
|
-
onClick: (
|
|
324
|
+
onClick: (y) => {
|
|
298
325
|
var R;
|
|
299
|
-
|
|
326
|
+
y.stopPropagation(), (R = t(b)) == null || R.showSheet({
|
|
300
327
|
campaignId: n._id
|
|
301
328
|
});
|
|
302
329
|
}
|
|
303
330
|
}, null, 8, ["onClick"])) : E("", !0),
|
|
304
|
-
|
|
331
|
+
l(C, {
|
|
305
332
|
icon: "delete",
|
|
306
333
|
"icon-color": "neutral-gray-400",
|
|
307
334
|
variant: "tertiary",
|
|
308
|
-
onClick: (
|
|
335
|
+
onClick: (y) => (y.stopPropagation(), I(n))
|
|
309
336
|
}, null, 8, ["onClick"])
|
|
310
337
|
])
|
|
311
338
|
];
|
|
@@ -315,32 +342,35 @@ const fe = { class: "px-24 flex flex-col gap-y-16" }, ye = { class: "flex items-
|
|
|
315
342
|
]),
|
|
316
343
|
_: 1
|
|
317
344
|
})
|
|
318
|
-
], 64)) : (u(),
|
|
345
|
+
], 64)) : (u(), h(J, {
|
|
319
346
|
key: 1,
|
|
320
347
|
variant: "outlined",
|
|
321
348
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
322
349
|
}, {
|
|
323
|
-
default:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
350
|
+
default: F(() => [
|
|
351
|
+
o[7] || (o[7] = c("img", {
|
|
352
|
+
src: ae,
|
|
353
|
+
class: "aspect-square w-[150px]"
|
|
354
|
+
}, null, -1)),
|
|
355
|
+
c("div", Te, [
|
|
356
|
+
c("div", Ue, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
|
|
357
|
+
c("div", Pe, 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
|
+
Je as default
|
|
354
384
|
};
|