@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-D8WCDkga.js +427 -0
- package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
- package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
- package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
- package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
- package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
- package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
- package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
- package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
- package/dist/Marketing-C7F4abzg.js +319 -0
- package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
- package/dist/MemberList-DFW2bMbr.js +1606 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
- package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
- package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
- package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
- package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
- package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
- package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
- package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
- package/dist/Segment-DDQIzsrk.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
- package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
- package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
- package/dist/StoreRewards-D5zlE6cE.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
- package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
- package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
- package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
- package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
- package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
- package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
- package/dist/app.js +3 -4
- package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
- package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
- package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
- package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
- package/dist/campaign.fn-DJ6J98jS.js +758 -0
- package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
- package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
- package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
- package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
- package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
- package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
- package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
- package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
- package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
- package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
- package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
- package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
- package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
- package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
- package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
- package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
- package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-D2uZzjpn.js +44 -0
- package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
- package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
- package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
- package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
- package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
- package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
- package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
- package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
- package/dist/objectid-Cr99eTPd.js +145 -0
- package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
- package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
- package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
- package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
- package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
- package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
- package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
- package/package.json +3 -9
- package/dist/Analytic-BjSfI2Ff.js +0 -761
- package/dist/AuditLogs-DWCFYoRg.js +0 -1887
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/Marketing-Dn9A1vgH.js +0 -20073
- package/dist/MemberList-BWTG9Ohy.js +0 -1606
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
- package/dist/Segment-Bzq-pyhc.js +0 -882
- package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
- package/dist/campaign.fn-BYZgKDN7.js +0 -758
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-CwsMG2cV.js +0 -56
- package/dist/objectid-D5T27iny.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as
|
|
1
|
+
import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as _e, ref as $, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as ce, createTextVNode as de, createCommentVNode as z, h as te, onMounted as ve } from "vue";
|
|
2
2
|
import { _ as ge } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { u as Z } from "./vue-i18n-
|
|
4
|
-
import { u as ue } from "./loading-
|
|
5
|
-
import { c as we, p as K } from "./plugins-
|
|
3
|
+
import { u as Z } from "./vue-i18n-BtvUK9hI.js";
|
|
4
|
+
import { u as ue } from "./loading-BFkEqWR6.js";
|
|
5
|
+
import { c as we, p as K } from "./plugins-DK_ue6Xa.js";
|
|
6
6
|
import { J as X } from "./JsonViewer-v8_C7l5N.js";
|
|
7
7
|
import { Z as N } from "./zod-Bg2FbC-D.js";
|
|
8
8
|
import { u as W } from "./app-wDQR6dpb.js";
|
|
9
|
-
import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as me } from "./reward-
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./index-
|
|
16
|
-
import "./index-
|
|
17
|
-
import { C as fe } from "./membership-
|
|
18
|
-
import { t as ee } from "./helper-
|
|
9
|
+
import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js";
|
|
10
|
+
import { u as me } from "./reward-CW2dSLDW.js";
|
|
11
|
+
import { l as le, c as se } from "./index-C7rl1eHp.js";
|
|
12
|
+
import "./index-DWdAUovq.js";
|
|
13
|
+
import { a as be, b as xe } from "./index-B_893fH7.js";
|
|
14
|
+
import "./index-DkWcEDHA.js";
|
|
15
|
+
import "./index-B0YZKHyu.js";
|
|
16
|
+
import "./index-CIztuDE4.js";
|
|
17
|
+
import { C as fe } from "./membership-D0eN3i_T.js";
|
|
18
|
+
import { t as ee } from "./helper-BKZghMbF.js";
|
|
19
19
|
import { c as H } from "./object-qECH92oz.js";
|
|
20
20
|
import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
|
|
21
|
-
import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
22
|
-
import { a as Se, _ as
|
|
23
|
-
import { O as
|
|
24
|
-
import { r as pe } from "./index-
|
|
25
|
-
import { u as Pe } from "./business-
|
|
21
|
+
import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js";
|
|
22
|
+
import { a as Se, _ as $e, b as Fe } from "./trigger-RqJo06KA.js";
|
|
23
|
+
import { O as ke } from "./objectid-Cr99eTPd.js";
|
|
24
|
+
import { r as pe } from "./index-CBcbwf0k.js";
|
|
25
|
+
import { u as Pe } from "./business-TTvv3aTz.js";
|
|
26
26
|
const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { 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" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, je = { class: "flex-1 space-y-4" }, De = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
|
|
27
27
|
__name: "ReferralRewadGroupCard",
|
|
28
28
|
props: {
|
|
@@ -36,13 +36,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
emits: ["edit", "addCount", "remove"],
|
|
39
|
-
setup(
|
|
40
|
-
const { t: I } = Z(), p =
|
|
41
|
-
return (g,
|
|
42
|
-
const
|
|
39
|
+
setup(F, { emit: n }) {
|
|
40
|
+
const { t: I } = Z(), p = n;
|
|
41
|
+
return (g, m) => {
|
|
42
|
+
const l = w("FmButton"), d = w("FmListItem");
|
|
43
43
|
return C(), B(Y, null, [
|
|
44
|
-
c(
|
|
45
|
-
onClick:
|
|
44
|
+
c(d, {
|
|
45
|
+
onClick: m[4] || (m[4] = (u) => p("edit", F.level)),
|
|
46
46
|
class: "!p-0"
|
|
47
47
|
}, {
|
|
48
48
|
default: V(() => [
|
|
@@ -50,23 +50,23 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
50
50
|
a("div", Ie, [
|
|
51
51
|
a("div", Te, [
|
|
52
52
|
a("div", Ue, [
|
|
53
|
-
a("div", Ae, O(
|
|
53
|
+
a("div", Ae, O(F.rewardGroup.name), 1)
|
|
54
54
|
])
|
|
55
55
|
])
|
|
56
56
|
]),
|
|
57
57
|
a("div", Le, [
|
|
58
|
-
c(
|
|
58
|
+
c(l, {
|
|
59
59
|
variant: "secondary",
|
|
60
60
|
label: r(I)("connect.referral.reward.add_count"),
|
|
61
61
|
icon: "add",
|
|
62
|
-
onClick:
|
|
63
|
-
|
|
62
|
+
onClick: m[0] || (m[0] = (u) => {
|
|
63
|
+
u.stopPropagation(), p("addCount", F.level);
|
|
64
64
|
})
|
|
65
65
|
}, null, 8, ["label"]),
|
|
66
|
-
c(
|
|
66
|
+
c(l, {
|
|
67
67
|
icon: "delete",
|
|
68
|
-
onClick:
|
|
69
|
-
|
|
68
|
+
onClick: m[1] || (m[1] = (u) => {
|
|
69
|
+
u.stopPropagation(), p("remove", F.level);
|
|
70
70
|
}),
|
|
71
71
|
variant: "tertiary"
|
|
72
72
|
})
|
|
@@ -77,42 +77,42 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
77
77
|
a("div", Oe, [
|
|
78
78
|
a("div", je, [
|
|
79
79
|
a("div", null, [
|
|
80
|
-
a("div", De, O(
|
|
80
|
+
a("div", De, O(F.rewardGroup.name), 1)
|
|
81
81
|
])
|
|
82
82
|
])
|
|
83
83
|
]),
|
|
84
|
-
c(
|
|
84
|
+
c(l, {
|
|
85
85
|
variant: "tertiary",
|
|
86
86
|
icon: "delete",
|
|
87
|
-
onClick:
|
|
87
|
+
onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", F.level)))
|
|
88
88
|
})
|
|
89
89
|
]),
|
|
90
|
-
c(
|
|
90
|
+
c(l, {
|
|
91
91
|
class: "w-full",
|
|
92
92
|
variant: "secondary",
|
|
93
93
|
label: "Add count",
|
|
94
94
|
disabled: !0,
|
|
95
95
|
icon: "add",
|
|
96
|
-
onClick:
|
|
96
|
+
onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", F.level)))
|
|
97
97
|
})
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
100
100
|
_: 1
|
|
101
101
|
}),
|
|
102
|
-
|
|
102
|
+
_e(g.$slots, "default")
|
|
103
103
|
], 64);
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
}), Me = { class: "flex flex-col space-y-16 pr-12" }, Ne = { class: "flex gap-16 items-center" }, He = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ze = { class: "fm-typo-en-title-sm-800" }, Ye = { class: "flex items-center gap-8" }, qe = /* @__PURE__ */ q({
|
|
107
107
|
__name: "EditReferralCountSheet",
|
|
108
108
|
emits: ["update"],
|
|
109
|
-
setup(
|
|
110
|
-
const { t: p } = Z(), g = I,
|
|
111
|
-
var
|
|
112
|
-
const
|
|
113
|
-
|
|
109
|
+
setup(F, { expose: n, emit: I }) {
|
|
110
|
+
const { t: p } = Z(), g = I, m = $(!1), l = $({}), d = $(-1), u = $(-1), R = Q(), A = be.superRefine((e, t) => {
|
|
111
|
+
var k, U, P, x, _, E, ae;
|
|
112
|
+
const i = u.value == -1 ? ((P = (U = (k = R.referralProgram) == null ? void 0 : k.reward[d.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : u.value, v = (_ = (x = R.referralProgram) == null ? void 0 : x.reward[d.value]) == null ? void 0 : _.rewards[i - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[d.value]) == null ? void 0 : ae.rewards[i + 1];
|
|
113
|
+
v && e.threshold.from < v.threshold.from + 1 && t.addIssue({
|
|
114
114
|
code: "custom",
|
|
115
|
-
message: `The min referral must be at least ${
|
|
115
|
+
message: `The min referral must be at least ${v.threshold.from + 1}`,
|
|
116
116
|
path: ["option"]
|
|
117
117
|
}), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && t.addIssue({
|
|
118
118
|
code: "custom",
|
|
@@ -120,40 +120,40 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
120
120
|
path: ["option"]
|
|
121
121
|
});
|
|
122
122
|
}), T = G(() => {
|
|
123
|
-
const e = A.safeParse(
|
|
123
|
+
const e = A.safeParse(l.value);
|
|
124
124
|
return e.success ? [] : e.error.errors;
|
|
125
125
|
});
|
|
126
126
|
function M() {
|
|
127
|
-
const e = A.safeParse(
|
|
127
|
+
const e = A.safeParse(l.value);
|
|
128
128
|
e.success && g("update", {
|
|
129
|
-
groupIndex:
|
|
130
|
-
countIndex:
|
|
129
|
+
groupIndex: d.value,
|
|
130
|
+
countIndex: u.value,
|
|
131
131
|
referralCount: e.data
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
async function D(e, t) {
|
|
135
|
-
var
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
(
|
|
135
|
+
var i, v, b, k, U, P;
|
|
136
|
+
if (m.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
|
|
137
|
+
d.value = t.groupIndex, u.value = t.countIndex, l.value = H(
|
|
138
|
+
(i = R.referralProgram) == null ? void 0 : i.reward[t.groupIndex].rewards[t.countIndex]
|
|
139
139
|
);
|
|
140
140
|
else {
|
|
141
|
-
|
|
142
|
-
const x =
|
|
143
|
-
|
|
141
|
+
d.value = t.groupIndex, u.value = -1;
|
|
142
|
+
const x = u.value == -1 ? ((k = (b = (v = R.referralProgram) == null ? void 0 : v.reward[d.value]) == null ? void 0 : b.rewards) == null ? void 0 : k.length) || 0 : u.value, _ = (P = (U = R.referralProgram) == null ? void 0 : U.reward[d.value]) == null ? void 0 : P.rewards[x - 1];
|
|
143
|
+
l.value = {
|
|
144
144
|
threshold: {
|
|
145
|
-
from:
|
|
145
|
+
from: _ != null && _.threshold ? _ != null && _.threshold.to ? _.threshold.to + 1 : (_ == null ? void 0 : _.threshold.from) + 1 : 1,
|
|
146
146
|
to: null
|
|
147
147
|
},
|
|
148
148
|
rewards: []
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
h.value = [], h.value =
|
|
152
|
-
(x) =>
|
|
151
|
+
h.value = [], h.value = s.value.map(
|
|
152
|
+
(x) => l.value.rewards.includes(x.id)
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
function L() {
|
|
156
|
-
|
|
156
|
+
m.value = !1;
|
|
157
157
|
}
|
|
158
158
|
const y = [
|
|
159
159
|
{
|
|
@@ -177,7 +177,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
177
177
|
return t.description;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
],
|
|
180
|
+
], f = me(), o = $([]), s = G(() => f.rewards.map((e) => {
|
|
181
181
|
let t = "No expiry";
|
|
182
182
|
switch (e.option.type) {
|
|
183
183
|
case "VOUCHER":
|
|
@@ -197,36 +197,36 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
197
197
|
}));
|
|
198
198
|
G(() => []);
|
|
199
199
|
function S() {
|
|
200
|
-
const e =
|
|
200
|
+
const e = s.value;
|
|
201
201
|
for (let t = 0; t < e.length; t++) {
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
(b) => b !=
|
|
202
|
+
const i = e[t], v = h.value[t];
|
|
203
|
+
v && !l.value.rewards.includes(i.id) && l.value.rewards.push(i.id), !v && l.value.rewards.includes(i.id) && (l.value.rewards = l.value.rewards.filter(
|
|
204
|
+
(b) => b != i.id
|
|
205
205
|
));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
const h =
|
|
209
|
-
return ie(h, S, { deep: !0 }),
|
|
208
|
+
const h = $({});
|
|
209
|
+
return ie(h, S, { deep: !0 }), n({
|
|
210
210
|
showSheet: D,
|
|
211
211
|
hideSheet: L,
|
|
212
|
-
data:
|
|
212
|
+
data: l
|
|
213
213
|
}), (e, t) => {
|
|
214
|
-
const
|
|
214
|
+
const i = w("FmStepperField"), v = w("FmHelperText"), b = w("FmTable"), k = w("FmButton"), U = w("FmSideSheet");
|
|
215
215
|
return C(), j(U, {
|
|
216
216
|
"max-width": 1e3,
|
|
217
|
-
modelValue: r(
|
|
218
|
-
"onUpdate:modelValue": t[4] || (t[4] = (P) => J(
|
|
219
|
-
header: `${r(
|
|
217
|
+
modelValue: r(m),
|
|
218
|
+
"onUpdate:modelValue": t[4] || (t[4] = (P) => J(m) ? m.value = P : null),
|
|
219
|
+
header: `${r(u) == -1 ? r(p)("connect.referral.editReferralCountSheet.add") : r(p)("connect.referral.editReferralCountSheet.edit")}`
|
|
220
220
|
}, {
|
|
221
221
|
"side-sheet-footer": V(() => [
|
|
222
222
|
a("div", Ye, [
|
|
223
|
-
c(
|
|
223
|
+
c(k, {
|
|
224
224
|
label: r(p)("connect.editTierSheet.submit"),
|
|
225
225
|
onClick: M,
|
|
226
226
|
disabled: r(T).length > 0 || r(W)().isLoading,
|
|
227
227
|
loading: r(W)().isLoading
|
|
228
228
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
229
|
-
c(
|
|
229
|
+
c(k, {
|
|
230
230
|
label: r(p)("connect.editTierSheet.cancel"),
|
|
231
231
|
onClick: t[3] || (t[3] = (P) => L()),
|
|
232
232
|
variant: "tertiary"
|
|
@@ -234,14 +234,14 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
234
234
|
])
|
|
235
235
|
]),
|
|
236
236
|
default: V(() => [
|
|
237
|
-
c(X, { json: r(
|
|
237
|
+
c(X, { json: r(l) }, null, 8, ["json"]),
|
|
238
238
|
c(X, { json: r(T) }, null, 8, ["json"]),
|
|
239
239
|
a("div", Me, [
|
|
240
240
|
a("div", null, [
|
|
241
241
|
a("div", Ne, [
|
|
242
|
-
c(
|
|
243
|
-
modelValue: r(
|
|
244
|
-
"onUpdate:modelValue": t[0] || (t[0] = (P) => r(
|
|
242
|
+
c(i, {
|
|
243
|
+
modelValue: r(l).threshold.from,
|
|
244
|
+
"onUpdate:modelValue": t[0] || (t[0] = (P) => r(l).threshold.from = P),
|
|
245
245
|
"show-steppers": !1,
|
|
246
246
|
rules: [r(N).ruleAtPath(r(A), "threshold.from")]
|
|
247
247
|
}, {
|
|
@@ -257,9 +257,9 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
257
257
|
]),
|
|
258
258
|
_: 1
|
|
259
259
|
}, 8, ["modelValue", "rules"]),
|
|
260
|
-
c(
|
|
261
|
-
modelValue: r(
|
|
262
|
-
"onUpdate:modelValue": t[1] || (t[1] = (P) => r(
|
|
260
|
+
c(i, {
|
|
261
|
+
modelValue: r(l).threshold.to,
|
|
262
|
+
"onUpdate:modelValue": t[1] || (t[1] = (P) => r(l).threshold.to = P),
|
|
263
263
|
"show-steppers": !1,
|
|
264
264
|
rules: [r(N).ruleAtPath(r(A), "threshold.to")]
|
|
265
265
|
}, {
|
|
@@ -276,7 +276,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
276
276
|
_: 1
|
|
277
277
|
}, 8, ["modelValue", "rules"])
|
|
278
278
|
]),
|
|
279
|
-
c(
|
|
279
|
+
c(v, {
|
|
280
280
|
text: r(N).helperText(r(T), "threshold"),
|
|
281
281
|
state: r(N).helperState(r(T), "threshold")
|
|
282
282
|
}, null, 8, ["text", "state"]),
|
|
@@ -291,7 +291,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
291
291
|
selection: "multiple",
|
|
292
292
|
"column-filter": r(o),
|
|
293
293
|
"column-defs": y,
|
|
294
|
-
"row-data": r(
|
|
294
|
+
"row-data": r(s),
|
|
295
295
|
"page-size": 10
|
|
296
296
|
}, null, 8, ["modelValue", "column-filter", "row-data"])
|
|
297
297
|
])
|
|
@@ -300,7 +300,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
300
300
|
}, 8, ["modelValue", "header"]);
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
}), Ke = { class: "space-y-16" }, Je = { class: "grid grid-cols-3 gap-16" },
|
|
303
|
+
}), Ke = { class: "space-y-16" }, Je = /* @__PURE__ */ 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), We = { class: "grid grid-cols-3 gap-16" }, Ze = { class: "fm-typo-en-title-sm-800" }, Qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Xe = /* @__PURE__ */ q({
|
|
304
304
|
__name: "CriteriaTriggerInput",
|
|
305
305
|
props: {
|
|
306
306
|
modelValue: {
|
|
@@ -312,32 +312,32 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
312
312
|
}
|
|
313
313
|
},
|
|
314
314
|
emits: ["update:model-value"],
|
|
315
|
-
setup(
|
|
316
|
-
const I =
|
|
315
|
+
setup(F, { emit: n }) {
|
|
316
|
+
const I = F, p = n, g = G(() => [
|
|
317
317
|
le.enum.BILL_COMPLETED,
|
|
318
318
|
le.enum.FEEDBACK
|
|
319
|
-
].map((
|
|
320
|
-
return (
|
|
321
|
-
const
|
|
319
|
+
].map((m) => Se[m]));
|
|
320
|
+
return (m, l) => {
|
|
321
|
+
const d = w("FmCard");
|
|
322
322
|
return C(), B("div", Ke, [
|
|
323
|
-
|
|
324
|
-
a("div",
|
|
325
|
-
(C(!0), B(Y, null, re(r(g), (
|
|
326
|
-
key:
|
|
323
|
+
Je,
|
|
324
|
+
a("div", We, [
|
|
325
|
+
(C(!0), B(Y, null, re(r(g), (u) => (C(), j(d, {
|
|
326
|
+
key: u.name,
|
|
327
327
|
variant: "outlined",
|
|
328
328
|
disabled: I.disabled,
|
|
329
|
-
class:
|
|
329
|
+
class: ce(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
330
330
|
"col-span-3": r(g).length == 1,
|
|
331
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]":
|
|
332
|
-
"hover:bg-fm-color-opacity-sm":
|
|
331
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": F.modelValue == u.value,
|
|
332
|
+
"hover:bg-fm-color-opacity-sm": F.modelValue != u.value
|
|
333
333
|
}]),
|
|
334
334
|
onClick: () => {
|
|
335
|
-
I.modelValue !=
|
|
335
|
+
I.modelValue != u.value && !I.disabled && p("update:model-value", u.value);
|
|
336
336
|
}
|
|
337
337
|
}, {
|
|
338
338
|
default: V(() => [
|
|
339
|
-
a("div",
|
|
340
|
-
a("div",
|
|
339
|
+
a("div", Ze, O(u.name), 1),
|
|
340
|
+
a("div", Qe, O(u.description), 1)
|
|
341
341
|
]),
|
|
342
342
|
_: 2
|
|
343
343
|
}, 1032, ["disabled", "class", "onClick"]))), 128))
|
|
@@ -345,72 +345,72 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
345
345
|
]);
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
}),
|
|
348
|
+
}), er = { class: "flex items-center gap-x-8" }, rr = { class: "flex flex-col space-y-16 pr-12" }, tr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1), or = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1), ar = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1), nr = /* @__PURE__ */ a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1), lr = {
|
|
349
349
|
key: 0,
|
|
350
350
|
class: "space-y-16"
|
|
351
|
-
},
|
|
351
|
+
}, sr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1), ir = {
|
|
352
352
|
key: 1,
|
|
353
353
|
class: "space-y-16"
|
|
354
|
-
},
|
|
354
|
+
}, cr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1), dr = { class: "flex items-center gap-8" }, ur = /* @__PURE__ */ q({
|
|
355
355
|
__name: "EditCriteriaSheet",
|
|
356
356
|
emits: ["update"],
|
|
357
|
-
setup(
|
|
358
|
-
const { t: p } = Z(), g = I,
|
|
359
|
-
y.name.length >= 50 &&
|
|
357
|
+
setup(F, { expose: n, emit: I }) {
|
|
358
|
+
const { t: p } = Z(), g = I, m = $(!1), l = $(-1), d = $({}), u = Q(), R = xe.superRefine((y, f) => {
|
|
359
|
+
y.name.length >= 50 && f.addIssue({
|
|
360
360
|
code: "custom",
|
|
361
361
|
message: "Name must be less than 50 characters"
|
|
362
|
-
}), y.name.length < 1 &&
|
|
362
|
+
}), y.name.length < 1 && f.addIssue({
|
|
363
363
|
code: "custom",
|
|
364
364
|
message: "Name is required"
|
|
365
365
|
});
|
|
366
366
|
}), A = G(() => {
|
|
367
|
-
const y = R.safeParse(
|
|
367
|
+
const y = R.safeParse(d.value);
|
|
368
368
|
return y.success ? [] : y.error.errors;
|
|
369
369
|
});
|
|
370
|
-
function T(y,
|
|
370
|
+
function T(y, f) {
|
|
371
371
|
var o;
|
|
372
|
-
|
|
373
|
-
(o =
|
|
374
|
-
)) : (
|
|
375
|
-
_id: new
|
|
372
|
+
m.value = y, y && typeof f == "number" && f >= 0 ? (l.value = f, d.value = H(
|
|
373
|
+
(o = u.referralProgram) == null ? void 0 : o.criteria[f]
|
|
374
|
+
)) : (l.value = -1, d.value = {
|
|
375
|
+
_id: new ke().toString(),
|
|
376
376
|
name: "",
|
|
377
377
|
type: "AUTO",
|
|
378
378
|
event: { type: "BILL_COMPLETED" }
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
function M() {
|
|
382
|
-
|
|
382
|
+
m.value = !1;
|
|
383
383
|
}
|
|
384
384
|
function D() {
|
|
385
|
-
const y = R.safeParse(
|
|
386
|
-
y.success && g("update",
|
|
385
|
+
const y = R.safeParse(d.value);
|
|
386
|
+
y.success && g("update", l.value, y.data);
|
|
387
387
|
}
|
|
388
388
|
function L(y) {
|
|
389
|
-
|
|
389
|
+
d.value.type = y, y == "AUTO" ? d.value.event = { type: "BILL_COMPLETED" } : d.value.event = void 0;
|
|
390
390
|
}
|
|
391
|
-
return
|
|
391
|
+
return n({
|
|
392
392
|
showSheet: T,
|
|
393
393
|
hideSheet: M,
|
|
394
|
-
data:
|
|
395
|
-
}), (y,
|
|
396
|
-
const o = w("FmButton"),
|
|
394
|
+
data: d
|
|
395
|
+
}), (y, f) => {
|
|
396
|
+
const o = w("FmButton"), s = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
|
|
397
397
|
return C(), j(h, {
|
|
398
398
|
"max-width": 768,
|
|
399
|
-
modelValue: r(
|
|
400
|
-
"onUpdate:modelValue":
|
|
399
|
+
modelValue: r(m),
|
|
400
|
+
"onUpdate:modelValue": f[6] || (f[6] = (e) => J(m) ? m.value = e : null)
|
|
401
401
|
}, {
|
|
402
402
|
"side-sheet-header": V(() => [
|
|
403
|
-
a("div",
|
|
403
|
+
a("div", er, [
|
|
404
404
|
c(o, {
|
|
405
405
|
icon: "arrow_back",
|
|
406
406
|
variant: "tertiary",
|
|
407
|
-
onClick:
|
|
407
|
+
onClick: f[0] || (f[0] = (e) => T(!1))
|
|
408
408
|
}),
|
|
409
|
-
|
|
409
|
+
de("Add Criteria ")
|
|
410
410
|
])
|
|
411
411
|
]),
|
|
412
412
|
"side-sheet-footer": V(() => [
|
|
413
|
-
a("div",
|
|
413
|
+
a("div", dr, [
|
|
414
414
|
c(o, {
|
|
415
415
|
label: r(p)("connect.editTierSheet.submit"),
|
|
416
416
|
onClick: D,
|
|
@@ -419,34 +419,34 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
419
419
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
420
420
|
c(o, {
|
|
421
421
|
label: r(p)("connect.editTierSheet.cancel"),
|
|
422
|
-
onClick:
|
|
422
|
+
onClick: f[5] || (f[5] = (e) => T(!1)),
|
|
423
423
|
variant: "tertiary"
|
|
424
424
|
}, null, 8, ["label"])
|
|
425
425
|
])
|
|
426
426
|
]),
|
|
427
427
|
default: V(() => [
|
|
428
|
-
c(X, { json: r(
|
|
429
|
-
a("div",
|
|
430
|
-
|
|
428
|
+
c(X, { json: r(d) }, null, 8, ["json"]),
|
|
429
|
+
a("div", rr, [
|
|
430
|
+
tr,
|
|
431
431
|
c(Re, {
|
|
432
|
-
modelValue: r(
|
|
433
|
-
"onUpdate:modelValue":
|
|
432
|
+
modelValue: r(d).name,
|
|
433
|
+
"onUpdate:modelValue": f[1] || (f[1] = (e) => r(d).name = e),
|
|
434
434
|
label: r(p)("connect.referral.editReferralTierSheet.name"),
|
|
435
435
|
schema: r(N).typeAtPath(r(R), "name")
|
|
436
436
|
}, null, 8, ["modelValue", "label", "schema"]),
|
|
437
|
-
|
|
437
|
+
or,
|
|
438
438
|
c(S, {
|
|
439
|
-
"model-value": r(
|
|
439
|
+
"model-value": r(d).type,
|
|
440
440
|
label: "Verify status",
|
|
441
441
|
"onUpdate:modelValue": L
|
|
442
442
|
}, {
|
|
443
443
|
default: V(() => [
|
|
444
|
-
c(
|
|
444
|
+
c(s, {
|
|
445
445
|
value: "AUTO",
|
|
446
446
|
label: "Auto",
|
|
447
447
|
sublabel: "Verify based on rule configuration"
|
|
448
448
|
}),
|
|
449
|
-
c(
|
|
449
|
+
c(s, {
|
|
450
450
|
value: "MANUAL",
|
|
451
451
|
label: "Manual",
|
|
452
452
|
sublabel: "Verify based on manual inspection"
|
|
@@ -454,25 +454,25 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
454
454
|
]),
|
|
455
455
|
_: 1
|
|
456
456
|
}, 8, ["model-value"]),
|
|
457
|
-
r(
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
c(
|
|
461
|
-
"model-value": r(
|
|
462
|
-
"onUpdate:modelValue":
|
|
457
|
+
r(d).type == "AUTO" ? (C(), B(Y, { key: 0 }, [
|
|
458
|
+
ar,
|
|
459
|
+
nr,
|
|
460
|
+
c(Xe, {
|
|
461
|
+
"model-value": r(d).event.type,
|
|
462
|
+
"onUpdate:modelValue": f[2] || (f[2] = (e) => r(d).event.type = e)
|
|
463
463
|
}, null, 8, ["model-value"]),
|
|
464
|
-
r(
|
|
465
|
-
|
|
466
|
-
c(
|
|
467
|
-
"model-value": r(
|
|
468
|
-
"onUpdate:modelValue":
|
|
464
|
+
r(d).event.type == r(se).enum.BILL_COMPLETED ? (C(), B("div", lr, [
|
|
465
|
+
sr,
|
|
466
|
+
c($e, {
|
|
467
|
+
"model-value": r(d).event.rule,
|
|
468
|
+
"onUpdate:modelValue": f[3] || (f[3] = (e) => r(d).event.rule = e)
|
|
469
469
|
}, null, 8, ["model-value"])
|
|
470
470
|
])) : z("", !0),
|
|
471
|
-
r(
|
|
472
|
-
|
|
473
|
-
c(
|
|
474
|
-
"model-value": r(
|
|
475
|
-
"onUpdate:modelValue":
|
|
471
|
+
r(d).event.type == r(se).enum.FEEDBACK ? (C(), B("div", ir, [
|
|
472
|
+
cr,
|
|
473
|
+
c(Fe, {
|
|
474
|
+
"model-value": r(d).event.rule,
|
|
475
|
+
"onUpdate:modelValue": f[4] || (f[4] = (e) => r(d).event.rule = e)
|
|
476
476
|
}, null, 8, ["model-value"])
|
|
477
477
|
])) : z("", !0)
|
|
478
478
|
], 64)) : z("", !0)
|
|
@@ -484,46 +484,49 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
|
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
function he() {
|
|
487
|
-
const
|
|
487
|
+
const F = $(!1), n = Ce();
|
|
488
488
|
return {
|
|
489
489
|
confirmUpdateReferralRecord: async () => {
|
|
490
490
|
await new Promise((p) => {
|
|
491
|
-
|
|
491
|
+
n.open({
|
|
492
492
|
title: "Confirmation",
|
|
493
493
|
message: "This will change all referral settings? Would you like to update previous referral record?",
|
|
494
494
|
primaryActions: { text: "Update all", close: !0 },
|
|
495
495
|
secondaryActions: { text: "Update future only", close: !0 }
|
|
496
496
|
}).onPrimary(async () => {
|
|
497
|
-
|
|
497
|
+
F.value = !0, p();
|
|
498
498
|
}).onSecondary(async () => {
|
|
499
|
-
|
|
499
|
+
F.value = !1, p();
|
|
500
500
|
});
|
|
501
501
|
});
|
|
502
502
|
},
|
|
503
|
-
updateReferralRecord:
|
|
503
|
+
updateReferralRecord: F
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex justify-between items-center" }, pr = /* @__PURE__ */ a("div", null, [
|
|
507
|
+
/* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
|
|
508
|
+
/* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
|
|
509
|
+
], -1), hr = /* @__PURE__ */ q({
|
|
507
510
|
__name: "ManageCriteriaSheet",
|
|
508
|
-
setup(
|
|
509
|
-
const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord:
|
|
511
|
+
setup(F, { expose: n }) {
|
|
512
|
+
const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = he(), l = $(!1), d = $({}), u = Q(), R = $(
|
|
510
513
|
null
|
|
511
514
|
), A = G(() => {
|
|
512
515
|
var o;
|
|
513
|
-
return (o =
|
|
516
|
+
return (o = u.referralProgram) == null ? void 0 : o.criteria;
|
|
514
517
|
});
|
|
515
518
|
async function T(o) {
|
|
516
519
|
await g(), await p(async () => {
|
|
517
520
|
await pe.update({
|
|
518
521
|
...o,
|
|
519
|
-
updateReferralRecord:
|
|
520
|
-
}), await
|
|
522
|
+
updateReferralRecord: m.value
|
|
523
|
+
}), await u.readReferralProgram();
|
|
521
524
|
});
|
|
522
525
|
}
|
|
523
|
-
async function M(o,
|
|
526
|
+
async function M(o, s) {
|
|
524
527
|
var e, t;
|
|
525
|
-
const S = o == -1 ? ((e =
|
|
526
|
-
h.criteria[S] =
|
|
528
|
+
const S = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(u.referralProgram);
|
|
529
|
+
h.criteria[S] = s, await T(h), (t = R.value) == null || t.showSheet(!1);
|
|
527
530
|
}
|
|
528
531
|
async function D(o) {
|
|
529
532
|
var h, e;
|
|
@@ -534,8 +537,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
534
537
|
I("connect.prompt.cancel")
|
|
535
538
|
))
|
|
536
539
|
return;
|
|
537
|
-
const
|
|
538
|
-
S.criteria.splice(
|
|
540
|
+
const s = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(u.referralProgram);
|
|
541
|
+
S.criteria.splice(s, 1), await T(S), (e = R.value) == null || e.showSheet(!1);
|
|
539
542
|
}
|
|
540
543
|
const L = [
|
|
541
544
|
{
|
|
@@ -559,8 +562,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
559
562
|
variant: "tertiary",
|
|
560
563
|
icon: "delete",
|
|
561
564
|
iconColor: "neutral-gray-400",
|
|
562
|
-
onClick: (
|
|
563
|
-
|
|
565
|
+
onClick: (s) => {
|
|
566
|
+
s.stopPropagation(), D(o.row.index);
|
|
564
567
|
}
|
|
565
568
|
})
|
|
566
569
|
];
|
|
@@ -568,38 +571,35 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
568
571
|
}
|
|
569
572
|
];
|
|
570
573
|
function y(o) {
|
|
571
|
-
|
|
574
|
+
l.value = o;
|
|
572
575
|
}
|
|
573
|
-
function
|
|
574
|
-
|
|
576
|
+
function f() {
|
|
577
|
+
l.value = !1;
|
|
575
578
|
}
|
|
576
|
-
return
|
|
579
|
+
return n({
|
|
577
580
|
showSheet: y,
|
|
578
|
-
hideSheet:
|
|
579
|
-
data:
|
|
580
|
-
}), (o,
|
|
581
|
+
hideSheet: f,
|
|
582
|
+
data: d
|
|
583
|
+
}), (o, s) => {
|
|
581
584
|
const S = w("FmButton"), h = w("FmTable"), e = w("FmSideSheet");
|
|
582
585
|
return C(), B(Y, null, [
|
|
583
586
|
c(e, {
|
|
584
587
|
"max-width": 768,
|
|
585
|
-
modelValue: r(
|
|
586
|
-
"onUpdate:modelValue":
|
|
588
|
+
modelValue: r(l),
|
|
589
|
+
"onUpdate:modelValue": s[2] || (s[2] = (t) => J(l) ? l.value = t : null),
|
|
587
590
|
header: "Manage Criteria"
|
|
588
591
|
}, {
|
|
589
592
|
default: V(() => [
|
|
590
|
-
a("div",
|
|
591
|
-
a("div",
|
|
592
|
-
|
|
593
|
-
a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
|
|
594
|
-
a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
|
|
595
|
-
], -1)),
|
|
593
|
+
a("div", mr, [
|
|
594
|
+
a("div", fr, [
|
|
595
|
+
pr,
|
|
596
596
|
c(S, {
|
|
597
597
|
label: "Add Criteria",
|
|
598
598
|
icon: "add",
|
|
599
599
|
variant: "secondary",
|
|
600
|
-
onClick:
|
|
601
|
-
var
|
|
602
|
-
return (
|
|
600
|
+
onClick: s[0] || (s[0] = (t) => {
|
|
601
|
+
var i;
|
|
602
|
+
return (i = r(R)) == null ? void 0 : i.showSheet(!0);
|
|
603
603
|
})
|
|
604
604
|
})
|
|
605
605
|
]),
|
|
@@ -609,16 +609,16 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
609
609
|
"page-size": 100,
|
|
610
610
|
"shrink-at": !1,
|
|
611
611
|
"column-defs": L,
|
|
612
|
-
onRowClick:
|
|
613
|
-
var
|
|
614
|
-
return (
|
|
612
|
+
onRowClick: s[1] || (s[1] = (t) => {
|
|
613
|
+
var i;
|
|
614
|
+
return (i = r(R)) == null ? void 0 : i.showSheet(!0, t.index);
|
|
615
615
|
})
|
|
616
616
|
}, null, 8, ["row-data"])
|
|
617
617
|
])
|
|
618
618
|
]),
|
|
619
619
|
_: 1
|
|
620
620
|
}, 8, ["modelValue"]),
|
|
621
|
-
c(
|
|
621
|
+
c(ur, {
|
|
622
622
|
ref_key: "editCriteriaSheetRef",
|
|
623
623
|
ref: R,
|
|
624
624
|
onUpdate: M
|
|
@@ -626,20 +626,20 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
626
626
|
], 64);
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
629
|
+
}), _r = { class: "flex flex-col space-y-16 pr-12" }, vr = { class: "fm-typo-en-title-sm-800" }, gr = { class: "flex items-center gap-8" }, wr = /* @__PURE__ */ q({
|
|
630
630
|
__name: "EditRefereeRewardSheet",
|
|
631
631
|
emits: ["update"],
|
|
632
|
-
setup(
|
|
633
|
-
const { t: p } = Z(), g = I,
|
|
634
|
-
function
|
|
635
|
-
g("update",
|
|
632
|
+
setup(F, { expose: n, emit: I }) {
|
|
633
|
+
const { t: p } = Z(), g = I, m = $(!1), l = $([]), d = Q();
|
|
634
|
+
function u() {
|
|
635
|
+
g("update", l.value);
|
|
636
636
|
}
|
|
637
637
|
async function R(o) {
|
|
638
|
-
var
|
|
639
|
-
|
|
638
|
+
var s, S;
|
|
639
|
+
m.value = o, l.value = ((S = (s = d.referralProgram) == null ? void 0 : s.refereeReward) == null ? void 0 : S.map((h) => h.toString())) || [], f.value = L.value.map((h) => l.value.includes(h.id));
|
|
640
640
|
}
|
|
641
641
|
function A() {
|
|
642
|
-
|
|
642
|
+
m.value = !1;
|
|
643
643
|
}
|
|
644
644
|
const T = [
|
|
645
645
|
{
|
|
@@ -658,19 +658,19 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
658
658
|
header: "Description",
|
|
659
659
|
accessorFn: (o) => o.description,
|
|
660
660
|
cell(o) {
|
|
661
|
-
const
|
|
662
|
-
if (
|
|
663
|
-
return
|
|
661
|
+
const s = o.row.original;
|
|
662
|
+
if (s.collectible.type == "VOUCHER" || s.selectedReward == null)
|
|
663
|
+
return s.description;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
], M = me(), D =
|
|
667
|
-
let
|
|
666
|
+
], M = me(), D = $([]), L = G(() => M.rewards.map((o) => {
|
|
667
|
+
let s = "No expiry";
|
|
668
668
|
switch (o.option.type) {
|
|
669
669
|
case "VOUCHER":
|
|
670
|
-
|
|
670
|
+
s = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
|
|
671
671
|
break;
|
|
672
672
|
case "LOYALTY":
|
|
673
|
-
|
|
673
|
+
s = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
|
|
674
674
|
break;
|
|
675
675
|
}
|
|
676
676
|
return {
|
|
@@ -678,52 +678,52 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
678
678
|
name: o.name,
|
|
679
679
|
collectible: o.option,
|
|
680
680
|
collectibleConfig: o.collectibleConfig,
|
|
681
|
-
description:
|
|
681
|
+
description: s
|
|
682
682
|
};
|
|
683
683
|
}));
|
|
684
684
|
G(() => []);
|
|
685
685
|
function y() {
|
|
686
686
|
const o = L.value;
|
|
687
|
-
for (let
|
|
688
|
-
const S = o[
|
|
689
|
-
h && !
|
|
687
|
+
for (let s = 0; s < o.length; s++) {
|
|
688
|
+
const S = o[s], h = f.value[s];
|
|
689
|
+
h && !l.value.includes(S.id) && l.value.push(S.id), !h && l.value.includes(S.id) && (l.value = l.value.filter((e) => e != S.id));
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
return ie(
|
|
692
|
+
const f = $({});
|
|
693
|
+
return ie(f, y, { deep: !0 }), n({
|
|
694
694
|
showSheet: R,
|
|
695
695
|
hideSheet: A,
|
|
696
|
-
data:
|
|
697
|
-
}), (o,
|
|
696
|
+
data: l
|
|
697
|
+
}), (o, s) => {
|
|
698
698
|
const S = w("FmTable"), h = w("FmButton"), e = w("FmSideSheet");
|
|
699
699
|
return C(), j(e, {
|
|
700
700
|
"max-width": 1e3,
|
|
701
|
-
modelValue: r(
|
|
702
|
-
"onUpdate:modelValue":
|
|
701
|
+
modelValue: r(m),
|
|
702
|
+
"onUpdate:modelValue": s[2] || (s[2] = (t) => J(m) ? m.value = t : null),
|
|
703
703
|
header: "Referee reward"
|
|
704
704
|
}, {
|
|
705
705
|
"side-sheet-footer": V(() => [
|
|
706
|
-
a("div",
|
|
706
|
+
a("div", gr, [
|
|
707
707
|
c(h, {
|
|
708
708
|
label: r(p)("connect.common.save"),
|
|
709
|
-
onClick:
|
|
709
|
+
onClick: u,
|
|
710
710
|
disabled: r(W)().isLoading,
|
|
711
711
|
loading: r(W)().isLoading
|
|
712
712
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
713
713
|
c(h, {
|
|
714
714
|
label: r(p)("connect.common.cancel"),
|
|
715
|
-
onClick:
|
|
715
|
+
onClick: s[1] || (s[1] = (t) => A()),
|
|
716
716
|
variant: "tertiary"
|
|
717
717
|
}, null, 8, ["label"])
|
|
718
718
|
])
|
|
719
719
|
]),
|
|
720
720
|
default: V(() => [
|
|
721
|
-
c(X, { json: r(
|
|
722
|
-
a("div",
|
|
723
|
-
a("div",
|
|
721
|
+
c(X, { json: r(l) }, null, 8, ["json"]),
|
|
722
|
+
a("div", _r, [
|
|
723
|
+
a("div", vr, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
|
|
724
724
|
c(S, {
|
|
725
|
-
modelValue: r(
|
|
726
|
-
"onUpdate:modelValue":
|
|
725
|
+
modelValue: r(f),
|
|
726
|
+
"onUpdate:modelValue": s[0] || (s[0] = (t) => J(f) ? f.value = t : null),
|
|
727
727
|
selection: "multiple",
|
|
728
728
|
"column-filter": r(D),
|
|
729
729
|
"column-defs": T,
|
|
@@ -736,42 +736,48 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
736
736
|
}, 8, ["modelValue"]);
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
}),
|
|
739
|
+
}), yr = { class: "fm-typo-en-title-sm-600" }, br = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, xr = { class: "flex gap-x-8" }, Cr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, Rr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sr = { class: "mb-40" }, $r = {
|
|
740
740
|
key: 0,
|
|
741
741
|
class: "flex flex-col items-center justify-center gap-y-16 p-24"
|
|
742
|
-
},
|
|
742
|
+
}, Fr = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
743
|
+
/* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
|
|
744
|
+
/* @__PURE__ */ 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 ")
|
|
745
|
+
], -1), kr = /* @__PURE__ */ a("img", {
|
|
746
|
+
src: ge,
|
|
747
|
+
class: "aspect-square w-[150px]"
|
|
748
|
+
}, null, -1), Pr = { class: "flex flex-col gap-16 text-center" }, Vr = { class: "fm-typo-en-title-sm-800" }, Ir = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ q({
|
|
743
749
|
__name: "Overview",
|
|
744
|
-
setup(
|
|
745
|
-
const { t:
|
|
750
|
+
setup(F) {
|
|
751
|
+
const { t: n } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: l } = he(), d = G(() => {
|
|
746
752
|
var e;
|
|
747
753
|
return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
|
|
748
|
-
}),
|
|
749
|
-
|
|
750
|
-
const R =
|
|
751
|
-
var e, t,
|
|
754
|
+
}), u = $(null);
|
|
755
|
+
$(null);
|
|
756
|
+
const R = $(null), A = $(null), T = $(null), M = G(() => {
|
|
757
|
+
var e, t, i, v;
|
|
752
758
|
return [
|
|
753
759
|
{
|
|
754
760
|
label: "connect.referral.how_it_works.generate_link",
|
|
755
|
-
sublabel:
|
|
761
|
+
sublabel: n("connect.referral.how_it_works.generate_link_for_member"),
|
|
756
762
|
icon: "offline_share"
|
|
757
763
|
},
|
|
758
764
|
{
|
|
759
765
|
label: "connect.referral.how_it_works.referee_join_reward",
|
|
760
|
-
sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${
|
|
761
|
-
action:
|
|
766
|
+
sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${n("connect.referral.how_it_works.reward")}`,
|
|
767
|
+
action: n("connect.referral.actions.manage_reward"),
|
|
762
768
|
onClick: () => {
|
|
763
769
|
var b;
|
|
764
770
|
return (b = T.value) == null ? void 0 : b.showSheet(!0);
|
|
765
771
|
},
|
|
766
|
-
helperText:
|
|
772
|
+
helperText: n(
|
|
767
773
|
"connect.referral.how_it_works.referee_join_reward_description"
|
|
768
774
|
),
|
|
769
775
|
icon: "group_add"
|
|
770
776
|
},
|
|
771
777
|
{
|
|
772
778
|
label: "connect.referral.how_it_works.referee_meet_criteria",
|
|
773
|
-
sublabel: `${(
|
|
774
|
-
action:
|
|
779
|
+
sublabel: `${(i = g.referralProgram) == null ? void 0 : i.criteria.length} ${n("connect.referral.how_it_works.criteria")}`,
|
|
780
|
+
action: n("connect.referral.actions.manage_criteria"),
|
|
775
781
|
onClick: () => {
|
|
776
782
|
var b;
|
|
777
783
|
return (b = A.value) == null ? void 0 : b.showSheet(!0);
|
|
@@ -780,15 +786,15 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
780
786
|
},
|
|
781
787
|
{
|
|
782
788
|
label: "connect.referral.how_it_works.referer_get_reward",
|
|
783
|
-
sublabel: `${(
|
|
784
|
-
helperText:
|
|
789
|
+
sublabel: `${(v = g.referralProgram) == null ? void 0 : v.reward.length} ${n("connect.referral.how_it_works.reward_tier")}`,
|
|
790
|
+
helperText: n("connect.referral.how_it_works.referral_tier_description"),
|
|
785
791
|
icon: "featured_seasonal_and_gifts"
|
|
786
792
|
}
|
|
787
793
|
];
|
|
788
794
|
});
|
|
789
795
|
function D(e) {
|
|
790
796
|
var t;
|
|
791
|
-
(t =
|
|
797
|
+
(t = u.value) == null || t.onManageRewardGroup(e);
|
|
792
798
|
}
|
|
793
799
|
function L(e) {
|
|
794
800
|
var t;
|
|
@@ -798,57 +804,57 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
798
804
|
});
|
|
799
805
|
}
|
|
800
806
|
async function y(e) {
|
|
801
|
-
var P, x,
|
|
802
|
-
const t = e.countIndex == -1 ? ((x = (P = g.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0,
|
|
807
|
+
var P, x, _, E;
|
|
808
|
+
const t = e.countIndex == -1 ? ((x = (P = g.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0, i = e.referralCount, v = H(
|
|
803
809
|
g.referralProgram
|
|
804
|
-
), b =
|
|
810
|
+
), b = v.reward[e.groupIndex];
|
|
805
811
|
b.rewards[t] = e.referralCount;
|
|
806
|
-
const
|
|
807
|
-
if (
|
|
812
|
+
const k = b.rewards[t - 1], U = b.rewards[t + 1];
|
|
813
|
+
if (k && k.threshold.to != i.threshold.from - 1) {
|
|
808
814
|
if (!await K.confirm(
|
|
809
|
-
|
|
815
|
+
n(
|
|
810
816
|
"connect.referral.referral_count.update.range_discontinuous.previous",
|
|
811
817
|
{
|
|
812
|
-
name:
|
|
813
|
-
from:
|
|
814
|
-
to:
|
|
815
|
-
newTo:
|
|
818
|
+
name: k.threshold.from,
|
|
819
|
+
from: k.threshold.from ?? 0,
|
|
820
|
+
to: k.threshold.to ?? 1 / 0,
|
|
821
|
+
newTo: i.threshold.from - 1
|
|
816
822
|
}
|
|
817
823
|
),
|
|
818
|
-
|
|
819
|
-
|
|
824
|
+
n("connect.referral.referral_count.title"),
|
|
825
|
+
n("connect.referral.referral_count.remove.next_range")
|
|
820
826
|
))
|
|
821
827
|
return;
|
|
822
|
-
|
|
828
|
+
k.threshold.to = i.threshold.from - 1;
|
|
823
829
|
}
|
|
824
|
-
if (U && U.threshold.from - 1 !=
|
|
830
|
+
if (U && U.threshold.from - 1 != i.threshold.to) {
|
|
825
831
|
if (!await K.confirm(
|
|
826
|
-
|
|
832
|
+
n("connect.program.tier.update.range_discontinuous.next", {
|
|
827
833
|
name: U.threshold.from,
|
|
828
834
|
from: U.threshold.from ?? 0,
|
|
829
835
|
to: U.threshold.to ?? 1 / 0,
|
|
830
|
-
newFrom:
|
|
836
|
+
newFrom: i.threshold.to ?? 1
|
|
831
837
|
}),
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
838
|
+
n("connect.program.tier.title"),
|
|
839
|
+
n("connect.program.tier.remove.next_range"),
|
|
840
|
+
n("connect.prompt.cancel")
|
|
835
841
|
))
|
|
836
842
|
return;
|
|
837
|
-
U.threshold.from = (
|
|
843
|
+
U.threshold.from = (i.threshold.to ?? 0) + 1;
|
|
838
844
|
}
|
|
839
|
-
!U && !((
|
|
845
|
+
!U && !((_ = i.threshold) != null && _.to) && (i.threshold.to = void 0), await o(v), (E = R.value) == null || E.hideSheet();
|
|
840
846
|
}
|
|
841
|
-
async function
|
|
842
|
-
var
|
|
847
|
+
async function f(e) {
|
|
848
|
+
var i;
|
|
843
849
|
const t = H(g.referralProgram);
|
|
844
|
-
t.refereeReward = e, await o(t), (
|
|
850
|
+
t.refereeReward = e, await o(t), (i = T.value) == null || i.hideSheet();
|
|
845
851
|
}
|
|
846
852
|
async function o(e) {
|
|
847
|
-
await
|
|
853
|
+
await m(), await I(
|
|
848
854
|
async () => {
|
|
849
855
|
await pe.update({
|
|
850
856
|
...e,
|
|
851
|
-
updateReferralRecord:
|
|
857
|
+
updateReferralRecord: l.value
|
|
852
858
|
}), await g.readReferralProgram();
|
|
853
859
|
},
|
|
854
860
|
{
|
|
@@ -857,12 +863,12 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
857
863
|
}
|
|
858
864
|
);
|
|
859
865
|
}
|
|
860
|
-
async function
|
|
866
|
+
async function s(e) {
|
|
861
867
|
if (!await K.remove(
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
868
|
+
n("connect.referral.reward.confirm_remove_referral_tier"),
|
|
869
|
+
n("connect.referral.reward.remove_referral_tier"),
|
|
870
|
+
n("connect.prompt.confirm"),
|
|
871
|
+
n("connect.prompt.cancel")
|
|
866
872
|
))
|
|
867
873
|
return;
|
|
868
874
|
const t = H(g.referralProgram);
|
|
@@ -870,36 +876,36 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
870
876
|
}
|
|
871
877
|
async function S(e, t) {
|
|
872
878
|
if (!await K.remove(
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
879
|
+
n("connect.referral.reward.confirm_remove_referral_count"),
|
|
880
|
+
n("connect.referral.reward.remove_referral_count"),
|
|
881
|
+
n("connect.prompt.confirm"),
|
|
882
|
+
n("connect.prompt.cancel")
|
|
877
883
|
))
|
|
878
884
|
return;
|
|
879
|
-
const
|
|
880
|
-
if (
|
|
885
|
+
const i = H(g.referralProgram), v = i.reward[e].rewards[t + 1];
|
|
886
|
+
if (v) {
|
|
881
887
|
if (!await K.confirm(
|
|
882
|
-
|
|
883
|
-
from:
|
|
884
|
-
to:
|
|
885
|
-
newFrom:
|
|
888
|
+
n("connect.referral.referral_count.update.range_discontinuous.next", {
|
|
889
|
+
from: v.threshold.from ?? 0,
|
|
890
|
+
to: v.threshold.to ?? 1 / 0,
|
|
891
|
+
newFrom: i.reward[e].rewards[t].threshold.from
|
|
886
892
|
}),
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
893
|
+
n("connect.referral.referral_count.remove.title"),
|
|
894
|
+
n("connect.referral.referral_count.remove.next_range"),
|
|
895
|
+
n("connect.prompt.cancel")
|
|
890
896
|
))
|
|
891
897
|
return;
|
|
892
|
-
|
|
898
|
+
v.threshold.from = i.reward[e].rewards[t].threshold.from;
|
|
893
899
|
}
|
|
894
|
-
|
|
900
|
+
i.reward[e].rewards.splice(t, 1), await o(i);
|
|
895
901
|
}
|
|
896
902
|
const h = [
|
|
897
903
|
{
|
|
898
|
-
header:
|
|
904
|
+
header: n("connect.referral.reward.table.count"),
|
|
899
905
|
accessorFn: (e) => e.threshold.from == e.threshold.to ? `${e.threshold.from}` : e.threshold.to ? `${e.threshold.from} - ${e.threshold.to ?? "∞"}` : `${e.threshold.from}+`
|
|
900
906
|
},
|
|
901
907
|
{
|
|
902
|
-
header:
|
|
908
|
+
header: n("connect.referral.reward.table.reward"),
|
|
903
909
|
accessorKey: "type",
|
|
904
910
|
accessorFn: (e) => {
|
|
905
911
|
var t;
|
|
@@ -924,38 +930,38 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
924
930
|
}
|
|
925
931
|
}
|
|
926
932
|
];
|
|
927
|
-
return
|
|
933
|
+
return ve(async () => {
|
|
928
934
|
await g.readReferralProgram();
|
|
929
935
|
}), (e, t) => {
|
|
930
|
-
const
|
|
936
|
+
const i = w("FmCard"), v = w("FmIcon"), b = w("FmTooltip"), k = w("FmButton"), U = w("FmTable"), P = w("FmList");
|
|
931
937
|
return C(), B(Y, null, [
|
|
932
938
|
z("", !0),
|
|
933
|
-
c(
|
|
939
|
+
c(i, {
|
|
934
940
|
variant: "outlined",
|
|
935
941
|
class: "flex flex-col gap-16 p-16"
|
|
936
942
|
}, {
|
|
937
943
|
default: V(() => [
|
|
938
|
-
a("div",
|
|
939
|
-
a("div",
|
|
940
|
-
(C(!0), B(Y, null, re(r(M), (x,
|
|
941
|
-
key:
|
|
942
|
-
class:
|
|
944
|
+
a("div", yr, O(r(n)("connect.referral.how_it_works.title")), 1),
|
|
945
|
+
a("div", br, [
|
|
946
|
+
(C(!0), B(Y, null, re(r(M), (x, _) => (C(), B("div", {
|
|
947
|
+
key: _,
|
|
948
|
+
class: ce(["px-8", { "xs:!border-r": _ % 2 == 0 }])
|
|
943
949
|
}, [
|
|
944
|
-
a("div",
|
|
945
|
-
c(
|
|
950
|
+
a("div", xr, [
|
|
951
|
+
c(v, {
|
|
946
952
|
name: x.icon,
|
|
947
953
|
color: "primary",
|
|
948
954
|
class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
|
|
949
955
|
}, null, 8, ["name"]),
|
|
950
956
|
a("div", null, [
|
|
951
|
-
a("div",
|
|
952
|
-
|
|
957
|
+
a("div", Cr, [
|
|
958
|
+
de(O(r(n)(x.label)) + " ", 1),
|
|
953
959
|
x.helperText ? (C(), j(b, {
|
|
954
960
|
key: 0,
|
|
955
961
|
content: x.helperText
|
|
956
962
|
}, {
|
|
957
963
|
default: V(() => [
|
|
958
|
-
c(
|
|
964
|
+
c(v, {
|
|
959
965
|
name: "help",
|
|
960
966
|
size: "sm",
|
|
961
967
|
outline: !0
|
|
@@ -964,8 +970,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
964
970
|
_: 2
|
|
965
971
|
}, 1032, ["content"])) : z("", !0)
|
|
966
972
|
]),
|
|
967
|
-
a("div",
|
|
968
|
-
x.action ? (C(), j(
|
|
973
|
+
a("div", Rr, O(x.sublabel), 1),
|
|
974
|
+
x.action ? (C(), j(k, {
|
|
969
975
|
key: 0,
|
|
970
976
|
variant: "plain",
|
|
971
977
|
label: x.action,
|
|
@@ -980,7 +986,7 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
980
986
|
]),
|
|
981
987
|
_: 1
|
|
982
988
|
}),
|
|
983
|
-
r(
|
|
989
|
+
r(d) && r(d).length > 0 ? (C(), j(i, {
|
|
984
990
|
key: 1,
|
|
985
991
|
variant: "outlined",
|
|
986
992
|
class: "flex flex-col gap-16 p-16"
|
|
@@ -988,36 +994,33 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
988
994
|
default: V(() => [
|
|
989
995
|
c(P, { separator: !0 }, {
|
|
990
996
|
default: V(() => [
|
|
991
|
-
(C(!0), B(Y, null, re(r(
|
|
992
|
-
key:
|
|
997
|
+
(C(!0), B(Y, null, re(r(d), (x, _) => (C(), j(Ge, {
|
|
998
|
+
key: _,
|
|
993
999
|
"reward-group": x,
|
|
994
|
-
level:
|
|
995
|
-
onEdit: (E) => D(
|
|
996
|
-
onRemove: (E) =>
|
|
1000
|
+
level: _,
|
|
1001
|
+
onEdit: (E) => D(_),
|
|
1002
|
+
onRemove: (E) => s(_),
|
|
997
1003
|
onAddCount: t[0] || (t[0] = (E) => {
|
|
998
1004
|
L({ groupIndex: E, countIndex: -1 });
|
|
999
1005
|
})
|
|
1000
1006
|
}, {
|
|
1001
1007
|
default: V(() => [
|
|
1002
|
-
a("div",
|
|
1008
|
+
a("div", Sr, [
|
|
1003
1009
|
c(U, {
|
|
1004
|
-
"row-data": x.rewards.map((E) => ({ ...E, groupIndex:
|
|
1010
|
+
"row-data": x.rewards.map((E) => ({ ...E, groupIndex: _ })),
|
|
1005
1011
|
"column-defs": h,
|
|
1006
1012
|
"hide-footer": !0,
|
|
1007
1013
|
"page-size": 50,
|
|
1008
|
-
onRowClick: (E) => L({ groupIndex:
|
|
1014
|
+
onRowClick: (E) => L({ groupIndex: _, countIndex: E.index })
|
|
1009
1015
|
}, null, 8, ["row-data", "onRowClick"])
|
|
1010
1016
|
]),
|
|
1011
|
-
x.rewards.length ? z("", !0) : (C(), B("div",
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
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 ")
|
|
1015
|
-
], -1)),
|
|
1016
|
-
c($, {
|
|
1017
|
+
x.rewards.length ? z("", !0) : (C(), B("div", $r, [
|
|
1018
|
+
Fr,
|
|
1019
|
+
c(k, {
|
|
1017
1020
|
variant: "secondary",
|
|
1018
1021
|
label: "Add count",
|
|
1019
1022
|
icon: "add",
|
|
1020
|
-
onClick: (E) => L({ groupIndex:
|
|
1023
|
+
onClick: (E) => L({ groupIndex: _, countIndex: -1 })
|
|
1021
1024
|
}, null, 8, ["onClick"])
|
|
1022
1025
|
]))
|
|
1023
1026
|
]),
|
|
@@ -1028,23 +1031,20 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
1028
1031
|
})
|
|
1029
1032
|
]),
|
|
1030
1033
|
_: 1
|
|
1031
|
-
})) : (C(), j(
|
|
1034
|
+
})) : (C(), j(i, {
|
|
1032
1035
|
key: 2,
|
|
1033
1036
|
variant: "outlined",
|
|
1034
1037
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1035
1038
|
}, {
|
|
1036
1039
|
default: V(() => [
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
a("div", wr, [
|
|
1042
|
-
a("div", yr, O(r(l)("connect.referral.referral_tier_title")), 1),
|
|
1043
|
-
a("div", br, O(r(l)("connect.referral.referral_tier_description")), 1)
|
|
1040
|
+
kr,
|
|
1041
|
+
a("div", Pr, [
|
|
1042
|
+
a("div", Vr, O(r(n)("connect.referral.referral_tier_title")), 1),
|
|
1043
|
+
a("div", Ir, O(r(n)("connect.referral.referral_tier_description")), 1)
|
|
1044
1044
|
]),
|
|
1045
|
-
c(
|
|
1045
|
+
c(k, {
|
|
1046
1046
|
variant: "primary",
|
|
1047
|
-
label: r(
|
|
1047
|
+
label: r(n)("connect.referral.add_referral_tier"),
|
|
1048
1048
|
icon: "add",
|
|
1049
1049
|
disabled: !r(p).isPremium,
|
|
1050
1050
|
onClick: t[1] || (t[1] = (x) => D(-1))
|
|
@@ -1054,26 +1054,26 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
|
|
|
1054
1054
|
})),
|
|
1055
1055
|
c(ye, {
|
|
1056
1056
|
ref_key: "rewardGroupRef",
|
|
1057
|
-
ref:
|
|
1057
|
+
ref: u
|
|
1058
1058
|
}, null, 512),
|
|
1059
1059
|
c(qe, {
|
|
1060
1060
|
ref_key: "editReferralCountSheetRef",
|
|
1061
1061
|
ref: R,
|
|
1062
1062
|
onUpdate: y
|
|
1063
1063
|
}, null, 512),
|
|
1064
|
-
c(
|
|
1064
|
+
c(hr, {
|
|
1065
1065
|
ref_key: "manageCriteriaSheetRef",
|
|
1066
1066
|
ref: A
|
|
1067
1067
|
}, null, 512),
|
|
1068
|
-
c(
|
|
1068
|
+
c(wr, {
|
|
1069
1069
|
ref_key: "editRefereeRewardSheetRef",
|
|
1070
1070
|
ref: T,
|
|
1071
|
-
onUpdate:
|
|
1071
|
+
onUpdate: f
|
|
1072
1072
|
}, null, 512)
|
|
1073
1073
|
], 64);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
});
|
|
1077
1077
|
export {
|
|
1078
|
-
|
|
1078
|
+
ot as default
|
|
1079
1079
|
};
|