@feedmepos/mf-connect 0.1.47-prod → 0.1.49-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-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
- package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
- package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
- package/dist/Broadcast-CbF3d_N7.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
- package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
- package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
- package/dist/Credit-DiTnwnFe.js +228 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
- package/dist/Experience-CjMVeGsX.js +229 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
- package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
- package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
- package/dist/MemberList-CZtriA_Q.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
- package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
- package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
- package/dist/Point-51MD49EM.js +232 -0
- package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
- package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
- package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
- package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
- package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
- package/dist/Setting-DGDgmP84.js +1936 -0
- package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
- package/dist/StoreRewards-DFF_0g59.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
- package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
- package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
- package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
- package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
- package/dist/app-DaFoFS2V.js +57962 -0
- package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
- package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
- package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
- package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
- package/dist/campaign.fn-B-xvcbEb.js +758 -0
- package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
- package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
- package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
- package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
- package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
- package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
- package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
- package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
- package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
- package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
- package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
- package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
- package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
- package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
- package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
- package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
- package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
- package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
- package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
- package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
- package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
- package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
- package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
- package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
- package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
- package/dist/objectid-BQJRv_jX.js +145 -0
- package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
- package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
- package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
- package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
- package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
- package/dist/timezone-B64-HrWi.js +1150 -0
- package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
- package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
- package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
- package/package.json +5 -4
- package/dist/Broadcast-T2a5tN8R.js +0 -227
- package/dist/Credit-DQQCXqS0.js +0 -222
- package/dist/Experience-DzTV21vX.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/MemberList-DLSLGQ02.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Point-BeBYi1BT.js +0 -226
- package/dist/Setting-Dt0sG_hk.js +0 -1936
- package/dist/StoreRewards-DuSsWnTE.js +0 -423
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
- package/dist/app-jRT7vsk_.js +0 -33357
- package/dist/campaign.fn-C-UojhHv.js +0 -758
- package/dist/objectid-CVDLTdni.js +0 -145
- package/dist/usePagination-JoYaROkV.js +0 -223
|
@@ -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 ve, ref as F, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as de, createTextVNode as ce, createCommentVNode as z, h as te, onMounted as _e } 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-2D47GxQX.js";
|
|
4
|
+
import { u as ue } from "./loading-CZH88Duq.js";
|
|
5
|
+
import { c as we, p as K } from "./plugins-Z2YcDTj8.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 { l as le, c as se } from "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import { a as be, b as xe } from "./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-P_gNd6ZP.js";
|
|
10
|
+
import { u as me } from "./reward-G656rbLJ.js";
|
|
11
|
+
import { l as le, c as se } from "./index-COoQSeE7.js";
|
|
12
|
+
import "./index-zyVYgteg.js";
|
|
13
|
+
import { a as be, b as xe } from "./index-BJl_HxaB.js";
|
|
14
|
+
import "./index-P6ISAxfQ.js";
|
|
15
|
+
import "./index-BBi9jDD1.js";
|
|
16
|
+
import "./index-sFyvCun2.js";
|
|
17
|
+
import { C as fe } from "./membership-GNRX1fEK.js";
|
|
18
|
+
import { t as ee } from "./helper-BzfjLXgi.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-B5co0F__.js";
|
|
22
|
+
import { a as Se, _ as Fe, b as ke } from "./trigger-C_ih51ky.js";
|
|
23
|
+
import { O as $e } from "./objectid-BQJRv_jX.js";
|
|
24
|
+
import { r as pe } from "./index-Dve1-uYX.js";
|
|
25
|
+
import { u as Pe } from "./business-BSP_3iNl.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(k, { emit: l }) {
|
|
40
|
+
const { t: I } = Z(), p = l;
|
|
41
|
+
return (g, f) => {
|
|
42
|
+
const s = w("FmButton"), u = w("FmListItem");
|
|
43
43
|
return C(), B(Y, null, [
|
|
44
|
-
c(
|
|
45
|
-
onClick:
|
|
44
|
+
c(u, {
|
|
45
|
+
onClick: f[4] || (f[4] = (m) => p("edit", k.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(k.rewardGroup.name), 1)
|
|
54
54
|
])
|
|
55
55
|
])
|
|
56
56
|
]),
|
|
57
57
|
a("div", Le, [
|
|
58
|
-
c(
|
|
58
|
+
c(s, {
|
|
59
59
|
variant: "secondary",
|
|
60
60
|
label: r(I)("connect.referral.reward.add_count"),
|
|
61
61
|
icon: "add",
|
|
62
|
-
onClick:
|
|
63
|
-
|
|
62
|
+
onClick: f[0] || (f[0] = (m) => {
|
|
63
|
+
m.stopPropagation(), p("addCount", k.level);
|
|
64
64
|
})
|
|
65
65
|
}, null, 8, ["label"]),
|
|
66
|
-
c(
|
|
66
|
+
c(s, {
|
|
67
67
|
icon: "delete",
|
|
68
|
-
onClick:
|
|
69
|
-
|
|
68
|
+
onClick: f[1] || (f[1] = (m) => {
|
|
69
|
+
m.stopPropagation(), p("remove", k.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(k.rewardGroup.name), 1)
|
|
81
81
|
])
|
|
82
82
|
])
|
|
83
83
|
]),
|
|
84
|
-
c(
|
|
84
|
+
c(s, {
|
|
85
85
|
variant: "tertiary",
|
|
86
86
|
icon: "delete",
|
|
87
|
-
onClick:
|
|
87
|
+
onClick: f[2] || (f[2] = (m) => (m.stopPropagation(), p("remove", k.level)))
|
|
88
88
|
})
|
|
89
89
|
]),
|
|
90
|
-
c(
|
|
90
|
+
c(s, {
|
|
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: f[3] || (f[3] = (m) => (m.stopPropagation(), p("addCount", k.level)))
|
|
97
97
|
})
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
100
100
|
_: 1
|
|
101
101
|
}),
|
|
102
|
-
|
|
102
|
+
ve(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(k, { expose: l, emit: I }) {
|
|
110
|
+
const { t: p } = Z(), g = I, f = F(!1), s = F({}), u = F(-1), m = F(-1), R = Q(), A = be.superRefine((e, t) => {
|
|
111
|
+
var $, U, P, x, v, E, ae;
|
|
112
|
+
const d = m.value == -1 ? ((P = (U = ($ = R.referralProgram) == null ? void 0 : $.reward[u.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : m.value, _ = (v = (x = R.referralProgram) == null ? void 0 : x.reward[u.value]) == null ? void 0 : v.rewards[d - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[u.value]) == null ? void 0 : ae.rewards[d + 1];
|
|
113
|
+
_ && e.threshold.from < _.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 ${_.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(s.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(s.value);
|
|
128
128
|
e.success && g("update", {
|
|
129
|
-
groupIndex:
|
|
130
|
-
countIndex:
|
|
129
|
+
groupIndex: u.value,
|
|
130
|
+
countIndex: m.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 d, _, b, $, U, P;
|
|
136
|
+
if (f.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
|
|
137
|
+
u.value = t.groupIndex, m.value = t.countIndex, s.value = H(
|
|
138
|
+
(d = R.referralProgram) == null ? void 0 : d.reward[t.groupIndex].rewards[t.countIndex]
|
|
139
139
|
);
|
|
140
140
|
else {
|
|
141
|
-
|
|
142
|
-
const x =
|
|
143
|
-
|
|
141
|
+
u.value = t.groupIndex, m.value = -1;
|
|
142
|
+
const x = m.value == -1 ? (($ = (b = (_ = R.referralProgram) == null ? void 0 : _.reward[u.value]) == null ? void 0 : b.rewards) == null ? void 0 : $.length) || 0 : m.value, v = (P = (U = R.referralProgram) == null ? void 0 : U.reward[u.value]) == null ? void 0 : P.rewards[x - 1];
|
|
143
|
+
s.value = {
|
|
144
144
|
threshold: {
|
|
145
|
-
from:
|
|
145
|
+
from: v != null && v.threshold ? v != null && v.threshold.to ? v.threshold.to + 1 : (v == null ? void 0 : v.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 = i.value.map(
|
|
152
|
+
(x) => s.value.rewards.includes(x.id)
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
function L() {
|
|
156
|
-
|
|
156
|
+
f.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
|
+
], n = me(), o = F([]), i = G(() => n.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 = i.value;
|
|
201
201
|
for (let t = 0; t < e.length; t++) {
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
(b) => b !=
|
|
202
|
+
const d = e[t], _ = h.value[t];
|
|
203
|
+
_ && !s.value.rewards.includes(d.id) && s.value.rewards.push(d.id), !_ && s.value.rewards.includes(d.id) && (s.value.rewards = s.value.rewards.filter(
|
|
204
|
+
(b) => b != d.id
|
|
205
205
|
));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
const h =
|
|
209
|
-
return ie(h, S, { deep: !0 }),
|
|
208
|
+
const h = F({});
|
|
209
|
+
return ie(h, S, { deep: !0 }), l({
|
|
210
210
|
showSheet: D,
|
|
211
211
|
hideSheet: L,
|
|
212
|
-
data:
|
|
212
|
+
data: s
|
|
213
213
|
}), (e, t) => {
|
|
214
|
-
const
|
|
214
|
+
const d = w("FmStepperField"), _ = w("FmHelperText"), b = w("FmTable"), $ = 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(f),
|
|
218
|
+
"onUpdate:modelValue": t[4] || (t[4] = (P) => J(f) ? f.value = P : null),
|
|
219
|
+
header: `${r(m) == -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($, {
|
|
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($, {
|
|
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(s) }, 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(d, {
|
|
243
|
+
modelValue: r(s).threshold.from,
|
|
244
|
+
"onUpdate:modelValue": t[0] || (t[0] = (P) => r(s).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(d, {
|
|
261
|
+
modelValue: r(s).threshold.to,
|
|
262
|
+
"onUpdate:modelValue": t[1] || (t[1] = (P) => r(s).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(_, {
|
|
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(i),
|
|
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 =
|
|
303
|
+
}), Ke = { class: "space-y-16" }, Je = { class: "grid grid-cols-3 gap-16" }, We = { class: "fm-typo-en-title-sm-800" }, Ze = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qe = /* @__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(k, { emit: l }) {
|
|
316
|
+
const I = k, p = l, g = G(() => [
|
|
317
317
|
le.enum.BILL_COMPLETED,
|
|
318
318
|
le.enum.FEEDBACK
|
|
319
|
-
].map((
|
|
320
|
-
return (
|
|
321
|
-
const
|
|
319
|
+
].map((f) => Se[f]));
|
|
320
|
+
return (f, s) => {
|
|
321
|
+
const u = 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
|
+
s[0] || (s[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)),
|
|
324
|
+
a("div", Je, [
|
|
325
|
+
(C(!0), B(Y, null, re(r(g), (m) => (C(), j(u, {
|
|
326
|
+
key: m.name,
|
|
327
327
|
variant: "outlined",
|
|
328
328
|
disabled: I.disabled,
|
|
329
|
-
class:
|
|
329
|
+
class: de(["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)]": k.modelValue == m.value,
|
|
332
|
+
"hover:bg-fm-color-opacity-sm": k.modelValue != m.value
|
|
333
333
|
}]),
|
|
334
334
|
onClick: () => {
|
|
335
|
-
I.modelValue !=
|
|
335
|
+
I.modelValue != m.value && !I.disabled && p("update:model-value", m.value);
|
|
336
336
|
}
|
|
337
337
|
}, {
|
|
338
338
|
default: V(() => [
|
|
339
|
-
a("div",
|
|
340
|
-
a("div",
|
|
339
|
+
a("div", We, O(m.name), 1),
|
|
340
|
+
a("div", Ze, O(m.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
|
+
}), Xe = { class: "flex items-center gap-x-8" }, er = { class: "flex flex-col space-y-16 pr-12" }, rr = {
|
|
349
349
|
key: 0,
|
|
350
350
|
class: "space-y-16"
|
|
351
|
-
},
|
|
351
|
+
}, tr = {
|
|
352
352
|
key: 1,
|
|
353
353
|
class: "space-y-16"
|
|
354
|
-
},
|
|
354
|
+
}, or = { class: "flex items-center gap-8" }, ar = /* @__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(k, { expose: l, emit: I }) {
|
|
358
|
+
const { t: p } = Z(), g = I, f = F(!1), s = F(-1), u = F({}), m = Q(), R = xe.superRefine((y, n) => {
|
|
359
|
+
y.name.length >= 50 && n.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 && n.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(u.value);
|
|
368
368
|
return y.success ? [] : y.error.errors;
|
|
369
369
|
});
|
|
370
|
-
function T(y,
|
|
370
|
+
function T(y, n) {
|
|
371
371
|
var o;
|
|
372
|
-
|
|
373
|
-
(o =
|
|
374
|
-
)) : (
|
|
375
|
-
_id: new
|
|
372
|
+
f.value = y, y && typeof n == "number" && n >= 0 ? (s.value = n, u.value = H(
|
|
373
|
+
(o = m.referralProgram) == null ? void 0 : o.criteria[n]
|
|
374
|
+
)) : (s.value = -1, u.value = {
|
|
375
|
+
_id: new $e().toString(),
|
|
376
376
|
name: "",
|
|
377
377
|
type: "AUTO",
|
|
378
378
|
event: { type: "BILL_COMPLETED" }
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
function M() {
|
|
382
|
-
|
|
382
|
+
f.value = !1;
|
|
383
383
|
}
|
|
384
384
|
function D() {
|
|
385
|
-
const y = R.safeParse(
|
|
386
|
-
y.success && g("update",
|
|
385
|
+
const y = R.safeParse(u.value);
|
|
386
|
+
y.success && g("update", s.value, y.data);
|
|
387
387
|
}
|
|
388
388
|
function L(y) {
|
|
389
|
-
|
|
389
|
+
u.value.type = y, y == "AUTO" ? u.value.event = { type: "BILL_COMPLETED" } : u.value.event = void 0;
|
|
390
390
|
}
|
|
391
|
-
return
|
|
391
|
+
return l({
|
|
392
392
|
showSheet: T,
|
|
393
393
|
hideSheet: M,
|
|
394
|
-
data:
|
|
395
|
-
}), (y,
|
|
396
|
-
const o = w("FmButton"),
|
|
394
|
+
data: u
|
|
395
|
+
}), (y, n) => {
|
|
396
|
+
const o = w("FmButton"), i = 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(f),
|
|
400
|
+
"onUpdate:modelValue": n[6] || (n[6] = (e) => J(f) ? f.value = e : null)
|
|
401
401
|
}, {
|
|
402
402
|
"side-sheet-header": V(() => [
|
|
403
|
-
a("div",
|
|
403
|
+
a("div", Xe, [
|
|
404
404
|
c(o, {
|
|
405
405
|
icon: "arrow_back",
|
|
406
406
|
variant: "tertiary",
|
|
407
|
-
onClick:
|
|
407
|
+
onClick: n[0] || (n[0] = (e) => T(!1))
|
|
408
408
|
}),
|
|
409
|
-
|
|
409
|
+
n[7] || (n[7] = ce("Add Criteria ", -1))
|
|
410
410
|
])
|
|
411
411
|
]),
|
|
412
412
|
"side-sheet-footer": V(() => [
|
|
413
|
-
a("div",
|
|
413
|
+
a("div", or, [
|
|
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: n[5] || (n[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(u) }, null, 8, ["json"]),
|
|
429
|
+
a("div", er, [
|
|
430
|
+
n[12] || (n[12] = a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1)),
|
|
431
431
|
c(Re, {
|
|
432
|
-
modelValue: r(
|
|
433
|
-
"onUpdate:modelValue":
|
|
432
|
+
modelValue: r(u).name,
|
|
433
|
+
"onUpdate:modelValue": n[1] || (n[1] = (e) => r(u).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
|
+
n[13] || (n[13] = a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1)),
|
|
438
438
|
c(S, {
|
|
439
|
-
"model-value": r(
|
|
439
|
+
"model-value": r(u).type,
|
|
440
440
|
label: "Verify status",
|
|
441
441
|
"onUpdate:modelValue": L
|
|
442
442
|
}, {
|
|
443
443
|
default: V(() => [
|
|
444
|
-
c(
|
|
444
|
+
c(i, {
|
|
445
445
|
value: "AUTO",
|
|
446
446
|
label: "Auto",
|
|
447
447
|
sublabel: "Verify based on rule configuration"
|
|
448
448
|
}),
|
|
449
|
-
c(
|
|
449
|
+
c(i, {
|
|
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(u).type == "AUTO" ? (C(), B(Y, { key: 0 }, [
|
|
458
|
+
n[10] || (n[10] = a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1)),
|
|
459
|
+
n[11] || (n[11] = a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1)),
|
|
460
|
+
c(Qe, {
|
|
461
|
+
"model-value": r(u).event.type,
|
|
462
|
+
"onUpdate:modelValue": n[2] || (n[2] = (e) => r(u).event.type = e)
|
|
463
463
|
}, null, 8, ["model-value"]),
|
|
464
|
-
r(
|
|
465
|
-
|
|
466
|
-
c(
|
|
467
|
-
"model-value": r(
|
|
468
|
-
"onUpdate:modelValue":
|
|
464
|
+
r(u).event.type == r(se).enum.BILL_COMPLETED ? (C(), B("div", rr, [
|
|
465
|
+
n[8] || (n[8] = a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1)),
|
|
466
|
+
c(Fe, {
|
|
467
|
+
"model-value": r(u).event.rule,
|
|
468
|
+
"onUpdate:modelValue": n[3] || (n[3] = (e) => r(u).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(u).event.type == r(se).enum.FEEDBACK ? (C(), B("div", tr, [
|
|
472
|
+
n[9] || (n[9] = a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1)),
|
|
473
|
+
c(ke, {
|
|
474
|
+
"model-value": r(u).event.rule,
|
|
475
|
+
"onUpdate:modelValue": n[4] || (n[4] = (e) => r(u).event.rule = e)
|
|
476
476
|
}, null, 8, ["model-value"])
|
|
477
477
|
])) : z("", !0)
|
|
478
478
|
], 64)) : z("", !0)
|
|
@@ -484,49 +484,46 @@ 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 k = F(!1), l = Ce();
|
|
488
488
|
return {
|
|
489
489
|
confirmUpdateReferralRecord: async () => {
|
|
490
490
|
await new Promise((p) => {
|
|
491
|
-
|
|
491
|
+
l.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
|
+
k.value = !0, p();
|
|
498
498
|
}).onSecondary(async () => {
|
|
499
|
-
|
|
499
|
+
k.value = !1, p();
|
|
500
500
|
});
|
|
501
501
|
});
|
|
502
502
|
},
|
|
503
|
-
updateReferralRecord:
|
|
503
|
+
updateReferralRecord: k
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
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({
|
|
506
|
+
const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex justify-between items-center" }, sr = /* @__PURE__ */ q({
|
|
510
507
|
__name: "ManageCriteriaSheet",
|
|
511
|
-
setup(
|
|
512
|
-
const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord:
|
|
508
|
+
setup(k, { expose: l }) {
|
|
509
|
+
const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: f } = he(), s = F(!1), u = F({}), m = Q(), R = F(
|
|
513
510
|
null
|
|
514
511
|
), A = G(() => {
|
|
515
512
|
var o;
|
|
516
|
-
return (o =
|
|
513
|
+
return (o = m.referralProgram) == null ? void 0 : o.criteria;
|
|
517
514
|
});
|
|
518
515
|
async function T(o) {
|
|
519
516
|
await g(), await p(async () => {
|
|
520
517
|
await pe.update({
|
|
521
518
|
...o,
|
|
522
|
-
updateReferralRecord:
|
|
523
|
-
}), await
|
|
519
|
+
updateReferralRecord: f.value
|
|
520
|
+
}), await m.readReferralProgram();
|
|
524
521
|
});
|
|
525
522
|
}
|
|
526
|
-
async function M(o,
|
|
523
|
+
async function M(o, i) {
|
|
527
524
|
var e, t;
|
|
528
|
-
const S = o == -1 ? ((e =
|
|
529
|
-
h.criteria[S] =
|
|
525
|
+
const S = o == -1 ? ((e = m.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(m.referralProgram);
|
|
526
|
+
h.criteria[S] = i, await T(h), (t = R.value) == null || t.showSheet(!1);
|
|
530
527
|
}
|
|
531
528
|
async function D(o) {
|
|
532
529
|
var h, e;
|
|
@@ -537,8 +534,8 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
537
534
|
I("connect.prompt.cancel")
|
|
538
535
|
))
|
|
539
536
|
return;
|
|
540
|
-
const
|
|
541
|
-
S.criteria.splice(
|
|
537
|
+
const i = o == -1 ? ((h = m.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(m.referralProgram);
|
|
538
|
+
S.criteria.splice(i, 1), await T(S), (e = R.value) == null || e.showSheet(!1);
|
|
542
539
|
}
|
|
543
540
|
const L = [
|
|
544
541
|
{
|
|
@@ -562,8 +559,8 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
562
559
|
variant: "tertiary",
|
|
563
560
|
icon: "delete",
|
|
564
561
|
iconColor: "neutral-gray-400",
|
|
565
|
-
onClick: (
|
|
566
|
-
|
|
562
|
+
onClick: (i) => {
|
|
563
|
+
i.stopPropagation(), D(o.row.index);
|
|
567
564
|
}
|
|
568
565
|
})
|
|
569
566
|
];
|
|
@@ -571,35 +568,38 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
571
568
|
}
|
|
572
569
|
];
|
|
573
570
|
function y(o) {
|
|
574
|
-
|
|
571
|
+
s.value = o;
|
|
575
572
|
}
|
|
576
|
-
function
|
|
577
|
-
|
|
573
|
+
function n() {
|
|
574
|
+
s.value = !1;
|
|
578
575
|
}
|
|
579
|
-
return
|
|
576
|
+
return l({
|
|
580
577
|
showSheet: y,
|
|
581
|
-
hideSheet:
|
|
582
|
-
data:
|
|
583
|
-
}), (o,
|
|
578
|
+
hideSheet: n,
|
|
579
|
+
data: u
|
|
580
|
+
}), (o, i) => {
|
|
584
581
|
const S = w("FmButton"), h = w("FmTable"), e = w("FmSideSheet");
|
|
585
582
|
return C(), B(Y, null, [
|
|
586
583
|
c(e, {
|
|
587
584
|
"max-width": 768,
|
|
588
|
-
modelValue: r(
|
|
589
|
-
"onUpdate:modelValue":
|
|
585
|
+
modelValue: r(s),
|
|
586
|
+
"onUpdate:modelValue": i[2] || (i[2] = (t) => J(s) ? s.value = t : null),
|
|
590
587
|
header: "Manage Criteria"
|
|
591
588
|
}, {
|
|
592
589
|
default: V(() => [
|
|
593
|
-
a("div",
|
|
594
|
-
a("div",
|
|
595
|
-
|
|
590
|
+
a("div", nr, [
|
|
591
|
+
a("div", lr, [
|
|
592
|
+
i[3] || (i[3] = a("div", null, [
|
|
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)),
|
|
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: i[0] || (i[0] = (t) => {
|
|
601
|
+
var d;
|
|
602
|
+
return (d = r(R)) == null ? void 0 : d.showSheet(!0);
|
|
603
603
|
})
|
|
604
604
|
})
|
|
605
605
|
]),
|
|
@@ -609,16 +609,16 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { 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: i[1] || (i[1] = (t) => {
|
|
613
|
+
var d;
|
|
614
|
+
return (d = r(R)) == null ? void 0 : d.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(ar, {
|
|
622
622
|
ref_key: "editCriteriaSheetRef",
|
|
623
623
|
ref: R,
|
|
624
624
|
onUpdate: M
|
|
@@ -626,20 +626,20 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
626
626
|
], 64);
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
629
|
+
}), ir = { class: "flex flex-col space-y-16 pr-12" }, dr = { class: "fm-typo-en-title-sm-800" }, cr = { class: "flex items-center gap-8" }, ur = /* @__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(k, { expose: l, emit: I }) {
|
|
633
|
+
const { t: p } = Z(), g = I, f = F(!1), s = F([]), u = Q();
|
|
634
|
+
function m() {
|
|
635
|
+
g("update", s.value);
|
|
636
636
|
}
|
|
637
637
|
async function R(o) {
|
|
638
|
-
var
|
|
639
|
-
|
|
638
|
+
var i, S;
|
|
639
|
+
f.value = o, s.value = ((S = (i = u.referralProgram) == null ? void 0 : i.refereeReward) == null ? void 0 : S.map((h) => h.toString())) || [], n.value = L.value.map((h) => s.value.includes(h.id));
|
|
640
640
|
}
|
|
641
641
|
function A() {
|
|
642
|
-
|
|
642
|
+
f.value = !1;
|
|
643
643
|
}
|
|
644
644
|
const T = [
|
|
645
645
|
{
|
|
@@ -658,19 +658,19 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { 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 i = o.row.original;
|
|
662
|
+
if (i.collectible.type == "VOUCHER" || i.selectedReward == null)
|
|
663
|
+
return i.description;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
], M = me(), D =
|
|
667
|
-
let
|
|
666
|
+
], M = me(), D = F([]), L = G(() => M.rewards.map((o) => {
|
|
667
|
+
let i = "No expiry";
|
|
668
668
|
switch (o.option.type) {
|
|
669
669
|
case "VOUCHER":
|
|
670
|
-
|
|
670
|
+
i = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
|
|
671
671
|
break;
|
|
672
672
|
case "LOYALTY":
|
|
673
|
-
|
|
673
|
+
i = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
|
|
674
674
|
break;
|
|
675
675
|
}
|
|
676
676
|
return {
|
|
@@ -678,52 +678,52 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
678
678
|
name: o.name,
|
|
679
679
|
collectible: o.option,
|
|
680
680
|
collectibleConfig: o.collectibleConfig,
|
|
681
|
-
description:
|
|
681
|
+
description: i
|
|
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 i = 0; i < o.length; i++) {
|
|
688
|
+
const S = o[i], h = n.value[i];
|
|
689
|
+
h && !s.value.includes(S.id) && s.value.push(S.id), !h && s.value.includes(S.id) && (s.value = s.value.filter((e) => e != S.id));
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
return ie(
|
|
692
|
+
const n = F({});
|
|
693
|
+
return ie(n, y, { deep: !0 }), l({
|
|
694
694
|
showSheet: R,
|
|
695
695
|
hideSheet: A,
|
|
696
|
-
data:
|
|
697
|
-
}), (o,
|
|
696
|
+
data: s
|
|
697
|
+
}), (o, i) => {
|
|
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(f),
|
|
702
|
+
"onUpdate:modelValue": i[2] || (i[2] = (t) => J(f) ? f.value = t : null),
|
|
703
703
|
header: "Referee reward"
|
|
704
704
|
}, {
|
|
705
705
|
"side-sheet-footer": V(() => [
|
|
706
|
-
a("div",
|
|
706
|
+
a("div", cr, [
|
|
707
707
|
c(h, {
|
|
708
708
|
label: r(p)("connect.common.save"),
|
|
709
|
-
onClick:
|
|
709
|
+
onClick: m,
|
|
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: i[1] || (i[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(s) }, null, 8, ["json"]),
|
|
722
|
+
a("div", ir, [
|
|
723
|
+
a("div", dr, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
|
|
724
724
|
c(S, {
|
|
725
|
-
modelValue: r(
|
|
726
|
-
"onUpdate:modelValue":
|
|
725
|
+
modelValue: r(n),
|
|
726
|
+
"onUpdate:modelValue": i[0] || (i[0] = (t) => J(n) ? n.value = t : null),
|
|
727
727
|
selection: "multiple",
|
|
728
728
|
"column-filter": r(D),
|
|
729
729
|
"column-defs": T,
|
|
@@ -736,48 +736,42 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
736
736
|
}, 8, ["modelValue"]);
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
}),
|
|
739
|
+
}), mr = { class: "fm-typo-en-title-sm-600" }, fr = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, pr = { class: "flex gap-x-8" }, hr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _r = { class: "mb-40" }, gr = {
|
|
740
740
|
key: 0,
|
|
741
741
|
class: "flex flex-col items-center justify-center gap-y-16 p-24"
|
|
742
|
-
},
|
|
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({
|
|
742
|
+
}, wr = { class: "flex flex-col gap-16 text-center" }, yr = { class: "fm-typo-en-title-sm-800" }, br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qr = /* @__PURE__ */ q({
|
|
749
743
|
__name: "Overview",
|
|
750
|
-
setup(
|
|
751
|
-
const { t:
|
|
744
|
+
setup(k) {
|
|
745
|
+
const { t: l } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: s } = he(), u = G(() => {
|
|
752
746
|
var e;
|
|
753
747
|
return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
|
|
754
|
-
}),
|
|
755
|
-
|
|
756
|
-
const R =
|
|
757
|
-
var e, t,
|
|
748
|
+
}), m = F(null);
|
|
749
|
+
F(null);
|
|
750
|
+
const R = F(null), A = F(null), T = F(null), M = G(() => {
|
|
751
|
+
var e, t, d, _;
|
|
758
752
|
return [
|
|
759
753
|
{
|
|
760
754
|
label: "connect.referral.how_it_works.generate_link",
|
|
761
|
-
sublabel:
|
|
755
|
+
sublabel: l("connect.referral.how_it_works.generate_link_for_member"),
|
|
762
756
|
icon: "offline_share"
|
|
763
757
|
},
|
|
764
758
|
{
|
|
765
759
|
label: "connect.referral.how_it_works.referee_join_reward",
|
|
766
|
-
sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${
|
|
767
|
-
action:
|
|
760
|
+
sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${l("connect.referral.how_it_works.reward")}`,
|
|
761
|
+
action: l("connect.referral.actions.manage_reward"),
|
|
768
762
|
onClick: () => {
|
|
769
763
|
var b;
|
|
770
764
|
return (b = T.value) == null ? void 0 : b.showSheet(!0);
|
|
771
765
|
},
|
|
772
|
-
helperText:
|
|
766
|
+
helperText: l(
|
|
773
767
|
"connect.referral.how_it_works.referee_join_reward_description"
|
|
774
768
|
),
|
|
775
769
|
icon: "group_add"
|
|
776
770
|
},
|
|
777
771
|
{
|
|
778
772
|
label: "connect.referral.how_it_works.referee_meet_criteria",
|
|
779
|
-
sublabel: `${(
|
|
780
|
-
action:
|
|
773
|
+
sublabel: `${(d = g.referralProgram) == null ? void 0 : d.criteria.length} ${l("connect.referral.how_it_works.criteria")}`,
|
|
774
|
+
action: l("connect.referral.actions.manage_criteria"),
|
|
781
775
|
onClick: () => {
|
|
782
776
|
var b;
|
|
783
777
|
return (b = A.value) == null ? void 0 : b.showSheet(!0);
|
|
@@ -786,15 +780,15 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
786
780
|
},
|
|
787
781
|
{
|
|
788
782
|
label: "connect.referral.how_it_works.referer_get_reward",
|
|
789
|
-
sublabel: `${(
|
|
790
|
-
helperText:
|
|
783
|
+
sublabel: `${(_ = g.referralProgram) == null ? void 0 : _.reward.length} ${l("connect.referral.how_it_works.reward_tier")}`,
|
|
784
|
+
helperText: l("connect.referral.how_it_works.referral_tier_description"),
|
|
791
785
|
icon: "featured_seasonal_and_gifts"
|
|
792
786
|
}
|
|
793
787
|
];
|
|
794
788
|
});
|
|
795
789
|
function D(e) {
|
|
796
790
|
var t;
|
|
797
|
-
(t =
|
|
791
|
+
(t = m.value) == null || t.onManageRewardGroup(e);
|
|
798
792
|
}
|
|
799
793
|
function L(e) {
|
|
800
794
|
var t;
|
|
@@ -804,57 +798,57 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
804
798
|
});
|
|
805
799
|
}
|
|
806
800
|
async function y(e) {
|
|
807
|
-
var P, x,
|
|
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,
|
|
801
|
+
var P, x, v, E;
|
|
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, d = e.referralCount, _ = H(
|
|
809
803
|
g.referralProgram
|
|
810
|
-
), b =
|
|
804
|
+
), b = _.reward[e.groupIndex];
|
|
811
805
|
b.rewards[t] = e.referralCount;
|
|
812
|
-
const
|
|
813
|
-
if (
|
|
806
|
+
const $ = b.rewards[t - 1], U = b.rewards[t + 1];
|
|
807
|
+
if ($ && $.threshold.to != d.threshold.from - 1) {
|
|
814
808
|
if (!await K.confirm(
|
|
815
|
-
|
|
809
|
+
l(
|
|
816
810
|
"connect.referral.referral_count.update.range_discontinuous.previous",
|
|
817
811
|
{
|
|
818
|
-
name:
|
|
819
|
-
from:
|
|
820
|
-
to:
|
|
821
|
-
newTo:
|
|
812
|
+
name: $.threshold.from,
|
|
813
|
+
from: $.threshold.from ?? 0,
|
|
814
|
+
to: $.threshold.to ?? 1 / 0,
|
|
815
|
+
newTo: d.threshold.from - 1
|
|
822
816
|
}
|
|
823
817
|
),
|
|
824
|
-
|
|
825
|
-
|
|
818
|
+
l("connect.referral.referral_count.title"),
|
|
819
|
+
l("connect.referral.referral_count.remove.next_range")
|
|
826
820
|
))
|
|
827
821
|
return;
|
|
828
|
-
|
|
822
|
+
$.threshold.to = d.threshold.from - 1;
|
|
829
823
|
}
|
|
830
|
-
if (U && U.threshold.from - 1 !=
|
|
824
|
+
if (U && U.threshold.from - 1 != d.threshold.to) {
|
|
831
825
|
if (!await K.confirm(
|
|
832
|
-
|
|
826
|
+
l("connect.program.tier.update.range_discontinuous.next", {
|
|
833
827
|
name: U.threshold.from,
|
|
834
828
|
from: U.threshold.from ?? 0,
|
|
835
829
|
to: U.threshold.to ?? 1 / 0,
|
|
836
|
-
newFrom:
|
|
830
|
+
newFrom: d.threshold.to ?? 1
|
|
837
831
|
}),
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
832
|
+
l("connect.program.tier.title"),
|
|
833
|
+
l("connect.program.tier.remove.next_range"),
|
|
834
|
+
l("connect.prompt.cancel")
|
|
841
835
|
))
|
|
842
836
|
return;
|
|
843
|
-
U.threshold.from = (
|
|
837
|
+
U.threshold.from = (d.threshold.to ?? 0) + 1;
|
|
844
838
|
}
|
|
845
|
-
!U && !((
|
|
839
|
+
!U && !((v = d.threshold) != null && v.to) && (d.threshold.to = void 0), await o(_), (E = R.value) == null || E.hideSheet();
|
|
846
840
|
}
|
|
847
|
-
async function
|
|
848
|
-
var
|
|
841
|
+
async function n(e) {
|
|
842
|
+
var d;
|
|
849
843
|
const t = H(g.referralProgram);
|
|
850
|
-
t.refereeReward = e, await o(t), (
|
|
844
|
+
t.refereeReward = e, await o(t), (d = T.value) == null || d.hideSheet();
|
|
851
845
|
}
|
|
852
846
|
async function o(e) {
|
|
853
|
-
await
|
|
847
|
+
await f(), await I(
|
|
854
848
|
async () => {
|
|
855
849
|
await pe.update({
|
|
856
850
|
...e,
|
|
857
|
-
updateReferralRecord:
|
|
851
|
+
updateReferralRecord: s.value
|
|
858
852
|
}), await g.readReferralProgram();
|
|
859
853
|
},
|
|
860
854
|
{
|
|
@@ -863,12 +857,12 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
863
857
|
}
|
|
864
858
|
);
|
|
865
859
|
}
|
|
866
|
-
async function
|
|
860
|
+
async function i(e) {
|
|
867
861
|
if (!await K.remove(
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
862
|
+
l("connect.referral.reward.confirm_remove_referral_tier"),
|
|
863
|
+
l("connect.referral.reward.remove_referral_tier"),
|
|
864
|
+
l("connect.prompt.confirm"),
|
|
865
|
+
l("connect.prompt.cancel")
|
|
872
866
|
))
|
|
873
867
|
return;
|
|
874
868
|
const t = H(g.referralProgram);
|
|
@@ -876,36 +870,36 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
876
870
|
}
|
|
877
871
|
async function S(e, t) {
|
|
878
872
|
if (!await K.remove(
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
873
|
+
l("connect.referral.reward.confirm_remove_referral_count"),
|
|
874
|
+
l("connect.referral.reward.remove_referral_count"),
|
|
875
|
+
l("connect.prompt.confirm"),
|
|
876
|
+
l("connect.prompt.cancel")
|
|
883
877
|
))
|
|
884
878
|
return;
|
|
885
|
-
const
|
|
886
|
-
if (
|
|
879
|
+
const d = H(g.referralProgram), _ = d.reward[e].rewards[t + 1];
|
|
880
|
+
if (_) {
|
|
887
881
|
if (!await K.confirm(
|
|
888
|
-
|
|
889
|
-
from:
|
|
890
|
-
to:
|
|
891
|
-
newFrom:
|
|
882
|
+
l("connect.referral.referral_count.update.range_discontinuous.next", {
|
|
883
|
+
from: _.threshold.from ?? 0,
|
|
884
|
+
to: _.threshold.to ?? 1 / 0,
|
|
885
|
+
newFrom: d.reward[e].rewards[t].threshold.from
|
|
892
886
|
}),
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
887
|
+
l("connect.referral.referral_count.remove.title"),
|
|
888
|
+
l("connect.referral.referral_count.remove.next_range"),
|
|
889
|
+
l("connect.prompt.cancel")
|
|
896
890
|
))
|
|
897
891
|
return;
|
|
898
|
-
|
|
892
|
+
_.threshold.from = d.reward[e].rewards[t].threshold.from;
|
|
899
893
|
}
|
|
900
|
-
|
|
894
|
+
d.reward[e].rewards.splice(t, 1), await o(d);
|
|
901
895
|
}
|
|
902
896
|
const h = [
|
|
903
897
|
{
|
|
904
|
-
header:
|
|
898
|
+
header: l("connect.referral.reward.table.count"),
|
|
905
899
|
accessorFn: (e) => e.threshold.from == e.threshold.to ? `${e.threshold.from}` : e.threshold.to ? `${e.threshold.from} - ${e.threshold.to ?? "∞"}` : `${e.threshold.from}+`
|
|
906
900
|
},
|
|
907
901
|
{
|
|
908
|
-
header:
|
|
902
|
+
header: l("connect.referral.reward.table.reward"),
|
|
909
903
|
accessorKey: "type",
|
|
910
904
|
accessorFn: (e) => {
|
|
911
905
|
var t;
|
|
@@ -930,48 +924,48 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
930
924
|
}
|
|
931
925
|
}
|
|
932
926
|
];
|
|
933
|
-
return
|
|
927
|
+
return _e(async () => {
|
|
934
928
|
await g.readReferralProgram();
|
|
935
929
|
}), (e, t) => {
|
|
936
|
-
const
|
|
930
|
+
const d = w("FmCard"), _ = w("FmIcon"), b = w("FmTooltip"), $ = w("FmButton"), U = w("FmTable"), P = w("FmList");
|
|
937
931
|
return C(), B(Y, null, [
|
|
938
932
|
z("", !0),
|
|
939
|
-
c(
|
|
933
|
+
c(d, {
|
|
940
934
|
variant: "outlined",
|
|
941
935
|
class: "flex flex-col gap-16 p-16"
|
|
942
936
|
}, {
|
|
943
937
|
default: V(() => [
|
|
944
|
-
a("div",
|
|
945
|
-
a("div",
|
|
946
|
-
(C(!0), B(Y, null, re(r(M), (x,
|
|
947
|
-
key:
|
|
948
|
-
class:
|
|
938
|
+
a("div", mr, O(r(l)("connect.referral.how_it_works.title")), 1),
|
|
939
|
+
a("div", fr, [
|
|
940
|
+
(C(!0), B(Y, null, re(r(M), (x, v) => (C(), B("div", {
|
|
941
|
+
key: v,
|
|
942
|
+
class: de(["px-8", { "xs:!border-r": v % 2 == 0 }])
|
|
949
943
|
}, [
|
|
950
|
-
a("div",
|
|
951
|
-
c(
|
|
944
|
+
a("div", pr, [
|
|
945
|
+
c(_, {
|
|
952
946
|
name: x.icon,
|
|
953
947
|
color: "primary",
|
|
954
948
|
class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
|
|
955
949
|
}, null, 8, ["name"]),
|
|
956
950
|
a("div", null, [
|
|
957
|
-
a("div",
|
|
958
|
-
|
|
951
|
+
a("div", hr, [
|
|
952
|
+
ce(O(r(l)(x.label)) + " ", 1),
|
|
959
953
|
x.helperText ? (C(), j(b, {
|
|
960
954
|
key: 0,
|
|
961
955
|
content: x.helperText
|
|
962
956
|
}, {
|
|
963
957
|
default: V(() => [
|
|
964
|
-
c(
|
|
958
|
+
c(_, {
|
|
965
959
|
name: "help",
|
|
966
960
|
size: "sm",
|
|
967
961
|
outline: !0
|
|
968
962
|
})
|
|
969
963
|
]),
|
|
970
|
-
_:
|
|
971
|
-
},
|
|
964
|
+
_: 1
|
|
965
|
+
}, 8, ["content"])) : z("", !0)
|
|
972
966
|
]),
|
|
973
|
-
a("div",
|
|
974
|
-
x.action ? (C(), j(
|
|
967
|
+
a("div", vr, O(x.sublabel), 1),
|
|
968
|
+
x.action ? (C(), j($, {
|
|
975
969
|
key: 0,
|
|
976
970
|
variant: "plain",
|
|
977
971
|
label: x.action,
|
|
@@ -986,7 +980,7 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
986
980
|
]),
|
|
987
981
|
_: 1
|
|
988
982
|
}),
|
|
989
|
-
r(
|
|
983
|
+
r(u) && r(u).length > 0 ? (C(), j(d, {
|
|
990
984
|
key: 1,
|
|
991
985
|
variant: "outlined",
|
|
992
986
|
class: "flex flex-col gap-16 p-16"
|
|
@@ -994,33 +988,36 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
994
988
|
default: V(() => [
|
|
995
989
|
c(P, { separator: !0 }, {
|
|
996
990
|
default: V(() => [
|
|
997
|
-
(C(!0), B(Y, null, re(r(
|
|
998
|
-
key:
|
|
991
|
+
(C(!0), B(Y, null, re(r(u), (x, v) => (C(), j(Ge, {
|
|
992
|
+
key: v,
|
|
999
993
|
"reward-group": x,
|
|
1000
|
-
level:
|
|
1001
|
-
onEdit: (E) => D(
|
|
1002
|
-
onRemove: (E) =>
|
|
994
|
+
level: v,
|
|
995
|
+
onEdit: (E) => D(v),
|
|
996
|
+
onRemove: (E) => i(v),
|
|
1003
997
|
onAddCount: t[0] || (t[0] = (E) => {
|
|
1004
998
|
L({ groupIndex: E, countIndex: -1 });
|
|
1005
999
|
})
|
|
1006
1000
|
}, {
|
|
1007
1001
|
default: V(() => [
|
|
1008
|
-
a("div",
|
|
1002
|
+
a("div", _r, [
|
|
1009
1003
|
c(U, {
|
|
1010
|
-
"row-data": x.rewards.map((E) => ({ ...E, groupIndex:
|
|
1004
|
+
"row-data": x.rewards.map((E) => ({ ...E, groupIndex: v })),
|
|
1011
1005
|
"column-defs": h,
|
|
1012
1006
|
"hide-footer": !0,
|
|
1013
1007
|
"page-size": 50,
|
|
1014
|
-
onRowClick: (E) => L({ groupIndex:
|
|
1008
|
+
onRowClick: (E) => L({ groupIndex: v, countIndex: E.index })
|
|
1015
1009
|
}, null, 8, ["row-data", "onRowClick"])
|
|
1016
1010
|
]),
|
|
1017
|
-
x.rewards.length ? z("", !0) : (C(), B("div",
|
|
1018
|
-
|
|
1019
|
-
|
|
1011
|
+
x.rewards.length ? z("", !0) : (C(), B("div", gr, [
|
|
1012
|
+
t[3] || (t[3] = a("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
1013
|
+
a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
|
|
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($, {
|
|
1020
1017
|
variant: "secondary",
|
|
1021
1018
|
label: "Add count",
|
|
1022
1019
|
icon: "add",
|
|
1023
|
-
onClick: (E) => L({ groupIndex:
|
|
1020
|
+
onClick: (E) => L({ groupIndex: v, countIndex: -1 })
|
|
1024
1021
|
}, null, 8, ["onClick"])
|
|
1025
1022
|
]))
|
|
1026
1023
|
]),
|
|
@@ -1031,20 +1028,23 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
1031
1028
|
})
|
|
1032
1029
|
]),
|
|
1033
1030
|
_: 1
|
|
1034
|
-
})) : (C(), j(
|
|
1031
|
+
})) : (C(), j(d, {
|
|
1035
1032
|
key: 2,
|
|
1036
1033
|
variant: "outlined",
|
|
1037
1034
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1038
1035
|
}, {
|
|
1039
1036
|
default: V(() => [
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1037
|
+
t[4] || (t[4] = a("img", {
|
|
1038
|
+
src: ge,
|
|
1039
|
+
class: "aspect-square w-[150px]"
|
|
1040
|
+
}, null, -1)),
|
|
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)
|
|
1044
1044
|
]),
|
|
1045
|
-
c(
|
|
1045
|
+
c($, {
|
|
1046
1046
|
variant: "primary",
|
|
1047
|
-
label: r(
|
|
1047
|
+
label: r(l)("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 mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
|
|
|
1054
1054
|
})),
|
|
1055
1055
|
c(ye, {
|
|
1056
1056
|
ref_key: "rewardGroupRef",
|
|
1057
|
-
ref:
|
|
1057
|
+
ref: m
|
|
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(sr, {
|
|
1065
1065
|
ref_key: "manageCriteriaSheetRef",
|
|
1066
1066
|
ref: A
|
|
1067
1067
|
}, null, 512),
|
|
1068
|
-
c(
|
|
1068
|
+
c(ur, {
|
|
1069
1069
|
ref_key: "editRefereeRewardSheetRef",
|
|
1070
1070
|
ref: T,
|
|
1071
|
-
onUpdate:
|
|
1071
|
+
onUpdate: n
|
|
1072
1072
|
}, null, 512)
|
|
1073
1073
|
], 64);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
});
|
|
1077
1077
|
export {
|
|
1078
|
-
|
|
1078
|
+
qr as default
|
|
1079
1079
|
};
|