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