@feedmepos/mf-connect 0.1.38-beta.1 → 0.1.38-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-Dc1l0CZK.js +427 -0
- package/dist/{App-BWZ2EE71.js → App-BLg0CWv-.js} +352 -364
- package/dist/{Bin-C-Ha-4yF.js → Bin-DDbKIePj.js} +8 -8
- package/dist/{Broadcast-Bo3QS8lS.js → Broadcast-CihKie6G.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-4vUMzH-l.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DbdBGvgR.js} +18 -18
- package/dist/{Card-Bs1TDE0e.js → Card-h1dYFE_s.js} +159 -159
- package/dist/{Collections-Dy5RN7Js.js → Collections-DUXdnJqQ.js} +91 -103
- package/dist/{Credit-Bqc4dw1s.js → Credit-CsGEuX9p.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-0gMUNtdO.js} +488 -488
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BzwADnKp.js → EffectSheet.vue_vue_type_style_index_0_lang-CQDnl97F.js} +94 -94
- package/dist/{Experience-C2e2T7B-.js → Experience-CBbqYrql.js} +41 -41
- package/dist/{Game-C86eEhcx.js → Game-CicPpdT5.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{Index-BRGweFco.js → Index-Xgvlt4vk.js} +10 -10
- package/dist/Marketing-CqOAQgg4.js +319 -0
- package/dist/{Member-B3o0Zhcw.js → Member-D1k4ZQ95.js} +76 -76
- package/dist/MemberList-BdV9sxO_.js +1606 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-C4hao-d9.js → MemberTransactions-Q0_4nT4e.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D9zfmqLs.js → MessageInput.vue_vue_type_script_setup_true_lang-COGCJGRc.js} +36 -36
- package/dist/{Mission-BURXfzjd.js → Mission-D-TW52zn.js} +21 -21
- package/dist/{Overview-D_hrrM4O.js → Overview-BleJmxHa.js} +335 -335
- package/dist/{Point-CJXkJY5Q.js → Point-B7BYX9us.js} +41 -41
- package/dist/{Promotion-CunJrh42.js → Promotion-BphlQC55.js} +42 -42
- package/dist/{Queue-v5Itg9J4.js → Queue-DJfZqO1f.js} +51 -51
- package/dist/{Record-DJe4tg9R.js → Record-Bv1P0s2g.js} +9 -9
- package/dist/{Reward-Y9aHpny5.js → Reward-CRyEjr47.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-1KAjCblO.js → RewardGroup.vue_vue_type_script_setup_true_lang-Ckqox5Ut.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dp4ku9ep.js} +431 -431
- package/dist/Segment-Br0Y5hzV.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BhJ-oVMb.js → SelectItems.vue_vue_type_script_setup_true_lang-BuB-qwcM.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-b5bjfBvc.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DanHGQXC.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCKUXnGl.js} +3 -3
- package/dist/{Setting-BU5778gG.js → Setting-BPFArJMv.js} +432 -432
- package/dist/{Store-IWg0POAU.js → Store-e_odFoS5.js} +210 -210
- package/dist/StoreRewards-wXhyzIFI.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CVPQt-bn.js +995 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BcOvr526.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CWJmeeo-.js} +1 -1
- package/dist/{Tier-iN30KD7g.js → Tier-GfdGRbTX.js} +106 -106
- package/dist/{Title-Duh_Srek.js → Title-C2ZyFxNf.js} +131 -133
- package/dist/{Transaction-DLBA7Svl.js → Transaction-Dv8yYXJS.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DLD5d43d.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CK_4iMCA.js} +6 -6
- package/dist/{Voucher-cTvlMN0Y.js → Voucher-CBujqgnF.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CgooH4yn.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js → ZodTextField.vue_vue_type_script_setup_true_lang-B8pgaARn.js} +1 -1
- package/dist/{app-De-yQ1CJ.js → app-B2Cgyy70.js} +124 -161
- package/dist/{app-A3oEKLq5.js → app-B8E3wp8L.js} +1 -1
- package/dist/app.js +3 -4
- package/dist/{business-B2JBpm4y.js → business-BRidHvRK.js} +1 -1
- package/dist/{campaign-vkzui6F2.js → campaign-B0vnIan2.js} +3 -5
- package/dist/{campaign-Bhur0NJx.js → campaign-B7v0a8YV.js} +9 -9
- package/dist/{campaign.enum-DCYkKGhd.js → campaign.enum-NH5faqyS.js} +1 -1
- package/dist/{campaign.fn--affTEi5.js → campaign.fn-BPHARk3Y.js} +161 -161
- package/dist/{collectible.enum-CLBCnfev.js → collectible.enum-Cun9w38h.js} +1 -1
- package/dist/{collection.fn-bA8q0KYy.js → collection.fn-RR5q6jqi.js} +2 -2
- package/dist/{dto-RCcWeYE0.js → dto-DK1VnGlq.js} +4 -4
- package/dist/{effect-D7qRfPe_.js → effect-CI4ZR8HW.js} +1 -1
- package/dist/{email-addresses-a8PqViID.js → email-addresses-bguwgnrW.js} +1 -1
- package/dist/{export-BneqNRn4.js → export-CcepocZB.js} +3 -3
- package/dist/{helper-DfvvxOyO.js → helper-BM1JTEFS.js} +1 -1
- package/dist/{index-CbsJ6vMJ.js → index-B0Slqiqo.js} +1 -1
- package/dist/{index-y-7yUm2e.js → index-B6_uPXyL.js} +9 -9
- package/dist/{index-CTKMdxSm.js → index-BS3AjuVw.js} +1 -1
- package/dist/{index-2LpkG8Ye.js → index-BfGdztHf.js} +1 -1
- package/dist/{index-D0GnMoag.js → index-CBuCx_0r.js} +79 -168
- package/dist/{index-4kMeSNTr.js → index-CLkqja9X.js} +385 -376
- package/dist/{index-DMrIQqFt.js → index-Cm_6xScD.js} +1 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DHEJX75j.js +44 -0
- package/dist/{index-CMBPIb8x.js → index-D_gLVFsk.js} +941 -932
- package/dist/{index-BWTvsoH0.js → index-DbjZHuoG.js} +1 -1
- package/dist/{index-CrFUhsZO.js → index-De1JnaPh.js} +1 -1
- package/dist/{index-DeXvASjP.js → index-Di6bqaLm.js} +3 -3
- package/dist/{index-CtDqXnOp.js → index-DjycZwfg.js} +448 -515
- package/dist/{index-B0T9GDIZ.js → index-vs1HgFHz.js} +1 -1
- package/dist/{index.esm2017-JtyypweZ.js → index.esm2017-DANlqJ4g.js} +127 -127
- package/dist/{loading-a-FqrwqI.js → loading-BXu9ofEu.js} +1 -1
- package/dist/{membership-CGVtil5J.js → membership-BBb7gdZg.js} +3 -3
- package/dist/{money-CTc1l_Cq.js → money-C02BW-pt.js} +1 -1
- package/dist/{number-W3R-0nYP.js → number-D7tIDv2q.js} +1 -1
- package/dist/objectid-oVX5A5oa.js +145 -0
- package/dist/{plugins-D2sSgTSl.js → plugins-B5tuGbFw.js} +2 -2
- package/dist/{reward-atP8vnNn.js → reward-CE-bnnnQ.js} +1 -1
- package/dist/{rule-eA5IvnjB.js → rule-BN5R8pYj.js} +3 -3
- package/dist/{rule-builder-BB29ZJ_C.js → rule-builder-16JDtaoI.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-DhBeDaAm.js → template-C-zyZgxl.js} +64 -64
- package/dist/{trigger-Bq_pZj1J.js → trigger-DCLjl3mM.js} +4 -4
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{user-B-bhVFIG.js → user-C7bmFOaT.js} +1 -1
- package/dist/{vue-i18n-D-h8VDSx.js → vue-i18n-Cts9OsqE.js} +277 -277
- package/dist/{xlsx-DsByAcZl.js → xlsx-CJ5ufXk3.js} +226 -226
- package/package.json +3 -5
- package/dist/Analytic-O-qZWrFp.js +0 -761
- package/dist/AuditLogs-DlmcFEta.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-CnnrnXbS.js +0 -20073
- package/dist/MemberList-BpE1IjED.js +0 -1606
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/Segment-DVT8uDn8.js +0 -882
- package/dist/StoreRewards-CIjHcVoh.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js +0 -1029
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DkjojUvD.js +0 -419
- package/dist/index-CVAWGMus.js +0 -56
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/objectid-BU0Y8iAN.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, createBlock, createCommentVNode, computed, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, toRefs, normalizeStyle, resolveDynamicComponent, createSlots } from "vue";
|
|
2
2
|
import { _ } from "./lodash-B5I3zXaY.js";
|
|
3
|
-
import { z } from "./app-
|
|
3
|
+
import { z } from "./app-B2Cgyy70.js";
|
|
4
4
|
import { Z as ZodHelper } from "./zod-Bg2FbC-D.js";
|
|
5
|
-
import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-
|
|
6
|
-
import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-
|
|
7
|
-
import { u as useMembershipStore } from "./membership-
|
|
8
|
-
import { u as useBusinessStore } from "./business-
|
|
9
|
-
import "./index-
|
|
10
|
-
import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-
|
|
5
|
+
import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-B7v0a8YV.js";
|
|
6
|
+
import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-DK1VnGlq.js";
|
|
7
|
+
import { u as useMembershipStore } from "./membership-BBb7gdZg.js";
|
|
8
|
+
import { u as useBusinessStore } from "./business-BRidHvRK.js";
|
|
9
|
+
import "./index-B6_uPXyL.js";
|
|
10
|
+
import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-16JDtaoI.js";
|
|
11
11
|
import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
|
|
12
12
|
import { h as hooks } from "./moment-BWErdI6_.js";
|
|
13
|
-
import { f as featureVersionMapping } from "./campaign.enum-
|
|
14
|
-
import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
16
|
-
import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-
|
|
20
|
-
import { u as useI18n } from "./vue-i18n-
|
|
21
|
-
import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-
|
|
22
|
-
import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-
|
|
24
|
-
import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import "./index-
|
|
28
|
-
import "./index-
|
|
29
|
-
import { a as F_GAME_TYPE } from "./collectible.enum-
|
|
13
|
+
import { f as featureVersionMapping } from "./campaign.enum-NH5faqyS.js";
|
|
14
|
+
import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
15
|
+
import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-CQDnl97F.js";
|
|
16
|
+
import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CWJmeeo-.js";
|
|
17
|
+
import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-CK_4iMCA.js";
|
|
18
|
+
import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Dp4ku9ep.js";
|
|
19
|
+
import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-B5tuGbFw.js";
|
|
20
|
+
import { u as useI18n } from "./vue-i18n-Cts9OsqE.js";
|
|
21
|
+
import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-DCLjl3mM.js";
|
|
22
|
+
import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-COGCJGRc.js";
|
|
23
|
+
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-BN5R8pYj.js";
|
|
24
|
+
import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-CgooH4yn.js";
|
|
25
|
+
import { t as FdoCreditLoyaltyReward, u as FdtoRandomReward, v as F_MISSION_TYPE, w as FdoThresholdCreditReward, x as FdtoThresholdReward, y as FdoMission } from "./index-DjycZwfg.js";
|
|
26
|
+
import { T as TEMPLATES } from "./index-CBuCx_0r.js";
|
|
27
|
+
import "./index-vs1HgFHz.js";
|
|
28
|
+
import "./index-Di6bqaLm.js";
|
|
29
|
+
import { a as F_GAME_TYPE } from "./collectible.enum-Cun9w38h.js";
|
|
30
30
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
31
|
-
import { u as useLoading } from "./loading-
|
|
32
|
-
import { i as initCollectibleConfig } from "./helper-
|
|
33
|
-
import { C as CollectionUtils } from "./collection.fn-
|
|
34
|
-
import { s as sentenceCase$1 } from "./index-
|
|
35
|
-
import "./index-
|
|
31
|
+
import { u as useLoading } from "./loading-BXu9ofEu.js";
|
|
32
|
+
import { i as initCollectibleConfig } from "./helper-BM1JTEFS.js";
|
|
33
|
+
import { C as CollectionUtils } from "./collection.fn-RR5q6jqi.js";
|
|
34
|
+
import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
|
|
35
|
+
import "./index-D_gLVFsk.js";
|
|
36
36
|
import { useDialog } from "@feedmepos/ui-library";
|
|
37
|
-
import { u as useCampaignStore } from "./campaign-
|
|
38
|
-
import { S as SvcConfig } from "./index-
|
|
37
|
+
import { u as useCampaignStore } from "./campaign-B0vnIan2.js";
|
|
38
|
+
import { S as SvcConfig } from "./index-CLkqja9X.js";
|
|
39
39
|
import { a as cleanPF } from "./object-qECH92oz.js";
|
|
40
40
|
const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
41
41
|
__name: "TimeRuleGroup",
|
|
@@ -47,13 +47,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
emits: ["update:model-value"],
|
|
50
|
-
setup(e, { emit:
|
|
51
|
-
const { t: a } = useI18n(),
|
|
52
|
-
!
|
|
50
|
+
setup(e, { emit: c }) {
|
|
51
|
+
const { t: a } = useI18n(), r = e, u = c, s = ref(
|
|
52
|
+
!r.modelValue || !r.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(r.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
|
|
53
53
|
);
|
|
54
|
-
watch(
|
|
55
|
-
var
|
|
56
|
-
if (n == "custom" && l == "all_time" && RuleBuilder.getRules((
|
|
54
|
+
watch(s, async (l, n) => {
|
|
55
|
+
var d;
|
|
56
|
+
if (n == "custom" && l == "all_time" && RuleBuilder.getRules((d = r.modelValue) == null ? void 0 : d.rules.g_time).length > 0) {
|
|
57
57
|
const g = await prompt.confirm(
|
|
58
58
|
a("connect.template.rule.time.confirm_remove"),
|
|
59
59
|
a("connect.common.confirm"),
|
|
@@ -63,28 +63,28 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
63
63
|
g && u(
|
|
64
64
|
"update:model-value",
|
|
65
65
|
RuleBuilder.setRuleToGroup(
|
|
66
|
-
|
|
66
|
+
r.modelValue ?? RuleBuilder.scaffoldGroup(),
|
|
67
67
|
RuleBuilder.scaffoldGroup("g_time")
|
|
68
68
|
)
|
|
69
|
-
),
|
|
69
|
+
), s.value = g ? l : n;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
async function o(l) {
|
|
73
73
|
var n;
|
|
74
|
-
if (l == "custom" && RuleBuilder.getRules((n =
|
|
74
|
+
if (l == "custom" && RuleBuilder.getRules((n = r.modelValue) == null ? void 0 : n.rules.g_time).length > 0) {
|
|
75
75
|
if (!await prompt.confirm(
|
|
76
76
|
a("connect.template.rule.time.confirm_remove"),
|
|
77
77
|
a("connect.common.confirm"),
|
|
78
78
|
a("connect.common.confirm"),
|
|
79
79
|
a("connect.common.cancel")
|
|
80
80
|
)) {
|
|
81
|
-
|
|
81
|
+
s.value = "all_time";
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
u(
|
|
85
85
|
"update:model-value",
|
|
86
86
|
RuleBuilder.setRuleToGroup(
|
|
87
|
-
|
|
87
|
+
r.modelValue ?? RuleBuilder.scaffoldGroup(),
|
|
88
88
|
RuleBuilder.scaffoldGroup("g_time")
|
|
89
89
|
)
|
|
90
90
|
);
|
|
@@ -92,28 +92,28 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
92
92
|
}
|
|
93
93
|
return (l, n) => {
|
|
94
94
|
var y;
|
|
95
|
-
const
|
|
95
|
+
const d = resolveComponent("FmRadio"), g = resolveComponent("FmRadioGroup");
|
|
96
96
|
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
97
97
|
createVNode(g, {
|
|
98
|
-
modelValue: unref(
|
|
98
|
+
modelValue: unref(s),
|
|
99
99
|
"onUpdate:modelValue": [
|
|
100
|
-
n[0] || (n[0] = (v) => isRef(
|
|
100
|
+
n[0] || (n[0] = (v) => isRef(s) ? s.value = v : null),
|
|
101
101
|
n[1] || (n[1] = (v) => o(v))
|
|
102
102
|
]
|
|
103
103
|
}, {
|
|
104
104
|
default: withCtx(() => [
|
|
105
|
-
createVNode(
|
|
105
|
+
createVNode(d, {
|
|
106
106
|
label: unref(a)("connect.template.rule.time.all_time"),
|
|
107
107
|
value: "all_time"
|
|
108
108
|
}, null, 8, ["label"]),
|
|
109
|
-
createVNode(
|
|
109
|
+
createVNode(d, {
|
|
110
110
|
label: unref(a)("connect.template.rule.time.custom"),
|
|
111
111
|
value: "custom"
|
|
112
112
|
}, null, 8, ["label"])
|
|
113
113
|
]),
|
|
114
114
|
_: 1
|
|
115
115
|
}, 8, ["modelValue"]),
|
|
116
|
-
unref(
|
|
116
|
+
unref(s) == "custom" ? (openBlock(), createBlock(_sfc_main$j, {
|
|
117
117
|
key: 0,
|
|
118
118
|
class: "!mt-[0px]",
|
|
119
119
|
"include-only": "trigger",
|
|
@@ -139,21 +139,21 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
141
|
emits: ["update:model-value"],
|
|
142
|
-
setup(e, { emit:
|
|
143
|
-
const a = e,
|
|
144
|
-
const { property:
|
|
142
|
+
setup(e, { emit: c }) {
|
|
143
|
+
const a = e, r = c, u = computed(() => {
|
|
144
|
+
const { property: s, operator: o, equator: l } = RuleBuilder.simplify(
|
|
145
145
|
a.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
|
|
146
146
|
op: "before",
|
|
147
147
|
x: 1
|
|
148
148
|
})
|
|
149
149
|
);
|
|
150
150
|
return {
|
|
151
|
-
property:
|
|
151
|
+
property: s,
|
|
152
152
|
operator: o,
|
|
153
153
|
equator: l
|
|
154
154
|
};
|
|
155
155
|
});
|
|
156
|
-
return (
|
|
156
|
+
return (s, o) => {
|
|
157
157
|
const l = resolveComponent("FmRadio"), n = resolveComponent("FmStepperField");
|
|
158
158
|
return openBlock(), createElementBlock("div", null, [
|
|
159
159
|
createVNode(l, {
|
|
@@ -161,7 +161,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
161
161
|
value: "_isRange-day",
|
|
162
162
|
"model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
|
|
163
163
|
"onUpdate:modelValue": o[0] || (o[0] = () => {
|
|
164
|
-
|
|
164
|
+
r(
|
|
165
165
|
"update:model-value",
|
|
166
166
|
unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
|
|
167
167
|
op: "this",
|
|
@@ -176,7 +176,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
176
176
|
value: "_isDay",
|
|
177
177
|
"model-value": unref(u).operator,
|
|
178
178
|
"onUpdate:modelValue": o[1] || (o[1] = () => {
|
|
179
|
-
|
|
179
|
+
r(
|
|
180
180
|
"update:model-value",
|
|
181
181
|
unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
|
|
182
182
|
op: "after",
|
|
@@ -191,11 +191,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
191
191
|
label: "Days before birthday",
|
|
192
192
|
"show-steppers": !1,
|
|
193
193
|
"model-value": unref(u).equator.x,
|
|
194
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
194
|
+
"onUpdate:modelValue": o[2] || (o[2] = (d) => r(
|
|
195
195
|
"update:model-value",
|
|
196
196
|
unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
|
|
197
197
|
op: "after",
|
|
198
|
-
x:
|
|
198
|
+
x: d,
|
|
199
199
|
ignoreYear: !0
|
|
200
200
|
})
|
|
201
201
|
))
|
|
@@ -205,7 +205,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
205
205
|
value: "_isRange-week",
|
|
206
206
|
"model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
|
|
207
207
|
"onUpdate:modelValue": o[3] || (o[3] = () => {
|
|
208
|
-
|
|
208
|
+
r(
|
|
209
209
|
"update:model-value",
|
|
210
210
|
unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
|
|
211
211
|
op: "this",
|
|
@@ -220,7 +220,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
220
220
|
value: "_isRange-month",
|
|
221
221
|
"model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
|
|
222
222
|
"onUpdate:modelValue": o[4] || (o[4] = () => {
|
|
223
|
-
|
|
223
|
+
r(
|
|
224
224
|
"update:model-value",
|
|
225
225
|
unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
|
|
226
226
|
op: "this",
|
|
@@ -233,7 +233,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
233
233
|
]);
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
|
-
}), _hoisted_1$f = { class: "space-y-16" }, _hoisted_2$c = { class: "grid grid-cols-3 gap-16" },
|
|
236
|
+
}), _hoisted_1$f = { class: "space-y-16" }, _hoisted_2$e = /* @__PURE__ */ createElementVNode("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), _hoisted_3$c = { class: "grid grid-cols-3 gap-16" }, _hoisted_4$b = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$6 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
237
237
|
__name: "CampaignTriggerInput",
|
|
238
238
|
props: {
|
|
239
239
|
campaignType: {
|
|
@@ -249,15 +249,15 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
249
249
|
}
|
|
250
250
|
},
|
|
251
251
|
emits: ["update:model-value"],
|
|
252
|
-
setup(e, { emit:
|
|
253
|
-
const a = e,
|
|
254
|
-
(
|
|
252
|
+
setup(e, { emit: c }) {
|
|
253
|
+
const a = e, r = c, u = computed(() => a.disabled ? TypeToTriggerOptions[a.campaignType].filter(
|
|
254
|
+
(s) => s.value == a.modelValue
|
|
255
255
|
) : TypeToTriggerOptions[a.campaignType]);
|
|
256
|
-
return (
|
|
256
|
+
return (s, o) => {
|
|
257
257
|
const l = resolveComponent("FmCard");
|
|
258
258
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
259
|
-
|
|
260
|
-
createElementVNode("div",
|
|
259
|
+
_hoisted_2$e,
|
|
260
|
+
createElementVNode("div", _hoisted_3$c, [
|
|
261
261
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(l, {
|
|
262
262
|
variant: "outlined",
|
|
263
263
|
disabled: a.disabled,
|
|
@@ -267,13 +267,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
267
267
|
"hover:bg-fm-color-opacity-sm": e.modelValue != n.value
|
|
268
268
|
}]),
|
|
269
269
|
onClick: () => {
|
|
270
|
-
a.modelValue != n.value && !a.disabled &&
|
|
270
|
+
a.modelValue != n.value && !a.disabled && r("update:model-value", n.value);
|
|
271
271
|
},
|
|
272
272
|
key: n.name
|
|
273
273
|
}, {
|
|
274
274
|
default: withCtx(() => [
|
|
275
|
-
createElementVNode("div",
|
|
276
|
-
createElementVNode("div",
|
|
275
|
+
createElementVNode("div", _hoisted_4$b, toDisplayString(n.name), 1),
|
|
276
|
+
createElementVNode("div", _hoisted_5$6, toDisplayString(n.description), 1)
|
|
277
277
|
]),
|
|
278
278
|
_: 2
|
|
279
279
|
}, 1032, ["disabled", "class", "onClick"]))), 128))
|
|
@@ -294,10 +294,10 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
emits: ["update:model-value"],
|
|
297
|
-
setup(e, { emit:
|
|
298
|
-
const a =
|
|
299
|
-
return (
|
|
300
|
-
const
|
|
297
|
+
setup(e, { emit: c }) {
|
|
298
|
+
const a = c;
|
|
299
|
+
return (r, u) => {
|
|
300
|
+
const s = resolveComponent("FmButton"), o = resolveComponent("FmField"), l = resolveComponent("FmDatePicker");
|
|
301
301
|
return openBlock(), createBlock(l, {
|
|
302
302
|
label: e.label,
|
|
303
303
|
"model-value": e.modelValue || "",
|
|
@@ -310,11 +310,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
310
310
|
"icon-outlined": !n
|
|
311
311
|
}, {
|
|
312
312
|
append: withCtx(() => [
|
|
313
|
-
e.modelValue ? (openBlock(), createBlock(
|
|
313
|
+
e.modelValue ? (openBlock(), createBlock(s, {
|
|
314
314
|
key: 0,
|
|
315
315
|
variant: "tertiary",
|
|
316
316
|
icon: "clear",
|
|
317
|
-
onClick: u[0] || (u[0] = (
|
|
317
|
+
onClick: u[0] || (u[0] = (d) => (d.stopPropagation(), a("update:model-value", null)))
|
|
318
318
|
})) : createCommentVNode("", !0)
|
|
319
319
|
]),
|
|
320
320
|
default: withCtx(() => [
|
|
@@ -329,7 +329,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
329
329
|
}, 8, ["label", "model-value"]);
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
}), _hoisted_1$e = { class: "flex items-center gap-8 w-full xs:flex-col" }, _hoisted_2$
|
|
332
|
+
}), _hoisted_1$e = { class: "flex items-center gap-8 w-full xs:flex-col" }, _hoisted_2$d = { class: "flex-1 xs:w-full" }, _hoisted_3$b = /* @__PURE__ */ createElementVNode("div", { class: "mt-5 xs:hidden" }, "to", -1), _hoisted_4$a = { class: "flex-1 xs:w-full" }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
333
333
|
__name: "DateRangeInput",
|
|
334
334
|
props: {
|
|
335
335
|
modelValue: {
|
|
@@ -338,14 +338,14 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
340
|
emits: ["update:model-value"],
|
|
341
|
-
setup(e, { emit:
|
|
342
|
-
const a =
|
|
343
|
-
return (
|
|
344
|
-
var
|
|
341
|
+
setup(e, { emit: c }) {
|
|
342
|
+
const a = c;
|
|
343
|
+
return (r, u) => {
|
|
344
|
+
var s, o;
|
|
345
345
|
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
346
|
-
createElementVNode("div", _hoisted_2$
|
|
346
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
347
347
|
createVNode(_sfc_main$f, {
|
|
348
|
-
"model-value": ((
|
|
348
|
+
"model-value": ((s = e.modelValue) == null ? void 0 : s.startDate) ?? null,
|
|
349
349
|
label: "Start date",
|
|
350
350
|
"onUpdate:modelValue": u[0] || (u[0] = (l) => {
|
|
351
351
|
var n;
|
|
@@ -356,8 +356,8 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
356
356
|
})
|
|
357
357
|
}, null, 8, ["model-value"])
|
|
358
358
|
]),
|
|
359
|
-
|
|
360
|
-
createElementVNode("div",
|
|
359
|
+
_hoisted_3$b,
|
|
360
|
+
createElementVNode("div", _hoisted_4$a, [
|
|
361
361
|
createVNode(_sfc_main$f, {
|
|
362
362
|
"model-value": ((o = e.modelValue) == null ? void 0 : o.endDate) ?? null,
|
|
363
363
|
label: "End date",
|
|
@@ -373,10 +373,10 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
373
373
|
]);
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
-
}), _hoisted_1$d = { class: "space-y-8" }, _hoisted_2$
|
|
376
|
+
}), _hoisted_1$d = { class: "space-y-8" }, _hoisted_2$c = { class: "grid grid-cols-2 gap-16" }, _hoisted_3$a = {
|
|
377
377
|
key: 0,
|
|
378
378
|
class: "space-y-4"
|
|
379
|
-
}, _hoisted_4$
|
|
379
|
+
}, _hoisted_4$9 = { class: "fm-typo-en-body-lg-400 class flex items-center justify-between" }, _hoisted_5$5 = /* @__PURE__ */ createElementVNode("div", null, "Notify date", -1), _hoisted_6$3 = { class: "text-ellipsis line-clamp-1" }, _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
380
380
|
__name: "ScheduleRuleInput",
|
|
381
381
|
props: {
|
|
382
382
|
modelValue: {
|
|
@@ -391,19 +391,19 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
391
391
|
}
|
|
392
392
|
},
|
|
393
393
|
emits: ["update:model-value"],
|
|
394
|
-
setup(e, { emit:
|
|
395
|
-
const a = e,
|
|
394
|
+
setup(e, { emit: c }) {
|
|
395
|
+
const a = e, r = c;
|
|
396
396
|
function u() {
|
|
397
397
|
const y = RuleBuilder.getRules(a.modelValue);
|
|
398
398
|
return y.length == 0 ? "fixed" : y.some(
|
|
399
399
|
(v) => isRuleEntry(v) && RuleBuilder.simplify(v).operator == "_rrule"
|
|
400
400
|
) ? "repeating" : "fixed";
|
|
401
401
|
}
|
|
402
|
-
const
|
|
402
|
+
const s = ref(u()), o = ref(!1), l = computed(() => {
|
|
403
403
|
const y = RuleBuilder.getRules(a.modelValue), v = y.find(
|
|
404
|
-
(
|
|
404
|
+
(p) => isRuleEntry(p) && RuleBuilder.simplify(p).property == "trigger.date"
|
|
405
405
|
), h = y.find(
|
|
406
|
-
(
|
|
406
|
+
(p) => isRuleEntry(p) && RuleBuilder.simplify(p).property == "trigger.time"
|
|
407
407
|
);
|
|
408
408
|
return {
|
|
409
409
|
date: v ? RuleBuilder.simplify(v).equator : null,
|
|
@@ -417,7 +417,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
417
417
|
a.endDate ? new Date(a.endDate) : void 0
|
|
418
418
|
)
|
|
419
419
|
);
|
|
420
|
-
function
|
|
420
|
+
function d(y) {
|
|
421
421
|
const v = y.label.toLowerCase(), h = v == "fixed" ? [
|
|
422
422
|
RuleBuilder.constructEntry(
|
|
423
423
|
"trigger.date",
|
|
@@ -433,16 +433,16 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
433
433
|
),
|
|
434
434
|
RuleBuilder.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
435
435
|
];
|
|
436
|
-
|
|
436
|
+
r(
|
|
437
437
|
"update:model-value",
|
|
438
438
|
RuleBuilder.setRuleToGroup(
|
|
439
439
|
RuleBuilder.scaffoldGroup("g_schedule"),
|
|
440
440
|
h
|
|
441
441
|
)
|
|
442
|
-
),
|
|
442
|
+
), s.value = v;
|
|
443
443
|
}
|
|
444
444
|
function g(y) {
|
|
445
|
-
|
|
445
|
+
s.value == "fixed" ? r(
|
|
446
446
|
"update:model-value",
|
|
447
447
|
RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
|
|
448
448
|
RuleBuilder.constructEntry(
|
|
@@ -456,7 +456,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
456
456
|
y.time
|
|
457
457
|
)
|
|
458
458
|
])
|
|
459
|
-
) :
|
|
459
|
+
) : r(
|
|
460
460
|
"update:model-value",
|
|
461
461
|
RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
|
|
462
462
|
RuleBuilder.constructEntry(
|
|
@@ -473,33 +473,33 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
473
473
|
);
|
|
474
474
|
}
|
|
475
475
|
return (y, v) => {
|
|
476
|
-
const h = resolveComponent("FmButtonGroup"),
|
|
476
|
+
const h = resolveComponent("FmButtonGroup"), p = resolveComponent("FmTimePicker"), i = resolveComponent("FmIcon"), f = resolveComponent("FmTooltip"), m = resolveComponent("FmField"), b = resolveComponent("FmCard"), x = resolveComponent("FmPopover"), k = resolveComponent("FmDatePicker"), C = resolveComponent("FmHelperText");
|
|
477
477
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
478
478
|
createVNode(h, {
|
|
479
479
|
items: [{ label: "Fixed" }, { label: "Repeating" }],
|
|
480
|
-
"model-value": { label: unref(cases).title(unref(
|
|
481
|
-
"onUpdate:modelValue":
|
|
480
|
+
"model-value": { label: unref(cases).title(unref(s)) },
|
|
481
|
+
"onUpdate:modelValue": d,
|
|
482
482
|
class: "mb-8"
|
|
483
483
|
}, null, 8, ["model-value"]),
|
|
484
484
|
createElementVNode("div", _hoisted_1$d, [
|
|
485
|
-
createElementVNode("div", _hoisted_2$
|
|
486
|
-
createVNode(
|
|
485
|
+
createElementVNode("div", _hoisted_2$c, [
|
|
486
|
+
createVNode(p, {
|
|
487
487
|
label: "Notify time",
|
|
488
488
|
"model-value": unref(l).time,
|
|
489
489
|
"onUpdate:modelValue": v[0] || (v[0] = (B) => g({ date: unref(l).date, time: B })),
|
|
490
490
|
"helper-text": unref(l).time ? void 0 : "Time is required",
|
|
491
491
|
"helper-state": unref(l).time ? void 0 : "error"
|
|
492
492
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
493
|
-
unref(
|
|
494
|
-
createElementVNode("div", _hoisted_4$
|
|
495
|
-
|
|
496
|
-
unref(l).date ? (openBlock(), createBlock(
|
|
493
|
+
unref(s) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$a, [
|
|
494
|
+
createElementVNode("div", _hoisted_4$9, [
|
|
495
|
+
_hoisted_5$5,
|
|
496
|
+
unref(l).date ? (openBlock(), createBlock(f, {
|
|
497
497
|
key: 0,
|
|
498
498
|
"z-index": 9999,
|
|
499
499
|
content: unref(SummarizeRrule)(unref(RRule).fromString(unref(l).date).options)
|
|
500
500
|
}, {
|
|
501
501
|
default: withCtx(() => [
|
|
502
|
-
createVNode(
|
|
502
|
+
createVNode(i, {
|
|
503
503
|
name: "info",
|
|
504
504
|
size: "sm",
|
|
505
505
|
outline: !0
|
|
@@ -513,13 +513,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
513
513
|
onPopoverChanged: v[3] || (v[3] = (B) => o.value = B)
|
|
514
514
|
}, {
|
|
515
515
|
"popover-button": withCtx(() => [
|
|
516
|
-
createVNode(
|
|
516
|
+
createVNode(m, {
|
|
517
517
|
class: "cursor-pointer",
|
|
518
518
|
"helper-text": unref(l).date ? void 0 : "Date is required",
|
|
519
519
|
"helper-state": unref(l).date ? void 0 : "error"
|
|
520
520
|
}, {
|
|
521
521
|
default: withCtx(() => [
|
|
522
|
-
createElementVNode("div",
|
|
522
|
+
createElementVNode("div", _hoisted_6$3, toDisplayString(unref(l).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(l).date).options) : "Set a repeating date"), 1)
|
|
523
523
|
]),
|
|
524
524
|
_: 1
|
|
525
525
|
}, 8, ["helper-text", "helper-state"])
|
|
@@ -557,7 +557,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
557
557
|
], 64);
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
}), _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "grid grid-cols-2 gap-16" },
|
|
560
|
+
}), _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$b = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1), _hoisted_3$9 = { class: "grid grid-cols-2 gap-16" }, _hoisted_4$8 = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
561
561
|
__name: "GameTypeInput",
|
|
562
562
|
props: {
|
|
563
563
|
modelValue: {
|
|
@@ -565,8 +565,8 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
565
565
|
}
|
|
566
566
|
},
|
|
567
567
|
emits: ["update:model-value"],
|
|
568
|
-
setup(e, { emit:
|
|
569
|
-
const a = e,
|
|
568
|
+
setup(e, { emit: c }) {
|
|
569
|
+
const a = e, r = c, u = computed(
|
|
570
570
|
() => [
|
|
571
571
|
{
|
|
572
572
|
label: "Fortune Wheel",
|
|
@@ -580,13 +580,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
580
580
|
value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS,
|
|
581
581
|
hidden: !0
|
|
582
582
|
}
|
|
583
|
-
].filter((
|
|
583
|
+
].filter((s) => !s.hidden)
|
|
584
584
|
);
|
|
585
|
-
return (
|
|
585
|
+
return (s, o) => {
|
|
586
586
|
const l = resolveComponent("FmCard");
|
|
587
587
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
588
|
-
|
|
589
|
-
createElementVNode("div",
|
|
588
|
+
_hoisted_2$b,
|
|
589
|
+
createElementVNode("div", _hoisted_3$9, [
|
|
590
590
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(l, {
|
|
591
591
|
variant: "outlined",
|
|
592
592
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
@@ -595,13 +595,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
595
595
|
"hover:bg-fm-color-opacity-sm": e.modelValue != n.value
|
|
596
596
|
}]),
|
|
597
597
|
onClick: () => {
|
|
598
|
-
a.modelValue != n.value &&
|
|
598
|
+
a.modelValue != n.value && r("update:model-value", n.value);
|
|
599
599
|
},
|
|
600
600
|
key: n.value
|
|
601
601
|
}, {
|
|
602
602
|
default: withCtx(() => [
|
|
603
|
-
createElementVNode("div",
|
|
604
|
-
createElementVNode("div",
|
|
603
|
+
createElementVNode("div", _hoisted_4$8, toDisplayString(n.label), 1),
|
|
604
|
+
createElementVNode("div", _hoisted_5$4, toDisplayString(n.description), 1)
|
|
605
605
|
]),
|
|
606
606
|
_: 2
|
|
607
607
|
}, 1032, ["class", "onClick"]))), 128))
|
|
@@ -612,32 +612,32 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
612
612
|
}), _hoisted_1$b = {
|
|
613
613
|
key: 0,
|
|
614
614
|
class: "flex flex-col gap-y-24"
|
|
615
|
-
}, _hoisted_2$8 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
615
|
+
}, _hoisted_2$a = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1), _hoisted_3$8 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1), _hoisted_4$7 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
616
616
|
__name: "EditRewardPoolSheet",
|
|
617
617
|
emits: ["update:model-value"],
|
|
618
|
-
setup(e, { expose:
|
|
619
|
-
const
|
|
620
|
-
var
|
|
621
|
-
return ((
|
|
622
|
-
(
|
|
623
|
-
var
|
|
624
|
-
return
|
|
618
|
+
setup(e, { expose: c, emit: a }) {
|
|
619
|
+
const r = useMembershipStore(), { minor: u } = useLoading, s = ref(!1), o = ref(), l = ref(), n = ref(0), d = computed(() => {
|
|
620
|
+
var i;
|
|
621
|
+
return ((i = r.loyaltyRewards.items.find(
|
|
622
|
+
(f) => {
|
|
623
|
+
var m;
|
|
624
|
+
return f.value === ((m = o.value) == null ? void 0 : m.collectible);
|
|
625
625
|
}
|
|
626
|
-
)) == null ? void 0 :
|
|
626
|
+
)) == null ? void 0 : i.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
|
|
627
627
|
}), g = computed(() => {
|
|
628
|
-
const
|
|
629
|
-
return
|
|
628
|
+
const p = d.value.safeParse(o.value);
|
|
629
|
+
return p.success ? [] : p.error.errors;
|
|
630
630
|
});
|
|
631
|
-
function y(
|
|
632
|
-
|
|
631
|
+
function y(p, i, f) {
|
|
632
|
+
p && (o.value = i, n.value = f), s.value = p;
|
|
633
633
|
}
|
|
634
634
|
const v = a;
|
|
635
635
|
async function h() {
|
|
636
|
-
const
|
|
637
|
-
|
|
636
|
+
const p = d.value.safeParse(o.value);
|
|
637
|
+
p.success && (await u(
|
|
638
638
|
async () => {
|
|
639
|
-
|
|
640
|
-
|
|
639
|
+
p.data.type === "VOUCHER" && l.value && (p.data.collectibleConfig.image = await firebaseStorage.update(
|
|
640
|
+
p.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, l.value),
|
|
641
641
|
l.value
|
|
642
642
|
));
|
|
643
643
|
},
|
|
@@ -645,36 +645,36 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
645
645
|
message: "Uploading reward image",
|
|
646
646
|
successMessage: "Reward image updated"
|
|
647
647
|
}
|
|
648
|
-
), v("update:model-value",
|
|
648
|
+
), v("update:model-value", p.data, n.value));
|
|
649
649
|
}
|
|
650
|
-
return
|
|
650
|
+
return c({
|
|
651
651
|
showSheet: y
|
|
652
|
-
}), (
|
|
653
|
-
const
|
|
652
|
+
}), (p, i) => {
|
|
653
|
+
const f = resolveComponent("FmSelect"), m = resolveComponent("FmStepperField"), b = resolveComponent("FmButton"), x = resolveComponent("FmSideSheet");
|
|
654
654
|
return openBlock(), createBlock(x, {
|
|
655
655
|
"max-width": 560,
|
|
656
|
-
modelValue: unref(
|
|
656
|
+
modelValue: unref(s),
|
|
657
657
|
"onUpdate:modelValue": [
|
|
658
|
-
|
|
659
|
-
|
|
658
|
+
i[9] || (i[9] = (k) => isRef(s) ? s.value = k : null),
|
|
659
|
+
i[10] || (i[10] = (k) => s.value = k)
|
|
660
660
|
],
|
|
661
661
|
header: "Edit reward",
|
|
662
662
|
"dismiss-away": ""
|
|
663
663
|
}, {
|
|
664
664
|
"side-sheet-footer": withCtx(() => [
|
|
665
|
-
createElementVNode("div",
|
|
665
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
666
666
|
createVNode(b, {
|
|
667
667
|
variant: "primary",
|
|
668
668
|
type: "button",
|
|
669
669
|
disabled: unref(g).length > 0,
|
|
670
670
|
label: "Confirm",
|
|
671
|
-
onClick:
|
|
671
|
+
onClick: i[7] || (i[7] = (k) => h())
|
|
672
672
|
}, null, 8, ["disabled"]),
|
|
673
673
|
createVNode(b, {
|
|
674
674
|
variant: "secondary",
|
|
675
675
|
type: "button",
|
|
676
676
|
label: "Cancel",
|
|
677
|
-
onClick:
|
|
677
|
+
onClick: i[8] || (i[8] = (k) => s.value = !1)
|
|
678
678
|
})
|
|
679
679
|
])
|
|
680
680
|
]),
|
|
@@ -682,7 +682,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
682
682
|
var k, C, B;
|
|
683
683
|
return [
|
|
684
684
|
unref(o) ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
685
|
-
createVNode(
|
|
685
|
+
createVNode(f, {
|
|
686
686
|
label: "Reward Type",
|
|
687
687
|
items: [
|
|
688
688
|
{ label: "No Reward", value: "NO_REWARD" },
|
|
@@ -690,7 +690,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
690
690
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
691
691
|
],
|
|
692
692
|
"model-value": unref(o).type,
|
|
693
|
-
"onUpdate:modelValue":
|
|
693
|
+
"onUpdate:modelValue": i[0] || (i[0] = (V) => {
|
|
694
694
|
V == "NO_REWARD" ? o.value = {
|
|
695
695
|
type: "NO_REWARD",
|
|
696
696
|
collectible: null,
|
|
@@ -710,7 +710,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
710
710
|
},
|
|
711
711
|
weight: 1
|
|
712
712
|
} : o.value = {
|
|
713
|
-
collectible: unref(
|
|
713
|
+
collectible: unref(r).loyaltyRewards.raw[0]._id,
|
|
714
714
|
type: "LOYALTY",
|
|
715
715
|
earningOption: {
|
|
716
716
|
amount: 1,
|
|
@@ -723,59 +723,59 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
723
723
|
};
|
|
724
724
|
})
|
|
725
725
|
}, null, 8, ["model-value"]),
|
|
726
|
-
unref(o).type == "LOYALTY" ? (openBlock(), createBlock(
|
|
726
|
+
unref(o).type == "LOYALTY" ? (openBlock(), createBlock(f, {
|
|
727
727
|
key: 0,
|
|
728
728
|
label: "Loyalty type",
|
|
729
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
730
|
-
items: unref(
|
|
729
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(d), "collectible", [unref(o).type])],
|
|
730
|
+
items: unref(r).loyaltyRewards.items,
|
|
731
731
|
"model-value": unref(o).collectible,
|
|
732
|
-
"onUpdate:modelValue":
|
|
732
|
+
"onUpdate:modelValue": i[1] || (i[1] = (V) => unref(o).collectible = V)
|
|
733
733
|
}, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
|
|
734
|
-
createVNode(
|
|
734
|
+
createVNode(m, {
|
|
735
735
|
label: "Weight",
|
|
736
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
736
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(d), "weight", [unref(o).type])],
|
|
737
737
|
"model-value": unref(o).weight,
|
|
738
|
-
"onUpdate:modelValue":
|
|
738
|
+
"onUpdate:modelValue": i[2] || (i[2] = (V) => o.value = {
|
|
739
739
|
...unref(o),
|
|
740
740
|
weight: V
|
|
741
741
|
})
|
|
742
742
|
}, null, 8, ["rules", "model-value"]),
|
|
743
743
|
unref(o).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
744
|
-
((k = unref(
|
|
744
|
+
((k = unref(r).loyaltyRewards.items.find(
|
|
745
745
|
(V) => {
|
|
746
746
|
var R;
|
|
747
747
|
return V.value === ((R = unref(o)) == null ? void 0 : R.collectible);
|
|
748
748
|
}
|
|
749
749
|
)) == null ? void 0 : k.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
750
|
-
|
|
750
|
+
_hoisted_2$a,
|
|
751
751
|
createVNode(_sfc_main$l, {
|
|
752
752
|
class: "mt-[-8px]",
|
|
753
753
|
rules: [
|
|
754
|
-
unref(ZodHelper).ruleAtPath(unref(
|
|
754
|
+
unref(ZodHelper).ruleAtPath(unref(d), "earningOption", [unref(o).type])
|
|
755
755
|
],
|
|
756
756
|
"helper-state": unref(ZodHelper).helperState(unref(g), "earningOption"),
|
|
757
757
|
"error-text": unref(ZodHelper).helperText(unref(g), "earningOption"),
|
|
758
758
|
"fixed-type": !0,
|
|
759
759
|
"model-value": unref(o).earningOption,
|
|
760
|
-
"onUpdate:modelValue":
|
|
760
|
+
"onUpdate:modelValue": i[3] || (i[3] = (V) => o.value = {
|
|
761
761
|
...unref(o),
|
|
762
762
|
earningOption: V
|
|
763
763
|
})
|
|
764
764
|
}, null, 8, ["rules", "helper-state", "error-text", "model-value"])
|
|
765
765
|
], 64)) : createCommentVNode("", !0),
|
|
766
|
-
|
|
766
|
+
_hoisted_3$8,
|
|
767
767
|
createVNode(_sfc_main$m, {
|
|
768
768
|
type: unref(o).type === "LOYALTY" ? "custom" : "range",
|
|
769
|
-
"for-credit": unref(o).type === "LOYALTY" && ((C = unref(
|
|
769
|
+
"for-credit": unref(o).type === "LOYALTY" && ((C = unref(r).loyaltyRewards.items.find(
|
|
770
770
|
(V) => {
|
|
771
771
|
var R;
|
|
772
772
|
return V.value === ((R = unref(o)) == null ? void 0 : R.collectible);
|
|
773
773
|
}
|
|
774
774
|
)) == null ? void 0 : C.raw.type) === "CREDIT",
|
|
775
775
|
class: "!gap-24",
|
|
776
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
776
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(d), "validityOption", [unref(o).type])],
|
|
777
777
|
"model-value": unref(o).validityOption,
|
|
778
|
-
"onUpdate:modelValue":
|
|
778
|
+
"onUpdate:modelValue": i[4] || (i[4] = (V) => o.value = {
|
|
779
779
|
...unref(o),
|
|
780
780
|
validityOption: V
|
|
781
781
|
})
|
|
@@ -785,11 +785,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
785
785
|
key: 2,
|
|
786
786
|
"reward-image": unref(l),
|
|
787
787
|
"model-value": ((B = unref(o)) == null ? void 0 : B.collectibleConfig) ?? void 0,
|
|
788
|
-
"onUpdate:modelValue":
|
|
788
|
+
"onUpdate:modelValue": i[5] || (i[5] = (V) => o.value = {
|
|
789
789
|
...unref(o),
|
|
790
790
|
collectibleConfig: V
|
|
791
791
|
}),
|
|
792
|
-
"onUpdate:rewardImage":
|
|
792
|
+
"onUpdate:rewardImage": i[6] || (i[6] = (V) => l.value = V)
|
|
793
793
|
}, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
|
|
794
794
|
createVNode(JsonViewer, { json: unref(g) }, null, 8, ["json"])
|
|
795
795
|
])) : createCommentVNode("", !0)
|
|
@@ -803,7 +803,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
803
803
|
function isNullOrEmpty(e) {
|
|
804
804
|
return e == null || e === "";
|
|
805
805
|
}
|
|
806
|
-
const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$
|
|
806
|
+
const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type and weightage given to your customer. ", -1), _hoisted_3$7 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$6 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
807
807
|
__name: "RewardPoolInput",
|
|
808
808
|
props: {
|
|
809
809
|
modelValue: {
|
|
@@ -818,37 +818,37 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
818
818
|
}
|
|
819
819
|
},
|
|
820
820
|
emits: ["update:model-value"],
|
|
821
|
-
setup(e, { emit:
|
|
822
|
-
const a = e,
|
|
823
|
-
const
|
|
824
|
-
return
|
|
821
|
+
setup(e, { emit: c }) {
|
|
822
|
+
const a = e, r = c, u = useMembershipStore(), s = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), o = computed(() => a.modelValue ?? []), l = computed(() => {
|
|
823
|
+
const p = s.safeParse(o.value);
|
|
824
|
+
return p.success ? [] : p.error.errors;
|
|
825
825
|
}), n = ref();
|
|
826
|
-
function
|
|
827
|
-
var
|
|
828
|
-
const
|
|
829
|
-
|
|
826
|
+
function d(p, i) {
|
|
827
|
+
var m;
|
|
828
|
+
const f = [...o.value];
|
|
829
|
+
f[i] = p, (m = n.value) == null || m.showSheet(!1), r("update:model-value", f);
|
|
830
830
|
}
|
|
831
|
-
function g(
|
|
832
|
-
const
|
|
833
|
-
(b) => b._id.toString() ==
|
|
834
|
-
),
|
|
831
|
+
function g(p) {
|
|
832
|
+
const i = p.type == "VOUCHER" ? p.collectibleConfig : u.collectibles.find(
|
|
833
|
+
(b) => b._id.toString() == p.collectible
|
|
834
|
+
), f = CollectionUtils.formattedType((i == null ? void 0 : i.name) || ""), m = p.weight;
|
|
835
835
|
return {
|
|
836
|
-
label: isNullOrEmpty(
|
|
837
|
-
sublabel: `${
|
|
836
|
+
label: isNullOrEmpty(f) ? "NO REWARD" : f,
|
|
837
|
+
sublabel: `${m} (${(m / o.value.reduce((b, x) => b + x.weight, 0) * 100).toFixed(2)}%)`
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
|
-
function y(
|
|
841
|
-
var
|
|
842
|
-
const
|
|
843
|
-
(
|
|
840
|
+
function y(p) {
|
|
841
|
+
var f;
|
|
842
|
+
const i = [...o.value];
|
|
843
|
+
(f = n.value) == null || f.showSheet(!0, i[p], p);
|
|
844
844
|
}
|
|
845
|
-
function v(
|
|
846
|
-
const
|
|
847
|
-
|
|
845
|
+
function v(p) {
|
|
846
|
+
const i = [...o.value];
|
|
847
|
+
i.splice(p, 1), r("update:model-value", i);
|
|
848
848
|
}
|
|
849
849
|
function h() {
|
|
850
|
-
var
|
|
851
|
-
(
|
|
850
|
+
var p;
|
|
851
|
+
(p = n.value) == null || p.showSheet(
|
|
852
852
|
!0,
|
|
853
853
|
{
|
|
854
854
|
type: "NO_REWARD",
|
|
@@ -858,17 +858,17 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
858
858
|
o.value.length
|
|
859
859
|
);
|
|
860
860
|
}
|
|
861
|
-
return (
|
|
862
|
-
const
|
|
861
|
+
return (p, i) => {
|
|
862
|
+
const f = resolveComponent("FmButton"), m = resolveComponent("FmCard"), b = resolveComponent("FmHelperText");
|
|
863
863
|
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
864
|
-
|
|
865
|
-
createVNode(
|
|
864
|
+
_hoisted_2$9,
|
|
865
|
+
createVNode(f, {
|
|
866
866
|
label: "Add Reward",
|
|
867
|
-
onClick:
|
|
867
|
+
onClick: i[0] || (i[0] = (x) => h()),
|
|
868
868
|
variant: "plain",
|
|
869
869
|
icon: "add"
|
|
870
870
|
}),
|
|
871
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (x, k) => (openBlock(), createBlock(
|
|
871
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (x, k) => (openBlock(), createBlock(m, {
|
|
872
872
|
key: k,
|
|
873
873
|
class: "px-16 py-12 flex items-center justify-between cursor-pointer",
|
|
874
874
|
variant: "outlined",
|
|
@@ -878,10 +878,10 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
878
878
|
var C;
|
|
879
879
|
return [
|
|
880
880
|
createElementVNode("div", null, [
|
|
881
|
-
createElementVNode("div",
|
|
882
|
-
createElementVNode("div",
|
|
881
|
+
createElementVNode("div", _hoisted_3$7, toDisplayString(x.type == "LOYALTY" ? (C = x == null ? void 0 : x.earningOption) == null ? void 0 : C.amount : "") + " " + toDisplayString(g(x).label), 1),
|
|
882
|
+
createElementVNode("div", _hoisted_4$6, toDisplayString(g(x).sublabel), 1)
|
|
883
883
|
]),
|
|
884
|
-
createVNode(
|
|
884
|
+
createVNode(f, {
|
|
885
885
|
icon: "delete",
|
|
886
886
|
variant: "tertiary",
|
|
887
887
|
onClick: (B) => (B.stopPropagation(), v(k))
|
|
@@ -898,15 +898,15 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
898
898
|
createVNode(_sfc_main$b, {
|
|
899
899
|
ref_key: "sheetRef",
|
|
900
900
|
ref: n,
|
|
901
|
-
"onUpdate:modelValue":
|
|
901
|
+
"onUpdate:modelValue": d
|
|
902
902
|
}, null, 512)
|
|
903
903
|
]);
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
}), _hoisted_1$9 = { class: "space-y-16" }, _hoisted_2$
|
|
906
|
+
}), _hoisted_1$9 = { class: "space-y-16" }, _hoisted_2$8 = {
|
|
907
907
|
key: 0,
|
|
908
908
|
class: "grid grid-cols-2 gap-16"
|
|
909
|
-
}, _hoisted_3$
|
|
909
|
+
}, _hoisted_3$6 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$5 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
910
910
|
__name: "PromotionGameTypeInput",
|
|
911
911
|
props: {
|
|
912
912
|
modelValue: {
|
|
@@ -914,48 +914,48 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
914
914
|
}
|
|
915
915
|
},
|
|
916
916
|
emits: ["update:model-value"],
|
|
917
|
-
setup(e, { emit:
|
|
918
|
-
const a = e,
|
|
917
|
+
setup(e, { emit: c }) {
|
|
918
|
+
const a = e, r = c, u = computed(() => [
|
|
919
919
|
{
|
|
920
920
|
label: "Rock paper scissor",
|
|
921
921
|
description: "Customers play 3 rounds of Rock Paper Scissors against the cashier. If customer won 2 rounds, they will get a discount.",
|
|
922
922
|
value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS
|
|
923
923
|
}
|
|
924
924
|
]);
|
|
925
|
-
return (
|
|
925
|
+
return (s, o) => {
|
|
926
926
|
var g, y, v;
|
|
927
|
-
const l = resolveComponent("FmSwitch"), n = resolveComponent("FmCard"),
|
|
927
|
+
const l = resolveComponent("FmSwitch"), n = resolveComponent("FmCard"), d = resolveComponent("FmHelperText");
|
|
928
928
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
929
929
|
createVNode(l, {
|
|
930
930
|
label: "Enable game",
|
|
931
931
|
"model-value": !!((g = e.modelValue) != null && g.gameType),
|
|
932
|
-
"onUpdate:modelValue": o[0] || (o[0] = (h) => h ?
|
|
932
|
+
"onUpdate:modelValue": o[0] || (o[0] = (h) => h ? r("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : r("update:model-value", null))
|
|
933
933
|
}, null, 8, ["model-value"]),
|
|
934
|
-
((y = e.modelValue) == null ? void 0 : y.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
934
|
+
((y = e.modelValue) == null ? void 0 : y.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
935
935
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (h) => {
|
|
936
|
-
var
|
|
936
|
+
var p, i;
|
|
937
937
|
return openBlock(), createBlock(n, {
|
|
938
938
|
variant: "outlined",
|
|
939
939
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
940
940
|
"col-span-2": unref(u).length == 1,
|
|
941
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((
|
|
942
|
-
"hover:bg-fm-color-opacity-sm": ((
|
|
941
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((p = e.modelValue) == null ? void 0 : p.gameType) == h.value,
|
|
942
|
+
"hover:bg-fm-color-opacity-sm": ((i = e.modelValue) == null ? void 0 : i.gameType) != h.value
|
|
943
943
|
}]),
|
|
944
944
|
onClick: () => {
|
|
945
|
-
var
|
|
946
|
-
((
|
|
945
|
+
var f;
|
|
946
|
+
((f = a.modelValue) == null ? void 0 : f.gameType) != h.value && r("update:model-value", { gameType: h.value });
|
|
947
947
|
},
|
|
948
948
|
key: h.value
|
|
949
949
|
}, {
|
|
950
950
|
default: withCtx(() => [
|
|
951
|
-
createElementVNode("div", _hoisted_3$
|
|
952
|
-
createElementVNode("div", _hoisted_4$
|
|
951
|
+
createElementVNode("div", _hoisted_3$6, toDisplayString(h.label), 1),
|
|
952
|
+
createElementVNode("div", _hoisted_4$5, toDisplayString(h.description), 1)
|
|
953
953
|
]),
|
|
954
954
|
_: 2
|
|
955
955
|
}, 1032, ["class", "onClick"]);
|
|
956
956
|
}), 128))
|
|
957
957
|
])) : createCommentVNode("", !0),
|
|
958
|
-
((v = e.modelValue) == null ? void 0 : v.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(
|
|
958
|
+
((v = e.modelValue) == null ? void 0 : v.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(d, {
|
|
959
959
|
key: 1,
|
|
960
960
|
text: "Rock paper scissors is only available for POS >= 7.7.4 with dual screen on android devices (Sunmi D3 Pro and Sunmi T3 Pro)",
|
|
961
961
|
state: "warning"
|
|
@@ -963,7 +963,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
963
963
|
]);
|
|
964
964
|
};
|
|
965
965
|
}
|
|
966
|
-
}), _hoisted_1$8 = { class: "space-y-16" }, _hoisted_2$5 = { class: "grid grid-cols-2 gap-16" },
|
|
966
|
+
}), _hoisted_1$8 = { class: "space-y-16" }, _hoisted_2$7 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1), _hoisted_3$5 = { class: "grid grid-cols-2 gap-16" }, _hoisted_4$4 = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
967
967
|
__name: "MissionTypeInput",
|
|
968
968
|
props: {
|
|
969
969
|
modelValue: {
|
|
@@ -971,8 +971,8 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
971
971
|
}
|
|
972
972
|
},
|
|
973
973
|
emits: ["update:model-value"],
|
|
974
|
-
setup(e, { emit:
|
|
975
|
-
const a = e,
|
|
974
|
+
setup(e, { emit: c }) {
|
|
975
|
+
const a = e, r = c, u = computed(() => [
|
|
976
976
|
{
|
|
977
977
|
label: "Stamp",
|
|
978
978
|
description: "Award stamps for purchases, redeemable after reaching set milestones.",
|
|
@@ -984,11 +984,11 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
984
984
|
value: F_MISSION_TYPE.enum.PROGRESSIVE
|
|
985
985
|
}
|
|
986
986
|
]);
|
|
987
|
-
return (
|
|
987
|
+
return (s, o) => {
|
|
988
988
|
const l = resolveComponent("FmCard");
|
|
989
989
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
990
|
-
|
|
991
|
-
createElementVNode("div",
|
|
990
|
+
_hoisted_2$7,
|
|
991
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
992
992
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(l, {
|
|
993
993
|
variant: "outlined",
|
|
994
994
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
@@ -997,13 +997,13 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
997
997
|
"hover:bg-fm-color-opacity-sm": e.modelValue != n.value
|
|
998
998
|
}]),
|
|
999
999
|
onClick: () => {
|
|
1000
|
-
a.modelValue != n.value &&
|
|
1000
|
+
a.modelValue != n.value && r("update:model-value", n.value);
|
|
1001
1001
|
},
|
|
1002
1002
|
key: n.value
|
|
1003
1003
|
}, {
|
|
1004
1004
|
default: withCtx(() => [
|
|
1005
|
-
createElementVNode("div",
|
|
1006
|
-
createElementVNode("div",
|
|
1005
|
+
createElementVNode("div", _hoisted_4$4, toDisplayString(n.label), 1),
|
|
1006
|
+
createElementVNode("div", _hoisted_5$3, toDisplayString(n.description), 1)
|
|
1007
1007
|
]),
|
|
1008
1008
|
_: 2
|
|
1009
1009
|
}, 1032, ["class", "onClick"]))), 128))
|
|
@@ -1011,7 +1011,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1011
1011
|
]);
|
|
1012
1012
|
};
|
|
1013
1013
|
}
|
|
1014
|
-
}), _hoisted_1$7 = { class: "space-y-16" }, _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1014
|
+
}), _hoisted_1$7 = { class: "space-y-16" }, _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Input the total number of stamps needed to complete the mission ", -1), _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1015
1015
|
__name: "MissionEndInput",
|
|
1016
1016
|
props: {
|
|
1017
1017
|
modelValue: {
|
|
@@ -1025,13 +1025,13 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1025
1025
|
}
|
|
1026
1026
|
},
|
|
1027
1027
|
emits: ["update:model-value"],
|
|
1028
|
-
setup(e, { emit:
|
|
1029
|
-
const a =
|
|
1030
|
-
return (
|
|
1031
|
-
const
|
|
1028
|
+
setup(e, { emit: c }) {
|
|
1029
|
+
const a = c;
|
|
1030
|
+
return (r, u) => {
|
|
1031
|
+
const s = resolveComponent("FmStepperField");
|
|
1032
1032
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1033
|
-
|
|
1034
|
-
createVNode(
|
|
1033
|
+
_hoisted_2$6,
|
|
1034
|
+
createVNode(s, {
|
|
1035
1035
|
label: "Maximum to collect",
|
|
1036
1036
|
"model-value": e.modelValue || null,
|
|
1037
1037
|
"onUpdate:modelValue": u[0] || (u[0] = (o) => a("update:model-value", o)),
|
|
@@ -1041,7 +1041,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1041
1041
|
]);
|
|
1042
1042
|
};
|
|
1043
1043
|
}
|
|
1044
|
-
}), _hoisted_1$6 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1044
|
+
}), _hoisted_1$6 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1), _hoisted_2$5 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1045
1045
|
__name: "EditMissionPoolSheet",
|
|
1046
1046
|
props: {
|
|
1047
1047
|
maxThreshold: {
|
|
@@ -1050,29 +1050,29 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1050
1050
|
}
|
|
1051
1051
|
},
|
|
1052
1052
|
emits: ["update:model-value"],
|
|
1053
|
-
setup(e, { expose:
|
|
1054
|
-
const
|
|
1055
|
-
var
|
|
1056
|
-
return ((
|
|
1053
|
+
setup(e, { expose: c, emit: a }) {
|
|
1054
|
+
const r = e, u = useMembershipStore(), { minor: s } = useLoading, o = ref(!1), l = ref(), n = ref(), d = ref(0), g = computed(() => {
|
|
1055
|
+
var m;
|
|
1056
|
+
return ((m = u.loyaltyRewards.items.find(
|
|
1057
1057
|
(b) => {
|
|
1058
1058
|
var x;
|
|
1059
1059
|
return b.value === ((x = l.value) == null ? void 0 : x.collectible);
|
|
1060
1060
|
}
|
|
1061
|
-
)) == null ? void 0 :
|
|
1061
|
+
)) == null ? void 0 : m.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
|
|
1062
1062
|
}), y = computed(() => {
|
|
1063
|
-
const
|
|
1064
|
-
return
|
|
1063
|
+
const f = g.value.safeParse(l.value);
|
|
1064
|
+
return f.success ? [] : f.error.errors;
|
|
1065
1065
|
});
|
|
1066
|
-
function v(
|
|
1067
|
-
|
|
1066
|
+
function v(f, m, b) {
|
|
1067
|
+
f && (l.value = m, d.value = b), o.value = f;
|
|
1068
1068
|
}
|
|
1069
1069
|
const h = a;
|
|
1070
|
-
async function
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1070
|
+
async function p() {
|
|
1071
|
+
const f = g.value.safeParse(l.value);
|
|
1072
|
+
f.success && (await s(
|
|
1073
1073
|
async () => {
|
|
1074
|
-
|
|
1075
|
-
|
|
1074
|
+
f.data.type === "VOUCHER" && n.value && (f.data.collectibleConfig.image = await firebaseStorage.update(
|
|
1075
|
+
f.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
|
|
1076
1076
|
n.value
|
|
1077
1077
|
));
|
|
1078
1078
|
},
|
|
@@ -1080,40 +1080,40 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1080
1080
|
message: "Uploading reward image",
|
|
1081
1081
|
successMessage: "Reward image updated"
|
|
1082
1082
|
}
|
|
1083
|
-
), h("update:model-value",
|
|
1083
|
+
), h("update:model-value", f.data, d.value));
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1086
|
-
return
|
|
1085
|
+
const i = ref();
|
|
1086
|
+
return c({
|
|
1087
1087
|
showSheet: v
|
|
1088
|
-
}), (
|
|
1088
|
+
}), (f, m) => {
|
|
1089
1089
|
const b = resolveComponent("FmStepperField"), x = resolveComponent("FmSelect"), k = resolveComponent("FmForm"), C = resolveComponent("FmButton"), B = resolveComponent("FmSideSheet");
|
|
1090
1090
|
return openBlock(), createBlock(B, {
|
|
1091
1091
|
"max-width": 560,
|
|
1092
1092
|
modelValue: unref(o),
|
|
1093
1093
|
"onUpdate:modelValue": [
|
|
1094
|
-
|
|
1095
|
-
|
|
1094
|
+
m[10] || (m[10] = (V) => isRef(o) ? o.value = V : null),
|
|
1095
|
+
m[11] || (m[11] = (V) => o.value = V)
|
|
1096
1096
|
],
|
|
1097
1097
|
header: "Edit reward",
|
|
1098
1098
|
"dismiss-away": ""
|
|
1099
1099
|
}, {
|
|
1100
1100
|
"side-sheet-footer": withCtx(() => [
|
|
1101
|
-
createElementVNode("div",
|
|
1101
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
1102
1102
|
createVNode(C, {
|
|
1103
1103
|
variant: "primary",
|
|
1104
1104
|
type: "button",
|
|
1105
1105
|
label: "Confirm",
|
|
1106
1106
|
disabled: unref(y).length > 0,
|
|
1107
|
-
onClick:
|
|
1107
|
+
onClick: m[8] || (m[8] = async () => {
|
|
1108
1108
|
var V;
|
|
1109
|
-
return (V = unref(
|
|
1109
|
+
return (V = unref(i)) == null ? void 0 : V.validateInputs();
|
|
1110
1110
|
})
|
|
1111
1111
|
}, null, 8, ["disabled"]),
|
|
1112
1112
|
createVNode(C, {
|
|
1113
1113
|
variant: "secondary",
|
|
1114
1114
|
type: "button",
|
|
1115
1115
|
label: "Cancel",
|
|
1116
|
-
onClick:
|
|
1116
|
+
onClick: m[9] || (m[9] = (V) => o.value = !1)
|
|
1117
1117
|
})
|
|
1118
1118
|
])
|
|
1119
1119
|
]),
|
|
@@ -1123,8 +1123,8 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1123
1123
|
key: 0,
|
|
1124
1124
|
class: "flex flex-col gap-y-24",
|
|
1125
1125
|
ref_key: "formRef",
|
|
1126
|
-
ref:
|
|
1127
|
-
onValidationSuccess:
|
|
1126
|
+
ref: i,
|
|
1127
|
+
onValidationSuccess: m[7] || (m[7] = (V) => p())
|
|
1128
1128
|
}, {
|
|
1129
1129
|
default: withCtx(() => {
|
|
1130
1130
|
var V, R;
|
|
@@ -1135,13 +1135,13 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1135
1135
|
rules: [
|
|
1136
1136
|
unref(ZodHelper).toRule(
|
|
1137
1137
|
unref(z).number().min(1).max(
|
|
1138
|
-
|
|
1139
|
-
`Number cannot be more than ${
|
|
1138
|
+
r.maxThreshold,
|
|
1139
|
+
`Number cannot be more than ${r.maxThreshold}`
|
|
1140
1140
|
)
|
|
1141
1141
|
)
|
|
1142
1142
|
],
|
|
1143
1143
|
"model-value": unref(l).threshold,
|
|
1144
|
-
"onUpdate:modelValue":
|
|
1144
|
+
"onUpdate:modelValue": m[0] || (m[0] = (E) => l.value = {
|
|
1145
1145
|
...unref(l),
|
|
1146
1146
|
threshold: E
|
|
1147
1147
|
})
|
|
@@ -1153,8 +1153,8 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1153
1153
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
1154
1154
|
],
|
|
1155
1155
|
"model-value": unref(l).type,
|
|
1156
|
-
"onUpdate:modelValue":
|
|
1157
|
-
var S,
|
|
1156
|
+
"onUpdate:modelValue": m[1] || (m[1] = (E) => {
|
|
1157
|
+
var S, $;
|
|
1158
1158
|
E === "VOUCHER" ? l.value = {
|
|
1159
1159
|
collectible: null,
|
|
1160
1160
|
type: "VOUCHER",
|
|
@@ -1179,7 +1179,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1179
1179
|
validityOption: {
|
|
1180
1180
|
validForDay: 7
|
|
1181
1181
|
},
|
|
1182
|
-
threshold: (
|
|
1182
|
+
threshold: ($ = unref(l)) == null ? void 0 : $.threshold
|
|
1183
1183
|
};
|
|
1184
1184
|
})
|
|
1185
1185
|
}, null, 8, ["model-value"]),
|
|
@@ -1189,10 +1189,10 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1189
1189
|
rules: [unref(ZodHelper).ruleAtPath(unref(g), "collectible", [unref(l).type])],
|
|
1190
1190
|
items: unref(u).loyaltyRewards.items,
|
|
1191
1191
|
"model-value": unref(l).collectible,
|
|
1192
|
-
"onUpdate:modelValue":
|
|
1192
|
+
"onUpdate:modelValue": m[2] || (m[2] = (E) => unref(l).collectible = E)
|
|
1193
1193
|
}, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
|
|
1194
1194
|
unref(l).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1195
|
-
|
|
1195
|
+
_hoisted_1$6,
|
|
1196
1196
|
createVNode(_sfc_main$l, {
|
|
1197
1197
|
class: "mt-[-8px]",
|
|
1198
1198
|
rules: [unref(ZodHelper).ruleAtPath(unref(g), "earningOption", [unref(l).type])],
|
|
@@ -1200,7 +1200,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1200
1200
|
"error-text": unref(ZodHelper).helperText(unref(y), "earningOption"),
|
|
1201
1201
|
"fixed-type": !0,
|
|
1202
1202
|
"model-value": unref(l).earningOption,
|
|
1203
|
-
"onUpdate:modelValue":
|
|
1203
|
+
"onUpdate:modelValue": m[3] || (m[3] = (E) => l.value = {
|
|
1204
1204
|
...unref(l),
|
|
1205
1205
|
earningOption: E
|
|
1206
1206
|
})
|
|
@@ -1216,7 +1216,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1216
1216
|
)) == null ? void 0 : V.raw.type) === "CREDIT",
|
|
1217
1217
|
rules: [unref(ZodHelper).ruleAtPath(unref(g), "validityOption", [unref(l).type])],
|
|
1218
1218
|
"model-value": unref(l).validityOption,
|
|
1219
|
-
"onUpdate:modelValue":
|
|
1219
|
+
"onUpdate:modelValue": m[4] || (m[4] = (E) => l.value = {
|
|
1220
1220
|
...unref(l),
|
|
1221
1221
|
validityOption: E
|
|
1222
1222
|
})
|
|
@@ -1226,11 +1226,11 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1226
1226
|
key: 3,
|
|
1227
1227
|
"reward-image": unref(n),
|
|
1228
1228
|
"model-value": ((R = unref(l)) == null ? void 0 : R.collectibleConfig) ?? void 0,
|
|
1229
|
-
"onUpdate:modelValue":
|
|
1229
|
+
"onUpdate:modelValue": m[5] || (m[5] = (E) => l.value = {
|
|
1230
1230
|
...unref(l),
|
|
1231
1231
|
collectibleConfig: E
|
|
1232
1232
|
}),
|
|
1233
|
-
"onUpdate:rewardImage":
|
|
1233
|
+
"onUpdate:rewardImage": m[6] || (m[6] = (E) => n.value = E)
|
|
1234
1234
|
}, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
|
|
1235
1235
|
createVNode(JsonViewer, { json: unref(y) }, null, 8, ["json"])
|
|
1236
1236
|
];
|
|
@@ -1245,7 +1245,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1245
1245
|
}), _hoisted_1$5 = {
|
|
1246
1246
|
key: 0,
|
|
1247
1247
|
class: "grid grid-cols-5 text-center gap-8 justify-between items-center w-full"
|
|
1248
|
-
}, _hoisted_2$4 = { class: "flex flex-col gap-0 items-center justify-center" }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1248
|
+
}, _hoisted_2$4 = { class: "flex flex-col gap-0 items-center justify-center" }, _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", null, "🎁", -1), _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1249
1249
|
__name: "MissionProgress",
|
|
1250
1250
|
props: {
|
|
1251
1251
|
type: {
|
|
@@ -1266,17 +1266,17 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1266
1266
|
}
|
|
1267
1267
|
},
|
|
1268
1268
|
setup(e) {
|
|
1269
|
-
const
|
|
1270
|
-
() => Math.min(
|
|
1269
|
+
const c = e, { maxRange: a, currentRange: r, markers: u } = toRefs(c), s = computed(
|
|
1270
|
+
() => Math.min(r.value / a.value * 100, 100)
|
|
1271
1271
|
), o = (l) => l / a.value * 100;
|
|
1272
1272
|
return (l, n) => {
|
|
1273
|
-
const
|
|
1273
|
+
const d = resolveComponent("FmIcon");
|
|
1274
1274
|
return e.type === "STAMP" ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
1275
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(a), 40), (g) => (openBlock(), createBlock(
|
|
1275
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(a), 40), (g) => (openBlock(), createBlock(d, {
|
|
1276
1276
|
class: normalizeClass(
|
|
1277
|
-
unref(
|
|
1277
|
+
unref(r) >= g ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
|
|
1278
1278
|
),
|
|
1279
|
-
outline: unref(
|
|
1279
|
+
outline: unref(r) < g,
|
|
1280
1280
|
key: g,
|
|
1281
1281
|
name: unref(u).some((y) => y === g) ? "featured_seasonal_and_gifts" : "check_circle"
|
|
1282
1282
|
}, null, 8, ["class", "outline", "name"]))), 128))
|
|
@@ -1286,7 +1286,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1286
1286
|
}, [
|
|
1287
1287
|
createElementVNode("div", {
|
|
1288
1288
|
class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
|
|
1289
|
-
style: normalizeStyle({ width: unref(
|
|
1289
|
+
style: normalizeStyle({ width: unref(s) + "%" })
|
|
1290
1290
|
}, null, 4),
|
|
1291
1291
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (g, y) => (openBlock(), createElementBlock("div", {
|
|
1292
1292
|
key: y,
|
|
@@ -1297,7 +1297,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1297
1297
|
createElementVNode("div", {
|
|
1298
1298
|
class: normalizeClass(["h-16 w-[2px]", "bg-fm-color-system-warning-300"])
|
|
1299
1299
|
}),
|
|
1300
|
-
|
|
1300
|
+
_hoisted_3$4
|
|
1301
1301
|
])
|
|
1302
1302
|
], 4))), 128))
|
|
1303
1303
|
]));
|
|
@@ -1305,19 +1305,19 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1305
1305
|
}
|
|
1306
1306
|
}), isObject = (e) => e !== null && typeof e == "object";
|
|
1307
1307
|
function changeKeysFactory(e) {
|
|
1308
|
-
return function
|
|
1309
|
-
if (
|
|
1308
|
+
return function c(a, r = 1, u) {
|
|
1309
|
+
if (r === 0 || !isObject(a))
|
|
1310
1310
|
return a;
|
|
1311
1311
|
if (Array.isArray(a))
|
|
1312
|
-
return a.map((o) =>
|
|
1313
|
-
const
|
|
1312
|
+
return a.map((o) => c(o, r - 1, u));
|
|
1313
|
+
const s = Object.create(Object.getPrototypeOf(a));
|
|
1314
1314
|
return Object.keys(a).forEach((o) => {
|
|
1315
|
-
const l = a[o], n = e(o, u),
|
|
1316
|
-
|
|
1317
|
-
}),
|
|
1315
|
+
const l = a[o], n = e(o, u), d = c(l, r - 1, u);
|
|
1316
|
+
s[n] = d;
|
|
1317
|
+
}), s;
|
|
1318
1318
|
};
|
|
1319
1319
|
}
|
|
1320
|
-
const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_3$3 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1320
|
+
const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type given to your customer. ", -1), _hoisted_3$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$3 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_5$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Mission Preview", -1), _hoisted_6$2 = { class: "flex items-center gap-4" }, _hoisted_7$2 = { class: "fm-typo-en-body-lg-600" }, _hoisted_8$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Earn a stamp! ", -1), _hoisted_9$2 = { class: "flex items-center gap-16" }, _hoisted_10$2 = { key: 0 }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1321
1321
|
__name: "MissionPoolInput",
|
|
1322
1322
|
props: {
|
|
1323
1323
|
modelValue: {
|
|
@@ -1330,39 +1330,39 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1330
1330
|
}
|
|
1331
1331
|
},
|
|
1332
1332
|
emits: ["update:model-value"],
|
|
1333
|
-
setup(e, { emit:
|
|
1334
|
-
const a = e,
|
|
1335
|
-
() => a.modelValue.sort((
|
|
1333
|
+
setup(e, { emit: c }) {
|
|
1334
|
+
const a = e, r = c, u = useMembershipStore(), s = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), o = computed(
|
|
1335
|
+
() => a.modelValue.sort((i, f) => i.threshold - f.threshold) ?? []
|
|
1336
1336
|
), l = computed(() => {
|
|
1337
|
-
const
|
|
1338
|
-
return
|
|
1337
|
+
const i = s.safeParse(o.value);
|
|
1338
|
+
return i.success ? [] : i.error.errors;
|
|
1339
1339
|
}), n = ref();
|
|
1340
|
-
function
|
|
1340
|
+
function d(i, f) {
|
|
1341
1341
|
var b;
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1342
|
+
const m = [...o.value];
|
|
1343
|
+
m[f] = i, (b = n.value) == null || b.showSheet(!1), r("update:model-value", m);
|
|
1344
1344
|
}
|
|
1345
|
-
function g(
|
|
1346
|
-
const
|
|
1347
|
-
(b) => b._id.toString() ==
|
|
1348
|
-
),
|
|
1345
|
+
function g(i) {
|
|
1346
|
+
const f = i.type == "VOUCHER" ? i.collectibleConfig : u.collectibles.find(
|
|
1347
|
+
(b) => b._id.toString() == i.collectible
|
|
1348
|
+
), m = CollectionUtils.formattedType((f == null ? void 0 : f.name) || "");
|
|
1349
1349
|
return {
|
|
1350
|
-
label: isNullOrEmpty(
|
|
1351
|
-
sublabel: `Reward at ${
|
|
1350
|
+
label: isNullOrEmpty(m) ? "NO REWARD" : m,
|
|
1351
|
+
sublabel: `Reward at ${i.threshold} | Amount: ${i.earningOption.type == "FIXED" ? i.earningOption.amount : `${i.earningOption.amount} for every RM${i.earningOption.every} spent`} `
|
|
1352
1352
|
};
|
|
1353
1353
|
}
|
|
1354
|
-
function y(
|
|
1355
|
-
var
|
|
1356
|
-
const
|
|
1357
|
-
(
|
|
1354
|
+
function y(i) {
|
|
1355
|
+
var m;
|
|
1356
|
+
const f = [...o.value];
|
|
1357
|
+
(m = n.value) == null || m.showSheet(!0, f[i], i);
|
|
1358
1358
|
}
|
|
1359
|
-
function v(
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1359
|
+
function v(i) {
|
|
1360
|
+
const f = [...o.value];
|
|
1361
|
+
f.splice(i, 1), r("update:model-value", f);
|
|
1362
1362
|
}
|
|
1363
1363
|
function h() {
|
|
1364
|
-
var
|
|
1365
|
-
(
|
|
1364
|
+
var i;
|
|
1365
|
+
(i = n.value) == null || i.showSheet(
|
|
1366
1366
|
!0,
|
|
1367
1367
|
{
|
|
1368
1368
|
type: "LOYALTY",
|
|
@@ -1379,21 +1379,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1379
1379
|
o.value.length
|
|
1380
1380
|
);
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1383
|
-
var
|
|
1384
|
-
return
|
|
1385
|
-
((
|
|
1386
|
-
(b) => b.value ==
|
|
1387
|
-
)) == null ? void 0 :
|
|
1382
|
+
function p(i) {
|
|
1383
|
+
var f, m;
|
|
1384
|
+
return i.type == "VOUCHER" ? (f = i.collectibleConfig) == null ? void 0 : f.name : sentenceCase(
|
|
1385
|
+
((m = u.loyaltyRewards.items.find(
|
|
1386
|
+
(b) => b.value == i.collectible
|
|
1387
|
+
)) == null ? void 0 : m.label) || ""
|
|
1388
1388
|
);
|
|
1389
1389
|
}
|
|
1390
|
-
return (
|
|
1391
|
-
const
|
|
1390
|
+
return (i, f) => {
|
|
1391
|
+
const m = resolveComponent("FmButton"), b = resolveComponent("FmCard"), x = resolveComponent("FmHelperText");
|
|
1392
1392
|
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
1393
|
-
|
|
1394
|
-
createVNode(
|
|
1393
|
+
_hoisted_2$3,
|
|
1394
|
+
createVNode(m, {
|
|
1395
1395
|
label: "Add Reward",
|
|
1396
|
-
onClick:
|
|
1396
|
+
onClick: f[0] || (f[0] = (k) => h()),
|
|
1397
1397
|
variant: "plain",
|
|
1398
1398
|
icon: "add"
|
|
1399
1399
|
}),
|
|
@@ -1405,10 +1405,10 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1405
1405
|
}, {
|
|
1406
1406
|
default: withCtx(() => [
|
|
1407
1407
|
createElementVNode("div", null, [
|
|
1408
|
-
createElementVNode("div",
|
|
1409
|
-
createElementVNode("div",
|
|
1408
|
+
createElementVNode("div", _hoisted_3$3, toDisplayString(g(k).label), 1),
|
|
1409
|
+
createElementVNode("div", _hoisted_4$3, toDisplayString(g(k).sublabel), 1)
|
|
1410
1410
|
]),
|
|
1411
|
-
createVNode(
|
|
1411
|
+
createVNode(m, {
|
|
1412
1412
|
icon: "delete",
|
|
1413
1413
|
variant: "tertiary",
|
|
1414
1414
|
onClick: (B) => (B.stopPropagation(), v(C))
|
|
@@ -1421,7 +1421,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1421
1421
|
text: k.message,
|
|
1422
1422
|
state: "error"
|
|
1423
1423
|
}, null, 8, ["text"]))), 128)),
|
|
1424
|
-
|
|
1424
|
+
_hoisted_5$2,
|
|
1425
1425
|
(openBlock(), createBlock(b, {
|
|
1426
1426
|
key: 0,
|
|
1427
1427
|
variant: "outlined",
|
|
@@ -1430,20 +1430,20 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1430
1430
|
default: withCtx(() => {
|
|
1431
1431
|
var k, C;
|
|
1432
1432
|
return [
|
|
1433
|
-
createElementVNode("div",
|
|
1433
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
1434
1434
|
createElementVNode("div", null, [
|
|
1435
|
-
createElementVNode("div",
|
|
1436
|
-
|
|
1435
|
+
createElementVNode("div", _hoisted_7$2, " Collect " + toDisplayString(e.mission.end) + " stamps to get " + toDisplayString(((k = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : k.earningOption.amount) > 1 ? (C = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : C.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? p(e.modelValue[e.modelValue.length - 1]) : ""), 1),
|
|
1436
|
+
_hoisted_8$2
|
|
1437
1437
|
])
|
|
1438
1438
|
]),
|
|
1439
|
-
createElementVNode("div",
|
|
1439
|
+
createElementVNode("div", _hoisted_9$2, [
|
|
1440
1440
|
createVNode(_sfc_main$5, {
|
|
1441
1441
|
type: e.mission.type,
|
|
1442
1442
|
"max-range": e.mission.end,
|
|
1443
1443
|
currentRange: e.mission.end / 4,
|
|
1444
1444
|
markers: e.modelValue.map((B) => B.threshold)
|
|
1445
1445
|
}, null, 8, ["type", "max-range", "currentRange", "markers"]),
|
|
1446
|
-
e.mission.type == "PROGRESSIVE" ? (openBlock(), createElementBlock("div",
|
|
1446
|
+
e.mission.type == "PROGRESSIVE" ? (openBlock(), createElementBlock("div", _hoisted_10$2, " 0/" + toDisplayString(e.mission.end.toLocaleString()), 1)) : createCommentVNode("", !0)
|
|
1447
1447
|
])
|
|
1448
1448
|
];
|
|
1449
1449
|
}),
|
|
@@ -1452,20 +1452,20 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1452
1452
|
createVNode(_sfc_main$6, {
|
|
1453
1453
|
ref_key: "sheetRef",
|
|
1454
1454
|
ref: n,
|
|
1455
|
-
"onUpdate:modelValue":
|
|
1455
|
+
"onUpdate:modelValue": d,
|
|
1456
1456
|
"max-threshold": e.mission.end
|
|
1457
1457
|
}, null, 8, ["max-threshold"])
|
|
1458
1458
|
]);
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
}), _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = { class: "space-y-8" }, _hoisted_3$2 = { class: "grid grid-cols-2 gap-16" },
|
|
1461
|
+
}), _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = { class: "space-y-8" }, _hoisted_3$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Mission Type", -1), _hoisted_4$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1), _hoisted_5$1 = { class: "grid grid-cols-2 gap-16" }, _hoisted_6$1 = { class: "fm-typo-en-title-sm-800" }, _hoisted_7$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_8$1 = { class: "space-y-8" }, _hoisted_9$1 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Collections required", -1), _hoisted_10$1 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Input the total number of stamps needed to complete the mission ", -1), _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1462
1462
|
__name: "MissionInput",
|
|
1463
1463
|
props: {
|
|
1464
1464
|
modelValue: Object
|
|
1465
1465
|
},
|
|
1466
1466
|
emits: ["update:model-value"],
|
|
1467
|
-
setup(e, { emit:
|
|
1468
|
-
const a = e,
|
|
1467
|
+
setup(e, { emit: c }) {
|
|
1468
|
+
const a = e, r = computed(() => {
|
|
1469
1469
|
const o = FdoMission.safeParse(a.modelValue);
|
|
1470
1470
|
return o.success ? [] : o.error.errors;
|
|
1471
1471
|
}), u = computed(() => [
|
|
@@ -1479,15 +1479,15 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1479
1479
|
description: "Reward customers when they reach a cumulative spending goal.",
|
|
1480
1480
|
value: F_MISSION_TYPE.enum.PROGRESSIVE
|
|
1481
1481
|
}
|
|
1482
|
-
]),
|
|
1482
|
+
]), s = c;
|
|
1483
1483
|
return (o, l) => {
|
|
1484
1484
|
var g;
|
|
1485
|
-
const n = resolveComponent("FmCard"),
|
|
1485
|
+
const n = resolveComponent("FmCard"), d = resolveComponent("FmStepperField");
|
|
1486
1486
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1487
1487
|
createElementVNode("div", _hoisted_2$2, [
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
createElementVNode("div",
|
|
1488
|
+
_hoisted_3$2,
|
|
1489
|
+
_hoisted_4$2,
|
|
1490
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
1491
1491
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (y) => {
|
|
1492
1492
|
var v, h;
|
|
1493
1493
|
return openBlock(), createBlock(n, {
|
|
@@ -1498,40 +1498,40 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1498
1498
|
"hover:bg-fm-color-opacity-sm": ((h = e.modelValue) == null ? void 0 : h.type) != y.value
|
|
1499
1499
|
}]),
|
|
1500
1500
|
onClick: () => {
|
|
1501
|
-
var
|
|
1502
|
-
((
|
|
1501
|
+
var p, i;
|
|
1502
|
+
((p = e.modelValue) == null ? void 0 : p.type) != y.value && s("update:model-value", {
|
|
1503
1503
|
...e.modelValue,
|
|
1504
1504
|
type: y.value,
|
|
1505
|
-
end: ((
|
|
1505
|
+
end: ((i = e.modelValue) == null ? void 0 : i.end) || 1
|
|
1506
1506
|
});
|
|
1507
1507
|
},
|
|
1508
1508
|
key: y.value
|
|
1509
1509
|
}, {
|
|
1510
1510
|
default: withCtx(() => [
|
|
1511
|
-
createElementVNode("div",
|
|
1512
|
-
createElementVNode("div",
|
|
1511
|
+
createElementVNode("div", _hoisted_6$1, toDisplayString(y.label), 1),
|
|
1512
|
+
createElementVNode("div", _hoisted_7$1, toDisplayString(y.description), 1)
|
|
1513
1513
|
]),
|
|
1514
1514
|
_: 2
|
|
1515
1515
|
}, 1032, ["class", "onClick"]);
|
|
1516
1516
|
}), 128))
|
|
1517
1517
|
])
|
|
1518
1518
|
]),
|
|
1519
|
-
createElementVNode("div",
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
createVNode(
|
|
1519
|
+
createElementVNode("div", _hoisted_8$1, [
|
|
1520
|
+
_hoisted_9$1,
|
|
1521
|
+
_hoisted_10$1,
|
|
1522
|
+
createVNode(d, {
|
|
1523
1523
|
label: "Maximum to collect",
|
|
1524
1524
|
"model-value": ((g = e.modelValue) == null ? void 0 : g.end) || null,
|
|
1525
1525
|
"onUpdate:modelValue": l[0] || (l[0] = (y) => {
|
|
1526
1526
|
var v;
|
|
1527
|
-
return
|
|
1527
|
+
return s("update:model-value", {
|
|
1528
1528
|
...e.modelValue,
|
|
1529
1529
|
type: ((v = e.modelValue) == null ? void 0 : v.type) || "STAMP",
|
|
1530
1530
|
end: y
|
|
1531
1531
|
});
|
|
1532
1532
|
}),
|
|
1533
|
-
"helper-text": unref(ZodHelper).helperText(unref(
|
|
1534
|
-
"helper-state": unref(ZodHelper).helperState(unref(
|
|
1533
|
+
"helper-text": unref(ZodHelper).helperText(unref(r), "end") || "Set the threshold required for reward eligibility",
|
|
1534
|
+
"helper-state": unref(ZodHelper).helperState(unref(r), "end") || "none"
|
|
1535
1535
|
}, null, 8, ["model-value", "helper-text", "helper-state"])
|
|
1536
1536
|
])
|
|
1537
1537
|
]);
|
|
@@ -1559,12 +1559,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1559
1559
|
}
|
|
1560
1560
|
},
|
|
1561
1561
|
emits: ["update:model-value", "update:file"],
|
|
1562
|
-
setup(e, { emit:
|
|
1563
|
-
const { t: a } = useI18n(),
|
|
1564
|
-
function
|
|
1565
|
-
switch (
|
|
1562
|
+
setup(e, { emit: c }) {
|
|
1563
|
+
const { t: a } = useI18n(), r = e, u = c;
|
|
1564
|
+
function s(d) {
|
|
1565
|
+
switch (r.field.type) {
|
|
1566
1566
|
case "timeframe":
|
|
1567
|
-
const g =
|
|
1567
|
+
const g = d.startDate ? hooks(d.startDate).startOf("day").toISOString() : void 0, y = d.endDate ? hooks(d.endDate).endOf("day").toISOString() : void 0;
|
|
1568
1568
|
u("update:model-value", {
|
|
1569
1569
|
type: "timeframe",
|
|
1570
1570
|
property: "__now",
|
|
@@ -1575,63 +1575,63 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1575
1575
|
case "image": {
|
|
1576
1576
|
u(
|
|
1577
1577
|
"update:file",
|
|
1578
|
-
|
|
1579
|
-
o.value || firebaseStorage.collectibleImagePath(void 0,
|
|
1578
|
+
d,
|
|
1579
|
+
o.value || firebaseStorage.collectibleImagePath(void 0, d)
|
|
1580
1580
|
);
|
|
1581
1581
|
break;
|
|
1582
1582
|
}
|
|
1583
1583
|
default:
|
|
1584
|
-
u("update:model-value",
|
|
1584
|
+
u("update:model-value", d);
|
|
1585
1585
|
break;
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
1588
1588
|
const o = computed(() => {
|
|
1589
|
-
switch (
|
|
1589
|
+
switch (r.field.type) {
|
|
1590
1590
|
case "timeframe": {
|
|
1591
|
-
const
|
|
1591
|
+
const d = r.modelValue;
|
|
1592
1592
|
return {
|
|
1593
|
-
startDate:
|
|
1594
|
-
endDate:
|
|
1593
|
+
startDate: d != null && d.start ? hooks(d == null ? void 0 : d.start).format("YYYY-MM-DD") : null,
|
|
1594
|
+
endDate: d != null && d.end ? hooks(d == null ? void 0 : d.end).format("YYYY-MM-DD") : null
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
1597
|
default:
|
|
1598
|
-
return
|
|
1598
|
+
return r.modelValue;
|
|
1599
1599
|
}
|
|
1600
1600
|
});
|
|
1601
1601
|
function l() {
|
|
1602
1602
|
if (!n.value.schema) return [];
|
|
1603
|
-
const
|
|
1604
|
-
return
|
|
1603
|
+
const d = n.value.schema.safeParse(r.modelValue);
|
|
1604
|
+
return d.success ? [] : d.error.errors;
|
|
1605
1605
|
}
|
|
1606
1606
|
const n = computed(() => ({
|
|
1607
|
-
schema:
|
|
1608
|
-
unwrapped:
|
|
1609
|
-
rules:
|
|
1610
|
-
labelMark:
|
|
1611
|
-
zodLabel:
|
|
1607
|
+
schema: r.schema,
|
|
1608
|
+
unwrapped: r.schema ? ZodHelper.unwrap(r.schema) : void 0,
|
|
1609
|
+
rules: r.schema ? [ZodHelper.ruleAtPath(r.schema, "")] : void 0,
|
|
1610
|
+
labelMark: r.schema && ZodHelper.isRequired(r.schema) == !1 ? "optional" : void 0,
|
|
1611
|
+
zodLabel: r.schema ? ZodHelper.toInputLabel(r.schema, r.field.label) : void 0
|
|
1612
1612
|
}));
|
|
1613
|
-
return (
|
|
1614
|
-
var
|
|
1615
|
-
const y = resolveComponent("FmTextField"), v = resolveComponent("FmStepperField"), h = resolveComponent("FmTextarea"),
|
|
1613
|
+
return (d, g) => {
|
|
1614
|
+
var f, m, b, x, k;
|
|
1615
|
+
const y = resolveComponent("FmTextField"), v = resolveComponent("FmStepperField"), h = resolveComponent("FmTextarea"), p = resolveComponent("FmHelperText"), i = resolveComponent("FmSwitch");
|
|
1616
1616
|
return e.field.type === "text" ? (openBlock(), createBlock(y, {
|
|
1617
1617
|
key: 0,
|
|
1618
1618
|
label: unref(a)(e.field.label),
|
|
1619
1619
|
"label-mark": unref(n).labelMark,
|
|
1620
1620
|
rules: unref(n).rules,
|
|
1621
1621
|
"model-value": unref(o),
|
|
1622
|
-
"onUpdate:modelValue":
|
|
1622
|
+
"onUpdate:modelValue": s,
|
|
1623
1623
|
"helper-state": e.helperText ? "error" : void 0,
|
|
1624
1624
|
"helper-text": e.helperText
|
|
1625
1625
|
}, null, 8, ["label", "label-mark", "rules", "model-value", "helper-state", "helper-text"])) : e.field.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1626
1626
|
createVNode(JsonViewer, {
|
|
1627
|
-
json: { schema: unref(n).unwrapped, props:
|
|
1627
|
+
json: { schema: unref(n).unwrapped, props: r }
|
|
1628
1628
|
}, null, 8, ["json"]),
|
|
1629
1629
|
createVNode(v, {
|
|
1630
1630
|
label: unref(a)(e.field.label),
|
|
1631
1631
|
"label-mark": e.field.isRuleChildren ? void 0 : unref(n).labelMark,
|
|
1632
1632
|
"model-value": unref(o),
|
|
1633
1633
|
rules: e.field.isRuleChildren ? [] : unref(n).rules,
|
|
1634
|
-
"onUpdate:modelValue":
|
|
1634
|
+
"onUpdate:modelValue": s,
|
|
1635
1635
|
"helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
|
|
1636
1636
|
"helper-text": e.field.isRuleChildren ? e.helperText : void 0
|
|
1637
1637
|
}, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
|
|
@@ -1641,21 +1641,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1641
1641
|
"label-mark": unref(n).labelMark,
|
|
1642
1642
|
rules: unref(n).rules,
|
|
1643
1643
|
"model-value": unref(o),
|
|
1644
|
-
"onUpdate:modelValue":
|
|
1644
|
+
"onUpdate:modelValue": s,
|
|
1645
1645
|
"show-word-count": "",
|
|
1646
|
-
"max-length": (k = (x = (b = (
|
|
1646
|
+
"max-length": (k = (x = (b = (m = (f = unref(n)) == null ? void 0 : f.unwrapped) == null ? void 0 : m._def) == null ? void 0 : b.checks) == null ? void 0 : x.find((C) => C.kind == "max")) == null ? void 0 : k.value
|
|
1647
1647
|
}, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$g, {
|
|
1648
1648
|
key: 3,
|
|
1649
1649
|
"campaign-type": e.extras,
|
|
1650
1650
|
"model-value": unref(o),
|
|
1651
1651
|
disabled: e.disabled,
|
|
1652
|
-
"onUpdate:modelValue":
|
|
1652
|
+
"onUpdate:modelValue": s
|
|
1653
1653
|
}, null, 8, ["campaign-type", "model-value", "disabled"])) : e.field.type === "timeframe" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
1654
1654
|
createVNode(_sfc_main$e, {
|
|
1655
1655
|
"model-value": unref(o),
|
|
1656
|
-
"onUpdate:modelValue":
|
|
1656
|
+
"onUpdate:modelValue": s
|
|
1657
1657
|
}, null, 8, ["model-value"]),
|
|
1658
|
-
createVNode(
|
|
1658
|
+
createVNode(p, {
|
|
1659
1659
|
class: "!mt-[8px]",
|
|
1660
1660
|
text: unref(ZodHelper).helperText(l(), ""),
|
|
1661
1661
|
state: unref(ZodHelper).helperState(l(), "")
|
|
@@ -1665,13 +1665,13 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1665
1665
|
thumbnail: unref(o),
|
|
1666
1666
|
"aspect-ratio": "16 / 9",
|
|
1667
1667
|
class: "w-1/2 xs:w-2/3",
|
|
1668
|
-
"onUpdate:file":
|
|
1668
|
+
"onUpdate:file": s
|
|
1669
1669
|
}, {
|
|
1670
1670
|
label: withCtx(() => [
|
|
1671
1671
|
(openBlock(), createBlock(resolveDynamicComponent(unref(n).zodLabel)))
|
|
1672
1672
|
]),
|
|
1673
1673
|
_: 1
|
|
1674
|
-
}, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(
|
|
1674
|
+
}, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(i, {
|
|
1675
1675
|
key: 6,
|
|
1676
1676
|
label: unref(a)(e.field.label),
|
|
1677
1677
|
"label-placement": "right",
|
|
@@ -1679,25 +1679,25 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1679
1679
|
"label-mark": unref(n).labelMark,
|
|
1680
1680
|
rules: unref(n).rules,
|
|
1681
1681
|
"model-value": unref(o),
|
|
1682
|
-
"onUpdate:modelValue":
|
|
1682
|
+
"onUpdate:modelValue": s
|
|
1683
1683
|
}, null, 8, ["label", "sublabel", "label-mark", "rules", "model-value"])) : e.field.type === "collectible_options" ? (openBlock(), createBlock(_sfc_main$p, {
|
|
1684
1684
|
key: 7,
|
|
1685
1685
|
"model-value": unref(o),
|
|
1686
|
-
"onUpdate:modelValue":
|
|
1686
|
+
"onUpdate:modelValue": s,
|
|
1687
1687
|
"no-campaign": !1,
|
|
1688
1688
|
schema: unref(n).schema,
|
|
1689
1689
|
"is-mission": e.extras === "MISSION"
|
|
1690
1690
|
}, null, 8, ["model-value", "schema", "is-mission"])) : e.field.type === "target_location" ? (openBlock(), createBlock(_sfc_main$q, {
|
|
1691
1691
|
key: 8,
|
|
1692
1692
|
"model-value": unref(o),
|
|
1693
|
-
"onUpdate:modelValue":
|
|
1693
|
+
"onUpdate:modelValue": s
|
|
1694
1694
|
}, null, 8, ["model-value"])) : e.field.type == "effect" ? (openBlock(), createElementBlock(Fragment, { key: 9 }, [
|
|
1695
1695
|
createVNode(_sfc_main$r, {
|
|
1696
1696
|
"model-value": unref(o),
|
|
1697
|
-
"onUpdate:modelValue":
|
|
1697
|
+
"onUpdate:modelValue": s,
|
|
1698
1698
|
"can-set-auto-apply": e.field.property == "campaign.effect"
|
|
1699
1699
|
}, null, 8, ["model-value", "can-set-auto-apply"]),
|
|
1700
|
-
unref(o) ? createCommentVNode("", !0) : (openBlock(), createBlock(
|
|
1700
|
+
unref(o) ? createCommentVNode("", !0) : (openBlock(), createBlock(p, {
|
|
1701
1701
|
key: 0,
|
|
1702
1702
|
class: "!mt-[8px]",
|
|
1703
1703
|
text: unref(a)("connect.campaign.common.effect_required"),
|
|
@@ -1707,57 +1707,57 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1707
1707
|
key: 10,
|
|
1708
1708
|
"allow-email": !0,
|
|
1709
1709
|
"model-value": unref(o),
|
|
1710
|
-
"onUpdate:modelValue":
|
|
1710
|
+
"onUpdate:modelValue": s,
|
|
1711
1711
|
"helper-text": unref(ZodHelper).helperText(l(), ""),
|
|
1712
1712
|
"trigger-type": e.field.extras,
|
|
1713
1713
|
"helper-state": unref(ZodHelper).helperState(l(), "")
|
|
1714
1714
|
}, null, 8, ["model-value", "helper-text", "trigger-type", "helper-state"])) : e.field.type === "earning_option" ? (openBlock(), createBlock(_sfc_main$l, {
|
|
1715
1715
|
key: 11,
|
|
1716
1716
|
"model-value": unref(o),
|
|
1717
|
-
"onUpdate:modelValue":
|
|
1717
|
+
"onUpdate:modelValue": s,
|
|
1718
1718
|
extras: e.extras,
|
|
1719
1719
|
"error-text": e.helperText
|
|
1720
1720
|
}, null, 8, ["model-value", "extras", "error-text"])) : e.field.type === "validity_option" ? (openBlock(), createBlock(_sfc_main$m, {
|
|
1721
1721
|
key: 12,
|
|
1722
1722
|
type: "custom",
|
|
1723
1723
|
"model-value": unref(o),
|
|
1724
|
-
"onUpdate:modelValue":
|
|
1724
|
+
"onUpdate:modelValue": s,
|
|
1725
1725
|
"helper-text": e.helperText || unref(ZodHelper).helperText(l(), "")
|
|
1726
1726
|
}, null, 8, ["model-value", "helper-text"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
1727
1727
|
key: 13,
|
|
1728
1728
|
"model-value": unref(o),
|
|
1729
|
-
"onUpdate:modelValue":
|
|
1729
|
+
"onUpdate:modelValue": s
|
|
1730
1730
|
}, null, 8, ["model-value"])) : e.field.type === "reward_pool" ? (openBlock(), createBlock(_sfc_main$a, {
|
|
1731
1731
|
key: 14,
|
|
1732
1732
|
"model-value": unref(o),
|
|
1733
|
-
"onUpdate:modelValue":
|
|
1733
|
+
"onUpdate:modelValue": s
|
|
1734
1734
|
}, null, 8, ["model-value"])) : e.field.type === "mission" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
1735
1735
|
key: 15,
|
|
1736
1736
|
"model-value": unref(o),
|
|
1737
|
-
"onUpdate:modelValue":
|
|
1737
|
+
"onUpdate:modelValue": s
|
|
1738
1738
|
}, null, 8, ["model-value"])) : e.field.type === "mission_type" ? (openBlock(), createBlock(_sfc_main$8, {
|
|
1739
1739
|
key: 16,
|
|
1740
1740
|
"model-value": unref(o),
|
|
1741
|
-
"onUpdate:modelValue":
|
|
1741
|
+
"onUpdate:modelValue": s
|
|
1742
1742
|
}, null, 8, ["model-value"])) : e.field.type === "mission_end" ? (openBlock(), createBlock(_sfc_main$7, {
|
|
1743
1743
|
key: 17,
|
|
1744
1744
|
"model-value": unref(o),
|
|
1745
|
-
"onUpdate:modelValue":
|
|
1745
|
+
"onUpdate:modelValue": s,
|
|
1746
1746
|
"helper-text": unref(ZodHelper).helperText(l(), ""),
|
|
1747
1747
|
"helper-state": unref(ZodHelper).helperState(l(), "")
|
|
1748
1748
|
}, null, 8, ["model-value", "helper-text", "helper-state"])) : e.field.type === "mission_pool" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
1749
1749
|
key: 18,
|
|
1750
1750
|
"model-value": unref(o),
|
|
1751
|
-
"onUpdate:modelValue":
|
|
1751
|
+
"onUpdate:modelValue": s,
|
|
1752
1752
|
mission: e.extras.mission
|
|
1753
1753
|
}, null, 8, ["model-value", "mission"])) : e.field.type === "rule_schedule" ? (openBlock(), createElementBlock(Fragment, { key: 19 }, [
|
|
1754
1754
|
createVNode(_sfc_main$d, {
|
|
1755
1755
|
"model-value": unref(o),
|
|
1756
|
-
"onUpdate:modelValue":
|
|
1756
|
+
"onUpdate:modelValue": s,
|
|
1757
1757
|
"start-date": e.extras.start,
|
|
1758
1758
|
"end-date": e.extras.end
|
|
1759
1759
|
}, null, 8, ["model-value", "start-date", "end-date"]),
|
|
1760
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1760
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1761
1761
|
key: 0,
|
|
1762
1762
|
class: "!mt-[8px]",
|
|
1763
1763
|
text: e.helperText,
|
|
@@ -1766,25 +1766,25 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1766
1766
|
], 64)) : e.field.type === "rule_user" ? (openBlock(), createElementBlock(Fragment, { key: 20 }, [
|
|
1767
1767
|
createVNode(_sfc_main$t, {
|
|
1768
1768
|
"model-value": unref(o),
|
|
1769
|
-
"onUpdate:modelValue":
|
|
1769
|
+
"onUpdate:modelValue": s
|
|
1770
1770
|
}, null, 8, ["model-value"]),
|
|
1771
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1771
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1772
1772
|
key: 0,
|
|
1773
1773
|
class: "!mt-[8px]",
|
|
1774
1774
|
text: e.helperText,
|
|
1775
1775
|
state: "error"
|
|
1776
1776
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1777
1777
|
], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 21 }, [
|
|
1778
|
-
e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(o).rules.g_time).length > 0 ? (openBlock(), createBlock(
|
|
1778
|
+
e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(o).rules.g_time).length > 0 ? (openBlock(), createBlock(p, {
|
|
1779
1779
|
key: 0,
|
|
1780
1780
|
state: "warning",
|
|
1781
1781
|
text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
|
|
1782
1782
|
}, null, 8, ["text"])) : createCommentVNode("", !0),
|
|
1783
1783
|
createVNode(_sfc_main$i, {
|
|
1784
1784
|
"model-value": unref(o),
|
|
1785
|
-
"onUpdate:modelValue":
|
|
1785
|
+
"onUpdate:modelValue": s
|
|
1786
1786
|
}, null, 8, ["model-value"]),
|
|
1787
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1787
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1788
1788
|
key: 1,
|
|
1789
1789
|
class: "!mt-[8px]",
|
|
1790
1790
|
text: e.helperText,
|
|
@@ -1793,9 +1793,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1793
1793
|
], 64)) : e.field.type === "rule_bill" ? (openBlock(), createElementBlock(Fragment, { key: 22 }, [
|
|
1794
1794
|
createVNode(_sfc_main$u, {
|
|
1795
1795
|
"model-value": unref(o),
|
|
1796
|
-
"onUpdate:modelValue":
|
|
1796
|
+
"onUpdate:modelValue": s
|
|
1797
1797
|
}, null, 8, ["model-value"]),
|
|
1798
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1798
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1799
1799
|
key: 0,
|
|
1800
1800
|
class: "!mt-[8px]",
|
|
1801
1801
|
text: e.helperText,
|
|
@@ -1804,9 +1804,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1804
1804
|
], 64)) : e.field.type === "rule_feedback" ? (openBlock(), createElementBlock(Fragment, { key: 23 }, [
|
|
1805
1805
|
createVNode(_sfc_main$v, {
|
|
1806
1806
|
"model-value": unref(o),
|
|
1807
|
-
"onUpdate:modelValue":
|
|
1807
|
+
"onUpdate:modelValue": s
|
|
1808
1808
|
}, null, 8, ["model-value"]),
|
|
1809
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1809
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1810
1810
|
key: 0,
|
|
1811
1811
|
class: "!mt-[8px]",
|
|
1812
1812
|
text: e.helperText,
|
|
@@ -1815,9 +1815,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1815
1815
|
], 64)) : e.field.type === "rule_birthday" ? (openBlock(), createElementBlock(Fragment, { key: 24 }, [
|
|
1816
1816
|
createVNode(_sfc_main$h, {
|
|
1817
1817
|
"model-value": unref(o),
|
|
1818
|
-
"onUpdate:modelValue":
|
|
1818
|
+
"onUpdate:modelValue": s
|
|
1819
1819
|
}, null, 8, ["model-value"]),
|
|
1820
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1820
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1821
1821
|
key: 0,
|
|
1822
1822
|
class: "!mt-[8px]",
|
|
1823
1823
|
text: e.helperText,
|
|
@@ -1826,18 +1826,18 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1826
1826
|
], 64)) : e.field.type === "promotion_game_type" ? (openBlock(), createElementBlock(Fragment, { key: 25 }, [
|
|
1827
1827
|
createVNode(_sfc_main$9, {
|
|
1828
1828
|
"model-value": unref(o),
|
|
1829
|
-
"onUpdate:modelValue":
|
|
1829
|
+
"onUpdate:modelValue": s
|
|
1830
1830
|
}, null, 8, ["model-value"]),
|
|
1831
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1831
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1832
1832
|
key: 0,
|
|
1833
1833
|
class: "!mt-[8px]",
|
|
1834
1834
|
text: e.helperText,
|
|
1835
1835
|
state: "error"
|
|
1836
1836
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1837
|
-
], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(
|
|
1837
|
+
], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(r.field), 1));
|
|
1838
1838
|
};
|
|
1839
1839
|
}
|
|
1840
|
-
}), _hoisted_1$1 = { class: "fm-typo-en-body-lg-600" }, _hoisted_2$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" },
|
|
1840
|
+
}), _hoisted_1$1 = { class: "fm-typo-en-body-lg-600" }, _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1), _hoisted_3$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_4$1 = { class: "fm-typo-en-body-lg-600" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1841
1841
|
__name: "CampaignSummary",
|
|
1842
1842
|
props: {
|
|
1843
1843
|
data: {
|
|
@@ -1846,23 +1846,23 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1846
1846
|
}
|
|
1847
1847
|
},
|
|
1848
1848
|
setup(e) {
|
|
1849
|
-
const { t:
|
|
1850
|
-
return (
|
|
1851
|
-
const
|
|
1852
|
-
return openBlock(), createBlock(
|
|
1849
|
+
const { t: c, te: a } = useI18n();
|
|
1850
|
+
return (r, u) => {
|
|
1851
|
+
const s = resolveComponent("FmCard");
|
|
1852
|
+
return openBlock(), createBlock(s, {
|
|
1853
1853
|
variant: "outlined",
|
|
1854
1854
|
class: "p-16 space-y-8"
|
|
1855
1855
|
}, {
|
|
1856
1856
|
default: withCtx(() => [
|
|
1857
|
-
createElementVNode("div", _hoisted_1$1, toDisplayString(unref(
|
|
1858
|
-
|
|
1857
|
+
createElementVNode("div", _hoisted_1$1, toDisplayString(unref(c)("connect.campaign.common.summary")), 1),
|
|
1858
|
+
_hoisted_2$1,
|
|
1859
1859
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (o, l) => (openBlock(), createElementBlock("div", {
|
|
1860
1860
|
class: "space-y-4",
|
|
1861
1861
|
key: l
|
|
1862
1862
|
}, [
|
|
1863
1863
|
o ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1864
|
-
createElementVNode("div",
|
|
1865
|
-
createElementVNode("div",
|
|
1864
|
+
createElementVNode("div", _hoisted_3$1, toDisplayString(unref(c)(`${l}`)), 1),
|
|
1865
|
+
createElementVNode("div", _hoisted_4$1, toDisplayString(unref(a)(`${o}`) ? unref(c)(`${o}`) : o), 1)
|
|
1866
1866
|
], 64)) : createCommentVNode("", !0)
|
|
1867
1867
|
]))), 128))
|
|
1868
1868
|
]),
|
|
@@ -1873,7 +1873,28 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1873
1873
|
}), _hoisted_1 = { class: "xs:hidden px-24 pb-[14px] pt-[22px] flex items-center justify-between w-full border-b" }, _hoisted_2 = { class: "flex items-center gap-8" }, _hoisted_3 = {
|
|
1874
1874
|
key: 0,
|
|
1875
1875
|
class: "max-w-6xl mx-auto"
|
|
1876
|
-
}, _hoisted_4 = { class: "hidden xs:flex gap-8 items-center w-full px-16 py-8 border-b border-fm-color-neutral-gray-100" }, _hoisted_5 = { class: "grid grid-cols-3 gap-40" }, _hoisted_6 = { class: "col-span-2 space-y-40 xs:col-span-3 xs:px-16 xs:pt-16" }, _hoisted_7 = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, _hoisted_8 = { class: "w-full flex items-center justify-end gap-8 pb-24" }, _hoisted_9 = { class: "max-w-6xl mx-auto rounded-md p-4 w-full" }, _hoisted_10 = { class: "animate-pulse flex space-x-4 pt-16" }, _hoisted_11 = { class: "grid grid-cols-3 w-full gap-40" },
|
|
1876
|
+
}, _hoisted_4 = { class: "hidden xs:flex gap-8 items-center w-full px-16 py-8 border-b border-fm-color-neutral-gray-100" }, _hoisted_5 = { class: "grid grid-cols-3 gap-40" }, _hoisted_6 = { class: "col-span-2 space-y-40 xs:col-span-3 xs:px-16 xs:pt-16" }, _hoisted_7 = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, _hoisted_8 = { class: "w-full flex items-center justify-end gap-8 pb-24" }, _hoisted_9 = { class: "max-w-6xl mx-auto rounded-md p-4 w-full" }, _hoisted_10 = { class: "animate-pulse flex space-x-4 pt-16" }, _hoisted_11 = { class: "grid grid-cols-3 w-full gap-40" }, _hoisted_12 = /* @__PURE__ */ createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
|
|
1877
|
+
/* @__PURE__ */ createElementVNode("div", { class: "flex-1 space-y-6 py-1" }, [
|
|
1878
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
|
|
1879
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
|
|
1880
|
+
/* @__PURE__ */ createElementVNode("div", { class: "space-y-3" }, [
|
|
1881
|
+
/* @__PURE__ */ createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
|
|
1882
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
|
|
1883
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
1884
|
+
]),
|
|
1885
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
1886
|
+
]),
|
|
1887
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
|
|
1888
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
|
|
1889
|
+
/* @__PURE__ */ createElementVNode("div", { class: "space-y-3" }, [
|
|
1890
|
+
/* @__PURE__ */ createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
|
|
1891
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
|
|
1892
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
1893
|
+
]),
|
|
1894
|
+
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
1895
|
+
])
|
|
1896
|
+
])
|
|
1897
|
+
], -1), _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1877
1898
|
__name: "EditCampaignSheet",
|
|
1878
1899
|
emits: ["submit:model-value"],
|
|
1879
1900
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -1881,7 +1902,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1881
1902
|
TEMPLATES.VOUCHER
|
|
1882
1903
|
), { minor } = useLoading, isLoading = ref(!1), sheetTitle = ref("Create Campaign");
|
|
1883
1904
|
async function showSheet(visible, type, campaign, selectedTemplate) {
|
|
1884
|
-
var e,
|
|
1905
|
+
var e, c;
|
|
1885
1906
|
if (sheetVisible.value = visible, visible == !0) {
|
|
1886
1907
|
try {
|
|
1887
1908
|
isLoading.value = visible, await useMembershipStore().readRewards(), await useBusinessStore().readLocations(), await useMembershipStore().readSegments(), await useMembershipStore().readMembership();
|
|
@@ -1889,16 +1910,16 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1889
1910
|
} finally {
|
|
1890
1911
|
await new Promise((a) => setTimeout(a, 120)), isLoading.value = !1;
|
|
1891
1912
|
}
|
|
1892
|
-
template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((a,
|
|
1913
|
+
template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((a, r) => {
|
|
1893
1914
|
a.campaign.type === "VOUCHER" && a.campaign.code && useCampaignStore().campaigns.voucher.some(
|
|
1894
1915
|
(u) => u.code === a.campaign.code && u._id.toString() !== a.campaign._id.toString()
|
|
1895
|
-
) &&
|
|
1916
|
+
) && r.addIssue({
|
|
1896
1917
|
code: "custom",
|
|
1897
1918
|
message: "Code already exists, please use another code",
|
|
1898
1919
|
path: ["campaign", "code"]
|
|
1899
1920
|
});
|
|
1900
1921
|
})), data.value = campaign != null ? { ...campaign, templateId: (e = campaign.template) == null ? void 0 : e._id } : _.cloneDeep({
|
|
1901
|
-
...(
|
|
1922
|
+
...(c = template.value) == null ? void 0 : c.defaultValue
|
|
1902
1923
|
}), "configs" in data.value && typeof data.value.configs == "string" && (data.value.configs = eval(data.value.configs)), data.value = cleanPF(data.value), data.value.templateId = SvcConfig.getBusinessId(), data.value.campaign.business = SvcConfig.getBusinessId(), data.value.campaign.templateId = SvcConfig.getBusinessId(), "configs" in data.value && (data.value.configs.business = SvcConfig.getBusinessId()), currentStep.value = 1, sheetTitle.value = campaign ? `Edit ${CampaignOptions[type].name} Campaign` : `Create ${CampaignOptions[type].name} Campaign`;
|
|
1903
1924
|
}
|
|
1904
1925
|
}
|
|
@@ -1925,11 +1946,11 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1925
1946
|
return e.success ? [] : e.error.errors;
|
|
1926
1947
|
});
|
|
1927
1948
|
function stepErrors(e = currentStep.value - 1) {
|
|
1928
|
-
const
|
|
1929
|
-
(a) => a.fields.map((
|
|
1949
|
+
const c = template.value.steps[e].groups.flatMap(
|
|
1950
|
+
(a) => a.fields.map((r) => r.property)
|
|
1930
1951
|
);
|
|
1931
1952
|
return errors.value.filter(
|
|
1932
|
-
(a) =>
|
|
1953
|
+
(a) => c.some((r) => a.path.join(".").includes(r))
|
|
1933
1954
|
);
|
|
1934
1955
|
}
|
|
1935
1956
|
__expose({ showSheet });
|
|
@@ -1942,11 +1963,11 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1942
1963
|
}
|
|
1943
1964
|
});
|
|
1944
1965
|
}
|
|
1945
|
-
function onUpdateProperty(e,
|
|
1946
|
-
var a,
|
|
1947
|
-
if (_.set(data.value, e,
|
|
1948
|
-
const y = ((
|
|
1949
|
-
...(
|
|
1966
|
+
function onUpdateProperty(e, c) {
|
|
1967
|
+
var a, r, u, s, o, l, n, d;
|
|
1968
|
+
if (_.set(data.value, e, c), e == "campaign.event.type") {
|
|
1969
|
+
const y = ((s = (u = (r = (a = template.value) == null ? void 0 : a.defaultValue) == null ? void 0 : r.campaign) == null ? void 0 : u.event) == null ? void 0 : s.rule) ? _.cloneDeep({
|
|
1970
|
+
...(d = (n = (l = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : l.campaign) == null ? void 0 : n.event) == null ? void 0 : d.rule
|
|
1950
1971
|
}) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
|
|
1951
1972
|
RuleBuilder.scaffoldGroup("g_schedule"),
|
|
1952
1973
|
RuleBuilder.scaffoldGroup("g_time"),
|
|
@@ -1964,7 +1985,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1964
1985
|
],
|
|
1965
1986
|
"&&"
|
|
1966
1987
|
);
|
|
1967
|
-
if (
|
|
1988
|
+
if (c != "SCHEDULE") {
|
|
1968
1989
|
_.set(data.value, "campaign.event.rule", y);
|
|
1969
1990
|
return;
|
|
1970
1991
|
}
|
|
@@ -1974,19 +1995,19 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1974
1995
|
RuleBuilder.setRuleToGroup(y, v)
|
|
1975
1996
|
);
|
|
1976
1997
|
}
|
|
1977
|
-
e == "campaign.notify" &&
|
|
1998
|
+
e == "campaign.notify" && c == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
|
|
1978
1999
|
}
|
|
1979
|
-
async function onUpdateFile(e,
|
|
1980
|
-
return e ? await minor(async () => firebaseStorage.update(
|
|
2000
|
+
async function onUpdateFile(e, c) {
|
|
2001
|
+
return e ? await minor(async () => firebaseStorage.update(c, e), {
|
|
1981
2002
|
message: `${e ? "Uploading" : "Removing"} file`,
|
|
1982
2003
|
successMessage: `File ${e ? "uploaded" : "removed"} successfully`
|
|
1983
2004
|
}) : "";
|
|
1984
2005
|
}
|
|
1985
2006
|
function isDisable(e) {
|
|
1986
|
-
var
|
|
2007
|
+
var c, a;
|
|
1987
2008
|
switch (e == null ? void 0 : e.property) {
|
|
1988
2009
|
case "campaign.event.type":
|
|
1989
|
-
return ((a = (
|
|
2010
|
+
return ((a = (c = data.value) == null ? void 0 : c.campaign) == null ? void 0 : a._id) || !1;
|
|
1990
2011
|
default:
|
|
1991
2012
|
return !1;
|
|
1992
2013
|
}
|
|
@@ -1995,14 +2016,14 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1995
2016
|
const e = schema.value.superRefine(campaignRefinement).transform(campaignTransform).safeParse(data.value);
|
|
1996
2017
|
e.success && (emits("submit:model-value", cleanPF(JSON.parse(JSON.stringify(e.data)))), sheetVisible.value = !1);
|
|
1997
2018
|
}
|
|
1998
|
-
return (e,
|
|
1999
|
-
const a = resolveComponent("FmButton"),
|
|
2019
|
+
return (e, c) => {
|
|
2020
|
+
const a = resolveComponent("FmButton"), r = resolveComponent("FmStep"), u = resolveComponent("FmStepper"), s = resolveComponent("FmCard"), o = resolveComponent("FmTopSheet");
|
|
2000
2021
|
return openBlock(), createBlock(o, {
|
|
2001
2022
|
"fullscreen-size": "lg",
|
|
2002
2023
|
modelValue: unref(sheetVisible),
|
|
2003
2024
|
"onUpdate:modelValue": [
|
|
2004
|
-
|
|
2005
|
-
|
|
2025
|
+
c[7] || (c[7] = (l) => isRef(sheetVisible) ? sheetVisible.value = l : null),
|
|
2026
|
+
c[8] || (c[8] = (l) => sheetVisible.value = l)
|
|
2006
2027
|
]
|
|
2007
2028
|
}, createSlots({
|
|
2008
2029
|
"top-sheet-header": withCtx(() => [
|
|
@@ -2010,7 +2031,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2010
2031
|
createElementVNode("div", null, toDisplayString(unref(sheetTitle)), 1),
|
|
2011
2032
|
createElementVNode("div", _hoisted_2, [
|
|
2012
2033
|
createVNode(a, {
|
|
2013
|
-
onClick:
|
|
2034
|
+
onClick: c[0] || (c[0] = (l) => hideSheet()),
|
|
2014
2035
|
label: unref(t)("connect.campaign.common.cancel"),
|
|
2015
2036
|
variant: "tertiary"
|
|
2016
2037
|
}, null, 8, ["label"]),
|
|
@@ -2030,29 +2051,8 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2030
2051
|
createElementVNode("div", _hoisted_9, [
|
|
2031
2052
|
createElementVNode("div", _hoisted_10, [
|
|
2032
2053
|
createElementVNode("div", _hoisted_11, [
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
|
|
2036
|
-
createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
|
|
2037
|
-
createElementVNode("div", { class: "space-y-3" }, [
|
|
2038
|
-
createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
|
|
2039
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
|
|
2040
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
2041
|
-
]),
|
|
2042
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
2043
|
-
]),
|
|
2044
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
|
|
2045
|
-
createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
|
|
2046
|
-
createElementVNode("div", { class: "space-y-3" }, [
|
|
2047
|
-
createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
|
|
2048
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
|
|
2049
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
2050
|
-
]),
|
|
2051
|
-
createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
|
|
2052
|
-
])
|
|
2053
|
-
])
|
|
2054
|
-
], -1)),
|
|
2055
|
-
createVNode(i, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
|
|
2054
|
+
_hoisted_12,
|
|
2055
|
+
createVNode(s, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
|
|
2056
2056
|
])
|
|
2057
2057
|
])
|
|
2058
2058
|
])
|
|
@@ -2064,12 +2064,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2064
2064
|
unref(data) ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
2065
2065
|
createVNode(u, {
|
|
2066
2066
|
modelValue: unref(currentStep),
|
|
2067
|
-
"onUpdate:modelValue":
|
|
2067
|
+
"onUpdate:modelValue": c[1] || (c[1] = (l) => isRef(currentStep) ? currentStep.value = l : null),
|
|
2068
2068
|
orientation: "horizontal",
|
|
2069
2069
|
class: "xs:hidden mx-[-24px] mt-16 mb-24 flex-1"
|
|
2070
2070
|
}, {
|
|
2071
2071
|
default: withCtx(() => [
|
|
2072
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(
|
|
2072
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(r, {
|
|
2073
2073
|
key: l.name,
|
|
2074
2074
|
title: unref(t)(l.name),
|
|
2075
2075
|
value: n + 1,
|
|
@@ -2083,16 +2083,16 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2083
2083
|
createVNode(a, {
|
|
2084
2084
|
icon: "close",
|
|
2085
2085
|
variant: "tertiary",
|
|
2086
|
-
onClick:
|
|
2086
|
+
onClick: c[2] || (c[2] = (l) => sheetVisible.value = !1)
|
|
2087
2087
|
}),
|
|
2088
2088
|
createVNode(u, {
|
|
2089
2089
|
modelValue: unref(currentStep),
|
|
2090
|
-
"onUpdate:modelValue":
|
|
2090
|
+
"onUpdate:modelValue": c[3] || (c[3] = (l) => isRef(currentStep) ? currentStep.value = l : null),
|
|
2091
2091
|
orientation: "horizontal",
|
|
2092
2092
|
class: "flex-1"
|
|
2093
2093
|
}, {
|
|
2094
2094
|
default: withCtx(() => [
|
|
2095
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(
|
|
2095
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(r, {
|
|
2096
2096
|
key: l.name,
|
|
2097
2097
|
title: unref(sheetTitle),
|
|
2098
2098
|
description: unref(t)(l.name),
|
|
@@ -2106,7 +2106,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2106
2106
|
createVNode(a, {
|
|
2107
2107
|
icon: "info",
|
|
2108
2108
|
variant: "tertiary",
|
|
2109
|
-
onClick:
|
|
2109
|
+
onClick: c[4] || (c[4] = () => showSummaryDialog())
|
|
2110
2110
|
})
|
|
2111
2111
|
]),
|
|
2112
2112
|
createElementVNode("div", _hoisted_5, [
|
|
@@ -2130,25 +2130,25 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2130
2130
|
class: "space-y-24"
|
|
2131
2131
|
}, [
|
|
2132
2132
|
createElementVNode("div", _hoisted_7, toDisplayString(l.name ? unref(t)(l.name) : ""), 1),
|
|
2133
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.fields, (
|
|
2133
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.fields, (d, g) => (openBlock(), createElementBlock("div", { key: g }, [
|
|
2134
2134
|
(openBlock(), createBlock(_sfc_main$2, {
|
|
2135
2135
|
key: g,
|
|
2136
|
-
field:
|
|
2137
|
-
modelValue: unref(_).get(unref(data),
|
|
2138
|
-
disabled: isDisable(
|
|
2139
|
-
"onUpdate:modelValue": (y) => onUpdateProperty(
|
|
2136
|
+
field: d,
|
|
2137
|
+
modelValue: unref(_).get(unref(data), d.property),
|
|
2138
|
+
disabled: isDisable(d),
|
|
2139
|
+
"onUpdate:modelValue": (y) => onUpdateProperty(d.property, y),
|
|
2140
2140
|
"onUpdate:file": async (y, v) => {
|
|
2141
2141
|
const h = await onUpdateFile(y, v);
|
|
2142
|
-
onUpdateProperty(
|
|
2142
|
+
onUpdateProperty(d.property, h || "");
|
|
2143
2143
|
},
|
|
2144
2144
|
schema: unref(ZodHelper).typeAtPath(
|
|
2145
2145
|
unref(schema),
|
|
2146
|
-
|
|
2146
|
+
d.property,
|
|
2147
2147
|
unref(data).campaign.type != "MISSION" ? [unref(data).campaign.type] : ["STAMP", "MISSION"]
|
|
2148
2148
|
),
|
|
2149
|
-
"helper-state": unref(ZodHelper).helperState(unref(errors),
|
|
2150
|
-
"helper-text": unref(ZodHelper).helperText(unref(errors),
|
|
2151
|
-
extras:
|
|
2149
|
+
"helper-state": unref(ZodHelper).helperState(unref(errors), d.property),
|
|
2150
|
+
"helper-text": unref(ZodHelper).helperText(unref(errors), d.property),
|
|
2151
|
+
extras: d.extras != null ? d.extras == "" ? unref(data) : unref(_).get(unref(data), d.extras) : void 0
|
|
2152
2152
|
}, null, 8, ["field", "modelValue", "disabled", "onUpdate:modelValue", "onUpdate:file", "schema", "helper-state", "helper-text", "extras"]))
|
|
2153
2153
|
]))), 128))
|
|
2154
2154
|
]))), 128)),
|
|
@@ -2157,12 +2157,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2157
2157
|
label: "Back",
|
|
2158
2158
|
variant: "tertiary",
|
|
2159
2159
|
disabled: unref(currentStep) == 1,
|
|
2160
|
-
onClick:
|
|
2160
|
+
onClick: c[5] || (c[5] = (l) => currentStep.value--)
|
|
2161
2161
|
}, null, 8, ["disabled"]),
|
|
2162
2162
|
createVNode(a, {
|
|
2163
2163
|
disabled: unref(currentStep) - 1 < unref(template).steps.length - 1 ? stepErrors().length > 0 : unref(errors).length > 0,
|
|
2164
2164
|
label: unref(currentStep) - 1 < unref(template).steps.length - 1 ? "Next" : "Submit",
|
|
2165
|
-
onClick:
|
|
2165
|
+
onClick: c[6] || (c[6] = (l) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
|
|
2166
2166
|
}, null, 8, ["disabled", "label"])
|
|
2167
2167
|
])
|
|
2168
2168
|
]),
|