@feedmepos/mf-connect 0.1.38-beta.24 → 0.1.38-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-DIIOqI6t.js → Analytic-GI7aYtUb.js} +13 -13
- package/dist/{App-CdcDgvY7.js → App-BoklLgkw.js} +7 -7
- package/dist/{AuditLogs-CXwAnFj2.js → AuditLogs-DGAmSC_0.js} +9 -9
- package/dist/{Bin-Cz_EmQvg.js → Bin-BiF3wXhU.js} +8 -8
- package/dist/{Broadcast-BMa1Vabz.js → Broadcast-D5ypkyn0.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV52UDC7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIGwoDq9.js} +6 -6
- package/dist/{Card-DY0aZEMz.js → Card-Bzm_iM7j.js} +16 -16
- package/dist/{Collections-DJBPF3Sn.js → Collections-CZEDKF0v.js} +6 -6
- package/dist/{Credit-OufxE9gh.js → Credit-nieDAS9M.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CHx2S5GA.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cz4ydsOk.js} +119 -117
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CTwdP77j.js → EffectSheet.vue_vue_type_style_index_0_lang-d67tWKfX.js} +6 -6
- package/dist/{Experience-DNSdiaZp.js → Experience-CKeWLWIk.js} +9 -9
- package/dist/{Game-CvpiNxP8.js → Game-ooDjLDzG.js} +10 -10
- package/dist/Grab-CHmDWK3s.js +301 -0
- package/dist/{Index-BlCJP1AU.js → Index-C9yMbuO8.js} +10 -10
- package/dist/{Marketing-dvZJgjik.js → Marketing-BvgC-F4p.js} +6 -6
- package/dist/{Member-BQ8lPxer.js → Member-DP0Cm8yE.js} +10 -10
- package/dist/{MemberList-btOTrbQl.js → MemberList-BYZ2NfAg.js} +25 -25
- package/dist/{MemberTransactions-Bn7IENl9.js → MemberTransactions-DvG4SU0m.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BnitWB_t.js → MessageInput.vue_vue_type_script_setup_true_lang-C3-IpjMr.js} +7 -7
- package/dist/{Mission-CSZUxBZY.js → Mission-CBOIiAhx.js} +10 -10
- package/dist/{Overview-AWsKlfo9.js → Overview-BqKRh6LC.js} +18 -18
- package/dist/{Point-Cs5ARAYb.js → Point-14thvTNE.js} +9 -9
- package/dist/{Promotion-DhDB8Tbd.js → Promotion-D4HBy-As.js} +10 -10
- package/dist/{Queue-CBe6W47A.js → Queue-BqzI56Vp.js} +10 -10
- package/dist/{Record-DOLUX9X4.js → Record-WtLmMgjU.js} +8 -8
- package/dist/{Reward-DSGRvZ7y.js → Reward-yfsdyC-T.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSGR-FDc.js → RewardGroup.vue_vue_type_script_setup_true_lang-DaB5piDf.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cbya-iI4.js → RuleGroup.vue_vue_type_script_setup_true_lang-DCKbSowE.js} +13 -13
- package/dist/{Segment-CRF7F3fy.js → Segment-hOxwXwqZ.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CMFXf3f7.js → SelectItems.vue_vue_type_script_setup_true_lang-IfFZG5uK.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CkZPsecz.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C9FaS4EF.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B-9A5Vw1.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CNd_-RAr.js} +3 -3
- package/dist/{Setting-BKgJWdj1.js → Setting-B7XBouh4.js} +11 -11
- package/dist/{Store-CNHfu-Pl.js → Store-Dbg7gN9h.js} +19 -19
- package/dist/{StoreRewards-CrVvj8j9.js → StoreRewards-DoBjQyns.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-cgoFRRLh.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C3_usDfP.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BdM-2lqP.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C5BP2K1C.js} +1 -1
- package/dist/{Tier-DvOUwWQz.js → Tier-Q9hjmprx.js} +20 -20
- package/dist/{Title-CRspZyr_.js → Title-9h42ZNEa.js} +19 -19
- package/dist/{Transaction-BGc7qOQt.js → Transaction-B_NIJcmb.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ca9QWPNE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-EZ42L0jN.js} +6 -6
- package/dist/{Voucher-zROvoGPm.js → Voucher-OjdoUYOe.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CD2C0b2B.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CgUFty-i.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-xRq5NUye.js → ZodTextField.vue_vue_type_script_setup_true_lang-D9V2WsTX.js} +1 -1
- package/dist/{app-H6IgvNco.js → app-A-A8AXY4.js} +41 -34
- package/dist/{app-CcrKXI5U.js → app-psmMhnbB.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-CPwOvpGD.js → business-BkIoeq-Q.js} +1 -1
- package/dist/{campaign-BGNxmSrr.js → campaign-C0gfY75c.js} +9 -9
- package/dist/{campaign-Dozf5twL.js → campaign-CERB2jjK.js} +2 -2
- package/dist/{campaign.enum-BFrMGQ7T.js → campaign.enum-jpIcwh1C.js} +1 -1
- package/dist/{campaign.fn-CIx0A0Ps.js → campaign.fn-C3JAU897.js} +59 -59
- package/dist/{collectible.enum-CYwwPBvg.js → collectible.enum-PLiXkPXk.js} +1 -1
- package/dist/{collection.fn-CxI950TL.js → collection.fn-BEgw5oag.js} +2 -2
- package/dist/{dto-C2_6bjCG.js → dto-CzjctCKL.js} +4 -4
- package/dist/{effect-XJbcCeBx.js → effect-BzkBC2cZ.js} +1 -1
- package/dist/{email-addresses-DRcfKo6t.js → email-addresses-BWQOZIxj.js} +1 -1
- package/dist/{export-BFUNdp3a.js → export-Bqt9zope.js} +3 -3
- package/dist/{helper-B40jlG60.js → helper-CnEOKaJw.js} +1 -1
- package/dist/{index-Dlsfhj3g.js → index-66ugkTKw.js} +1 -1
- package/dist/{index-BFps3TvZ.js → index-BD7Rc0qN.js} +6 -6
- package/dist/{index-BcpAuaGd.js → index-BMLcVoj2.js} +1 -1
- package/dist/{index-B4Pwokmt.js → index-CeDl4txs.js} +1 -1
- package/dist/{index-Ch9Aa7hb.js → index-Cs3ZFd92.js} +15 -6
- package/dist/{index-D7FM5qup.js → index-D5aQKEmO.js} +1 -1
- package/dist/{index-DkWYIiiy.js → index-DBN0XD-h.js} +3 -3
- package/dist/{index-F7hZ1yOK.js → index-DEezTfBN.js} +3 -3
- package/dist/{index-Ta6CTZmb.js → index-DFqn9RQx.js} +573 -573
- package/dist/{index-Crkl2Pua.js → index-DIN-0kYC.js} +2 -2
- package/dist/{index-6JDE5-xO.js → index-DZLqscW5.js} +1 -1
- package/dist/{index-BW9fkuya.js → index-DfOMpXlE.js} +1 -1
- package/dist/{index-CL0BybAT.js → index-DnJuxEaY.js} +1 -1
- package/dist/{index-RhUqg1Tl.js → index-yOIVmjex.js} +1 -1
- package/dist/{index.esm2017-DlJnPRKQ.js → index.esm2017-7gQUvseu.js} +1 -1
- package/dist/{loading-B3wvtmgh.js → loading-CJIHUxKM.js} +1 -1
- package/dist/{membership-DpfpIT9v.js → membership-DRnWUdOc.js} +3 -3
- package/dist/{money-XJk2AEf9.js → money-I2p-gwmi.js} +1 -1
- package/dist/{number-Ec4tNVBZ.js → number-DldVO4aW.js} +1 -1
- package/dist/objectid-B_MkqbEB.js +145 -0
- package/dist/{plugins-DZ3ydcdc.js → plugins-D17305Np.js} +2 -2
- package/dist/{reward-DURL6iKv.js → reward-3PHDIRXM.js} +1 -1
- package/dist/{rule-BMJqZD3D.js → rule-BgMw4FoF.js} +3 -3
- package/dist/{rule-builder-Dgnn6yE8.js → rule-builder-CmqmCe3P.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-DfVuvLbx.js → template-BR9R6E1B.js} +4 -4
- package/dist/{timezone-4zA4Eck_.js → timezone-CWS-nhUv.js} +1 -1
- package/dist/{trigger-CWh9m2Sd.js → trigger-DsYBkR3I.js} +4 -4
- package/dist/{user-BcxMf5qG.js → user-B3SLxQOc.js} +1 -1
- package/dist/{vue-i18n-BQiDu4pW.js → vue-i18n-CttzNDMl.js} +304 -304
- package/dist/{xlsx-DrYIuf7U.js → xlsx-cNTfolRW.js} +1 -1
- package/package.json +1 -1
- package/dist/Grab-R7UK3MBX.js +0 -282
- package/dist/objectid-D7z8NSmH.js +0 -145
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, createCommentVNode, computed, onMounted, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, unref, isRef, createTextVNode, normalizeClass, resolveDynamicComponent, toRefs, normalizeStyle, createSlots } from "vue";
|
|
2
2
|
import { _ } from "./lodash-B5I3zXaY.js";
|
|
3
|
-
import { z } from "./app-
|
|
3
|
+
import { z } from "./app-A-A8AXY4.js";
|
|
4
4
|
import { Z as ZodHelper } from "./zod-Bg2FbC-D.js";
|
|
5
|
-
import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-
|
|
6
|
-
import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-
|
|
7
|
-
import { u as useMembershipStore } from "./membership-
|
|
8
|
-
import { u as useBusinessStore } from "./business-
|
|
9
|
-
import "./index-
|
|
10
|
-
import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-
|
|
5
|
+
import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-C0gfY75c.js";
|
|
6
|
+
import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-CzjctCKL.js";
|
|
7
|
+
import { u as useMembershipStore } from "./membership-DRnWUdOc.js";
|
|
8
|
+
import { u as useBusinessStore } from "./business-BkIoeq-Q.js";
|
|
9
|
+
import "./index-DIN-0kYC.js";
|
|
10
|
+
import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-CmqmCe3P.js";
|
|
11
11
|
import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
|
|
12
12
|
import { h as hooks } from "./moment-D7p2TMB-.js";
|
|
13
|
-
import { f as featureVersionMapping } from "./campaign.enum-
|
|
13
|
+
import { f as featureVersionMapping } from "./campaign.enum-jpIcwh1C.js";
|
|
14
14
|
import { _ as _sfc_main$u } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
|
|
15
|
-
import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
16
|
-
import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { c as core, S as SvcConfig } from "./index-
|
|
18
|
-
import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-
|
|
19
|
-
import { C as Cb } from "./app-
|
|
20
|
-
import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-d67tWKfX.js";
|
|
16
|
+
import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-C5BP2K1C.js";
|
|
17
|
+
import { c as core, S as SvcConfig } from "./index-DEezTfBN.js";
|
|
18
|
+
import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-D17305Np.js";
|
|
19
|
+
import { C as Cb } from "./app-psmMhnbB.js";
|
|
20
|
+
import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-IfFZG5uK.js";
|
|
21
21
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
22
|
-
import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
23
|
-
import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-
|
|
24
|
-
import { u as useI18n } from "./vue-i18n-
|
|
25
|
-
import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-
|
|
26
|
-
import { _ as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-
|
|
27
|
-
import { C as CountryTimezone, m as moment } from "./timezone-
|
|
28
|
-
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-
|
|
22
|
+
import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-EZ42L0jN.js";
|
|
23
|
+
import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DCKbSowE.js";
|
|
24
|
+
import { u as useI18n } from "./vue-i18n-CttzNDMl.js";
|
|
25
|
+
import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-DsYBkR3I.js";
|
|
26
|
+
import { _ as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-C3-IpjMr.js";
|
|
27
|
+
import { C as CountryTimezone, m as moment } from "./timezone-CWS-nhUv.js";
|
|
28
|
+
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-BgMw4FoF.js";
|
|
29
29
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
30
|
-
import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
31
|
-
import { T as TEMPLATES } from "./index-
|
|
32
|
-
import { v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-
|
|
33
|
-
import "./index-
|
|
34
|
-
import "./index-
|
|
35
|
-
import { a as F_GAME_TYPE } from "./collectible.enum-
|
|
36
|
-
import { u as useLoading } from "./loading-
|
|
37
|
-
import { i as initCollectibleConfig } from "./helper-
|
|
38
|
-
import { C as CollectionUtils } from "./collection.fn-
|
|
30
|
+
import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-CgUFty-i.js";
|
|
31
|
+
import { T as TEMPLATES } from "./index-BD7Rc0qN.js";
|
|
32
|
+
import { v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-Cs3ZFd92.js";
|
|
33
|
+
import "./index-66ugkTKw.js";
|
|
34
|
+
import "./index-DBN0XD-h.js";
|
|
35
|
+
import { a as F_GAME_TYPE } from "./collectible.enum-PLiXkPXk.js";
|
|
36
|
+
import { u as useLoading } from "./loading-CJIHUxKM.js";
|
|
37
|
+
import { i as initCollectibleConfig } from "./helper-CnEOKaJw.js";
|
|
38
|
+
import { C as CollectionUtils } from "./collection.fn-BEgw5oag.js";
|
|
39
39
|
import { s as sentenceCase$1 } from "./index-CsaQJMAR.js";
|
|
40
|
-
import "./index-
|
|
40
|
+
import "./index-DFqn9RQx.js";
|
|
41
41
|
import { useDialog } from "@feedmepos/ui-library";
|
|
42
|
-
import { u as useCampaignStore } from "./campaign-
|
|
42
|
+
import { u as useCampaignStore } from "./campaign-CERB2jjK.js";
|
|
43
43
|
import { a as cleanPF } from "./object-qECH92oz.js";
|
|
44
44
|
function summarizeGrabDiscount(e) {
|
|
45
45
|
if (!e)
|
|
@@ -225,7 +225,7 @@ const _hoisted_1$l = {
|
|
|
225
225
|
a.value[f.id] = !m;
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function V() {
|
|
229
229
|
Object.keys(a.value).forEach((m) => {
|
|
230
230
|
a.value[m] = !1;
|
|
231
231
|
});
|
|
@@ -272,7 +272,7 @@ const _hoisted_1$l = {
|
|
|
272
272
|
variant: "tertiary",
|
|
273
273
|
size: "small",
|
|
274
274
|
label: "Clear",
|
|
275
|
-
onClick:
|
|
275
|
+
onClick: V
|
|
276
276
|
}),
|
|
277
277
|
createElementVNode("span", _hoisted_6$5, toDisplayString(s.value) + " selected ", 1)
|
|
278
278
|
]),
|
|
@@ -344,7 +344,7 @@ const _hoisted_1$l = {
|
|
|
344
344
|
}, _hoisted_3$c = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$9 = { class: "text-fm-color-typo-secondary" }, _hoisted_5$5 = { key: 0 }, _hoisted_6$4 = { class: "space-y-24" }, _hoisted_7$3 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, _hoisted_8$1 = { key: 0 }, _hoisted_9$1 = { class: "fm-typo-en-body-md-600 mb-8 block" }, _hoisted_10$1 = { key: 1 }, _hoisted_11$1 = { key: 2 }, _hoisted_12 = { key: 0 }, _hoisted_13 = { class: "space-y-8" }, _hoisted_14 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_15 = { class: "flex items-center gap-8" }, _hoisted_16 = { class: "fm-typo-en-body-md-400" }, _hoisted_17 = { key: 3 }, _hoisted_18 = { key: 0 }, _hoisted_19 = { class: "space-y-8" }, _hoisted_20 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_21 = { class: "flex items-center gap-8" }, _hoisted_22 = { class: "fm-typo-en-body-md-400" }, _hoisted_23 = {
|
|
345
345
|
key: 0,
|
|
346
346
|
class: "mt-16 p-12 bg-fm-color-feedback-error-light rounded-8 border border-fm-color-feedback-error-main"
|
|
347
|
-
}, _hoisted_24 = { class: "flex items-center gap-8 mb-8" }, _hoisted_25 = { class: "space-y-4" }, _hoisted_26 = { class: "flex gap-16" }, _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
347
|
+
}, _hoisted_24 = { class: "flex items-center gap-8 mb-8 text-fm-color-system-error-300" }, _hoisted_25 = { class: "space-y-4" }, _hoisted_26 = { class: "flex gap-16" }, _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
348
348
|
__name: "GrabEffectSheet",
|
|
349
349
|
props: {
|
|
350
350
|
modelValue: { type: Object }
|
|
@@ -381,7 +381,7 @@ const _hoisted_1$l = {
|
|
|
381
381
|
function b(v) {
|
|
382
382
|
return v && !["freeItem", "delivery"].includes(v);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function V(v) {
|
|
385
385
|
return v && ["percentage", "bundleSamePercentage", "bundleDiffPercentage"].includes(
|
|
386
386
|
v
|
|
387
387
|
);
|
|
@@ -395,23 +395,23 @@ const _hoisted_1$l = {
|
|
|
395
395
|
function y(v) {
|
|
396
396
|
return v != null && v.includes("Percentage") || v === "percentage" ? "%" : "$";
|
|
397
397
|
}
|
|
398
|
-
function m(v,
|
|
398
|
+
function m(v, k) {
|
|
399
399
|
l.value = {
|
|
400
400
|
...l.value,
|
|
401
|
-
[v]:
|
|
401
|
+
[v]: k
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
|
-
function f(v,
|
|
404
|
+
function f(v, k) {
|
|
405
405
|
var T;
|
|
406
406
|
const w = {
|
|
407
407
|
...l.value.scope,
|
|
408
|
-
[v]:
|
|
408
|
+
[v]: k
|
|
409
409
|
};
|
|
410
410
|
if (l.value = {
|
|
411
411
|
...l.value,
|
|
412
412
|
scope: w
|
|
413
413
|
}, v === "type") {
|
|
414
|
-
const F = B(
|
|
414
|
+
const F = B(k);
|
|
415
415
|
F.some(
|
|
416
416
|
(P) => P.value === l.value.type
|
|
417
417
|
) || (l.value = {
|
|
@@ -495,9 +495,9 @@ const _hoisted_1$l = {
|
|
|
495
495
|
const v = (w = l.value.scope) == null ? void 0 : w.objectIDs;
|
|
496
496
|
if (!v || v.length === 0)
|
|
497
497
|
return "No items selected";
|
|
498
|
-
const
|
|
499
|
-
return
|
|
500
|
-
const R =
|
|
498
|
+
const k = u.menu.value;
|
|
499
|
+
return k && v.length <= 3 ? v.map((F) => {
|
|
500
|
+
const R = k.modules.item.find((P) => P._id === F);
|
|
501
501
|
return R ? (R.name2 || R.name).trim() : `Item ${F}`;
|
|
502
502
|
}).join(", ") : v.length === 1 ? "1 item selected" : `${v.length} items selected`;
|
|
503
503
|
}
|
|
@@ -506,9 +506,9 @@ const _hoisted_1$l = {
|
|
|
506
506
|
const v = (w = l.value.scope) == null ? void 0 : w.objectIDs;
|
|
507
507
|
if (!v || v.length === 0)
|
|
508
508
|
return "No categories selected";
|
|
509
|
-
const
|
|
510
|
-
return
|
|
511
|
-
const R =
|
|
509
|
+
const k = u.menu.value;
|
|
510
|
+
return k && v.length <= 3 ? v.map((F) => {
|
|
511
|
+
const R = k.modules.category.find((P) => P._id === F);
|
|
512
512
|
return R ? R.name : `Category ${F}`;
|
|
513
513
|
}).join(", ") : v.length === 1 ? "1 category selected" : `${v.length} categories selected`;
|
|
514
514
|
}
|
|
@@ -531,9 +531,9 @@ const _hoisted_1$l = {
|
|
|
531
531
|
n.value = !1;
|
|
532
532
|
}
|
|
533
533
|
const H = computed(() => {
|
|
534
|
-
var
|
|
534
|
+
var k, w, T;
|
|
535
535
|
const v = [];
|
|
536
|
-
return l.value.type || v.push("Discount type is required"), (
|
|
536
|
+
return l.value.type || v.push("Discount type is required"), (k = l.value.scope) != null && k.type || v.push("Scope type is required"), b(l.value.type) && (!l.value.value || l.value.value <= 0) && v.push("Discount amount must be greater than 0"), ((w = l.value.scope) == null ? void 0 : w.type) === "items" && (!l.value.scope.objectIDs || l.value.scope.objectIDs.length === 0) && v.push("Please select at least one item"), ((T = l.value.scope) == null ? void 0 : T.type) === "category" && (!l.value.scope.objectIDs || l.value.scope.objectIDs.length === 0) && v.push("Please select at least one category"), v;
|
|
537
537
|
});
|
|
538
538
|
function Z() {
|
|
539
539
|
i("update:model-value", l.value), a.value = !1;
|
|
@@ -543,22 +543,22 @@ const _hoisted_1$l = {
|
|
|
543
543
|
{ label: "Item discount", value: "items" },
|
|
544
544
|
{ label: "Category discount", value: "category" }
|
|
545
545
|
];
|
|
546
|
-
return (v,
|
|
546
|
+
return (v, k) => {
|
|
547
547
|
const w = resolveComponent("FmButton"), T = resolveComponent("FmSelect"), F = resolveComponent("FmStepperField"), R = resolveComponent("FmIcon"), P = resolveComponent("FmSideSheet");
|
|
548
548
|
return openBlock(), createBlock(P, {
|
|
549
549
|
"max-width": 550,
|
|
550
550
|
header: "Apply discount",
|
|
551
551
|
modelValue: unref(a),
|
|
552
552
|
"onUpdate:modelValue": [
|
|
553
|
-
|
|
554
|
-
|
|
553
|
+
k[5] || (k[5] = (D) => isRef(a) ? a.value = D : null),
|
|
554
|
+
k[6] || (k[6] = (D) => a.value = D)
|
|
555
555
|
]
|
|
556
556
|
}, {
|
|
557
557
|
"side-sheet-button": withCtx(() => {
|
|
558
558
|
var D, U, A, L;
|
|
559
559
|
return [
|
|
560
560
|
createElementVNode("div", _hoisted_1$j, [
|
|
561
|
-
|
|
561
|
+
k[7] || (k[7] = createElementVNode("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the Grab campaign discount you want to offer your customers. ", -1)),
|
|
562
562
|
e.modelValue ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
|
|
563
563
|
createElementVNode("div", _hoisted_3$c, [
|
|
564
564
|
createElementVNode("div", null, toDisplayString((D = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : D.type), 1),
|
|
@@ -590,11 +590,11 @@ const _hoisted_1$l = {
|
|
|
590
590
|
variant: "secondary",
|
|
591
591
|
label: "Cancel",
|
|
592
592
|
class: "flex-1",
|
|
593
|
-
onClick:
|
|
593
|
+
onClick: k[4] || (k[4] = (D) => a.value = !1)
|
|
594
594
|
}),
|
|
595
595
|
createVNode(w, {
|
|
596
596
|
variant: "primary",
|
|
597
|
-
label: unref(s) ? "Confirm
|
|
597
|
+
label: unref(s) ? "Confirm" : "Complete Required Fields",
|
|
598
598
|
class: "flex-1",
|
|
599
599
|
disabled: !unref(s),
|
|
600
600
|
onClick: Z
|
|
@@ -606,20 +606,20 @@ const _hoisted_1$l = {
|
|
|
606
606
|
return [
|
|
607
607
|
createElementVNode("div", _hoisted_6$4, [
|
|
608
608
|
createElementVNode("div", null, [
|
|
609
|
-
|
|
609
|
+
k[8] || (k[8] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Campaign type", -1)),
|
|
610
610
|
createVNode(T, {
|
|
611
611
|
"model-value": ((D = unref(l).scope) == null ? void 0 : D.type) || "order",
|
|
612
|
-
"onUpdate:modelValue":
|
|
612
|
+
"onUpdate:modelValue": k[0] || (k[0] = (O) => f("type", O)),
|
|
613
613
|
placeholder: "Select campaign type",
|
|
614
614
|
items: q
|
|
615
615
|
}, null, 8, ["model-value"]),
|
|
616
616
|
createElementVNode("div", _hoisted_7$3, toDisplayString(C((U = unref(l).scope) == null ? void 0 : U.type)), 1)
|
|
617
617
|
]),
|
|
618
618
|
createElementVNode("div", null, [
|
|
619
|
-
|
|
619
|
+
k[9] || (k[9] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Discount type", -1)),
|
|
620
620
|
createVNode(T, {
|
|
621
621
|
"model-value": unref(l).type,
|
|
622
|
-
"onUpdate:modelValue":
|
|
622
|
+
"onUpdate:modelValue": k[1] || (k[1] = (O) => m("type", O)),
|
|
623
623
|
placeholder: "Select discount type",
|
|
624
624
|
items: g()
|
|
625
625
|
}, null, 8, ["model-value", "items"])
|
|
@@ -628,24 +628,24 @@ const _hoisted_1$l = {
|
|
|
628
628
|
createElementVNode("label", _hoisted_9$1, toDisplayString(p(unref(l).type)), 1),
|
|
629
629
|
createVNode(F, {
|
|
630
630
|
modelValue: unref(l).value,
|
|
631
|
-
"onUpdate:modelValue":
|
|
631
|
+
"onUpdate:modelValue": k[2] || (k[2] = (O) => unref(l).value = O),
|
|
632
632
|
placeholder: c(unref(l).type),
|
|
633
633
|
suffix: y(unref(l).type),
|
|
634
634
|
type: "number"
|
|
635
635
|
}, null, 8, ["modelValue", "placeholder", "suffix"])
|
|
636
636
|
])) : createCommentVNode("", !0),
|
|
637
|
-
|
|
638
|
-
|
|
637
|
+
V(unref(l).type) ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
|
|
638
|
+
k[10] || (k[10] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Discount cap (optional)", -1)),
|
|
639
639
|
createVNode(F, {
|
|
640
640
|
modelValue: unref(l).cap,
|
|
641
|
-
"onUpdate:modelValue":
|
|
641
|
+
"onUpdate:modelValue": k[3] || (k[3] = (O) => unref(l).cap = O),
|
|
642
642
|
placeholder: "Maximum discount amount",
|
|
643
643
|
type: "number"
|
|
644
644
|
}, null, 8, ["modelValue"])
|
|
645
645
|
])) : createCommentVNode("", !0),
|
|
646
646
|
E() ? (openBlock(), createElementBlock("div", _hoisted_11$1, [
|
|
647
647
|
unref(o) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
648
|
-
|
|
648
|
+
k[12] || (k[12] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Select Items", -1)),
|
|
649
649
|
createElementVNode("div", _hoisted_13, [
|
|
650
650
|
createElementVNode("div", _hoisted_14, [
|
|
651
651
|
createElementVNode("div", _hoisted_15, [
|
|
@@ -662,7 +662,7 @@ const _hoisted_1$l = {
|
|
|
662
662
|
onClick: N
|
|
663
663
|
})
|
|
664
664
|
]),
|
|
665
|
-
|
|
665
|
+
k[11] || (k[11] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which items this discount applies to. Bundle discounts require multiple items. ", -1))
|
|
666
666
|
])
|
|
667
667
|
])),
|
|
668
668
|
createVNode(_sfc_main$n, {
|
|
@@ -674,7 +674,7 @@ const _hoisted_1$l = {
|
|
|
674
674
|
])) : createCommentVNode("", !0),
|
|
675
675
|
$() ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
676
676
|
unref(n) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_18, [
|
|
677
|
-
|
|
677
|
+
k[14] || (k[14] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Select Categories", -1)),
|
|
678
678
|
createElementVNode("div", _hoisted_19, [
|
|
679
679
|
createElementVNode("div", _hoisted_20, [
|
|
680
680
|
createElementVNode("div", _hoisted_21, [
|
|
@@ -691,7 +691,7 @@ const _hoisted_1$l = {
|
|
|
691
691
|
onClick: I
|
|
692
692
|
})
|
|
693
693
|
]),
|
|
694
|
-
|
|
694
|
+
k[13] || (k[13] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which categories this discount applies to. ", -1))
|
|
695
695
|
])
|
|
696
696
|
])),
|
|
697
697
|
createVNode(_sfc_main$m, {
|
|
@@ -704,19 +704,15 @@ const _hoisted_1$l = {
|
|
|
704
704
|
]),
|
|
705
705
|
unref(H).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_23, [
|
|
706
706
|
createElementVNode("div", _hoisted_24, [
|
|
707
|
-
createVNode(R, {
|
|
708
|
-
|
|
709
|
-
size: "sm",
|
|
710
|
-
class: "text-fm-color-feedback-error-main"
|
|
711
|
-
}),
|
|
712
|
-
V[15] || (V[15] = createElementVNode("span", { class: "fm-typo-en-body-sm-600 text-fm-color-feedback-error-main" }, "Please fix the following issues:", -1))
|
|
707
|
+
createVNode(R, { name: "warning" }),
|
|
708
|
+
k[15] || (k[15] = createElementVNode("span", { class: "fm-typo-en-body-sm-600" }, "Please fix the following issues:", -1))
|
|
713
709
|
]),
|
|
714
710
|
createElementVNode("ul", _hoisted_25, [
|
|
715
711
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(H), (O) => (openBlock(), createElementBlock("li", {
|
|
716
712
|
key: O,
|
|
717
713
|
class: "fm-typo-en-body-sm-400 text-fm-color-feedback-error-main flex items-start gap-8"
|
|
718
714
|
}, [
|
|
719
|
-
|
|
715
|
+
k[16] || (k[16] = createElementVNode("span", { class: "w-4 h-4 bg-fm-color-feedback-error-main rounded-full mt-6 flex-shrink-0" }, null, -1)),
|
|
720
716
|
createTextVNode(" " + toDisplayString(O), 1)
|
|
721
717
|
]))), 128))
|
|
722
718
|
])
|
|
@@ -727,7 +723,7 @@ const _hoisted_1$l = {
|
|
|
727
723
|
}, 8, ["modelValue"]);
|
|
728
724
|
};
|
|
729
725
|
}
|
|
730
|
-
}), GrabEffectSheet = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
726
|
+
}), GrabEffectSheet = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-cf604dd7"]]), _hoisted_1$i = { class: "space-y-24" }, _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
731
727
|
__name: "TimeRuleGroup",
|
|
732
728
|
props: {
|
|
733
729
|
modelValue: {
|
|
@@ -1086,15 +1082,15 @@ const _hoisted_1$l = {
|
|
|
1086
1082
|
() => CountryTimezone[u.currentCountry.value || "MY"]
|
|
1087
1083
|
);
|
|
1088
1084
|
function o() {
|
|
1089
|
-
const
|
|
1090
|
-
return
|
|
1085
|
+
const V = RuleBuilder.getRules(r.modelValue);
|
|
1086
|
+
return V.length == 0 ? "fixed" : V.some(
|
|
1091
1087
|
(p) => isRuleEntry(p) && RuleBuilder.simplify(p).operator == "_rrule"
|
|
1092
1088
|
) ? "repeating" : "fixed";
|
|
1093
1089
|
}
|
|
1094
1090
|
const n = ref(o()), l = ref(!1), s = computed(() => {
|
|
1095
|
-
const
|
|
1091
|
+
const V = RuleBuilder.getRules(r.modelValue), p = V.find(
|
|
1096
1092
|
(y) => isRuleEntry(y) && RuleBuilder.simplify(y).property == "trigger.date"
|
|
1097
|
-
), c =
|
|
1093
|
+
), c = V.find(
|
|
1098
1094
|
(y) => isRuleEntry(y) && RuleBuilder.simplify(y).property == "trigger.time"
|
|
1099
1095
|
);
|
|
1100
1096
|
return {
|
|
@@ -1109,8 +1105,8 @@ const _hoisted_1$l = {
|
|
|
1109
1105
|
r.endDate ? new Date(r.endDate) : void 0
|
|
1110
1106
|
)
|
|
1111
1107
|
);
|
|
1112
|
-
function g(
|
|
1113
|
-
const p =
|
|
1108
|
+
function g(V) {
|
|
1109
|
+
const p = V.label.toLowerCase(), c = p == "fixed" ? [
|
|
1114
1110
|
RuleBuilder.constructEntry(
|
|
1115
1111
|
"trigger.date",
|
|
1116
1112
|
"_isOnDate",
|
|
@@ -1133,19 +1129,19 @@ const _hoisted_1$l = {
|
|
|
1133
1129
|
)
|
|
1134
1130
|
), n.value = p;
|
|
1135
1131
|
}
|
|
1136
|
-
function b(
|
|
1132
|
+
function b(V) {
|
|
1137
1133
|
n.value == "fixed" ? i(
|
|
1138
1134
|
"update:model-value",
|
|
1139
1135
|
RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
|
|
1140
1136
|
RuleBuilder.constructEntry(
|
|
1141
1137
|
"trigger.date",
|
|
1142
1138
|
"_isOnDate",
|
|
1143
|
-
|
|
1139
|
+
V.date
|
|
1144
1140
|
),
|
|
1145
1141
|
RuleBuilder.constructEntry(
|
|
1146
1142
|
"trigger.time",
|
|
1147
1143
|
"_isOnTime",
|
|
1148
|
-
|
|
1144
|
+
V.time
|
|
1149
1145
|
)
|
|
1150
1146
|
])
|
|
1151
1147
|
) : i(
|
|
@@ -1154,17 +1150,17 @@ const _hoisted_1$l = {
|
|
|
1154
1150
|
RuleBuilder.constructEntry(
|
|
1155
1151
|
"trigger.date",
|
|
1156
1152
|
"_rrule",
|
|
1157
|
-
|
|
1153
|
+
V.date
|
|
1158
1154
|
),
|
|
1159
1155
|
RuleBuilder.constructEntry(
|
|
1160
1156
|
"trigger.time",
|
|
1161
1157
|
"_isOnTime",
|
|
1162
|
-
|
|
1158
|
+
V.time
|
|
1163
1159
|
)
|
|
1164
1160
|
])
|
|
1165
1161
|
);
|
|
1166
1162
|
}
|
|
1167
|
-
return (
|
|
1163
|
+
return (V, p) => {
|
|
1168
1164
|
const c = resolveComponent("FmButtonGroup"), y = resolveComponent("FmTimePicker"), m = resolveComponent("FmIcon"), f = resolveComponent("FmTooltip"), B = resolveComponent("FmField"), C = resolveComponent("FmCard"), E = resolveComponent("FmPopover"), $ = resolveComponent("FmDatePicker"), x = resolveComponent("FmHelperText");
|
|
1169
1165
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1170
1166
|
createVNode(c, {
|
|
@@ -1324,7 +1320,7 @@ const _hoisted_1$l = {
|
|
|
1324
1320
|
p && (o.value = c, l.value = y), a.value = p;
|
|
1325
1321
|
}
|
|
1326
1322
|
const b = r;
|
|
1327
|
-
async function
|
|
1323
|
+
async function V() {
|
|
1328
1324
|
const p = s.value.safeParse(o.value);
|
|
1329
1325
|
p.success && (await u(
|
|
1330
1326
|
async () => {
|
|
@@ -1360,7 +1356,7 @@ const _hoisted_1$l = {
|
|
|
1360
1356
|
type: "button",
|
|
1361
1357
|
disabled: unref(h).length > 0,
|
|
1362
1358
|
label: "Confirm",
|
|
1363
|
-
onClick: c[7] || (c[7] = (C) =>
|
|
1359
|
+
onClick: c[7] || (c[7] = (C) => V())
|
|
1364
1360
|
}, null, 8, ["disabled"]),
|
|
1365
1361
|
createVNode(f, {
|
|
1366
1362
|
variant: "secondary",
|
|
@@ -1538,7 +1534,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
|
|
|
1538
1534
|
const c = [...o.value];
|
|
1539
1535
|
c.splice(p, 1), i("update:model-value", c);
|
|
1540
1536
|
}
|
|
1541
|
-
function
|
|
1537
|
+
function V() {
|
|
1542
1538
|
var p;
|
|
1543
1539
|
(p = l.value) == null || p.showSheet(
|
|
1544
1540
|
!0,
|
|
@@ -1556,7 +1552,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
|
|
|
1556
1552
|
c[1] || (c[1] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type and weightage given to your customer. ", -1)),
|
|
1557
1553
|
createVNode(y, {
|
|
1558
1554
|
label: "Add Reward",
|
|
1559
|
-
onClick: c[0] || (c[0] = (B) =>
|
|
1555
|
+
onClick: c[0] || (c[0] = (B) => V()),
|
|
1560
1556
|
variant: "plain",
|
|
1561
1557
|
icon: "add"
|
|
1562
1558
|
}),
|
|
@@ -1621,27 +1617,27 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
|
|
|
1621
1617
|
createVNode(n, {
|
|
1622
1618
|
label: "Enable game",
|
|
1623
1619
|
"model-value": !!((h = e.modelValue) != null && h.gameType),
|
|
1624
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1620
|
+
"onUpdate:modelValue": o[0] || (o[0] = (V) => V ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
|
|
1625
1621
|
}, null, 8, ["model-value"]),
|
|
1626
1622
|
((g = e.modelValue) == null ? void 0 : g.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
1627
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (
|
|
1623
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (V) => {
|
|
1628
1624
|
var p, c;
|
|
1629
1625
|
return openBlock(), createBlock(l, {
|
|
1630
1626
|
variant: "outlined",
|
|
1631
1627
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
1632
1628
|
"col-span-2": unref(u).length == 1,
|
|
1633
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((p = e.modelValue) == null ? void 0 : p.gameType) ==
|
|
1634
|
-
"hover:bg-fm-color-opacity-sm": ((c = e.modelValue) == null ? void 0 : c.gameType) !=
|
|
1629
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((p = e.modelValue) == null ? void 0 : p.gameType) == V.value,
|
|
1630
|
+
"hover:bg-fm-color-opacity-sm": ((c = e.modelValue) == null ? void 0 : c.gameType) != V.value
|
|
1635
1631
|
}]),
|
|
1636
1632
|
onClick: () => {
|
|
1637
1633
|
var y;
|
|
1638
|
-
((y = r.modelValue) == null ? void 0 : y.gameType) !=
|
|
1634
|
+
((y = r.modelValue) == null ? void 0 : y.gameType) != V.value && i("update:model-value", { gameType: V.value });
|
|
1639
1635
|
},
|
|
1640
|
-
key:
|
|
1636
|
+
key: V.value
|
|
1641
1637
|
}, {
|
|
1642
1638
|
default: withCtx(() => [
|
|
1643
|
-
createElementVNode("div", _hoisted_3$6, toDisplayString(
|
|
1644
|
-
createElementVNode("div", _hoisted_4$5, toDisplayString(
|
|
1639
|
+
createElementVNode("div", _hoisted_3$6, toDisplayString(V.label), 1),
|
|
1640
|
+
createElementVNode("div", _hoisted_4$5, toDisplayString(V.description), 1)
|
|
1645
1641
|
]),
|
|
1646
1642
|
_: 2
|
|
1647
1643
|
}, 1032, ["class", "onClick"]);
|
|
@@ -1675,8 +1671,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
|
|
|
1675
1671
|
(() => {
|
|
1676
1672
|
const g = {};
|
|
1677
1673
|
return a.value.workingHour && Object.keys(a.value.workingHour).forEach((b) => {
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1674
|
+
const V = a.value.workingHour[b];
|
|
1675
|
+
V && "periods" in V && Array.isArray(V.periods) ? g[b] = V.periods : Array.isArray(V) && (g[b] = V);
|
|
1680
1676
|
}), g;
|
|
1681
1677
|
})()
|
|
1682
1678
|
), n = [
|
|
@@ -1696,18 +1692,18 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
|
|
|
1696
1692
|
o.value[g] && o.value[g].length > b && (o.value[g].splice(b, 1), o.value[g].length === 0 && delete o.value[g], h());
|
|
1697
1693
|
}, h = () => {
|
|
1698
1694
|
const g = Object.keys(o.value).reduce(
|
|
1699
|
-
(b,
|
|
1700
|
-
periods: o.value[
|
|
1695
|
+
(b, V) => (o.value[V] && o.value[V].length > 0 && (b[V] = {
|
|
1696
|
+
periods: o.value[V]
|
|
1701
1697
|
}), b),
|
|
1702
1698
|
{}
|
|
1703
1699
|
);
|
|
1704
1700
|
a.value.workingHour = Object.keys(g).length > 0 ? g : void 0;
|
|
1705
1701
|
};
|
|
1706
1702
|
return watch(a, () => u("update:model-value", a.value), { deep: !0 }), watch(o, h, { deep: !0 }), (g, b) => {
|
|
1707
|
-
const
|
|
1703
|
+
const V = resolveComponent("FmSelect"), p = resolveComponent("FmStepperField"), c = resolveComponent("FmCheckbox"), y = resolveComponent("FmTimePicker"), m = resolveComponent("FmButton");
|
|
1708
1704
|
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
1709
1705
|
createElementVNode("div", _hoisted_2$7, [
|
|
1710
|
-
createVNode(
|
|
1706
|
+
createVNode(V, {
|
|
1711
1707
|
label: unref(r)("connect.template.eaterType"),
|
|
1712
1708
|
modelValue: unref(a).eaterType,
|
|
1713
1709
|
"onUpdate:modelValue": b[0] || (b[0] = (f) => unref(a).eaterType = f),
|
|
@@ -1965,7 +1961,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
|
|
|
1965
1961
|
function b(y, m, f) {
|
|
1966
1962
|
y && (n.value = m, s.value = f), o.value = y;
|
|
1967
1963
|
}
|
|
1968
|
-
const
|
|
1964
|
+
const V = r;
|
|
1969
1965
|
async function p() {
|
|
1970
1966
|
const y = h.value.safeParse(n.value);
|
|
1971
1967
|
y.success && (await a(
|
|
@@ -1979,7 +1975,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
|
|
|
1979
1975
|
message: "Uploading reward image",
|
|
1980
1976
|
successMessage: "Reward image updated"
|
|
1981
1977
|
}
|
|
1982
|
-
),
|
|
1978
|
+
), V("update:model-value", y.data, s.value));
|
|
1983
1979
|
}
|
|
1984
1980
|
const c = ref();
|
|
1985
1981
|
return d({
|
|
@@ -2259,7 +2255,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2259
2255
|
const y = [...o.value];
|
|
2260
2256
|
y.splice(c, 1), i("update:model-value", y);
|
|
2261
2257
|
}
|
|
2262
|
-
function
|
|
2258
|
+
function V() {
|
|
2263
2259
|
var c;
|
|
2264
2260
|
(c = l.value) == null || c.showSheet(
|
|
2265
2261
|
!0,
|
|
@@ -2292,7 +2288,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2292
2288
|
y[2] || (y[2] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type given to your customer. ", -1)),
|
|
2293
2289
|
createVNode(m, {
|
|
2294
2290
|
label: "Add Reward",
|
|
2295
|
-
onClick: y[0] || (y[0] = (C) =>
|
|
2291
|
+
onClick: y[0] || (y[0] = (C) => V()),
|
|
2296
2292
|
variant: "plain",
|
|
2297
2293
|
icon: "add"
|
|
2298
2294
|
}),
|
|
@@ -2388,13 +2384,13 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2388
2384
|
n[2] || (n[2] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1)),
|
|
2389
2385
|
createElementVNode("div", _hoisted_3$2, [
|
|
2390
2386
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (g) => {
|
|
2391
|
-
var b,
|
|
2387
|
+
var b, V;
|
|
2392
2388
|
return openBlock(), createBlock(l, {
|
|
2393
2389
|
variant: "outlined",
|
|
2394
2390
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
2395
2391
|
"col-span-2": unref(u).length == 1,
|
|
2396
2392
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((b = e.modelValue) == null ? void 0 : b.type) == g.value,
|
|
2397
|
-
"hover:bg-fm-color-opacity-sm": ((
|
|
2393
|
+
"hover:bg-fm-color-opacity-sm": ((V = e.modelValue) == null ? void 0 : V.type) != g.value
|
|
2398
2394
|
}]),
|
|
2399
2395
|
onClick: () => {
|
|
2400
2396
|
var p, c;
|
|
@@ -2511,7 +2507,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2511
2507
|
}));
|
|
2512
2508
|
return (s, h) => {
|
|
2513
2509
|
var y, m, f, B, C;
|
|
2514
|
-
const g = resolveComponent("FmTextField"), b = resolveComponent("FmStepperField"),
|
|
2510
|
+
const g = resolveComponent("FmTextField"), b = resolveComponent("FmStepperField"), V = resolveComponent("FmTextarea"), p = resolveComponent("FmHelperText"), c = resolveComponent("FmSwitch");
|
|
2515
2511
|
return e.field.type === "text" ? (openBlock(), createBlock(g, {
|
|
2516
2512
|
key: 0,
|
|
2517
2513
|
label: unref(r)(e.field.label),
|
|
@@ -2534,7 +2530,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2534
2530
|
"helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
|
|
2535
2531
|
"helper-text": e.field.isRuleChildren ? e.helperText : void 0
|
|
2536
2532
|
}, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
|
|
2537
|
-
], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(
|
|
2533
|
+
], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(V, {
|
|
2538
2534
|
key: 2,
|
|
2539
2535
|
label: unref(r)(e.field.label),
|
|
2540
2536
|
"label-mark": unref(l).labelMark,
|
|
@@ -2915,9 +2911,15 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
2915
2911
|
return !1;
|
|
2916
2912
|
}
|
|
2917
2913
|
}
|
|
2918
|
-
function onSubmit() {
|
|
2914
|
+
async function onSubmit() {
|
|
2919
2915
|
const e = schema.value.superRefine(campaignRefinement).transform(campaignTransform).safeParse(data.value);
|
|
2920
|
-
|
|
2916
|
+
if (!e.success)
|
|
2917
|
+
return;
|
|
2918
|
+
const d = await emits(
|
|
2919
|
+
"submit:model-value",
|
|
2920
|
+
cleanPF(JSON.parse(JSON.stringify(e.data)))
|
|
2921
|
+
);
|
|
2922
|
+
(d || d === void 0) && (sheetVisible.value = !1);
|
|
2921
2923
|
}
|
|
2922
2924
|
return (e, d) => {
|
|
2923
2925
|
const r = resolveComponent("FmButton"), i = resolveComponent("FmStep"), u = resolveComponent("FmStepper"), a = resolveComponent("FmCard"), o = resolveComponent("FmTopSheet");
|
|
@@ -3062,8 +3064,8 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
|
|
|
3062
3064
|
disabled: isDisable(s),
|
|
3063
3065
|
"onUpdate:modelValue": (g) => onUpdateProperty(s.property, g),
|
|
3064
3066
|
"onUpdate:file": async (g, b) => {
|
|
3065
|
-
const
|
|
3066
|
-
onUpdateProperty(s.property,
|
|
3067
|
+
const V = await onUpdateFile(g, b);
|
|
3068
|
+
onUpdateProperty(s.property, V || "");
|
|
3067
3069
|
},
|
|
3068
3070
|
schema: unref(ZodHelper).typeAtPath(
|
|
3069
3071
|
unref(schema),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as P, ref as O, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as R, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
|
|
2
|
-
import { z as te } from "./app-
|
|
2
|
+
import { z as te } from "./app-A-A8AXY4.js";
|
|
3
3
|
import { Z as u } from "./zod-Bg2FbC-D.js";
|
|
4
|
-
import { g as le, f as oe } from "./index-
|
|
5
|
-
import { u as Z } from "./vue-i18n-
|
|
6
|
-
import { s as C } from "./effect-
|
|
7
|
-
import { p as ae } from "./plugins-
|
|
8
|
-
import { e as ne } from "./app-
|
|
4
|
+
import { g as le, f as oe } from "./index-DIN-0kYC.js";
|
|
5
|
+
import { u as Z } from "./vue-i18n-CttzNDMl.js";
|
|
6
|
+
import { s as C } from "./effect-BzkBC2cZ.js";
|
|
7
|
+
import { p as ae } from "./plugins-D17305Np.js";
|
|
8
|
+
import { e as ne } from "./app-psmMhnbB.js";
|
|
9
9
|
const ie = { class: "flex flex-col gap-8" }, se = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "fm-typo-en-body-lg-600"
|