@feedmepos/mf-connect 0.0.7 → 0.0.8
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-D-E67IbN.js → Analytic-BxRuK2P2.js} +8 -8
- package/dist/{Broadcast-NjpOa4PK.js → Broadcast-BqGojAWW.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-7KnDJ-sV.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js} +8 -8
- package/dist/{Card-BOEkf7wo.js → Card-Dlj5jQp4.js} +54 -54
- package/dist/{Collections-sLYCpBxu.js → Collections-DvdDRozp.js} +181 -186
- package/dist/{Credit-DU2_9ex7.js → Credit-BeHm7_2S.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CBO6OHrM.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js} +170 -160
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CTvGOX7T.js → EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js} +2999 -2978
- package/dist/{Experience-DGNdVxuU.js → Experience-CtDY9u4Y.js} +8 -8
- package/dist/{Game-B1i79HLc.js → Game-DjaYuqcb.js} +8 -8
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DzdMpEl_.js → ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js} +1 -1
- package/dist/{MainLayout-CfgDdm6k.js → MainLayout-B-iAZM2k.js} +1 -1
- package/dist/{Marketing-CBre7DEM.js → Marketing-BJJltAh-.js} +6 -6
- package/dist/{Member-BfvuL8GL.js → Member-eJ9Pdi5w.js} +2 -2
- package/dist/{MemberList-CQ17Q4V7.js → MemberList-CrhMqUfJ.js} +12 -12
- package/dist/{MemberTransactions-Cviim4GX.js → MemberTransactions-DRET8mSQ.js} +2 -2
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-j31pc2Wx.js → MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js} +2 -2
- package/dist/{Point-9ta-6dJv.js → Point-DPTOgJbC.js} +8 -8
- package/dist/{Promotion-CBmH5FNG.js → Promotion-wzkRuNqO.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-r9Q-pOrs.js → RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js} +12 -12
- package/dist/{Segment-ZUtFZM5W.js → Segment-DnsPrP7Q.js} +10 -10
- package/dist/{Setting-TQdqaKPQ.js → Setting-CXuZu0-m.js} +9 -9
- package/dist/{Store-DX1ALcTQ.js → Store-4Um9keEp.js} +12 -12
- package/dist/{StoreRewards-Bd1ZFUQM.js → StoreRewards-B-UFeyQM.js} +10 -10
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-D0L-LkOm.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js} +5 -5
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C0xL6Ua_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js} +1 -1
- package/dist/Tier-C6KVsxGO.js +818 -0
- package/dist/{Title-YJtGygMA.js → Title-DuN1ahIM.js} +236 -236
- package/dist/{Transaction-DmvmaPk6.js → Transaction-DdfX7Xfe.js} +1 -1
- package/dist/{Voucher-D88gJYa3.js → Voucher-DarXrxZr.js} +99 -94
- package/dist/{app-g6ra_l_x.js → app-CxBTTB31.js} +1266 -1251
- package/dist/app.js +1 -1
- package/dist/{campaign-DdY0vnwY.js → campaign-B0aXkadj.js} +7 -7
- package/dist/dto-BtdVC-Ab.js +1093 -0
- package/dist/{effect-CghM-w8z.js → effect-BUN6rkQM.js} +1 -1
- package/dist/{helper-xWsMhdHl.js → helper-Cpq3x8K5.js} +1 -1
- package/dist/{index-CVSXd2FW.js → index-0GYrZr4L.js} +138 -132
- package/dist/{index-Dz8i7yJ_.js → index-8clzk3uX.js} +1 -1
- package/dist/{index-D71HFulf.js → index-BTntbYTS.js} +1 -1
- package/dist/{index-B4ootZIL.js → index-BvnZdJBY.js} +2 -2
- package/dist/{index-Cl-b6jYW.js → index-C6NgUSl2.js} +1 -1
- package/dist/{index-Bp8rb1uM.js → index-CK9yJMj7.js} +34 -34
- package/dist/{index-BSF_A6Bx.js → index-D2Juhkdw.js} +2 -2
- package/dist/{index-C5UTq5_2.js → index-DDSLx7vu.js} +2 -2
- package/dist/{index-gLwPyXKM.js → index-Dg-PMgXV.js} +1 -1
- package/dist/index-DysVCkrx.js +1735 -0
- package/dist/libs/packages/core/src/campaign/campaign.enum.d.ts +6 -0
- package/dist/libs/packages/core/src/campaign/campaign.fn.d.ts +2 -0
- package/dist/libs/packages/core/src/template/templates.d.ts +7 -0
- package/dist/{loading-DClM7b3o.js → loading-Cxp7sI5p.js} +2 -2
- package/dist/{lodash-wTDGx83S.js → lodash-DsT1nK-T.js} +1 -1
- package/dist/{membership-BEDm55VI.js → membership-DtD45RXh.js} +4 -4
- package/dist/{money-CPy2C0LJ.js → money-CFI1TMCS.js} +1 -1
- package/dist/{number-ROACK3bi.js → number-BBtf4fYz.js} +1 -1
- package/dist/packages/connect/src/api/index.d.ts +3 -0
- package/dist/packages/connect/src/api/settings/index.d.ts +1 -1
- package/dist/packages/connect/src/main.d.ts +1 -1
- package/dist/{plugins-CJou3ejy.js → plugins-B_d-WFtN.js} +4 -4
- package/dist/{rule-Cp7qN96m.js → rule-CB9Qlcx1.js} +2 -2
- package/dist/{rule-builder-OR4oX_mq.js → rule-builder-BIKcA4Bg.js} +1 -1
- package/dist/{template-Dk2sky27.js → template-qlb46PGl.js} +5 -5
- package/dist/{usePagination-DRHXkOF-.js → usePagination-CX66ab1Y.js} +1 -1
- package/dist/{xlsx-C5St1Lch.js → xlsx-DMaFso0k.js} +1 -1
- package/package.json +2 -2
- package/dist/Tier-DAUABM7F.js +0 -818
- package/dist/dto-BQHDb7XC.js +0 -353
- package/dist/index-CPU_mtDw.js +0 -1742
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, ref, watch, resolveComponent, createElementBlock, createElementVNode, Fragment, renderList, createVNode, isRef, createCommentVNode, withCtx, normalizeClass, toDisplayString, createTextVNode, resolveDynamicComponent, createSlots } from "vue";
|
|
2
|
-
import { _ } from "./lodash-
|
|
3
|
-
import { d as core, J as JsonViewer, z, a as useBusinessStore, S as SvcConfig } from "./app-
|
|
2
|
+
import { _ } from "./lodash-DsT1nK-T.js";
|
|
3
|
+
import { d as core, J as JsonViewer, z, a as useBusinessStore, S as SvcConfig } from "./app-CxBTTB31.js";
|
|
4
4
|
import { Z as ZodHelper, _ as _sfc_main$l } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
|
|
5
|
-
import { c as campaignRefinement, d as getCampaignSummaryObject, e as CampaignDtos, C as CampaignOptions, f as campaignTransform } from "./dto-
|
|
6
|
-
import { u as useMembershipStore, C as CollectibleOptions } from "./membership-
|
|
7
|
-
import { a as FdoEarningOption, b as F_GAME_TYPE, F as FdtoCollectibleConfig } from "./index-
|
|
8
|
-
import { i as isRuleGroup, R as RuleBuilder, a as isRuleEntry } from "./rule-builder-
|
|
5
|
+
import { c as campaignRefinement, d as getCampaignSummaryObject, e as CampaignDtos, C as CampaignOptions, f as campaignTransform } from "./dto-BtdVC-Ab.js";
|
|
6
|
+
import { u as useMembershipStore, C as CollectibleOptions } from "./membership-DtD45RXh.js";
|
|
7
|
+
import { a as FdoEarningOption, b as F_GAME_TYPE, F as FdtoCollectibleConfig } from "./index-D2Juhkdw.js";
|
|
8
|
+
import { i as isRuleGroup, R as RuleBuilder, a as isRuleEntry } from "./rule-builder-BIKcA4Bg.js";
|
|
9
9
|
import { h as hooks } from "./moment-BWErdI6_.js";
|
|
10
|
-
import {
|
|
11
|
-
import { _ as _sfc_main$
|
|
12
|
-
import { _ as _sfc_main$
|
|
13
|
-
import { _ as _sfc_main$
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { _ as _sfc_main$r } from "./MessageInput.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import { c as cases, u as useLoading } from "./loading-
|
|
19
|
-
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-
|
|
20
|
-
import "./index-
|
|
21
|
-
import "./index-
|
|
22
|
-
import "./index-
|
|
23
|
-
import "./index-
|
|
10
|
+
import { b as F_CAMPAIGN_TRIGGER_TYPE, C as CAMPAIGN_TRIGGER, c as FdtoRandomReward, f as featureVersionMapping } from "./index-0GYrZr4L.js";
|
|
11
|
+
import { _ as _sfc_main$m } from "./ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js";
|
|
12
|
+
import { _ as _sfc_main$n, a as _sfc_main$o, b as _sfc_main$q } from "./EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js";
|
|
13
|
+
import { _ as _sfc_main$p } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js";
|
|
14
|
+
import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js";
|
|
15
|
+
import { p as prompt, f as firebaseStorage } from "./plugins-B_d-WFtN.js";
|
|
16
|
+
import { _ as _sfc_main$i, T as TEMPLATES } from "./index-CK9yJMj7.js";
|
|
17
|
+
import { _ as _sfc_main$r } from "./MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js";
|
|
18
|
+
import { c as cases, u as useLoading } from "./loading-Cxp7sI5p.js";
|
|
19
|
+
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-CB9Qlcx1.js";
|
|
20
|
+
import "./index-DDSLx7vu.js";
|
|
21
|
+
import "./index-DysVCkrx.js";
|
|
22
|
+
import "./index-BvnZdJBY.js";
|
|
23
|
+
import "./index-8clzk3uX.js";
|
|
24
24
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
25
|
-
import { i as initCollectibleConfig } from "./helper-
|
|
25
|
+
import { i as initCollectibleConfig } from "./helper-Cpq3x8K5.js";
|
|
26
26
|
import { C as CollectionUtils } from "./collection.fn-DHlfGYAC.js";
|
|
27
27
|
import { useDialog } from "@feedmepos/ui-library";
|
|
28
28
|
import { a as cleanPF } from "./object-qECH92oz.js";
|
|
@@ -99,7 +99,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
99
99
|
), n.value = c ? a : t;
|
|
100
100
|
}
|
|
101
101
|
}), (a, t) => {
|
|
102
|
-
var c,
|
|
102
|
+
var c, y;
|
|
103
103
|
const l = resolveComponent("FmRadio");
|
|
104
104
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
105
105
|
createElementVNode("div", null, [
|
|
@@ -108,7 +108,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
108
108
|
value: m.value,
|
|
109
109
|
label: m.label,
|
|
110
110
|
modelValue: unref(n),
|
|
111
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
111
|
+
"onUpdate:modelValue": t[0] || (t[0] = (f) => isRef(n) ? n.value = f : null)
|
|
112
112
|
}, null, 8, ["value", "label", "modelValue"])), 64))
|
|
113
113
|
]),
|
|
114
114
|
unref(n) == "segment" ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
@@ -128,7 +128,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
128
128
|
key: 1,
|
|
129
129
|
"include-only": "user",
|
|
130
130
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
131
|
-
"model-value": ((
|
|
131
|
+
"model-value": ((y = e.modelValue) == null ? void 0 : y.rules.g_user) ?? unref(RuleBuilder).scaffoldGroup("g_user"),
|
|
132
132
|
"onUpdate:modelValue": t[2] || (t[2] = (m) => r(
|
|
133
133
|
"update:model-value",
|
|
134
134
|
unref(RuleBuilder).setRuleToGroup(
|
|
@@ -189,7 +189,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
return (a, t) => {
|
|
192
|
-
var
|
|
192
|
+
var y;
|
|
193
193
|
const l = resolveComponent("FmRadio"), c = resolveComponent("FmRadioGroup");
|
|
194
194
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
195
195
|
createVNode(c, {
|
|
@@ -216,7 +216,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
216
216
|
class: "!mt-[0px]",
|
|
217
217
|
"include-only": "trigger",
|
|
218
218
|
"trigger-type": "SCHEDULE",
|
|
219
|
-
"model-value": ((
|
|
219
|
+
"model-value": ((y = e.modelValue) == null ? void 0 : y.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
|
|
220
220
|
"onUpdate:modelValue": t[2] || (t[2] = (m) => r(
|
|
221
221
|
"update:model-value",
|
|
222
222
|
unref(RuleBuilder).setRuleToGroup(
|
|
@@ -526,7 +526,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
526
526
|
setup(e, { emit: u }) {
|
|
527
527
|
const o = u;
|
|
528
528
|
return (r, n) => {
|
|
529
|
-
const s = resolveComponent("FmButton"), a = resolveComponent("FmField"), t = resolveComponent("
|
|
529
|
+
const s = resolveComponent("FmButton"), a = resolveComponent("FmField"), t = resolveComponent("FmDatePicker");
|
|
530
530
|
return openBlock(), createBlock(t, {
|
|
531
531
|
label: e.label,
|
|
532
532
|
"model-value": e.modelValue || "",
|
|
@@ -625,18 +625,18 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
625
625
|
function n() {
|
|
626
626
|
const m = RuleBuilder.getRules(o.modelValue);
|
|
627
627
|
return m.length == 0 ? "fixed" : m.some(
|
|
628
|
-
(
|
|
628
|
+
(f) => isRuleEntry(f) && RuleBuilder.simplify(f).operator == "_rrule"
|
|
629
629
|
) ? "repeating" : "fixed";
|
|
630
630
|
}
|
|
631
631
|
const s = ref(n()), a = ref(!1), t = computed(() => {
|
|
632
|
-
const m = RuleBuilder.getRules(o.modelValue),
|
|
632
|
+
const m = RuleBuilder.getRules(o.modelValue), f = m.find(
|
|
633
633
|
(i) => isRuleEntry(i) && RuleBuilder.simplify(i).property == "trigger.date"
|
|
634
|
-
),
|
|
634
|
+
), p = m.find(
|
|
635
635
|
(i) => isRuleEntry(i) && RuleBuilder.simplify(i).property == "trigger.time"
|
|
636
636
|
);
|
|
637
637
|
return {
|
|
638
|
-
date:
|
|
639
|
-
time:
|
|
638
|
+
date: f ? RuleBuilder.simplify(f).equator : null,
|
|
639
|
+
time: p ? RuleBuilder.simplify(p).equator : null
|
|
640
640
|
};
|
|
641
641
|
}), l = computed(
|
|
642
642
|
() => calculateNextScheduleAt(
|
|
@@ -647,7 +647,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
647
647
|
)
|
|
648
648
|
);
|
|
649
649
|
function c(m) {
|
|
650
|
-
const
|
|
650
|
+
const f = m.label.toLowerCase(), p = f == "fixed" ? [
|
|
651
651
|
RuleBuilder.constructEntry(
|
|
652
652
|
"trigger.date",
|
|
653
653
|
"_isOnDate",
|
|
@@ -666,11 +666,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
666
666
|
"update:model-value",
|
|
667
667
|
RuleBuilder.setRuleToGroup(
|
|
668
668
|
RuleBuilder.scaffoldGroup("g_schedule"),
|
|
669
|
-
|
|
669
|
+
p
|
|
670
670
|
)
|
|
671
|
-
), s.value =
|
|
671
|
+
), s.value = f;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function y(m) {
|
|
674
674
|
s.value == "fixed" ? r(
|
|
675
675
|
"update:model-value",
|
|
676
676
|
RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
|
|
@@ -701,10 +701,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
701
701
|
])
|
|
702
702
|
);
|
|
703
703
|
}
|
|
704
|
-
return (m,
|
|
705
|
-
const
|
|
704
|
+
return (m, f) => {
|
|
705
|
+
const p = resolveComponent("FmButtonGroup"), i = resolveComponent("FmTimePicker"), d = resolveComponent("FmIcon"), v = resolveComponent("FmTooltip"), h = resolveComponent("FmField"), b = resolveComponent("FmCard"), V = resolveComponent("FmPopover"), k = resolveComponent("FmDatePicker"), B = resolveComponent("FmHelperText");
|
|
706
706
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
707
|
-
createVNode(
|
|
707
|
+
createVNode(p, {
|
|
708
708
|
items: [{ label: "Fixed" }, { label: "Repeating" }],
|
|
709
709
|
"model-value": { label: unref(cases).title(unref(s)) },
|
|
710
710
|
"onUpdate:modelValue": c,
|
|
@@ -715,14 +715,14 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
715
715
|
createVNode(i, {
|
|
716
716
|
label: "Notify time",
|
|
717
717
|
"model-value": unref(t).time,
|
|
718
|
-
"onUpdate:modelValue":
|
|
718
|
+
"onUpdate:modelValue": f[0] || (f[0] = (g) => y({ date: unref(t).date, time: g })),
|
|
719
719
|
"helper-text": unref(t).time ? void 0 : "Time is required",
|
|
720
720
|
"helper-state": unref(t).time ? void 0 : "error"
|
|
721
721
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
722
722
|
unref(s) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
723
723
|
createElementVNode("div", _hoisted_4$7, [
|
|
724
724
|
_hoisted_5$4,
|
|
725
|
-
unref(t).date ? (openBlock(), createBlock(
|
|
725
|
+
unref(t).date ? (openBlock(), createBlock(v, {
|
|
726
726
|
key: 0,
|
|
727
727
|
"z-index": 9999,
|
|
728
728
|
content: unref(SummarizeRrule)(unref(RRule).fromString(unref(t).date).options)
|
|
@@ -739,7 +739,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
739
739
|
]),
|
|
740
740
|
createVNode(V, {
|
|
741
741
|
"show-popover": unref(a),
|
|
742
|
-
onPopoverChanged:
|
|
742
|
+
onPopoverChanged: f[3] || (f[3] = (g) => a.value = g)
|
|
743
743
|
}, {
|
|
744
744
|
"popover-button": withCtx(() => [
|
|
745
745
|
createVNode(h, {
|
|
@@ -754,13 +754,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
754
754
|
}, 8, ["helper-text", "helper-state"])
|
|
755
755
|
]),
|
|
756
756
|
default: withCtx(() => [
|
|
757
|
-
createVNode(
|
|
757
|
+
createVNode(b, { class: "elevated p-8 w-[450px]" }, {
|
|
758
758
|
default: withCtx(() => [
|
|
759
759
|
createVNode(_sfc_main$k, {
|
|
760
760
|
"apply-button": !0,
|
|
761
761
|
"model-value": unref(t).date || "",
|
|
762
|
-
onCancel:
|
|
763
|
-
"onUpdate:modelValue":
|
|
762
|
+
onCancel: f[1] || (f[1] = (g) => a.value = !1),
|
|
763
|
+
"onUpdate:modelValue": f[2] || (f[2] = (g) => (y({ date: g, time: unref(t).time }), a.value = !1))
|
|
764
764
|
}, null, 8, ["model-value"])
|
|
765
765
|
]),
|
|
766
766
|
_: 1
|
|
@@ -768,16 +768,16 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
768
768
|
]),
|
|
769
769
|
_: 1
|
|
770
770
|
}, 8, ["show-popover"])
|
|
771
|
-
])) : (openBlock(), createBlock(
|
|
771
|
+
])) : (openBlock(), createBlock(k, {
|
|
772
772
|
key: 1,
|
|
773
773
|
label: "Notify date",
|
|
774
774
|
"model-value": unref(t).date || "",
|
|
775
|
-
"onUpdate:modelValue":
|
|
775
|
+
"onUpdate:modelValue": f[4] || (f[4] = (g) => y({ date: g, time: unref(t).time })),
|
|
776
776
|
"helper-text": unref(t).date ? void 0 : "Date is required",
|
|
777
777
|
"helper-state": unref(t).date ? void 0 : "error"
|
|
778
778
|
}, null, 8, ["model-value", "helper-text", "helper-state"]))
|
|
779
779
|
]),
|
|
780
|
-
unref(t).date && unref(t).time && unref(l) ? (openBlock(), createBlock(
|
|
780
|
+
unref(t).date && unref(t).time && unref(l) ? (openBlock(), createBlock(B, {
|
|
781
781
|
key: 0,
|
|
782
782
|
text: `${unref(hooks)(unref(l)).isAfter(unref(hooks)()) ? "The next notification will be sent on " : "Last trigger is on "} ${unref(hooks)(unref(l)).format("dddd, DD MMM YYYY")} at
|
|
783
783
|
${unref(hooks)(unref(l)).format("hh:mmA")} (${unref(hooks)(unref(l)).fromNow()})`
|
|
@@ -840,20 +840,20 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
840
840
|
);
|
|
841
841
|
}
|
|
842
842
|
return (t, l) => {
|
|
843
|
-
var
|
|
844
|
-
const c = resolveComponent("FmCard"),
|
|
843
|
+
var f, p, i;
|
|
844
|
+
const c = resolveComponent("FmCard"), y = resolveComponent("FmStepperField"), m = resolveComponent("FmHelperText");
|
|
845
845
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
846
846
|
createElementVNode("div", _hoisted_2$6, [
|
|
847
847
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (d) => {
|
|
848
|
-
var
|
|
848
|
+
var v, h;
|
|
849
849
|
return openBlock(), createBlock(c, {
|
|
850
850
|
variant: "outlined",
|
|
851
851
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
852
852
|
"col-span-2": unref(n).length == 1,
|
|
853
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((
|
|
853
|
+
"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.type) === d.value,
|
|
854
854
|
"hover:bg-fm-color-opacity-sm": ((h = e.modelValue) == null ? void 0 : h.type) != d.value
|
|
855
855
|
}]),
|
|
856
|
-
onClick: (
|
|
856
|
+
onClick: (b) => a(d.value),
|
|
857
857
|
key: d.value
|
|
858
858
|
}, {
|
|
859
859
|
default: withCtx(() => [
|
|
@@ -865,10 +865,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
865
865
|
}), 128))
|
|
866
866
|
]),
|
|
867
867
|
createElementVNode("div", _hoisted_5$3, [
|
|
868
|
-
createVNode(
|
|
868
|
+
createVNode(y, {
|
|
869
869
|
label: "Receive amount",
|
|
870
870
|
class: "flex-1",
|
|
871
|
-
"model-value": ((
|
|
871
|
+
"model-value": ((f = e.modelValue) == null ? void 0 : f.amount) ?? null,
|
|
872
872
|
"onUpdate:modelValue": l[0] || (l[0] = (d) => r("update:model-value", {
|
|
873
873
|
...e.modelValue ?? { type: "FIXED" },
|
|
874
874
|
amount: d
|
|
@@ -882,9 +882,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
882
882
|
}),
|
|
883
883
|
_: 1
|
|
884
884
|
}, 8, ["model-value"]),
|
|
885
|
-
((
|
|
885
|
+
((p = e.modelValue) == null ? void 0 : p.type) === "PROPORTIONAL" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
886
886
|
_hoisted_7$1,
|
|
887
|
-
createVNode(
|
|
887
|
+
createVNode(y, {
|
|
888
888
|
label: `Amount spend (${unref(core.Config).getCountry().currency.symbol})`,
|
|
889
889
|
class: "flex-1",
|
|
890
890
|
"model-value": ((i = e.modelValue) == null ? void 0 : i.every) ?? null,
|
|
@@ -977,8 +977,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
977
977
|
})
|
|
978
978
|
), n = FdtoCollectibleConfig, s = u;
|
|
979
979
|
return (a, t) => {
|
|
980
|
-
var m,
|
|
981
|
-
const l = resolveComponent("FmTextarea"), c = resolveComponent("FmHelperText"),
|
|
980
|
+
var m, f, p;
|
|
981
|
+
const l = resolveComponent("FmTextarea"), c = resolveComponent("FmHelperText"), y = resolveComponent("FmSwitch");
|
|
982
982
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
983
983
|
createVNode(_sfc_main$l, {
|
|
984
984
|
modelValue: unref(r).name,
|
|
@@ -1046,14 +1046,14 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1046
1046
|
_hoisted_5$1,
|
|
1047
1047
|
unref(r).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$p, {
|
|
1048
1048
|
key: 1,
|
|
1049
|
-
"model-value": ((
|
|
1049
|
+
"model-value": ((p = (f = unref(r).extras) == null ? void 0 : f.targetLocation) == null ? void 0 : p.map(String)) ?? null,
|
|
1050
1050
|
type: "select",
|
|
1051
1051
|
"onUpdate:modelValue": t[5] || (t[5] = (i) => {
|
|
1052
1052
|
unref(r).extras.targetLocation = i;
|
|
1053
1053
|
}),
|
|
1054
1054
|
rules: [unref(ZodHelper).ruleAtPath(unref(n), "extras.targetLocation")]
|
|
1055
1055
|
}, null, 8, ["model-value", "rules"])) : createCommentVNode("", !0),
|
|
1056
|
-
createVNode(
|
|
1056
|
+
createVNode(y, {
|
|
1057
1057
|
modelValue: unref(r).internal,
|
|
1058
1058
|
"onUpdate:modelValue": t[6] || (t[6] = (i) => unref(r).internal = i),
|
|
1059
1059
|
"label-placement": "right",
|
|
@@ -1070,15 +1070,15 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1070
1070
|
__name: "EditRewardPoolSheet",
|
|
1071
1071
|
emits: ["update:model-value"],
|
|
1072
1072
|
setup(e, { expose: u, emit: o }) {
|
|
1073
|
-
const r = useMembershipStore(), { minor: n } = useLoading, s = ref(!1), a = ref(), t = ref(), l = ref(0), c = FdtoRandomReward,
|
|
1073
|
+
const r = useMembershipStore(), { minor: n } = useLoading, s = ref(!1), a = ref(), t = ref(), l = ref(0), c = FdtoRandomReward, y = computed(() => {
|
|
1074
1074
|
const i = c.safeParse(a.value);
|
|
1075
1075
|
return i.success ? [] : i.error.errors;
|
|
1076
1076
|
});
|
|
1077
|
-
function m(i, d,
|
|
1078
|
-
i && (a.value = d, l.value =
|
|
1077
|
+
function m(i, d, v) {
|
|
1078
|
+
i && (a.value = d, l.value = v), s.value = i;
|
|
1079
1079
|
}
|
|
1080
|
-
const
|
|
1081
|
-
async function
|
|
1080
|
+
const f = o;
|
|
1081
|
+
async function p() {
|
|
1082
1082
|
const i = c.safeParse(a.value);
|
|
1083
1083
|
i.success && (await n(
|
|
1084
1084
|
async () => {
|
|
@@ -1091,44 +1091,44 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1091
1091
|
message: "Uploading reward image",
|
|
1092
1092
|
successMessage: "Reward image updated"
|
|
1093
1093
|
}
|
|
1094
|
-
),
|
|
1094
|
+
), f("update:model-value", i.data, l.value));
|
|
1095
1095
|
}
|
|
1096
1096
|
return u({
|
|
1097
1097
|
showSheet: m
|
|
1098
1098
|
}), (i, d) => {
|
|
1099
|
-
const
|
|
1099
|
+
const v = resolveComponent("FmSelect"), h = resolveComponent("FmStepperField"), b = resolveComponent("FmButton"), V = resolveComponent("FmSideSheet");
|
|
1100
1100
|
return openBlock(), createBlock(V, {
|
|
1101
1101
|
"max-width": 560,
|
|
1102
1102
|
modelValue: unref(s),
|
|
1103
1103
|
"onUpdate:modelValue": [
|
|
1104
|
-
d[9] || (d[9] = (
|
|
1105
|
-
d[10] || (d[10] = (
|
|
1104
|
+
d[9] || (d[9] = (k) => isRef(s) ? s.value = k : null),
|
|
1105
|
+
d[10] || (d[10] = (k) => s.value = k)
|
|
1106
1106
|
],
|
|
1107
1107
|
header: "Edit reward",
|
|
1108
1108
|
"dismiss-away": ""
|
|
1109
1109
|
}, {
|
|
1110
1110
|
"side-sheet-footer": withCtx(() => [
|
|
1111
1111
|
createElementVNode("div", _hoisted_4$3, [
|
|
1112
|
-
createVNode(
|
|
1112
|
+
createVNode(b, {
|
|
1113
1113
|
variant: "primary",
|
|
1114
1114
|
type: "button",
|
|
1115
|
-
disabled: unref(
|
|
1115
|
+
disabled: unref(y).length > 0,
|
|
1116
1116
|
label: "Confirm",
|
|
1117
|
-
onClick: d[7] || (d[7] = (
|
|
1117
|
+
onClick: d[7] || (d[7] = (k) => p())
|
|
1118
1118
|
}, null, 8, ["disabled"]),
|
|
1119
|
-
createVNode(
|
|
1119
|
+
createVNode(b, {
|
|
1120
1120
|
variant: "secondary",
|
|
1121
1121
|
type: "button",
|
|
1122
1122
|
label: "Cancel",
|
|
1123
|
-
onClick: d[8] || (d[8] = (
|
|
1123
|
+
onClick: d[8] || (d[8] = (k) => s.value = !1)
|
|
1124
1124
|
})
|
|
1125
1125
|
])
|
|
1126
1126
|
]),
|
|
1127
1127
|
default: withCtx(() => {
|
|
1128
|
-
var
|
|
1128
|
+
var k, B;
|
|
1129
1129
|
return [
|
|
1130
1130
|
unref(a) ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
1131
|
-
createVNode(
|
|
1131
|
+
createVNode(v, {
|
|
1132
1132
|
label: "Reward Type",
|
|
1133
1133
|
items: [
|
|
1134
1134
|
{ label: "No Reward", value: "NO_REWARD" },
|
|
@@ -1136,12 +1136,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1136
1136
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
1137
1137
|
],
|
|
1138
1138
|
"model-value": unref(a).type,
|
|
1139
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1140
|
-
|
|
1139
|
+
"onUpdate:modelValue": d[0] || (d[0] = (g) => {
|
|
1140
|
+
g == "NO_REWARD" ? a.value = {
|
|
1141
1141
|
type: "NO_REWARD",
|
|
1142
1142
|
collectible: null,
|
|
1143
1143
|
weight: 1
|
|
1144
|
-
} :
|
|
1144
|
+
} : g === "VOUCHER" ? a.value = {
|
|
1145
1145
|
collectible: null,
|
|
1146
1146
|
type: "VOUCHER",
|
|
1147
1147
|
collectibleConfig: unref(initCollectibleConfig)("VOUCHER", {
|
|
@@ -1169,43 +1169,43 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1169
1169
|
};
|
|
1170
1170
|
})
|
|
1171
1171
|
}, null, 8, ["model-value"]),
|
|
1172
|
-
unref(a).type == "LOYALTY" ? (openBlock(), createBlock(
|
|
1172
|
+
unref(a).type == "LOYALTY" ? (openBlock(), createBlock(v, {
|
|
1173
1173
|
key: 0,
|
|
1174
1174
|
label: "Loyalty type",
|
|
1175
1175
|
rules: [unref(ZodHelper).ruleAtPath(unref(c), "collectible", [unref(a).type])],
|
|
1176
1176
|
items: unref(r).loyaltyRewards.items,
|
|
1177
1177
|
"model-value": unref(a).collectible,
|
|
1178
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
1178
|
+
"onUpdate:modelValue": d[1] || (d[1] = (g) => unref(a).collectible = g)
|
|
1179
1179
|
}, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
|
|
1180
1180
|
createVNode(h, {
|
|
1181
1181
|
label: "Weight",
|
|
1182
1182
|
rules: [unref(ZodHelper).ruleAtPath(unref(c), "weight", [unref(a).type])],
|
|
1183
1183
|
"model-value": unref(a).weight,
|
|
1184
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
1184
|
+
"onUpdate:modelValue": d[2] || (d[2] = (g) => a.value = {
|
|
1185
1185
|
...unref(a),
|
|
1186
|
-
weight:
|
|
1186
|
+
weight: g
|
|
1187
1187
|
})
|
|
1188
1188
|
}, null, 8, ["rules", "model-value"]),
|
|
1189
1189
|
unref(a).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1190
|
-
((
|
|
1191
|
-
(
|
|
1192
|
-
var
|
|
1193
|
-
return
|
|
1190
|
+
((k = unref(r).loyaltyRewards.items.find(
|
|
1191
|
+
(g) => {
|
|
1192
|
+
var E;
|
|
1193
|
+
return g.value === ((E = unref(a)) == null ? void 0 : E.collectible);
|
|
1194
1194
|
}
|
|
1195
|
-
)) == null ? void 0 :
|
|
1195
|
+
)) == null ? void 0 : k.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1196
1196
|
_hoisted_2$3,
|
|
1197
1197
|
createVNode(_sfc_main$7, {
|
|
1198
1198
|
class: "mt-[-8px]",
|
|
1199
1199
|
rules: [
|
|
1200
1200
|
unref(ZodHelper).ruleAtPath(unref(c), "earningOption", [unref(a).type])
|
|
1201
1201
|
],
|
|
1202
|
-
"helper-state": unref(ZodHelper).helperState(unref(
|
|
1203
|
-
"error-text": unref(ZodHelper).helperText(unref(
|
|
1202
|
+
"helper-state": unref(ZodHelper).helperState(unref(y), "earningOption"),
|
|
1203
|
+
"error-text": unref(ZodHelper).helperText(unref(y), "earningOption"),
|
|
1204
1204
|
"fixed-type": !0,
|
|
1205
1205
|
"model-value": unref(a).earningOption,
|
|
1206
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
1206
|
+
"onUpdate:modelValue": d[3] || (d[3] = (g) => a.value = {
|
|
1207
1207
|
...unref(a),
|
|
1208
|
-
earningOption:
|
|
1208
|
+
earningOption: g
|
|
1209
1209
|
})
|
|
1210
1210
|
}, null, 8, ["rules", "helper-state", "error-text", "model-value"])
|
|
1211
1211
|
], 64)) : createCommentVNode("", !0),
|
|
@@ -1214,23 +1214,23 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1214
1214
|
class: "!gap-24",
|
|
1215
1215
|
rules: [unref(ZodHelper).ruleAtPath(unref(c), "validityOption", [unref(a).type])],
|
|
1216
1216
|
"model-value": unref(a).validityOption,
|
|
1217
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
1217
|
+
"onUpdate:modelValue": d[4] || (d[4] = (g) => a.value = {
|
|
1218
1218
|
...unref(a),
|
|
1219
|
-
validityOption:
|
|
1219
|
+
validityOption: g
|
|
1220
1220
|
})
|
|
1221
1221
|
}, null, 8, ["rules", "model-value"])
|
|
1222
1222
|
], 64)) : createCommentVNode("", !0),
|
|
1223
1223
|
unref(a).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
1224
1224
|
key: 2,
|
|
1225
1225
|
"reward-image": unref(t),
|
|
1226
|
-
"model-value": ((
|
|
1227
|
-
"onUpdate:modelValue": d[5] || (d[5] = (
|
|
1226
|
+
"model-value": ((B = unref(a)) == null ? void 0 : B.collectibleConfig) ?? void 0,
|
|
1227
|
+
"onUpdate:modelValue": d[5] || (d[5] = (g) => a.value = {
|
|
1228
1228
|
...unref(a),
|
|
1229
|
-
collectibleConfig:
|
|
1229
|
+
collectibleConfig: g
|
|
1230
1230
|
}),
|
|
1231
|
-
"onUpdate:rewardImage": d[6] || (d[6] = (
|
|
1231
|
+
"onUpdate:rewardImage": d[6] || (d[6] = (g) => t.value = g)
|
|
1232
1232
|
}, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
|
|
1233
|
-
createVNode(JsonViewer, { json: unref(
|
|
1233
|
+
createVNode(JsonViewer, { json: unref(y) }, null, 8, ["json"])
|
|
1234
1234
|
])) : createCommentVNode("", !0)
|
|
1235
1235
|
];
|
|
1236
1236
|
}),
|
|
@@ -1264,28 +1264,28 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1264
1264
|
}), l = ref();
|
|
1265
1265
|
function c(i, d) {
|
|
1266
1266
|
var h;
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1267
|
+
const v = [...a.value];
|
|
1268
|
+
v[d] = i, (h = l.value) == null || h.showSheet(!1), r("update:model-value", v);
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function y(i) {
|
|
1271
1271
|
const d = i.type == "VOUCHER" ? i.collectibleConfig : n.collectibles.find(
|
|
1272
|
-
(
|
|
1273
|
-
),
|
|
1272
|
+
(b) => b._id.toString() == i.collectible
|
|
1273
|
+
), v = CollectionUtils.formattedType((d == null ? void 0 : d.name) || ""), h = i.weight;
|
|
1274
1274
|
return {
|
|
1275
|
-
label: isNullOrEmpty(
|
|
1276
|
-
sublabel: `${h} (${(h / a.value.reduce((
|
|
1275
|
+
label: isNullOrEmpty(v) ? "NO REWARD" : v,
|
|
1276
|
+
sublabel: `${h} (${(h / a.value.reduce((b, V) => b + V.weight, 0) * 100).toFixed(2)}%)`
|
|
1277
1277
|
};
|
|
1278
1278
|
}
|
|
1279
1279
|
function m(i) {
|
|
1280
|
-
var
|
|
1280
|
+
var v;
|
|
1281
1281
|
const d = [...a.value];
|
|
1282
|
-
(
|
|
1282
|
+
(v = l.value) == null || v.showSheet(!0, d[i], i);
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function f(i) {
|
|
1285
1285
|
const d = [...a.value];
|
|
1286
1286
|
d.splice(i, 1), r("update:model-value", d);
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function p() {
|
|
1289
1289
|
var i;
|
|
1290
1290
|
(i = l.value) == null || i.showSheet(
|
|
1291
1291
|
!0,
|
|
@@ -1298,35 +1298,35 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1298
1298
|
);
|
|
1299
1299
|
}
|
|
1300
1300
|
return (i, d) => {
|
|
1301
|
-
const
|
|
1301
|
+
const v = resolveComponent("FmButton"), h = resolveComponent("FmCard"), b = resolveComponent("FmHelperText");
|
|
1302
1302
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1303
1303
|
_hoisted_2$2,
|
|
1304
|
-
createVNode(
|
|
1304
|
+
createVNode(v, {
|
|
1305
1305
|
label: "Add Reward",
|
|
1306
|
-
onClick: d[0] || (d[0] = (V) =>
|
|
1306
|
+
onClick: d[0] || (d[0] = (V) => p()),
|
|
1307
1307
|
variant: "plain",
|
|
1308
1308
|
icon: "add"
|
|
1309
1309
|
}),
|
|
1310
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (V,
|
|
1311
|
-
key:
|
|
1310
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (V, k) => (openBlock(), createBlock(h, {
|
|
1311
|
+
key: k,
|
|
1312
1312
|
class: "px-16 py-12 flex items-center justify-between cursor-pointer",
|
|
1313
1313
|
variant: "outlined",
|
|
1314
|
-
onClick: (
|
|
1314
|
+
onClick: (B) => m(k)
|
|
1315
1315
|
}, {
|
|
1316
1316
|
default: withCtx(() => [
|
|
1317
1317
|
createElementVNode("div", null, [
|
|
1318
|
-
createElementVNode("div", _hoisted_3$2, toDisplayString(
|
|
1319
|
-
createElementVNode("div", _hoisted_4$2, toDisplayString(
|
|
1318
|
+
createElementVNode("div", _hoisted_3$2, toDisplayString(y(V).label), 1),
|
|
1319
|
+
createElementVNode("div", _hoisted_4$2, toDisplayString(y(V).sublabel), 1)
|
|
1320
1320
|
]),
|
|
1321
|
-
createVNode(
|
|
1321
|
+
createVNode(v, {
|
|
1322
1322
|
icon: "delete",
|
|
1323
1323
|
variant: "tertiary",
|
|
1324
|
-
onClick: (
|
|
1324
|
+
onClick: (B) => (B.stopPropagation(), f(k))
|
|
1325
1325
|
}, null, 8, ["onClick"])
|
|
1326
1326
|
]),
|
|
1327
1327
|
_: 2
|
|
1328
1328
|
}, 1032, ["onClick"]))), 128)),
|
|
1329
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t).filter((V) => V.path.join(".") == ""), (V) => (openBlock(), createBlock(
|
|
1329
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(t).filter((V) => V.path.join(".") == ""), (V) => (openBlock(), createBlock(b, {
|
|
1330
1330
|
key: V.message,
|
|
1331
1331
|
text: V.message,
|
|
1332
1332
|
state: "error"
|
|
@@ -1354,43 +1354,48 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1354
1354
|
const o = e, r = u, n = computed(() => [
|
|
1355
1355
|
{
|
|
1356
1356
|
label: "Rock paper scissor",
|
|
1357
|
-
description: "Customers play
|
|
1357
|
+
description: "Customers play 3 rounds of Rock Paper Scissors against the cashier. If customer won 2 rounds, they will get a discount.",
|
|
1358
1358
|
value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS
|
|
1359
1359
|
}
|
|
1360
1360
|
]);
|
|
1361
1361
|
return (s, a) => {
|
|
1362
|
-
var
|
|
1363
|
-
const t = resolveComponent("FmSwitch"), l = resolveComponent("FmCard");
|
|
1362
|
+
var y, m, f;
|
|
1363
|
+
const t = resolveComponent("FmSwitch"), l = resolveComponent("FmCard"), c = resolveComponent("FmHelperText");
|
|
1364
1364
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1365
1365
|
createVNode(t, {
|
|
1366
1366
|
label: "Enable game",
|
|
1367
|
-
"model-value": !!((
|
|
1368
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
1367
|
+
"model-value": !!((y = e.modelValue) != null && y.gameType),
|
|
1368
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => p ? r("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : r("update:model-value", null))
|
|
1369
1369
|
}, null, 8, ["model-value"]),
|
|
1370
|
-
((
|
|
1371
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (
|
|
1372
|
-
var
|
|
1370
|
+
((m = e.modelValue) == null ? void 0 : m.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
1371
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (p) => {
|
|
1372
|
+
var i, d;
|
|
1373
1373
|
return openBlock(), createBlock(l, {
|
|
1374
1374
|
variant: "outlined",
|
|
1375
1375
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
1376
1376
|
"col-span-2": unref(n).length == 1,
|
|
1377
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((
|
|
1378
|
-
"hover:bg-fm-color-opacity-sm": ((
|
|
1377
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((i = e.modelValue) == null ? void 0 : i.gameType) == p.value,
|
|
1378
|
+
"hover:bg-fm-color-opacity-sm": ((d = e.modelValue) == null ? void 0 : d.gameType) != p.value
|
|
1379
1379
|
}]),
|
|
1380
1380
|
onClick: () => {
|
|
1381
|
-
var
|
|
1382
|
-
((
|
|
1381
|
+
var v;
|
|
1382
|
+
((v = o.modelValue) == null ? void 0 : v.gameType) != p.value && r("update:model-value", { gameType: p.value });
|
|
1383
1383
|
},
|
|
1384
|
-
key:
|
|
1384
|
+
key: p.value
|
|
1385
1385
|
}, {
|
|
1386
1386
|
default: withCtx(() => [
|
|
1387
|
-
createElementVNode("div", _hoisted_3$1, toDisplayString(
|
|
1388
|
-
createElementVNode("div", _hoisted_4$1, toDisplayString(
|
|
1387
|
+
createElementVNode("div", _hoisted_3$1, toDisplayString(p.label), 1),
|
|
1388
|
+
createElementVNode("div", _hoisted_4$1, toDisplayString(p.description), 1)
|
|
1389
1389
|
]),
|
|
1390
1390
|
_: 2
|
|
1391
1391
|
}, 1032, ["class", "onClick"]);
|
|
1392
1392
|
}), 128))
|
|
1393
|
-
])) : createCommentVNode("", !0)
|
|
1393
|
+
])) : createCommentVNode("", !0),
|
|
1394
|
+
((f = e.modelValue) == null ? void 0 : f.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(c, {
|
|
1395
|
+
key: 1,
|
|
1396
|
+
text: "Rock paper scissors is only available for POS >= 7.7.4 with dual screen on android devices (Sunmi D3 Pro and Sunmi T3 Pro)",
|
|
1397
|
+
state: "warning"
|
|
1398
|
+
})) : createCommentVNode("", !0)
|
|
1394
1399
|
]);
|
|
1395
1400
|
};
|
|
1396
1401
|
}
|
|
@@ -1421,12 +1426,12 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1421
1426
|
function n(l) {
|
|
1422
1427
|
switch (o.field.type) {
|
|
1423
1428
|
case "timeframe":
|
|
1424
|
-
const c = l.startDate ? hooks(l.startDate).startOf("day").toISOString() : void 0,
|
|
1429
|
+
const c = l.startDate ? hooks(l.startDate).startOf("day").toISOString() : void 0, y = l.endDate ? hooks(l.endDate).endOf("day").toISOString() : void 0;
|
|
1425
1430
|
r("update:model-value", {
|
|
1426
1431
|
type: "timeframe",
|
|
1427
1432
|
property: "__now",
|
|
1428
1433
|
start: c,
|
|
1429
|
-
end:
|
|
1434
|
+
end: y
|
|
1430
1435
|
});
|
|
1431
1436
|
break;
|
|
1432
1437
|
case "image": {
|
|
@@ -1468,9 +1473,9 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1468
1473
|
zodLabel: o.schema ? ZodHelper.toInputLabel(o.schema, o.field.label) : void 0
|
|
1469
1474
|
}));
|
|
1470
1475
|
return (l, c) => {
|
|
1471
|
-
var d,
|
|
1472
|
-
const
|
|
1473
|
-
return e.field.type === "text" ? (openBlock(), createBlock(
|
|
1476
|
+
var d, v, h, b, V;
|
|
1477
|
+
const y = resolveComponent("FmTextField"), m = resolveComponent("FmStepperField"), f = resolveComponent("FmTextarea"), p = resolveComponent("FmHelperText"), i = resolveComponent("FmSwitch");
|
|
1478
|
+
return e.field.type === "text" ? (openBlock(), createBlock(y, {
|
|
1474
1479
|
key: 0,
|
|
1475
1480
|
label: e.field.label,
|
|
1476
1481
|
"label-mark": unref(t).labelMark,
|
|
@@ -1490,7 +1495,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1490
1495
|
"helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
|
|
1491
1496
|
"helper-text": e.field.isRuleChildren ? e.helperText : void 0
|
|
1492
1497
|
}, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
|
|
1493
|
-
], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(
|
|
1498
|
+
], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(f, {
|
|
1494
1499
|
key: 2,
|
|
1495
1500
|
label: e.field.label,
|
|
1496
1501
|
"label-mark": unref(t).labelMark,
|
|
@@ -1498,7 +1503,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1498
1503
|
"model-value": unref(s),
|
|
1499
1504
|
"onUpdate:modelValue": n,
|
|
1500
1505
|
"show-word-count": "",
|
|
1501
|
-
"max-length": (V = (
|
|
1506
|
+
"max-length": (V = (b = (h = (v = (d = unref(t)) == null ? void 0 : d.unwrapped) == null ? void 0 : v._def) == null ? void 0 : h.checks) == null ? void 0 : b.find((k) => k.kind == "max")) == null ? void 0 : V.value
|
|
1502
1507
|
}, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$b, {
|
|
1503
1508
|
key: 3,
|
|
1504
1509
|
"campaign-type": e.extras,
|
|
@@ -1510,7 +1515,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1510
1515
|
"model-value": unref(s),
|
|
1511
1516
|
"onUpdate:modelValue": n
|
|
1512
1517
|
}, null, 8, ["model-value"]),
|
|
1513
|
-
createVNode(
|
|
1518
|
+
createVNode(p, {
|
|
1514
1519
|
class: "!mt-[8px]",
|
|
1515
1520
|
text: unref(ZodHelper).helperText(a(), ""),
|
|
1516
1521
|
state: unref(ZodHelper).helperState(a(), "")
|
|
@@ -1551,7 +1556,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1551
1556
|
"onUpdate:modelValue": n,
|
|
1552
1557
|
"can-set-auto-apply": e.field.property == "campaign.effect"
|
|
1553
1558
|
}, null, 8, ["model-value", "can-set-auto-apply"]),
|
|
1554
|
-
unref(s) ? createCommentVNode("", !0) : (openBlock(), createBlock(
|
|
1559
|
+
unref(s) ? createCommentVNode("", !0) : (openBlock(), createBlock(p, {
|
|
1555
1560
|
key: 0,
|
|
1556
1561
|
class: "!mt-[8px]",
|
|
1557
1562
|
text: "Effect is required",
|
|
@@ -1591,7 +1596,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1591
1596
|
"start-date": e.extras.start,
|
|
1592
1597
|
"end-date": e.extras.end
|
|
1593
1598
|
}, null, 8, ["model-value", "start-date", "end-date"]),
|
|
1594
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1599
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1595
1600
|
key: 0,
|
|
1596
1601
|
class: "!mt-[8px]",
|
|
1597
1602
|
text: e.helperText,
|
|
@@ -1602,19 +1607,24 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1602
1607
|
"model-value": unref(s),
|
|
1603
1608
|
"onUpdate:modelValue": n
|
|
1604
1609
|
}, null, 8, ["model-value"]),
|
|
1605
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1610
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1606
1611
|
key: 0,
|
|
1607
1612
|
class: "!mt-[8px]",
|
|
1608
1613
|
text: e.helperText,
|
|
1609
1614
|
state: "error"
|
|
1610
1615
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1611
1616
|
], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 17 }, [
|
|
1617
|
+
e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(s).rules.g_time).length > 0 ? (openBlock(), createBlock(p, {
|
|
1618
|
+
key: 0,
|
|
1619
|
+
state: "warning",
|
|
1620
|
+
text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
|
|
1621
|
+
}, null, 8, ["text"])) : createCommentVNode("", !0),
|
|
1612
1622
|
createVNode(_sfc_main$f, {
|
|
1613
1623
|
"model-value": unref(s),
|
|
1614
1624
|
"onUpdate:modelValue": n
|
|
1615
1625
|
}, null, 8, ["model-value"]),
|
|
1616
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1617
|
-
key:
|
|
1626
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1627
|
+
key: 1,
|
|
1618
1628
|
class: "!mt-[8px]",
|
|
1619
1629
|
text: e.helperText,
|
|
1620
1630
|
state: "error"
|
|
@@ -1624,7 +1634,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1624
1634
|
"model-value": unref(s),
|
|
1625
1635
|
"onUpdate:modelValue": n
|
|
1626
1636
|
}, null, 8, ["model-value"]),
|
|
1627
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1637
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1628
1638
|
key: 0,
|
|
1629
1639
|
class: "!mt-[8px]",
|
|
1630
1640
|
text: e.helperText,
|
|
@@ -1635,7 +1645,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1635
1645
|
"model-value": unref(s),
|
|
1636
1646
|
"onUpdate:modelValue": n
|
|
1637
1647
|
}, null, 8, ["model-value"]),
|
|
1638
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1648
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1639
1649
|
key: 0,
|
|
1640
1650
|
class: "!mt-[8px]",
|
|
1641
1651
|
text: e.helperText,
|
|
@@ -1646,7 +1656,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1646
1656
|
"model-value": unref(s),
|
|
1647
1657
|
"onUpdate:modelValue": n
|
|
1648
1658
|
}, null, 8, ["model-value"]),
|
|
1649
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1659
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1650
1660
|
key: 0,
|
|
1651
1661
|
class: "!mt-[8px]",
|
|
1652
1662
|
text: e.helperText,
|
|
@@ -1657,7 +1667,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1657
1667
|
"model-value": unref(s),
|
|
1658
1668
|
"onUpdate:modelValue": n
|
|
1659
1669
|
}, null, 8, ["model-value"]),
|
|
1660
|
-
e.helperText ? (openBlock(), createBlock(
|
|
1670
|
+
e.helperText ? (openBlock(), createBlock(p, {
|
|
1661
1671
|
key: 0,
|
|
1662
1672
|
class: "!mt-[8px]",
|
|
1663
1673
|
text: e.helperText,
|
|
@@ -1900,16 +1910,16 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1900
1910
|
class: "space-y-24"
|
|
1901
1911
|
}, [
|
|
1902
1912
|
createElementVNode("div", _hoisted_7, toDisplayString(t.name), 1),
|
|
1903
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.fields, (c,
|
|
1913
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.fields, (c, y) => (openBlock(), createElementBlock("div", { key: y }, [
|
|
1904
1914
|
(openBlock(), createBlock(_sfc_main$1, {
|
|
1905
|
-
key:
|
|
1915
|
+
key: y,
|
|
1906
1916
|
field: c,
|
|
1907
1917
|
modelValue: unref(_).get(unref(data), c.property),
|
|
1908
1918
|
disabled: isDisable(c),
|
|
1909
1919
|
"onUpdate:modelValue": (m) => onUpdateProperty(c.property, m),
|
|
1910
|
-
"onUpdate:file": async (m,
|
|
1911
|
-
const
|
|
1912
|
-
onUpdateProperty(c.property,
|
|
1920
|
+
"onUpdate:file": async (m, f) => {
|
|
1921
|
+
const p = await onUpdateFile(m, f);
|
|
1922
|
+
onUpdateProperty(c.property, p || "");
|
|
1913
1923
|
},
|
|
1914
1924
|
schema: unref(ZodHelper).typeAtPath(unref(schema), c.property, [
|
|
1915
1925
|
unref(data).campaign.type
|