@feedmepos/mf-connect 0.1.118-prod → 0.1.119-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/README.md +12 -8
- package/dist/{App-BHcTqLff.js → App-BN2LKM3u.js} +251 -251
- package/dist/{Bin-DWhXJmHo.js → Bin-DpQ1atb7.js} +8 -8
- package/dist/{Broadcast-Ct1DL8Pd.js → Broadcast-c1ZyYClI.js} +11 -11
- package/dist/{CampaignAnalytic-BSEKCM-4.js → CampaignAnalytic-w1hIlc2r.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BxRg2Wu8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7U6evm1.js} +9 -9
- package/dist/{Card-B7DwrAPH.js → Card-De53Xgbe.js} +22 -22
- package/dist/{Collections-BJw4JJq_.js → Collections-BL2RD3FU.js} +9 -9
- package/dist/{Credit-BteIGXkp.js → Credit-2KvFFcwR.js} +11 -11
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CSFwIzOS.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CKSs2nYE.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJotVIKM.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXb7v7wc.js} +736 -739
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BDZ21UHA.js → EffectSheet.vue_vue_type_style_index_0_lang-Jy7HkK5Z.js} +6 -6
- package/dist/{Experience-C_VQVfJX.js → Experience-Cb0jHtVo.js} +12 -12
- package/dist/{FileSaver.min-CMiQUZQE.js → FileSaver.min-UDgZF_Cv.js} +1 -1
- package/dist/{Game-BiHMrMBF.js → Game-BnysxSMs.js} +12 -12
- package/dist/{GiftCardSetup-DtJIm6oI.js → GiftCardSetup-s1OR6xQq.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BKGnPAEj.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-D108r20x.js} +7 -7
- package/dist/{Goals-B7VjLMDT.js → Goals-BAieLPzR.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C9ecPgpJ.js → ImageInput.vue_vue_type_script_setup_true_lang-B9Jgq5Bp.js} +1 -1
- package/dist/{Index-D_DIHKZG.js → Index-DnX16GAE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DSwB0Ubn.js → LocationPicker.vue_vue_type_script_setup_true_lang-DeM-WG6m.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-dk8_eVwd.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BAN69FOS.js} +1 -1
- package/dist/{LoyaltyDashboard-DOgHeJdK.js → LoyaltyDashboard-D8g6OSbC.js} +15 -15
- package/dist/{MainLayout-CfYgoXLS.js → MainLayout-DWABjpQn.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Bz2LGHUd.js → MainLayout.vue_vue_type_script_setup_true_lang-COp7iulq.js} +3 -3
- package/dist/{Marketing-B6TCrwaR.js → Marketing-Dagatr0y.js} +4 -4
- package/dist/{MarketingMaterialEdit-Bu3a9NGj.js → MarketingMaterialEdit-DYVzNDpM.js} +6 -6
- package/dist/{Member-X51KrYXV.js → Member-DAxdEF_Z.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CYU21JaO.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-nBg7Hckj.js} +23 -23
- package/dist/{MemberImportHistory-CHd9fx7E.js → MemberImportHistory-2gx6FnLh.js} +7 -7
- package/dist/{MemberList-D4L3bSlw.js → MemberList-By_gGl-J.js} +14 -14
- package/dist/{MemberTransactions-CEgjfhnX.js → MemberTransactions-BEF-4ZNp.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-zsaig_yK.js → MessageInput.vue_vue_type_script_setup_true_lang-Bs8wKx9B.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-YZQkKG66.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DN3mWfKj.js} +1 -1
- package/dist/{Mission-BEVtvY0-.js → Mission-jg15lBxo.js} +13 -13
- package/dist/{Overview-4QRkldza.js → Overview-BFKLTAk1.js} +4 -4
- package/dist/{Overview-DVoXXZ16.js → Overview-C7WfdzfV.js} +20 -20
- package/dist/{Point-BJmebaL9.js → Point-dv9WgWTQ.js} +13 -13
- package/dist/{Promotion-DWZZBofu.js → Promotion-mFPF_8jO.js} +13 -13
- package/dist/{Queue-DLdsyhCT.js → Queue-BQoR_M5H.js} +12 -12
- package/dist/{Record-QOD3XELf.js → Record-1JZ1N5iX.js} +9 -9
- package/dist/{Review-CKmhyuqj.js → Review-B52AxCeT.js} +2 -2
- package/dist/{ReviewFacebookCallback-C6DlaJ_j.js → ReviewFacebookCallback-ihTdiI8V.js} +5 -5
- package/dist/{ReviewGoogleCallback-CDriVQPZ.js → ReviewGoogleCallback-DO6SVFIC.js} +5 -5
- package/dist/Reward-Cp4jPAB0.js +444 -0
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-ZgYX2QwC.js → RewardGroup.vue_vue_type_script_setup_true_lang-DLD6X13Z.js} +13 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DHmBwLNP.js → RuleGroup.vue_vue_type_script_setup_true_lang-pdHRjCt8.js} +15 -15
- package/dist/{Segment-URdB0lnl.js → Segment-DaKw0YXF.js} +26 -26
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmI2LAsz.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bj3OQ_JJ.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCEgZzA4.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B1Otak97.js} +4 -4
- package/dist/{Setting-BDIHH2Wk.js → Setting-DveUrt8J.js} +14 -14
- package/dist/{SettingAdvertisements-CkJYZnIN.js → SettingAdvertisements-QRXOMNnM.js} +12 -12
- package/dist/{Settings-9gaegvYJ.js → Settings-D9D-mkBa.js} +5 -5
- package/dist/{Store-CV0kYncl.js → Store-DjdXRw3V.js} +26 -26
- package/dist/{StoreRewards-30kSkAZ_.js → StoreRewards-CjlGrc9E.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Dgwyk3NA.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DnwMpqzf.js} +24 -24
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CDUhH6wp.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-I5-5BV4h.js} +2 -2
- package/dist/{Tier-DiQSC3iv.js → Tier-D74Oh2np.js} +25 -25
- package/dist/{Title-DixxpjAg.js → Title-CeeviOW8.js} +23 -23
- package/dist/{Transaction-DQK4LUGD.js → Transaction-CWdw0ITl.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CL-GKkuD.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B9nf-9s0.js} +6 -6
- package/dist/{Voucher-CSVlk_Hr.js → Voucher-C0nNXMtv.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CiSoy0Ky.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DxZLsQq9.js} +12 -12
- package/dist/{WhatsappAccount-CQYbv2Ew.js → WhatsappAccount-CoLSjCQ2.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DjgRo9iA.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DkHPlGgT.js} +1 -1
- package/dist/{WhatsappBot-DdO9Bfvh.js → WhatsappBot-kLb3kUav.js} +6 -6
- package/dist/{WhatsappBotLogs-CjjWJGND.js → WhatsappBotLogs-jcYaHs0t.js} +6 -6
- package/dist/{WhatsappBotSettings-DYGx-kRr.js → WhatsappBotSettings-B6jJD61h.js} +4 -4
- package/dist/WhatsappLayout-C24bIjI2.js +21 -0
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DTUytfe5.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-9a_grP76.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DdCUr_Zm.js → ZodTextField.vue_vue_type_script_setup_true_lang-i8Wc2mCr.js} +2 -2
- package/dist/{app-CqQeNnGq.js → app-C06bAZj3.js} +165 -165
- package/dist/app.js +1 -1
- package/dist/{base.export-Dls5LQeu.js → base.export-CgNRhKu8.js} +2 -2
- package/dist/{business-gvLSQklz.js → business-D23Dt1x4.js} +1 -1
- package/dist/{campaign-BqazvOUj.js → campaign-DfEvGigm.js} +8 -8
- package/dist/{campaign-Cd6GmA4U.js → campaign-FVcbXtrP.js} +2 -2
- package/dist/{campaign.fn-C0oMb1fs.js → campaign.fn-0MNUj1fZ.js} +39 -39
- package/dist/{collection.fn-CERMsFPh.js → collection.fn-DC1AMI9o.js} +2 -2
- package/dist/{currency-IkiKiNg1.js → currency-Bra2RJK4.js} +1 -1
- package/dist/{effect-j_T62HBN.js → effect-EL4V3pAu.js} +1 -1
- package/dist/{email-addresses-CN1kPlEj.js → email-addresses-Ddtf1x_y.js} +2 -2
- package/dist/{feature-flag-DDfyOLsv.js → feature-flag-umACX47C.js} +155 -155
- package/dist/{helper-DVUe13eh.js → helper-DqDOnLCf.js} +1 -1
- package/dist/{index-C_SaKemI.js → index-B2lqC_hH.js} +1 -1
- package/dist/{index-BvoOJdfc.js → index-B3U3KZl0.js} +2 -2
- package/dist/{index-COuLtOaw.js → index-BTjhdlN_.js} +1 -1
- package/dist/{index-DALsfLV7.js → index-B_BmgKrh.js} +2 -2
- package/dist/{index-ep_Kxxid.js → index-BkKu2G2c.js} +2 -2
- package/dist/{index-lzQ6ehOk.js → index-BroF2fC8.js} +8 -8
- package/dist/{index-9RBtEPPj.js → index-Bvk61_w_.js} +1 -1
- package/dist/{index-DMiaWY0s.js → index-ByVPdKdB.js} +4 -4
- package/dist/{index-jS16KX9p.js → index-BzwwXWpZ.js} +1 -1
- package/dist/{index-D_1pnadB.js → index-C3hAzzS2.js} +1 -1
- package/dist/{index-CPyK4a5J.js → index-C3lk4GHF.js} +1 -1
- package/dist/{index-UJHdDEG1.js → index-C6p9Lsvf.js} +1 -1
- package/dist/{index-CWGbeg5X.js → index-CEh6ryp2.js} +1 -1
- package/dist/{index-BmIfGArh.js → index-DK9zxpDu.js} +3 -3
- package/dist/{index-DzbVgUEP.js → index-DuCJtx1m.js} +1 -1
- package/dist/{index-C-IajuP1.js → index-LjoAs_nX.js} +8 -8
- package/dist/{index-fNYUguDQ.js → index-TDCPGtW3.js} +4 -4
- package/dist/{index-BvkqHehI.js → index-iVbjwKxc.js} +2 -2
- package/dist/{index-k7FFxt_M.js → index-pfmx-Gor.js} +2 -2
- package/dist/{index-Cjy0SXCn.js → index-rcfcslIC.js} +3 -3
- package/dist/{index.esm2017-vJKhLfdu.js → index.esm2017-DCuQPCX2.js} +1 -1
- package/dist/{loading-jZV2Dm--.js → loading-CQm1DKWE.js} +1 -1
- package/dist/{lodash-C2pLek0l.js → lodash-C2wVbAap.js} +1 -1
- package/dist/{member-import-BKI7soRD.js → member-import-BLEmTRso.js} +1 -1
- package/dist/{membership-smdlFpPr.js → membership-XycnxPEW.js} +2 -2
- package/dist/{money-5XyTnYwW.js → money-DY_QGzd1.js} +1 -1
- package/dist/{number-DHU9qJJQ.js → number-BHthf4qF.js} +1 -1
- package/dist/{objectid-jT5g6pGt.js → objectid-CPCAqIiC.js} +8 -8
- package/dist/{onboarding-C_5pyGx-.js → onboarding-BOJw54Fn.js} +3 -3
- package/dist/{onboardingSetup-Bd1V-Ipy.js → onboardingSetup-Cf2u1tXu.js} +2 -2
- package/dist/{plugins-D1Ru-da5.js → plugins-DKQeoL_e.js} +3 -3
- package/dist/{reward-BqPl68Xk.js → reward-D4RIYSpl.js} +1 -1
- package/dist/{rule-WBrRXwL-.js → rule-Ba-s0L_w.js} +3 -3
- package/dist/{rule-builder-DAlSbaWh.js → rule-builder-D0B0DPao.js} +1 -1
- package/dist/{template-DDquG4Xc.js → template-B40I16Yg.js} +7 -7
- package/dist/{timezone-O4qrCDcK.js → timezone-CAc8xi1h.js} +1 -1
- package/dist/{transaction.fn-CY_F8Nb8.js → transaction.fn-Cp2hnhyU.js} +2 -2
- package/dist/{trigger-D-vySeIB.js → trigger-3ebhNBX7.js} +5 -5
- package/dist/{useMarketingMaterialActions-kA6SLHy_.js → useMarketingMaterialActions-6URv8neP.js} +4 -4
- package/dist/{usePagination-AYE_RJH2.js → usePagination-C-fyMmiy.js} +1 -1
- package/dist/{user-DJcMkYXP.js → user-T-iXTrYV.js} +1 -1
- package/dist/{vue-i18n-kXHiDb_1.js → vue-i18n-DzsxJorb.js} +361 -361
- package/dist/{xlsx--s3hBdDk.js → xlsx-B8OqaJfb.js} +1 -1
- package/dist/{zod-IpHRbxaJ.js → zod-DZkNj425.js} +1 -1
- package/package.json +1 -1
- package/dist/Reward-DftoZfPN.js +0 -442
- package/dist/WhatsappLayout-B6k_79Kl.js +0 -21
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, createBlock, createCommentVNode, computed, createElementVNode, toDisplayString, Fragment, renderList, normalizeClass, createTextVNode, watchEffect, onMounted, withModifiers, toRefs, normalizeStyle, resolveDynamicComponent, onBeforeUnmount, createSlots } from "vue";
|
|
2
|
-
import { _ } from "./lodash-
|
|
3
|
-
import { h as axios, S as SvcConfig } from "./index-
|
|
4
|
-
import { z } from "./app-
|
|
5
|
-
import { Z as ZodHelper } from "./zod-
|
|
2
|
+
import { _ } from "./lodash-C2wVbAap.js";
|
|
3
|
+
import { h as axios, S as SvcConfig } from "./index-iVbjwKxc.js";
|
|
4
|
+
import { z } from "./app-C06bAZj3.js";
|
|
5
|
+
import { Z as ZodHelper } from "./zod-DZkNj425.js";
|
|
6
6
|
import { z as z$1 } from "./index-C_H8jFYf.js";
|
|
7
|
-
import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-
|
|
8
|
-
import { F as FdoObjectId } from "./index-
|
|
9
|
-
import { F as FdtoCollectibleConfig } from "./index-
|
|
10
|
-
import { i as isRuleGroup, R as RuleBuilder, a as isRuleEntry } from "./rule-builder-
|
|
11
|
-
import { A as APP_INBOX_BODY_LIMIT, g as FdoBroadcastUrl, h as F_PUSH_DESTINATION, t as toDelivery, i as toLegacyMessage } from "./index-
|
|
12
|
-
import { d as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, e as isChannelComplete, f as setMode, h as addChannel, j as hasDraft, k as setPrimaryChannel, r as removeChannel, m as moveChannel, l as setChannelContent, n as getCampaignSummaryObject, o as normaliseBroadcastDelivery } from "./campaign-
|
|
13
|
-
import { u as useMembershipStore } from "./membership-
|
|
14
|
-
import { u as useBusinessStore } from "./business-
|
|
7
|
+
import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-TDCPGtW3.js";
|
|
8
|
+
import { F as FdoObjectId } from "./index-DK9zxpDu.js";
|
|
9
|
+
import { F as FdtoCollectibleConfig } from "./index-B_BmgKrh.js";
|
|
10
|
+
import { i as isRuleGroup, R as RuleBuilder, a as isRuleEntry } from "./rule-builder-D0B0DPao.js";
|
|
11
|
+
import { A as APP_INBOX_BODY_LIMIT, g as FdoBroadcastUrl, h as F_PUSH_DESTINATION, t as toDelivery, i as toLegacyMessage } from "./index-rcfcslIC.js";
|
|
12
|
+
import { d as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, e as isChannelComplete, f as setMode, h as addChannel, j as hasDraft, k as setPrimaryChannel, r as removeChannel, m as moveChannel, l as setChannelContent, n as getCampaignSummaryObject, o as normaliseBroadcastDelivery } from "./campaign-DfEvGigm.js";
|
|
13
|
+
import { u as useMembershipStore } from "./membership-XycnxPEW.js";
|
|
14
|
+
import { u as useBusinessStore } from "./business-D23Dt1x4.js";
|
|
15
15
|
import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
|
|
16
16
|
import { h as hooks } from "./moment-D7p2TMB-.js";
|
|
17
17
|
import { f as featureVersionMapping } from "./campaign.enum-BqekIiiN.js";
|
|
18
|
-
import { _ as _sfc_main$x } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { _ as _sfc_main$v, a as _sfc_main$y, b as _sfc_main$A } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
20
|
-
import { _ as _sfc_main$z } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { _ as _sfc_main$B } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
22
|
-
import { _ as _sfc_main$p, a as _sfc_main$t } from "./RuleGroup.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { p as prompt, f as firebaseStorage } from "./plugins-
|
|
24
|
-
import { u as useI18n } from "./vue-i18n-
|
|
25
|
-
import { T as TypeToTriggerOptions, _ as _sfc_main$C, b as _sfc_main$D } from "./trigger-
|
|
26
|
-
import { D as DEFAULT_MESSAGE_VARIABLES, a as _sfc_main$q, g as getSmsMessageMetrics, _ as _sfc_main$r, b as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-
|
|
18
|
+
import { _ as _sfc_main$x } from "./ImageInput.vue_vue_type_script_setup_true_lang-B9Jgq5Bp.js";
|
|
19
|
+
import { _ as _sfc_main$v, a as _sfc_main$y, b as _sfc_main$A } from "./EffectSheet.vue_vue_type_style_index_0_lang-Jy7HkK5Z.js";
|
|
20
|
+
import { _ as _sfc_main$z } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-I5-5BV4h.js";
|
|
21
|
+
import { _ as _sfc_main$B } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-B9nf-9s0.js";
|
|
22
|
+
import { _ as _sfc_main$p, a as _sfc_main$t } from "./RuleGroup.vue_vue_type_script_setup_true_lang-pdHRjCt8.js";
|
|
23
|
+
import { p as prompt, f as firebaseStorage } from "./plugins-DKQeoL_e.js";
|
|
24
|
+
import { u as useI18n } from "./vue-i18n-DzsxJorb.js";
|
|
25
|
+
import { T as TypeToTriggerOptions, _ as _sfc_main$C, b as _sfc_main$D } from "./trigger-3ebhNBX7.js";
|
|
26
|
+
import { D as DEFAULT_MESSAGE_VARIABLES, a as _sfc_main$q, g as getSmsMessageMetrics, _ as _sfc_main$r, b as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-Bs8wKx9B.js";
|
|
27
27
|
import { useDialog } from "@feedmepos/ui-library";
|
|
28
28
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
29
|
-
import { c as campaignApi } from "./index-
|
|
30
|
-
import { m as membershipApi } from "./index-
|
|
31
|
-
import { a as useChannelFlag } from "./feature-flag-
|
|
32
|
-
import { m as moment } from "./index-
|
|
33
|
-
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-
|
|
34
|
-
import { C as CountryTimezone } from "./timezone-
|
|
35
|
-
import { _ as _sfc_main$u, a as _sfc_main$w } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
36
|
-
import "./index-
|
|
37
|
-
import { T as TEMPLATES } from "./index-
|
|
38
|
-
import "./index-
|
|
29
|
+
import { c as campaignApi } from "./index-BkKu2G2c.js";
|
|
30
|
+
import { m as membershipApi } from "./index-CEh6ryp2.js";
|
|
31
|
+
import { a as useChannelFlag } from "./feature-flag-umACX47C.js";
|
|
32
|
+
import { m as moment } from "./index-DuCJtx1m.js";
|
|
33
|
+
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-Ba-s0L_w.js";
|
|
34
|
+
import { C as CountryTimezone } from "./timezone-CAc8xi1h.js";
|
|
35
|
+
import { _ as _sfc_main$u, a as _sfc_main$w } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-DxZLsQq9.js";
|
|
36
|
+
import "./index-ByVPdKdB.js";
|
|
37
|
+
import { T as TEMPLATES } from "./index-BroF2fC8.js";
|
|
38
|
+
import "./index-B3U3KZl0.js";
|
|
39
39
|
import "./index-I9lmcd2w.js";
|
|
40
|
-
import "./index-
|
|
40
|
+
import "./index-Bvk61_w_.js";
|
|
41
41
|
import { a as F_GAME_TYPE } from "./collectible.enum-Liy2wH3s.js";
|
|
42
|
-
import { u as useLoading } from "./loading-
|
|
43
|
-
import { i as initCollectibleConfig } from "./helper-
|
|
44
|
-
import { C as CollectionUtils } from "./collection.fn-
|
|
42
|
+
import { u as useLoading } from "./loading-CQm1DKWE.js";
|
|
43
|
+
import { i as initCollectibleConfig } from "./helper-DqDOnLCf.js";
|
|
44
|
+
import { C as CollectionUtils } from "./collection.fn-DC1AMI9o.js";
|
|
45
45
|
import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
|
|
46
|
-
import { u as useCampaignStore } from "./campaign-
|
|
46
|
+
import { u as useCampaignStore } from "./campaign-FVcbXtrP.js";
|
|
47
47
|
import { a as cleanPF } from "./object-BYyQ0PZp.js";
|
|
48
48
|
const publicClient = axios.create({ withCredentials: !1, timeout: 5e3 });
|
|
49
49
|
async function getNativeApp(e) {
|
|
@@ -58,7 +58,7 @@ async function getNativeApp(e) {
|
|
|
58
58
|
}).parse(o.data).native;
|
|
59
59
|
}
|
|
60
60
|
function campaignRefinement(e, l) {
|
|
61
|
-
var r,
|
|
61
|
+
var r, y;
|
|
62
62
|
if (!e) return;
|
|
63
63
|
const o = e.campaign;
|
|
64
64
|
if (!o) return;
|
|
@@ -88,7 +88,7 @@ function campaignRefinement(e, l) {
|
|
|
88
88
|
}
|
|
89
89
|
case "CREDIT": {
|
|
90
90
|
const a = (r = o.config) == null ? void 0 : r.validityOption;
|
|
91
|
-
(!a || ["validForDay", "validBefore"].every((
|
|
91
|
+
(!a || ["validForDay", "validBefore"].every((u) => a[u] == null)) && l.addIssue({
|
|
92
92
|
code: "custom",
|
|
93
93
|
path: ["campaign", "config", "validityOption"],
|
|
94
94
|
params: {
|
|
@@ -107,7 +107,7 @@ function campaignRefinement(e, l) {
|
|
|
107
107
|
i18n: "connectZodCustom:campaign.reward_threshold_range"
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
}), (
|
|
110
|
+
}), (y = o.config) != null && y.validityOption.followFirstReceive || l.addIssue({
|
|
111
111
|
code: "custom",
|
|
112
112
|
path: ["campaign", "config", "validityOption"],
|
|
113
113
|
params: {
|
|
@@ -139,9 +139,9 @@ function campaignRefinement(e, l) {
|
|
|
139
139
|
operator: ["_isOnTime"]
|
|
140
140
|
}
|
|
141
141
|
];
|
|
142
|
-
n.length == a.length && n.every((s) => a.some((
|
|
143
|
-
const
|
|
144
|
-
return
|
|
142
|
+
n.length == a.length && n.every((s) => a.some((g) => {
|
|
143
|
+
const m = RuleBuilder.simplify(g);
|
|
144
|
+
return m.property === s.property && s.operator.includes(m.operator);
|
|
145
145
|
})) || l.addIssue({
|
|
146
146
|
code: "custom",
|
|
147
147
|
path: ["campaign", "event", "rule"],
|
|
@@ -277,37 +277,37 @@ const CampaignDtos = {
|
|
|
277
277
|
},
|
|
278
278
|
emits: ["update:model-value"],
|
|
279
279
|
setup(e, { emit: l }) {
|
|
280
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
280
|
+
const { t: o } = useI18n(), i = e, r = l, y = ref(
|
|
281
281
|
!i.modelValue || !i.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(i.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
|
|
282
282
|
);
|
|
283
|
-
watch(
|
|
283
|
+
watch(y, async (n, u) => {
|
|
284
284
|
var s;
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
285
|
+
if (u == "custom" && n == "all_time" && RuleBuilder.getRules((s = i.modelValue) == null ? void 0 : s.rules.g_time).length > 0) {
|
|
286
|
+
const g = await prompt.confirm(
|
|
287
287
|
o("connect.template.rule.time.confirm_remove"),
|
|
288
288
|
o("connect.common.confirm"),
|
|
289
289
|
o("connect.common.confirm"),
|
|
290
290
|
o("connect.common.cancel")
|
|
291
291
|
);
|
|
292
|
-
|
|
292
|
+
g && r(
|
|
293
293
|
"update:model-value",
|
|
294
294
|
RuleBuilder.setRuleToGroup(
|
|
295
295
|
i.modelValue ?? RuleBuilder.scaffoldGroup(),
|
|
296
296
|
RuleBuilder.scaffoldGroup("g_time")
|
|
297
297
|
)
|
|
298
|
-
),
|
|
298
|
+
), y.value = g ? n : u;
|
|
299
299
|
}
|
|
300
300
|
});
|
|
301
301
|
async function a(n) {
|
|
302
|
-
var
|
|
303
|
-
if (n == "custom" && RuleBuilder.getRules((
|
|
302
|
+
var u;
|
|
303
|
+
if (n == "custom" && RuleBuilder.getRules((u = i.modelValue) == null ? void 0 : u.rules.g_time).length > 0) {
|
|
304
304
|
if (!await prompt.confirm(
|
|
305
305
|
o("connect.template.rule.time.confirm_remove"),
|
|
306
306
|
o("connect.common.confirm"),
|
|
307
307
|
o("connect.common.confirm"),
|
|
308
308
|
o("connect.common.cancel")
|
|
309
309
|
)) {
|
|
310
|
-
|
|
310
|
+
y.value = "all_time";
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
313
|
r(
|
|
@@ -319,15 +319,15 @@ const CampaignDtos = {
|
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
return (n,
|
|
323
|
-
var
|
|
324
|
-
const s = resolveComponent("FmRadio"),
|
|
322
|
+
return (n, u) => {
|
|
323
|
+
var m;
|
|
324
|
+
const s = resolveComponent("FmRadio"), g = resolveComponent("FmRadioGroup");
|
|
325
325
|
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
326
|
-
createVNode(
|
|
327
|
-
modelValue: unref(
|
|
326
|
+
createVNode(g, {
|
|
327
|
+
modelValue: unref(y),
|
|
328
328
|
"onUpdate:modelValue": [
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
u[0] || (u[0] = (p) => isRef(y) ? y.value = p : null),
|
|
330
|
+
u[1] || (u[1] = (p) => a(p))
|
|
331
331
|
]
|
|
332
332
|
}, {
|
|
333
333
|
default: withCtx(() => [
|
|
@@ -342,17 +342,17 @@ const CampaignDtos = {
|
|
|
342
342
|
]),
|
|
343
343
|
_: 1
|
|
344
344
|
}, 8, ["modelValue"]),
|
|
345
|
-
unref(
|
|
345
|
+
unref(y) == "custom" ? (openBlock(), createBlock(_sfc_main$p, {
|
|
346
346
|
key: 0,
|
|
347
347
|
class: "!mt-[0px]",
|
|
348
348
|
"include-only": "trigger",
|
|
349
349
|
"trigger-type": "SCHEDULE",
|
|
350
|
-
"model-value": ((
|
|
351
|
-
"onUpdate:modelValue":
|
|
350
|
+
"model-value": ((m = e.modelValue) == null ? void 0 : m.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
|
|
351
|
+
"onUpdate:modelValue": u[2] || (u[2] = (p) => r(
|
|
352
352
|
"update:model-value",
|
|
353
353
|
unref(RuleBuilder).setRuleToGroup(
|
|
354
354
|
e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
|
|
355
|
-
|
|
355
|
+
p,
|
|
356
356
|
"&&"
|
|
357
357
|
)
|
|
358
358
|
))
|
|
@@ -369,8 +369,8 @@ const CampaignDtos = {
|
|
|
369
369
|
},
|
|
370
370
|
emits: ["update:model-value"],
|
|
371
371
|
setup(e, { emit: l }) {
|
|
372
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
373
|
-
const { property: a, operator: n, equator:
|
|
372
|
+
const { t: o } = useI18n(), i = e, r = l, y = computed(() => {
|
|
373
|
+
const { property: a, operator: n, equator: u } = RuleBuilder.simplify(
|
|
374
374
|
i.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
|
|
375
375
|
op: "before",
|
|
376
376
|
x: 1
|
|
@@ -379,16 +379,16 @@ const CampaignDtos = {
|
|
|
379
379
|
return {
|
|
380
380
|
property: a,
|
|
381
381
|
operator: n,
|
|
382
|
-
equator:
|
|
382
|
+
equator: u
|
|
383
383
|
};
|
|
384
384
|
});
|
|
385
385
|
return (a, n) => {
|
|
386
|
-
const
|
|
386
|
+
const u = resolveComponent("FmRadio"), s = resolveComponent("FmStepperField");
|
|
387
387
|
return openBlock(), createElementBlock("div", null, [
|
|
388
|
-
createVNode(
|
|
388
|
+
createVNode(u, {
|
|
389
389
|
label: unref(o)("connect.template.rule.birthday.on_birthday"),
|
|
390
390
|
value: "_isRange-day",
|
|
391
|
-
"model-value": `${unref(
|
|
391
|
+
"model-value": `${unref(y).operator}-${unref(y).equator.unit}`,
|
|
392
392
|
"onUpdate:modelValue": n[0] || (n[0] = () => {
|
|
393
393
|
r(
|
|
394
394
|
"update:model-value",
|
|
@@ -400,10 +400,10 @@ const CampaignDtos = {
|
|
|
400
400
|
);
|
|
401
401
|
})
|
|
402
402
|
}, null, 8, ["label", "model-value"]),
|
|
403
|
-
createVNode(
|
|
403
|
+
createVNode(u, {
|
|
404
404
|
label: unref(o)("connect.template.rule.birthday.days_before"),
|
|
405
405
|
value: "_isDay",
|
|
406
|
-
"model-value": unref(
|
|
406
|
+
"model-value": unref(y).operator,
|
|
407
407
|
"onUpdate:modelValue": n[1] || (n[1] = () => {
|
|
408
408
|
r(
|
|
409
409
|
"update:model-value",
|
|
@@ -415,24 +415,24 @@ const CampaignDtos = {
|
|
|
415
415
|
);
|
|
416
416
|
})
|
|
417
417
|
}, null, 8, ["label", "model-value"]),
|
|
418
|
-
unref(
|
|
418
|
+
unref(y).operator == "_isDay" ? (openBlock(), createBlock(s, {
|
|
419
419
|
key: 0,
|
|
420
420
|
label: unref(o)("connect.template.rule.birthday.days_before_label"),
|
|
421
421
|
"show-steppers": !1,
|
|
422
|
-
"model-value": unref(
|
|
423
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
422
|
+
"model-value": unref(y).equator.x,
|
|
423
|
+
"onUpdate:modelValue": n[2] || (n[2] = (g) => r(
|
|
424
424
|
"update:model-value",
|
|
425
425
|
unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
|
|
426
426
|
op: "after",
|
|
427
|
-
x:
|
|
427
|
+
x: g,
|
|
428
428
|
ignoreYear: !0
|
|
429
429
|
})
|
|
430
430
|
))
|
|
431
431
|
}, null, 8, ["label", "model-value"])) : createCommentVNode("", !0),
|
|
432
|
-
createVNode(
|
|
432
|
+
createVNode(u, {
|
|
433
433
|
label: unref(o)("connect.template.rule.birthday.in_birthday_week"),
|
|
434
434
|
value: "_isRange-week",
|
|
435
|
-
"model-value": `${unref(
|
|
435
|
+
"model-value": `${unref(y).operator}-${unref(y).equator.unit}`,
|
|
436
436
|
"onUpdate:modelValue": n[3] || (n[3] = () => {
|
|
437
437
|
r(
|
|
438
438
|
"update:model-value",
|
|
@@ -444,10 +444,10 @@ const CampaignDtos = {
|
|
|
444
444
|
);
|
|
445
445
|
})
|
|
446
446
|
}, null, 8, ["label", "model-value"]),
|
|
447
|
-
createVNode(
|
|
447
|
+
createVNode(u, {
|
|
448
448
|
label: unref(o)("connect.template.rule.birthday.in_birthday_month"),
|
|
449
449
|
value: "_isRange-month",
|
|
450
|
-
"model-value": `${unref(
|
|
450
|
+
"model-value": `${unref(y).operator}-${unref(y).equator.unit}`,
|
|
451
451
|
"onUpdate:modelValue": n[4] || (n[4] = () => {
|
|
452
452
|
r(
|
|
453
453
|
"update:model-value",
|
|
@@ -479,19 +479,19 @@ const CampaignDtos = {
|
|
|
479
479
|
},
|
|
480
480
|
emits: ["update:model-value"],
|
|
481
481
|
setup(e, { emit: l }) {
|
|
482
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
482
|
+
const { t: o } = useI18n(), i = e, r = l, y = computed(() => i.disabled ? TypeToTriggerOptions[i.campaignType].filter(
|
|
483
483
|
(a) => a.value == i.modelValue
|
|
484
484
|
) : TypeToTriggerOptions[i.campaignType]);
|
|
485
485
|
return (a, n) => {
|
|
486
|
-
const
|
|
486
|
+
const u = resolveComponent("FmCard");
|
|
487
487
|
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
488
488
|
createElementVNode("div", _hoisted_2$i, toDisplayString(unref(o)("connect.campaign.trigger.description")), 1),
|
|
489
489
|
createElementVNode("div", _hoisted_3$g, [
|
|
490
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
490
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(y), (s) => (openBlock(), createBlock(u, {
|
|
491
491
|
variant: "outlined",
|
|
492
492
|
disabled: i.disabled,
|
|
493
493
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
494
|
-
"col-span-3": unref(
|
|
494
|
+
"col-span-3": unref(y).length == 1,
|
|
495
495
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == s.value,
|
|
496
496
|
"hover:bg-fm-color-opacity-sm": e.modelValue != s.value
|
|
497
497
|
}]),
|
|
@@ -526,20 +526,20 @@ const CampaignDtos = {
|
|
|
526
526
|
setup(e, { emit: l }) {
|
|
527
527
|
const o = l;
|
|
528
528
|
return (i, r) => {
|
|
529
|
-
const
|
|
529
|
+
const y = resolveComponent("FmButton"), a = resolveComponent("FmField"), n = resolveComponent("FmDatePicker");
|
|
530
530
|
return openBlock(), createBlock(n, {
|
|
531
531
|
label: e.label,
|
|
532
532
|
"model-value": e.modelValue || "",
|
|
533
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
533
|
+
"onUpdate:modelValue": r[1] || (r[1] = (u) => o("update:model-value", u))
|
|
534
534
|
}, {
|
|
535
|
-
"trigger-button": withCtx(({ opened:
|
|
535
|
+
"trigger-button": withCtx(({ opened: u }) => [
|
|
536
536
|
createVNode(a, {
|
|
537
537
|
class: "flex items-center",
|
|
538
538
|
"prepend-icon": "calendar_month",
|
|
539
|
-
"icon-outlined": !
|
|
539
|
+
"icon-outlined": !u
|
|
540
540
|
}, {
|
|
541
541
|
append: withCtx(() => [
|
|
542
|
-
e.modelValue ? (openBlock(), createBlock(
|
|
542
|
+
e.modelValue ? (openBlock(), createBlock(y, {
|
|
543
543
|
key: 0,
|
|
544
544
|
variant: "tertiary",
|
|
545
545
|
icon: "clear",
|
|
@@ -569,17 +569,17 @@ const CampaignDtos = {
|
|
|
569
569
|
emits: ["update:model-value"],
|
|
570
570
|
setup(e, { emit: l }) {
|
|
571
571
|
const { t: o } = useI18n(), i = l;
|
|
572
|
-
return (r,
|
|
572
|
+
return (r, y) => {
|
|
573
573
|
var a, n;
|
|
574
574
|
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
575
575
|
createElementVNode("div", _hoisted_2$h, [
|
|
576
576
|
createVNode(_sfc_main$l, {
|
|
577
577
|
"model-value": ((a = e.modelValue) == null ? void 0 : a.startDate) ?? null,
|
|
578
578
|
label: unref(o)("connect.common.startDate"),
|
|
579
|
-
"onUpdate:modelValue":
|
|
579
|
+
"onUpdate:modelValue": y[0] || (y[0] = (u) => {
|
|
580
580
|
var s;
|
|
581
581
|
return i("update:model-value", {
|
|
582
|
-
startDate:
|
|
582
|
+
startDate: u,
|
|
583
583
|
endDate: ((s = e.modelValue) == null ? void 0 : s.endDate) ?? null
|
|
584
584
|
});
|
|
585
585
|
})
|
|
@@ -590,11 +590,11 @@ const CampaignDtos = {
|
|
|
590
590
|
createVNode(_sfc_main$l, {
|
|
591
591
|
"model-value": ((n = e.modelValue) == null ? void 0 : n.endDate) ?? null,
|
|
592
592
|
label: unref(o)("connect.common.endDate"),
|
|
593
|
-
"onUpdate:modelValue":
|
|
593
|
+
"onUpdate:modelValue": y[1] || (y[1] = (u) => {
|
|
594
594
|
var s;
|
|
595
595
|
return i("update:model-value", {
|
|
596
596
|
startDate: ((s = e.modelValue) == null ? void 0 : s.startDate) ?? null,
|
|
597
|
-
endDate:
|
|
597
|
+
endDate: u
|
|
598
598
|
});
|
|
599
599
|
})
|
|
600
600
|
}, null, 8, ["model-value", "label"])
|
|
@@ -622,41 +622,41 @@ const CampaignDtos = {
|
|
|
622
622
|
emits: ["update:model-value"],
|
|
623
623
|
setup(e, { emit: l }) {
|
|
624
624
|
const { t: o } = useI18n(), i = e, r = l;
|
|
625
|
-
function
|
|
625
|
+
function y(k) {
|
|
626
626
|
r("update:model-value", { ...i.modelValue, ...k });
|
|
627
627
|
}
|
|
628
|
-
function a(k,
|
|
629
|
-
return k >=
|
|
628
|
+
function a(k, b) {
|
|
629
|
+
return k >= b ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
|
|
630
630
|
}
|
|
631
|
-
const n = computed(() => i.modelValue.buttons ?? []),
|
|
631
|
+
const n = computed(() => i.modelValue.buttons ?? []), u = computed(() => {
|
|
632
632
|
var k;
|
|
633
633
|
return ((k = i.modelValue.content) == null ? void 0 : k.length) ?? 0;
|
|
634
634
|
});
|
|
635
|
-
function s(k,
|
|
636
|
-
|
|
635
|
+
function s(k, b) {
|
|
636
|
+
y({
|
|
637
637
|
buttons: n.value.map(
|
|
638
|
-
(
|
|
638
|
+
(v, c) => c === k ? { ...v, ...b } : v
|
|
639
639
|
)
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
n.value.length >= MAX_BUTTONS ||
|
|
642
|
+
function g() {
|
|
643
|
+
n.value.length >= MAX_BUTTONS || y({ buttons: [...n.value, { label: "", url: "" }] });
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function m(k) {
|
|
646
646
|
var c;
|
|
647
647
|
if (!i.showValidation) return { label: void 0, url: void 0 };
|
|
648
|
-
const
|
|
649
|
-
let
|
|
650
|
-
return
|
|
648
|
+
const b = (c = k.url) == null ? void 0 : c.trim();
|
|
649
|
+
let v;
|
|
650
|
+
return b ? FdoBroadcastUrl.safeParse(b).success || (v = o("connect.campaign.push.linkUrlInvalid")) : v = o("connect.campaign.appInbox.buttonUrlRequired"), {
|
|
651
651
|
label: k.label.trim() ? void 0 : o("connect.campaign.appInbox.buttonLabelRequired"),
|
|
652
|
-
url:
|
|
652
|
+
url: v
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
|
|
655
|
+
function p(k) {
|
|
656
|
+
y({ buttons: n.value.filter((b, v) => v !== k) });
|
|
657
657
|
}
|
|
658
|
-
return (k,
|
|
659
|
-
const
|
|
658
|
+
return (k, b) => {
|
|
659
|
+
const v = resolveComponent("FmTextField"), c = resolveComponent("FmButton");
|
|
660
660
|
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
661
661
|
createElementVNode("div", null, [
|
|
662
662
|
createElementVNode("div", _hoisted_2$g, [
|
|
@@ -665,11 +665,11 @@ const CampaignDtos = {
|
|
|
665
665
|
class: normalizeClass(["fm-typo-en-body-sm-400", a(e.modelValue.title.length, TITLE_WARN_AT$1)])
|
|
666
666
|
}, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT$1), 3)
|
|
667
667
|
]),
|
|
668
|
-
createVNode(
|
|
668
|
+
createVNode(v, {
|
|
669
669
|
"model-value": e.modelValue.title,
|
|
670
670
|
"max-length": TITLE_LIMIT$1,
|
|
671
671
|
placeholder: unref(o)("connect.campaign.appInbox.titlePlaceholder"),
|
|
672
|
-
"onUpdate:modelValue":
|
|
672
|
+
"onUpdate:modelValue": b[0] || (b[0] = (d) => y({ title: d }))
|
|
673
673
|
}, null, 8, ["model-value", "placeholder"])
|
|
674
674
|
]),
|
|
675
675
|
createElementVNode("div", null, [
|
|
@@ -679,11 +679,11 @@ const CampaignDtos = {
|
|
|
679
679
|
class: normalizeClass(["fm-typo-en-body-sm-400", a(e.modelValue.previewText.length, PREVIEW_WARN_AT)])
|
|
680
680
|
}, toDisplayString(e.modelValue.previewText.length) + " / " + toDisplayString(PREVIEW_LIMIT), 3)
|
|
681
681
|
]),
|
|
682
|
-
createVNode(
|
|
682
|
+
createVNode(v, {
|
|
683
683
|
"model-value": e.modelValue.previewText,
|
|
684
684
|
"max-length": PREVIEW_LIMIT,
|
|
685
685
|
placeholder: unref(o)("connect.campaign.appInbox.previewTextPlaceholder"),
|
|
686
|
-
"onUpdate:modelValue":
|
|
686
|
+
"onUpdate:modelValue": b[1] || (b[1] = (d) => y({ previewText: d }))
|
|
687
687
|
}, null, 8, ["model-value", "placeholder"])
|
|
688
688
|
]),
|
|
689
689
|
createElementVNode("div", _hoisted_6$8, [
|
|
@@ -693,16 +693,16 @@ const CampaignDtos = {
|
|
|
693
693
|
createElementVNode("div", {
|
|
694
694
|
class: normalizeClass([
|
|
695
695
|
"mt-[2px] fm-typo-en-body-sm-400",
|
|
696
|
-
unref(
|
|
696
|
+
unref(u) > unref(APP_INBOX_BODY_LIMIT) ? "text-fm-color-system-error-400" : "text-fm-color-typo-secondary"
|
|
697
697
|
])
|
|
698
|
-
}, toDisplayString(unref(
|
|
698
|
+
}, toDisplayString(unref(u)) + " / " + toDisplayString(unref(APP_INBOX_BODY_LIMIT)), 3)
|
|
699
699
|
]),
|
|
700
700
|
createVNode(_sfc_main$q, {
|
|
701
701
|
html: e.modelValue.content,
|
|
702
702
|
variables: e.variables,
|
|
703
703
|
"media-limit": 1,
|
|
704
704
|
"button-label": unref(o)("connect.campaign.appInbox.editBodyMessage"),
|
|
705
|
-
"onUpdate:html":
|
|
705
|
+
"onUpdate:html": b[2] || (b[2] = (d) => y({ content: d.html }))
|
|
706
706
|
}, null, 8, ["html", "variables", "button-label"])
|
|
707
707
|
]),
|
|
708
708
|
createElementVNode("div", _hoisted_9$7, [
|
|
@@ -710,35 +710,35 @@ const CampaignDtos = {
|
|
|
710
710
|
createElementVNode("span", _hoisted_11$4, toDisplayString(unref(o)("connect.campaign.appInbox.buttons")), 1),
|
|
711
711
|
createElementVNode("span", _hoisted_12$3, toDisplayString(unref(n).length) + " / " + toDisplayString(MAX_BUTTONS), 1)
|
|
712
712
|
]),
|
|
713
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (
|
|
714
|
-
key:
|
|
713
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (d, h) => (openBlock(), createElementBlock("div", {
|
|
714
|
+
key: h,
|
|
715
715
|
class: "flex flex-wrap items-start gap-8"
|
|
716
716
|
}, [
|
|
717
717
|
createElementVNode("div", _hoisted_13$3, [
|
|
718
|
-
createVNode(
|
|
719
|
-
"model-value":
|
|
718
|
+
createVNode(v, {
|
|
719
|
+
"model-value": d.label,
|
|
720
720
|
"max-length": 20,
|
|
721
721
|
placeholder: unref(o)("connect.campaign.appInbox.buttonLabel"),
|
|
722
|
-
"helper-state":
|
|
723
|
-
"helper-text":
|
|
724
|
-
"onUpdate:modelValue": (
|
|
722
|
+
"helper-state": m(d).label ? "error" : "none",
|
|
723
|
+
"helper-text": m(d).label,
|
|
724
|
+
"onUpdate:modelValue": (C) => s(h, { label: C })
|
|
725
725
|
}, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
|
|
726
726
|
]),
|
|
727
727
|
createElementVNode("div", _hoisted_14$3, [
|
|
728
|
-
createVNode(
|
|
729
|
-
"model-value":
|
|
728
|
+
createVNode(v, {
|
|
729
|
+
"model-value": d.url ?? "",
|
|
730
730
|
inputmode: "url",
|
|
731
731
|
placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
|
|
732
|
-
"helper-state":
|
|
733
|
-
"helper-text":
|
|
734
|
-
"onUpdate:modelValue": (
|
|
732
|
+
"helper-state": m(d).url ? "error" : "none",
|
|
733
|
+
"helper-text": m(d).url,
|
|
734
|
+
"onUpdate:modelValue": (C) => s(h, { url: C.trim() })
|
|
735
735
|
}, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
|
|
736
736
|
]),
|
|
737
737
|
createVNode(c, {
|
|
738
738
|
icon: "delete",
|
|
739
739
|
"icon-color": "neutral-gray-400",
|
|
740
740
|
variant: "tertiary",
|
|
741
|
-
onClick: (
|
|
741
|
+
onClick: (C) => p(h)
|
|
742
742
|
}, null, 8, ["onClick"])
|
|
743
743
|
]))), 128)),
|
|
744
744
|
unref(n).length < MAX_BUTTONS ? (openBlock(), createBlock(c, {
|
|
@@ -746,7 +746,7 @@ const CampaignDtos = {
|
|
|
746
746
|
variant: "tertiary",
|
|
747
747
|
icon: "add",
|
|
748
748
|
label: unref(o)("connect.campaign.appInbox.addButton"),
|
|
749
|
-
onClick:
|
|
749
|
+
onClick: g
|
|
750
750
|
}, null, 8, ["label"])) : createCommentVNode("", !0)
|
|
751
751
|
])
|
|
752
752
|
]);
|
|
@@ -773,61 +773,61 @@ const CampaignDtos = {
|
|
|
773
773
|
},
|
|
774
774
|
emits: ["update:model-value"],
|
|
775
775
|
setup(e, { emit: l }) {
|
|
776
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
777
|
-
var
|
|
776
|
+
const { t: o } = useI18n(), i = e, r = l, y = F_PUSH_DESTINATION.options, a = computed(() => i.modelValue.destination === "EXTERNAL"), n = computed(() => {
|
|
777
|
+
var p;
|
|
778
778
|
if (!i.showValidation || !a.value) return;
|
|
779
|
-
const
|
|
780
|
-
return
|
|
779
|
+
const m = (p = i.modelValue.url) == null ? void 0 : p.trim();
|
|
780
|
+
return m ? FdoBroadcastUrl.safeParse(m).success ? void 0 : o("connect.campaign.push.linkUrlInvalid") : o("connect.campaign.push.linkUrlRequired");
|
|
781
781
|
});
|
|
782
|
-
function
|
|
783
|
-
r("update:model-value", { ...i.modelValue, ...
|
|
782
|
+
function u(m) {
|
|
783
|
+
r("update:model-value", { ...i.modelValue, ...m });
|
|
784
784
|
}
|
|
785
|
-
function s(
|
|
786
|
-
|
|
785
|
+
function s(m) {
|
|
786
|
+
u(m === "EXTERNAL" ? { destination: m } : { destination: m, url: null });
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
return
|
|
788
|
+
function g(m, p) {
|
|
789
|
+
return m >= p ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
|
|
790
790
|
}
|
|
791
|
-
return (
|
|
792
|
-
const k = resolveComponent("FmTextField"),
|
|
791
|
+
return (m, p) => {
|
|
792
|
+
const k = resolveComponent("FmTextField"), b = resolveComponent("FmTextarea"), v = resolveComponent("FmSelect");
|
|
793
793
|
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
794
794
|
createElementVNode("div", null, [
|
|
795
795
|
createElementVNode("div", _hoisted_2$f, [
|
|
796
796
|
createElementVNode("span", _hoisted_3$d, toDisplayString(unref(o)("connect.campaign.push.title")), 1),
|
|
797
797
|
createElementVNode("span", {
|
|
798
|
-
class: normalizeClass(["fm-typo-en-body-sm-400",
|
|
798
|
+
class: normalizeClass(["fm-typo-en-body-sm-400", g(e.modelValue.title.length, TITLE_WARN_AT)])
|
|
799
799
|
}, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT), 3)
|
|
800
800
|
]),
|
|
801
801
|
createVNode(k, {
|
|
802
802
|
"model-value": e.modelValue.title,
|
|
803
803
|
"max-length": TITLE_LIMIT,
|
|
804
804
|
placeholder: unref(o)("connect.campaign.push.titlePlaceholder"),
|
|
805
|
-
"onUpdate:modelValue":
|
|
805
|
+
"onUpdate:modelValue": p[0] || (p[0] = (c) => u({ title: c }))
|
|
806
806
|
}, null, 8, ["model-value", "placeholder"])
|
|
807
807
|
]),
|
|
808
808
|
createElementVNode("div", null, [
|
|
809
809
|
createElementVNode("div", _hoisted_4$c, [
|
|
810
810
|
createElementVNode("span", _hoisted_5$a, toDisplayString(unref(o)("connect.campaign.push.body")), 1),
|
|
811
811
|
createElementVNode("span", {
|
|
812
|
-
class: normalizeClass(["fm-typo-en-body-sm-400",
|
|
812
|
+
class: normalizeClass(["fm-typo-en-body-sm-400", g(e.modelValue.body.length, BODY_WARN_AT)])
|
|
813
813
|
}, toDisplayString(e.modelValue.body.length) + " / " + toDisplayString(BODY_LIMIT), 3)
|
|
814
814
|
]),
|
|
815
|
-
createVNode(
|
|
815
|
+
createVNode(b, {
|
|
816
816
|
"model-value": e.modelValue.body,
|
|
817
817
|
"max-length": BODY_LIMIT,
|
|
818
818
|
placeholder: unref(o)("connect.campaign.push.bodyPlaceholder"),
|
|
819
|
-
"onUpdate:modelValue":
|
|
819
|
+
"onUpdate:modelValue": p[1] || (p[1] = (c) => u({ body: c }))
|
|
820
820
|
}, null, 8, ["model-value", "placeholder"])
|
|
821
821
|
]),
|
|
822
822
|
createElementVNode("div", null, [
|
|
823
823
|
createElementVNode("div", _hoisted_6$7, toDisplayString(unref(o)("connect.campaign.push.link")), 1),
|
|
824
|
-
createVNode(
|
|
824
|
+
createVNode(v, {
|
|
825
825
|
"model-value": e.modelValue.destination ?? "NONE",
|
|
826
|
-
items: unref(
|
|
826
|
+
items: unref(y).map((c) => ({
|
|
827
827
|
label: unref(o)(`connect.campaign.appInbox.destination.${c}`),
|
|
828
828
|
value: c
|
|
829
829
|
})),
|
|
830
|
-
"onUpdate:modelValue":
|
|
830
|
+
"onUpdate:modelValue": p[2] || (p[2] = (c) => s(c))
|
|
831
831
|
}, null, 8, ["model-value", "items"]),
|
|
832
832
|
unref(a) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_7$6, toDisplayString(unref(o)("connect.campaign.push.linkHelper")), 1)),
|
|
833
833
|
unref(a) ? (openBlock(), createElementBlock("div", _hoisted_8$6, [
|
|
@@ -838,7 +838,7 @@ const CampaignDtos = {
|
|
|
838
838
|
placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
|
|
839
839
|
"helper-state": unref(n) ? "error" : "none",
|
|
840
840
|
"helper-text": unref(n),
|
|
841
|
-
"onUpdate:modelValue":
|
|
841
|
+
"onUpdate:modelValue": p[3] || (p[3] = (c) => u({ url: c.trim() || null }))
|
|
842
842
|
}, null, 8, ["model-value", "placeholder", "helper-state", "helper-text"])
|
|
843
843
|
])) : createCommentVNode("", !0)
|
|
844
844
|
])
|
|
@@ -871,7 +871,7 @@ const CampaignDtos = {
|
|
|
871
871
|
e.modelValue === r.key ? "border-fm-color-primary bg-fm-color-system-warning-100" : "border-fm-color-neutral-gray-100 bg-fm-color-neutral-white hover:border-fm-color-neutral-gray-200"
|
|
872
872
|
]),
|
|
873
873
|
"aria-current": e.modelValue === r.key ? "true" : void 0,
|
|
874
|
-
onClick: (
|
|
874
|
+
onClick: (y) => o.$emit("update:model-value", r.key)
|
|
875
875
|
}, [
|
|
876
876
|
createElementVNode("span", _hoisted_4$b, [
|
|
877
877
|
r.step ? (openBlock(), createElementBlock("span", {
|
|
@@ -925,32 +925,32 @@ const CampaignDtos = {
|
|
|
925
925
|
() => o.target === "PUSH" ? o.content : void 0
|
|
926
926
|
), r = computed(
|
|
927
927
|
() => o.target === "APP_INBOX" ? o.content : void 0
|
|
928
|
-
),
|
|
928
|
+
), y = computed(
|
|
929
929
|
() => o.target === "SMS" || o.target === "WHATSAPP" ? o.content : void 0
|
|
930
930
|
), a = computed(() => {
|
|
931
|
-
var
|
|
932
|
-
const
|
|
933
|
-
return
|
|
931
|
+
var m, p;
|
|
932
|
+
const g = (p = (m = y.value) == null ? void 0 : m.content) == null ? void 0 : p.trim();
|
|
933
|
+
return g ? o.senderPrefix ? `${o.senderPrefix}${g}` : g : l("connect.campaign.broadcast.preview.emptyText");
|
|
934
934
|
}), n = computed(() => {
|
|
935
|
-
var
|
|
936
|
-
const
|
|
937
|
-
return
|
|
935
|
+
var m;
|
|
936
|
+
const g = ((m = r.value) == null ? void 0 : m.content) ?? "";
|
|
937
|
+
return g.trim() ? `<!doctype html><meta charset="utf-8"><base target="_blank"><style>
|
|
938
938
|
html,body{margin:0;font:400 12px/1.5 Inter,system-ui,sans-serif;color:#1C1C1E;word-break:break-word}
|
|
939
939
|
img{max-width:100%;height:auto}
|
|
940
|
-
</style>${
|
|
941
|
-
}),
|
|
942
|
-
const
|
|
940
|
+
</style>${g}` : "";
|
|
941
|
+
}), u = computed(() => {
|
|
942
|
+
const g = /* @__PURE__ */ new Date(), m = g.toLocaleDateString(void 0, {
|
|
943
943
|
weekday: "short",
|
|
944
944
|
day: "2-digit",
|
|
945
945
|
month: "short"
|
|
946
|
-
}),
|
|
946
|
+
}), p = g.toLocaleTimeString(void 0, {
|
|
947
947
|
hour: "2-digit",
|
|
948
948
|
minute: "2-digit"
|
|
949
949
|
});
|
|
950
|
-
return `${
|
|
950
|
+
return `${m} · ${p}`;
|
|
951
951
|
}), s = computed(() => o.target === "PUSH" ? l("connect.campaign.broadcast.preview.note.push") : o.target === "APP_INBOX" ? l("connect.campaign.broadcast.preview.note.inbox") : l("connect.campaign.broadcast.preview.note.text"));
|
|
952
|
-
return (
|
|
953
|
-
var
|
|
952
|
+
return (g, m) => {
|
|
953
|
+
var p, k, b, v, c, d, h, C, V, B, S;
|
|
954
954
|
return e.target !== "EMAIL" ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
955
955
|
createElementVNode("div", _hoisted_2$d, toDisplayString(unref(l)("connect.campaign.broadcast.preview.title")), 1),
|
|
956
956
|
createElementVNode("div", {
|
|
@@ -968,16 +968,16 @@ const CampaignDtos = {
|
|
|
968
968
|
}, null, 2)
|
|
969
969
|
]),
|
|
970
970
|
e.target === "PUSH" ? (openBlock(), createElementBlock("div", _hoisted_4$a, [
|
|
971
|
-
createElementVNode("div", _hoisted_5$8, toDisplayString(unref(
|
|
971
|
+
createElementVNode("div", _hoisted_5$8, toDisplayString(unref(u)), 1),
|
|
972
972
|
createElementVNode("div", _hoisted_6$5, [
|
|
973
|
-
createElementVNode("div", _hoisted_7$5, toDisplayString(((k = (
|
|
974
|
-
createElementVNode("div", _hoisted_8$5, toDisplayString(((
|
|
973
|
+
createElementVNode("div", _hoisted_7$5, toDisplayString(((k = (p = unref(i)) == null ? void 0 : p.title) == null ? void 0 : k.trim()) || unref(l)("connect.campaign.broadcast.preview.emptyTitle")), 1),
|
|
974
|
+
createElementVNode("div", _hoisted_8$5, toDisplayString(((v = (b = unref(i)) == null ? void 0 : b.body) == null ? void 0 : v.trim()) || unref(l)("connect.campaign.broadcast.preview.emptyBody")), 1)
|
|
975
975
|
])
|
|
976
976
|
])) : e.target === "APP_INBOX" ? (openBlock(), createElementBlock("div", _hoisted_9$5, [
|
|
977
977
|
createElementVNode("div", _hoisted_10$5, toDisplayString(unref(l)("connect.campaign.broadcast.preview.inboxHeading")), 1),
|
|
978
978
|
createElementVNode("div", _hoisted_11$3, [
|
|
979
|
-
createElementVNode("div", _hoisted_12$2, toDisplayString(((
|
|
980
|
-
createElementVNode("div", _hoisted_13$2, toDisplayString(((
|
|
979
|
+
createElementVNode("div", _hoisted_12$2, toDisplayString(((d = (c = unref(r)) == null ? void 0 : c.title) == null ? void 0 : d.trim()) || unref(l)("connect.campaign.broadcast.preview.emptyTitle")), 1),
|
|
980
|
+
createElementVNode("div", _hoisted_13$2, toDisplayString(((C = (h = unref(r)) == null ? void 0 : h.previewText) == null ? void 0 : C.trim()) || unref(l)("connect.campaign.broadcast.preview.emptyBody")), 1),
|
|
981
981
|
(V = unref(r)) != null && V.imageUrl ? (openBlock(), createElementBlock("img", {
|
|
982
982
|
key: 0,
|
|
983
983
|
src: unref(r).imageUrl,
|
|
@@ -992,11 +992,11 @@ const CampaignDtos = {
|
|
|
992
992
|
class: "mt-8 h-[120px] w-full border-0",
|
|
993
993
|
title: unref(l)("connect.campaign.broadcast.preview.bodyFrameTitle")
|
|
994
994
|
}, null, 8, _hoisted_15$2)) : createCommentVNode("", !0),
|
|
995
|
-
(
|
|
996
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r).buttons, (
|
|
997
|
-
key:
|
|
995
|
+
(S = (B = unref(r)) == null ? void 0 : B.buttons) != null && S.length ? (openBlock(), createElementBlock("div", _hoisted_16$1, [
|
|
996
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r).buttons, (N, R) => (openBlock(), createElementBlock("div", {
|
|
997
|
+
key: R,
|
|
998
998
|
class: "rounded-[8px] bg-fm-color-primary px-12 py-8 text-center fm-typo-en-body-sm-400 text-fm-color-typo-white"
|
|
999
|
-
}, toDisplayString(
|
|
999
|
+
}, toDisplayString(N.label || unref(l)("connect.campaign.appInbox.buttonLabel")), 1))), 128))
|
|
1000
1000
|
])) : createCommentVNode("", !0)
|
|
1001
1001
|
])
|
|
1002
1002
|
])) : (openBlock(), createElementBlock("div", _hoisted_17$1, [
|
|
@@ -1026,14 +1026,14 @@ const CampaignDtos = {
|
|
|
1026
1026
|
emits: ["move", "remove", "add"],
|
|
1027
1027
|
setup(e) {
|
|
1028
1028
|
const { t: l } = useI18n(), o = e, i = computed(() => o.addable.length > 0);
|
|
1029
|
-
return (r,
|
|
1030
|
-
const a = resolveComponent("FmButton"), n = resolveComponent("FmMenuItem"),
|
|
1029
|
+
return (r, y) => {
|
|
1030
|
+
const a = resolveComponent("FmButton"), n = resolveComponent("FmMenuItem"), u = resolveComponent("FmMenu");
|
|
1031
1031
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
1032
1032
|
createElementVNode("div", _hoisted_2$c, [
|
|
1033
1033
|
createElementVNode("span", _hoisted_3$a, toDisplayString(unref(l)("connect.campaign.broadcast.fallbackChannels")), 1),
|
|
1034
1034
|
createElementVNode("span", _hoisted_4$9, toDisplayString(unref(l)("connect.campaign.broadcast.fallbackChannelsHint")), 1)
|
|
1035
1035
|
]),
|
|
1036
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.rows, (s,
|
|
1036
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.rows, (s, g) => (openBlock(), createElementBlock("div", {
|
|
1037
1037
|
key: s.channel,
|
|
1038
1038
|
class: "flex flex-wrap items-center gap-12 rounded-[8px] border border-fm-color-neutral-gray-100 px-16 py-[14px]"
|
|
1039
1039
|
}, [
|
|
@@ -1042,7 +1042,7 @@ const CampaignDtos = {
|
|
|
1042
1042
|
createElementVNode("span", _hoisted_7$4, [
|
|
1043
1043
|
createElementVNode("span", _hoisted_8$4, toDisplayString(s.label), 1),
|
|
1044
1044
|
s.complete ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_9$4, [
|
|
1045
|
-
|
|
1045
|
+
y[0] || (y[0] = createElementVNode("span", { class: "h-[6px] w-[6px] rounded-full bg-fm-color-system-error-400" }, null, -1)),
|
|
1046
1046
|
createTextVNode(" " + toDisplayString(unref(l)("connect.campaign.broadcast.messageMissing")), 1)
|
|
1047
1047
|
]))
|
|
1048
1048
|
])
|
|
@@ -1056,8 +1056,8 @@ const CampaignDtos = {
|
|
|
1056
1056
|
icon: "arrow_upward",
|
|
1057
1057
|
"icon-color": "neutral-gray-400",
|
|
1058
1058
|
variant: "tertiary",
|
|
1059
|
-
disabled:
|
|
1060
|
-
onClick: (
|
|
1059
|
+
disabled: g === 0,
|
|
1060
|
+
onClick: (m) => r.$emit("move", s.channel, -1)
|
|
1061
1061
|
}, null, 8, ["disabled", "onClick"])
|
|
1062
1062
|
], 8, _hoisted_11$2),
|
|
1063
1063
|
createElementVNode("span", {
|
|
@@ -1068,8 +1068,8 @@ const CampaignDtos = {
|
|
|
1068
1068
|
icon: "arrow_downward",
|
|
1069
1069
|
"icon-color": "neutral-gray-400",
|
|
1070
1070
|
variant: "tertiary",
|
|
1071
|
-
disabled:
|
|
1072
|
-
onClick: (
|
|
1071
|
+
disabled: g === e.rows.length - 1,
|
|
1072
|
+
onClick: (m) => r.$emit("move", s.channel, 1)
|
|
1073
1073
|
}, null, 8, ["disabled", "onClick"])
|
|
1074
1074
|
], 8, _hoisted_12$1),
|
|
1075
1075
|
createElementVNode("span", {
|
|
@@ -1080,12 +1080,12 @@ const CampaignDtos = {
|
|
|
1080
1080
|
icon: "delete",
|
|
1081
1081
|
"icon-color": "neutral-gray-400",
|
|
1082
1082
|
variant: "tertiary",
|
|
1083
|
-
onClick: (
|
|
1083
|
+
onClick: (m) => r.$emit("remove", s.channel)
|
|
1084
1084
|
}, null, 8, ["onClick"])
|
|
1085
1085
|
], 8, _hoisted_13$1)
|
|
1086
1086
|
])
|
|
1087
1087
|
]))), 128)),
|
|
1088
|
-
unref(i) ? (openBlock(), createBlock(
|
|
1088
|
+
unref(i) ? (openBlock(), createBlock(u, {
|
|
1089
1089
|
key: 0,
|
|
1090
1090
|
placement: "bottom-start"
|
|
1091
1091
|
}, {
|
|
@@ -1096,7 +1096,7 @@ const CampaignDtos = {
|
|
|
1096
1096
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(e.addable, (s) => (openBlock(), createBlock(n, {
|
|
1097
1097
|
key: s.channel,
|
|
1098
1098
|
label: s.label,
|
|
1099
|
-
onClick: (
|
|
1099
|
+
onClick: (g) => r.$emit("add", s.channel)
|
|
1100
1100
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
1101
1101
|
]),
|
|
1102
1102
|
_: 1
|
|
@@ -1168,10 +1168,10 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1168
1168
|
emits: ["retry-push", "update:model-value"],
|
|
1169
1169
|
setup(e, { emit: l }) {
|
|
1170
1170
|
const { t: o } = useI18n(), i = useDialog(), r = computed(() => {
|
|
1171
|
-
let
|
|
1172
|
-
return
|
|
1171
|
+
let f = "unavailable";
|
|
1172
|
+
return u.pushAvailability === "checking" ? f = "checking" : u.pushAvailability === "non-native" && (f = "requiresNativeApp"), o("connect.campaign.broadcast.pushAvailability." + f);
|
|
1173
1173
|
});
|
|
1174
|
-
function
|
|
1174
|
+
function y() {
|
|
1175
1175
|
i.open({
|
|
1176
1176
|
title: o("connect.campaign.broadcast.pushAvailability.contactSales"),
|
|
1177
1177
|
message: o("connect.campaign.broadcast.pushAvailability.dialogMessage"),
|
|
@@ -1181,42 +1181,42 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1181
1181
|
}
|
|
1182
1182
|
});
|
|
1183
1183
|
}
|
|
1184
|
-
const a = useCoreStore(), n = useMembershipStore(),
|
|
1185
|
-
const
|
|
1186
|
-
return
|
|
1184
|
+
const a = useCoreStore(), n = useMembershipStore(), u = e, s = l, g = ref(!1), m = ref("SMS"), p = computed(() => {
|
|
1185
|
+
const f = u.modelValue;
|
|
1186
|
+
return f && "channels" in f ? f : toDelivery({ message: f });
|
|
1187
1187
|
});
|
|
1188
|
-
function k(
|
|
1189
|
-
s("update:model-value",
|
|
1188
|
+
function k(f) {
|
|
1189
|
+
s("update:model-value", f);
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1192
|
-
return o(`connect.campaign.broadcast.channel.${
|
|
1191
|
+
function b(f) {
|
|
1192
|
+
return o(`connect.campaign.broadcast.channel.${f}`);
|
|
1193
1193
|
}
|
|
1194
|
-
const
|
|
1194
|
+
const v = {
|
|
1195
1195
|
SMS: "chat",
|
|
1196
1196
|
WHATSAPP: "chat",
|
|
1197
1197
|
EMAIL: "mail",
|
|
1198
1198
|
APP_INBOX: "inbox",
|
|
1199
1199
|
PUSH: "notifications"
|
|
1200
1200
|
};
|
|
1201
|
-
function c(
|
|
1202
|
-
return
|
|
1201
|
+
function c(f) {
|
|
1202
|
+
return v[f];
|
|
1203
1203
|
}
|
|
1204
|
-
const
|
|
1205
|
-
() =>
|
|
1206
|
-
(
|
|
1204
|
+
const d = computed(() => p.value.mode === "fallback"), h = computed(
|
|
1205
|
+
() => u.variables.filter(
|
|
1206
|
+
(f) => u.triggerType == "SCHEDULE" ? !f.startsWith("transaction.") : !0
|
|
1207
1207
|
)
|
|
1208
|
-
),
|
|
1209
|
-
function V(
|
|
1210
|
-
return
|
|
1208
|
+
), C = useChannelFlag();
|
|
1209
|
+
function V(f) {
|
|
1210
|
+
return C(f) === "off" ? !1 : f === "PUSH" ? u.pushAvailability === "native" : f === "WHATSAPP" ? g.value : !0;
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1214
|
-
|
|
1212
|
+
const B = ["fallback", "all"];
|
|
1213
|
+
function S(f) {
|
|
1214
|
+
f !== p.value.mode && k(setMode(p.value, f));
|
|
1215
1215
|
}
|
|
1216
|
-
const
|
|
1217
|
-
function
|
|
1216
|
+
const N = ref(null);
|
|
1217
|
+
function R(f) {
|
|
1218
1218
|
var $;
|
|
1219
|
-
const x = ($ =
|
|
1219
|
+
const x = ($ = N.value) == null ? void 0 : $[f];
|
|
1220
1220
|
return x ? new Intl.NumberFormat(void 0, {
|
|
1221
1221
|
style: "currency",
|
|
1222
1222
|
currency: x.currency,
|
|
@@ -1224,142 +1224,142 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1224
1224
|
maximumFractionDigits: x.precision
|
|
1225
1225
|
}).format(x.amount / 10 ** x.precision) : null;
|
|
1226
1226
|
}
|
|
1227
|
-
const
|
|
1227
|
+
const w = computed(
|
|
1228
1228
|
() => (
|
|
1229
1229
|
// A flagged-off channel stays visible while selected, so it can be removed.
|
|
1230
1230
|
CHANNEL_DISPLAY_ORDER.filter(
|
|
1231
|
-
(
|
|
1232
|
-
).map((
|
|
1233
|
-
const x =
|
|
1231
|
+
(f) => C(f) === "on" || p.value.channels.includes(f)
|
|
1232
|
+
).map((f) => {
|
|
1233
|
+
const x = p.value.channels.includes(f), $ = R(f);
|
|
1234
1234
|
let F = o("connect.campaign.broadcast.freeChannel");
|
|
1235
|
-
return isPaidChannel(
|
|
1236
|
-
channel:
|
|
1237
|
-
label:
|
|
1235
|
+
return isPaidChannel(f) && (F = $ ? o("connect.campaign.broadcast.perMessage", { price: $ }) : null), {
|
|
1236
|
+
channel: f,
|
|
1237
|
+
label: b(f),
|
|
1238
1238
|
selected: x,
|
|
1239
|
-
available: V(
|
|
1239
|
+
available: V(f),
|
|
1240
1240
|
rateNote: F,
|
|
1241
1241
|
// In fallback mode the grid is a radio for the primary channel, so only
|
|
1242
1242
|
// the primary reads as checked; a fallback is tagged instead.
|
|
1243
|
-
checked:
|
|
1244
|
-
usedAsFallback:
|
|
1243
|
+
checked: d.value ? p.value.channels[0] === f : x,
|
|
1244
|
+
usedAsFallback: d.value && p.value.channels.indexOf(f) > 0
|
|
1245
1245
|
};
|
|
1246
1246
|
})
|
|
1247
1247
|
)
|
|
1248
1248
|
);
|
|
1249
|
-
async function
|
|
1250
|
-
if (
|
|
1251
|
-
await O(
|
|
1249
|
+
async function T(f) {
|
|
1250
|
+
if (d.value) {
|
|
1251
|
+
await O(f);
|
|
1252
1252
|
return;
|
|
1253
1253
|
}
|
|
1254
|
-
if (
|
|
1255
|
-
await I(
|
|
1254
|
+
if (p.value.channels.includes(f)) {
|
|
1255
|
+
await I(f);
|
|
1256
1256
|
return;
|
|
1257
1257
|
}
|
|
1258
|
-
V(
|
|
1258
|
+
V(f) && k(addChannel(p.value, f, h.value));
|
|
1259
1259
|
}
|
|
1260
|
-
async function O(
|
|
1261
|
-
if (!V(
|
|
1262
|
-
const x =
|
|
1263
|
-
x !==
|
|
1260
|
+
async function O(f) {
|
|
1261
|
+
if (!V(f)) return;
|
|
1262
|
+
const x = p.value.channels[0];
|
|
1263
|
+
x !== f && (x && hasDraft(p.value, x) && !await prompt.remove(
|
|
1264
1264
|
o("connect.campaign.broadcast.replaceChannelConfirm", {
|
|
1265
|
-
channel:
|
|
1266
|
-
next:
|
|
1265
|
+
channel: b(x),
|
|
1266
|
+
next: b(f)
|
|
1267
1267
|
})
|
|
1268
|
-
) || V(
|
|
1268
|
+
) || V(f) && (k(setPrimaryChannel(p.value, f, h.value)), m.value = f));
|
|
1269
1269
|
}
|
|
1270
|
-
async function I(
|
|
1271
|
-
if (hasDraft(
|
|
1270
|
+
async function I(f) {
|
|
1271
|
+
if (hasDraft(p.value, f) && !await prompt.remove(
|
|
1272
1272
|
o("connect.campaign.broadcast.removeChannelConfirm", {
|
|
1273
|
-
channel:
|
|
1273
|
+
channel: b(f)
|
|
1274
1274
|
})
|
|
1275
1275
|
))
|
|
1276
1276
|
return;
|
|
1277
|
-
const x = removeChannel(
|
|
1278
|
-
k(x),
|
|
1277
|
+
const x = removeChannel(p.value, f);
|
|
1278
|
+
k(x), m.value === f && (m.value = x.channels[0] ?? "SMS");
|
|
1279
1279
|
}
|
|
1280
|
-
function Y(
|
|
1281
|
-
k(moveChannel(
|
|
1280
|
+
function Y(f, x) {
|
|
1281
|
+
k(moveChannel(p.value, f, x));
|
|
1282
1282
|
}
|
|
1283
|
-
function j(
|
|
1284
|
-
V(
|
|
1283
|
+
function j(f) {
|
|
1284
|
+
V(f) && k(addChannel(p.value, f, h.value));
|
|
1285
1285
|
}
|
|
1286
1286
|
const G = computed(
|
|
1287
|
-
() =>
|
|
1288
|
-
channel:
|
|
1289
|
-
label:
|
|
1287
|
+
() => p.value.channels.slice(1).map((f, x) => ({
|
|
1288
|
+
channel: f,
|
|
1289
|
+
label: b(f),
|
|
1290
1290
|
position: x + 2,
|
|
1291
|
-
complete: !
|
|
1291
|
+
complete: !u.showValidation || isChannelComplete(p.value, f)
|
|
1292
1292
|
}))
|
|
1293
1293
|
), q = computed(
|
|
1294
1294
|
() => CHANNEL_DISPLAY_ORDER.filter(
|
|
1295
|
-
(
|
|
1296
|
-
).map((
|
|
1297
|
-
channel:
|
|
1298
|
-
label:
|
|
1295
|
+
(f) => !p.value.channels.includes(f) && V(f)
|
|
1296
|
+
).map((f) => ({
|
|
1297
|
+
channel: f,
|
|
1298
|
+
label: b(f)
|
|
1299
1299
|
}))
|
|
1300
1300
|
), U = computed(
|
|
1301
|
-
() =>
|
|
1301
|
+
() => p.value.channels.map((f, x) => {
|
|
1302
1302
|
let $ = o("connect.campaign.broadcast.tab.sendsToEligible");
|
|
1303
|
-
|
|
1303
|
+
d.value && ($ = o(
|
|
1304
1304
|
x === 0 ? "connect.campaign.broadcast.tab.firstAttempt" : "connect.campaign.broadcast.tab.ifNotReached"
|
|
1305
1305
|
));
|
|
1306
1306
|
let F;
|
|
1307
|
-
return x > 0 && (F =
|
|
1308
|
-
key:
|
|
1309
|
-
label:
|
|
1307
|
+
return x > 0 && (F = d.value ? "→" : "+"), {
|
|
1308
|
+
key: f,
|
|
1309
|
+
label: b(f),
|
|
1310
1310
|
sub: $,
|
|
1311
|
-
complete: !
|
|
1312
|
-
step:
|
|
1311
|
+
complete: !u.showValidation || isChannelComplete(p.value, f),
|
|
1312
|
+
step: d.value ? x + 1 : void 0,
|
|
1313
1313
|
connector: F
|
|
1314
1314
|
};
|
|
1315
1315
|
})
|
|
1316
1316
|
);
|
|
1317
1317
|
watchEffect(() => {
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1318
|
+
const f = U.value.map((x) => x.key);
|
|
1319
|
+
f.length && !f.includes(m.value) && (m.value = f[0]);
|
|
1320
1320
|
});
|
|
1321
|
-
const D = computed(() =>
|
|
1322
|
-
const
|
|
1323
|
-
if (!(
|
|
1324
|
-
return
|
|
1321
|
+
const D = computed(() => m.value), Z = computed(() => {
|
|
1322
|
+
const f = D.value;
|
|
1323
|
+
if (!(f === "APP_INBOX" || f === "PUSH"))
|
|
1324
|
+
return p.value.content[f];
|
|
1325
1325
|
}), L = computed(
|
|
1326
|
-
() =>
|
|
1326
|
+
() => p.value.content.APP_INBOX
|
|
1327
1327
|
), M = computed(
|
|
1328
|
-
() =>
|
|
1328
|
+
() => p.value.content.PUSH
|
|
1329
1329
|
);
|
|
1330
|
-
function W(
|
|
1331
|
-
k(setChannelContent(
|
|
1330
|
+
function W(f) {
|
|
1331
|
+
k(setChannelContent(p.value, "APP_INBOX", f));
|
|
1332
1332
|
}
|
|
1333
|
-
function X(
|
|
1334
|
-
V("PUSH") && k(setChannelContent(
|
|
1333
|
+
function X(f) {
|
|
1334
|
+
V("PUSH") && k(setChannelContent(p.value, "PUSH", f));
|
|
1335
1335
|
}
|
|
1336
|
-
function K(
|
|
1337
|
-
|
|
1336
|
+
function K(f, x) {
|
|
1337
|
+
f === "APP_INBOX" || f === "PUSH" || k(setChannelContent(p.value, f, { ...x, channel: f }));
|
|
1338
1338
|
}
|
|
1339
1339
|
const H = computed(
|
|
1340
|
-
() =>
|
|
1340
|
+
() => p.value.channels.filter(isPaidChannel)
|
|
1341
1341
|
), J = computed(() => {
|
|
1342
1342
|
var x, $, F;
|
|
1343
|
-
const
|
|
1344
|
-
return getSmsMessageMetrics({ brandName:
|
|
1343
|
+
const f = ((x = n.membership) == null ? void 0 : x.brand) || ((F = ($ = a.currentBusiness) == null ? void 0 : $.value) == null ? void 0 : F.name) || "";
|
|
1344
|
+
return getSmsMessageMetrics({ brandName: f, content: "" }).prefix;
|
|
1345
1345
|
}), Q = `${define_appEndpoint_default.licensePortalUrl}settings?businessId=${SvcConfig.businessId}`;
|
|
1346
1346
|
async function ee() {
|
|
1347
1347
|
try {
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1348
|
+
const f = await membershipApi.getWhatsappNumbers();
|
|
1349
|
+
g.value = f.some(
|
|
1350
1350
|
(x) => {
|
|
1351
1351
|
var $;
|
|
1352
1352
|
return ($ = x == null ? void 0 : x.default) == null ? void 0 : $.includes("Marketing");
|
|
1353
1353
|
}
|
|
1354
1354
|
);
|
|
1355
|
-
} catch (
|
|
1356
|
-
console.error("Failed to fetch WhatsApp numbers:",
|
|
1355
|
+
} catch (f) {
|
|
1356
|
+
console.error("Failed to fetch WhatsApp numbers:", f);
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
1359
|
return onMounted(async () => {
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1362
|
-
}), (
|
|
1360
|
+
const f = p.value.channels[0];
|
|
1361
|
+
f && (m.value = f), campaignApi.readBroadcastCreditSummary().then((x) => N.value = x.prices).catch(() => N.value = null), await ee();
|
|
1362
|
+
}), (f, x) => {
|
|
1363
1363
|
const $ = resolveComponent("FmIcon"), F = resolveComponent("FmCard"), A = resolveComponent("FmButton");
|
|
1364
1364
|
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
1365
1365
|
createElementVNode("div", _hoisted_2$b, [
|
|
@@ -1368,31 +1368,31 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1368
1368
|
createElementVNode("div", _hoisted_4$8, toDisplayString(unref(o)("connect.campaign.broadcast.deliveryDescription")), 1)
|
|
1369
1369
|
]),
|
|
1370
1370
|
createElementVNode("div", _hoisted_5$6, [
|
|
1371
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(
|
|
1372
|
-
key:
|
|
1371
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(B, (E) => createVNode(F, {
|
|
1372
|
+
key: E,
|
|
1373
1373
|
variant: "outlined",
|
|
1374
1374
|
class: normalizeClass(["h-full cursor-pointer select-none p-16 space-y-8", {
|
|
1375
|
-
"border-fm-color-primary bg-fm-color-system-warning-100": unref(
|
|
1376
|
-
"hover:bg-fm-color-opacity-sm": unref(
|
|
1375
|
+
"border-fm-color-primary bg-fm-color-system-warning-100": unref(p).mode === E,
|
|
1376
|
+
"hover:bg-fm-color-opacity-sm": unref(p).mode !== E
|
|
1377
1377
|
}]),
|
|
1378
|
-
onClick: (P) =>
|
|
1378
|
+
onClick: (P) => S(E)
|
|
1379
1379
|
}, {
|
|
1380
1380
|
default: withCtx(() => [
|
|
1381
1381
|
createElementVNode("div", _hoisted_6$3, [
|
|
1382
|
-
createElementVNode("div", _hoisted_7$3, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${
|
|
1383
|
-
unref(
|
|
1382
|
+
createElementVNode("div", _hoisted_7$3, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${E}.label`)), 1),
|
|
1383
|
+
unref(p).mode === E ? (openBlock(), createBlock($, {
|
|
1384
1384
|
key: 0,
|
|
1385
1385
|
name: "check_circle",
|
|
1386
1386
|
size: "md",
|
|
1387
1387
|
class: "shrink-0 text-fm-color-primary"
|
|
1388
1388
|
})) : createCommentVNode("", !0)
|
|
1389
1389
|
]),
|
|
1390
|
-
createElementVNode("div", _hoisted_8$3, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${
|
|
1390
|
+
createElementVNode("div", _hoisted_8$3, toDisplayString(unref(o)(`connect.campaign.broadcast.mode.${E}.description`)), 1)
|
|
1391
1391
|
]),
|
|
1392
1392
|
_: 2
|
|
1393
1393
|
}, 1032, ["class", "onClick"])), 64))
|
|
1394
1394
|
]),
|
|
1395
|
-
unref(
|
|
1395
|
+
unref(p).channels.length < 2 ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
|
|
1396
1396
|
createVNode($, {
|
|
1397
1397
|
name: "info",
|
|
1398
1398
|
size: "sm",
|
|
@@ -1402,53 +1402,53 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1402
1402
|
])) : createCommentVNode("", !0)
|
|
1403
1403
|
]),
|
|
1404
1404
|
createElementVNode("div", _hoisted_10$3, [
|
|
1405
|
-
createElementVNode("div", _hoisted_11$1, toDisplayString(unref(
|
|
1405
|
+
createElementVNode("div", _hoisted_11$1, toDisplayString(unref(d) ? unref(o)("connect.campaign.broadcast.primaryChannel") : unref(o)("connect.campaign.broadcast.channels")), 1),
|
|
1406
1406
|
createElementVNode("div", _hoisted_12, [
|
|
1407
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
1408
|
-
key:
|
|
1407
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(w), (E) => (openBlock(), createBlock(F, {
|
|
1408
|
+
key: E.channel,
|
|
1409
1409
|
variant: "outlined",
|
|
1410
1410
|
class: normalizeClass(["flex h-full flex-col gap-12 p-16", [
|
|
1411
|
-
|
|
1412
|
-
|
|
1411
|
+
E.checked ? "!border-fm-color-primary bg-fm-color-system-warning-100" : "",
|
|
1412
|
+
E.available ? "cursor-pointer" : "cursor-not-allowed bg-fm-color-neutral-gray-100"
|
|
1413
1413
|
]]),
|
|
1414
|
-
"aria-disabled":
|
|
1415
|
-
onClick: (P) =>
|
|
1414
|
+
"aria-disabled": E.channel === "PUSH" ? void 0 : !E.available,
|
|
1415
|
+
onClick: (P) => T(E.channel)
|
|
1416
1416
|
}, {
|
|
1417
1417
|
default: withCtx(() => [
|
|
1418
1418
|
createElementVNode("div", _hoisted_13, [
|
|
1419
1419
|
createElementVNode("span", {
|
|
1420
1420
|
class: normalizeClass([
|
|
1421
1421
|
"flex h-[34px] w-[34px] flex-none items-center justify-center rounded-[8px]",
|
|
1422
|
-
|
|
1422
|
+
E.available ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-200 text-fm-color-neutral-gray-400"
|
|
1423
1423
|
])
|
|
1424
1424
|
}, [
|
|
1425
1425
|
createVNode($, {
|
|
1426
|
-
name: c(
|
|
1426
|
+
name: c(E.channel),
|
|
1427
1427
|
size: "md"
|
|
1428
1428
|
}, null, 8, ["name"])
|
|
1429
1429
|
], 2),
|
|
1430
|
-
|
|
1430
|
+
E.available ? (openBlock(), createElementBlock("span", {
|
|
1431
1431
|
key: 0,
|
|
1432
1432
|
class: normalizeClass(["flex h-[22px] w-[22px] flex-none items-center justify-center border-2 transition-colors", [
|
|
1433
|
-
unref(
|
|
1434
|
-
|
|
1433
|
+
unref(d) ? "rounded-full" : "rounded-[4px]",
|
|
1434
|
+
E.checked ? "border-fm-color-primary bg-fm-color-primary text-fm-color-typo-white" : "border-fm-color-neutral-gray-300 bg-fm-color-neutral-white"
|
|
1435
1435
|
]])
|
|
1436
1436
|
}, [
|
|
1437
|
-
|
|
1437
|
+
E.checked && !unref(d) ? (openBlock(), createBlock($, {
|
|
1438
1438
|
key: 0,
|
|
1439
1439
|
name: "check",
|
|
1440
1440
|
size: "sm"
|
|
1441
|
-
})) :
|
|
1441
|
+
})) : E.checked ? (openBlock(), createElementBlock("span", _hoisted_14)) : createCommentVNode("", !0)
|
|
1442
1442
|
], 2)) : createCommentVNode("", !0)
|
|
1443
1443
|
]),
|
|
1444
1444
|
createElementVNode("div", null, [
|
|
1445
1445
|
createElementVNode("div", {
|
|
1446
|
-
class: normalizeClass(["fm-typo-en-body-md-600",
|
|
1447
|
-
}, toDisplayString(
|
|
1448
|
-
|
|
1449
|
-
|
|
1446
|
+
class: normalizeClass(["fm-typo-en-body-md-600", E.available ? "" : "text-fm-color-typo-disabled"])
|
|
1447
|
+
}, toDisplayString(E.label), 3),
|
|
1448
|
+
E.available && E.rateNote ? (openBlock(), createElementBlock("div", _hoisted_15, toDisplayString(E.rateNote), 1)) : createCommentVNode("", !0),
|
|
1449
|
+
E.available ? E.usedAsFallback ? (openBlock(), createElementBlock("div", _hoisted_17, toDisplayString(unref(o)("connect.campaign.broadcast.usedAsFallback")), 1)) : createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_16, toDisplayString(E.channel === "PUSH" ? unref(r) : unref(o)("connect.campaign.broadcast.notSetUp")), 1))
|
|
1450
1450
|
]),
|
|
1451
|
-
|
|
1451
|
+
E.channel === "WHATSAPP" && !E.available ? (openBlock(), createElementBlock("a", {
|
|
1452
1452
|
key: 0,
|
|
1453
1453
|
href: Q,
|
|
1454
1454
|
target: "_blank",
|
|
@@ -1456,18 +1456,18 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1456
1456
|
onClick: x[0] || (x[0] = withModifiers(() => {
|
|
1457
1457
|
}, ["stop"]))
|
|
1458
1458
|
}, toDisplayString(unref(o)("connect.campaign.messageInput.manageWhatsappChannel")), 1)) : createCommentVNode("", !0),
|
|
1459
|
-
|
|
1459
|
+
E.channel === "PUSH" && !E.available ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1460
1460
|
e.pushAvailability === "non-native" ? (openBlock(), createBlock(A, {
|
|
1461
1461
|
key: 0,
|
|
1462
1462
|
label: unref(o)("connect.campaign.broadcast.pushAvailability.contactSales"),
|
|
1463
|
-
onClick: withModifiers(
|
|
1463
|
+
onClick: withModifiers(y, ["stop"])
|
|
1464
1464
|
}, null, 8, ["label"])) : createCommentVNode("", !0),
|
|
1465
1465
|
e.pushAvailability === "failed" ? (openBlock(), createBlock(A, {
|
|
1466
1466
|
key: 1,
|
|
1467
1467
|
label: unref(o)("connect.campaign.broadcast.pushAvailability.retry"),
|
|
1468
1468
|
onClick: x[1] || (x[1] = withModifiers((P) => s("retry-push"), ["stop"]))
|
|
1469
1469
|
}, null, 8, ["label"])) : createCommentVNode("", !0),
|
|
1470
|
-
|
|
1470
|
+
E.selected ? (openBlock(), createBlock(A, {
|
|
1471
1471
|
key: 2,
|
|
1472
1472
|
label: unref(o)("connect.campaign.broadcast.pushAvailability.removePush"),
|
|
1473
1473
|
onClick: x[2] || (x[2] = withModifiers((P) => I("PUSH"), ["stop"]))
|
|
@@ -1477,9 +1477,9 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1477
1477
|
_: 2
|
|
1478
1478
|
}, 1032, ["class", "aria-disabled", "onClick"]))), 128))
|
|
1479
1479
|
]),
|
|
1480
|
-
unref(
|
|
1481
|
-
e.showValidation && !unref(
|
|
1482
|
-
unref(
|
|
1480
|
+
unref(p).channels.includes("PUSH") && !V("PUSH") ? (openBlock(), createElementBlock("div", _hoisted_18, toDisplayString(unref(o)("connect.campaign.broadcast.pushAvailability.removeBeforeSave")), 1)) : createCommentVNode("", !0),
|
|
1481
|
+
e.showValidation && !unref(p).channels.length ? (openBlock(), createElementBlock("div", _hoisted_19, toDisplayString(unref(o)("connect.campaign.broadcast.selectChannelRequired")), 1)) : createCommentVNode("", !0),
|
|
1482
|
+
unref(d) && unref(p).channels.length ? (openBlock(), createBlock(_sfc_main$f, {
|
|
1483
1483
|
key: 2,
|
|
1484
1484
|
rows: unref(G),
|
|
1485
1485
|
addable: unref(q),
|
|
@@ -1497,41 +1497,41 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1497
1497
|
key: 0,
|
|
1498
1498
|
channels: unref(H)
|
|
1499
1499
|
}, null, 8, ["channels"])) : createCommentVNode("", !0),
|
|
1500
|
-
unref(
|
|
1501
|
-
unref(
|
|
1500
|
+
unref(p).channels.length ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(unref(o)("connect.campaign.broadcast.noChannelContent")), 1)),
|
|
1501
|
+
unref(p).channels.length ? (openBlock(), createBlock(_sfc_main$h, {
|
|
1502
1502
|
key: 2,
|
|
1503
|
-
modelValue: unref(
|
|
1504
|
-
"onUpdate:modelValue": x[3] || (x[3] = (
|
|
1503
|
+
modelValue: unref(m),
|
|
1504
|
+
"onUpdate:modelValue": x[3] || (x[3] = (E) => isRef(m) ? m.value = E : null),
|
|
1505
1505
|
tabs: unref(U)
|
|
1506
1506
|
}, null, 8, ["modelValue", "tabs"])) : createCommentVNode("", !0),
|
|
1507
|
-
unref(
|
|
1507
|
+
unref(p).channels.includes(unref(m)) ? (openBlock(), createElementBlock("div", _hoisted_24, [
|
|
1508
1508
|
createElementVNode("div", _hoisted_25, [
|
|
1509
|
-
unref(
|
|
1509
|
+
unref(m) === "PUSH" && unref(M) && V("PUSH") ? (openBlock(), createBlock(_sfc_main$i, {
|
|
1510
1510
|
key: 0,
|
|
1511
1511
|
"model-value": unref(M),
|
|
1512
1512
|
"show-validation": e.showValidation,
|
|
1513
1513
|
"onUpdate:modelValue": X
|
|
1514
|
-
}, null, 8, ["model-value", "show-validation"])) : unref(
|
|
1514
|
+
}, null, 8, ["model-value", "show-validation"])) : unref(m) === "PUSH" ? (openBlock(), createElementBlock("div", _hoisted_26, toDisplayString(unref(r)), 1)) : unref(m) === "APP_INBOX" && unref(L) ? (openBlock(), createBlock(_sfc_main$j, {
|
|
1515
1515
|
key: 2,
|
|
1516
1516
|
"model-value": unref(L),
|
|
1517
|
-
variables: unref(
|
|
1517
|
+
variables: unref(h),
|
|
1518
1518
|
"show-validation": e.showValidation,
|
|
1519
1519
|
"onUpdate:modelValue": W
|
|
1520
|
-
}, null, 8, ["model-value", "variables", "show-validation"])) : unref(
|
|
1521
|
-
key: unref(
|
|
1520
|
+
}, null, 8, ["model-value", "variables", "show-validation"])) : unref(m) !== "APP_INBOX" ? (openBlock(), createBlock(_sfc_main$s, {
|
|
1521
|
+
key: unref(m),
|
|
1522
1522
|
"model-value": unref(Z),
|
|
1523
1523
|
"allow-email": !1,
|
|
1524
1524
|
"allow-whatsapp": !1,
|
|
1525
1525
|
"hide-credit-card": !0,
|
|
1526
1526
|
"trigger-type": e.triggerType,
|
|
1527
|
-
variables: unref(
|
|
1527
|
+
variables: unref(h),
|
|
1528
1528
|
placeholder: e.placeholder,
|
|
1529
|
-
"onUpdate:modelValue": x[4] || (x[4] = (
|
|
1529
|
+
"onUpdate:modelValue": x[4] || (x[4] = (E) => K(unref(D), E))
|
|
1530
1530
|
}, null, 8, ["model-value", "trigger-type", "variables", "placeholder"])) : createCommentVNode("", !0)
|
|
1531
1531
|
]),
|
|
1532
1532
|
createVNode(_sfc_main$g, {
|
|
1533
|
-
target: unref(
|
|
1534
|
-
content: unref(
|
|
1533
|
+
target: unref(m),
|
|
1534
|
+
content: unref(p).content[unref(D)],
|
|
1535
1535
|
"sender-prefix": unref(J)
|
|
1536
1536
|
}, null, 8, ["target", "content", "sender-prefix"])
|
|
1537
1537
|
])) : createCommentVNode("", !0)
|
|
@@ -1558,29 +1558,29 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1558
1558
|
},
|
|
1559
1559
|
emits: ["update:model-value"],
|
|
1560
1560
|
setup(e, { emit: l }) {
|
|
1561
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
1562
|
-
() => CountryTimezone[
|
|
1561
|
+
const { t: o } = useI18n(), i = e, r = l, y = useCoreStore(), a = computed(
|
|
1562
|
+
() => CountryTimezone[y.currentCountry.value || "MY"]
|
|
1563
1563
|
);
|
|
1564
1564
|
function n() {
|
|
1565
|
-
const
|
|
1566
|
-
return
|
|
1565
|
+
const v = RuleBuilder.getRules(i.modelValue);
|
|
1566
|
+
return v.length == 0 ? "fixed" : v.some(
|
|
1567
1567
|
(c) => isRuleEntry(c) && RuleBuilder.simplify(c).operator == "_rrule"
|
|
1568
1568
|
) ? "repeating" : "fixed";
|
|
1569
1569
|
}
|
|
1570
|
-
const
|
|
1570
|
+
const u = ref(n()), s = ref(!1), g = computed(() => [
|
|
1571
1571
|
{ label: o("connect.template.rule.schedule.fixed"), value: "fixed" },
|
|
1572
1572
|
{ label: o("connect.template.rule.schedule.repeating"), value: "repeating" }
|
|
1573
|
-
]),
|
|
1574
|
-
const
|
|
1575
|
-
(
|
|
1576
|
-
),
|
|
1577
|
-
(
|
|
1573
|
+
]), m = computed(() => {
|
|
1574
|
+
const v = RuleBuilder.getRules(i.modelValue), c = v.find(
|
|
1575
|
+
(h) => isRuleEntry(h) && RuleBuilder.simplify(h).property == "trigger.date"
|
|
1576
|
+
), d = v.find(
|
|
1577
|
+
(h) => isRuleEntry(h) && RuleBuilder.simplify(h).property == "trigger.time"
|
|
1578
1578
|
);
|
|
1579
1579
|
return {
|
|
1580
1580
|
date: c ? RuleBuilder.simplify(c).equator : null,
|
|
1581
|
-
time:
|
|
1581
|
+
time: d ? RuleBuilder.simplify(d).equator : null
|
|
1582
1582
|
};
|
|
1583
|
-
}),
|
|
1583
|
+
}), p = computed(
|
|
1584
1584
|
() => calculateNextScheduleAt(
|
|
1585
1585
|
i.modelValue,
|
|
1586
1586
|
/* @__PURE__ */ new Date(),
|
|
@@ -1588,8 +1588,8 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1588
1588
|
i.endDate ? new Date(i.endDate) : void 0
|
|
1589
1589
|
)
|
|
1590
1590
|
);
|
|
1591
|
-
function k(
|
|
1592
|
-
const c =
|
|
1591
|
+
function k(v) {
|
|
1592
|
+
const c = v.value, d = c == "fixed" ? [
|
|
1593
1593
|
RuleBuilder.constructEntry(
|
|
1594
1594
|
"trigger.date",
|
|
1595
1595
|
"_isOnDate",
|
|
@@ -1608,23 +1608,23 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1608
1608
|
"update:model-value",
|
|
1609
1609
|
RuleBuilder.setRuleToGroup(
|
|
1610
1610
|
RuleBuilder.scaffoldGroup("g_schedule"),
|
|
1611
|
-
|
|
1611
|
+
d
|
|
1612
1612
|
)
|
|
1613
|
-
),
|
|
1613
|
+
), u.value = c;
|
|
1614
1614
|
}
|
|
1615
|
-
function v
|
|
1616
|
-
|
|
1615
|
+
function b(v) {
|
|
1616
|
+
u.value == "fixed" ? r(
|
|
1617
1617
|
"update:model-value",
|
|
1618
1618
|
RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
|
|
1619
1619
|
RuleBuilder.constructEntry(
|
|
1620
1620
|
"trigger.date",
|
|
1621
1621
|
"_isOnDate",
|
|
1622
|
-
|
|
1622
|
+
v.date
|
|
1623
1623
|
),
|
|
1624
1624
|
RuleBuilder.constructEntry(
|
|
1625
1625
|
"trigger.time",
|
|
1626
1626
|
"_isOnTime",
|
|
1627
|
-
|
|
1627
|
+
v.time
|
|
1628
1628
|
)
|
|
1629
1629
|
])
|
|
1630
1630
|
) : r(
|
|
@@ -1633,44 +1633,44 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1633
1633
|
RuleBuilder.constructEntry(
|
|
1634
1634
|
"trigger.date",
|
|
1635
1635
|
"_rrule",
|
|
1636
|
-
|
|
1636
|
+
v.date
|
|
1637
1637
|
),
|
|
1638
1638
|
RuleBuilder.constructEntry(
|
|
1639
1639
|
"trigger.time",
|
|
1640
1640
|
"_isOnTime",
|
|
1641
|
-
|
|
1641
|
+
v.time
|
|
1642
1642
|
)
|
|
1643
1643
|
])
|
|
1644
1644
|
);
|
|
1645
1645
|
}
|
|
1646
|
-
return (
|
|
1647
|
-
const
|
|
1646
|
+
return (v, c) => {
|
|
1647
|
+
const d = resolveComponent("FmButtonGroup"), h = resolveComponent("FmTimePicker"), C = resolveComponent("FmIcon"), V = resolveComponent("FmTooltip"), B = resolveComponent("FmField"), S = resolveComponent("FmCard"), N = resolveComponent("FmPopover"), R = resolveComponent("FmDatePicker"), w = resolveComponent("FmHelperText");
|
|
1648
1648
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1649
|
-
createVNode(
|
|
1650
|
-
items: unref(
|
|
1651
|
-
"model-value": unref(
|
|
1649
|
+
createVNode(d, {
|
|
1650
|
+
items: unref(g),
|
|
1651
|
+
"model-value": unref(g).find((T) => T.value === unref(u)) ?? null,
|
|
1652
1652
|
"onUpdate:modelValue": k,
|
|
1653
1653
|
class: "mb-8"
|
|
1654
1654
|
}, null, 8, ["items", "model-value"]),
|
|
1655
1655
|
createElementVNode("div", _hoisted_1$d, [
|
|
1656
1656
|
createElementVNode("div", _hoisted_2$a, [
|
|
1657
|
-
createVNode(
|
|
1657
|
+
createVNode(h, {
|
|
1658
1658
|
label: unref(o)("connect.template.rule.schedule.notify_time"),
|
|
1659
|
-
"model-value": unref(
|
|
1660
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
1661
|
-
"helper-text": unref(
|
|
1662
|
-
"helper-state": unref(
|
|
1659
|
+
"model-value": unref(m).time,
|
|
1660
|
+
"onUpdate:modelValue": c[0] || (c[0] = (T) => b({ date: unref(m).date, time: T })),
|
|
1661
|
+
"helper-text": unref(m).time ? void 0 : unref(o)("connect.template.rule.schedule.time_required"),
|
|
1662
|
+
"helper-state": unref(m).time ? void 0 : "error"
|
|
1663
1663
|
}, null, 8, ["label", "model-value", "helper-text", "helper-state"]),
|
|
1664
|
-
unref(
|
|
1664
|
+
unref(u) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
|
|
1665
1665
|
createElementVNode("div", _hoisted_4$7, [
|
|
1666
1666
|
createElementVNode("div", null, toDisplayString(unref(o)("connect.template.rule.schedule.notify_date")), 1),
|
|
1667
|
-
unref(
|
|
1667
|
+
unref(m).date ? (openBlock(), createBlock(V, {
|
|
1668
1668
|
key: 0,
|
|
1669
1669
|
"z-index": 9999,
|
|
1670
|
-
content: unref(SummarizeRrule)(unref(RRule).fromString(unref(
|
|
1670
|
+
content: unref(SummarizeRrule)(unref(RRule).fromString(unref(m).date).options)
|
|
1671
1671
|
}, {
|
|
1672
1672
|
default: withCtx(() => [
|
|
1673
|
-
createVNode(
|
|
1673
|
+
createVNode(C, {
|
|
1674
1674
|
name: "info",
|
|
1675
1675
|
size: "sm",
|
|
1676
1676
|
outline: !0
|
|
@@ -1679,30 +1679,30 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1679
1679
|
_: 1
|
|
1680
1680
|
}, 8, ["content"])) : createCommentVNode("", !0)
|
|
1681
1681
|
]),
|
|
1682
|
-
createVNode(
|
|
1682
|
+
createVNode(N, {
|
|
1683
1683
|
"show-popover": unref(s),
|
|
1684
|
-
onPopoverChanged: c[3] || (c[3] = (
|
|
1684
|
+
onPopoverChanged: c[3] || (c[3] = (T) => s.value = T)
|
|
1685
1685
|
}, {
|
|
1686
1686
|
"popover-button": withCtx(() => [
|
|
1687
|
-
createVNode(
|
|
1687
|
+
createVNode(B, {
|
|
1688
1688
|
class: "cursor-pointer",
|
|
1689
|
-
"helper-text": unref(
|
|
1690
|
-
"helper-state": unref(
|
|
1689
|
+
"helper-text": unref(m).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
|
|
1690
|
+
"helper-state": unref(m).date ? void 0 : "error"
|
|
1691
1691
|
}, {
|
|
1692
1692
|
default: withCtx(() => [
|
|
1693
|
-
createElementVNode("div", _hoisted_5$5, toDisplayString(unref(
|
|
1693
|
+
createElementVNode("div", _hoisted_5$5, toDisplayString(unref(m).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(m).date).options) : unref(o)("connect.template.rule.schedule.set_repeating_date")), 1)
|
|
1694
1694
|
]),
|
|
1695
1695
|
_: 1
|
|
1696
1696
|
}, 8, ["helper-text", "helper-state"])
|
|
1697
1697
|
]),
|
|
1698
1698
|
default: withCtx(() => [
|
|
1699
|
-
createVNode(
|
|
1699
|
+
createVNode(S, { class: "elevated p-8 w-[450px]" }, {
|
|
1700
1700
|
default: withCtx(() => [
|
|
1701
1701
|
createVNode(_sfc_main$t, {
|
|
1702
1702
|
"apply-button": !0,
|
|
1703
|
-
"model-value": unref(
|
|
1704
|
-
onCancel: c[1] || (c[1] = (
|
|
1705
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
1703
|
+
"model-value": unref(m).date || "",
|
|
1704
|
+
onCancel: c[1] || (c[1] = (T) => s.value = !1),
|
|
1705
|
+
"onUpdate:modelValue": c[2] || (c[2] = (T) => (b({ date: T, time: unref(m).time }), s.value = !1))
|
|
1706
1706
|
}, null, 8, ["model-value"])
|
|
1707
1707
|
]),
|
|
1708
1708
|
_: 1
|
|
@@ -1710,19 +1710,19 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1710
1710
|
]),
|
|
1711
1711
|
_: 1
|
|
1712
1712
|
}, 8, ["show-popover"])
|
|
1713
|
-
])) : (openBlock(), createBlock(
|
|
1713
|
+
])) : (openBlock(), createBlock(R, {
|
|
1714
1714
|
key: 1,
|
|
1715
1715
|
label: unref(o)("connect.template.rule.schedule.notify_date"),
|
|
1716
|
-
"model-value": unref(
|
|
1717
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
1718
|
-
"helper-text": unref(
|
|
1719
|
-
"helper-state": unref(
|
|
1716
|
+
"model-value": unref(m).date || "",
|
|
1717
|
+
"onUpdate:modelValue": c[4] || (c[4] = (T) => b({ date: T, time: unref(m).time })),
|
|
1718
|
+
"helper-text": unref(m).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
|
|
1719
|
+
"helper-state": unref(m).date ? void 0 : "error"
|
|
1720
1720
|
}, null, 8, ["label", "model-value", "helper-text", "helper-state"]))
|
|
1721
1721
|
]),
|
|
1722
|
-
unref(
|
|
1722
|
+
unref(m).date && unref(m).time && unref(p) ? (openBlock(), createBlock(w, {
|
|
1723
1723
|
key: 0,
|
|
1724
|
-
text: `${unref(moment)(unref(
|
|
1725
|
-
${unref(moment)(unref(
|
|
1724
|
+
text: `${unref(moment)(unref(p)).isAfter(unref(moment)()) ? unref(o)("connect.template.rule.schedule.next_notification") : unref(o)("connect.template.rule.schedule.last_trigger_on")} ${unref(moment)(unref(p)).format("dddd, DD MMM YYYY")} at
|
|
1725
|
+
${unref(moment)(unref(p)).format("hh:mmA")}(UTC${unref(moment).tz(unref(a)).format("Z")}) (${unref(moment)(unref(p)).fromNow()})`
|
|
1726
1726
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1727
1727
|
])
|
|
1728
1728
|
], 64);
|
|
@@ -1737,7 +1737,7 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1737
1737
|
},
|
|
1738
1738
|
emits: ["update:model-value"],
|
|
1739
1739
|
setup(e, { emit: l }) {
|
|
1740
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
1740
|
+
const { t: o } = useI18n(), i = e, r = l, y = computed(
|
|
1741
1741
|
() => [
|
|
1742
1742
|
{
|
|
1743
1743
|
label: o("connect.campaign.gameType.option.FORTUNE_WHEEL.label"),
|
|
@@ -1754,14 +1754,14 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1754
1754
|
].filter((a) => !a.hidden)
|
|
1755
1755
|
);
|
|
1756
1756
|
return (a, n) => {
|
|
1757
|
-
const
|
|
1757
|
+
const u = resolveComponent("FmCard");
|
|
1758
1758
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
1759
1759
|
createElementVNode("div", _hoisted_2$9, toDisplayString(unref(o)("connect.template.select_game")), 1),
|
|
1760
1760
|
createElementVNode("div", _hoisted_3$7, [
|
|
1761
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
1761
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(y), (s) => (openBlock(), createBlock(u, {
|
|
1762
1762
|
variant: "outlined",
|
|
1763
1763
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
1764
|
-
"col-span-2": unref(
|
|
1764
|
+
"col-span-2": unref(y).length == 1,
|
|
1765
1765
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == s.value,
|
|
1766
1766
|
"hover:bg-fm-color-opacity-sm": e.modelValue != s.value
|
|
1767
1767
|
}]),
|
|
@@ -1787,28 +1787,37 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1787
1787
|
__name: "EditRewardPoolSheet",
|
|
1788
1788
|
emits: ["update:model-value"],
|
|
1789
1789
|
setup(e, { expose: l, emit: o }) {
|
|
1790
|
-
const i = useMembershipStore(), { minor: r } = useLoading,
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
(c
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1790
|
+
const i = useMembershipStore(), { minor: r } = useLoading, y = ref(!1), a = ref(), n = ref(), u = ref(0), s = computed(
|
|
1791
|
+
() => {
|
|
1792
|
+
var c;
|
|
1793
|
+
return (c = i.loyaltyRewards.items.find(
|
|
1794
|
+
(d) => {
|
|
1795
|
+
var h;
|
|
1796
|
+
return d.value === ((h = a.value) == null ? void 0 : h.collectible);
|
|
1797
|
+
}
|
|
1798
|
+
)) == null ? void 0 : c.raw.type;
|
|
1799
|
+
}
|
|
1800
|
+
), g = computed(
|
|
1801
|
+
() => {
|
|
1802
|
+
var c;
|
|
1803
|
+
return ((c = a.value) == null ? void 0 : c.type) === "LOYALTY" && (s.value === "CREDIT" || s.value === "TITLE");
|
|
1804
|
+
}
|
|
1805
|
+
), m = computed(
|
|
1806
|
+
() => g.value ? FdoCreditLoyaltyReward : FdtoRandomReward
|
|
1807
|
+
), p = computed(() => {
|
|
1808
|
+
const c = m.value.safeParse(a.value);
|
|
1809
|
+
return c.success ? [] : c.error.errors;
|
|
1801
1810
|
});
|
|
1802
|
-
function
|
|
1803
|
-
|
|
1811
|
+
function k(c, d, h) {
|
|
1812
|
+
c && (a.value = d, u.value = h), y.value = c;
|
|
1804
1813
|
}
|
|
1805
|
-
const
|
|
1806
|
-
async function
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1814
|
+
const b = o;
|
|
1815
|
+
async function v() {
|
|
1816
|
+
const c = m.value.safeParse(a.value);
|
|
1817
|
+
c.success && (await r(
|
|
1809
1818
|
async () => {
|
|
1810
|
-
|
|
1811
|
-
|
|
1819
|
+
c.data.type === "VOUCHER" && n.value && (c.data.collectibleConfig.image = await firebaseStorage.update(
|
|
1820
|
+
c.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
|
|
1812
1821
|
n.value
|
|
1813
1822
|
));
|
|
1814
1823
|
},
|
|
@@ -1816,44 +1825,44 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1816
1825
|
message: "Uploading reward image",
|
|
1817
1826
|
successMessage: "Reward image updated"
|
|
1818
1827
|
}
|
|
1819
|
-
),
|
|
1828
|
+
), b("update:model-value", c.data, u.value));
|
|
1820
1829
|
}
|
|
1821
1830
|
return l({
|
|
1822
|
-
showSheet:
|
|
1823
|
-
}), (
|
|
1824
|
-
const
|
|
1825
|
-
return openBlock(), createBlock(
|
|
1831
|
+
showSheet: k
|
|
1832
|
+
}), (c, d) => {
|
|
1833
|
+
const h = resolveComponent("FmSelect"), C = resolveComponent("FmStepperField"), V = resolveComponent("FmButton"), B = resolveComponent("FmSideSheet");
|
|
1834
|
+
return openBlock(), createBlock(B, {
|
|
1826
1835
|
"max-width": 560,
|
|
1827
|
-
modelValue: unref(
|
|
1836
|
+
modelValue: unref(y),
|
|
1828
1837
|
"onUpdate:modelValue": [
|
|
1829
|
-
|
|
1830
|
-
|
|
1838
|
+
d[9] || (d[9] = (S) => isRef(y) ? y.value = S : null),
|
|
1839
|
+
d[10] || (d[10] = (S) => y.value = S)
|
|
1831
1840
|
],
|
|
1832
1841
|
header: "Edit reward",
|
|
1833
1842
|
"dismiss-away": ""
|
|
1834
1843
|
}, {
|
|
1835
1844
|
"side-sheet-footer": withCtx(() => [
|
|
1836
1845
|
createElementVNode("div", _hoisted_2$8, [
|
|
1837
|
-
createVNode(
|
|
1846
|
+
createVNode(V, {
|
|
1838
1847
|
variant: "primary",
|
|
1839
1848
|
type: "button",
|
|
1840
|
-
disabled: unref(
|
|
1849
|
+
disabled: unref(p).length > 0,
|
|
1841
1850
|
label: "Confirm",
|
|
1842
|
-
onClick:
|
|
1851
|
+
onClick: d[7] || (d[7] = (S) => v())
|
|
1843
1852
|
}, null, 8, ["disabled"]),
|
|
1844
|
-
createVNode(
|
|
1853
|
+
createVNode(V, {
|
|
1845
1854
|
variant: "secondary",
|
|
1846
1855
|
type: "button",
|
|
1847
1856
|
label: "Cancel",
|
|
1848
|
-
onClick:
|
|
1857
|
+
onClick: d[8] || (d[8] = (S) => y.value = !1)
|
|
1849
1858
|
})
|
|
1850
1859
|
])
|
|
1851
1860
|
]),
|
|
1852
1861
|
default: withCtx(() => {
|
|
1853
|
-
var
|
|
1862
|
+
var S;
|
|
1854
1863
|
return [
|
|
1855
1864
|
unref(a) ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
1856
|
-
createVNode(
|
|
1865
|
+
createVNode(h, {
|
|
1857
1866
|
label: "Reward Type",
|
|
1858
1867
|
items: [
|
|
1859
1868
|
{ label: "No Reward", value: "NO_REWARD" },
|
|
@@ -1861,12 +1870,12 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1861
1870
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
1862
1871
|
],
|
|
1863
1872
|
"model-value": unref(a).type,
|
|
1864
|
-
"onUpdate:modelValue":
|
|
1865
|
-
|
|
1873
|
+
"onUpdate:modelValue": d[0] || (d[0] = (N) => {
|
|
1874
|
+
N == "NO_REWARD" ? a.value = {
|
|
1866
1875
|
type: "NO_REWARD",
|
|
1867
1876
|
collectible: null,
|
|
1868
1877
|
weight: 1
|
|
1869
|
-
} :
|
|
1878
|
+
} : N === "VOUCHER" ? a.value = {
|
|
1870
1879
|
collectible: null,
|
|
1871
1880
|
type: "VOUCHER",
|
|
1872
1881
|
collectibleConfig: unref(initCollectibleConfig)("VOUCHER", {
|
|
@@ -1894,75 +1903,65 @@ const _hoisted_1$e = { class: "flex flex-col gap-[28px]" }, _hoisted_2$b = { cla
|
|
|
1894
1903
|
};
|
|
1895
1904
|
})
|
|
1896
1905
|
}, null, 8, ["model-value"]),
|
|
1897
|
-
unref(a).type == "LOYALTY" ? (openBlock(), createBlock(
|
|
1906
|
+
unref(a).type == "LOYALTY" ? (openBlock(), createBlock(h, {
|
|
1898
1907
|
key: 0,
|
|
1899
1908
|
label: "Loyalty type",
|
|
1900
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
1909
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(m), "collectible", [unref(a).type])],
|
|
1901
1910
|
items: unref(i).loyaltyRewards.items,
|
|
1902
1911
|
"model-value": unref(a).collectible,
|
|
1903
|
-
"onUpdate:modelValue":
|
|
1912
|
+
"onUpdate:modelValue": d[1] || (d[1] = (N) => unref(a).collectible = N)
|
|
1904
1913
|
}, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
|
|
1905
|
-
createVNode(
|
|
1914
|
+
createVNode(C, {
|
|
1906
1915
|
label: "Weight",
|
|
1907
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
1916
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(m), "weight", [unref(a).type])],
|
|
1908
1917
|
"model-value": unref(a).weight,
|
|
1909
|
-
"onUpdate:modelValue":
|
|
1918
|
+
"onUpdate:modelValue": d[2] || (d[2] = (N) => a.value = {
|
|
1910
1919
|
...unref(a),
|
|
1911
|
-
weight:
|
|
1920
|
+
weight: N
|
|
1912
1921
|
})
|
|
1913
1922
|
}, null, 8, ["rules", "model-value"]),
|
|
1914
1923
|
unref(a).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1915
|
-
(
|
|
1916
|
-
(
|
|
1917
|
-
var T;
|
|
1918
|
-
return C.value === ((T = unref(a)) == null ? void 0 : T.collectible);
|
|
1919
|
-
}
|
|
1920
|
-
)) == null ? void 0 : V.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1921
|
-
m[11] || (m[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
|
|
1924
|
+
unref(s) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1925
|
+
d[11] || (d[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
|
|
1922
1926
|
createVNode(_sfc_main$u, {
|
|
1923
1927
|
class: "mt-[-8px]",
|
|
1924
1928
|
rules: [
|
|
1925
|
-
unref(ZodHelper).ruleAtPath(unref(
|
|
1929
|
+
unref(ZodHelper).ruleAtPath(unref(m), "earningOption", [unref(a).type])
|
|
1926
1930
|
],
|
|
1927
|
-
"helper-state": unref(ZodHelper).helperState(unref(
|
|
1928
|
-
"error-text": unref(ZodHelper).helperText(unref(
|
|
1931
|
+
"helper-state": unref(ZodHelper).helperState(unref(p), "earningOption"),
|
|
1932
|
+
"error-text": unref(ZodHelper).helperText(unref(p), "earningOption"),
|
|
1929
1933
|
"fixed-type": !0,
|
|
1930
1934
|
"model-value": unref(a).earningOption,
|
|
1931
|
-
"onUpdate:modelValue":
|
|
1935
|
+
"onUpdate:modelValue": d[3] || (d[3] = (N) => a.value = {
|
|
1932
1936
|
...unref(a),
|
|
1933
|
-
earningOption:
|
|
1937
|
+
earningOption: N
|
|
1934
1938
|
})
|
|
1935
1939
|
}, null, 8, ["rules", "helper-state", "error-text", "model-value"])
|
|
1936
1940
|
], 64)) : createCommentVNode("", !0),
|
|
1937
|
-
|
|
1941
|
+
d[12] || (d[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
|
|
1938
1942
|
createVNode(_sfc_main$v, {
|
|
1939
1943
|
type: unref(a).type === "LOYALTY" ? "custom" : "range",
|
|
1940
|
-
"for-credit": unref(
|
|
1941
|
-
(C) => {
|
|
1942
|
-
var T;
|
|
1943
|
-
return C.value === ((T = unref(a)) == null ? void 0 : T.collectible);
|
|
1944
|
-
}
|
|
1945
|
-
)) == null ? void 0 : S.raw.type) === "CREDIT",
|
|
1944
|
+
"for-credit": unref(g),
|
|
1946
1945
|
class: "!gap-24",
|
|
1947
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
1946
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(m), "validityOption", [unref(a).type])],
|
|
1948
1947
|
"model-value": unref(a).validityOption,
|
|
1949
|
-
"onUpdate:modelValue":
|
|
1948
|
+
"onUpdate:modelValue": d[4] || (d[4] = (N) => a.value = {
|
|
1950
1949
|
...unref(a),
|
|
1951
|
-
validityOption:
|
|
1950
|
+
validityOption: N
|
|
1952
1951
|
})
|
|
1953
1952
|
}, null, 8, ["type", "for-credit", "rules", "model-value"])
|
|
1954
1953
|
], 64)) : createCommentVNode("", !0),
|
|
1955
1954
|
unref(a).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$w, {
|
|
1956
1955
|
key: 2,
|
|
1957
1956
|
"reward-image": unref(n),
|
|
1958
|
-
"model-value": ((
|
|
1959
|
-
"onUpdate:modelValue":
|
|
1957
|
+
"model-value": ((S = unref(a)) == null ? void 0 : S.collectibleConfig) ?? void 0,
|
|
1958
|
+
"onUpdate:modelValue": d[5] || (d[5] = (N) => a.value = {
|
|
1960
1959
|
...unref(a),
|
|
1961
|
-
collectibleConfig:
|
|
1960
|
+
collectibleConfig: N
|
|
1962
1961
|
}),
|
|
1963
|
-
"onUpdate:rewardImage":
|
|
1962
|
+
"onUpdate:rewardImage": d[6] || (d[6] = (N) => n.value = N)
|
|
1964
1963
|
}, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
|
|
1965
|
-
createVNode(JsonViewer, { json: unref(
|
|
1964
|
+
createVNode(JsonViewer, { json: unref(p) }, null, 8, ["json"])
|
|
1966
1965
|
])) : createCommentVNode("", !0)
|
|
1967
1966
|
];
|
|
1968
1967
|
}),
|
|
@@ -1990,36 +1989,36 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
1990
1989
|
},
|
|
1991
1990
|
emits: ["update:model-value"],
|
|
1992
1991
|
setup(e, { emit: l }) {
|
|
1993
|
-
const o = e, i = l, r = useMembershipStore(), { t:
|
|
1994
|
-
const
|
|
1995
|
-
return
|
|
1992
|
+
const o = e, i = l, r = useMembershipStore(), { t: y } = useI18n(), a = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), n = computed(() => o.modelValue ?? []), u = computed(() => {
|
|
1993
|
+
const v = a.safeParse(n.value);
|
|
1994
|
+
return v.success ? [] : v.error.errors;
|
|
1996
1995
|
}), s = ref();
|
|
1997
|
-
function
|
|
1998
|
-
var
|
|
1999
|
-
const
|
|
2000
|
-
|
|
2001
|
-
}
|
|
2002
|
-
function
|
|
2003
|
-
const c =
|
|
2004
|
-
(
|
|
2005
|
-
),
|
|
1996
|
+
function g(v, c) {
|
|
1997
|
+
var h;
|
|
1998
|
+
const d = [...n.value];
|
|
1999
|
+
d[c] = v, (h = s.value) == null || h.showSheet(!1), i("update:model-value", d);
|
|
2000
|
+
}
|
|
2001
|
+
function m(v) {
|
|
2002
|
+
const c = v.type == "VOUCHER" ? v.collectibleConfig : r.collectibles.find(
|
|
2003
|
+
(C) => C._id.toString() == v.collectible
|
|
2004
|
+
), d = CollectionUtils.formattedType((c == null ? void 0 : c.name) || ""), h = v.weight;
|
|
2006
2005
|
return {
|
|
2007
|
-
label: isNullOrEmpty(
|
|
2008
|
-
sublabel: `${
|
|
2006
|
+
label: isNullOrEmpty(d) ? "NO REWARD" : d,
|
|
2007
|
+
sublabel: `${h} (${(h / n.value.reduce((C, V) => C + V.weight, 0) * 100).toFixed(2)}%)`
|
|
2009
2008
|
};
|
|
2010
2009
|
}
|
|
2011
|
-
function
|
|
2012
|
-
var
|
|
2010
|
+
function p(v) {
|
|
2011
|
+
var d;
|
|
2013
2012
|
const c = [...n.value];
|
|
2014
|
-
(
|
|
2013
|
+
(d = s.value) == null || d.showSheet(!0, c[v], v);
|
|
2015
2014
|
}
|
|
2016
|
-
function k(
|
|
2015
|
+
function k(v) {
|
|
2017
2016
|
const c = [...n.value];
|
|
2018
|
-
c.splice(
|
|
2017
|
+
c.splice(v, 1), i("update:model-value", c);
|
|
2019
2018
|
}
|
|
2020
|
-
function
|
|
2021
|
-
var
|
|
2022
|
-
(
|
|
2019
|
+
function b() {
|
|
2020
|
+
var v;
|
|
2021
|
+
(v = s.value) == null || v.showSheet(
|
|
2023
2022
|
!0,
|
|
2024
2023
|
{
|
|
2025
2024
|
type: "NO_REWARD",
|
|
@@ -2029,39 +2028,39 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2029
2028
|
n.value.length
|
|
2030
2029
|
);
|
|
2031
2030
|
}
|
|
2032
|
-
return (
|
|
2033
|
-
const
|
|
2031
|
+
return (v, c) => {
|
|
2032
|
+
const d = resolveComponent("FmButton"), h = resolveComponent("FmCard"), C = resolveComponent("FmHelperText");
|
|
2034
2033
|
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
2035
|
-
createElementVNode("div", _hoisted_2$7, toDisplayString(unref(
|
|
2036
|
-
createVNode(
|
|
2037
|
-
label: unref(
|
|
2038
|
-
onClick: c[0] || (c[0] = (V) =>
|
|
2034
|
+
createElementVNode("div", _hoisted_2$7, toDisplayString(unref(y)("connect.template.configure_reward_type")), 1),
|
|
2035
|
+
createVNode(d, {
|
|
2036
|
+
label: unref(y)("connect.campaign.rewardPool.addReward"),
|
|
2037
|
+
onClick: c[0] || (c[0] = (V) => b()),
|
|
2039
2038
|
variant: "plain",
|
|
2040
2039
|
icon: "add"
|
|
2041
2040
|
}, null, 8, ["label"]),
|
|
2042
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (V,
|
|
2043
|
-
key:
|
|
2041
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (V, B) => (openBlock(), createBlock(h, {
|
|
2042
|
+
key: B,
|
|
2044
2043
|
class: "px-16 py-12 flex items-center justify-between cursor-pointer",
|
|
2045
2044
|
variant: "outlined",
|
|
2046
|
-
onClick: (
|
|
2045
|
+
onClick: (S) => p(B)
|
|
2047
2046
|
}, {
|
|
2048
2047
|
default: withCtx(() => {
|
|
2049
|
-
var
|
|
2048
|
+
var S;
|
|
2050
2049
|
return [
|
|
2051
2050
|
createElementVNode("div", null, [
|
|
2052
|
-
createElementVNode("div", _hoisted_3$6, toDisplayString(V.type == "LOYALTY" ? (
|
|
2053
|
-
createElementVNode("div", _hoisted_4$5, toDisplayString(
|
|
2051
|
+
createElementVNode("div", _hoisted_3$6, toDisplayString(V.type == "LOYALTY" ? (S = V == null ? void 0 : V.earningOption) == null ? void 0 : S.amount : "") + " " + toDisplayString(m(V).label), 1),
|
|
2052
|
+
createElementVNode("div", _hoisted_4$5, toDisplayString(m(V).sublabel), 1)
|
|
2054
2053
|
]),
|
|
2055
|
-
createVNode(
|
|
2054
|
+
createVNode(d, {
|
|
2056
2055
|
icon: "delete",
|
|
2057
2056
|
variant: "tertiary",
|
|
2058
|
-
onClick: (
|
|
2057
|
+
onClick: (N) => (N.stopPropagation(), k(B))
|
|
2059
2058
|
}, null, 8, ["onClick"])
|
|
2060
2059
|
];
|
|
2061
2060
|
}),
|
|
2062
2061
|
_: 2
|
|
2063
2062
|
}, 1032, ["onClick"]))), 128)),
|
|
2064
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
2063
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u).filter((V) => V.path.join(".") == ""), (V) => (openBlock(), createBlock(C, {
|
|
2065
2064
|
key: V.message,
|
|
2066
2065
|
text: V.message,
|
|
2067
2066
|
state: "error"
|
|
@@ -2069,7 +2068,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2069
2068
|
createVNode(_sfc_main$b, {
|
|
2070
2069
|
ref_key: "sheetRef",
|
|
2071
2070
|
ref: s,
|
|
2072
|
-
"onUpdate:modelValue":
|
|
2071
|
+
"onUpdate:modelValue": g
|
|
2073
2072
|
}, null, 512)
|
|
2074
2073
|
]);
|
|
2075
2074
|
};
|
|
@@ -2086,7 +2085,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2086
2085
|
},
|
|
2087
2086
|
emits: ["update:model-value"],
|
|
2088
2087
|
setup(e, { emit: l }) {
|
|
2089
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
2088
|
+
const { t: o } = useI18n(), i = e, r = l, y = computed(() => [
|
|
2090
2089
|
{
|
|
2091
2090
|
label: o("connect.template.promotion_game.rock_paper_scissors.label"),
|
|
2092
2091
|
description: o("connect.template.promotion_game.rock_paper_scissors.description"),
|
|
@@ -2094,39 +2093,39 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2094
2093
|
}
|
|
2095
2094
|
]);
|
|
2096
2095
|
return (a, n) => {
|
|
2097
|
-
var
|
|
2098
|
-
const
|
|
2096
|
+
var m, p, k;
|
|
2097
|
+
const u = resolveComponent("FmSwitch"), s = resolveComponent("FmCard"), g = resolveComponent("FmHelperText");
|
|
2099
2098
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
2100
|
-
createVNode(
|
|
2099
|
+
createVNode(u, {
|
|
2101
2100
|
label: unref(o)("connect.template.promotion_game.enable"),
|
|
2102
|
-
"model-value": !!((
|
|
2103
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
2101
|
+
"model-value": !!((m = e.modelValue) != null && m.gameType),
|
|
2102
|
+
"onUpdate:modelValue": n[0] || (n[0] = (b) => b ? r("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : r("update:model-value", null))
|
|
2104
2103
|
}, null, 8, ["label", "model-value"]),
|
|
2105
|
-
((
|
|
2106
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
2107
|
-
var
|
|
2104
|
+
((p = e.modelValue) == null ? void 0 : p.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
|
|
2105
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(y), (b) => {
|
|
2106
|
+
var v, c;
|
|
2108
2107
|
return openBlock(), createBlock(s, {
|
|
2109
2108
|
variant: "outlined",
|
|
2110
2109
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
2111
|
-
"col-span-2": unref(
|
|
2112
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((
|
|
2113
|
-
"hover:bg-fm-color-opacity-sm": ((c = e.modelValue) == null ? void 0 : c.gameType) !=
|
|
2110
|
+
"col-span-2": unref(y).length == 1,
|
|
2111
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((v = e.modelValue) == null ? void 0 : v.gameType) == b.value,
|
|
2112
|
+
"hover:bg-fm-color-opacity-sm": ((c = e.modelValue) == null ? void 0 : c.gameType) != b.value
|
|
2114
2113
|
}]),
|
|
2115
2114
|
onClick: () => {
|
|
2116
|
-
var
|
|
2117
|
-
((
|
|
2115
|
+
var d;
|
|
2116
|
+
((d = i.modelValue) == null ? void 0 : d.gameType) != b.value && r("update:model-value", { gameType: b.value });
|
|
2118
2117
|
},
|
|
2119
|
-
key:
|
|
2118
|
+
key: b.value
|
|
2120
2119
|
}, {
|
|
2121
2120
|
default: withCtx(() => [
|
|
2122
|
-
createElementVNode("div", _hoisted_3$5, toDisplayString(
|
|
2123
|
-
createElementVNode("div", _hoisted_4$4, toDisplayString(
|
|
2121
|
+
createElementVNode("div", _hoisted_3$5, toDisplayString(b.label), 1),
|
|
2122
|
+
createElementVNode("div", _hoisted_4$4, toDisplayString(b.description), 1)
|
|
2124
2123
|
]),
|
|
2125
2124
|
_: 2
|
|
2126
2125
|
}, 1032, ["class", "onClick"]);
|
|
2127
2126
|
}), 128))
|
|
2128
2127
|
])) : createCommentVNode("", !0),
|
|
2129
|
-
((k = e.modelValue) == null ? void 0 : k.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(
|
|
2128
|
+
((k = e.modelValue) == null ? void 0 : k.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(g, {
|
|
2130
2129
|
key: 1,
|
|
2131
2130
|
text: unref(o)("connect.template.promotion_game.rock_paper_scissors.warning"),
|
|
2132
2131
|
state: "warning"
|
|
@@ -2143,7 +2142,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2143
2142
|
},
|
|
2144
2143
|
emits: ["update:model-value"],
|
|
2145
2144
|
setup(e, { emit: l }) {
|
|
2146
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
2145
|
+
const { t: o } = useI18n(), i = e, r = l, y = computed(() => [
|
|
2147
2146
|
{
|
|
2148
2147
|
label: o("connect.campaign.mission.typeOption.STAMP.label"),
|
|
2149
2148
|
description: o("connect.campaign.mission.typeOption.STAMP.description"),
|
|
@@ -2156,14 +2155,14 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2156
2155
|
}
|
|
2157
2156
|
]);
|
|
2158
2157
|
return (a, n) => {
|
|
2159
|
-
const
|
|
2158
|
+
const u = resolveComponent("FmCard");
|
|
2160
2159
|
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
2161
2160
|
createElementVNode("div", _hoisted_2$5, toDisplayString(unref(o)("connect.template.select_game")), 1),
|
|
2162
2161
|
createElementVNode("div", _hoisted_3$4, [
|
|
2163
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
2162
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(y), (s) => (openBlock(), createBlock(u, {
|
|
2164
2163
|
variant: "outlined",
|
|
2165
2164
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
2166
|
-
"col-span-2": unref(
|
|
2165
|
+
"col-span-2": unref(y).length == 1,
|
|
2167
2166
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == s.value,
|
|
2168
2167
|
"hover:bg-fm-color-opacity-sm": e.modelValue != s.value
|
|
2169
2168
|
}]),
|
|
@@ -2199,10 +2198,10 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2199
2198
|
setup(e, { emit: l }) {
|
|
2200
2199
|
const o = l;
|
|
2201
2200
|
return (i, r) => {
|
|
2202
|
-
const
|
|
2201
|
+
const y = resolveComponent("FmStepperField");
|
|
2203
2202
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2204
2203
|
r[1] || (r[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)),
|
|
2205
|
-
createVNode(
|
|
2204
|
+
createVNode(y, {
|
|
2206
2205
|
label: "Maximum to collect",
|
|
2207
2206
|
"model-value": e.modelValue || null,
|
|
2208
2207
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => o("update:model-value", a)),
|
|
@@ -2222,48 +2221,51 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2222
2221
|
},
|
|
2223
2222
|
emits: ["update:model-value"],
|
|
2224
2223
|
setup(e, { expose: l, emit: o }) {
|
|
2225
|
-
const i = e, r = useMembershipStore(), { minor:
|
|
2226
|
-
var
|
|
2227
|
-
|
|
2228
|
-
(
|
|
2229
|
-
var
|
|
2230
|
-
return
|
|
2224
|
+
const i = e, r = useMembershipStore(), { minor: y } = useLoading, a = ref(!1), n = ref(), u = ref(), s = ref(0), g = computed(() => {
|
|
2225
|
+
var h, C;
|
|
2226
|
+
const d = (h = r.loyaltyRewards.items.find(
|
|
2227
|
+
(V) => {
|
|
2228
|
+
var B;
|
|
2229
|
+
return V.value === ((B = n.value) == null ? void 0 : B.collectible);
|
|
2231
2230
|
}
|
|
2232
|
-
)) == null ? void 0 :
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2231
|
+
)) == null ? void 0 : h.raw.type;
|
|
2232
|
+
return ((C = n.value) == null ? void 0 : C.type) === "LOYALTY" && (d === "CREDIT" || d === "TITLE");
|
|
2233
|
+
}), m = computed(
|
|
2234
|
+
() => g.value ? FdoThresholdCreditReward : FdtoThresholdReward
|
|
2235
|
+
), p = computed(() => {
|
|
2236
|
+
const d = m.value.safeParse(n.value);
|
|
2237
|
+
return d.success ? [] : d.error.errors;
|
|
2236
2238
|
});
|
|
2237
|
-
function
|
|
2238
|
-
|
|
2239
|
+
function k(d, h, C) {
|
|
2240
|
+
d && (n.value = h, s.value = C), a.value = d;
|
|
2239
2241
|
}
|
|
2240
|
-
const
|
|
2242
|
+
const b = o;
|
|
2241
2243
|
async function v() {
|
|
2242
|
-
const
|
|
2243
|
-
|
|
2244
|
+
const d = m.value.safeParse(n.value);
|
|
2245
|
+
d.success && (await y(
|
|
2244
2246
|
async () => {
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2247
|
+
d.data.type === "VOUCHER" && u.value && (d.data.collectibleConfig.image = await firebaseStorage.update(
|
|
2248
|
+
d.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, u.value),
|
|
2249
|
+
u.value
|
|
2248
2250
|
));
|
|
2249
2251
|
},
|
|
2250
2252
|
{
|
|
2251
2253
|
message: "Uploading reward image",
|
|
2252
2254
|
successMessage: "Reward image updated"
|
|
2253
2255
|
}
|
|
2254
|
-
),
|
|
2256
|
+
), b("update:model-value", d.data, s.value));
|
|
2255
2257
|
}
|
|
2256
|
-
const
|
|
2258
|
+
const c = ref();
|
|
2257
2259
|
return l({
|
|
2258
|
-
showSheet:
|
|
2259
|
-
}), (
|
|
2260
|
-
const
|
|
2260
|
+
showSheet: k
|
|
2261
|
+
}), (d, h) => {
|
|
2262
|
+
const C = resolveComponent("FmStepperField"), V = resolveComponent("FmSelect"), B = resolveComponent("FmForm"), S = resolveComponent("FmButton"), N = resolveComponent("FmSideSheet");
|
|
2261
2263
|
return openBlock(), createBlock(N, {
|
|
2262
2264
|
"max-width": 560,
|
|
2263
2265
|
modelValue: unref(a),
|
|
2264
2266
|
"onUpdate:modelValue": [
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
+
h[10] || (h[10] = (R) => isRef(a) ? a.value = R : null),
|
|
2268
|
+
h[11] || (h[11] = (R) => a.value = R)
|
|
2267
2269
|
],
|
|
2268
2270
|
header: "Edit reward",
|
|
2269
2271
|
"dismiss-away": ""
|
|
@@ -2275,32 +2277,32 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2275
2277
|
type: "button",
|
|
2276
2278
|
label: "Confirm",
|
|
2277
2279
|
disabled: unref(p).length > 0,
|
|
2278
|
-
onClick:
|
|
2279
|
-
var
|
|
2280
|
-
return (
|
|
2280
|
+
onClick: h[8] || (h[8] = async () => {
|
|
2281
|
+
var R;
|
|
2282
|
+
return (R = unref(c)) == null ? void 0 : R.validateInputs();
|
|
2281
2283
|
})
|
|
2282
2284
|
}, null, 8, ["disabled"]),
|
|
2283
2285
|
createVNode(S, {
|
|
2284
2286
|
variant: "secondary",
|
|
2285
2287
|
type: "button",
|
|
2286
2288
|
label: "Cancel",
|
|
2287
|
-
onClick:
|
|
2289
|
+
onClick: h[9] || (h[9] = (R) => a.value = !1)
|
|
2288
2290
|
})
|
|
2289
2291
|
])
|
|
2290
2292
|
]),
|
|
2291
2293
|
default: withCtx(() => [
|
|
2292
2294
|
createVNode(JsonViewer, { json: unref(n) }, null, 8, ["json"]),
|
|
2293
|
-
unref(n) ? (openBlock(), createBlock(
|
|
2295
|
+
unref(n) ? (openBlock(), createBlock(B, {
|
|
2294
2296
|
key: 0,
|
|
2295
2297
|
class: "flex flex-col gap-y-24",
|
|
2296
2298
|
ref_key: "formRef",
|
|
2297
|
-
ref:
|
|
2298
|
-
onValidationSuccess:
|
|
2299
|
+
ref: c,
|
|
2300
|
+
onValidationSuccess: h[7] || (h[7] = (R) => v())
|
|
2299
2301
|
}, {
|
|
2300
2302
|
default: withCtx(() => {
|
|
2301
|
-
var
|
|
2303
|
+
var R;
|
|
2302
2304
|
return [
|
|
2303
|
-
unref(n).type ? (openBlock(), createBlock(
|
|
2305
|
+
unref(n).type ? (openBlock(), createBlock(C, {
|
|
2304
2306
|
key: 0,
|
|
2305
2307
|
label: "Threshold",
|
|
2306
2308
|
rules: [
|
|
@@ -2312,21 +2314,21 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2312
2314
|
)
|
|
2313
2315
|
],
|
|
2314
2316
|
"model-value": unref(n).threshold,
|
|
2315
|
-
"onUpdate:modelValue":
|
|
2317
|
+
"onUpdate:modelValue": h[0] || (h[0] = (w) => n.value = {
|
|
2316
2318
|
...unref(n),
|
|
2317
|
-
threshold:
|
|
2319
|
+
threshold: w
|
|
2318
2320
|
})
|
|
2319
2321
|
}, null, 8, ["rules", "model-value"])) : createCommentVNode("", !0),
|
|
2320
|
-
createVNode(
|
|
2322
|
+
createVNode(V, {
|
|
2321
2323
|
label: "Reward Type",
|
|
2322
2324
|
items: [
|
|
2323
2325
|
{ label: "Voucher", value: "VOUCHER" },
|
|
2324
2326
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
2325
2327
|
],
|
|
2326
2328
|
"model-value": unref(n).type,
|
|
2327
|
-
"onUpdate:modelValue":
|
|
2328
|
-
var
|
|
2329
|
-
|
|
2329
|
+
"onUpdate:modelValue": h[1] || (h[1] = (w) => {
|
|
2330
|
+
var T, O;
|
|
2331
|
+
w === "VOUCHER" ? n.value = {
|
|
2330
2332
|
collectible: null,
|
|
2331
2333
|
type: "VOUCHER",
|
|
2332
2334
|
collectibleConfig: unref(initCollectibleConfig)("VOUCHER", {
|
|
@@ -2339,7 +2341,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2339
2341
|
validityOption: {
|
|
2340
2342
|
validForDay: 7
|
|
2341
2343
|
},
|
|
2342
|
-
threshold: (
|
|
2344
|
+
threshold: (T = unref(n)) == null ? void 0 : T.threshold
|
|
2343
2345
|
} : n.value = {
|
|
2344
2346
|
collectible: unref(r).loyaltyRewards.raw[0]._id,
|
|
2345
2347
|
type: "LOYALTY",
|
|
@@ -2354,54 +2356,49 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2354
2356
|
};
|
|
2355
2357
|
})
|
|
2356
2358
|
}, null, 8, ["model-value"]),
|
|
2357
|
-
unref(n).type == "LOYALTY" ? (openBlock(), createBlock(
|
|
2359
|
+
unref(n).type == "LOYALTY" ? (openBlock(), createBlock(V, {
|
|
2358
2360
|
key: 1,
|
|
2359
2361
|
label: "Loyalty type",
|
|
2360
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
2362
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(m), "collectible", [unref(n).type])],
|
|
2361
2363
|
items: unref(r).loyaltyRewards.items,
|
|
2362
2364
|
"model-value": unref(n).collectible,
|
|
2363
|
-
"onUpdate:modelValue":
|
|
2365
|
+
"onUpdate:modelValue": h[2] || (h[2] = (w) => unref(n).collectible = w)
|
|
2364
2366
|
}, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
|
|
2365
2367
|
unref(n).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2366
|
-
|
|
2368
|
+
h[12] || (h[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
|
|
2367
2369
|
createVNode(_sfc_main$u, {
|
|
2368
2370
|
class: "mt-[-8px]",
|
|
2369
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
2371
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(m), "earningOption", [unref(n).type])],
|
|
2370
2372
|
"helper-state": unref(ZodHelper).helperState(unref(p), "earningOption"),
|
|
2371
2373
|
"error-text": unref(ZodHelper).helperText(unref(p), "earningOption"),
|
|
2372
2374
|
"fixed-type": !0,
|
|
2373
2375
|
"model-value": unref(n).earningOption,
|
|
2374
|
-
"onUpdate:modelValue":
|
|
2376
|
+
"onUpdate:modelValue": h[3] || (h[3] = (w) => n.value = {
|
|
2375
2377
|
...unref(n),
|
|
2376
|
-
earningOption:
|
|
2378
|
+
earningOption: w
|
|
2377
2379
|
})
|
|
2378
2380
|
}, null, 8, ["rules", "helper-state", "error-text", "model-value"]),
|
|
2379
2381
|
createVNode(_sfc_main$v, {
|
|
2380
2382
|
class: "!gap-24",
|
|
2381
2383
|
type: unref(n).type === "LOYALTY" ? "custom" : "range",
|
|
2382
|
-
"for-credit": unref(
|
|
2383
|
-
|
|
2384
|
-
var w;
|
|
2385
|
-
return R.value === ((w = unref(n)) == null ? void 0 : w.collectible);
|
|
2386
|
-
}
|
|
2387
|
-
)) == null ? void 0 : C.raw.type) === "CREDIT",
|
|
2388
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(h), "validityOption", [unref(n).type])],
|
|
2384
|
+
"for-credit": unref(g),
|
|
2385
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(m), "validityOption", [unref(n).type])],
|
|
2389
2386
|
"model-value": unref(n).validityOption,
|
|
2390
|
-
"onUpdate:modelValue":
|
|
2387
|
+
"onUpdate:modelValue": h[4] || (h[4] = (w) => n.value = {
|
|
2391
2388
|
...unref(n),
|
|
2392
|
-
validityOption:
|
|
2389
|
+
validityOption: w
|
|
2393
2390
|
})
|
|
2394
2391
|
}, null, 8, ["type", "for-credit", "rules", "model-value"])
|
|
2395
2392
|
], 64)) : createCommentVNode("", !0),
|
|
2396
2393
|
unref(n).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$w, {
|
|
2397
2394
|
key: 3,
|
|
2398
|
-
"reward-image": unref(
|
|
2399
|
-
"model-value": ((
|
|
2400
|
-
"onUpdate:modelValue":
|
|
2395
|
+
"reward-image": unref(u),
|
|
2396
|
+
"model-value": ((R = unref(n)) == null ? void 0 : R.collectibleConfig) ?? void 0,
|
|
2397
|
+
"onUpdate:modelValue": h[5] || (h[5] = (w) => n.value = {
|
|
2401
2398
|
...unref(n),
|
|
2402
|
-
collectibleConfig:
|
|
2399
|
+
collectibleConfig: w
|
|
2403
2400
|
}),
|
|
2404
|
-
"onUpdate:rewardImage":
|
|
2401
|
+
"onUpdate:rewardImage": h[6] || (h[6] = (w) => u.value = w)
|
|
2405
2402
|
}, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
|
|
2406
2403
|
createVNode(JsonViewer, { json: unref(p) }, null, 8, ["json"])
|
|
2407
2404
|
];
|
|
@@ -2437,19 +2434,19 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2437
2434
|
}
|
|
2438
2435
|
},
|
|
2439
2436
|
setup(e) {
|
|
2440
|
-
const l = e, { maxRange: o, currentRange: i, markers: r } = toRefs(l),
|
|
2437
|
+
const l = e, { maxRange: o, currentRange: i, markers: r } = toRefs(l), y = computed(
|
|
2441
2438
|
() => Math.min(i.value / o.value * 100, 100)
|
|
2442
2439
|
), a = (n) => n / o.value * 100;
|
|
2443
|
-
return (n,
|
|
2440
|
+
return (n, u) => {
|
|
2444
2441
|
const s = resolveComponent("FmIcon");
|
|
2445
2442
|
return e.type === "STAMP" ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
2446
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(o), 40), (
|
|
2443
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(o), 40), (g) => (openBlock(), createBlock(s, {
|
|
2447
2444
|
class: normalizeClass(
|
|
2448
|
-
unref(i) >=
|
|
2445
|
+
unref(i) >= g ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
|
|
2449
2446
|
),
|
|
2450
|
-
outline: unref(i) <
|
|
2451
|
-
key:
|
|
2452
|
-
name: unref(r).some((
|
|
2447
|
+
outline: unref(i) < g,
|
|
2448
|
+
key: g,
|
|
2449
|
+
name: unref(r).some((m) => m === g) ? "featured_seasonal_and_gifts" : "check_circle"
|
|
2453
2450
|
}, null, 8, ["class", "outline", "name"]))), 128))
|
|
2454
2451
|
])) : (openBlock(), createElementBlock("div", {
|
|
2455
2452
|
key: 1,
|
|
@@ -2457,18 +2454,18 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
|
|
|
2457
2454
|
}, [
|
|
2458
2455
|
createElementVNode("div", {
|
|
2459
2456
|
class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
|
|
2460
|
-
style: normalizeStyle({ width: unref(
|
|
2457
|
+
style: normalizeStyle({ width: unref(y) + "%" })
|
|
2461
2458
|
}, null, 4),
|
|
2462
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (
|
|
2463
|
-
key:
|
|
2459
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(r), (g, m) => (openBlock(), createElementBlock("div", {
|
|
2460
|
+
key: m,
|
|
2464
2461
|
class: "absolute -top-1.5 flex flex-col items-center -translate-x-1/2",
|
|
2465
|
-
style: normalizeStyle({ left: a(
|
|
2462
|
+
style: normalizeStyle({ left: a(g) + "%" })
|
|
2466
2463
|
}, [
|
|
2467
2464
|
createElementVNode("div", _hoisted_2$4, [
|
|
2468
2465
|
createElementVNode("div", {
|
|
2469
2466
|
class: normalizeClass(["h-16 w-[2px]", "bg-fm-color-system-warning-300"])
|
|
2470
2467
|
}),
|
|
2471
|
-
|
|
2468
|
+
u[0] || (u[0] = createElementVNode("div", null, "🎁", -1))
|
|
2472
2469
|
])
|
|
2473
2470
|
], 4))), 128))
|
|
2474
2471
|
]));
|
|
@@ -2481,11 +2478,11 @@ function changeKeysFactory(e) {
|
|
|
2481
2478
|
return o;
|
|
2482
2479
|
if (Array.isArray(o))
|
|
2483
2480
|
return o.map((a) => l(a, i - 1, r));
|
|
2484
|
-
const
|
|
2481
|
+
const y = Object.create(Object.getPrototypeOf(o));
|
|
2485
2482
|
return Object.keys(o).forEach((a) => {
|
|
2486
|
-
const n = o[a],
|
|
2487
|
-
|
|
2488
|
-
}),
|
|
2483
|
+
const n = o[a], u = e(a, r), s = l(n, i - 1, r);
|
|
2484
|
+
y[u] = s;
|
|
2485
|
+
}), y;
|
|
2489
2486
|
};
|
|
2490
2487
|
}
|
|
2491
2488
|
const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$2 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_5$2 = { class: "fm-typo-en-title-sm-800" }, _hoisted_6$2 = { class: "flex items-center gap-4" }, _hoisted_7$2 = { class: "fm-typo-en-body-lg-600" }, _hoisted_8$2 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_9$2 = { class: "flex items-center gap-16" }, _hoisted_10$2 = { key: 0 }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
@@ -2502,21 +2499,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2502
2499
|
},
|
|
2503
2500
|
emits: ["update:model-value"],
|
|
2504
2501
|
setup(e, { emit: l }) {
|
|
2505
|
-
const { t: o } = useI18n(), i = e, r = l,
|
|
2506
|
-
() => i.modelValue.sort((c,
|
|
2507
|
-
),
|
|
2502
|
+
const { t: o } = useI18n(), i = e, r = l, y = useMembershipStore(), a = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), n = computed(
|
|
2503
|
+
() => i.modelValue.sort((c, d) => c.threshold - d.threshold) ?? []
|
|
2504
|
+
), u = computed(() => {
|
|
2508
2505
|
const c = a.safeParse(n.value);
|
|
2509
2506
|
return c.success ? [] : c.error.errors;
|
|
2510
2507
|
}), s = ref();
|
|
2511
|
-
function
|
|
2512
|
-
var
|
|
2513
|
-
const
|
|
2514
|
-
|
|
2508
|
+
function g(c, d) {
|
|
2509
|
+
var C;
|
|
2510
|
+
const h = [...n.value];
|
|
2511
|
+
h[d] = c, (C = s.value) == null || C.showSheet(!1), r("update:model-value", h);
|
|
2515
2512
|
}
|
|
2516
|
-
function
|
|
2517
|
-
const
|
|
2513
|
+
function m(c) {
|
|
2514
|
+
const d = c.type == "VOUCHER" ? c.collectibleConfig : y.collectibles.find(
|
|
2518
2515
|
(V) => V._id.toString() == c.collectible
|
|
2519
|
-
),
|
|
2516
|
+
), h = CollectionUtils.formattedType((d == null ? void 0 : d.name) || ""), C = c.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
|
|
2520
2517
|
threshold: c.threshold,
|
|
2521
2518
|
amount: c.earningOption.amount
|
|
2522
2519
|
}) : o("connect.template.mission_pool.reward_sublabel_per_spend", {
|
|
@@ -2525,26 +2522,26 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2525
2522
|
every: c.earningOption.every
|
|
2526
2523
|
});
|
|
2527
2524
|
return {
|
|
2528
|
-
label: isNullOrEmpty(
|
|
2529
|
-
sublabel:
|
|
2525
|
+
label: isNullOrEmpty(h) ? o("connect.template.mission_pool.no_reward") : h,
|
|
2526
|
+
sublabel: C
|
|
2530
2527
|
};
|
|
2531
2528
|
}
|
|
2532
|
-
function
|
|
2533
|
-
var
|
|
2534
|
-
const
|
|
2535
|
-
(
|
|
2529
|
+
function p(c) {
|
|
2530
|
+
var h;
|
|
2531
|
+
const d = [...n.value];
|
|
2532
|
+
(h = s.value) == null || h.showSheet(!0, d[c], c);
|
|
2536
2533
|
}
|
|
2537
2534
|
function k(c) {
|
|
2538
|
-
const
|
|
2539
|
-
|
|
2535
|
+
const d = [...n.value];
|
|
2536
|
+
d.splice(c, 1), r("update:model-value", d);
|
|
2540
2537
|
}
|
|
2541
|
-
function
|
|
2538
|
+
function b() {
|
|
2542
2539
|
var c;
|
|
2543
2540
|
(c = s.value) == null || c.showSheet(
|
|
2544
2541
|
!0,
|
|
2545
2542
|
{
|
|
2546
2543
|
type: "LOYALTY",
|
|
2547
|
-
collectible:
|
|
2544
|
+
collectible: y.loyaltyRewards.items[0].value,
|
|
2548
2545
|
threshold: null,
|
|
2549
2546
|
validityOption: {
|
|
2550
2547
|
validForDay: 7
|
|
@@ -2557,60 +2554,60 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2557
2554
|
n.value.length
|
|
2558
2555
|
);
|
|
2559
2556
|
}
|
|
2560
|
-
function
|
|
2561
|
-
var
|
|
2562
|
-
return c.type == "VOUCHER" ? (
|
|
2563
|
-
((
|
|
2564
|
-
(
|
|
2565
|
-
)) == null ? void 0 :
|
|
2557
|
+
function v(c) {
|
|
2558
|
+
var d, h;
|
|
2559
|
+
return c.type == "VOUCHER" ? (d = c.collectibleConfig) == null ? void 0 : d.name : sentenceCase(
|
|
2560
|
+
((h = y.loyaltyRewards.items.find(
|
|
2561
|
+
(C) => C.value == c.collectible
|
|
2562
|
+
)) == null ? void 0 : h.label) || ""
|
|
2566
2563
|
);
|
|
2567
2564
|
}
|
|
2568
|
-
return (c,
|
|
2569
|
-
const
|
|
2565
|
+
return (c, d) => {
|
|
2566
|
+
const h = resolveComponent("FmButton"), C = resolveComponent("FmCard"), V = resolveComponent("FmHelperText");
|
|
2570
2567
|
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
2571
2568
|
createElementVNode("div", _hoisted_2$3, toDisplayString(unref(o)("connect.template.configure_reward_customer")), 1),
|
|
2572
|
-
createVNode(
|
|
2569
|
+
createVNode(h, {
|
|
2573
2570
|
label: unref(o)("connect.template.mission_pool.add_reward"),
|
|
2574
|
-
onClick:
|
|
2571
|
+
onClick: d[0] || (d[0] = (B) => b()),
|
|
2575
2572
|
variant: "plain",
|
|
2576
2573
|
icon: "add"
|
|
2577
2574
|
}, null, 8, ["label"]),
|
|
2578
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (
|
|
2579
|
-
key:
|
|
2575
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (B, S) => (openBlock(), createBlock(C, {
|
|
2576
|
+
key: S,
|
|
2580
2577
|
class: "px-16 py-12 flex items-center justify-between cursor-pointer",
|
|
2581
2578
|
variant: "outlined",
|
|
2582
|
-
onClick: (
|
|
2579
|
+
onClick: (N) => p(S)
|
|
2583
2580
|
}, {
|
|
2584
2581
|
default: withCtx(() => [
|
|
2585
2582
|
createElementVNode("div", null, [
|
|
2586
|
-
createElementVNode("div", _hoisted_3$3, toDisplayString(
|
|
2587
|
-
createElementVNode("div", _hoisted_4$2, toDisplayString(
|
|
2583
|
+
createElementVNode("div", _hoisted_3$3, toDisplayString(m(B).label), 1),
|
|
2584
|
+
createElementVNode("div", _hoisted_4$2, toDisplayString(m(B).sublabel), 1)
|
|
2588
2585
|
]),
|
|
2589
|
-
createVNode(
|
|
2586
|
+
createVNode(h, {
|
|
2590
2587
|
icon: "delete",
|
|
2591
2588
|
variant: "tertiary",
|
|
2592
|
-
onClick: (
|
|
2589
|
+
onClick: (N) => (N.stopPropagation(), k(S))
|
|
2593
2590
|
}, null, 8, ["onClick"])
|
|
2594
2591
|
]),
|
|
2595
2592
|
_: 2
|
|
2596
2593
|
}, 1032, ["onClick"]))), 128)),
|
|
2597
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
2598
|
-
key:
|
|
2599
|
-
text:
|
|
2594
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u).filter((B) => B.path.join(".") == ""), (B) => (openBlock(), createBlock(V, {
|
|
2595
|
+
key: B.message,
|
|
2596
|
+
text: B.message,
|
|
2600
2597
|
state: "error"
|
|
2601
2598
|
}, null, 8, ["text"]))), 128)),
|
|
2602
2599
|
createElementVNode("div", _hoisted_5$2, toDisplayString(unref(o)("connect.template.mission_pool.preview")), 1),
|
|
2603
|
-
(openBlock(), createBlock(
|
|
2600
|
+
(openBlock(), createBlock(C, {
|
|
2604
2601
|
key: 0,
|
|
2605
2602
|
variant: "outlined",
|
|
2606
2603
|
class: "p-24 space-y-16 w-fit"
|
|
2607
2604
|
}, {
|
|
2608
2605
|
default: withCtx(() => {
|
|
2609
|
-
var
|
|
2606
|
+
var B, S;
|
|
2610
2607
|
return [
|
|
2611
2608
|
createElementVNode("div", _hoisted_6$2, [
|
|
2612
2609
|
createElementVNode("div", null, [
|
|
2613
|
-
createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString(((
|
|
2610
|
+
createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString(((B = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : B.earningOption.amount) > 1 ? (S = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : S.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? v(e.modelValue[e.modelValue.length - 1]) : ""), 1),
|
|
2614
2611
|
createElementVNode("div", _hoisted_8$2, toDisplayString(unref(o)("connect.template.mission_pool.earn_stamp")), 1)
|
|
2615
2612
|
])
|
|
2616
2613
|
]),
|
|
@@ -2619,7 +2616,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2619
2616
|
type: e.mission.type,
|
|
2620
2617
|
"max-range": e.mission.end,
|
|
2621
2618
|
currentRange: e.mission.end / 4,
|
|
2622
|
-
markers: e.modelValue.map((
|
|
2619
|
+
markers: e.modelValue.map((N) => N.threshold)
|
|
2623
2620
|
}, null, 8, ["type", "max-range", "currentRange", "markers"]),
|
|
2624
2621
|
e.mission.type == "PROGRESSIVE" ? (openBlock(), createElementBlock("div", _hoisted_10$2, " 0/" + toDisplayString(e.mission.end.toLocaleString()), 1)) : createCommentVNode("", !0)
|
|
2625
2622
|
])
|
|
@@ -2630,7 +2627,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2630
2627
|
createVNode(_sfc_main$6, {
|
|
2631
2628
|
ref_key: "sheetRef",
|
|
2632
2629
|
ref: s,
|
|
2633
|
-
"onUpdate:modelValue":
|
|
2630
|
+
"onUpdate:modelValue": g,
|
|
2634
2631
|
"max-threshold": e.mission.end
|
|
2635
2632
|
}, null, 8, ["max-threshold"])
|
|
2636
2633
|
]);
|
|
@@ -2646,7 +2643,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2646
2643
|
const { t: o } = useI18n(), i = e, r = computed(() => {
|
|
2647
2644
|
const n = FdoMission.safeParse(i.modelValue);
|
|
2648
2645
|
return n.success ? [] : n.error.errors;
|
|
2649
|
-
}),
|
|
2646
|
+
}), y = computed(() => [
|
|
2650
2647
|
{
|
|
2651
2648
|
label: o("connect.campaign.mission.typeOption.STAMP.label"),
|
|
2652
2649
|
description: o("connect.campaign.mission.typeOption.STAMP.description"),
|
|
@@ -2658,36 +2655,36 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2658
2655
|
value: F_MISSION_TYPE.enum.PROGRESSIVE
|
|
2659
2656
|
}
|
|
2660
2657
|
]), a = l;
|
|
2661
|
-
return (n,
|
|
2662
|
-
var
|
|
2663
|
-
const s = resolveComponent("FmCard"),
|
|
2658
|
+
return (n, u) => {
|
|
2659
|
+
var m;
|
|
2660
|
+
const s = resolveComponent("FmCard"), g = resolveComponent("FmStepperField");
|
|
2664
2661
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
2665
2662
|
createElementVNode("div", _hoisted_2$2, [
|
|
2666
2663
|
createElementVNode("div", _hoisted_3$2, toDisplayString(unref(o)("connect.campaign.mission.missionType")), 1),
|
|
2667
2664
|
createElementVNode("div", _hoisted_4$1, toDisplayString(unref(o)("connect.template.select_game")), 1),
|
|
2668
2665
|
createElementVNode("div", _hoisted_5$1, [
|
|
2669
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
2670
|
-
var k,
|
|
2666
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(y), (p) => {
|
|
2667
|
+
var k, b;
|
|
2671
2668
|
return openBlock(), createBlock(s, {
|
|
2672
2669
|
variant: "outlined",
|
|
2673
2670
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
2674
|
-
"col-span-2": unref(
|
|
2675
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((k = e.modelValue) == null ? void 0 : k.type) ==
|
|
2676
|
-
"hover:bg-fm-color-opacity-sm": ((
|
|
2671
|
+
"col-span-2": unref(y).length == 1,
|
|
2672
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((k = e.modelValue) == null ? void 0 : k.type) == p.value,
|
|
2673
|
+
"hover:bg-fm-color-opacity-sm": ((b = e.modelValue) == null ? void 0 : b.type) != p.value
|
|
2677
2674
|
}]),
|
|
2678
2675
|
onClick: () => {
|
|
2679
|
-
var
|
|
2680
|
-
((
|
|
2676
|
+
var v, c;
|
|
2677
|
+
((v = e.modelValue) == null ? void 0 : v.type) != p.value && a("update:model-value", {
|
|
2681
2678
|
...e.modelValue,
|
|
2682
|
-
type:
|
|
2679
|
+
type: p.value,
|
|
2683
2680
|
end: ((c = e.modelValue) == null ? void 0 : c.end) || 1
|
|
2684
2681
|
});
|
|
2685
2682
|
},
|
|
2686
|
-
key:
|
|
2683
|
+
key: p.value
|
|
2687
2684
|
}, {
|
|
2688
2685
|
default: withCtx(() => [
|
|
2689
|
-
createElementVNode("div", _hoisted_6$1, toDisplayString(
|
|
2690
|
-
createElementVNode("div", _hoisted_7$1, toDisplayString(
|
|
2686
|
+
createElementVNode("div", _hoisted_6$1, toDisplayString(p.label), 1),
|
|
2687
|
+
createElementVNode("div", _hoisted_7$1, toDisplayString(p.description), 1)
|
|
2691
2688
|
]),
|
|
2692
2689
|
_: 2
|
|
2693
2690
|
}, 1032, ["class", "onClick"]);
|
|
@@ -2697,15 +2694,15 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2697
2694
|
createElementVNode("div", _hoisted_8$1, [
|
|
2698
2695
|
createElementVNode("div", _hoisted_9$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequired")), 1),
|
|
2699
2696
|
createElementVNode("div", _hoisted_10$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequiredDescription")), 1),
|
|
2700
|
-
createVNode(
|
|
2697
|
+
createVNode(g, {
|
|
2701
2698
|
label: unref(o)("connect.campaign.mission.maximumToCollect"),
|
|
2702
|
-
"model-value": ((
|
|
2703
|
-
"onUpdate:modelValue":
|
|
2699
|
+
"model-value": ((m = e.modelValue) == null ? void 0 : m.end) || null,
|
|
2700
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => {
|
|
2704
2701
|
var k;
|
|
2705
2702
|
return a("update:model-value", {
|
|
2706
2703
|
...e.modelValue,
|
|
2707
2704
|
type: ((k = e.modelValue) == null ? void 0 : k.type) || "STAMP",
|
|
2708
|
-
end:
|
|
2705
|
+
end: p
|
|
2709
2706
|
});
|
|
2710
2707
|
}),
|
|
2711
2708
|
"helper-text": unref(ZodHelper).helperText(unref(r), "end") || unref(o)("connect.campaign.mission.thresholdHelperText"),
|
|
@@ -2759,48 +2756,48 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2759
2756
|
},
|
|
2760
2757
|
emits: ["retry-push", "update:model-value", "update:file"],
|
|
2761
2758
|
setup(e, { emit: l }) {
|
|
2762
|
-
const { t: o } = useI18n(), { getLocaleText: i } = useLocaleText(), r = e,
|
|
2763
|
-
function a(
|
|
2759
|
+
const { t: o } = useI18n(), { getLocaleText: i } = useLocaleText(), r = e, y = l;
|
|
2760
|
+
function a(g) {
|
|
2764
2761
|
switch (r.field.type) {
|
|
2765
2762
|
case "timeframe":
|
|
2766
|
-
const
|
|
2767
|
-
|
|
2763
|
+
const m = g.startDate ? hooks(g.startDate).startOf("day").toISOString() : void 0, p = g.endDate ? hooks(g.endDate).endOf("day").toISOString() : void 0;
|
|
2764
|
+
y("update:model-value", {
|
|
2768
2765
|
type: "timeframe",
|
|
2769
2766
|
property: "__now",
|
|
2770
|
-
start:
|
|
2771
|
-
end:
|
|
2767
|
+
start: m,
|
|
2768
|
+
end: p
|
|
2772
2769
|
});
|
|
2773
2770
|
break;
|
|
2774
2771
|
case "image": {
|
|
2775
|
-
|
|
2772
|
+
y(
|
|
2776
2773
|
"update:file",
|
|
2777
|
-
|
|
2778
|
-
n.value || firebaseStorage.collectibleImagePath(void 0,
|
|
2774
|
+
g,
|
|
2775
|
+
n.value || firebaseStorage.collectibleImagePath(void 0, g)
|
|
2779
2776
|
);
|
|
2780
2777
|
break;
|
|
2781
2778
|
}
|
|
2782
2779
|
default:
|
|
2783
|
-
|
|
2780
|
+
y("update:model-value", g);
|
|
2784
2781
|
break;
|
|
2785
2782
|
}
|
|
2786
2783
|
}
|
|
2787
2784
|
const n = computed(() => {
|
|
2788
2785
|
switch (r.field.type) {
|
|
2789
2786
|
case "timeframe": {
|
|
2790
|
-
const
|
|
2787
|
+
const g = r.modelValue;
|
|
2791
2788
|
return {
|
|
2792
|
-
startDate:
|
|
2793
|
-
endDate:
|
|
2789
|
+
startDate: g != null && g.start ? hooks(g == null ? void 0 : g.start).format("YYYY-MM-DD") : null,
|
|
2790
|
+
endDate: g != null && g.end ? hooks(g == null ? void 0 : g.end).format("YYYY-MM-DD") : null
|
|
2794
2791
|
};
|
|
2795
2792
|
}
|
|
2796
2793
|
default:
|
|
2797
2794
|
return r.modelValue;
|
|
2798
2795
|
}
|
|
2799
2796
|
});
|
|
2800
|
-
function
|
|
2797
|
+
function u() {
|
|
2801
2798
|
if (!s.value.schema) return [];
|
|
2802
|
-
const
|
|
2803
|
-
return
|
|
2799
|
+
const g = s.value.schema.safeParse(r.modelValue);
|
|
2800
|
+
return g.success ? [] : g.error.errors;
|
|
2804
2801
|
}
|
|
2805
2802
|
const s = computed(() => ({
|
|
2806
2803
|
schema: r.schema,
|
|
@@ -2812,10 +2809,10 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2812
2809
|
i(r.field.label_locale, r.field.label ?? "")
|
|
2813
2810
|
) : void 0
|
|
2814
2811
|
}));
|
|
2815
|
-
return (
|
|
2816
|
-
var
|
|
2817
|
-
const
|
|
2818
|
-
return e.field.type === "text" ? (openBlock(), createBlock(
|
|
2812
|
+
return (g, m) => {
|
|
2813
|
+
var d, h, C, V, B;
|
|
2814
|
+
const p = resolveComponent("FmTextField"), k = resolveComponent("FmStepperField"), b = resolveComponent("FmTextarea"), v = resolveComponent("FmHelperText"), c = resolveComponent("FmSwitch");
|
|
2815
|
+
return e.field.type === "text" ? (openBlock(), createBlock(p, {
|
|
2819
2816
|
key: 0,
|
|
2820
2817
|
label: unref(i)(e.field.label_locale, e.field.label ?? ""),
|
|
2821
2818
|
"label-mark": unref(s).labelMark,
|
|
@@ -2837,7 +2834,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2837
2834
|
"helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
|
|
2838
2835
|
"helper-text": e.field.isRuleChildren ? e.helperText : void 0
|
|
2839
2836
|
}, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
|
|
2840
|
-
], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(
|
|
2837
|
+
], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(b, {
|
|
2841
2838
|
key: 2,
|
|
2842
2839
|
label: unref(i)(e.field.label_locale, e.field.label ?? ""),
|
|
2843
2840
|
"label-mark": unref(s).labelMark,
|
|
@@ -2845,7 +2842,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2845
2842
|
"model-value": unref(n),
|
|
2846
2843
|
"onUpdate:modelValue": a,
|
|
2847
2844
|
"show-word-count": "",
|
|
2848
|
-
"max-length": (
|
|
2845
|
+
"max-length": (B = (V = (C = (h = (d = unref(s)) == null ? void 0 : d.unwrapped) == null ? void 0 : h._def) == null ? void 0 : C.checks) == null ? void 0 : V.find((S) => S.kind == "max")) == null ? void 0 : B.value
|
|
2849
2846
|
}, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$m, {
|
|
2850
2847
|
key: 3,
|
|
2851
2848
|
"campaign-type": e.extras,
|
|
@@ -2857,10 +2854,10 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2857
2854
|
"model-value": unref(n),
|
|
2858
2855
|
"onUpdate:modelValue": a
|
|
2859
2856
|
}, null, 8, ["model-value"]),
|
|
2860
|
-
createVNode(
|
|
2857
|
+
createVNode(v, {
|
|
2861
2858
|
class: "!mt-[8px]",
|
|
2862
|
-
text: unref(ZodHelper).helperText(
|
|
2863
|
-
state: unref(ZodHelper).helperState(
|
|
2859
|
+
text: unref(ZodHelper).helperText(u(), ""),
|
|
2860
|
+
state: unref(ZodHelper).helperState(u(), "")
|
|
2864
2861
|
}, null, 8, ["text", "state"])
|
|
2865
2862
|
], 64)) : e.field.type === "image" ? (openBlock(), createBlock(_sfc_main$x, {
|
|
2866
2863
|
key: 5,
|
|
@@ -2899,7 +2896,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2899
2896
|
"onUpdate:modelValue": a,
|
|
2900
2897
|
"can-set-auto-apply": e.field.property == "campaign.effect"
|
|
2901
2898
|
}, null, 8, ["model-value", "can-set-auto-apply"]),
|
|
2902
|
-
unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(
|
|
2899
|
+
unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(v, {
|
|
2903
2900
|
key: 0,
|
|
2904
2901
|
class: "!mt-[8px]",
|
|
2905
2902
|
text: unref(o)("connect.campaign.common.effect_required"),
|
|
@@ -2909,22 +2906,22 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2909
2906
|
e.field.property === "campaign.message" ? (openBlock(), createBlock(_sfc_main$e, {
|
|
2910
2907
|
key: 0,
|
|
2911
2908
|
"push-availability": e.pushAvailability,
|
|
2912
|
-
onRetryPush:
|
|
2909
|
+
onRetryPush: m[0] || (m[0] = (S) => y("retry-push")),
|
|
2913
2910
|
"show-validation": e.showValidation,
|
|
2914
2911
|
"model-value": unref(n),
|
|
2915
2912
|
"onUpdate:modelValue": a,
|
|
2916
|
-
"helper-text": unref(ZodHelper).helperText(
|
|
2913
|
+
"helper-text": unref(ZodHelper).helperText(u(), ""),
|
|
2917
2914
|
"trigger-type": e.field.extras,
|
|
2918
|
-
"helper-state": unref(ZodHelper).helperState(
|
|
2915
|
+
"helper-state": unref(ZodHelper).helperState(u(), "")
|
|
2919
2916
|
}, null, 8, ["push-availability", "show-validation", "model-value", "helper-text", "trigger-type", "helper-state"])) : (openBlock(), createBlock(_sfc_main$s, {
|
|
2920
2917
|
key: 1,
|
|
2921
2918
|
"allow-email": !0,
|
|
2922
2919
|
"allow-whatsapp": !0,
|
|
2923
2920
|
"model-value": unref(n),
|
|
2924
2921
|
"onUpdate:modelValue": a,
|
|
2925
|
-
"helper-text": unref(ZodHelper).helperText(
|
|
2922
|
+
"helper-text": unref(ZodHelper).helperText(u(), ""),
|
|
2926
2923
|
"trigger-type": e.field.extras,
|
|
2927
|
-
"helper-state": unref(ZodHelper).helperState(
|
|
2924
|
+
"helper-state": unref(ZodHelper).helperState(u(), "")
|
|
2928
2925
|
}, null, 8, ["model-value", "helper-text", "trigger-type", "helper-state"]))
|
|
2929
2926
|
], 64)) : e.field.type === "earning_option" ? (openBlock(), createBlock(_sfc_main$u, {
|
|
2930
2927
|
key: 11,
|
|
@@ -2937,7 +2934,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2937
2934
|
type: "custom",
|
|
2938
2935
|
"model-value": unref(n),
|
|
2939
2936
|
"onUpdate:modelValue": a,
|
|
2940
|
-
"helper-text": e.helperText || unref(ZodHelper).helperText(
|
|
2937
|
+
"helper-text": e.helperText || unref(ZodHelper).helperText(u(), ""),
|
|
2941
2938
|
"for-credit": r.campaignType === "CREDIT"
|
|
2942
2939
|
}, null, 8, ["model-value", "helper-text", "for-credit"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
2943
2940
|
key: 13,
|
|
@@ -2959,8 +2956,8 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2959
2956
|
key: 17,
|
|
2960
2957
|
"model-value": unref(n),
|
|
2961
2958
|
"onUpdate:modelValue": a,
|
|
2962
|
-
"helper-text": unref(ZodHelper).helperText(
|
|
2963
|
-
"helper-state": unref(ZodHelper).helperState(
|
|
2959
|
+
"helper-text": unref(ZodHelper).helperText(u(), ""),
|
|
2960
|
+
"helper-state": unref(ZodHelper).helperState(u(), "")
|
|
2964
2961
|
}, null, 8, ["model-value", "helper-text", "helper-state"])) : e.field.type === "mission_pool" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
2965
2962
|
key: 18,
|
|
2966
2963
|
"model-value": unref(n),
|
|
@@ -2973,7 +2970,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2973
2970
|
"start-date": e.extras.start,
|
|
2974
2971
|
"end-date": e.extras.end
|
|
2975
2972
|
}, null, 8, ["model-value", "start-date", "end-date"]),
|
|
2976
|
-
e.helperText ? (openBlock(), createBlock(
|
|
2973
|
+
e.helperText ? (openBlock(), createBlock(v, {
|
|
2977
2974
|
key: 0,
|
|
2978
2975
|
class: "!mt-[8px]",
|
|
2979
2976
|
text: e.helperText,
|
|
@@ -2984,14 +2981,14 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
2984
2981
|
"model-value": unref(n),
|
|
2985
2982
|
"onUpdate:modelValue": a
|
|
2986
2983
|
}, null, 8, ["model-value"]),
|
|
2987
|
-
e.helperText ? (openBlock(), createBlock(
|
|
2984
|
+
e.helperText ? (openBlock(), createBlock(v, {
|
|
2988
2985
|
key: 0,
|
|
2989
2986
|
class: "!mt-[8px]",
|
|
2990
2987
|
text: e.helperText,
|
|
2991
2988
|
state: "error"
|
|
2992
2989
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
2993
2990
|
], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 21 }, [
|
|
2994
|
-
e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(
|
|
2991
|
+
e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(v, {
|
|
2995
2992
|
key: 0,
|
|
2996
2993
|
state: "warning",
|
|
2997
2994
|
text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
|
|
@@ -3000,7 +2997,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3000
2997
|
"model-value": unref(n),
|
|
3001
2998
|
"onUpdate:modelValue": a
|
|
3002
2999
|
}, null, 8, ["model-value"]),
|
|
3003
|
-
e.helperText ? (openBlock(), createBlock(
|
|
3000
|
+
e.helperText ? (openBlock(), createBlock(v, {
|
|
3004
3001
|
key: 1,
|
|
3005
3002
|
class: "!mt-[8px]",
|
|
3006
3003
|
text: e.helperText,
|
|
@@ -3011,7 +3008,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3011
3008
|
"model-value": unref(n),
|
|
3012
3009
|
"onUpdate:modelValue": a
|
|
3013
3010
|
}, null, 8, ["model-value"]),
|
|
3014
|
-
e.helperText ? (openBlock(), createBlock(
|
|
3011
|
+
e.helperText ? (openBlock(), createBlock(v, {
|
|
3015
3012
|
key: 0,
|
|
3016
3013
|
class: "!mt-[8px]",
|
|
3017
3014
|
text: e.helperText,
|
|
@@ -3022,7 +3019,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3022
3019
|
"model-value": unref(n),
|
|
3023
3020
|
"onUpdate:modelValue": a
|
|
3024
3021
|
}, null, 8, ["model-value"]),
|
|
3025
|
-
e.helperText ? (openBlock(), createBlock(
|
|
3022
|
+
e.helperText ? (openBlock(), createBlock(v, {
|
|
3026
3023
|
key: 0,
|
|
3027
3024
|
class: "!mt-[8px]",
|
|
3028
3025
|
text: e.helperText,
|
|
@@ -3033,7 +3030,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3033
3030
|
"model-value": unref(n),
|
|
3034
3031
|
"onUpdate:modelValue": a
|
|
3035
3032
|
}, null, 8, ["model-value"]),
|
|
3036
|
-
e.helperText ? (openBlock(), createBlock(
|
|
3033
|
+
e.helperText ? (openBlock(), createBlock(v, {
|
|
3037
3034
|
key: 0,
|
|
3038
3035
|
class: "!mt-[8px]",
|
|
3039
3036
|
text: e.helperText,
|
|
@@ -3044,7 +3041,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3044
3041
|
"model-value": unref(n),
|
|
3045
3042
|
"onUpdate:modelValue": a
|
|
3046
3043
|
}, null, 8, ["model-value"]),
|
|
3047
|
-
e.helperText ? (openBlock(), createBlock(
|
|
3044
|
+
e.helperText ? (openBlock(), createBlock(v, {
|
|
3048
3045
|
key: 0,
|
|
3049
3046
|
class: "!mt-[8px]",
|
|
3050
3047
|
text: e.helperText,
|
|
@@ -3066,7 +3063,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3066
3063
|
function i(r) {
|
|
3067
3064
|
return o(r) || o(r, "en-US");
|
|
3068
3065
|
}
|
|
3069
|
-
return (r,
|
|
3066
|
+
return (r, y) => {
|
|
3070
3067
|
const a = resolveComponent("FmCard");
|
|
3071
3068
|
return openBlock(), createBlock(a, {
|
|
3072
3069
|
variant: "outlined",
|
|
@@ -3074,13 +3071,13 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3074
3071
|
}, {
|
|
3075
3072
|
default: withCtx(() => [
|
|
3076
3073
|
createElementVNode("div", _hoisted_1$1, toDisplayString(unref(l)("connect.campaign.common.summary")), 1),
|
|
3077
|
-
|
|
3078
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (n,
|
|
3074
|
+
y[0] || (y[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
|
|
3075
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (n, u) => (openBlock(), createElementBlock("div", {
|
|
3079
3076
|
class: "space-y-4",
|
|
3080
|
-
key:
|
|
3077
|
+
key: u
|
|
3081
3078
|
}, [
|
|
3082
3079
|
n ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3083
|
-
createElementVNode("div", _hoisted_2$1, toDisplayString(unref(l)(`${
|
|
3080
|
+
createElementVNode("div", _hoisted_2$1, toDisplayString(unref(l)(`${u}`)), 1),
|
|
3084
3081
|
createElementVNode("div", _hoisted_3$1, toDisplayString(i(`${n}`) ? unref(l)(`${n}`) : n), 1)
|
|
3085
3082
|
], 64)) : createCommentVNode("", !0)
|
|
3086
3083
|
]))), 128))
|
|
@@ -3140,9 +3137,9 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3140
3137
|
await new Promise((i) => setTimeout(i, 120)), isLoading.value = !1;
|
|
3141
3138
|
}
|
|
3142
3139
|
template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((i, r) => {
|
|
3143
|
-
var
|
|
3140
|
+
var y;
|
|
3144
3141
|
if (i.campaign.type === "VOUCHER" && i.campaign.code) {
|
|
3145
|
-
const a = (
|
|
3142
|
+
const a = (y = i.campaign._id) == null ? void 0 : y.toString();
|
|
3146
3143
|
useCampaignStore().campaigns.voucher.some(
|
|
3147
3144
|
(n) => n.code === i.campaign.code && n._id.toString() !== a
|
|
3148
3145
|
) && r.addIssue({
|
|
@@ -3237,22 +3234,22 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3237
3234
|
return e === "campaign.message" ? "campaign.delivery" : e;
|
|
3238
3235
|
}
|
|
3239
3236
|
function onUpdateProperty(e, l) {
|
|
3240
|
-
var o, i, r,
|
|
3237
|
+
var o, i, r, y, a, n, u, s;
|
|
3241
3238
|
if (e === "campaign.message" && l && "channels" in l) {
|
|
3242
3239
|
_.set(data.value, "campaign.delivery", l);
|
|
3243
|
-
const
|
|
3244
|
-
|
|
3240
|
+
const g = toLegacyMessage(l);
|
|
3241
|
+
g ? _.set(data.value, "campaign.message", g) : delete data.value.campaign.message;
|
|
3245
3242
|
return;
|
|
3246
3243
|
}
|
|
3247
3244
|
if (_.set(data.value, e, l), e == "campaign.event.type") {
|
|
3248
|
-
const
|
|
3249
|
-
...(s = (
|
|
3245
|
+
const m = ((y = (r = (i = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : i.campaign) == null ? void 0 : r.event) == null ? void 0 : y.rule) ? _.cloneDeep({
|
|
3246
|
+
...(s = (u = (n = (a = template.value) == null ? void 0 : a.defaultValue) == null ? void 0 : n.campaign) == null ? void 0 : u.event) == null ? void 0 : s.rule
|
|
3250
3247
|
}) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
|
|
3251
3248
|
RuleBuilder.scaffoldGroup("g_schedule"),
|
|
3252
3249
|
RuleBuilder.scaffoldGroup("g_time"),
|
|
3253
3250
|
RuleBuilder.scaffoldGroup("g_user"),
|
|
3254
3251
|
RuleBuilder.scaffoldGroup("g_bill")
|
|
3255
|
-
]),
|
|
3252
|
+
]), p = RuleBuilder.setRuleToGroup(
|
|
3256
3253
|
RuleBuilder.scaffoldGroup("g_schedule"),
|
|
3257
3254
|
[
|
|
3258
3255
|
RuleBuilder.constructEntry(
|
|
@@ -3265,13 +3262,13 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3265
3262
|
"&&"
|
|
3266
3263
|
);
|
|
3267
3264
|
if (l != "SCHEDULE") {
|
|
3268
|
-
_.set(data.value, "campaign.event.rule",
|
|
3265
|
+
_.set(data.value, "campaign.event.rule", m);
|
|
3269
3266
|
return;
|
|
3270
3267
|
}
|
|
3271
3268
|
_.set(
|
|
3272
3269
|
data.value,
|
|
3273
3270
|
"campaign.event.rule",
|
|
3274
|
-
RuleBuilder.setRuleToGroup(
|
|
3271
|
+
RuleBuilder.setRuleToGroup(m, p)
|
|
3275
3272
|
);
|
|
3276
3273
|
}
|
|
3277
3274
|
e == "campaign.notify" && l == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
|
|
@@ -3297,7 +3294,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3297
3294
|
e.success && (emits("submit:model-value", cleanPF(JSON.parse(JSON.stringify(e.data)))), sheetVisible.value = !1);
|
|
3298
3295
|
}
|
|
3299
3296
|
return (e, l) => {
|
|
3300
|
-
const o = resolveComponent("FmButton"), i = resolveComponent("FmStep"), r = resolveComponent("FmStepper"),
|
|
3297
|
+
const o = resolveComponent("FmButton"), i = resolveComponent("FmStep"), r = resolveComponent("FmStepper"), y = resolveComponent("FmCard"), a = resolveComponent("FmTopSheet");
|
|
3301
3298
|
return openBlock(), createBlock(a, {
|
|
3302
3299
|
"fullscreen-size": "lg",
|
|
3303
3300
|
modelValue: unref(sheetVisible),
|
|
@@ -3353,7 +3350,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3353
3350
|
])
|
|
3354
3351
|
])
|
|
3355
3352
|
], -1)),
|
|
3356
|
-
createVNode(
|
|
3353
|
+
createVNode(y, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
|
|
3357
3354
|
])
|
|
3358
3355
|
])
|
|
3359
3356
|
])
|
|
@@ -3370,12 +3367,12 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3370
3367
|
class: "xs:hidden mx-[-24px] mt-16 mb-24 flex-1"
|
|
3371
3368
|
}, {
|
|
3372
3369
|
default: withCtx(() => [
|
|
3373
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n,
|
|
3370
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n, u) => (openBlock(), createBlock(i, {
|
|
3374
3371
|
key: n.name,
|
|
3375
3372
|
title: unref(getLocaleText)(n.name_locale, n.name),
|
|
3376
|
-
value:
|
|
3377
|
-
error: () => hasVisibleStepErrors(
|
|
3378
|
-
complete: () =>
|
|
3373
|
+
value: u + 1,
|
|
3374
|
+
error: () => hasVisibleStepErrors(u),
|
|
3375
|
+
complete: () => u + 1 <= unref(currentStep)
|
|
3379
3376
|
}, null, 8, ["title", "value", "error", "complete"]))), 128))
|
|
3380
3377
|
]),
|
|
3381
3378
|
_: 1
|
|
@@ -3393,13 +3390,13 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3393
3390
|
class: "flex-1"
|
|
3394
3391
|
}, {
|
|
3395
3392
|
default: withCtx(() => [
|
|
3396
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n,
|
|
3393
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (n, u) => (openBlock(), createBlock(i, {
|
|
3397
3394
|
key: n.name,
|
|
3398
3395
|
title: unref(sheetTitle),
|
|
3399
3396
|
description: unref(getLocaleText)(n.name_locale, n.name),
|
|
3400
|
-
value:
|
|
3401
|
-
error: () => hasVisibleStepErrors(
|
|
3402
|
-
complete: () =>
|
|
3397
|
+
value: u + 1,
|
|
3398
|
+
error: () => hasVisibleStepErrors(u),
|
|
3399
|
+
complete: () => u + 1 <= unref(currentStep) && stepErrors(unref(currentStep) - 1).length == 0
|
|
3403
3400
|
}, null, 8, ["title", "description", "value", "error", "complete"]))), 128))
|
|
3404
3401
|
]),
|
|
3405
3402
|
_: 1
|
|
@@ -3425,15 +3422,15 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3425
3422
|
}
|
|
3426
3423
|
}, null, 8, ["json"]),
|
|
3427
3424
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps[unref(currentStep) - 1].groups.filter(
|
|
3428
|
-
(n) => n.fields.length && (!n.condition || (Array.isArray(n.condition) ? n.condition.every((
|
|
3429
|
-
), (n,
|
|
3430
|
-
key:
|
|
3425
|
+
(n) => n.fields.length && (!n.condition || (Array.isArray(n.condition) ? n.condition.every((u) => unref(_).get(unref(data), u.property) == u.value == (u.not != !0)) : unref(_).get(unref(data), n.condition.property) == n.condition.value == (n.condition.not != !0)))
|
|
3426
|
+
), (n, u) => (openBlock(), createElementBlock("div", {
|
|
3427
|
+
key: u,
|
|
3431
3428
|
class: "space-y-24"
|
|
3432
3429
|
}, [
|
|
3433
3430
|
createElementVNode("div", _hoisted_7, toDisplayString(unref(getLocaleText)(n.name_locale, n.name ?? "")), 1),
|
|
3434
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.fields, (s,
|
|
3431
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(n.fields, (s, g) => (openBlock(), createElementBlock("div", { key: g }, [
|
|
3435
3432
|
(openBlock(), createBlock(_sfc_main$2, {
|
|
3436
|
-
key:
|
|
3433
|
+
key: g,
|
|
3437
3434
|
field: s,
|
|
3438
3435
|
modelValue: valueForField(s.property),
|
|
3439
3436
|
disabled: isDisable(s),
|
|
@@ -3441,9 +3438,9 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
|
|
|
3441
3438
|
"show-validation": unref(showValidation),
|
|
3442
3439
|
"push-availability": unref(pushAvailability),
|
|
3443
3440
|
onRetryPush: checkPushAvailability,
|
|
3444
|
-
"onUpdate:modelValue": (
|
|
3445
|
-
"onUpdate:file": async (
|
|
3446
|
-
const k = await onUpdateFile(
|
|
3441
|
+
"onUpdate:modelValue": (m) => onUpdateProperty(s.property, m),
|
|
3442
|
+
"onUpdate:file": async (m, p) => {
|
|
3443
|
+
const k = await onUpdateFile(m, p);
|
|
3447
3444
|
onUpdateProperty(s.property, k || "");
|
|
3448
3445
|
},
|
|
3449
3446
|
schema: unref(ZodHelper).typeAtPath(
|