@feedmepos/mf-connect 0.1.0-beta.34 → 0.1.0-beta.35
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-DYfm1eg5.js → Analytic-BMdB7x5F.js} +9 -9
- package/dist/{App-DV85I2xq.js → App-AakWqQHx.js} +6 -6
- package/dist/{Broadcast-CNpwvxRx.js → Broadcast-Bf5GOV7p.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bv8Ki3vl.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BBTBapxi.js} +7 -7
- package/dist/{Card-Bk4hfK9U.js → Card-DmxekNts.js} +15 -15
- package/dist/{Collections-CrND62Vz.js → Collections-CL7hOycU.js} +4 -4
- package/dist/{Credit-ICo98p8n.js → Credit-0eGxacBN.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-LFtf2JM3.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLWeJ73S.js} +27 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CdVIbAT3.js → EffectSheet.vue_vue_type_style_index_0_lang-q7qJ9Ec5.js} +6 -6
- package/dist/{Experience-BqMJUymq.js → Experience-NjmDx3_p.js} +8 -8
- package/dist/{Game-DvjisU7I.js → Game-q19qmf8t.js} +8 -8
- package/dist/{Index-Vbv5hpsB.js → Index-BmzHphDm.js} +9 -9
- package/dist/{Marketing-CU6GUm2L.js → Marketing-BgL2CqkH.js} +5 -5
- package/dist/{Member-Dcyb6og-.js → Member-DXO7yer0.js} +4 -4
- package/dist/{MemberList-CBO6SVE-.js → MemberList-WGMopz-y.js} +14 -14
- package/dist/{MemberTransactions-BuPoUtjA.js → MemberTransactions-DmQgrLdy.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B_q37PEs.js → MessageInput.vue_vue_type_script_setup_true_lang-DFiCQcTe.js} +2 -2
- package/dist/{Mission-_Vi8gaKQ.js → Mission-DOdkoytR.js} +8 -8
- package/dist/{Overview-8ZkvZh2U.js → Overview-Bizp0BGu.js} +413 -396
- package/dist/{Point-BqmJ8ak3.js → Point-Bvyg1zuh.js} +8 -8
- package/dist/{Promotion-CDOtfUpE.js → Promotion-B75LcnHm.js} +9 -9
- package/dist/{Record-NUadzYL2.js → Record-BjAbPbiI.js} +5 -5
- package/dist/{Reward-CgRFzQHO.js → Reward-l1gt8pwu.js} +34 -34
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Cg5cJLSS.js → RewardGroup.vue_vue_type_script_setup_true_lang-C76emk8A.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Bac_RiwJ.js → RuleGroup.vue_vue_type_script_setup_true_lang-B4ak1Gem.js} +13 -13
- package/dist/{Segment-bHLt_9xi.js → Segment-DJSkWWH8.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DWulr5sA.js → SelectItems.vue_vue_type_script_setup_true_lang-ByqgSxPo.js} +2 -2
- package/dist/{Setting-AQjJ0LBm.js → Setting-DTV24iE5.js} +8 -8
- package/dist/{Store-DzGhYzS9.js → Store-C1obQwdr.js} +18 -18
- package/dist/{StoreRewards-BN33UZrN.js → StoreRewards-apMVv0Ca.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CF7R6Mbf.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DBzA_4gb.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C3wxmJBS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-PxZ5Au5X.js} +1 -1
- package/dist/{Tier-BaIm0-nO.js → Tier-DSvMUZJG.js} +19 -19
- package/dist/{Title-CGU2TRSf.js → Title-CWoqOkd2.js} +19 -19
- package/dist/{Transaction-DA2CK2a4.js → Transaction-CaCsXoB5.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DSVVsk_u.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DaT8PyWl.js} +6 -6
- package/dist/{Voucher-Bzh_fJpa.js → Voucher-BBtDXr9q.js} +11 -11
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bflyp1V0.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BCSO2-oB.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Wh_Pc7qk.js → ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js} +1 -1
- package/dist/{app-Ceasya0M.js → app-B8JBXu5M.js} +212 -186
- package/dist/{app-CBijF7l9.js → app-D8kcy7_R.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-BJ-cyfj6.js → business-DN4-BTel.js} +1 -1
- package/dist/{campaign-B5Cvxv_n.js → campaign-Cf6jJz3e.js} +2 -2
- package/dist/{campaign.enum-CwvY4pwh.js → campaign.enum-DVOwgVTa.js} +1 -1
- package/dist/{campaign.fn-CWcwUEiZ.js → campaign.fn-D8apF_YE.js} +30 -30
- package/dist/{collectible.enum-COdcR96r.js → collectible.enum-DPsEC03C.js} +1 -1
- package/dist/{collection.fn-BTQbGCVW.js → collection.fn-CzeGWVx2.js} +2 -2
- package/dist/{dto-BnknKYcg.js → dto-D94IgAXy.js} +10 -10
- package/dist/{effect-DqWwcDoL.js → effect-CDg44P_g.js} +1 -1
- package/dist/{email-addresses-DPPlvfPT.js → email-addresses-CDozpvzz.js} +1 -1
- package/dist/{export-FXBFFRdK.js → export-DQLXrn4F.js} +3 -3
- package/dist/{helper-C776lUH-.js → helper-DJMf--V-.js} +1 -1
- package/dist/{index-Cgaj4reE.js → index-B0n_PU3b.js} +1 -1
- package/dist/{index-C1aWGTdZ.js → index-BUZR5Bkw.js} +1 -1
- package/dist/{index-CRlD2sul.js → index-BbPavTej.js} +3 -3
- package/dist/{index-BjAdYoh3.js → index-BgXfVzZF.js} +7 -7
- package/dist/{index-I27oHD1a.js → index-BmblCnlD.js} +1 -1
- package/dist/{index-CxU9mwRl.js → index-BnbkejyF.js} +1 -1
- package/dist/{index-CZaQ-veW.js → index-CVV5I3bh.js} +1 -1
- package/dist/{index-Dw1WniG7.js → index-DFbITElv.js} +44 -42
- package/dist/{index-BG5txN30.js → index-Df84_Ww3.js} +3 -3
- package/dist/{index-D62SBn2q.js → index-DrvefOT4.js} +3 -3
- package/dist/{index-DeMgVwv8.js → index-DvE5xL4s.js} +2 -2
- package/dist/{index-CpD4ezv2.js → index-V6yWwXYr.js} +1 -1
- package/dist/{index.esm2017-Cf8UXsST.js → index.esm2017-C90-ettH.js} +1 -1
- package/dist/{loading-DCSdIZqP.js → loading-B56wz_ef.js} +4 -4
- package/dist/{membership-KiKcnWxt.js → membership-CF1jgR11.js} +3 -3
- package/dist/{money-B_LMR19r.js → money-BEEp2WdU.js} +1 -1
- package/dist/{number-Bk18T5Xb.js → number-u7HbwLPt.js} +1 -1
- package/dist/{objectid-CZ5qnZ1J.js → objectid-S3_nH1F7.js} +8 -8
- package/dist/{reward-ozVC4wTW.js → reward-BUY77BiP.js} +1 -1
- package/dist/{rule-CWT8hI3A.js → rule-BdAPBN8_.js} +3 -3
- package/dist/{rule-builder-DTEvWEjJ.js → rule-builder-z51VUtHk.js} +1 -1
- package/dist/{template-9N1FRXDZ.js → template-B_J4Q9D6.js} +4 -4
- package/dist/{trigger-C2-zYC46.js → trigger-CGrv0M0q.js} +4 -4
- package/dist/{user-DBxVxr4P.js → user-D02jOhtd.js} +1 -1
- package/dist/{vue-i18n-BK0qKZu-.js → vue-i18n-rCSjqg2P.js} +288 -288
- package/dist/{xlsx-CmKV4f40.js → xlsx-CL102mzm.js} +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as Y, resolveComponent as
|
|
1
|
+
import { defineComponent as Y, resolveComponent as _, openBlock as S, createElementBlock as E, Fragment as z, createVNode as d, withCtx as V, createElementVNode as a, toDisplayString as O, unref as t, renderSlot as he, ref as F, computed as G, watch as se, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as ie, createTextVNode as de, createCommentVNode as W, h as te, onMounted as ve } from "vue";
|
|
2
2
|
import { _ as ge } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { u as
|
|
4
|
-
import { c as we, p as
|
|
3
|
+
import { u as Z } from "./vue-i18n-rCSjqg2P.js";
|
|
4
|
+
import { c as we, p as q, u as ce } from "./loading-B56wz_ef.js";
|
|
5
5
|
import { J as X } from "./JsonViewer-v8_C7l5N.js";
|
|
6
6
|
import { Z as N } from "./zod-Bg2FbC-D.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as Q, _ as _e } from "./RewardGroup.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { u as ue } from "./reward-
|
|
10
|
-
import "./index-
|
|
11
|
-
import "./index-
|
|
12
|
-
import { j as le, k as ye } from "./index-
|
|
13
|
-
import { a as be, b as xe } from "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./index-
|
|
16
|
-
import { C as me } from "./membership-
|
|
17
|
-
import { t as ee } from "./helper-
|
|
7
|
+
import { u as K } from "./app-wDQR6dpb.js";
|
|
8
|
+
import { u as Q, _ as _e } from "./RewardGroup.vue_vue_type_script_setup_true_lang-C76emk8A.js";
|
|
9
|
+
import { u as ue } from "./reward-BUY77BiP.js";
|
|
10
|
+
import "./index-Df84_Ww3.js";
|
|
11
|
+
import "./index-DvE5xL4s.js";
|
|
12
|
+
import { j as le, k as ye } from "./index-DFbITElv.js";
|
|
13
|
+
import { a as be, b as xe } from "./index-BgXfVzZF.js";
|
|
14
|
+
import "./index-B0n_PU3b.js";
|
|
15
|
+
import "./index-BbPavTej.js";
|
|
16
|
+
import { C as me } from "./membership-CF1jgR11.js";
|
|
17
|
+
import { t as ee } from "./helper-DJMf--V-.js";
|
|
18
18
|
import { c as H } from "./object-qECH92oz.js";
|
|
19
19
|
import { useDialog as Re, components as oe } from "@feedmepos/ui-library";
|
|
20
|
-
import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { a as Se, _ as Fe } from "./trigger-
|
|
22
|
-
import { O as ke } from "./objectid-
|
|
23
|
-
import { r as fe } from "./index-
|
|
24
|
-
import { u as $e } from "./business-
|
|
25
|
-
const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" },
|
|
20
|
+
import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BTm3pDid.js";
|
|
21
|
+
import { a as Se, _ as Fe } from "./trigger-CGrv0M0q.js";
|
|
22
|
+
import { O as ke } from "./objectid-S3_nH1F7.js";
|
|
23
|
+
import { r as fe } from "./index-BmblCnlD.js";
|
|
24
|
+
import { u as $e } from "./business-DN4-BTel.js";
|
|
25
|
+
const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Ie = { class: "flex-1" }, Te = { class: "flex items-center gap-8" }, Ue = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "flex gap-8 items-center" }, Le = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Ee = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Oe = { class: "flex-1 space-y-4" }, je = { class: "fm-typo-en-body-lg-600" }, De = /* @__PURE__ */ Y({
|
|
26
26
|
__name: "ReferralRewadGroupCard",
|
|
27
27
|
props: {
|
|
28
28
|
rewardGroup: {
|
|
@@ -35,37 +35,37 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
emits: ["edit", "addCount", "remove"],
|
|
38
|
-
setup(
|
|
39
|
-
const { t:
|
|
40
|
-
return (
|
|
41
|
-
const n =
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
onClick:
|
|
38
|
+
setup(k, { emit: m }) {
|
|
39
|
+
const { t: I } = Z(), p = m;
|
|
40
|
+
return (w, f) => {
|
|
41
|
+
const n = _("FmButton"), c = _("FmListItem");
|
|
42
|
+
return S(), E(z, null, [
|
|
43
|
+
d(c, {
|
|
44
|
+
onClick: f[4] || (f[4] = (u) => p("edit", k.level)),
|
|
45
45
|
class: "!p-0"
|
|
46
46
|
}, {
|
|
47
|
-
default:
|
|
47
|
+
default: V(() => [
|
|
48
48
|
a("div", Pe, [
|
|
49
|
-
a("div",
|
|
50
|
-
a("div",
|
|
49
|
+
a("div", Ve, [
|
|
50
|
+
a("div", Ie, [
|
|
51
51
|
a("div", Te, [
|
|
52
|
-
a("div", Ue, O(
|
|
52
|
+
a("div", Ue, O(k.rewardGroup.name), 1)
|
|
53
53
|
])
|
|
54
54
|
])
|
|
55
55
|
]),
|
|
56
56
|
a("div", Ae, [
|
|
57
|
-
|
|
57
|
+
d(n, {
|
|
58
58
|
variant: "secondary",
|
|
59
|
-
label:
|
|
59
|
+
label: t(I)("connect.referral.reward.add_count"),
|
|
60
60
|
icon: "add",
|
|
61
|
-
onClick:
|
|
62
|
-
u.stopPropagation(), p("addCount",
|
|
61
|
+
onClick: f[0] || (f[0] = (u) => {
|
|
62
|
+
u.stopPropagation(), p("addCount", k.level);
|
|
63
63
|
})
|
|
64
64
|
}, null, 8, ["label"]),
|
|
65
|
-
|
|
65
|
+
d(n, {
|
|
66
66
|
icon: "delete",
|
|
67
|
-
onClick:
|
|
68
|
-
u.stopPropagation(), p("remove",
|
|
67
|
+
onClick: f[1] || (f[1] = (u) => {
|
|
68
|
+
u.stopPropagation(), p("remove", k.level);
|
|
69
69
|
}),
|
|
70
70
|
variant: "tertiary"
|
|
71
71
|
})
|
|
@@ -76,46 +76,46 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
76
76
|
a("div", Ee, [
|
|
77
77
|
a("div", Oe, [
|
|
78
78
|
a("div", null, [
|
|
79
|
-
a("div", je, O(
|
|
79
|
+
a("div", je, O(k.rewardGroup.name), 1)
|
|
80
80
|
])
|
|
81
81
|
])
|
|
82
82
|
]),
|
|
83
|
-
|
|
83
|
+
d(n, {
|
|
84
84
|
variant: "tertiary",
|
|
85
85
|
icon: "delete",
|
|
86
|
-
onClick:
|
|
86
|
+
onClick: f[2] || (f[2] = (u) => (u.stopPropagation(), p("remove", k.level)))
|
|
87
87
|
})
|
|
88
88
|
]),
|
|
89
|
-
|
|
89
|
+
d(n, {
|
|
90
90
|
class: "w-full",
|
|
91
91
|
variant: "secondary",
|
|
92
92
|
label: "Add count",
|
|
93
93
|
disabled: !0,
|
|
94
94
|
icon: "add",
|
|
95
|
-
onClick:
|
|
95
|
+
onClick: f[3] || (f[3] = (u) => (u.stopPropagation(), p("addCount", k.level)))
|
|
96
96
|
})
|
|
97
97
|
])
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}),
|
|
101
|
-
he(
|
|
101
|
+
he(w.$slots, "default")
|
|
102
102
|
], 64);
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
}), Ge = { class: "flex flex-col space-y-16 pr-12" }, Me = { class: "flex gap-16 items-center" }, Ne = { class: "fm-typo-en-title-sm-800" }, He = { class: "flex items-center gap-8" }, ze = /* @__PURE__ */ Y({
|
|
106
106
|
__name: "EditReferralCountSheet",
|
|
107
107
|
emits: ["update"],
|
|
108
|
-
setup(
|
|
109
|
-
const { t: p } =
|
|
110
|
-
var $, U, P,
|
|
111
|
-
const
|
|
112
|
-
|
|
108
|
+
setup(k, { expose: m, emit: I }) {
|
|
109
|
+
const { t: p } = Z(), w = I, f = F(!1), n = F({}), c = F(-1), u = F(-1), R = Q(), A = be.superRefine((e, r) => {
|
|
110
|
+
var $, U, P, x, v, B, ae;
|
|
111
|
+
const i = u.value == -1 ? ((P = (U = ($ = R.referralProgram) == null ? void 0 : $.reward[c.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : u.value, g = (v = (x = R.referralProgram) == null ? void 0 : x.reward[c.value]) == null ? void 0 : v.rewards[i - 1], b = (ae = (B = R.referralProgram) == null ? void 0 : B.reward[c.value]) == null ? void 0 : ae.rewards[i + 1];
|
|
112
|
+
g && e.threshold.from < g.threshold.from + 1 && r.addIssue({
|
|
113
113
|
code: "custom",
|
|
114
|
-
message: `The min referral must be at least ${
|
|
114
|
+
message: `The min referral must be at least ${g.threshold.from + 1}`,
|
|
115
115
|
path: ["option"]
|
|
116
|
-
}),
|
|
116
|
+
}), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && r.addIssue({
|
|
117
117
|
code: "custom",
|
|
118
|
-
message: `The max referral must be at most ${
|
|
118
|
+
message: `The max referral must be at most ${b.threshold.to - 2}`,
|
|
119
119
|
path: ["option"]
|
|
120
120
|
});
|
|
121
121
|
}), T = G(() => {
|
|
@@ -124,21 +124,21 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
124
124
|
});
|
|
125
125
|
function M() {
|
|
126
126
|
const e = A.safeParse(n.value);
|
|
127
|
-
e.success &&
|
|
127
|
+
e.success && w("update", {
|
|
128
128
|
groupIndex: c.value,
|
|
129
129
|
countIndex: u.value,
|
|
130
130
|
referralCount: e.data
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
async function D(e,
|
|
134
|
-
var
|
|
135
|
-
if (
|
|
136
|
-
c.value =
|
|
137
|
-
(
|
|
133
|
+
async function D(e, r) {
|
|
134
|
+
var i, g, b, $, U, P;
|
|
135
|
+
if (f.value = e, e && typeof (r == null ? void 0 : r.countIndex) == "number" && r.countIndex >= 0)
|
|
136
|
+
c.value = r.groupIndex, u.value = r.countIndex, n.value = H(
|
|
137
|
+
(i = R.referralProgram) == null ? void 0 : i.reward[r.groupIndex].rewards[r.countIndex]
|
|
138
138
|
);
|
|
139
139
|
else {
|
|
140
|
-
c.value =
|
|
141
|
-
const
|
|
140
|
+
c.value = r.groupIndex, u.value = -1;
|
|
141
|
+
const x = u.value == -1 ? (($ = (b = (g = R.referralProgram) == null ? void 0 : g.reward[c.value]) == null ? void 0 : b.rewards) == null ? void 0 : $.length) || 0 : u.value, v = (P = (U = R.referralProgram) == null ? void 0 : U.reward[c.value]) == null ? void 0 : P.rewards[x - 1];
|
|
142
142
|
n.value = {
|
|
143
143
|
threshold: {
|
|
144
144
|
from: v != null && v.threshold ? v != null && v.threshold.to ? v.threshold.to + 1 : (v == null ? void 0 : v.threshold.from) + 1 : 1,
|
|
@@ -148,13 +148,13 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
h.value = [], h.value = l.value.map(
|
|
151
|
-
(
|
|
151
|
+
(x) => n.value.rewards.includes(x.id)
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
function L() {
|
|
155
|
-
|
|
155
|
+
f.value = !1;
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const y = [
|
|
158
158
|
{
|
|
159
159
|
header: "Reward title",
|
|
160
160
|
accessorFn: (e) => e.name,
|
|
@@ -171,19 +171,19 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
171
171
|
header: "Description",
|
|
172
172
|
accessorFn: (e) => e.description,
|
|
173
173
|
cell(e) {
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
return
|
|
174
|
+
const r = e.row.original;
|
|
175
|
+
if (r.collectible.type == "VOUCHER" || r.selectedReward == null)
|
|
176
|
+
return r.description;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
], s = ue(), o =
|
|
180
|
-
let
|
|
179
|
+
], s = ue(), o = F([]), l = G(() => s.rewards.map((e) => {
|
|
180
|
+
let r = "No expiry";
|
|
181
181
|
switch (e.option.type) {
|
|
182
182
|
case "VOUCHER":
|
|
183
|
-
|
|
183
|
+
r = `${e.option.collectibleConfig.options.maxUse} use(s), ${ee(e.option.collectibleConfig.options.validityOption || {})}`;
|
|
184
184
|
break;
|
|
185
185
|
case "LOYALTY":
|
|
186
|
-
|
|
186
|
+
r = `${e.option.earningOption.amount}, ${ee(e.option.validityOption || {})}`;
|
|
187
187
|
break;
|
|
188
188
|
}
|
|
189
189
|
return {
|
|
@@ -191,64 +191,64 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
191
191
|
name: e.name,
|
|
192
192
|
collectible: e.option,
|
|
193
193
|
collectibleConfig: e.collectibleConfig,
|
|
194
|
-
description:
|
|
194
|
+
description: r
|
|
195
195
|
};
|
|
196
196
|
}));
|
|
197
197
|
G(() => []);
|
|
198
|
-
function
|
|
198
|
+
function C() {
|
|
199
199
|
const e = l.value;
|
|
200
|
-
for (let
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
(
|
|
200
|
+
for (let r = 0; r < e.length; r++) {
|
|
201
|
+
const i = e[r], g = h.value[r];
|
|
202
|
+
g && !n.value.rewards.includes(i.id) && n.value.rewards.push(i.id), !g && n.value.rewards.includes(i.id) && (n.value.rewards = n.value.rewards.filter(
|
|
203
|
+
(b) => b != i.id
|
|
204
204
|
));
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
const h =
|
|
208
|
-
return se(h,
|
|
207
|
+
const h = F({});
|
|
208
|
+
return se(h, C, { deep: !0 }), m({
|
|
209
209
|
showSheet: D,
|
|
210
210
|
hideSheet: L,
|
|
211
211
|
data: n
|
|
212
|
-
}), (e,
|
|
213
|
-
const
|
|
214
|
-
return
|
|
212
|
+
}), (e, r) => {
|
|
213
|
+
const i = _("FmStepperField"), g = _("FmHelperText"), b = _("FmTable"), $ = _("FmButton"), U = _("FmSideSheet");
|
|
214
|
+
return S(), j(U, {
|
|
215
215
|
"max-width": 1e3,
|
|
216
|
-
modelValue:
|
|
217
|
-
"onUpdate:modelValue":
|
|
218
|
-
header: `${
|
|
216
|
+
modelValue: t(f),
|
|
217
|
+
"onUpdate:modelValue": r[4] || (r[4] = (P) => J(f) ? f.value = P : null),
|
|
218
|
+
header: `${t(u) == -1 ? t(p)("connect.referral.editReferralCountSheet.add") : t(p)("connect.referral.editReferralCountSheet.edit")}`
|
|
219
219
|
}, {
|
|
220
|
-
"side-sheet-footer":
|
|
220
|
+
"side-sheet-footer": V(() => [
|
|
221
221
|
a("div", He, [
|
|
222
|
-
|
|
223
|
-
label:
|
|
222
|
+
d($, {
|
|
223
|
+
label: t(p)("connect.editTierSheet.submit"),
|
|
224
224
|
onClick: M,
|
|
225
|
-
disabled:
|
|
226
|
-
loading:
|
|
225
|
+
disabled: t(T).length > 0 || t(K)().isLoading,
|
|
226
|
+
loading: t(K)().isLoading
|
|
227
227
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
228
|
-
|
|
229
|
-
label:
|
|
230
|
-
onClick:
|
|
228
|
+
d($, {
|
|
229
|
+
label: t(p)("connect.editTierSheet.cancel"),
|
|
230
|
+
onClick: r[3] || (r[3] = (P) => L()),
|
|
231
231
|
variant: "tertiary"
|
|
232
232
|
}, null, 8, ["label"])
|
|
233
233
|
])
|
|
234
234
|
]),
|
|
235
|
-
default:
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
default: V(() => [
|
|
236
|
+
d(X, { json: t(n) }, null, 8, ["json"]),
|
|
237
|
+
d(X, { json: t(T) }, null, 8, ["json"]),
|
|
238
238
|
a("div", Ge, [
|
|
239
239
|
a("div", null, [
|
|
240
240
|
a("div", Me, [
|
|
241
|
-
i
|
|
242
|
-
modelValue:
|
|
243
|
-
"onUpdate:modelValue":
|
|
241
|
+
d(i, {
|
|
242
|
+
modelValue: t(n).threshold.from,
|
|
243
|
+
"onUpdate:modelValue": r[0] || (r[0] = (P) => t(n).threshold.from = P),
|
|
244
244
|
"show-steppers": !1,
|
|
245
|
-
rules: [
|
|
245
|
+
rules: [t(N).ruleAtPath(t(A), "threshold.from")]
|
|
246
246
|
}, {
|
|
247
|
-
label:
|
|
248
|
-
(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
247
|
+
label: V(() => [
|
|
248
|
+
(S(), j(ne(
|
|
249
|
+
t(N).toInputLabel(
|
|
250
|
+
t(N).typeAtPath(t(A), "threshold.from"),
|
|
251
|
+
t(p)(
|
|
252
252
|
"connect.referral.editReferralCountSheet.min_referral_count"
|
|
253
253
|
)
|
|
254
254
|
)
|
|
@@ -256,17 +256,17 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
256
256
|
]),
|
|
257
257
|
_: 1
|
|
258
258
|
}, 8, ["modelValue", "rules"]),
|
|
259
|
-
i
|
|
260
|
-
modelValue:
|
|
261
|
-
"onUpdate:modelValue":
|
|
259
|
+
d(i, {
|
|
260
|
+
modelValue: t(n).threshold.to,
|
|
261
|
+
"onUpdate:modelValue": r[1] || (r[1] = (P) => t(n).threshold.to = P),
|
|
262
262
|
"show-steppers": !1,
|
|
263
|
-
rules: [
|
|
263
|
+
rules: [t(N).ruleAtPath(t(A), "threshold.to")]
|
|
264
264
|
}, {
|
|
265
|
-
label:
|
|
266
|
-
(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
label: V(() => [
|
|
266
|
+
(S(), j(ne(
|
|
267
|
+
t(N).toInputLabel(
|
|
268
|
+
t(N).typeAtPath(t(A), "threshold.to"),
|
|
269
|
+
t(p)(
|
|
270
270
|
"connect.referral.editReferralCountSheet.max_referral_count"
|
|
271
271
|
)
|
|
272
272
|
)
|
|
@@ -275,20 +275,20 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
275
275
|
_: 1
|
|
276
276
|
}, 8, ["modelValue", "rules"])
|
|
277
277
|
]),
|
|
278
|
-
|
|
279
|
-
text:
|
|
280
|
-
state:
|
|
278
|
+
d(g, {
|
|
279
|
+
text: t(N).helperText(t(T), "option"),
|
|
280
|
+
state: t(N).helperState(t(T), "option")
|
|
281
281
|
}, null, 8, ["text", "state"]),
|
|
282
|
-
|
|
282
|
+
r[5] || (r[5] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " When max. referral count is not set, it will default unlimited ", -1))
|
|
283
283
|
]),
|
|
284
|
-
a("div", Ne, O(
|
|
285
|
-
|
|
286
|
-
modelValue:
|
|
287
|
-
"onUpdate:modelValue":
|
|
284
|
+
a("div", Ne, O(t(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
|
|
285
|
+
d(b, {
|
|
286
|
+
modelValue: t(h),
|
|
287
|
+
"onUpdate:modelValue": r[2] || (r[2] = (P) => J(h) ? h.value = P : null),
|
|
288
288
|
selection: "multiple",
|
|
289
|
-
"column-filter":
|
|
290
|
-
"column-defs":
|
|
291
|
-
"row-data":
|
|
289
|
+
"column-filter": t(o),
|
|
290
|
+
"column-defs": y,
|
|
291
|
+
"row-data": t(l),
|
|
292
292
|
"page-size": 10
|
|
293
293
|
}, null, 8, ["modelValue", "column-filter", "row-data"])
|
|
294
294
|
])
|
|
@@ -309,30 +309,30 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
309
309
|
}
|
|
310
310
|
},
|
|
311
311
|
emits: ["update:model-value"],
|
|
312
|
-
setup(
|
|
313
|
-
const
|
|
312
|
+
setup(k, { emit: m }) {
|
|
313
|
+
const I = k, p = m, w = G(() => [
|
|
314
314
|
le.enum.BILL_COMPLETED,
|
|
315
315
|
le.enum.FEEDBACK
|
|
316
|
-
].map((
|
|
317
|
-
return (
|
|
318
|
-
const c =
|
|
319
|
-
return
|
|
316
|
+
].map((f) => Se[f]));
|
|
317
|
+
return (f, n) => {
|
|
318
|
+
const c = _("FmCard");
|
|
319
|
+
return S(), E("div", Ye, [
|
|
320
320
|
n[0] || (n[0] = a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1)),
|
|
321
321
|
a("div", qe, [
|
|
322
|
-
(
|
|
322
|
+
(S(!0), E(z, null, re(t(w), (u) => (S(), j(c, {
|
|
323
323
|
key: u.name,
|
|
324
324
|
variant: "outlined",
|
|
325
|
-
disabled:
|
|
325
|
+
disabled: I.disabled,
|
|
326
326
|
class: ie(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
327
|
-
"col-span-3":
|
|
328
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]":
|
|
329
|
-
"hover:bg-fm-color-opacity-sm":
|
|
327
|
+
"col-span-3": t(w).length == 1,
|
|
328
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": k.modelValue == u.value,
|
|
329
|
+
"hover:bg-fm-color-opacity-sm": k.modelValue != u.value
|
|
330
330
|
}]),
|
|
331
331
|
onClick: () => {
|
|
332
|
-
|
|
332
|
+
I.modelValue != u.value && !I.disabled && p("update:model-value", u.value);
|
|
333
333
|
}
|
|
334
334
|
}, {
|
|
335
|
-
default:
|
|
335
|
+
default: V(() => [
|
|
336
336
|
a("div", We, O(u.name), 1),
|
|
337
337
|
a("div", Je, O(u.description), 1)
|
|
338
338
|
]),
|
|
@@ -345,25 +345,25 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
345
345
|
}), Ze = { class: "flex items-center gap-x-8" }, Qe = { class: "flex flex-col space-y-16 pr-12" }, Xe = {
|
|
346
346
|
key: 0,
|
|
347
347
|
class: "space-y-16"
|
|
348
|
-
},
|
|
348
|
+
}, er = { class: "flex items-center gap-8" }, rr = /* @__PURE__ */ Y({
|
|
349
349
|
__name: "EditCriteriaSheet",
|
|
350
350
|
emits: ["update"],
|
|
351
|
-
setup(
|
|
352
|
-
const { t: p } =
|
|
353
|
-
|
|
351
|
+
setup(k, { expose: m, emit: I }) {
|
|
352
|
+
const { t: p } = Z(), w = I, f = F(!1), n = F(-1), c = F({}), u = Q(), R = xe.superRefine((y, s) => {
|
|
353
|
+
y.name.length >= 50 && s.addIssue({
|
|
354
354
|
code: "custom",
|
|
355
355
|
message: "Name must be less than 50 characters"
|
|
356
|
-
}),
|
|
356
|
+
}), y.name.length < 1 && s.addIssue({
|
|
357
357
|
code: "custom",
|
|
358
358
|
message: "Name is required"
|
|
359
359
|
});
|
|
360
360
|
}), A = G(() => {
|
|
361
|
-
const
|
|
362
|
-
return
|
|
361
|
+
const y = R.safeParse(c.value);
|
|
362
|
+
return y.success ? [] : y.error.errors;
|
|
363
363
|
});
|
|
364
|
-
function T(
|
|
364
|
+
function T(y, s) {
|
|
365
365
|
var o;
|
|
366
|
-
|
|
366
|
+
f.value = y, y && typeof s == "number" && s >= 0 ? (n.value = s, c.value = H(
|
|
367
367
|
(o = u.referralProgram) == null ? void 0 : o.criteria[s]
|
|
368
368
|
)) : (n.value = -1, c.value = {
|
|
369
369
|
_id: new ke().toString(),
|
|
@@ -373,29 +373,29 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
function M() {
|
|
376
|
-
|
|
376
|
+
f.value = !1;
|
|
377
377
|
}
|
|
378
378
|
function D() {
|
|
379
|
-
const
|
|
380
|
-
|
|
379
|
+
const y = R.safeParse(c.value);
|
|
380
|
+
y.success && w("update", n.value, y.data);
|
|
381
381
|
}
|
|
382
|
-
function L(
|
|
383
|
-
c.value.type =
|
|
382
|
+
function L(y) {
|
|
383
|
+
c.value.type = y, y == "AUTO" ? c.value.event = { type: "BILL_COMPLETED" } : c.value.event = void 0;
|
|
384
384
|
}
|
|
385
|
-
return
|
|
385
|
+
return m({
|
|
386
386
|
showSheet: T,
|
|
387
387
|
hideSheet: M,
|
|
388
388
|
data: c
|
|
389
|
-
}), (
|
|
390
|
-
const o =
|
|
391
|
-
return
|
|
389
|
+
}), (y, s) => {
|
|
390
|
+
const o = _("FmButton"), l = _("FmRadio"), C = _("FmRadioGroup"), h = _("FmSideSheet");
|
|
391
|
+
return S(), j(h, {
|
|
392
392
|
"max-width": 768,
|
|
393
|
-
modelValue:
|
|
394
|
-
"onUpdate:modelValue": s[5] || (s[5] = (e) =>
|
|
393
|
+
modelValue: t(f),
|
|
394
|
+
"onUpdate:modelValue": s[5] || (s[5] = (e) => J(f) ? f.value = e : null)
|
|
395
395
|
}, {
|
|
396
|
-
"side-sheet-header":
|
|
396
|
+
"side-sheet-header": V(() => [
|
|
397
397
|
a("div", Ze, [
|
|
398
|
-
|
|
398
|
+
d(o, {
|
|
399
399
|
icon: "arrow_back",
|
|
400
400
|
variant: "tertiary",
|
|
401
401
|
onClick: s[0] || (s[0] = (e) => T(!1))
|
|
@@ -403,44 +403,44 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
403
403
|
s[6] || (s[6] = de("Add Criteria "))
|
|
404
404
|
])
|
|
405
405
|
]),
|
|
406
|
-
"side-sheet-footer":
|
|
407
|
-
a("div",
|
|
408
|
-
|
|
409
|
-
label:
|
|
406
|
+
"side-sheet-footer": V(() => [
|
|
407
|
+
a("div", er, [
|
|
408
|
+
d(o, {
|
|
409
|
+
label: t(p)("connect.editTierSheet.submit"),
|
|
410
410
|
onClick: D,
|
|
411
|
-
disabled:
|
|
412
|
-
loading:
|
|
411
|
+
disabled: t(A).length > 0 || t(K)().isLoading,
|
|
412
|
+
loading: t(K)().isLoading
|
|
413
413
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
414
|
-
|
|
415
|
-
label:
|
|
414
|
+
d(o, {
|
|
415
|
+
label: t(p)("connect.editTierSheet.cancel"),
|
|
416
416
|
onClick: s[4] || (s[4] = (e) => T(!1)),
|
|
417
417
|
variant: "tertiary"
|
|
418
418
|
}, null, 8, ["label"])
|
|
419
419
|
])
|
|
420
420
|
]),
|
|
421
|
-
default:
|
|
422
|
-
|
|
421
|
+
default: V(() => [
|
|
422
|
+
d(X, { json: t(c) }, null, 8, ["json"]),
|
|
423
423
|
a("div", Qe, [
|
|
424
424
|
s[10] || (s[10] = a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1)),
|
|
425
|
-
|
|
426
|
-
modelValue:
|
|
427
|
-
"onUpdate:modelValue": s[1] || (s[1] = (e) =>
|
|
428
|
-
label:
|
|
429
|
-
schema:
|
|
425
|
+
d(Ce, {
|
|
426
|
+
modelValue: t(c).name,
|
|
427
|
+
"onUpdate:modelValue": s[1] || (s[1] = (e) => t(c).name = e),
|
|
428
|
+
label: t(p)("connect.referral.editReferralTierSheet.name"),
|
|
429
|
+
schema: t(N).typeAtPath(t(R), "name")
|
|
430
430
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
431
431
|
s[11] || (s[11] = a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1)),
|
|
432
|
-
|
|
433
|
-
"model-value":
|
|
432
|
+
d(C, {
|
|
433
|
+
"model-value": t(c).type,
|
|
434
434
|
label: "Verify status",
|
|
435
435
|
"onUpdate:modelValue": L
|
|
436
436
|
}, {
|
|
437
|
-
default:
|
|
438
|
-
|
|
437
|
+
default: V(() => [
|
|
438
|
+
d(l, {
|
|
439
439
|
value: "AUTO",
|
|
440
440
|
label: "Auto",
|
|
441
441
|
sublabel: "Verify based on rule configuration"
|
|
442
442
|
}),
|
|
443
|
-
|
|
443
|
+
d(l, {
|
|
444
444
|
value: "MANUAL",
|
|
445
445
|
label: "Manual",
|
|
446
446
|
sublabel: "Verify based on manual inspection"
|
|
@@ -448,21 +448,21 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
448
448
|
]),
|
|
449
449
|
_: 1
|
|
450
450
|
}, 8, ["model-value"]),
|
|
451
|
-
|
|
451
|
+
t(c).type == "AUTO" ? (S(), E(z, { key: 0 }, [
|
|
452
452
|
s[8] || (s[8] = a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1)),
|
|
453
453
|
s[9] || (s[9] = a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1)),
|
|
454
|
-
|
|
455
|
-
"model-value":
|
|
456
|
-
"onUpdate:modelValue": s[2] || (s[2] = (e) =>
|
|
454
|
+
d(Ke, {
|
|
455
|
+
"model-value": t(c).event.type,
|
|
456
|
+
"onUpdate:modelValue": s[2] || (s[2] = (e) => t(c).event.type = e)
|
|
457
457
|
}, null, 8, ["model-value"]),
|
|
458
|
-
|
|
458
|
+
t(c).event.type == t(ye).enum.BILL_COMPLETED ? (S(), E("div", Xe, [
|
|
459
459
|
s[7] || (s[7] = a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1)),
|
|
460
|
-
|
|
461
|
-
"model-value":
|
|
462
|
-
"onUpdate:modelValue": s[3] || (s[3] = (e) =>
|
|
460
|
+
d(Fe, {
|
|
461
|
+
"model-value": t(c).event.rule,
|
|
462
|
+
"onUpdate:modelValue": s[3] || (s[3] = (e) => t(c).event.rule = e)
|
|
463
463
|
}, null, 8, ["model-value"])
|
|
464
|
-
])) :
|
|
465
|
-
], 64)) :
|
|
464
|
+
])) : W("", !0)
|
|
465
|
+
], 64)) : W("", !0)
|
|
466
466
|
])
|
|
467
467
|
]),
|
|
468
468
|
_: 1
|
|
@@ -471,58 +471,58 @@ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
function pe() {
|
|
474
|
-
const
|
|
474
|
+
const k = F(!1), m = Re();
|
|
475
475
|
return {
|
|
476
476
|
confirmUpdateReferralRecord: async () => {
|
|
477
477
|
await new Promise((p) => {
|
|
478
|
-
|
|
478
|
+
m.open({
|
|
479
479
|
title: "Confirmation",
|
|
480
480
|
message: "This will change all referral settings? Would you like to update previous referral record?",
|
|
481
481
|
primaryActions: { text: "Update all", close: !0 },
|
|
482
482
|
secondaryActions: { text: "Update future only", close: !0 }
|
|
483
483
|
}).onPrimary(async () => {
|
|
484
|
-
|
|
484
|
+
k.value = !0, p();
|
|
485
485
|
}).onSecondary(async () => {
|
|
486
|
-
|
|
486
|
+
k.value = !1, p();
|
|
487
487
|
});
|
|
488
488
|
});
|
|
489
489
|
},
|
|
490
|
-
updateReferralRecord:
|
|
490
|
+
updateReferralRecord: k
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
const
|
|
493
|
+
const tr = { class: "flex flex-col space-y-16 mt-24" }, or = { class: "flex justify-between items-center" }, ar = /* @__PURE__ */ Y({
|
|
494
494
|
__name: "ManageCriteriaSheet",
|
|
495
|
-
setup(
|
|
496
|
-
const { t:
|
|
495
|
+
setup(k, { expose: m }) {
|
|
496
|
+
const { t: I } = Z(), { minor: p } = ce, { confirmUpdateReferralRecord: w, updateReferralRecord: f } = pe(), n = F(!1), c = F({}), u = Q(), R = F(
|
|
497
497
|
null
|
|
498
498
|
), A = G(() => {
|
|
499
499
|
var o;
|
|
500
500
|
return (o = u.referralProgram) == null ? void 0 : o.criteria;
|
|
501
501
|
});
|
|
502
502
|
async function T(o) {
|
|
503
|
-
await
|
|
503
|
+
await w(), await p(async () => {
|
|
504
504
|
await fe.update({
|
|
505
505
|
...o,
|
|
506
|
-
updateReferralRecord:
|
|
506
|
+
updateReferralRecord: f.value
|
|
507
507
|
}), await u.readReferralProgram();
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
510
|
async function M(o, l) {
|
|
511
|
-
var e,
|
|
512
|
-
const
|
|
513
|
-
h.criteria[
|
|
511
|
+
var e, r;
|
|
512
|
+
const C = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(u.referralProgram);
|
|
513
|
+
h.criteria[C] = l, await T(h), (r = R.value) == null || r.showSheet(!1);
|
|
514
514
|
}
|
|
515
515
|
async function D(o) {
|
|
516
516
|
var h, e;
|
|
517
|
-
if (!await
|
|
517
|
+
if (!await q.remove(
|
|
518
518
|
"Are you sure to remove criteria",
|
|
519
519
|
"Remove criteria",
|
|
520
|
-
|
|
521
|
-
|
|
520
|
+
I("connect.prompt.confirm"),
|
|
521
|
+
I("connect.prompt.cancel")
|
|
522
522
|
))
|
|
523
523
|
return;
|
|
524
|
-
const l = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o,
|
|
525
|
-
|
|
524
|
+
const l = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, C = H(u.referralProgram);
|
|
525
|
+
C.criteria.splice(l, 1), await T(C), (e = R.value) == null || e.showSheet(!1);
|
|
526
526
|
}
|
|
527
527
|
const L = [
|
|
528
528
|
{
|
|
@@ -532,7 +532,7 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
532
532
|
{
|
|
533
533
|
header: "Validity method",
|
|
534
534
|
cell(o) {
|
|
535
|
-
return
|
|
535
|
+
return te(oe.FmChip, {
|
|
536
536
|
label: we.title(o.row.original.type),
|
|
537
537
|
variant: "plain"
|
|
538
538
|
});
|
|
@@ -542,7 +542,7 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
542
542
|
header: "Actions",
|
|
543
543
|
cell(o) {
|
|
544
544
|
return [
|
|
545
|
-
|
|
545
|
+
te(oe.FmButton, {
|
|
546
546
|
variant: "tertiary",
|
|
547
547
|
icon: "delete",
|
|
548
548
|
iconColor: "neutral-gray-400",
|
|
@@ -554,79 +554,79 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
];
|
|
557
|
-
function
|
|
557
|
+
function y(o) {
|
|
558
558
|
n.value = o;
|
|
559
559
|
}
|
|
560
560
|
function s() {
|
|
561
561
|
n.value = !1;
|
|
562
562
|
}
|
|
563
|
-
return
|
|
564
|
-
showSheet:
|
|
563
|
+
return m({
|
|
564
|
+
showSheet: y,
|
|
565
565
|
hideSheet: s,
|
|
566
566
|
data: c
|
|
567
567
|
}), (o, l) => {
|
|
568
|
-
const
|
|
569
|
-
return
|
|
570
|
-
|
|
568
|
+
const C = _("FmButton"), h = _("FmTable"), e = _("FmSideSheet");
|
|
569
|
+
return S(), E(z, null, [
|
|
570
|
+
d(e, {
|
|
571
571
|
"max-width": 768,
|
|
572
|
-
modelValue:
|
|
573
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
572
|
+
modelValue: t(n),
|
|
573
|
+
"onUpdate:modelValue": l[2] || (l[2] = (r) => J(n) ? n.value = r : null),
|
|
574
574
|
header: "Manage Criteria"
|
|
575
575
|
}, {
|
|
576
|
-
default:
|
|
577
|
-
a("div",
|
|
578
|
-
a("div",
|
|
576
|
+
default: V(() => [
|
|
577
|
+
a("div", tr, [
|
|
578
|
+
a("div", or, [
|
|
579
579
|
l[3] || (l[3] = a("div", null, [
|
|
580
580
|
a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
|
|
581
581
|
a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
|
|
582
582
|
], -1)),
|
|
583
|
-
|
|
583
|
+
d(C, {
|
|
584
584
|
label: "Add Criteria",
|
|
585
585
|
icon: "add",
|
|
586
586
|
variant: "secondary",
|
|
587
|
-
onClick: l[0] || (l[0] = (
|
|
588
|
-
var
|
|
589
|
-
return (
|
|
587
|
+
onClick: l[0] || (l[0] = (r) => {
|
|
588
|
+
var i;
|
|
589
|
+
return (i = t(R)) == null ? void 0 : i.showSheet(!0);
|
|
590
590
|
})
|
|
591
591
|
})
|
|
592
592
|
]),
|
|
593
|
-
|
|
594
|
-
"row-data":
|
|
593
|
+
d(h, {
|
|
594
|
+
"row-data": t(A),
|
|
595
595
|
"hide-footer": !0,
|
|
596
596
|
"page-size": 100,
|
|
597
597
|
"shrink-at": !1,
|
|
598
598
|
"column-defs": L,
|
|
599
|
-
onRowClick: l[1] || (l[1] = (
|
|
600
|
-
var
|
|
601
|
-
return (
|
|
599
|
+
onRowClick: l[1] || (l[1] = (r) => {
|
|
600
|
+
var i;
|
|
601
|
+
return (i = t(R)) == null ? void 0 : i.showSheet(!0, r.index);
|
|
602
602
|
})
|
|
603
603
|
}, null, 8, ["row-data"])
|
|
604
604
|
])
|
|
605
605
|
]),
|
|
606
606
|
_: 1
|
|
607
607
|
}, 8, ["modelValue"]),
|
|
608
|
-
|
|
608
|
+
d(rr, {
|
|
609
609
|
ref_key: "editCriteriaSheetRef",
|
|
610
|
-
ref:
|
|
610
|
+
ref: R,
|
|
611
611
|
onUpdate: M
|
|
612
612
|
}, null, 512)
|
|
613
613
|
], 64);
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
}),
|
|
616
|
+
}), nr = { class: "flex flex-col space-y-16 pr-12" }, lr = { class: "fm-typo-en-title-sm-800" }, sr = { class: "flex items-center gap-8" }, ir = /* @__PURE__ */ Y({
|
|
617
617
|
__name: "EditRefereeRewardSheet",
|
|
618
618
|
emits: ["update"],
|
|
619
|
-
setup(
|
|
620
|
-
const { t: p } =
|
|
619
|
+
setup(k, { expose: m, emit: I }) {
|
|
620
|
+
const { t: p } = Z(), w = I, f = F(!1), n = F([]), c = Q();
|
|
621
621
|
function u() {
|
|
622
|
-
|
|
622
|
+
w("update", n.value);
|
|
623
623
|
}
|
|
624
|
-
async function
|
|
625
|
-
var l,
|
|
626
|
-
|
|
624
|
+
async function R(o) {
|
|
625
|
+
var l, C;
|
|
626
|
+
f.value = o, n.value = ((C = (l = c.referralProgram) == null ? void 0 : l.refereeReward) == null ? void 0 : C.map((h) => h.toString())) || [], s.value = L.value.map((h) => n.value.includes(h.id));
|
|
627
627
|
}
|
|
628
628
|
function A() {
|
|
629
|
-
|
|
629
|
+
f.value = !1;
|
|
630
630
|
}
|
|
631
631
|
const T = [
|
|
632
632
|
{
|
|
@@ -650,7 +650,7 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
650
650
|
return l.description;
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
], M = ue(), D =
|
|
653
|
+
], M = ue(), D = F([]), L = G(() => M.rewards.map((o) => {
|
|
654
654
|
let l = "No expiry";
|
|
655
655
|
switch (o.option.type) {
|
|
656
656
|
case "VOUCHER":
|
|
@@ -669,52 +669,52 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
669
669
|
};
|
|
670
670
|
}));
|
|
671
671
|
G(() => []);
|
|
672
|
-
function
|
|
672
|
+
function y() {
|
|
673
673
|
const o = L.value;
|
|
674
674
|
for (let l = 0; l < o.length; l++) {
|
|
675
|
-
const
|
|
676
|
-
h && !n.value.includes(
|
|
675
|
+
const C = o[l], h = s.value[l];
|
|
676
|
+
h && !n.value.includes(C.id) && n.value.push(C.id), !h && n.value.includes(C.id) && (n.value = n.value.filter((e) => e != C.id));
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
const s =
|
|
680
|
-
return se(s,
|
|
681
|
-
showSheet:
|
|
679
|
+
const s = F({});
|
|
680
|
+
return se(s, y, { deep: !0 }), m({
|
|
681
|
+
showSheet: R,
|
|
682
682
|
hideSheet: A,
|
|
683
683
|
data: n
|
|
684
684
|
}), (o, l) => {
|
|
685
|
-
const
|
|
686
|
-
return
|
|
685
|
+
const C = _("FmTable"), h = _("FmButton"), e = _("FmSideSheet");
|
|
686
|
+
return S(), j(e, {
|
|
687
687
|
"max-width": 1e3,
|
|
688
|
-
modelValue:
|
|
689
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
688
|
+
modelValue: t(f),
|
|
689
|
+
"onUpdate:modelValue": l[2] || (l[2] = (r) => J(f) ? f.value = r : null),
|
|
690
690
|
header: "Referee reward"
|
|
691
691
|
}, {
|
|
692
|
-
"side-sheet-footer":
|
|
693
|
-
a("div",
|
|
694
|
-
|
|
695
|
-
label:
|
|
692
|
+
"side-sheet-footer": V(() => [
|
|
693
|
+
a("div", sr, [
|
|
694
|
+
d(h, {
|
|
695
|
+
label: t(p)("connect.common.save"),
|
|
696
696
|
onClick: u,
|
|
697
|
-
disabled:
|
|
698
|
-
loading:
|
|
697
|
+
disabled: t(K)().isLoading,
|
|
698
|
+
loading: t(K)().isLoading
|
|
699
699
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
700
|
-
|
|
701
|
-
label:
|
|
702
|
-
onClick: l[1] || (l[1] = (
|
|
700
|
+
d(h, {
|
|
701
|
+
label: t(p)("connect.common.cancel"),
|
|
702
|
+
onClick: l[1] || (l[1] = (r) => A()),
|
|
703
703
|
variant: "tertiary"
|
|
704
704
|
}, null, 8, ["label"])
|
|
705
705
|
])
|
|
706
706
|
]),
|
|
707
|
-
default:
|
|
708
|
-
|
|
709
|
-
a("div",
|
|
710
|
-
a("div",
|
|
711
|
-
|
|
712
|
-
modelValue:
|
|
713
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
707
|
+
default: V(() => [
|
|
708
|
+
d(X, { json: t(n) }, null, 8, ["json"]),
|
|
709
|
+
a("div", nr, [
|
|
710
|
+
a("div", lr, O(t(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
|
|
711
|
+
d(C, {
|
|
712
|
+
modelValue: t(s),
|
|
713
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => J(s) ? s.value = r : null),
|
|
714
714
|
selection: "multiple",
|
|
715
|
-
"column-filter":
|
|
715
|
+
"column-filter": t(D),
|
|
716
716
|
"column-defs": T,
|
|
717
|
-
"row-data":
|
|
717
|
+
"row-data": t(L),
|
|
718
718
|
"page-size": 10
|
|
719
719
|
}, null, 8, ["modelValue", "column-filter", "row-data"])
|
|
720
720
|
])
|
|
@@ -723,115 +723,118 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
723
723
|
}, 8, ["modelValue"]);
|
|
724
724
|
};
|
|
725
725
|
}
|
|
726
|
-
}),
|
|
726
|
+
}), dr = { class: "fm-typo-en-title-sm-600" }, cr = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, ur = { class: "flex gap-x-8" }, mr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, fr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pr = { class: "mb-40" }, hr = {
|
|
727
727
|
key: 0,
|
|
728
728
|
class: "flex flex-col items-center justify-center gap-y-16 p-24"
|
|
729
|
-
},
|
|
729
|
+
}, vr = { class: "flex flex-col gap-16 text-center" }, gr = { class: "fm-typo-en-title-sm-800" }, wr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nr = /* @__PURE__ */ Y({
|
|
730
730
|
__name: "Overview",
|
|
731
|
-
setup(
|
|
732
|
-
const { t:
|
|
731
|
+
setup(k) {
|
|
732
|
+
const { t: m } = Z(), { minor: I } = ce, p = $e(), w = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: n } = pe(), c = G(() => {
|
|
733
733
|
var e;
|
|
734
|
-
return ((e =
|
|
735
|
-
}), u =
|
|
736
|
-
|
|
737
|
-
const
|
|
738
|
-
var e,
|
|
734
|
+
return ((e = w.referralProgram) == null ? void 0 : e.reward) ?? [];
|
|
735
|
+
}), u = F(null);
|
|
736
|
+
F(null);
|
|
737
|
+
const R = F(null), A = F(null), T = F(null), M = G(() => {
|
|
738
|
+
var e, r, i, g;
|
|
739
739
|
return [
|
|
740
740
|
{
|
|
741
741
|
label: "connect.referral.how_it_works.generate_link",
|
|
742
|
-
sublabel:
|
|
742
|
+
sublabel: m("connect.referral.how_it_works.generate_link_for_member"),
|
|
743
743
|
icon: "offline_share"
|
|
744
744
|
},
|
|
745
745
|
{
|
|
746
746
|
label: "connect.referral.how_it_works.referee_join_reward",
|
|
747
|
-
sublabel: `${((
|
|
748
|
-
action:
|
|
747
|
+
sublabel: `${((r = (e = w.referralProgram) == null ? void 0 : e.refereeReward) == null ? void 0 : r.length) || 0} reward(s)`,
|
|
748
|
+
action: m("connect.referral.actions.manage_reward"),
|
|
749
749
|
onClick: () => {
|
|
750
|
-
var
|
|
751
|
-
return (
|
|
750
|
+
var b;
|
|
751
|
+
return (b = T.value) == null ? void 0 : b.showSheet(!0);
|
|
752
752
|
},
|
|
753
753
|
helperText: "Referee will receive rewards after successfully competing all criteria",
|
|
754
754
|
icon: "group_add"
|
|
755
755
|
},
|
|
756
756
|
{
|
|
757
757
|
label: "connect.referral.how_it_works.referee_meet_criteria",
|
|
758
|
-
sublabel: `${(
|
|
759
|
-
action:
|
|
758
|
+
sublabel: `${(i = w.referralProgram) == null ? void 0 : i.criteria.length} criteria`,
|
|
759
|
+
action: m("connect.referral.actions.manage_criteria"),
|
|
760
760
|
onClick: () => {
|
|
761
|
-
var
|
|
762
|
-
return (
|
|
761
|
+
var b;
|
|
762
|
+
return (b = A.value) == null ? void 0 : b.showSheet(!0);
|
|
763
763
|
},
|
|
764
764
|
icon: "checklist_rtl"
|
|
765
765
|
},
|
|
766
766
|
{
|
|
767
767
|
label: "connect.referral.how_it_works.referer_get_reward",
|
|
768
|
-
sublabel: `${(
|
|
768
|
+
sublabel: `${(g = w.referralProgram) == null ? void 0 : g.reward.length} configured tier(s)`,
|
|
769
769
|
helperText: "Referer will receive rewards after referee completed all criteria",
|
|
770
770
|
icon: "featured_seasonal_and_gifts"
|
|
771
771
|
}
|
|
772
772
|
];
|
|
773
773
|
});
|
|
774
774
|
function D(e) {
|
|
775
|
-
var
|
|
776
|
-
(
|
|
775
|
+
var r;
|
|
776
|
+
(r = u.value) == null || r.onManageRewardGroup(e);
|
|
777
777
|
}
|
|
778
778
|
function L(e) {
|
|
779
|
-
var
|
|
780
|
-
(
|
|
779
|
+
var r;
|
|
780
|
+
(r = R.value) == null || r.showSheet(!0, {
|
|
781
781
|
groupIndex: e.groupIndex,
|
|
782
782
|
countIndex: e.countIndex
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
async function
|
|
786
|
-
var P,
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
),
|
|
790
|
-
|
|
791
|
-
const $ =
|
|
792
|
-
if ($ && $.threshold.to !=
|
|
793
|
-
if (!await
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
785
|
+
async function y(e) {
|
|
786
|
+
var P, x, v, B;
|
|
787
|
+
const r = e.countIndex == -1 ? ((x = (P = w.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0, i = e.referralCount, g = H(
|
|
788
|
+
w.referralProgram
|
|
789
|
+
), b = g.reward[e.groupIndex];
|
|
790
|
+
b.rewards[r] = e.referralCount;
|
|
791
|
+
const $ = b.rewards[r - 1], U = b.rewards[r + 1];
|
|
792
|
+
if ($ && $.threshold.to != i.threshold.from - 1) {
|
|
793
|
+
if (!await q.confirm(
|
|
794
|
+
m(
|
|
795
|
+
"connect.referral.referral_count.update.range_discontinuous.previous",
|
|
796
|
+
{
|
|
797
|
+
name: $.threshold.from,
|
|
798
|
+
from: $.threshold.from ?? 0,
|
|
799
|
+
to: $.threshold.to ?? 1 / 0,
|
|
800
|
+
newTo: i.threshold.from - 1
|
|
801
|
+
}
|
|
802
|
+
),
|
|
803
|
+
m("connect.referral.referral_count.title"),
|
|
804
|
+
m("connect.referral.referral_count.remove.next_range")
|
|
802
805
|
))
|
|
803
806
|
return;
|
|
804
|
-
$.threshold.to =
|
|
807
|
+
$.threshold.to = i.threshold.from - 1;
|
|
805
808
|
}
|
|
806
|
-
if (U && U.threshold.from - 1 !=
|
|
807
|
-
if (!await
|
|
808
|
-
|
|
809
|
+
if (U && U.threshold.from - 1 != i.threshold.to) {
|
|
810
|
+
if (!await q.confirm(
|
|
811
|
+
m("connect.program.tier.update.range_discontinuous.next", {
|
|
809
812
|
name: U.threshold.from,
|
|
810
813
|
from: U.threshold.from ?? 0,
|
|
811
814
|
to: U.threshold.to ?? 1 / 0,
|
|
812
|
-
newFrom:
|
|
815
|
+
newFrom: i.threshold.to ?? 1
|
|
813
816
|
}),
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
+
m("connect.program.tier.title"),
|
|
818
|
+
m("connect.program.tier.remove.next_range"),
|
|
819
|
+
m("connect.prompt.cancel")
|
|
817
820
|
))
|
|
818
821
|
return;
|
|
819
|
-
U.threshold.from = (
|
|
822
|
+
U.threshold.from = (i.threshold.to ?? 0) + 1;
|
|
820
823
|
}
|
|
821
|
-
!U && !((v =
|
|
824
|
+
!U && !((v = i.threshold) != null && v.to) && (i.threshold.to = void 0), await o(g), (B = R.value) == null || B.hideSheet();
|
|
822
825
|
}
|
|
823
826
|
async function s(e) {
|
|
824
|
-
var
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
+
var i;
|
|
828
|
+
const r = H(w.referralProgram);
|
|
829
|
+
r.refereeReward = e, await o(r), (i = T.value) == null || i.hideSheet();
|
|
827
830
|
}
|
|
828
831
|
async function o(e) {
|
|
829
|
-
await
|
|
832
|
+
await f(), await I(
|
|
830
833
|
async () => {
|
|
831
834
|
await fe.update({
|
|
832
835
|
...e,
|
|
833
836
|
updateReferralRecord: n.value
|
|
834
|
-
}), await
|
|
837
|
+
}), await w.readReferralProgram();
|
|
835
838
|
},
|
|
836
839
|
{
|
|
837
840
|
message: "Updating referral program",
|
|
@@ -840,26 +843,40 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
840
843
|
);
|
|
841
844
|
}
|
|
842
845
|
async function l(e) {
|
|
843
|
-
if (!await
|
|
846
|
+
if (!await q.remove(
|
|
844
847
|
"Are you sure to remove referral tier",
|
|
845
848
|
"Remove referral tier",
|
|
846
|
-
|
|
847
|
-
|
|
849
|
+
m("connect.prompt.confirm"),
|
|
850
|
+
m("connect.prompt.cancel")
|
|
848
851
|
))
|
|
849
852
|
return;
|
|
850
|
-
const
|
|
851
|
-
|
|
853
|
+
const r = H(w.referralProgram);
|
|
854
|
+
r.reward.splice(e, 1), await o(r);
|
|
852
855
|
}
|
|
853
|
-
async function
|
|
854
|
-
if (!await
|
|
856
|
+
async function C(e, r) {
|
|
857
|
+
if (!await q.remove(
|
|
855
858
|
"Are you sure to remove referral count",
|
|
856
859
|
"Remove referral tier",
|
|
857
|
-
|
|
858
|
-
|
|
860
|
+
m("connect.prompt.confirm"),
|
|
861
|
+
m("connect.prompt.cancel")
|
|
859
862
|
))
|
|
860
863
|
return;
|
|
861
|
-
const
|
|
862
|
-
|
|
864
|
+
const i = H(w.referralProgram), g = i.reward[e].rewards[r + 1];
|
|
865
|
+
if (g) {
|
|
866
|
+
if (!await q.confirm(
|
|
867
|
+
m("connect.referral.referral_count.update.range_discontinuous.next", {
|
|
868
|
+
from: g.threshold.from ?? 0,
|
|
869
|
+
to: g.threshold.to ?? 1 / 0,
|
|
870
|
+
newFrom: i.reward[e].rewards[r].threshold.from
|
|
871
|
+
}),
|
|
872
|
+
m("connect.referral.referral_count.remove.title"),
|
|
873
|
+
m("connect.referral.referral_count.remove.next_range"),
|
|
874
|
+
m("connect.prompt.cancel")
|
|
875
|
+
))
|
|
876
|
+
return;
|
|
877
|
+
g.threshold.from = i.reward[e].rewards[r].threshold.from;
|
|
878
|
+
}
|
|
879
|
+
i.reward[e].rewards.splice(r, 1), await o(i);
|
|
863
880
|
}
|
|
864
881
|
const h = [
|
|
865
882
|
{
|
|
@@ -870,8 +887,8 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
870
887
|
header: "Rewards",
|
|
871
888
|
accessorKey: "type",
|
|
872
889
|
accessorFn: (e) => {
|
|
873
|
-
var
|
|
874
|
-
return `${((
|
|
890
|
+
var r;
|
|
891
|
+
return `${((r = e.pf_reward) == null ? void 0 : r.length) || 0} reward(s)`;
|
|
875
892
|
}
|
|
876
893
|
},
|
|
877
894
|
{
|
|
@@ -880,67 +897,67 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
880
897
|
textAlign: "right"
|
|
881
898
|
},
|
|
882
899
|
cell(e) {
|
|
883
|
-
return
|
|
900
|
+
return te(oe.FmButton, {
|
|
884
901
|
variant: "tertiary",
|
|
885
902
|
icon: "delete",
|
|
886
903
|
iconColor: "neutral-gray-400",
|
|
887
904
|
class: "ml-auto",
|
|
888
|
-
onClick: (
|
|
889
|
-
|
|
905
|
+
onClick: (r) => {
|
|
906
|
+
r.stopPropagation(), console.log(e.row), C(e.row.original.groupIndex, e.row.index);
|
|
890
907
|
}
|
|
891
908
|
});
|
|
892
909
|
}
|
|
893
910
|
}
|
|
894
911
|
];
|
|
895
912
|
return ve(async () => {
|
|
896
|
-
await
|
|
897
|
-
}), (e,
|
|
898
|
-
const
|
|
899
|
-
return
|
|
900
|
-
|
|
901
|
-
i
|
|
913
|
+
await w.readReferralProgram();
|
|
914
|
+
}), (e, r) => {
|
|
915
|
+
const i = _("FmCard"), g = _("FmIcon"), b = _("FmTooltip"), $ = _("FmButton"), U = _("FmTable"), P = _("FmList");
|
|
916
|
+
return S(), E(z, null, [
|
|
917
|
+
W("", !0),
|
|
918
|
+
d(i, {
|
|
902
919
|
variant: "outlined",
|
|
903
920
|
class: "flex flex-col gap-16 p-16"
|
|
904
921
|
}, {
|
|
905
|
-
default:
|
|
906
|
-
a("div",
|
|
907
|
-
a("div",
|
|
908
|
-
(
|
|
922
|
+
default: V(() => [
|
|
923
|
+
a("div", dr, O(t(m)("connect.referral.how_it_works.title")), 1),
|
|
924
|
+
a("div", cr, [
|
|
925
|
+
(S(!0), E(z, null, re(t(M), (x, v) => (S(), E("div", {
|
|
909
926
|
key: v,
|
|
910
927
|
class: ie(["px-8", { "xs:!border-r": v % 2 == 0 }])
|
|
911
928
|
}, [
|
|
912
|
-
a("div",
|
|
913
|
-
|
|
914
|
-
name:
|
|
929
|
+
a("div", ur, [
|
|
930
|
+
d(g, {
|
|
931
|
+
name: x.icon,
|
|
915
932
|
color: "primary",
|
|
916
933
|
class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
|
|
917
934
|
}, null, 8, ["name"]),
|
|
918
935
|
a("div", null, [
|
|
919
|
-
a("div",
|
|
920
|
-
de(O(
|
|
921
|
-
|
|
936
|
+
a("div", mr, [
|
|
937
|
+
de(O(t(m)(x.label)) + " ", 1),
|
|
938
|
+
x.helperText ? (S(), j(b, {
|
|
922
939
|
key: 0,
|
|
923
|
-
content:
|
|
940
|
+
content: x.helperText
|
|
924
941
|
}, {
|
|
925
|
-
default:
|
|
926
|
-
|
|
942
|
+
default: V(() => [
|
|
943
|
+
d(g, {
|
|
927
944
|
name: "help",
|
|
928
945
|
size: "sm",
|
|
929
946
|
outline: !0
|
|
930
947
|
})
|
|
931
948
|
]),
|
|
932
949
|
_: 2
|
|
933
|
-
}, 1032, ["content"])) :
|
|
950
|
+
}, 1032, ["content"])) : W("", !0)
|
|
934
951
|
]),
|
|
935
|
-
a("div",
|
|
936
|
-
|
|
952
|
+
a("div", fr, O(x.sublabel), 1),
|
|
953
|
+
x.action ? (S(), j($, {
|
|
937
954
|
key: 0,
|
|
938
955
|
variant: "plain",
|
|
939
|
-
label:
|
|
940
|
-
disabled: !
|
|
956
|
+
label: x.action,
|
|
957
|
+
disabled: !t(p).isPremium,
|
|
941
958
|
class: "fm-typo-en-body-md-400 !p-0",
|
|
942
|
-
onClick:
|
|
943
|
-
}, null, 8, ["label", "disabled", "onClick"])) :
|
|
959
|
+
onClick: x.onClick
|
|
960
|
+
}, null, 8, ["label", "disabled", "onClick"])) : W("", !0)
|
|
944
961
|
])
|
|
945
962
|
])
|
|
946
963
|
], 2))), 128))
|
|
@@ -948,40 +965,40 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
948
965
|
]),
|
|
949
966
|
_: 1
|
|
950
967
|
}),
|
|
951
|
-
|
|
968
|
+
t(c) && t(c).length > 0 ? (S(), j(i, {
|
|
952
969
|
key: 1,
|
|
953
970
|
variant: "outlined",
|
|
954
971
|
class: "flex flex-col gap-16 p-16"
|
|
955
972
|
}, {
|
|
956
|
-
default:
|
|
957
|
-
|
|
958
|
-
default:
|
|
959
|
-
(
|
|
973
|
+
default: V(() => [
|
|
974
|
+
d(P, { separator: !0 }, {
|
|
975
|
+
default: V(() => [
|
|
976
|
+
(S(!0), E(z, null, re(t(c), (x, v) => (S(), j(De, {
|
|
960
977
|
key: v,
|
|
961
|
-
"reward-group":
|
|
978
|
+
"reward-group": x,
|
|
962
979
|
level: v,
|
|
963
980
|
onEdit: (B) => D(v),
|
|
964
981
|
onRemove: (B) => l(v),
|
|
965
|
-
onAddCount:
|
|
982
|
+
onAddCount: r[0] || (r[0] = (B) => {
|
|
966
983
|
L({ groupIndex: B, countIndex: -1 });
|
|
967
984
|
})
|
|
968
985
|
}, {
|
|
969
|
-
default:
|
|
970
|
-
a("div",
|
|
971
|
-
|
|
972
|
-
"row-data":
|
|
986
|
+
default: V(() => [
|
|
987
|
+
a("div", pr, [
|
|
988
|
+
d(U, {
|
|
989
|
+
"row-data": x.rewards.map((B) => ({ ...B, groupIndex: v })),
|
|
973
990
|
"column-defs": h,
|
|
974
991
|
"hide-footer": !0,
|
|
975
992
|
"page-size": 50,
|
|
976
993
|
onRowClick: (B) => L({ groupIndex: v, countIndex: B.index })
|
|
977
994
|
}, null, 8, ["row-data", "onRowClick"])
|
|
978
995
|
]),
|
|
979
|
-
|
|
980
|
-
|
|
996
|
+
x.rewards.length ? W("", !0) : (S(), E("div", hr, [
|
|
997
|
+
r[3] || (r[3] = a("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
981
998
|
a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
|
|
982
999
|
a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add referral count to configure progression reward to the referral program ")
|
|
983
1000
|
], -1)),
|
|
984
|
-
|
|
1001
|
+
d($, {
|
|
985
1002
|
variant: "secondary",
|
|
986
1003
|
label: "Add count",
|
|
987
1004
|
icon: "add",
|
|
@@ -996,44 +1013,44 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
996
1013
|
})
|
|
997
1014
|
]),
|
|
998
1015
|
_: 1
|
|
999
|
-
})) : (
|
|
1016
|
+
})) : (S(), j(i, {
|
|
1000
1017
|
key: 2,
|
|
1001
1018
|
variant: "outlined",
|
|
1002
1019
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1003
1020
|
}, {
|
|
1004
|
-
default:
|
|
1005
|
-
|
|
1021
|
+
default: V(() => [
|
|
1022
|
+
r[4] || (r[4] = a("img", {
|
|
1006
1023
|
src: ge,
|
|
1007
1024
|
class: "aspect-square w-[150px]"
|
|
1008
1025
|
}, null, -1)),
|
|
1009
|
-
a("div",
|
|
1010
|
-
a("div",
|
|
1011
|
-
a("div",
|
|
1026
|
+
a("div", vr, [
|
|
1027
|
+
a("div", gr, O(t(m)("connect.referral.referral_tier_title")), 1),
|
|
1028
|
+
a("div", wr, O(t(m)("connect.referral.referral_tier_description")), 1)
|
|
1012
1029
|
]),
|
|
1013
|
-
|
|
1030
|
+
d($, {
|
|
1014
1031
|
variant: "primary",
|
|
1015
|
-
label:
|
|
1032
|
+
label: t(m)("connect.referral.add_referral_tier"),
|
|
1016
1033
|
icon: "add",
|
|
1017
|
-
disabled: !
|
|
1018
|
-
onClick:
|
|
1034
|
+
disabled: !t(p).isPremium,
|
|
1035
|
+
onClick: r[1] || (r[1] = (x) => D(-1))
|
|
1019
1036
|
}, null, 8, ["label", "disabled"])
|
|
1020
1037
|
]),
|
|
1021
1038
|
_: 1
|
|
1022
1039
|
})),
|
|
1023
|
-
|
|
1040
|
+
d(_e, {
|
|
1024
1041
|
ref_key: "rewardGroupRef",
|
|
1025
1042
|
ref: u
|
|
1026
1043
|
}, null, 512),
|
|
1027
|
-
|
|
1044
|
+
d(ze, {
|
|
1028
1045
|
ref_key: "editReferralCountSheetRef",
|
|
1029
|
-
ref:
|
|
1030
|
-
onUpdate:
|
|
1046
|
+
ref: R,
|
|
1047
|
+
onUpdate: y
|
|
1031
1048
|
}, null, 512),
|
|
1032
|
-
|
|
1049
|
+
d(ar, {
|
|
1033
1050
|
ref_key: "manageCriteriaSheetRef",
|
|
1034
1051
|
ref: A
|
|
1035
1052
|
}, null, 512),
|
|
1036
|
-
|
|
1053
|
+
d(ir, {
|
|
1037
1054
|
ref_key: "editRefereeRewardSheetRef",
|
|
1038
1055
|
ref: T,
|
|
1039
1056
|
onUpdate: s
|
|
@@ -1043,5 +1060,5 @@ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex just
|
|
|
1043
1060
|
}
|
|
1044
1061
|
});
|
|
1045
1062
|
export {
|
|
1046
|
-
|
|
1063
|
+
Nr as default
|
|
1047
1064
|
};
|