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