@feedmepos/mf-connect 0.1.38-beta.20 → 0.1.38-beta.21
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-CcDS6jsq.js → Analytic-CEd_WApy.js} +13 -13
- package/dist/{App-CWu9XUGk.js → App-ulCtuU5o.js} +7 -7
- package/dist/{AuditLogs-CuP9pTx6.js → AuditLogs-BM1Np61K.js} +9 -9
- package/dist/{Bin-BAf8lxXh.js → Bin-icbjnKXw.js} +8 -8
- package/dist/{Broadcast-BlZYQhN_.js → Broadcast-COQ3E8vI.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-51jit9.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BbXEYOFK.js} +6 -6
- package/dist/{Card-CpgM1QmJ.js → Card-Cwh3GXi0.js} +16 -16
- package/dist/{Collections-DefrQyM6.js → Collections-EuOjzpkL.js} +6 -6
- package/dist/{Credit-AN9e1fe3.js → Credit-BY2Fpdhh.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-YyaQoLZN.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js} +167 -167
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cfuvs3k9.js → EffectSheet.vue_vue_type_style_index_0_lang-BLw3-hI1.js} +6 -6
- package/dist/{Experience-BmkBr9Wo.js → Experience-rAH7zk71.js} +9 -9
- package/dist/{Game-D0Zq_RLI.js → Game-DlI0yNF0.js} +10 -10
- package/dist/{Index-Czl0WFLc.js → Index-DemXFS3d.js} +10 -10
- package/dist/{Marketing-BK-hPBEY.js → Marketing-shNBO9Rc.js} +6 -6
- package/dist/{Member-Bm6Nps1A.js → Member-C19ZgpaL.js} +10 -10
- package/dist/{MemberList-gSz0_xhf.js → MemberList-B2tNB4yg.js} +25 -25
- package/dist/{MemberTransactions-bG1GW4vQ.js → MemberTransactions-BN3qaTVY.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-RXsv1Zxn.js → MessageInput.vue_vue_type_script_setup_true_lang-BY3j1h72.js} +7 -7
- package/dist/{Mission-ubM2k057.js → Mission-j1KI0-hJ.js} +10 -10
- package/dist/{Overview-EDwgyv1G.js → Overview-BN2Vdu8Q.js} +18 -18
- package/dist/{Point-lfEwhadN.js → Point-8zy7QcTk.js} +9 -9
- package/dist/{Promotion-kLyPM-ZW.js → Promotion-mcUcylXB.js} +10 -10
- package/dist/{Queue-CHN_irk-.js → Queue-BsNv4P8u.js} +10 -10
- package/dist/{Record-B1epFjVq.js → Record-VA6Bdlnz.js} +8 -8
- package/dist/{Reward-CFgpEe0I.js → Reward-CVyO3Ga1.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DmjkCsLo.js → RewardGroup.vue_vue_type_script_setup_true_lang-BR9_a9bJ.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cet6R04Y.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dhs2whAH.js} +13 -13
- package/dist/{Segment-Ls_9U5u_.js → Segment-BMgcdIIS.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Bp940dCI.js → SelectItems.vue_vue_type_script_setup_true_lang-CKRpWcn_.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B4hwYylS.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DZCNcdVW.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfZc_niY.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BESF672g.js} +3 -3
- package/dist/{Setting-uyQqr9ip.js → Setting-BMKKkZTD.js} +11 -11
- package/dist/{Store-DalJR69o.js → Store-DdxMDtfL.js} +19 -19
- package/dist/{StoreRewards-BQidsrSZ.js → StoreRewards-CRyeHEMF.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-qDWa4d1F.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DS6-9WP9.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-gwXp0Hjs.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BTKpclKX.js} +1 -1
- package/dist/{Tier-CKBHw7cz.js → Tier-D5Xmp5vV.js} +20 -20
- package/dist/{Title-CTi1cRm-.js → Title-CsK2crqD.js} +19 -19
- package/dist/{Transaction-DeTFReiT.js → Transaction-Dvfc9x4f.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-NAkAMq_F.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CqCxWltm.js} +6 -6
- package/dist/{Voucher-CTSyAZzy.js → Voucher-CPN7TMho.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CfTeP88u.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DMye9MS3.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CA_ImtHl.js → ZodTextField.vue_vue_type_script_setup_true_lang-CnaQAEKo.js} +1 -1
- package/dist/{app-w-4q1Z6B.js → app-DRBevJsF.js} +1 -1
- package/dist/{app-qB1pFt4s.js → app-DteFjR9L.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{business-BkQfFUlY.js → business-BqV9jK-p.js} +1 -1
- package/dist/{campaign-CeG1cCB8.js → campaign-BHDq-yx-.js} +9 -9
- package/dist/{campaign-gAFtWRib.js → campaign-CsWoG6e_.js} +2 -2
- package/dist/{campaign.enum-B2dJjhNM.js → campaign.enum-Dfa96W5V.js} +1 -1
- package/dist/{campaign.fn-tl5RvMeV.js → campaign.fn-pLrwyHA_.js} +30 -30
- package/dist/{collectible.enum-CY9eRxkX.js → collectible.enum-BYTYWPsR.js} +1 -1
- package/dist/{collection.fn-B2Hvwvuu.js → collection.fn-CYLIQJig.js} +2 -2
- package/dist/{dto-Co4AIKbR.js → dto-DBfDbpyb.js} +4 -4
- package/dist/{effect-DiTCEt6G.js → effect-D9pD5RCk.js} +1 -1
- package/dist/{email-addresses-BT_3l319.js → email-addresses-BApvdLkQ.js} +1 -1
- package/dist/{export-Bd2jDAtR.js → export--EfmCiw0.js} +3 -3
- package/dist/{helper-CqoHGb28.js → helper-BHiK3pLT.js} +1 -1
- package/dist/{index-DJCcKPeB.js → index-2dknXEFJ.js} +6 -6
- package/dist/{index-DexZ1aal.js → index-B9_Tn8si.js} +1 -1
- package/dist/{index-BM-LCR8g.js → index-BSQXDDQY.js} +3 -3
- package/dist/{index-XIhXoDT3.js → index-Bqc7PV3K.js} +1 -1
- package/dist/{index-CfzyafK2.js → index-C1Vrltkc.js} +1 -1
- package/dist/{index-DXKkrcfL.js → index-CD2bkLo_.js} +1 -1
- package/dist/{index-C5i-XOQf.js → index-CDLBLuYq.js} +4 -4
- package/dist/{index-CRP4jCHY.js → index-COiVJ9pA.js} +1 -1
- package/dist/{index-BeIhvQ6n.js → index-CVxruvVB.js} +1 -1
- package/dist/{index-DtbGIrNt.js → index-Cc80pBYX.js} +1023 -1023
- package/dist/{index-36DwgmZf.js → index-DXM3o6kl.js} +1 -1
- package/dist/{index-B-uA3uhI.js → index-DYgdunxw.js} +3 -3
- package/dist/{index-BAV-rA7P.js → index-Pd9RCQxn.js} +1 -1
- package/dist/{index-DyvL5kq6.js → index-qd_dvZcw.js} +2 -2
- package/dist/{index.esm2017-CtHdHJcr.js → index.esm2017-DAWS_ALH.js} +1 -1
- package/dist/{loading-D8ZlHloH.js → loading-BVUeda4s.js} +1 -1
- package/dist/{membership-ClBVQYK7.js → membership-BL_43RJR.js} +3 -3
- package/dist/{money-CDKTQ8yS.js → money-Cd8hLiNc.js} +1 -1
- package/dist/{number-BPciK26O.js → number-DVb8PSrj.js} +1 -1
- package/dist/{objectid-D0dGefEu.js → objectid-D33s3gxp.js} +12 -12
- package/dist/{plugins-C9BG1jBk.js → plugins-BKtBkC9Q.js} +2 -2
- package/dist/{reward-FTxsUKPh.js → reward-f41dJcaL.js} +1 -1
- package/dist/{rule-CV75o9HO.js → rule-Cbux1-fC.js} +3 -3
- package/dist/{rule-builder-DqP-4BN0.js → rule-builder-BrZeF45Z.js} +1 -1
- package/dist/{template-C3UHVrmq.js → template-tqhgmIdT.js} +4 -4
- package/dist/{timezone-DKZyKeHi.js → timezone-DaTVH4y0.js} +1 -1
- package/dist/{trigger-BQmDM-Va.js → trigger-C34RfwrT.js} +4 -4
- package/dist/{user-Bar-w9NM.js → user-DgKhDLYr.js} +1 -1
- package/dist/{vue-i18n-BrpZ37nb.js → vue-i18n-xo56wiwi.js} +158 -158
- package/dist/{xlsx-DoO-sUSq.js → xlsx-D8ZZRjtf.js} +166 -166
- package/package.json +1 -1
|
@@ -1,42 +1,42 @@
|
|
|
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-DteFjR9L.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-BHDq-yx-.js";
|
|
6
|
+
import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-DBfDbpyb.js";
|
|
7
|
+
import { u as useMembershipStore } from "./membership-BL_43RJR.js";
|
|
8
|
+
import { u as useBusinessStore } from "./business-BqV9jK-p.js";
|
|
9
|
+
import "./index-qd_dvZcw.js";
|
|
10
|
+
import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-BrZeF45Z.js";
|
|
11
11
|
import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
|
|
12
12
|
import { h as hooks } from "./moment-D7p2TMB-.js";
|
|
13
|
-
import { f as featureVersionMapping } from "./campaign.enum-
|
|
13
|
+
import { f as featureVersionMapping } from "./campaign.enum-Dfa96W5V.js";
|
|
14
14
|
import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.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-
|
|
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 CountryTimezone, m as moment } from "./timezone-
|
|
24
|
-
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-
|
|
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-BLw3-hI1.js";
|
|
16
|
+
import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BTKpclKX.js";
|
|
17
|
+
import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-CqCxWltm.js";
|
|
18
|
+
import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Dhs2whAH.js";
|
|
19
|
+
import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-BKtBkC9Q.js";
|
|
20
|
+
import { u as useI18n } from "./vue-i18n-xo56wiwi.js";
|
|
21
|
+
import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-C34RfwrT.js";
|
|
22
|
+
import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-BY3j1h72.js";
|
|
23
|
+
import { C as CountryTimezone, m as moment } from "./timezone-DaTVH4y0.js";
|
|
24
|
+
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-Cbux1-fC.js";
|
|
25
25
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
26
|
-
import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
27
|
-
import { T as TEMPLATES } from "./index-
|
|
28
|
-
import { t as FdoCreditLoyaltyReward, u as FdtoRandomReward, v as F_MISSION_TYPE, w as FdoThresholdCreditReward, x as FdtoThresholdReward, y as FdoMission } from "./index-
|
|
29
|
-
import "./index-
|
|
30
|
-
import "./index-
|
|
31
|
-
import { a as F_GAME_TYPE } from "./collectible.enum-
|
|
32
|
-
import { u as useLoading } from "./loading-
|
|
33
|
-
import { i as initCollectibleConfig } from "./helper-
|
|
34
|
-
import { C as CollectionUtils } from "./collection.fn-
|
|
26
|
+
import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-DMye9MS3.js";
|
|
27
|
+
import { T as TEMPLATES } from "./index-2dknXEFJ.js";
|
|
28
|
+
import { t as FdoCreditLoyaltyReward, u as FdtoRandomReward, v as F_MISSION_TYPE, w as FdoThresholdCreditReward, x as FdtoThresholdReward, y as FdoMission } from "./index-CDLBLuYq.js";
|
|
29
|
+
import "./index-C1Vrltkc.js";
|
|
30
|
+
import "./index-DYgdunxw.js";
|
|
31
|
+
import { a as F_GAME_TYPE } from "./collectible.enum-BYTYWPsR.js";
|
|
32
|
+
import { u as useLoading } from "./loading-BVUeda4s.js";
|
|
33
|
+
import { i as initCollectibleConfig } from "./helper-BHiK3pLT.js";
|
|
34
|
+
import { C as CollectionUtils } from "./collection.fn-CYLIQJig.js";
|
|
35
35
|
import { s as sentenceCase$1 } from "./index-CsaQJMAR.js";
|
|
36
|
-
import "./index-
|
|
36
|
+
import "./index-Cc80pBYX.js";
|
|
37
37
|
import { useDialog } from "@feedmepos/ui-library";
|
|
38
|
-
import { u as useCampaignStore } from "./campaign-
|
|
39
|
-
import { S as SvcConfig } from "./index-
|
|
38
|
+
import { u as useCampaignStore } from "./campaign-CsWoG6e_.js";
|
|
39
|
+
import { S as SvcConfig } from "./index-BSQXDDQY.js";
|
|
40
40
|
import { a as cleanPF } from "./object-qECH92oz.js";
|
|
41
41
|
const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
42
42
|
__name: "TimeRuleGroup",
|
|
@@ -49,10 +49,10 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
49
49
|
},
|
|
50
50
|
emits: ["update:model-value"],
|
|
51
51
|
setup(e, { emit: m }) {
|
|
52
|
-
const { t: a } = useI18n(), i = e,
|
|
52
|
+
const { t: a } = useI18n(), i = e, u = m, d = ref(
|
|
53
53
|
!i.modelValue || !i.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(i.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
|
|
54
54
|
);
|
|
55
|
-
watch(
|
|
55
|
+
watch(d, async (o, n) => {
|
|
56
56
|
var s;
|
|
57
57
|
if (n == "custom" && o == "all_time" && RuleBuilder.getRules((s = i.modelValue) == null ? void 0 : s.rules.g_time).length > 0) {
|
|
58
58
|
const y = await prompt.confirm(
|
|
@@ -61,13 +61,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
61
61
|
a("connect.common.confirm"),
|
|
62
62
|
a("connect.common.cancel")
|
|
63
63
|
);
|
|
64
|
-
y &&
|
|
64
|
+
y && u(
|
|
65
65
|
"update:model-value",
|
|
66
66
|
RuleBuilder.setRuleToGroup(
|
|
67
67
|
i.modelValue ?? RuleBuilder.scaffoldGroup(),
|
|
68
68
|
RuleBuilder.scaffoldGroup("g_time")
|
|
69
69
|
)
|
|
70
|
-
),
|
|
70
|
+
), d.value = y ? o : n;
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
async function l(o) {
|
|
@@ -79,10 +79,10 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
79
79
|
a("connect.common.confirm"),
|
|
80
80
|
a("connect.common.cancel")
|
|
81
81
|
)) {
|
|
82
|
-
|
|
82
|
+
d.value = "all_time";
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
u(
|
|
86
86
|
"update:model-value",
|
|
87
87
|
RuleBuilder.setRuleToGroup(
|
|
88
88
|
i.modelValue ?? RuleBuilder.scaffoldGroup(),
|
|
@@ -96,9 +96,9 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
96
96
|
const s = resolveComponent("FmRadio"), y = resolveComponent("FmRadioGroup");
|
|
97
97
|
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
98
98
|
createVNode(y, {
|
|
99
|
-
modelValue: unref(
|
|
99
|
+
modelValue: unref(d),
|
|
100
100
|
"onUpdate:modelValue": [
|
|
101
|
-
n[0] || (n[0] = (h) => isRef(
|
|
101
|
+
n[0] || (n[0] = (h) => isRef(d) ? d.value = h : null),
|
|
102
102
|
n[1] || (n[1] = (h) => l(h))
|
|
103
103
|
]
|
|
104
104
|
}, {
|
|
@@ -114,13 +114,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
114
114
|
]),
|
|
115
115
|
_: 1
|
|
116
116
|
}, 8, ["modelValue"]),
|
|
117
|
-
unref(
|
|
117
|
+
unref(d) == "custom" ? (openBlock(), createBlock(_sfc_main$j, {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "!mt-[0px]",
|
|
120
120
|
"include-only": "trigger",
|
|
121
121
|
"trigger-type": "SCHEDULE",
|
|
122
122
|
"model-value": ((v = e.modelValue) == null ? void 0 : v.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
|
|
123
|
-
"onUpdate:modelValue": n[2] || (n[2] = (h) =>
|
|
123
|
+
"onUpdate:modelValue": n[2] || (n[2] = (h) => u(
|
|
124
124
|
"update:model-value",
|
|
125
125
|
unref(RuleBuilder).setRuleToGroup(
|
|
126
126
|
e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
|
|
@@ -141,26 +141,26 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
141
141
|
},
|
|
142
142
|
emits: ["update:model-value"],
|
|
143
143
|
setup(e, { emit: m }) {
|
|
144
|
-
const a = e, i = m,
|
|
145
|
-
const { property:
|
|
144
|
+
const a = e, i = m, u = computed(() => {
|
|
145
|
+
const { property: d, operator: l, equator: o } = RuleBuilder.simplify(
|
|
146
146
|
a.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
|
|
147
147
|
op: "before",
|
|
148
148
|
x: 1
|
|
149
149
|
})
|
|
150
150
|
);
|
|
151
151
|
return {
|
|
152
|
-
property:
|
|
152
|
+
property: d,
|
|
153
153
|
operator: l,
|
|
154
154
|
equator: o
|
|
155
155
|
};
|
|
156
156
|
});
|
|
157
|
-
return (
|
|
157
|
+
return (d, l) => {
|
|
158
158
|
const o = resolveComponent("FmRadio"), n = resolveComponent("FmStepperField");
|
|
159
159
|
return openBlock(), createElementBlock("div", null, [
|
|
160
160
|
createVNode(o, {
|
|
161
161
|
label: "On birthday",
|
|
162
162
|
value: "_isRange-day",
|
|
163
|
-
"model-value": `${unref(
|
|
163
|
+
"model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
|
|
164
164
|
"onUpdate:modelValue": l[0] || (l[0] = () => {
|
|
165
165
|
i(
|
|
166
166
|
"update:model-value",
|
|
@@ -175,7 +175,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
175
175
|
createVNode(o, {
|
|
176
176
|
label: "N days before birthday",
|
|
177
177
|
value: "_isDay",
|
|
178
|
-
"model-value": unref(
|
|
178
|
+
"model-value": unref(u).operator,
|
|
179
179
|
"onUpdate:modelValue": l[1] || (l[1] = () => {
|
|
180
180
|
i(
|
|
181
181
|
"update:model-value",
|
|
@@ -187,11 +187,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
187
187
|
);
|
|
188
188
|
})
|
|
189
189
|
}, null, 8, ["model-value"]),
|
|
190
|
-
unref(
|
|
190
|
+
unref(u).operator == "_isDay" ? (openBlock(), createBlock(n, {
|
|
191
191
|
key: 0,
|
|
192
192
|
label: "Days before birthday",
|
|
193
193
|
"show-steppers": !1,
|
|
194
|
-
"model-value": unref(
|
|
194
|
+
"model-value": unref(u).equator.x,
|
|
195
195
|
"onUpdate:modelValue": l[2] || (l[2] = (s) => i(
|
|
196
196
|
"update:model-value",
|
|
197
197
|
unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
|
|
@@ -204,7 +204,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
204
204
|
createVNode(o, {
|
|
205
205
|
label: "In birthday week",
|
|
206
206
|
value: "_isRange-week",
|
|
207
|
-
"model-value": `${unref(
|
|
207
|
+
"model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
|
|
208
208
|
"onUpdate:modelValue": l[3] || (l[3] = () => {
|
|
209
209
|
i(
|
|
210
210
|
"update:model-value",
|
|
@@ -219,7 +219,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
219
219
|
createVNode(o, {
|
|
220
220
|
label: "In birthday month",
|
|
221
221
|
value: "_isRange-month",
|
|
222
|
-
"model-value": `${unref(
|
|
222
|
+
"model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
|
|
223
223
|
"onUpdate:modelValue": l[4] || (l[4] = () => {
|
|
224
224
|
i(
|
|
225
225
|
"update:model-value",
|
|
@@ -251,19 +251,19 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
251
251
|
},
|
|
252
252
|
emits: ["update:model-value"],
|
|
253
253
|
setup(e, { emit: m }) {
|
|
254
|
-
const a = e, i = m,
|
|
255
|
-
(
|
|
254
|
+
const a = e, i = m, u = computed(() => a.disabled ? TypeToTriggerOptions[a.campaignType].filter(
|
|
255
|
+
(d) => d.value == a.modelValue
|
|
256
256
|
) : TypeToTriggerOptions[a.campaignType]);
|
|
257
|
-
return (
|
|
257
|
+
return (d, l) => {
|
|
258
258
|
const o = resolveComponent("FmCard");
|
|
259
259
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
260
260
|
l[0] || (l[0] = 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)),
|
|
261
261
|
createElementVNode("div", _hoisted_2$c, [
|
|
262
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
262
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(o, {
|
|
263
263
|
variant: "outlined",
|
|
264
264
|
disabled: a.disabled,
|
|
265
265
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
266
|
-
"col-span-3": unref(
|
|
266
|
+
"col-span-3": unref(u).length == 1,
|
|
267
267
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == n.value,
|
|
268
268
|
"hover:bg-fm-color-opacity-sm": e.modelValue != n.value
|
|
269
269
|
}]),
|
|
@@ -297,12 +297,12 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
297
297
|
emits: ["update:model-value"],
|
|
298
298
|
setup(e, { emit: m }) {
|
|
299
299
|
const a = m;
|
|
300
|
-
return (i,
|
|
301
|
-
const
|
|
300
|
+
return (i, u) => {
|
|
301
|
+
const d = resolveComponent("FmButton"), l = resolveComponent("FmField"), o = resolveComponent("FmDatePicker");
|
|
302
302
|
return openBlock(), createBlock(o, {
|
|
303
303
|
label: e.label,
|
|
304
304
|
"model-value": e.modelValue || "",
|
|
305
|
-
"onUpdate:modelValue":
|
|
305
|
+
"onUpdate:modelValue": u[1] || (u[1] = (n) => a("update:model-value", n))
|
|
306
306
|
}, {
|
|
307
307
|
"trigger-button": withCtx(({ opened: n }) => [
|
|
308
308
|
createVNode(l, {
|
|
@@ -311,11 +311,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
311
311
|
"icon-outlined": !n
|
|
312
312
|
}, {
|
|
313
313
|
append: withCtx(() => [
|
|
314
|
-
e.modelValue ? (openBlock(), createBlock(
|
|
314
|
+
e.modelValue ? (openBlock(), createBlock(d, {
|
|
315
315
|
key: 0,
|
|
316
316
|
variant: "tertiary",
|
|
317
317
|
icon: "clear",
|
|
318
|
-
onClick:
|
|
318
|
+
onClick: u[0] || (u[0] = (s) => (s.stopPropagation(), a("update:model-value", null)))
|
|
319
319
|
})) : createCommentVNode("", !0)
|
|
320
320
|
]),
|
|
321
321
|
default: withCtx(() => [
|
|
@@ -341,14 +341,14 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
341
341
|
emits: ["update:model-value"],
|
|
342
342
|
setup(e, { emit: m }) {
|
|
343
343
|
const a = m;
|
|
344
|
-
return (i,
|
|
345
|
-
var
|
|
344
|
+
return (i, u) => {
|
|
345
|
+
var d, l;
|
|
346
346
|
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
347
347
|
createElementVNode("div", _hoisted_2$b, [
|
|
348
348
|
createVNode(_sfc_main$f, {
|
|
349
|
-
"model-value": ((
|
|
349
|
+
"model-value": ((d = e.modelValue) == null ? void 0 : d.startDate) ?? null,
|
|
350
350
|
label: "Start date",
|
|
351
|
-
"onUpdate:modelValue":
|
|
351
|
+
"onUpdate:modelValue": u[0] || (u[0] = (o) => {
|
|
352
352
|
var n;
|
|
353
353
|
return a("update:model-value", {
|
|
354
354
|
startDate: o,
|
|
@@ -357,12 +357,12 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
357
357
|
})
|
|
358
358
|
}, null, 8, ["model-value"])
|
|
359
359
|
]),
|
|
360
|
-
|
|
360
|
+
u[2] || (u[2] = createElementVNode("div", { class: "mt-5 xs:hidden" }, "to", -1)),
|
|
361
361
|
createElementVNode("div", _hoisted_3$9, [
|
|
362
362
|
createVNode(_sfc_main$f, {
|
|
363
363
|
"model-value": ((l = e.modelValue) == null ? void 0 : l.endDate) ?? null,
|
|
364
364
|
label: "End date",
|
|
365
|
-
"onUpdate:modelValue":
|
|
365
|
+
"onUpdate:modelValue": u[1] || (u[1] = (o) => {
|
|
366
366
|
var n;
|
|
367
367
|
return a("update:model-value", {
|
|
368
368
|
startDate: ((n = e.modelValue) == null ? void 0 : n.startDate) ?? null,
|
|
@@ -393,8 +393,8 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
393
393
|
},
|
|
394
394
|
emits: ["update:model-value"],
|
|
395
395
|
setup(e, { emit: m }) {
|
|
396
|
-
const a = e, i = m,
|
|
397
|
-
() => CountryTimezone[
|
|
396
|
+
const a = e, i = m, u = useCoreStore(), d = computed(
|
|
397
|
+
() => CountryTimezone[u.currentCountry.value || "MY"]
|
|
398
398
|
);
|
|
399
399
|
function l() {
|
|
400
400
|
const g = RuleBuilder.getRules(a.modelValue);
|
|
@@ -415,7 +415,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
415
415
|
}), y = computed(
|
|
416
416
|
() => calculateNextScheduleAt(
|
|
417
417
|
a.modelValue,
|
|
418
|
-
|
|
418
|
+
/* @__PURE__ */ new Date(),
|
|
419
419
|
a.startDate ? new Date(a.startDate) : void 0,
|
|
420
420
|
a.endDate ? new Date(a.endDate) : void 0
|
|
421
421
|
)
|
|
@@ -554,7 +554,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
554
554
|
unref(s).date && unref(s).time && unref(y) ? (openBlock(), createBlock(k, {
|
|
555
555
|
key: 0,
|
|
556
556
|
text: `${unref(moment)(unref(y)).isAfter(unref(moment)()) ? "The next notification will be sent on " : "Last trigger is on "} ${unref(moment)(unref(y)).format("dddd, DD MMM YYYY")} at
|
|
557
|
-
${unref(moment)(unref(y)).format("hh:mmA")}(UTC${unref(moment).tz(unref(
|
|
557
|
+
${unref(moment)(unref(y)).format("hh:mmA")}(UTC${unref(moment).tz(unref(d)).format("Z")}) (${unref(moment)(unref(y)).fromNow()})`
|
|
558
558
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
559
559
|
])
|
|
560
560
|
], 64);
|
|
@@ -569,7 +569,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
569
569
|
},
|
|
570
570
|
emits: ["update:model-value"],
|
|
571
571
|
setup(e, { emit: m }) {
|
|
572
|
-
const a = e, i = m,
|
|
572
|
+
const a = e, i = m, u = computed(
|
|
573
573
|
() => [
|
|
574
574
|
{
|
|
575
575
|
label: "Fortune Wheel",
|
|
@@ -583,17 +583,17 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
583
583
|
value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS,
|
|
584
584
|
hidden: !0
|
|
585
585
|
}
|
|
586
|
-
].filter((
|
|
586
|
+
].filter((d) => !d.hidden)
|
|
587
587
|
);
|
|
588
|
-
return (
|
|
588
|
+
return (d, l) => {
|
|
589
589
|
const o = resolveComponent("FmCard");
|
|
590
590
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
591
591
|
l[0] || (l[0] = 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)),
|
|
592
592
|
createElementVNode("div", _hoisted_2$9, [
|
|
593
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
593
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(o, {
|
|
594
594
|
variant: "outlined",
|
|
595
595
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
596
|
-
"col-span-2": unref(
|
|
596
|
+
"col-span-2": unref(u).length == 1,
|
|
597
597
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == n.value,
|
|
598
598
|
"hover:bg-fm-color-opacity-sm": e.modelValue != n.value
|
|
599
599
|
}]),
|
|
@@ -619,7 +619,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
619
619
|
__name: "EditRewardPoolSheet",
|
|
620
620
|
emits: ["update:model-value"],
|
|
621
621
|
setup(e, { expose: m, emit: a }) {
|
|
622
|
-
const i = useMembershipStore(), { minor:
|
|
622
|
+
const i = useMembershipStore(), { minor: u } = useLoading, d = ref(!1), l = ref(), o = ref(), n = ref(0), s = computed(() => {
|
|
623
623
|
var r;
|
|
624
624
|
return ((r = i.loyaltyRewards.items.find(
|
|
625
625
|
(p) => {
|
|
@@ -632,12 +632,12 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
632
632
|
return c.success ? [] : c.error.errors;
|
|
633
633
|
});
|
|
634
634
|
function v(c, r, p) {
|
|
635
|
-
c && (l.value = r, n.value = p),
|
|
635
|
+
c && (l.value = r, n.value = p), d.value = c;
|
|
636
636
|
}
|
|
637
637
|
const h = a;
|
|
638
638
|
async function g() {
|
|
639
639
|
const c = s.value.safeParse(l.value);
|
|
640
|
-
c.success && (await
|
|
640
|
+
c.success && (await u(
|
|
641
641
|
async () => {
|
|
642
642
|
c.data.type === "VOUCHER" && o.value && (c.data.collectibleConfig.image = await firebaseStorage.update(
|
|
643
643
|
c.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, o.value),
|
|
@@ -656,10 +656,10 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
656
656
|
const p = resolveComponent("FmSelect"), f = resolveComponent("FmStepperField"), b = resolveComponent("FmButton"), C = resolveComponent("FmSideSheet");
|
|
657
657
|
return openBlock(), createBlock(C, {
|
|
658
658
|
"max-width": 560,
|
|
659
|
-
modelValue: unref(
|
|
659
|
+
modelValue: unref(d),
|
|
660
660
|
"onUpdate:modelValue": [
|
|
661
|
-
r[9] || (r[9] = (V) => isRef(
|
|
662
|
-
r[10] || (r[10] = (V) =>
|
|
661
|
+
r[9] || (r[9] = (V) => isRef(d) ? d.value = V : null),
|
|
662
|
+
r[10] || (r[10] = (V) => d.value = V)
|
|
663
663
|
],
|
|
664
664
|
header: "Edit reward",
|
|
665
665
|
"dismiss-away": ""
|
|
@@ -677,7 +677,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
|
|
|
677
677
|
variant: "secondary",
|
|
678
678
|
type: "button",
|
|
679
679
|
label: "Cancel",
|
|
680
|
-
onClick: r[8] || (r[8] = (V) =>
|
|
680
|
+
onClick: r[8] || (r[8] = (V) => d.value = !1)
|
|
681
681
|
})
|
|
682
682
|
])
|
|
683
683
|
]),
|
|
@@ -822,8 +822,8 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
822
822
|
},
|
|
823
823
|
emits: ["update:model-value"],
|
|
824
824
|
setup(e, { emit: m }) {
|
|
825
|
-
const a = e, i = m,
|
|
826
|
-
const c =
|
|
825
|
+
const a = e, i = m, u = useMembershipStore(), d = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), l = computed(() => a.modelValue ?? []), o = computed(() => {
|
|
826
|
+
const c = d.safeParse(l.value);
|
|
827
827
|
return c.success ? [] : c.error.errors;
|
|
828
828
|
}), n = ref();
|
|
829
829
|
function s(c, r) {
|
|
@@ -832,7 +832,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
832
832
|
p[r] = c, (f = n.value) == null || f.showSheet(!1), i("update:model-value", p);
|
|
833
833
|
}
|
|
834
834
|
function y(c) {
|
|
835
|
-
const r = c.type == "VOUCHER" ? c.collectibleConfig :
|
|
835
|
+
const r = c.type == "VOUCHER" ? c.collectibleConfig : u.collectibles.find(
|
|
836
836
|
(b) => b._id.toString() == c.collectible
|
|
837
837
|
), p = CollectionUtils.formattedType((r == null ? void 0 : r.name) || ""), f = c.weight;
|
|
838
838
|
return {
|
|
@@ -918,14 +918,14 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
918
918
|
},
|
|
919
919
|
emits: ["update:model-value"],
|
|
920
920
|
setup(e, { emit: m }) {
|
|
921
|
-
const a = e, i = m,
|
|
921
|
+
const a = e, i = m, u = computed(() => [
|
|
922
922
|
{
|
|
923
923
|
label: "Rock paper scissor",
|
|
924
924
|
description: "Customers play 3 rounds of Rock Paper Scissors against the cashier. If customer won 2 rounds, they will get a discount.",
|
|
925
925
|
value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS
|
|
926
926
|
}
|
|
927
927
|
]);
|
|
928
|
-
return (
|
|
928
|
+
return (d, l) => {
|
|
929
929
|
var y, v, h;
|
|
930
930
|
const o = resolveComponent("FmSwitch"), n = resolveComponent("FmCard"), s = resolveComponent("FmHelperText");
|
|
931
931
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
@@ -935,12 +935,12 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
935
935
|
"onUpdate:modelValue": l[0] || (l[0] = (g) => g ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
|
|
936
936
|
}, null, 8, ["model-value"]),
|
|
937
937
|
((v = e.modelValue) == null ? void 0 : v.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
|
|
938
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
938
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (g) => {
|
|
939
939
|
var c, r;
|
|
940
940
|
return openBlock(), createBlock(n, {
|
|
941
941
|
variant: "outlined",
|
|
942
942
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
943
|
-
"col-span-2": unref(
|
|
943
|
+
"col-span-2": unref(u).length == 1,
|
|
944
944
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((c = e.modelValue) == null ? void 0 : c.gameType) == g.value,
|
|
945
945
|
"hover:bg-fm-color-opacity-sm": ((r = e.modelValue) == null ? void 0 : r.gameType) != g.value
|
|
946
946
|
}]),
|
|
@@ -975,7 +975,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
975
975
|
},
|
|
976
976
|
emits: ["update:model-value"],
|
|
977
977
|
setup(e, { emit: m }) {
|
|
978
|
-
const a = e, i = m,
|
|
978
|
+
const a = e, i = m, u = computed(() => [
|
|
979
979
|
{
|
|
980
980
|
label: "Stamp",
|
|
981
981
|
description: "Award stamps for purchases, redeemable after reaching set milestones.",
|
|
@@ -987,15 +987,15 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
987
987
|
value: F_MISSION_TYPE.enum.PROGRESSIVE
|
|
988
988
|
}
|
|
989
989
|
]);
|
|
990
|
-
return (
|
|
990
|
+
return (d, l) => {
|
|
991
991
|
const o = resolveComponent("FmCard");
|
|
992
992
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
993
993
|
l[0] || (l[0] = 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)),
|
|
994
994
|
createElementVNode("div", _hoisted_2$5, [
|
|
995
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
995
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(o, {
|
|
996
996
|
variant: "outlined",
|
|
997
997
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
998
|
-
"col-span-2": unref(
|
|
998
|
+
"col-span-2": unref(u).length == 1,
|
|
999
999
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == n.value,
|
|
1000
1000
|
"hover:bg-fm-color-opacity-sm": e.modelValue != n.value
|
|
1001
1001
|
}]),
|
|
@@ -1030,14 +1030,14 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1030
1030
|
emits: ["update:model-value"],
|
|
1031
1031
|
setup(e, { emit: m }) {
|
|
1032
1032
|
const a = m;
|
|
1033
|
-
return (i,
|
|
1034
|
-
const
|
|
1033
|
+
return (i, u) => {
|
|
1034
|
+
const d = resolveComponent("FmStepperField");
|
|
1035
1035
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1036
|
-
|
|
1037
|
-
createVNode(
|
|
1036
|
+
u[1] || (u[1] = 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)),
|
|
1037
|
+
createVNode(d, {
|
|
1038
1038
|
label: "Maximum to collect",
|
|
1039
1039
|
"model-value": e.modelValue || null,
|
|
1040
|
-
"onUpdate:modelValue":
|
|
1040
|
+
"onUpdate:modelValue": u[0] || (u[0] = (l) => a("update:model-value", l)),
|
|
1041
1041
|
"helper-text": e.helperText || "Set the threshold required for reward eligibility",
|
|
1042
1042
|
"helper-state": e.helperState || "none"
|
|
1043
1043
|
}, null, 8, ["model-value", "helper-text", "helper-state"])
|
|
@@ -1054,9 +1054,9 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1054
1054
|
},
|
|
1055
1055
|
emits: ["update:model-value"],
|
|
1056
1056
|
setup(e, { expose: m, emit: a }) {
|
|
1057
|
-
const i = e,
|
|
1057
|
+
const i = e, u = useMembershipStore(), { minor: d } = useLoading, l = ref(!1), o = ref(), n = ref(), s = ref(0), y = computed(() => {
|
|
1058
1058
|
var f;
|
|
1059
|
-
return ((f =
|
|
1059
|
+
return ((f = u.loyaltyRewards.items.find(
|
|
1060
1060
|
(b) => {
|
|
1061
1061
|
var C;
|
|
1062
1062
|
return b.value === ((C = o.value) == null ? void 0 : C.collectible);
|
|
@@ -1072,7 +1072,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1072
1072
|
const g = a;
|
|
1073
1073
|
async function c() {
|
|
1074
1074
|
const p = y.value.safeParse(o.value);
|
|
1075
|
-
p.success && (await
|
|
1075
|
+
p.success && (await d(
|
|
1076
1076
|
async () => {
|
|
1077
1077
|
p.data.type === "VOUCHER" && n.value && (p.data.collectibleConfig.image = await firebaseStorage.update(
|
|
1078
1078
|
p.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
|
|
@@ -1173,7 +1173,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1173
1173
|
},
|
|
1174
1174
|
threshold: (S = unref(o)) == null ? void 0 : S.threshold
|
|
1175
1175
|
} : o.value = {
|
|
1176
|
-
collectible: unref(
|
|
1176
|
+
collectible: unref(u).loyaltyRewards.raw[0]._id,
|
|
1177
1177
|
type: "LOYALTY",
|
|
1178
1178
|
earningOption: {
|
|
1179
1179
|
amount: 1,
|
|
@@ -1190,7 +1190,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1190
1190
|
key: 1,
|
|
1191
1191
|
label: "Loyalty type",
|
|
1192
1192
|
rules: [unref(ZodHelper).ruleAtPath(unref(y), "collectible", [unref(o).type])],
|
|
1193
|
-
items: unref(
|
|
1193
|
+
items: unref(u).loyaltyRewards.items,
|
|
1194
1194
|
"model-value": unref(o).collectible,
|
|
1195
1195
|
"onUpdate:modelValue": f[2] || (f[2] = (E) => unref(o).collectible = E)
|
|
1196
1196
|
}, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
|
|
@@ -1211,7 +1211,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1211
1211
|
createVNode(_sfc_main$m, {
|
|
1212
1212
|
class: "!gap-24",
|
|
1213
1213
|
type: unref(o).type === "LOYALTY" ? "custom" : "range",
|
|
1214
|
-
"for-credit": unref(o).type === "LOYALTY" && ((k = unref(
|
|
1214
|
+
"for-credit": unref(o).type === "LOYALTY" && ((k = unref(u).loyaltyRewards.items.find(
|
|
1215
1215
|
(E) => {
|
|
1216
1216
|
var S;
|
|
1217
1217
|
return E.value === ((S = unref(o)) == null ? void 0 : S.collectible);
|
|
@@ -1269,7 +1269,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1269
1269
|
}
|
|
1270
1270
|
},
|
|
1271
1271
|
setup(e) {
|
|
1272
|
-
const m = e, { maxRange: a, currentRange: i, markers:
|
|
1272
|
+
const m = e, { maxRange: a, currentRange: i, markers: u } = toRefs(m), d = computed(
|
|
1273
1273
|
() => Math.min(i.value / a.value * 100, 100)
|
|
1274
1274
|
), l = (o) => o / a.value * 100;
|
|
1275
1275
|
return (o, n) => {
|
|
@@ -1281,7 +1281,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1281
1281
|
),
|
|
1282
1282
|
outline: unref(i) < y,
|
|
1283
1283
|
key: y,
|
|
1284
|
-
name: unref(
|
|
1284
|
+
name: unref(u).some((v) => v === y) ? "featured_seasonal_and_gifts" : "check_circle"
|
|
1285
1285
|
}, null, 8, ["class", "outline", "name"]))), 128))
|
|
1286
1286
|
])) : (openBlock(), createElementBlock("div", {
|
|
1287
1287
|
key: 1,
|
|
@@ -1289,9 +1289,9 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1289
1289
|
}, [
|
|
1290
1290
|
createElementVNode("div", {
|
|
1291
1291
|
class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
|
|
1292
|
-
style: normalizeStyle({ width: unref(
|
|
1292
|
+
style: normalizeStyle({ width: unref(d) + "%" })
|
|
1293
1293
|
}, null, 4),
|
|
1294
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
1294
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (y, v) => (openBlock(), createElementBlock("div", {
|
|
1295
1295
|
key: v,
|
|
1296
1296
|
class: "absolute -top-1.5 flex flex-col items-center -translate-x-1/2",
|
|
1297
1297
|
style: normalizeStyle({ left: l(y) + "%" })
|
|
@@ -1308,16 +1308,16 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1308
1308
|
}
|
|
1309
1309
|
}), isObject = (e) => e !== null && typeof e == "object";
|
|
1310
1310
|
function changeKeysFactory(e) {
|
|
1311
|
-
return function m(a, i = 1,
|
|
1311
|
+
return function m(a, i = 1, u) {
|
|
1312
1312
|
if (i === 0 || !isObject(a))
|
|
1313
1313
|
return a;
|
|
1314
1314
|
if (Array.isArray(a))
|
|
1315
|
-
return a.map((l) => m(l, i - 1,
|
|
1316
|
-
const
|
|
1315
|
+
return a.map((l) => m(l, i - 1, u));
|
|
1316
|
+
const d = Object.create(Object.getPrototypeOf(a));
|
|
1317
1317
|
return Object.keys(a).forEach((l) => {
|
|
1318
|
-
const o = a[l], n = e(l,
|
|
1319
|
-
|
|
1320
|
-
}),
|
|
1318
|
+
const o = a[l], n = e(l, u), s = m(o, i - 1, u);
|
|
1319
|
+
d[n] = s;
|
|
1320
|
+
}), d;
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
1323
|
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" }, _hoisted_4$2 = { class: "flex items-center gap-4" }, _hoisted_5$2 = { class: "fm-typo-en-body-lg-600" }, _hoisted_6$2 = { class: "flex items-center gap-16" }, _hoisted_7$1 = { key: 0 }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
@@ -1334,10 +1334,10 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1334
1334
|
},
|
|
1335
1335
|
emits: ["update:model-value"],
|
|
1336
1336
|
setup(e, { emit: m }) {
|
|
1337
|
-
const a = e, i = m,
|
|
1337
|
+
const a = e, i = m, u = useMembershipStore(), d = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), l = computed(
|
|
1338
1338
|
() => a.modelValue.sort((r, p) => r.threshold - p.threshold) ?? []
|
|
1339
1339
|
), o = computed(() => {
|
|
1340
|
-
const r =
|
|
1340
|
+
const r = d.safeParse(l.value);
|
|
1341
1341
|
return r.success ? [] : r.error.errors;
|
|
1342
1342
|
}), n = ref();
|
|
1343
1343
|
function s(r, p) {
|
|
@@ -1346,7 +1346,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1346
1346
|
f[p] = r, (b = n.value) == null || b.showSheet(!1), i("update:model-value", f);
|
|
1347
1347
|
}
|
|
1348
1348
|
function y(r) {
|
|
1349
|
-
const p = r.type == "VOUCHER" ? r.collectibleConfig :
|
|
1349
|
+
const p = r.type == "VOUCHER" ? r.collectibleConfig : u.collectibles.find(
|
|
1350
1350
|
(b) => b._id.toString() == r.collectible
|
|
1351
1351
|
), f = CollectionUtils.formattedType((p == null ? void 0 : p.name) || "");
|
|
1352
1352
|
return {
|
|
@@ -1369,7 +1369,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1369
1369
|
!0,
|
|
1370
1370
|
{
|
|
1371
1371
|
type: "LOYALTY",
|
|
1372
|
-
collectible:
|
|
1372
|
+
collectible: u.loyaltyRewards.items[0].value,
|
|
1373
1373
|
threshold: null,
|
|
1374
1374
|
validityOption: {
|
|
1375
1375
|
validForDay: 7
|
|
@@ -1385,7 +1385,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1385
1385
|
function c(r) {
|
|
1386
1386
|
var p, f;
|
|
1387
1387
|
return r.type == "VOUCHER" ? (p = r.collectibleConfig) == null ? void 0 : p.name : sentenceCase(
|
|
1388
|
-
((f =
|
|
1388
|
+
((f = u.loyaltyRewards.items.find(
|
|
1389
1389
|
(b) => b.value == r.collectible
|
|
1390
1390
|
)) == null ? void 0 : f.label) || ""
|
|
1391
1391
|
);
|
|
@@ -1471,7 +1471,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1471
1471
|
const a = e, i = computed(() => {
|
|
1472
1472
|
const l = FdoMission.safeParse(a.modelValue);
|
|
1473
1473
|
return l.success ? [] : l.error.errors;
|
|
1474
|
-
}),
|
|
1474
|
+
}), u = computed(() => [
|
|
1475
1475
|
{
|
|
1476
1476
|
label: "Stamp",
|
|
1477
1477
|
description: "Award stamps for purchases, redeemable after reaching set milestones.",
|
|
@@ -1482,7 +1482,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1482
1482
|
description: "Reward customers when they reach a cumulative spending goal.",
|
|
1483
1483
|
value: F_MISSION_TYPE.enum.PROGRESSIVE
|
|
1484
1484
|
}
|
|
1485
|
-
]),
|
|
1485
|
+
]), d = m;
|
|
1486
1486
|
return (l, o) => {
|
|
1487
1487
|
var y;
|
|
1488
1488
|
const n = resolveComponent("FmCard"), s = resolveComponent("FmStepperField");
|
|
@@ -1491,18 +1491,18 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1491
1491
|
o[1] || (o[1] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Mission Type", -1)),
|
|
1492
1492
|
o[2] || (o[2] = 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)),
|
|
1493
1493
|
createElementVNode("div", _hoisted_3$2, [
|
|
1494
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
1494
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (v) => {
|
|
1495
1495
|
var h, g;
|
|
1496
1496
|
return openBlock(), createBlock(n, {
|
|
1497
1497
|
variant: "outlined",
|
|
1498
1498
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
1499
|
-
"col-span-2": unref(
|
|
1499
|
+
"col-span-2": unref(u).length == 1,
|
|
1500
1500
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((h = e.modelValue) == null ? void 0 : h.type) == v.value,
|
|
1501
1501
|
"hover:bg-fm-color-opacity-sm": ((g = e.modelValue) == null ? void 0 : g.type) != v.value
|
|
1502
1502
|
}]),
|
|
1503
1503
|
onClick: () => {
|
|
1504
1504
|
var c, r;
|
|
1505
|
-
((c = e.modelValue) == null ? void 0 : c.type) != v.value &&
|
|
1505
|
+
((c = e.modelValue) == null ? void 0 : c.type) != v.value && d("update:model-value", {
|
|
1506
1506
|
...e.modelValue,
|
|
1507
1507
|
type: v.value,
|
|
1508
1508
|
end: ((r = e.modelValue) == null ? void 0 : r.end) || 1
|
|
@@ -1527,7 +1527,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1527
1527
|
"model-value": ((y = e.modelValue) == null ? void 0 : y.end) || null,
|
|
1528
1528
|
"onUpdate:modelValue": o[0] || (o[0] = (v) => {
|
|
1529
1529
|
var h;
|
|
1530
|
-
return
|
|
1530
|
+
return d("update:model-value", {
|
|
1531
1531
|
...e.modelValue,
|
|
1532
1532
|
type: ((h = e.modelValue) == null ? void 0 : h.type) || "STAMP",
|
|
1533
1533
|
end: v
|
|
@@ -1563,12 +1563,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1563
1563
|
},
|
|
1564
1564
|
emits: ["update:model-value", "update:file"],
|
|
1565
1565
|
setup(e, { emit: m }) {
|
|
1566
|
-
const { t: a } = useI18n(), i = e,
|
|
1567
|
-
function
|
|
1566
|
+
const { t: a } = useI18n(), i = e, u = m;
|
|
1567
|
+
function d(s) {
|
|
1568
1568
|
switch (i.field.type) {
|
|
1569
1569
|
case "timeframe":
|
|
1570
1570
|
const y = s.startDate ? hooks(s.startDate).startOf("day").toISOString() : void 0, v = s.endDate ? hooks(s.endDate).endOf("day").toISOString() : void 0;
|
|
1571
|
-
|
|
1571
|
+
u("update:model-value", {
|
|
1572
1572
|
type: "timeframe",
|
|
1573
1573
|
property: "__now",
|
|
1574
1574
|
start: y,
|
|
@@ -1576,7 +1576,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1576
1576
|
});
|
|
1577
1577
|
break;
|
|
1578
1578
|
case "image": {
|
|
1579
|
-
|
|
1579
|
+
u(
|
|
1580
1580
|
"update:file",
|
|
1581
1581
|
s,
|
|
1582
1582
|
l.value || firebaseStorage.collectibleImagePath(void 0, s)
|
|
@@ -1584,7 +1584,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1584
1584
|
break;
|
|
1585
1585
|
}
|
|
1586
1586
|
default:
|
|
1587
|
-
|
|
1587
|
+
u("update:model-value", s);
|
|
1588
1588
|
break;
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
@@ -1622,7 +1622,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1622
1622
|
"label-mark": unref(n).labelMark,
|
|
1623
1623
|
rules: unref(n).rules,
|
|
1624
1624
|
"model-value": unref(l),
|
|
1625
|
-
"onUpdate:modelValue":
|
|
1625
|
+
"onUpdate:modelValue": d,
|
|
1626
1626
|
"helper-state": e.helperText ? "error" : void 0,
|
|
1627
1627
|
"helper-text": e.helperText
|
|
1628
1628
|
}, null, 8, ["label", "label-mark", "rules", "model-value", "helper-state", "helper-text"])) : e.field.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -1634,7 +1634,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1634
1634
|
"label-mark": e.field.isRuleChildren ? void 0 : unref(n).labelMark,
|
|
1635
1635
|
"model-value": unref(l),
|
|
1636
1636
|
rules: e.field.isRuleChildren ? [] : unref(n).rules,
|
|
1637
|
-
"onUpdate:modelValue":
|
|
1637
|
+
"onUpdate:modelValue": d,
|
|
1638
1638
|
"helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
|
|
1639
1639
|
"helper-text": e.field.isRuleChildren ? e.helperText : void 0
|
|
1640
1640
|
}, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
|
|
@@ -1644,7 +1644,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1644
1644
|
"label-mark": unref(n).labelMark,
|
|
1645
1645
|
rules: unref(n).rules,
|
|
1646
1646
|
"model-value": unref(l),
|
|
1647
|
-
"onUpdate:modelValue":
|
|
1647
|
+
"onUpdate:modelValue": d,
|
|
1648
1648
|
"show-word-count": "",
|
|
1649
1649
|
"max-length": (V = (C = (b = (f = (p = unref(n)) == null ? void 0 : p.unwrapped) == null ? void 0 : f._def) == null ? void 0 : b.checks) == null ? void 0 : C.find((x) => x.kind == "max")) == null ? void 0 : V.value
|
|
1650
1650
|
}, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$g, {
|
|
@@ -1652,11 +1652,11 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1652
1652
|
"campaign-type": e.extras,
|
|
1653
1653
|
"model-value": unref(l),
|
|
1654
1654
|
disabled: e.disabled,
|
|
1655
|
-
"onUpdate:modelValue":
|
|
1655
|
+
"onUpdate:modelValue": d
|
|
1656
1656
|
}, null, 8, ["campaign-type", "model-value", "disabled"])) : e.field.type === "timeframe" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
1657
1657
|
createVNode(_sfc_main$e, {
|
|
1658
1658
|
"model-value": unref(l),
|
|
1659
|
-
"onUpdate:modelValue":
|
|
1659
|
+
"onUpdate:modelValue": d
|
|
1660
1660
|
}, null, 8, ["model-value"]),
|
|
1661
1661
|
createVNode(c, {
|
|
1662
1662
|
class: "!mt-[8px]",
|
|
@@ -1668,7 +1668,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1668
1668
|
thumbnail: unref(l),
|
|
1669
1669
|
"aspect-ratio": "16 / 9",
|
|
1670
1670
|
class: "w-1/2 xs:w-2/3",
|
|
1671
|
-
"onUpdate:file":
|
|
1671
|
+
"onUpdate:file": d
|
|
1672
1672
|
}, {
|
|
1673
1673
|
label: withCtx(() => [
|
|
1674
1674
|
(openBlock(), createBlock(resolveDynamicComponent(unref(n).zodLabel)))
|
|
@@ -1682,22 +1682,22 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1682
1682
|
"label-mark": unref(n).labelMark,
|
|
1683
1683
|
rules: unref(n).rules,
|
|
1684
1684
|
"model-value": unref(l),
|
|
1685
|
-
"onUpdate:modelValue":
|
|
1685
|
+
"onUpdate:modelValue": d
|
|
1686
1686
|
}, null, 8, ["label", "sublabel", "label-mark", "rules", "model-value"])) : e.field.type === "collectible_options" ? (openBlock(), createBlock(_sfc_main$p, {
|
|
1687
1687
|
key: 7,
|
|
1688
1688
|
"model-value": unref(l),
|
|
1689
|
-
"onUpdate:modelValue":
|
|
1689
|
+
"onUpdate:modelValue": d,
|
|
1690
1690
|
"no-campaign": !1,
|
|
1691
1691
|
schema: unref(n).schema,
|
|
1692
1692
|
"is-mission": e.extras === "MISSION"
|
|
1693
1693
|
}, null, 8, ["model-value", "schema", "is-mission"])) : e.field.type === "target_location" ? (openBlock(), createBlock(_sfc_main$q, {
|
|
1694
1694
|
key: 8,
|
|
1695
1695
|
"model-value": unref(l),
|
|
1696
|
-
"onUpdate:modelValue":
|
|
1696
|
+
"onUpdate:modelValue": d
|
|
1697
1697
|
}, null, 8, ["model-value"])) : e.field.type == "effect" ? (openBlock(), createElementBlock(Fragment, { key: 9 }, [
|
|
1698
1698
|
createVNode(_sfc_main$r, {
|
|
1699
1699
|
"model-value": unref(l),
|
|
1700
|
-
"onUpdate:modelValue":
|
|
1700
|
+
"onUpdate:modelValue": d,
|
|
1701
1701
|
"can-set-auto-apply": e.field.property == "campaign.effect"
|
|
1702
1702
|
}, null, 8, ["model-value", "can-set-auto-apply"]),
|
|
1703
1703
|
unref(l) ? createCommentVNode("", !0) : (openBlock(), createBlock(c, {
|
|
@@ -1711,53 +1711,53 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1711
1711
|
"allow-email": !0,
|
|
1712
1712
|
"allow-whatsapp": !0,
|
|
1713
1713
|
"model-value": unref(l),
|
|
1714
|
-
"onUpdate:modelValue":
|
|
1714
|
+
"onUpdate:modelValue": d,
|
|
1715
1715
|
"helper-text": unref(ZodHelper).helperText(o(), ""),
|
|
1716
1716
|
"trigger-type": e.field.extras,
|
|
1717
1717
|
"helper-state": unref(ZodHelper).helperState(o(), "")
|
|
1718
1718
|
}, null, 8, ["model-value", "helper-text", "trigger-type", "helper-state"])) : e.field.type === "earning_option" ? (openBlock(), createBlock(_sfc_main$l, {
|
|
1719
1719
|
key: 11,
|
|
1720
1720
|
"model-value": unref(l),
|
|
1721
|
-
"onUpdate:modelValue":
|
|
1721
|
+
"onUpdate:modelValue": d,
|
|
1722
1722
|
extras: e.extras,
|
|
1723
1723
|
"error-text": e.helperText
|
|
1724
1724
|
}, null, 8, ["model-value", "extras", "error-text"])) : e.field.type === "validity_option" ? (openBlock(), createBlock(_sfc_main$m, {
|
|
1725
1725
|
key: 12,
|
|
1726
1726
|
type: "custom",
|
|
1727
1727
|
"model-value": unref(l),
|
|
1728
|
-
"onUpdate:modelValue":
|
|
1728
|
+
"onUpdate:modelValue": d,
|
|
1729
1729
|
"helper-text": e.helperText || unref(ZodHelper).helperText(o(), "")
|
|
1730
1730
|
}, null, 8, ["model-value", "helper-text"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
1731
1731
|
key: 13,
|
|
1732
1732
|
"model-value": unref(l),
|
|
1733
|
-
"onUpdate:modelValue":
|
|
1733
|
+
"onUpdate:modelValue": d
|
|
1734
1734
|
}, null, 8, ["model-value"])) : e.field.type === "reward_pool" ? (openBlock(), createBlock(_sfc_main$a, {
|
|
1735
1735
|
key: 14,
|
|
1736
1736
|
"model-value": unref(l),
|
|
1737
|
-
"onUpdate:modelValue":
|
|
1737
|
+
"onUpdate:modelValue": d
|
|
1738
1738
|
}, null, 8, ["model-value"])) : e.field.type === "mission" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
1739
1739
|
key: 15,
|
|
1740
1740
|
"model-value": unref(l),
|
|
1741
|
-
"onUpdate:modelValue":
|
|
1741
|
+
"onUpdate:modelValue": d
|
|
1742
1742
|
}, null, 8, ["model-value"])) : e.field.type === "mission_type" ? (openBlock(), createBlock(_sfc_main$8, {
|
|
1743
1743
|
key: 16,
|
|
1744
1744
|
"model-value": unref(l),
|
|
1745
|
-
"onUpdate:modelValue":
|
|
1745
|
+
"onUpdate:modelValue": d
|
|
1746
1746
|
}, null, 8, ["model-value"])) : e.field.type === "mission_end" ? (openBlock(), createBlock(_sfc_main$7, {
|
|
1747
1747
|
key: 17,
|
|
1748
1748
|
"model-value": unref(l),
|
|
1749
|
-
"onUpdate:modelValue":
|
|
1749
|
+
"onUpdate:modelValue": d,
|
|
1750
1750
|
"helper-text": unref(ZodHelper).helperText(o(), ""),
|
|
1751
1751
|
"helper-state": unref(ZodHelper).helperState(o(), "")
|
|
1752
1752
|
}, null, 8, ["model-value", "helper-text", "helper-state"])) : e.field.type === "mission_pool" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
1753
1753
|
key: 18,
|
|
1754
1754
|
"model-value": unref(l),
|
|
1755
|
-
"onUpdate:modelValue":
|
|
1755
|
+
"onUpdate:modelValue": d,
|
|
1756
1756
|
mission: e.extras.mission
|
|
1757
1757
|
}, null, 8, ["model-value", "mission"])) : e.field.type === "rule_schedule" ? (openBlock(), createElementBlock(Fragment, { key: 19 }, [
|
|
1758
1758
|
createVNode(_sfc_main$d, {
|
|
1759
1759
|
"model-value": unref(l),
|
|
1760
|
-
"onUpdate:modelValue":
|
|
1760
|
+
"onUpdate:modelValue": d,
|
|
1761
1761
|
"start-date": e.extras.start,
|
|
1762
1762
|
"end-date": e.extras.end
|
|
1763
1763
|
}, null, 8, ["model-value", "start-date", "end-date"]),
|
|
@@ -1770,7 +1770,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1770
1770
|
], 64)) : e.field.type === "rule_user" ? (openBlock(), createElementBlock(Fragment, { key: 20 }, [
|
|
1771
1771
|
createVNode(_sfc_main$t, {
|
|
1772
1772
|
"model-value": unref(l),
|
|
1773
|
-
"onUpdate:modelValue":
|
|
1773
|
+
"onUpdate:modelValue": d
|
|
1774
1774
|
}, null, 8, ["model-value"]),
|
|
1775
1775
|
e.helperText ? (openBlock(), createBlock(c, {
|
|
1776
1776
|
key: 0,
|
|
@@ -1786,7 +1786,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1786
1786
|
}, null, 8, ["text"])) : createCommentVNode("", !0),
|
|
1787
1787
|
createVNode(_sfc_main$i, {
|
|
1788
1788
|
"model-value": unref(l),
|
|
1789
|
-
"onUpdate:modelValue":
|
|
1789
|
+
"onUpdate:modelValue": d
|
|
1790
1790
|
}, null, 8, ["model-value"]),
|
|
1791
1791
|
e.helperText ? (openBlock(), createBlock(c, {
|
|
1792
1792
|
key: 1,
|
|
@@ -1797,7 +1797,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1797
1797
|
], 64)) : e.field.type === "rule_bill" ? (openBlock(), createElementBlock(Fragment, { key: 22 }, [
|
|
1798
1798
|
createVNode(_sfc_main$u, {
|
|
1799
1799
|
"model-value": unref(l),
|
|
1800
|
-
"onUpdate:modelValue":
|
|
1800
|
+
"onUpdate:modelValue": d
|
|
1801
1801
|
}, null, 8, ["model-value"]),
|
|
1802
1802
|
e.helperText ? (openBlock(), createBlock(c, {
|
|
1803
1803
|
key: 0,
|
|
@@ -1808,7 +1808,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1808
1808
|
], 64)) : e.field.type === "rule_feedback" ? (openBlock(), createElementBlock(Fragment, { key: 23 }, [
|
|
1809
1809
|
createVNode(_sfc_main$v, {
|
|
1810
1810
|
"model-value": unref(l),
|
|
1811
|
-
"onUpdate:modelValue":
|
|
1811
|
+
"onUpdate:modelValue": d
|
|
1812
1812
|
}, null, 8, ["model-value"]),
|
|
1813
1813
|
e.helperText ? (openBlock(), createBlock(c, {
|
|
1814
1814
|
key: 0,
|
|
@@ -1819,7 +1819,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1819
1819
|
], 64)) : e.field.type === "rule_birthday" ? (openBlock(), createElementBlock(Fragment, { key: 24 }, [
|
|
1820
1820
|
createVNode(_sfc_main$h, {
|
|
1821
1821
|
"model-value": unref(l),
|
|
1822
|
-
"onUpdate:modelValue":
|
|
1822
|
+
"onUpdate:modelValue": d
|
|
1823
1823
|
}, null, 8, ["model-value"]),
|
|
1824
1824
|
e.helperText ? (openBlock(), createBlock(c, {
|
|
1825
1825
|
key: 0,
|
|
@@ -1830,7 +1830,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1830
1830
|
], 64)) : e.field.type === "promotion_game_type" ? (openBlock(), createElementBlock(Fragment, { key: 25 }, [
|
|
1831
1831
|
createVNode(_sfc_main$9, {
|
|
1832
1832
|
"model-value": unref(l),
|
|
1833
|
-
"onUpdate:modelValue":
|
|
1833
|
+
"onUpdate:modelValue": d
|
|
1834
1834
|
}, null, 8, ["model-value"]),
|
|
1835
1835
|
e.helperText ? (openBlock(), createBlock(c, {
|
|
1836
1836
|
key: 0,
|
|
@@ -1851,15 +1851,15 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1851
1851
|
},
|
|
1852
1852
|
setup(e) {
|
|
1853
1853
|
const { t: m, te: a } = useI18n();
|
|
1854
|
-
return (i,
|
|
1855
|
-
const
|
|
1856
|
-
return openBlock(), createBlock(
|
|
1854
|
+
return (i, u) => {
|
|
1855
|
+
const d = resolveComponent("FmCard");
|
|
1856
|
+
return openBlock(), createBlock(d, {
|
|
1857
1857
|
variant: "outlined",
|
|
1858
1858
|
class: "p-16 space-y-8"
|
|
1859
1859
|
}, {
|
|
1860
1860
|
default: withCtx(() => [
|
|
1861
1861
|
createElementVNode("div", _hoisted_1$1, toDisplayString(unref(m)("connect.campaign.common.summary")), 1),
|
|
1862
|
-
|
|
1862
|
+
u[0] || (u[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
|
|
1863
1863
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (l, o) => (openBlock(), createElementBlock("div", {
|
|
1864
1864
|
class: "space-y-4",
|
|
1865
1865
|
key: o
|
|
@@ -1895,7 +1895,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1895
1895
|
}
|
|
1896
1896
|
template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((a, i) => {
|
|
1897
1897
|
a.campaign.type === "VOUCHER" && a.campaign.code && useCampaignStore().campaigns.voucher.some(
|
|
1898
|
-
(
|
|
1898
|
+
(u) => u.code === a.campaign.code && u._id.toString() !== a.campaign._id.toString()
|
|
1899
1899
|
) && i.addIssue({
|
|
1900
1900
|
code: "custom",
|
|
1901
1901
|
message: "Code already exists, please use another code",
|
|
@@ -1947,9 +1947,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
1947
1947
|
});
|
|
1948
1948
|
}
|
|
1949
1949
|
function onUpdateProperty(e, m) {
|
|
1950
|
-
var a, i,
|
|
1950
|
+
var a, i, u, d, l, o, n, s;
|
|
1951
1951
|
if (_.set(data.value, e, m), e == "campaign.event.type") {
|
|
1952
|
-
const v = ((
|
|
1952
|
+
const v = ((d = (u = (i = (a = template.value) == null ? void 0 : a.defaultValue) == null ? void 0 : i.campaign) == null ? void 0 : u.event) == null ? void 0 : d.rule) ? _.cloneDeep({
|
|
1953
1953
|
...(s = (n = (o = (l = template.value) == null ? void 0 : l.defaultValue) == null ? void 0 : o.campaign) == null ? void 0 : n.event) == null ? void 0 : s.rule
|
|
1954
1954
|
}) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
|
|
1955
1955
|
RuleBuilder.scaffoldGroup("g_schedule"),
|
|
@@ -2000,7 +2000,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2000
2000
|
e.success && (emits("submit:model-value", cleanPF(JSON.parse(JSON.stringify(e.data)))), sheetVisible.value = !1);
|
|
2001
2001
|
}
|
|
2002
2002
|
return (e, m) => {
|
|
2003
|
-
const a = resolveComponent("FmButton"), i = resolveComponent("FmStep"),
|
|
2003
|
+
const a = resolveComponent("FmButton"), i = resolveComponent("FmStep"), u = resolveComponent("FmStepper"), d = resolveComponent("FmCard"), l = resolveComponent("FmTopSheet");
|
|
2004
2004
|
return openBlock(), createBlock(l, {
|
|
2005
2005
|
"fullscreen-size": "lg",
|
|
2006
2006
|
modelValue: unref(sheetVisible),
|
|
@@ -2056,7 +2056,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2056
2056
|
])
|
|
2057
2057
|
])
|
|
2058
2058
|
], -1)),
|
|
2059
|
-
createVNode(
|
|
2059
|
+
createVNode(d, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
|
|
2060
2060
|
])
|
|
2061
2061
|
])
|
|
2062
2062
|
])
|
|
@@ -2066,7 +2066,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2066
2066
|
name: "default",
|
|
2067
2067
|
fn: withCtx(() => [
|
|
2068
2068
|
unref(data) ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
2069
|
-
createVNode(
|
|
2069
|
+
createVNode(u, {
|
|
2070
2070
|
modelValue: unref(currentStep),
|
|
2071
2071
|
"onUpdate:modelValue": m[1] || (m[1] = (o) => isRef(currentStep) ? currentStep.value = o : null),
|
|
2072
2072
|
orientation: "horizontal",
|
|
@@ -2089,7 +2089,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2089
2089
|
variant: "tertiary",
|
|
2090
2090
|
onClick: m[2] || (m[2] = (o) => sheetVisible.value = !1)
|
|
2091
2091
|
}),
|
|
2092
|
-
createVNode(
|
|
2092
|
+
createVNode(u, {
|
|
2093
2093
|
modelValue: unref(currentStep),
|
|
2094
2094
|
"onUpdate:modelValue": m[3] || (m[3] = (o) => isRef(currentStep) ? currentStep.value = o : null),
|
|
2095
2095
|
orientation: "horizontal",
|