@feedmepos/mf-connect 0.0.8 → 0.0.9
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-BxRuK2P2.js → Analytic-CwaN0mge.js} +68 -69
- package/dist/{Broadcast-BqGojAWW.js → Broadcast-Cjx5xzUC.js} +27 -28
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-VzcVMS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D4mO5aik.js} +34 -34
- package/dist/Card-DbY6YaXk.js +827 -0
- package/dist/{Collections-DvdDRozp.js → Collections-DRN2gzwh.js} +158 -168
- package/dist/{Credit-BeHm7_2S.js → Credit-DOcrzykJ.js} +11 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsbgHsah.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js} +359 -333
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hwXvdiut.js → EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js} +5 -5
- package/dist/{Experience-CtDY9u4Y.js → Experience-aQj-3H2Y.js} +11 -12
- package/dist/{Game-DjaYuqcb.js → Game-Cnje-m_M.js} +22 -23
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Bq5-Gl9N.js → ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js} +8 -8
- package/dist/{MainLayout-B-iAZM2k.js → MainLayout-Cxl9yLPs.js} +1 -1
- package/dist/{Marketing-BJJltAh-.js → Marketing-BYUcbcMU.js} +19 -20
- package/dist/{Member-eJ9Pdi5w.js → Member-D7K9fm_Q.js} +2 -2
- package/dist/MemberList-DbXkxUzF.js +1717 -0
- package/dist/{MemberTransactions-DRET8mSQ.js → MemberTransactions-DED1SYwX.js} +4 -4
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CLqIp5wR.js +203 -0
- package/dist/{Point-DPTOgJbC.js → Point-CQm8whVQ.js} +11 -12
- package/dist/{Promotion-wzkRuNqO.js → Promotion-DzVXy_C9.js} +42 -44
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Z06eB5i5.js → RuleGroup.vue_vue_type_script_setup_true_lang-CeS6KlhP.js} +12 -12
- package/dist/Segment-D3o0D3Uv.js +407 -0
- package/dist/{Setting-CXuZu0-m.js → Setting-pCzenLoL.js} +17 -18
- package/dist/{Store-4Um9keEp.js → Store-DEwEIFYD.js} +18 -19
- package/dist/{StoreRewards-B-UFeyQM.js → StoreRewards-D7vnZN4f.js} +86 -87
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-ALzQU3th.js +793 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-I_XFpctY.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js} +1 -1
- package/dist/{Tier-C6KVsxGO.js → Tier-BJbX5CPB.js} +401 -377
- package/dist/{Title-DuN1ahIM.js → Title-C9xV6rBg.js} +274 -248
- package/dist/Transaction-C8OHlhzR.js +36 -0
- package/dist/Voucher-eZwm7N1D.js +481 -0
- package/dist/{app-CxBTTB31.js → app-DgbDbhL-.js} +34 -34
- package/dist/app.js +1 -1
- package/dist/{campaign-B0aXkadj.js → campaign-BkvrUTEJ.js} +2 -2
- package/dist/{dto-BtdVC-Ab.js → dto-YYVhW73A.js} +52 -53
- package/dist/{effect-BUN6rkQM.js → effect-f7DAPYC8.js} +1 -1
- package/dist/export-BXbCXTfd.js +97 -0
- package/dist/{helper-Cpq3x8K5.js → helper-BhvQ9m6d.js} +1 -1
- package/dist/{index-D2Juhkdw.js → index-BhacKx5B.js} +85 -83
- package/dist/{index-DDSLx7vu.js → index-BsEqtUmY.js} +2 -2
- package/dist/{index-0GYrZr4L.js → index-CdtrQ9tR.js} +5 -5
- package/dist/{index-8clzk3uX.js → index-Cfo2A0Se.js} +1 -1
- package/dist/index-Cz5RZlYh.js +73 -0
- package/dist/{index-BTntbYTS.js → index-DQC_1tRF.js} +1 -1
- package/dist/{index-DysVCkrx.js → index-Dd3hrFcQ.js} +3 -3
- package/dist/{index-CK9yJMj7.js → index-FWp9M1yS.js} +5 -5
- package/dist/{index-C6NgUSl2.js → index-VmFlM704.js} +1 -1
- package/dist/{index-BvnZdJBY.js → index-oQLJE4Uw.js} +2 -2
- package/dist/libs/packages/core/src/collectible/collectible.dto.d.ts +6 -0
- package/dist/{plugins-B_d-WFtN.js → loading-DQaawbHE.js} +8204 -8108
- package/dist/{lodash-DsT1nK-T.js → lodash-DzdmTD20.js} +1 -1
- package/dist/{membership-DtD45RXh.js → membership-Dq2-b-S_.js} +3 -3
- package/dist/{money-CFI1TMCS.js → money-vzwOUBrp.js} +1 -1
- package/dist/{number-BBtf4fYz.js → number-CBzs6rfW.js} +1 -1
- package/dist/packages/connect/src/components/campaign/CampaignSummary.vue.d.ts +13 -0
- package/dist/packages/connect/src/composables/export.d.ts +11 -0
- package/dist/packages/connect/src/export/base.export.d.ts +7 -0
- package/dist/packages/connect/src/export/card.export.d.ts +5 -6
- package/dist/packages/connect/src/export/collection-transaction.export.d.ts +14 -0
- package/dist/packages/connect/src/export/index.d.ts +1 -0
- package/dist/packages/connect/src/export/store-transaction.export.d.ts +14 -0
- package/dist/packages/connect/src/helpers/user.d.ts +6 -0
- package/dist/{rule-CB9Qlcx1.js → rule-BR5rrmUV.js} +2 -2
- package/dist/{rule-builder-BIKcA4Bg.js → rule-builder-7GBNrPXt.js} +1 -1
- package/dist/{template-qlb46PGl.js → template-CETJ6lkf.js} +5 -5
- package/dist/{usePagination-CX66ab1Y.js → usePagination-DdZeE4Tt.js} +57 -56
- package/dist/user-Bm4KttFq.js +37 -0
- package/dist/{xlsx-DMaFso0k.js → xlsx-CDAKxZE_.js} +1 -1
- package/package.json +1 -1
- package/dist/Card-Dlj5jQp4.js +0 -792
- package/dist/MemberList-CrhMqUfJ.js +0 -1664
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D-ttMwn2.js +0 -166
- package/dist/Segment-DnsPrP7Q.js +0 -371
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAyotuXd.js +0 -660
- package/dist/Transaction-DdfX7Xfe.js +0 -34
- package/dist/Voucher-DarXrxZr.js +0 -454
- package/dist/index-Dg-PMgXV.js +0 -64
- package/dist/loading-Cxp7sI5p.js +0 -100
|
@@ -1,32 +1,31 @@
|
|
|
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-
|
|
4
|
-
import { Z as ZodHelper, _ as _sfc_main$
|
|
5
|
-
import { c as
|
|
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-
|
|
2
|
+
import { _ } from "./lodash-DzdmTD20.js";
|
|
3
|
+
import { d as core, J as JsonViewer, z, a as useBusinessStore, S as SvcConfig } from "./app-DgbDbhL-.js";
|
|
4
|
+
import { Z as ZodHelper, _ as _sfc_main$m } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
|
|
5
|
+
import { c as getCampaignSummaryObject, d as campaignRefinement, e as CampaignDtos, C as CampaignOptions, f as campaignTransform } from "./dto-YYVhW73A.js";
|
|
6
|
+
import { u as useMembershipStore, C as CollectibleOptions } from "./membership-Dq2-b-S_.js";
|
|
7
|
+
import { a as FdoEarningOption, b as F_GAME_TYPE, F as FdtoCollectibleConfig } from "./index-BhacKx5B.js";
|
|
8
|
+
import { i as isRuleGroup, R as RuleBuilder, a as isRuleEntry } from "./rule-builder-7GBNrPXt.js";
|
|
9
9
|
import { h as hooks } from "./moment-BWErdI6_.js";
|
|
10
|
-
import { b as F_CAMPAIGN_TRIGGER_TYPE, C as CAMPAIGN_TRIGGER, c as FdtoRandomReward, f as featureVersionMapping } from "./index-
|
|
11
|
-
import { _ as _sfc_main$
|
|
12
|
-
import { _ as _sfc_main$
|
|
13
|
-
import { _ as _sfc_main$
|
|
14
|
-
import { _ as _sfc_main$
|
|
15
|
-
import { p as prompt, f as firebaseStorage } from "./
|
|
16
|
-
import { _ as _sfc_main$
|
|
17
|
-
import { _ as _sfc_main$
|
|
18
|
-
import { c as
|
|
19
|
-
import
|
|
20
|
-
import "./index-
|
|
21
|
-
import "./index-
|
|
22
|
-
import "./index-
|
|
23
|
-
import "./index-8clzk3uX.js";
|
|
10
|
+
import { b as F_CAMPAIGN_TRIGGER_TYPE, C as CAMPAIGN_TRIGGER, c as FdtoRandomReward, f as featureVersionMapping } from "./index-CdtrQ9tR.js";
|
|
11
|
+
import { _ as _sfc_main$n } from "./ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js";
|
|
12
|
+
import { _ as _sfc_main$o, a as _sfc_main$p, b as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js";
|
|
13
|
+
import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js";
|
|
14
|
+
import { _ as _sfc_main$k, a as _sfc_main$l } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CeS6KlhP.js";
|
|
15
|
+
import { p as prompt, c as cases, f as firebaseStorage, u as useLoading } from "./loading-DQaawbHE.js";
|
|
16
|
+
import { _ as _sfc_main$j, T as TEMPLATES } from "./index-FWp9M1yS.js";
|
|
17
|
+
import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-CLqIp5wR.js";
|
|
18
|
+
import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-BR5rrmUV.js";
|
|
19
|
+
import "./index-BsEqtUmY.js";
|
|
20
|
+
import "./index-Dd3hrFcQ.js";
|
|
21
|
+
import "./index-oQLJE4Uw.js";
|
|
22
|
+
import "./index-Cfo2A0Se.js";
|
|
24
23
|
import { useCoreStore } from "@feedmepos/mf-common";
|
|
25
|
-
import { i as initCollectibleConfig } from "./helper-
|
|
24
|
+
import { i as initCollectibleConfig } from "./helper-BhvQ9m6d.js";
|
|
26
25
|
import { C as CollectionUtils } from "./collection.fn-DHlfGYAC.js";
|
|
27
26
|
import { useDialog } from "@feedmepos/ui-library";
|
|
28
27
|
import { a as cleanPF } from "./object-qECH92oz.js";
|
|
29
|
-
const _sfc_main$
|
|
28
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
30
29
|
__name: "SegmentConfigurator",
|
|
31
30
|
props: {
|
|
32
31
|
modelValue: {
|
|
@@ -40,12 +39,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
40
39
|
var t;
|
|
41
40
|
const [s] = isRuleGroup(o.modelValue) ? Object.values(((t = o.modelValue) == null ? void 0 : t.rules) ?? {}) : [null];
|
|
42
41
|
return (s ?? RuleBuilder.constructEntry("user.segment", "_hasAny", [])).conditions._hasAny;
|
|
43
|
-
}),
|
|
44
|
-
return (s,
|
|
42
|
+
}), a = u;
|
|
43
|
+
return (s, n) => (openBlock(), createBlock(_sfc_main$j, {
|
|
45
44
|
multiselect: !0,
|
|
46
45
|
items: unref(useMembershipStore)().segmentOptions,
|
|
47
46
|
"model-value": unref(r),
|
|
48
|
-
"onUpdate:modelValue":
|
|
47
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => a(
|
|
49
48
|
"update:model-value",
|
|
50
49
|
unref(RuleBuilder).setRuleToGroup(
|
|
51
50
|
unref(RuleBuilder).scaffoldGroup("g_segment"),
|
|
@@ -55,7 +54,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
55
54
|
label: "Select segment(s) to match"
|
|
56
55
|
}, null, 8, ["items", "model-value"]));
|
|
57
56
|
}
|
|
58
|
-
}), _hoisted_1$
|
|
57
|
+
}), _hoisted_1$d = { class: "space-y-16" }, _hoisted_2$b = { key: 0 }, _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
59
58
|
__name: "UserRuleGroup",
|
|
60
59
|
props: {
|
|
61
60
|
modelValue: {
|
|
@@ -66,7 +65,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
66
65
|
},
|
|
67
66
|
emits: ["update:model-value"],
|
|
68
67
|
setup(e, { emit: u }) {
|
|
69
|
-
const o = e, r = u,
|
|
68
|
+
const o = e, r = u, a = ref(
|
|
70
69
|
o.modelValue ? RuleBuilder.getRules(o.modelValue.rules.g_user).length > 0 ? "custom" : RuleBuilder.getRules(o.modelValue.rules.g_segment).length > 0 ? "segment" : "all_users" : "all_users"
|
|
71
70
|
), s = [
|
|
72
71
|
{
|
|
@@ -82,9 +81,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
82
81
|
label: "Custom audience"
|
|
83
82
|
}
|
|
84
83
|
];
|
|
85
|
-
return watch(
|
|
84
|
+
return watch(a, async (n, t) => {
|
|
86
85
|
var l;
|
|
87
|
-
if (t != "all_users" && t !=
|
|
86
|
+
if (t != "all_users" && t != n && RuleBuilder.getRules(
|
|
88
87
|
(l = o.modelValue) == null ? void 0 : l.rules[t == "custom" ? "g_user" : "g_segment"]
|
|
89
88
|
).length > 0) {
|
|
90
89
|
const c = await prompt.confirm(
|
|
@@ -96,23 +95,23 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
96
95
|
o.modelValue ?? RuleBuilder.scaffoldGroup(),
|
|
97
96
|
RuleBuilder.scaffoldGroup(t == "custom" ? "g_user" : "g_segment")
|
|
98
97
|
)
|
|
99
|
-
),
|
|
98
|
+
), a.value = c ? n : t;
|
|
100
99
|
}
|
|
101
|
-
}), (
|
|
100
|
+
}), (n, t) => {
|
|
102
101
|
var c, y;
|
|
103
102
|
const l = resolveComponent("FmRadio");
|
|
104
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
103
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
105
104
|
createElementVNode("div", null, [
|
|
106
105
|
(openBlock(), createElementBlock(Fragment, null, renderList(s, (m) => createVNode(l, {
|
|
107
106
|
key: m.value,
|
|
108
107
|
value: m.value,
|
|
109
108
|
label: m.label,
|
|
110
|
-
modelValue: unref(
|
|
111
|
-
"onUpdate:modelValue": t[0] || (t[0] = (f) => isRef(
|
|
109
|
+
modelValue: unref(a),
|
|
110
|
+
"onUpdate:modelValue": t[0] || (t[0] = (f) => isRef(a) ? a.value = f : null)
|
|
112
111
|
}, null, 8, ["value", "label", "modelValue"])), 64))
|
|
113
112
|
]),
|
|
114
|
-
unref(
|
|
115
|
-
createVNode(_sfc_main$
|
|
113
|
+
unref(a) == "segment" ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
114
|
+
createVNode(_sfc_main$i, {
|
|
116
115
|
modelValue: ((c = e.modelValue) == null ? void 0 : c.rules.g_segment) ?? unref(RuleBuilder).scaffoldGroup("g_segment"),
|
|
117
116
|
"onUpdate:modelValue": t[1] || (t[1] = (m) => r(
|
|
118
117
|
"update:model-value",
|
|
@@ -124,7 +123,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
124
123
|
))
|
|
125
124
|
}, null, 8, ["modelValue"])
|
|
126
125
|
])) : createCommentVNode("", !0),
|
|
127
|
-
unref(
|
|
126
|
+
unref(a) == "custom" ? (openBlock(), createBlock(_sfc_main$k, {
|
|
128
127
|
key: 1,
|
|
129
128
|
"include-only": "user",
|
|
130
129
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
@@ -141,7 +140,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
141
140
|
]);
|
|
142
141
|
};
|
|
143
142
|
}
|
|
144
|
-
}), _hoisted_1$
|
|
143
|
+
}), _hoisted_1$c = { class: "space-y-24" }, _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
145
144
|
__name: "TimeRuleGroup",
|
|
146
145
|
props: {
|
|
147
146
|
modelValue: {
|
|
@@ -152,12 +151,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
152
151
|
},
|
|
153
152
|
emits: ["update:model-value"],
|
|
154
153
|
setup(e, { emit: u }) {
|
|
155
|
-
const o = e, r = u,
|
|
154
|
+
const o = e, r = u, a = ref(
|
|
156
155
|
!o.modelValue || !o.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(o.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
|
|
157
156
|
);
|
|
158
|
-
watch(
|
|
157
|
+
watch(a, async (n, t) => {
|
|
159
158
|
var l;
|
|
160
|
-
if (t == "custom" &&
|
|
159
|
+
if (t == "custom" && n == "all_time" && RuleBuilder.getRules((l = o.modelValue) == null ? void 0 : l.rules.g_time).length > 0) {
|
|
161
160
|
const c = await prompt.confirm(
|
|
162
161
|
"Are you sure you want to turn off custom conditons? This will remove all the rules you have set."
|
|
163
162
|
);
|
|
@@ -167,16 +166,16 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
167
166
|
o.modelValue ?? RuleBuilder.scaffoldGroup(),
|
|
168
167
|
RuleBuilder.scaffoldGroup("g_time")
|
|
169
168
|
)
|
|
170
|
-
),
|
|
169
|
+
), a.value = c ? n : t;
|
|
171
170
|
}
|
|
172
171
|
});
|
|
173
|
-
async function s(
|
|
172
|
+
async function s(n) {
|
|
174
173
|
var t;
|
|
175
|
-
if (
|
|
174
|
+
if (n == "custom" && RuleBuilder.getRules((t = o.modelValue) == null ? void 0 : t.rules.g_time).length > 0) {
|
|
176
175
|
if (!await prompt.confirm(
|
|
177
176
|
"Are you sure you want to turn off custom conditons? This will remove all the rules you have set."
|
|
178
177
|
)) {
|
|
179
|
-
|
|
178
|
+
a.value = "all_time";
|
|
180
179
|
return;
|
|
181
180
|
}
|
|
182
181
|
r(
|
|
@@ -188,14 +187,14 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
188
187
|
);
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
|
-
return (
|
|
190
|
+
return (n, t) => {
|
|
192
191
|
var y;
|
|
193
192
|
const l = resolveComponent("FmRadio"), c = resolveComponent("FmRadioGroup");
|
|
194
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
193
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
195
194
|
createVNode(c, {
|
|
196
|
-
modelValue: unref(
|
|
195
|
+
modelValue: unref(a),
|
|
197
196
|
"onUpdate:modelValue": [
|
|
198
|
-
t[0] || (t[0] = (m) => isRef(
|
|
197
|
+
t[0] || (t[0] = (m) => isRef(a) ? a.value = m : null),
|
|
199
198
|
t[1] || (t[1] = (m) => s(m))
|
|
200
199
|
]
|
|
201
200
|
}, {
|
|
@@ -211,7 +210,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
211
210
|
]),
|
|
212
211
|
_: 1
|
|
213
212
|
}, 8, ["modelValue"]),
|
|
214
|
-
unref(
|
|
213
|
+
unref(a) == "custom" ? (openBlock(), createBlock(_sfc_main$k, {
|
|
215
214
|
key: 0,
|
|
216
215
|
class: "!mt-[0px]",
|
|
217
216
|
"include-only": "trigger",
|
|
@@ -229,7 +228,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
229
228
|
]);
|
|
230
229
|
};
|
|
231
230
|
}
|
|
232
|
-
}), _sfc_main$
|
|
231
|
+
}), _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
233
232
|
__name: "BillRuleGroup",
|
|
234
233
|
props: {
|
|
235
234
|
modelValue: {
|
|
@@ -241,24 +240,24 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
241
240
|
emits: ["update:model-value"],
|
|
242
241
|
setup(e, { emit: u }) {
|
|
243
242
|
const o = u;
|
|
244
|
-
return (r,
|
|
243
|
+
return (r, a) => {
|
|
245
244
|
var s;
|
|
246
|
-
return openBlock(), createBlock(_sfc_main$
|
|
245
|
+
return openBlock(), createBlock(_sfc_main$k, {
|
|
247
246
|
"include-only": "bill",
|
|
248
247
|
"trigger-type": "BILL_COMPLETED",
|
|
249
248
|
"model-value": ((s = e.modelValue) == null ? void 0 : s.rules.g_bill) ?? unref(RuleBuilder).scaffoldGroup("g_bill"),
|
|
250
|
-
"onUpdate:modelValue":
|
|
249
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => o(
|
|
251
250
|
"update:model-value",
|
|
252
251
|
unref(RuleBuilder).setRuleToGroup(
|
|
253
252
|
e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
|
|
254
|
-
|
|
253
|
+
n,
|
|
255
254
|
"&&"
|
|
256
255
|
)
|
|
257
256
|
))
|
|
258
257
|
}, null, 8, ["model-value"]);
|
|
259
258
|
};
|
|
260
259
|
}
|
|
261
|
-
}), _sfc_main$
|
|
260
|
+
}), _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
262
261
|
__name: "BirthdayInput",
|
|
263
262
|
props: {
|
|
264
263
|
modelValue: {
|
|
@@ -267,8 +266,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
267
266
|
},
|
|
268
267
|
emits: ["update:model-value"],
|
|
269
268
|
setup(e, { emit: u }) {
|
|
270
|
-
const o = e, r = u,
|
|
271
|
-
const { property: s, operator:
|
|
269
|
+
const o = e, r = u, a = computed(() => {
|
|
270
|
+
const { property: s, operator: n, equator: t } = RuleBuilder.simplify(
|
|
272
271
|
o.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
|
|
273
272
|
op: "before",
|
|
274
273
|
x: 1
|
|
@@ -276,18 +275,18 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
276
275
|
);
|
|
277
276
|
return {
|
|
278
277
|
property: s,
|
|
279
|
-
operator:
|
|
278
|
+
operator: n,
|
|
280
279
|
equator: t
|
|
281
280
|
};
|
|
282
281
|
});
|
|
283
|
-
return (s,
|
|
282
|
+
return (s, n) => {
|
|
284
283
|
const t = resolveComponent("FmRadio"), l = resolveComponent("FmStepperField");
|
|
285
284
|
return openBlock(), createElementBlock("div", null, [
|
|
286
285
|
createVNode(t, {
|
|
287
286
|
label: "On birthday",
|
|
288
287
|
value: "_isRange-day",
|
|
289
|
-
"model-value": `${unref(
|
|
290
|
-
"onUpdate:modelValue":
|
|
288
|
+
"model-value": `${unref(a).operator}-${unref(a).equator.unit}`,
|
|
289
|
+
"onUpdate:modelValue": n[0] || (n[0] = () => {
|
|
291
290
|
r(
|
|
292
291
|
"update:model-value",
|
|
293
292
|
unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
|
|
@@ -301,8 +300,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
301
300
|
createVNode(t, {
|
|
302
301
|
label: "N days before birthday",
|
|
303
302
|
value: "_isDay",
|
|
304
|
-
"model-value": unref(
|
|
305
|
-
"onUpdate:modelValue":
|
|
303
|
+
"model-value": unref(a).operator,
|
|
304
|
+
"onUpdate:modelValue": n[1] || (n[1] = () => {
|
|
306
305
|
r(
|
|
307
306
|
"update:model-value",
|
|
308
307
|
unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
|
|
@@ -313,12 +312,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
313
312
|
);
|
|
314
313
|
})
|
|
315
314
|
}, null, 8, ["model-value"]),
|
|
316
|
-
unref(
|
|
315
|
+
unref(a).operator == "_isDay" ? (openBlock(), createBlock(l, {
|
|
317
316
|
key: 0,
|
|
318
317
|
label: "Days before birthday",
|
|
319
318
|
"show-steppers": !1,
|
|
320
|
-
"model-value": unref(
|
|
321
|
-
"onUpdate:modelValue":
|
|
319
|
+
"model-value": unref(a).equator.x,
|
|
320
|
+
"onUpdate:modelValue": n[2] || (n[2] = (c) => r(
|
|
322
321
|
"update:model-value",
|
|
323
322
|
unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
|
|
324
323
|
op: "after",
|
|
@@ -330,8 +329,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
330
329
|
createVNode(t, {
|
|
331
330
|
label: "In birthday week",
|
|
332
331
|
value: "_isRange-week",
|
|
333
|
-
"model-value": `${unref(
|
|
334
|
-
"onUpdate:modelValue":
|
|
332
|
+
"model-value": `${unref(a).operator}-${unref(a).equator.unit}`,
|
|
333
|
+
"onUpdate:modelValue": n[3] || (n[3] = () => {
|
|
335
334
|
r(
|
|
336
335
|
"update:model-value",
|
|
337
336
|
unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
|
|
@@ -345,8 +344,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
345
344
|
createVNode(t, {
|
|
346
345
|
label: "In birthday month",
|
|
347
346
|
value: "_isRange-month",
|
|
348
|
-
"model-value": `${unref(
|
|
349
|
-
"onUpdate:modelValue":
|
|
347
|
+
"model-value": `${unref(a).operator}-${unref(a).equator.unit}`,
|
|
348
|
+
"onUpdate:modelValue": n[4] || (n[4] = () => {
|
|
350
349
|
r(
|
|
351
350
|
"update:model-value",
|
|
352
351
|
unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
|
|
@@ -360,7 +359,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
360
359
|
]);
|
|
361
360
|
};
|
|
362
361
|
}
|
|
363
|
-
}), _sfc_main$
|
|
362
|
+
}), _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
364
363
|
__name: "FeedbackRuleGroup",
|
|
365
364
|
props: {
|
|
366
365
|
modelValue: {
|
|
@@ -372,17 +371,17 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
372
371
|
emits: ["update:model-value"],
|
|
373
372
|
setup(e, { emit: u }) {
|
|
374
373
|
const o = u;
|
|
375
|
-
return (r,
|
|
374
|
+
return (r, a) => {
|
|
376
375
|
var s;
|
|
377
|
-
return openBlock(), createBlock(_sfc_main$
|
|
376
|
+
return openBlock(), createBlock(_sfc_main$k, {
|
|
378
377
|
"include-only": "feedback",
|
|
379
378
|
"trigger-type": "FEEDBACK",
|
|
380
379
|
"model-value": ((s = e.modelValue) == null ? void 0 : s.rules.g_feedback) ?? unref(RuleBuilder).scaffoldGroup("g_feedback"),
|
|
381
|
-
"onUpdate:modelValue":
|
|
380
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => o(
|
|
382
381
|
"update:model-value",
|
|
383
382
|
unref(RuleBuilder).setRuleToGroup(
|
|
384
383
|
e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
|
|
385
|
-
|
|
384
|
+
n,
|
|
386
385
|
"&&"
|
|
387
386
|
)
|
|
388
387
|
))
|
|
@@ -462,7 +461,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
462
461
|
(u == null ? void 0 : u.map((o) => TriggerOptions[o]).filter((o) => !o.hidden)) ?? []
|
|
463
462
|
];
|
|
464
463
|
})
|
|
465
|
-
), _hoisted_1$
|
|
464
|
+
), _hoisted_1$b = { class: "space-y-16" }, _hoisted_2$a = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1), _hoisted_3$a = { class: "grid grid-cols-3 gap-16" }, _hoisted_4$a = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$5 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
466
465
|
__name: "CampaignTriggerInput",
|
|
467
466
|
props: {
|
|
468
467
|
campaignType: {
|
|
@@ -479,19 +478,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
479
478
|
},
|
|
480
479
|
emits: ["update:model-value"],
|
|
481
480
|
setup(e, { emit: u }) {
|
|
482
|
-
const o = e, r = u,
|
|
481
|
+
const o = e, r = u, a = computed(() => o.disabled ? TypeToTriggerOptions[o.campaignType].filter(
|
|
483
482
|
(s) => s.value == o.modelValue
|
|
484
483
|
) : TypeToTriggerOptions[o.campaignType]);
|
|
485
|
-
return (s,
|
|
484
|
+
return (s, n) => {
|
|
486
485
|
const t = resolveComponent("FmCard");
|
|
487
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
488
|
-
_hoisted_2$
|
|
489
|
-
createElementVNode("div", _hoisted_3$
|
|
490
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
486
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
487
|
+
_hoisted_2$a,
|
|
488
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
489
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (l) => (openBlock(), createBlock(t, {
|
|
491
490
|
variant: "outlined",
|
|
492
491
|
disabled: o.disabled,
|
|
493
492
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
494
|
-
"col-span-3": unref(
|
|
493
|
+
"col-span-3": unref(a).length == 1,
|
|
495
494
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == l.value,
|
|
496
495
|
"hover:bg-fm-color-opacity-sm": e.modelValue != l.value
|
|
497
496
|
}]),
|
|
@@ -501,7 +500,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
501
500
|
key: l.name
|
|
502
501
|
}, {
|
|
503
502
|
default: withCtx(() => [
|
|
504
|
-
createElementVNode("div", _hoisted_4$
|
|
503
|
+
createElementVNode("div", _hoisted_4$a, toDisplayString(l.name), 1),
|
|
505
504
|
createElementVNode("div", _hoisted_5$5, toDisplayString(l.description), 1)
|
|
506
505
|
]),
|
|
507
506
|
_: 2
|
|
@@ -510,7 +509,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
510
509
|
]);
|
|
511
510
|
};
|
|
512
511
|
}
|
|
513
|
-
}), _sfc_main$
|
|
512
|
+
}), _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
514
513
|
__name: "DateInput",
|
|
515
514
|
props: {
|
|
516
515
|
label: {
|
|
@@ -525,15 +524,15 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
525
524
|
emits: ["update:model-value"],
|
|
526
525
|
setup(e, { emit: u }) {
|
|
527
526
|
const o = u;
|
|
528
|
-
return (r,
|
|
529
|
-
const s = resolveComponent("FmButton"),
|
|
527
|
+
return (r, a) => {
|
|
528
|
+
const s = resolveComponent("FmButton"), n = resolveComponent("FmField"), t = resolveComponent("FmDatePicker");
|
|
530
529
|
return openBlock(), createBlock(t, {
|
|
531
530
|
label: e.label,
|
|
532
531
|
"model-value": e.modelValue || "",
|
|
533
|
-
"onUpdate:modelValue":
|
|
532
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => o("update:model-value", l))
|
|
534
533
|
}, {
|
|
535
534
|
"trigger-button": withCtx(({ opened: l }) => [
|
|
536
|
-
createVNode(
|
|
535
|
+
createVNode(n, {
|
|
537
536
|
class: "flex items-center",
|
|
538
537
|
"prepend-icon": "calendar_month",
|
|
539
538
|
"icon-outlined": !l
|
|
@@ -543,7 +542,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
543
542
|
key: 0,
|
|
544
543
|
variant: "tertiary",
|
|
545
544
|
icon: "clear",
|
|
546
|
-
onClick:
|
|
545
|
+
onClick: a[0] || (a[0] = (c) => (c.stopPropagation(), o("update:model-value", null)))
|
|
547
546
|
})) : createCommentVNode("", !0)
|
|
548
547
|
]),
|
|
549
548
|
default: withCtx(() => [
|
|
@@ -558,7 +557,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
558
557
|
}, 8, ["label", "model-value"]);
|
|
559
558
|
};
|
|
560
559
|
}
|
|
561
|
-
}), _hoisted_1$
|
|
560
|
+
}), _hoisted_1$a = { class: "flex items-center gap-8 w-full xs:flex-col" }, _hoisted_2$9 = { class: "flex-1 xs:w-full" }, _hoisted_3$9 = /* @__PURE__ */ createElementVNode("div", { class: "mt-5 xs:hidden" }, "to", -1), _hoisted_4$9 = { class: "flex-1 xs:w-full" }, _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
562
561
|
__name: "DateRangeInput",
|
|
563
562
|
props: {
|
|
564
563
|
modelValue: {
|
|
@@ -569,14 +568,14 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
569
568
|
emits: ["update:model-value"],
|
|
570
569
|
setup(e, { emit: u }) {
|
|
571
570
|
const o = u;
|
|
572
|
-
return (r,
|
|
573
|
-
var s,
|
|
574
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
575
|
-
createElementVNode("div", _hoisted_2$
|
|
576
|
-
createVNode(_sfc_main$
|
|
571
|
+
return (r, a) => {
|
|
572
|
+
var s, n;
|
|
573
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
574
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
575
|
+
createVNode(_sfc_main$b, {
|
|
577
576
|
"model-value": ((s = e.modelValue) == null ? void 0 : s.startDate) ?? null,
|
|
578
577
|
label: "Start date",
|
|
579
|
-
"onUpdate:modelValue":
|
|
578
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => {
|
|
580
579
|
var l;
|
|
581
580
|
return o("update:model-value", {
|
|
582
581
|
startDate: t,
|
|
@@ -585,12 +584,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
585
584
|
})
|
|
586
585
|
}, null, 8, ["model-value"])
|
|
587
586
|
]),
|
|
588
|
-
_hoisted_3$
|
|
589
|
-
createElementVNode("div", _hoisted_4$
|
|
590
|
-
createVNode(_sfc_main$
|
|
591
|
-
"model-value": ((
|
|
587
|
+
_hoisted_3$9,
|
|
588
|
+
createElementVNode("div", _hoisted_4$9, [
|
|
589
|
+
createVNode(_sfc_main$b, {
|
|
590
|
+
"model-value": ((n = e.modelValue) == null ? void 0 : n.endDate) ?? null,
|
|
592
591
|
label: "End date",
|
|
593
|
-
"onUpdate:modelValue":
|
|
592
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => {
|
|
594
593
|
var l;
|
|
595
594
|
return o("update:model-value", {
|
|
596
595
|
startDate: ((l = e.modelValue) == null ? void 0 : l.startDate) ?? null,
|
|
@@ -602,10 +601,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
602
601
|
]);
|
|
603
602
|
};
|
|
604
603
|
}
|
|
605
|
-
}), _hoisted_1$
|
|
604
|
+
}), _hoisted_1$9 = { class: "space-y-8" }, _hoisted_2$8 = { class: "grid grid-cols-2 gap-16" }, _hoisted_3$8 = {
|
|
606
605
|
key: 0,
|
|
607
606
|
class: "space-y-4"
|
|
608
|
-
}, _hoisted_4$
|
|
607
|
+
}, _hoisted_4$8 = { class: "fm-typo-en-body-lg-400 class flex items-center justify-between" }, _hoisted_5$4 = /* @__PURE__ */ createElementVNode("div", null, "Notify date", -1), _hoisted_6$2 = { class: "text-ellipsis line-clamp-1" }, _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
609
608
|
__name: "ScheduleRuleInput",
|
|
610
609
|
props: {
|
|
611
610
|
modelValue: {
|
|
@@ -622,13 +621,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
622
621
|
emits: ["update:model-value"],
|
|
623
622
|
setup(e, { emit: u }) {
|
|
624
623
|
const o = e, r = u;
|
|
625
|
-
function
|
|
624
|
+
function a() {
|
|
626
625
|
const m = RuleBuilder.getRules(o.modelValue);
|
|
627
626
|
return m.length == 0 ? "fixed" : m.some(
|
|
628
627
|
(f) => isRuleEntry(f) && RuleBuilder.simplify(f).operator == "_rrule"
|
|
629
628
|
) ? "repeating" : "fixed";
|
|
630
629
|
}
|
|
631
|
-
const s = ref(
|
|
630
|
+
const s = ref(a()), n = ref(!1), t = computed(() => {
|
|
632
631
|
const m = RuleBuilder.getRules(o.modelValue), f = m.find(
|
|
633
632
|
(i) => isRuleEntry(i) && RuleBuilder.simplify(i).property == "trigger.date"
|
|
634
633
|
), p = m.find(
|
|
@@ -702,7 +701,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
702
701
|
);
|
|
703
702
|
}
|
|
704
703
|
return (m, f) => {
|
|
705
|
-
const p = resolveComponent("FmButtonGroup"), i = resolveComponent("FmTimePicker"), d = resolveComponent("FmIcon"),
|
|
704
|
+
const p = resolveComponent("FmButtonGroup"), i = resolveComponent("FmTimePicker"), d = resolveComponent("FmIcon"), g = resolveComponent("FmTooltip"), h = resolveComponent("FmField"), b = resolveComponent("FmCard"), V = resolveComponent("FmPopover"), k = resolveComponent("FmDatePicker"), B = resolveComponent("FmHelperText");
|
|
706
705
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
707
706
|
createVNode(p, {
|
|
708
707
|
items: [{ label: "Fixed" }, { label: "Repeating" }],
|
|
@@ -710,19 +709,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
710
709
|
"onUpdate:modelValue": c,
|
|
711
710
|
class: "mb-8"
|
|
712
711
|
}, null, 8, ["model-value"]),
|
|
713
|
-
createElementVNode("div", _hoisted_1$
|
|
714
|
-
createElementVNode("div", _hoisted_2$
|
|
712
|
+
createElementVNode("div", _hoisted_1$9, [
|
|
713
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
715
714
|
createVNode(i, {
|
|
716
715
|
label: "Notify time",
|
|
717
716
|
"model-value": unref(t).time,
|
|
718
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
717
|
+
"onUpdate:modelValue": f[0] || (f[0] = (v) => y({ date: unref(t).date, time: v })),
|
|
719
718
|
"helper-text": unref(t).time ? void 0 : "Time is required",
|
|
720
719
|
"helper-state": unref(t).time ? void 0 : "error"
|
|
721
720
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
722
|
-
unref(s) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
723
|
-
createElementVNode("div", _hoisted_4$
|
|
721
|
+
unref(s) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
|
|
722
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
724
723
|
_hoisted_5$4,
|
|
725
|
-
unref(t).date ? (openBlock(), createBlock(
|
|
724
|
+
unref(t).date ? (openBlock(), createBlock(g, {
|
|
726
725
|
key: 0,
|
|
727
726
|
"z-index": 9999,
|
|
728
727
|
content: unref(SummarizeRrule)(unref(RRule).fromString(unref(t).date).options)
|
|
@@ -738,8 +737,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
738
737
|
}, 8, ["content"])) : createCommentVNode("", !0)
|
|
739
738
|
]),
|
|
740
739
|
createVNode(V, {
|
|
741
|
-
"show-popover": unref(
|
|
742
|
-
onPopoverChanged: f[3] || (f[3] = (
|
|
740
|
+
"show-popover": unref(n),
|
|
741
|
+
onPopoverChanged: f[3] || (f[3] = (v) => n.value = v)
|
|
743
742
|
}, {
|
|
744
743
|
"popover-button": withCtx(() => [
|
|
745
744
|
createVNode(h, {
|
|
@@ -756,11 +755,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
756
755
|
default: withCtx(() => [
|
|
757
756
|
createVNode(b, { class: "elevated p-8 w-[450px]" }, {
|
|
758
757
|
default: withCtx(() => [
|
|
759
|
-
createVNode(_sfc_main$
|
|
758
|
+
createVNode(_sfc_main$l, {
|
|
760
759
|
"apply-button": !0,
|
|
761
760
|
"model-value": unref(t).date || "",
|
|
762
|
-
onCancel: f[1] || (f[1] = (
|
|
763
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
|
761
|
+
onCancel: f[1] || (f[1] = (v) => n.value = !1),
|
|
762
|
+
"onUpdate:modelValue": f[2] || (f[2] = (v) => (y({ date: v, time: unref(t).time }), n.value = !1))
|
|
764
763
|
}, null, 8, ["model-value"])
|
|
765
764
|
]),
|
|
766
765
|
_: 1
|
|
@@ -772,7 +771,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
772
771
|
key: 1,
|
|
773
772
|
label: "Notify date",
|
|
774
773
|
"model-value": unref(t).date || "",
|
|
775
|
-
"onUpdate:modelValue": f[4] || (f[4] = (
|
|
774
|
+
"onUpdate:modelValue": f[4] || (f[4] = (v) => y({ date: v, time: unref(t).time })),
|
|
776
775
|
"helper-text": unref(t).date ? void 0 : "Date is required",
|
|
777
776
|
"helper-state": unref(t).date ? void 0 : "error"
|
|
778
777
|
}, null, 8, ["model-value", "helper-text", "helper-state"]))
|
|
@@ -786,10 +785,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
786
785
|
], 64);
|
|
787
786
|
};
|
|
788
787
|
}
|
|
789
|
-
}), _hoisted_1$
|
|
788
|
+
}), _hoisted_1$8 = { class: "space-y-24" }, _hoisted_2$7 = { class: "grid grid-cols-2 gap-16" }, _hoisted_3$7 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$7 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_5$3 = { class: "flex items-center gap-16" }, _hoisted_6$1 = {
|
|
790
789
|
key: 0,
|
|
791
790
|
class: "mr-32"
|
|
792
|
-
}, _hoisted_7$1 = /* @__PURE__ */ createElementVNode("div", null, "to every", -1), _sfc_main$
|
|
791
|
+
}, _hoisted_7$1 = /* @__PURE__ */ createElementVNode("div", null, "to every", -1), _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
793
792
|
__name: "EarningOptionInput",
|
|
794
793
|
props: {
|
|
795
794
|
modelValue: {
|
|
@@ -807,7 +806,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
807
806
|
},
|
|
808
807
|
emits: ["update:model-value"],
|
|
809
808
|
setup(e, { emit: u }) {
|
|
810
|
-
const o = e, r = u,
|
|
809
|
+
const o = e, r = u, a = [
|
|
811
810
|
{
|
|
812
811
|
label: "Based on spending",
|
|
813
812
|
sublabel: "Customers earn rewards based on how much they spend.",
|
|
@@ -825,7 +824,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
825
824
|
const t = FdoEarningOption.safeParse(o.modelValue);
|
|
826
825
|
return t.success ? [] : t.error.errors;
|
|
827
826
|
});
|
|
828
|
-
function
|
|
827
|
+
function n(t) {
|
|
829
828
|
var l;
|
|
830
829
|
t != ((l = o.modelValue) == null ? void 0 : l.type) && r(
|
|
831
830
|
"update:model-value",
|
|
@@ -842,23 +841,23 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
842
841
|
return (t, l) => {
|
|
843
842
|
var f, p, i;
|
|
844
843
|
const c = resolveComponent("FmCard"), y = resolveComponent("FmStepperField"), m = resolveComponent("FmHelperText");
|
|
845
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
846
|
-
createElementVNode("div", _hoisted_2$
|
|
847
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
848
|
-
var
|
|
844
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
845
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
846
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (d) => {
|
|
847
|
+
var g, h;
|
|
849
848
|
return openBlock(), createBlock(c, {
|
|
850
849
|
variant: "outlined",
|
|
851
850
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
852
|
-
"col-span-2": unref(
|
|
853
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((
|
|
851
|
+
"col-span-2": unref(a).length == 1,
|
|
852
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((g = e.modelValue) == null ? void 0 : g.type) === d.value,
|
|
854
853
|
"hover:bg-fm-color-opacity-sm": ((h = e.modelValue) == null ? void 0 : h.type) != d.value
|
|
855
854
|
}]),
|
|
856
|
-
onClick: (b) =>
|
|
855
|
+
onClick: (b) => n(d.value),
|
|
857
856
|
key: d.value
|
|
858
857
|
}, {
|
|
859
858
|
default: withCtx(() => [
|
|
860
|
-
createElementVNode("div", _hoisted_3$
|
|
861
|
-
createElementVNode("div", _hoisted_4$
|
|
859
|
+
createElementVNode("div", _hoisted_3$7, toDisplayString(d.label), 1),
|
|
860
|
+
createElementVNode("div", _hoisted_4$7, toDisplayString(d.sublabel), 1)
|
|
862
861
|
]),
|
|
863
862
|
_: 2
|
|
864
863
|
}, 1032, ["class", "onClick"]);
|
|
@@ -906,7 +905,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
906
905
|
]);
|
|
907
906
|
};
|
|
908
907
|
}
|
|
909
|
-
}), _hoisted_1$
|
|
908
|
+
}), _hoisted_1$7 = { class: "space-y-16" }, _hoisted_2$6 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1), _hoisted_3$6 = { class: "grid grid-cols-2 gap-16" }, _hoisted_4$6 = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$2 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
910
909
|
__name: "GameTypeInput",
|
|
911
910
|
props: {
|
|
912
911
|
modelValue: {
|
|
@@ -915,7 +914,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
915
914
|
},
|
|
916
915
|
emits: ["update:model-value"],
|
|
917
916
|
setup(e, { emit: u }) {
|
|
918
|
-
const o = e, r = u,
|
|
917
|
+
const o = e, r = u, a = computed(
|
|
919
918
|
() => [
|
|
920
919
|
{
|
|
921
920
|
label: "Fortune Wheel",
|
|
@@ -931,15 +930,15 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
931
930
|
}
|
|
932
931
|
].filter((s) => !s.hidden)
|
|
933
932
|
);
|
|
934
|
-
return (s,
|
|
933
|
+
return (s, n) => {
|
|
935
934
|
const t = resolveComponent("FmCard");
|
|
936
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
937
|
-
_hoisted_2$
|
|
938
|
-
createElementVNode("div", _hoisted_3$
|
|
939
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
935
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
936
|
+
_hoisted_2$6,
|
|
937
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
938
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (l) => (openBlock(), createBlock(t, {
|
|
940
939
|
variant: "outlined",
|
|
941
940
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
942
|
-
"col-span-2": unref(
|
|
941
|
+
"col-span-2": unref(a).length == 1,
|
|
943
942
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == l.value,
|
|
944
943
|
"hover:bg-fm-color-opacity-sm": e.modelValue != l.value
|
|
945
944
|
}]),
|
|
@@ -949,7 +948,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
949
948
|
key: l.value
|
|
950
949
|
}, {
|
|
951
950
|
default: withCtx(() => [
|
|
952
|
-
createElementVNode("div", _hoisted_4$
|
|
951
|
+
createElementVNode("div", _hoisted_4$6, toDisplayString(l.label), 1),
|
|
953
952
|
createElementVNode("div", _hoisted_5$2, toDisplayString(l.description), 1)
|
|
954
953
|
]),
|
|
955
954
|
_: 2
|
|
@@ -958,7 +957,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
958
957
|
]);
|
|
959
958
|
};
|
|
960
959
|
}
|
|
961
|
-
}), _hoisted_1$
|
|
960
|
+
}), _hoisted_1$6 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, _hoisted_2$5 = /* @__PURE__ */ createElementVNode("div", null, "Voucher description should not exceed 200 characters.", -1), _hoisted_3$5 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1), _hoisted_4$5 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Usage configuration", -1), _hoisted_5$1 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1), _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
962
961
|
__name: "VoucherEditor",
|
|
963
962
|
props: {
|
|
964
963
|
modelValue: {
|
|
@@ -975,38 +974,38 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
975
974
|
business: useCoreStore().currentBusiness.value._id,
|
|
976
975
|
name: ""
|
|
977
976
|
})
|
|
978
|
-
),
|
|
979
|
-
return (
|
|
977
|
+
), a = FdtoCollectibleConfig, s = u;
|
|
978
|
+
return (n, t) => {
|
|
980
979
|
var m, f, p;
|
|
981
980
|
const l = resolveComponent("FmTextarea"), c = resolveComponent("FmHelperText"), y = resolveComponent("FmSwitch");
|
|
982
981
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
983
|
-
createVNode(_sfc_main$
|
|
982
|
+
createVNode(_sfc_main$m, {
|
|
984
983
|
modelValue: unref(r).name,
|
|
985
984
|
"onUpdate:modelValue": t[0] || (t[0] = (i) => unref(r).name = i),
|
|
986
985
|
label: "Voucher name",
|
|
987
|
-
schema: unref(ZodHelper).typeAtPath(unref(
|
|
986
|
+
schema: unref(ZodHelper).typeAtPath(unref(a), "name", [unref(r).type])
|
|
988
987
|
}, null, 8, ["modelValue", "schema"]),
|
|
989
988
|
createVNode(l, {
|
|
990
989
|
class: "!mb-[-16px]",
|
|
991
990
|
modelValue: unref(r).description,
|
|
992
991
|
"onUpdate:modelValue": t[1] || (t[1] = (i) => unref(r).description = i),
|
|
993
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
992
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(a), "description", [unref(r).type])]
|
|
994
993
|
}, {
|
|
995
994
|
label: withCtx(() => [
|
|
996
995
|
(openBlock(), createBlock(resolveDynamicComponent(
|
|
997
996
|
unref(ZodHelper).toInputLabel(
|
|
998
|
-
unref(ZodHelper).typeAtPath(unref(
|
|
997
|
+
unref(ZodHelper).typeAtPath(unref(a), "description", [unref(r).type]),
|
|
999
998
|
"Voucher description"
|
|
1000
999
|
)
|
|
1001
1000
|
)))
|
|
1002
1001
|
]),
|
|
1003
1002
|
_: 1
|
|
1004
1003
|
}, 8, ["modelValue", "rules"]),
|
|
1005
|
-
createElementVNode("div", _hoisted_1$
|
|
1006
|
-
_hoisted_2$
|
|
1004
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
1005
|
+
_hoisted_2$5,
|
|
1007
1006
|
createElementVNode("div", null, toDisplayString(((m = unref(r).description) == null ? void 0 : m.length) ?? 0) + "/200", 1)
|
|
1008
1007
|
]),
|
|
1009
|
-
createVNode(_sfc_main$
|
|
1008
|
+
createVNode(_sfc_main$n, {
|
|
1010
1009
|
class: "w-1/2 xs:w-2/3",
|
|
1011
1010
|
"aspect-ratio": "16/9",
|
|
1012
1011
|
file: e.rewardImage ?? void 0,
|
|
@@ -1018,15 +1017,15 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1018
1017
|
label: withCtx(() => [
|
|
1019
1018
|
(openBlock(), createBlock(resolveDynamicComponent(
|
|
1020
1019
|
unref(ZodHelper).toInputLabel(
|
|
1021
|
-
unref(ZodHelper).typeAtPath(unref(
|
|
1020
|
+
unref(ZodHelper).typeAtPath(unref(a), "image", [unref(r).type]),
|
|
1022
1021
|
"Voucher image"
|
|
1023
1022
|
)
|
|
1024
1023
|
)))
|
|
1025
1024
|
]),
|
|
1026
1025
|
_: 1
|
|
1027
1026
|
}, 8, ["file", "thumbnail"]),
|
|
1028
|
-
_hoisted_3$
|
|
1029
|
-
createVNode(_sfc_main$
|
|
1027
|
+
_hoisted_3$5,
|
|
1028
|
+
createVNode(_sfc_main$o, {
|
|
1030
1029
|
"model-value": unref(r).extras.effect,
|
|
1031
1030
|
"onUpdate:modelValue": t[3] || (t[3] = (i) => unref(r).extras.effect = i)
|
|
1032
1031
|
}, null, 8, ["model-value"]),
|
|
@@ -1036,22 +1035,22 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1036
1035
|
text: "Effect is required",
|
|
1037
1036
|
state: "error"
|
|
1038
1037
|
})) : createCommentVNode("", !0),
|
|
1039
|
-
_hoisted_4$
|
|
1040
|
-
createVNode(_sfc_main$
|
|
1038
|
+
_hoisted_4$5,
|
|
1039
|
+
createVNode(_sfc_main$p, {
|
|
1041
1040
|
"model-value": unref(r).options,
|
|
1042
1041
|
"no-campaign": unref(r).noCampaign,
|
|
1043
1042
|
"onUpdate:modelValue": t[4] || (t[4] = (i) => unref(r).options = i),
|
|
1044
|
-
schema: unref(ZodHelper).typeAtPath(unref(
|
|
1043
|
+
schema: unref(ZodHelper).typeAtPath(unref(a), "options", ["VOUCHER"])
|
|
1045
1044
|
}, null, 8, ["model-value", "no-campaign", "schema"]),
|
|
1046
1045
|
_hoisted_5$1,
|
|
1047
|
-
unref(r).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$
|
|
1046
|
+
unref(r).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$q, {
|
|
1048
1047
|
key: 1,
|
|
1049
1048
|
"model-value": ((p = (f = unref(r).extras) == null ? void 0 : f.targetLocation) == null ? void 0 : p.map(String)) ?? null,
|
|
1050
1049
|
type: "select",
|
|
1051
1050
|
"onUpdate:modelValue": t[5] || (t[5] = (i) => {
|
|
1052
1051
|
unref(r).extras.targetLocation = i;
|
|
1053
1052
|
}),
|
|
1054
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(
|
|
1053
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(a), "extras.targetLocation")]
|
|
1055
1054
|
}, null, 8, ["model-value", "rules"])) : createCommentVNode("", !0),
|
|
1056
1055
|
createVNode(y, {
|
|
1057
1056
|
modelValue: unref(r).internal,
|
|
@@ -1063,24 +1062,24 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1063
1062
|
], 64);
|
|
1064
1063
|
};
|
|
1065
1064
|
}
|
|
1066
|
-
}), _hoisted_1$
|
|
1065
|
+
}), _hoisted_1$5 = {
|
|
1067
1066
|
key: 0,
|
|
1068
1067
|
class: "flex flex-col gap-y-24"
|
|
1069
|
-
}, _hoisted_2$
|
|
1068
|
+
}, _hoisted_2$4 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1), _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1), _hoisted_4$4 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1070
1069
|
__name: "EditRewardPoolSheet",
|
|
1071
1070
|
emits: ["update:model-value"],
|
|
1072
1071
|
setup(e, { expose: u, emit: o }) {
|
|
1073
|
-
const r = useMembershipStore(), { minor:
|
|
1074
|
-
const i = c.safeParse(
|
|
1072
|
+
const r = useMembershipStore(), { minor: a } = useLoading, s = ref(!1), n = ref(), t = ref(), l = ref(0), c = FdtoRandomReward, y = computed(() => {
|
|
1073
|
+
const i = c.safeParse(n.value);
|
|
1075
1074
|
return i.success ? [] : i.error.errors;
|
|
1076
1075
|
});
|
|
1077
|
-
function m(i, d,
|
|
1078
|
-
i && (
|
|
1076
|
+
function m(i, d, g) {
|
|
1077
|
+
i && (n.value = d, l.value = g), s.value = i;
|
|
1079
1078
|
}
|
|
1080
1079
|
const f = o;
|
|
1081
1080
|
async function p() {
|
|
1082
|
-
const i = c.safeParse(
|
|
1083
|
-
i.success && (await
|
|
1081
|
+
const i = c.safeParse(n.value);
|
|
1082
|
+
i.success && (await a(
|
|
1084
1083
|
async () => {
|
|
1085
1084
|
i.data.type === "VOUCHER" && t.value && (i.data.collectibleConfig.image = await firebaseStorage.update(
|
|
1086
1085
|
i.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, t.value),
|
|
@@ -1096,7 +1095,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1096
1095
|
return u({
|
|
1097
1096
|
showSheet: m
|
|
1098
1097
|
}), (i, d) => {
|
|
1099
|
-
const
|
|
1098
|
+
const g = resolveComponent("FmSelect"), h = resolveComponent("FmStepperField"), b = resolveComponent("FmButton"), V = resolveComponent("FmSideSheet");
|
|
1100
1099
|
return openBlock(), createBlock(V, {
|
|
1101
1100
|
"max-width": 560,
|
|
1102
1101
|
modelValue: unref(s),
|
|
@@ -1108,7 +1107,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1108
1107
|
"dismiss-away": ""
|
|
1109
1108
|
}, {
|
|
1110
1109
|
"side-sheet-footer": withCtx(() => [
|
|
1111
|
-
createElementVNode("div", _hoisted_4$
|
|
1110
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
1112
1111
|
createVNode(b, {
|
|
1113
1112
|
variant: "primary",
|
|
1114
1113
|
type: "button",
|
|
@@ -1127,21 +1126,21 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1127
1126
|
default: withCtx(() => {
|
|
1128
1127
|
var k, B;
|
|
1129
1128
|
return [
|
|
1130
|
-
unref(
|
|
1131
|
-
createVNode(
|
|
1129
|
+
unref(n) ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
1130
|
+
createVNode(g, {
|
|
1132
1131
|
label: "Reward Type",
|
|
1133
1132
|
items: [
|
|
1134
1133
|
{ label: "No Reward", value: "NO_REWARD" },
|
|
1135
1134
|
{ label: "Voucher", value: "VOUCHER" },
|
|
1136
1135
|
{ label: "Loyalty", value: "LOYALTY" }
|
|
1137
1136
|
],
|
|
1138
|
-
"model-value": unref(
|
|
1139
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1140
|
-
|
|
1137
|
+
"model-value": unref(n).type,
|
|
1138
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => {
|
|
1139
|
+
v == "NO_REWARD" ? n.value = {
|
|
1141
1140
|
type: "NO_REWARD",
|
|
1142
1141
|
collectible: null,
|
|
1143
1142
|
weight: 1
|
|
1144
|
-
} :
|
|
1143
|
+
} : v === "VOUCHER" ? n.value = {
|
|
1145
1144
|
collectible: null,
|
|
1146
1145
|
type: "VOUCHER",
|
|
1147
1146
|
collectibleConfig: unref(initCollectibleConfig)("VOUCHER", {
|
|
@@ -1155,7 +1154,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1155
1154
|
validForDay: 7
|
|
1156
1155
|
},
|
|
1157
1156
|
weight: 1
|
|
1158
|
-
} :
|
|
1157
|
+
} : n.value = {
|
|
1159
1158
|
collectible: unref(r).loyaltyRewards.raw[0]._id,
|
|
1160
1159
|
type: "LOYALTY",
|
|
1161
1160
|
earningOption: {
|
|
@@ -1169,66 +1168,66 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1169
1168
|
};
|
|
1170
1169
|
})
|
|
1171
1170
|
}, null, 8, ["model-value"]),
|
|
1172
|
-
unref(
|
|
1171
|
+
unref(n).type == "LOYALTY" ? (openBlock(), createBlock(g, {
|
|
1173
1172
|
key: 0,
|
|
1174
1173
|
label: "Loyalty type",
|
|
1175
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(c), "collectible", [unref(
|
|
1174
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(c), "collectible", [unref(n).type])],
|
|
1176
1175
|
items: unref(r).loyaltyRewards.items,
|
|
1177
|
-
"model-value": unref(
|
|
1178
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
1176
|
+
"model-value": unref(n).collectible,
|
|
1177
|
+
"onUpdate:modelValue": d[1] || (d[1] = (v) => unref(n).collectible = v)
|
|
1179
1178
|
}, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
|
|
1180
1179
|
createVNode(h, {
|
|
1181
1180
|
label: "Weight",
|
|
1182
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(c), "weight", [unref(
|
|
1183
|
-
"model-value": unref(
|
|
1184
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
1185
|
-
...unref(
|
|
1186
|
-
weight:
|
|
1181
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(c), "weight", [unref(n).type])],
|
|
1182
|
+
"model-value": unref(n).weight,
|
|
1183
|
+
"onUpdate:modelValue": d[2] || (d[2] = (v) => n.value = {
|
|
1184
|
+
...unref(n),
|
|
1185
|
+
weight: v
|
|
1187
1186
|
})
|
|
1188
1187
|
}, null, 8, ["rules", "model-value"]),
|
|
1189
|
-
unref(
|
|
1188
|
+
unref(n).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1190
1189
|
((k = unref(r).loyaltyRewards.items.find(
|
|
1191
|
-
(
|
|
1190
|
+
(v) => {
|
|
1192
1191
|
var E;
|
|
1193
|
-
return
|
|
1192
|
+
return v.value === ((E = unref(n)) == null ? void 0 : E.collectible);
|
|
1194
1193
|
}
|
|
1195
1194
|
)) == null ? void 0 : k.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1196
|
-
_hoisted_2$
|
|
1197
|
-
createVNode(_sfc_main$
|
|
1195
|
+
_hoisted_2$4,
|
|
1196
|
+
createVNode(_sfc_main$8, {
|
|
1198
1197
|
class: "mt-[-8px]",
|
|
1199
1198
|
rules: [
|
|
1200
|
-
unref(ZodHelper).ruleAtPath(unref(c), "earningOption", [unref(
|
|
1199
|
+
unref(ZodHelper).ruleAtPath(unref(c), "earningOption", [unref(n).type])
|
|
1201
1200
|
],
|
|
1202
1201
|
"helper-state": unref(ZodHelper).helperState(unref(y), "earningOption"),
|
|
1203
1202
|
"error-text": unref(ZodHelper).helperText(unref(y), "earningOption"),
|
|
1204
1203
|
"fixed-type": !0,
|
|
1205
|
-
"model-value": unref(
|
|
1206
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
1207
|
-
...unref(
|
|
1208
|
-
earningOption:
|
|
1204
|
+
"model-value": unref(n).earningOption,
|
|
1205
|
+
"onUpdate:modelValue": d[3] || (d[3] = (v) => n.value = {
|
|
1206
|
+
...unref(n),
|
|
1207
|
+
earningOption: v
|
|
1209
1208
|
})
|
|
1210
1209
|
}, null, 8, ["rules", "helper-state", "error-text", "model-value"])
|
|
1211
1210
|
], 64)) : createCommentVNode("", !0),
|
|
1212
|
-
_hoisted_3$
|
|
1213
|
-
createVNode(_sfc_main$
|
|
1211
|
+
_hoisted_3$4,
|
|
1212
|
+
createVNode(_sfc_main$r, {
|
|
1214
1213
|
class: "!gap-24",
|
|
1215
|
-
rules: [unref(ZodHelper).ruleAtPath(unref(c), "validityOption", [unref(
|
|
1216
|
-
"model-value": unref(
|
|
1217
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
1218
|
-
...unref(
|
|
1219
|
-
validityOption:
|
|
1214
|
+
rules: [unref(ZodHelper).ruleAtPath(unref(c), "validityOption", [unref(n).type])],
|
|
1215
|
+
"model-value": unref(n).validityOption,
|
|
1216
|
+
"onUpdate:modelValue": d[4] || (d[4] = (v) => n.value = {
|
|
1217
|
+
...unref(n),
|
|
1218
|
+
validityOption: v
|
|
1220
1219
|
})
|
|
1221
1220
|
}, null, 8, ["rules", "model-value"])
|
|
1222
1221
|
], 64)) : createCommentVNode("", !0),
|
|
1223
|
-
unref(
|
|
1222
|
+
unref(n).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$6, {
|
|
1224
1223
|
key: 2,
|
|
1225
1224
|
"reward-image": unref(t),
|
|
1226
|
-
"model-value": ((B = unref(
|
|
1227
|
-
"onUpdate:modelValue": d[5] || (d[5] = (
|
|
1228
|
-
...unref(
|
|
1229
|
-
collectibleConfig:
|
|
1225
|
+
"model-value": ((B = unref(n)) == null ? void 0 : B.collectibleConfig) ?? void 0,
|
|
1226
|
+
"onUpdate:modelValue": d[5] || (d[5] = (v) => n.value = {
|
|
1227
|
+
...unref(n),
|
|
1228
|
+
collectibleConfig: v
|
|
1230
1229
|
}),
|
|
1231
|
-
"onUpdate:rewardImage": d[6] || (d[6] = (
|
|
1230
|
+
"onUpdate:rewardImage": d[6] || (d[6] = (v) => t.value = v)
|
|
1232
1231
|
}, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
|
|
1233
1232
|
createVNode(JsonViewer, { json: unref(y) }, null, 8, ["json"])
|
|
1234
1233
|
])) : createCommentVNode("", !0)
|
|
@@ -1242,7 +1241,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
1242
1241
|
function isNullOrEmpty(e) {
|
|
1243
1242
|
return e == null || e === "";
|
|
1244
1243
|
}
|
|
1245
|
-
const _hoisted_1$
|
|
1244
|
+
const _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type and weightage given to your customer. ", -1), _hoisted_3$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$3 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1246
1245
|
__name: "RewardPoolInput",
|
|
1247
1246
|
props: {
|
|
1248
1247
|
modelValue: {
|
|
@@ -1258,31 +1257,31 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1258
1257
|
},
|
|
1259
1258
|
emits: ["update:model-value"],
|
|
1260
1259
|
setup(e, { emit: u }) {
|
|
1261
|
-
const o = e, r = u,
|
|
1262
|
-
const i = s.safeParse(
|
|
1260
|
+
const o = e, r = u, a = useMembershipStore(), s = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), n = computed(() => o.modelValue ?? []), t = computed(() => {
|
|
1261
|
+
const i = s.safeParse(n.value);
|
|
1263
1262
|
return i.success ? [] : i.error.errors;
|
|
1264
1263
|
}), l = ref();
|
|
1265
1264
|
function c(i, d) {
|
|
1266
1265
|
var h;
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1266
|
+
const g = [...n.value];
|
|
1267
|
+
g[d] = i, (h = l.value) == null || h.showSheet(!1), r("update:model-value", g);
|
|
1269
1268
|
}
|
|
1270
1269
|
function y(i) {
|
|
1271
|
-
const d = i.type == "VOUCHER" ? i.collectibleConfig :
|
|
1270
|
+
const d = i.type == "VOUCHER" ? i.collectibleConfig : a.collectibles.find(
|
|
1272
1271
|
(b) => b._id.toString() == i.collectible
|
|
1273
|
-
),
|
|
1272
|
+
), g = CollectionUtils.formattedType((d == null ? void 0 : d.name) || ""), h = i.weight;
|
|
1274
1273
|
return {
|
|
1275
|
-
label: isNullOrEmpty(
|
|
1276
|
-
sublabel: `${h} (${(h /
|
|
1274
|
+
label: isNullOrEmpty(g) ? "NO REWARD" : g,
|
|
1275
|
+
sublabel: `${h} (${(h / n.value.reduce((b, V) => b + V.weight, 0) * 100).toFixed(2)}%)`
|
|
1277
1276
|
};
|
|
1278
1277
|
}
|
|
1279
1278
|
function m(i) {
|
|
1280
|
-
var
|
|
1281
|
-
const d = [...
|
|
1282
|
-
(
|
|
1279
|
+
var g;
|
|
1280
|
+
const d = [...n.value];
|
|
1281
|
+
(g = l.value) == null || g.showSheet(!0, d[i], i);
|
|
1283
1282
|
}
|
|
1284
1283
|
function f(i) {
|
|
1285
|
-
const d = [...
|
|
1284
|
+
const d = [...n.value];
|
|
1286
1285
|
d.splice(i, 1), r("update:model-value", d);
|
|
1287
1286
|
}
|
|
1288
1287
|
function p() {
|
|
@@ -1294,20 +1293,20 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1294
1293
|
collectible: null,
|
|
1295
1294
|
weight: 1
|
|
1296
1295
|
},
|
|
1297
|
-
|
|
1296
|
+
n.value.length
|
|
1298
1297
|
);
|
|
1299
1298
|
}
|
|
1300
1299
|
return (i, d) => {
|
|
1301
|
-
const
|
|
1302
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1303
|
-
_hoisted_2$
|
|
1304
|
-
createVNode(
|
|
1300
|
+
const g = resolveComponent("FmButton"), h = resolveComponent("FmCard"), b = resolveComponent("FmHelperText");
|
|
1301
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
1302
|
+
_hoisted_2$3,
|
|
1303
|
+
createVNode(g, {
|
|
1305
1304
|
label: "Add Reward",
|
|
1306
1305
|
onClick: d[0] || (d[0] = (V) => p()),
|
|
1307
1306
|
variant: "plain",
|
|
1308
1307
|
icon: "add"
|
|
1309
1308
|
}),
|
|
1310
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
1309
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (V, k) => (openBlock(), createBlock(h, {
|
|
1311
1310
|
key: k,
|
|
1312
1311
|
class: "px-16 py-12 flex items-center justify-between cursor-pointer",
|
|
1313
1312
|
variant: "outlined",
|
|
@@ -1315,10 +1314,10 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1315
1314
|
}, {
|
|
1316
1315
|
default: withCtx(() => [
|
|
1317
1316
|
createElementVNode("div", null, [
|
|
1318
|
-
createElementVNode("div", _hoisted_3$
|
|
1319
|
-
createElementVNode("div", _hoisted_4$
|
|
1317
|
+
createElementVNode("div", _hoisted_3$3, toDisplayString(y(V).label), 1),
|
|
1318
|
+
createElementVNode("div", _hoisted_4$3, toDisplayString(y(V).sublabel), 1)
|
|
1320
1319
|
]),
|
|
1321
|
-
createVNode(
|
|
1320
|
+
createVNode(g, {
|
|
1322
1321
|
icon: "delete",
|
|
1323
1322
|
variant: "tertiary",
|
|
1324
1323
|
onClick: (B) => (B.stopPropagation(), f(k))
|
|
@@ -1331,7 +1330,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1331
1330
|
text: V.message,
|
|
1332
1331
|
state: "error"
|
|
1333
1332
|
}, null, 8, ["text"]))), 128)),
|
|
1334
|
-
createVNode(_sfc_main$
|
|
1333
|
+
createVNode(_sfc_main$5, {
|
|
1335
1334
|
ref_key: "sheetRef",
|
|
1336
1335
|
ref: l,
|
|
1337
1336
|
"onUpdate:modelValue": c
|
|
@@ -1339,10 +1338,10 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1339
1338
|
]);
|
|
1340
1339
|
};
|
|
1341
1340
|
}
|
|
1342
|
-
}), _hoisted_1$
|
|
1341
|
+
}), _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = {
|
|
1343
1342
|
key: 0,
|
|
1344
1343
|
class: "grid grid-cols-2 gap-16"
|
|
1345
|
-
}, _hoisted_3$
|
|
1344
|
+
}, _hoisted_3$2 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$2 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1346
1345
|
__name: "PromotionGameTypeInput",
|
|
1347
1346
|
props: {
|
|
1348
1347
|
modelValue: {
|
|
@@ -1351,41 +1350,41 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1351
1350
|
},
|
|
1352
1351
|
emits: ["update:model-value"],
|
|
1353
1352
|
setup(e, { emit: u }) {
|
|
1354
|
-
const o = e, r = u,
|
|
1353
|
+
const o = e, r = u, a = computed(() => [
|
|
1355
1354
|
{
|
|
1356
1355
|
label: "Rock paper scissor",
|
|
1357
1356
|
description: "Customers play 3 rounds of Rock Paper Scissors against the cashier. If customer won 2 rounds, they will get a discount.",
|
|
1358
1357
|
value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS
|
|
1359
1358
|
}
|
|
1360
1359
|
]);
|
|
1361
|
-
return (s,
|
|
1360
|
+
return (s, n) => {
|
|
1362
1361
|
var y, m, f;
|
|
1363
1362
|
const t = resolveComponent("FmSwitch"), l = resolveComponent("FmCard"), c = resolveComponent("FmHelperText");
|
|
1364
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1363
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1365
1364
|
createVNode(t, {
|
|
1366
1365
|
label: "Enable game",
|
|
1367
1366
|
"model-value": !!((y = e.modelValue) != null && y.gameType),
|
|
1368
|
-
"onUpdate:modelValue":
|
|
1367
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => p ? r("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : r("update:model-value", null))
|
|
1369
1368
|
}, null, 8, ["model-value"]),
|
|
1370
|
-
((m = e.modelValue) == null ? void 0 : m.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1371
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
1369
|
+
((m = e.modelValue) == null ? void 0 : m.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
1370
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (p) => {
|
|
1372
1371
|
var i, d;
|
|
1373
1372
|
return openBlock(), createBlock(l, {
|
|
1374
1373
|
variant: "outlined",
|
|
1375
1374
|
class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
|
|
1376
|
-
"col-span-2": unref(
|
|
1375
|
+
"col-span-2": unref(a).length == 1,
|
|
1377
1376
|
"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
1377
|
"hover:bg-fm-color-opacity-sm": ((d = e.modelValue) == null ? void 0 : d.gameType) != p.value
|
|
1379
1378
|
}]),
|
|
1380
1379
|
onClick: () => {
|
|
1381
|
-
var
|
|
1382
|
-
((
|
|
1380
|
+
var g;
|
|
1381
|
+
((g = o.modelValue) == null ? void 0 : g.gameType) != p.value && r("update:model-value", { gameType: p.value });
|
|
1383
1382
|
},
|
|
1384
1383
|
key: p.value
|
|
1385
1384
|
}, {
|
|
1386
1385
|
default: withCtx(() => [
|
|
1387
|
-
createElementVNode("div", _hoisted_3$
|
|
1388
|
-
createElementVNode("div", _hoisted_4$
|
|
1386
|
+
createElementVNode("div", _hoisted_3$2, toDisplayString(p.label), 1),
|
|
1387
|
+
createElementVNode("div", _hoisted_4$2, toDisplayString(p.description), 1)
|
|
1389
1388
|
]),
|
|
1390
1389
|
_: 2
|
|
1391
1390
|
}, 1032, ["class", "onClick"]);
|
|
@@ -1399,7 +1398,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1399
1398
|
]);
|
|
1400
1399
|
};
|
|
1401
1400
|
}
|
|
1402
|
-
}), _hoisted_1$
|
|
1401
|
+
}), _hoisted_1$2 = { key: 22 }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1403
1402
|
__name: "TemplateInput",
|
|
1404
1403
|
props: {
|
|
1405
1404
|
field: { type: Object, required: !0 },
|
|
@@ -1423,7 +1422,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1423
1422
|
emits: ["update:model-value", "update:file"],
|
|
1424
1423
|
setup(e, { emit: u }) {
|
|
1425
1424
|
const o = e, r = u;
|
|
1426
|
-
function
|
|
1425
|
+
function a(l) {
|
|
1427
1426
|
switch (o.field.type) {
|
|
1428
1427
|
case "timeframe":
|
|
1429
1428
|
const c = l.startDate ? hooks(l.startDate).startOf("day").toISOString() : void 0, y = l.endDate ? hooks(l.endDate).endOf("day").toISOString() : void 0;
|
|
@@ -1460,7 +1459,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1460
1459
|
return o.modelValue;
|
|
1461
1460
|
}
|
|
1462
1461
|
});
|
|
1463
|
-
function
|
|
1462
|
+
function n() {
|
|
1464
1463
|
if (!t.value.schema) return [];
|
|
1465
1464
|
const l = t.value.schema.safeParse(o.modelValue);
|
|
1466
1465
|
return l.success ? [] : l.error.errors;
|
|
@@ -1473,7 +1472,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1473
1472
|
zodLabel: o.schema ? ZodHelper.toInputLabel(o.schema, o.field.label) : void 0
|
|
1474
1473
|
}));
|
|
1475
1474
|
return (l, c) => {
|
|
1476
|
-
var d,
|
|
1475
|
+
var d, g, h, b, V;
|
|
1477
1476
|
const y = resolveComponent("FmTextField"), m = resolveComponent("FmStepperField"), f = resolveComponent("FmTextarea"), p = resolveComponent("FmHelperText"), i = resolveComponent("FmSwitch");
|
|
1478
1477
|
return e.field.type === "text" ? (openBlock(), createBlock(y, {
|
|
1479
1478
|
key: 0,
|
|
@@ -1481,7 +1480,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1481
1480
|
"label-mark": unref(t).labelMark,
|
|
1482
1481
|
rules: unref(t).rules,
|
|
1483
1482
|
"model-value": unref(s),
|
|
1484
|
-
"onUpdate:modelValue":
|
|
1483
|
+
"onUpdate:modelValue": a
|
|
1485
1484
|
}, null, 8, ["label", "label-mark", "rules", "model-value"])) : e.field.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1486
1485
|
createVNode(JsonViewer, {
|
|
1487
1486
|
json: { schema: unref(t).unwrapped, props: o }
|
|
@@ -1491,7 +1490,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1491
1490
|
"label-mark": e.field.isRuleChildren ? void 0 : unref(t).labelMark,
|
|
1492
1491
|
"model-value": unref(s),
|
|
1493
1492
|
rules: e.field.isRuleChildren ? [] : unref(t).rules,
|
|
1494
|
-
"onUpdate:modelValue":
|
|
1493
|
+
"onUpdate:modelValue": a,
|
|
1495
1494
|
"helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
|
|
1496
1495
|
"helper-text": e.field.isRuleChildren ? e.helperText : void 0
|
|
1497
1496
|
}, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
|
|
@@ -1501,31 +1500,31 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1501
1500
|
"label-mark": unref(t).labelMark,
|
|
1502
1501
|
rules: unref(t).rules,
|
|
1503
1502
|
"model-value": unref(s),
|
|
1504
|
-
"onUpdate:modelValue":
|
|
1503
|
+
"onUpdate:modelValue": a,
|
|
1505
1504
|
"show-word-count": "",
|
|
1506
|
-
"max-length": (V = (b = (h = (
|
|
1507
|
-
}, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$
|
|
1505
|
+
"max-length": (V = (b = (h = (g = (d = unref(t)) == null ? void 0 : d.unwrapped) == null ? void 0 : g._def) == null ? void 0 : h.checks) == null ? void 0 : b.find((k) => k.kind == "max")) == null ? void 0 : V.value
|
|
1506
|
+
}, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
1508
1507
|
key: 3,
|
|
1509
1508
|
"campaign-type": e.extras,
|
|
1510
1509
|
"model-value": unref(s),
|
|
1511
1510
|
disabled: e.disabled,
|
|
1512
|
-
"onUpdate:modelValue":
|
|
1511
|
+
"onUpdate:modelValue": a
|
|
1513
1512
|
}, null, 8, ["campaign-type", "model-value", "disabled"])) : e.field.type === "timeframe" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
1514
|
-
createVNode(_sfc_main$
|
|
1513
|
+
createVNode(_sfc_main$a, {
|
|
1515
1514
|
"model-value": unref(s),
|
|
1516
|
-
"onUpdate:modelValue":
|
|
1515
|
+
"onUpdate:modelValue": a
|
|
1517
1516
|
}, null, 8, ["model-value"]),
|
|
1518
1517
|
createVNode(p, {
|
|
1519
1518
|
class: "!mt-[8px]",
|
|
1520
|
-
text: unref(ZodHelper).helperText(
|
|
1521
|
-
state: unref(ZodHelper).helperState(
|
|
1519
|
+
text: unref(ZodHelper).helperText(n(), ""),
|
|
1520
|
+
state: unref(ZodHelper).helperState(n(), "")
|
|
1522
1521
|
}, null, 8, ["text", "state"])
|
|
1523
|
-
], 64)) : e.field.type === "image" ? (openBlock(), createBlock(_sfc_main$
|
|
1522
|
+
], 64)) : e.field.type === "image" ? (openBlock(), createBlock(_sfc_main$n, {
|
|
1524
1523
|
key: 5,
|
|
1525
1524
|
thumbnail: unref(s),
|
|
1526
1525
|
"aspect-ratio": "16 / 9",
|
|
1527
1526
|
class: "w-1/2 xs:w-2/3",
|
|
1528
|
-
"onUpdate:file":
|
|
1527
|
+
"onUpdate:file": a
|
|
1529
1528
|
}, {
|
|
1530
1529
|
label: withCtx(() => [
|
|
1531
1530
|
(openBlock(), createBlock(resolveDynamicComponent(unref(t).zodLabel)))
|
|
@@ -1539,21 +1538,21 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1539
1538
|
"label-mark": unref(t).labelMark,
|
|
1540
1539
|
rules: unref(t).rules,
|
|
1541
1540
|
"model-value": unref(s),
|
|
1542
|
-
"onUpdate:modelValue":
|
|
1543
|
-
}, null, 8, ["label", "sublabel", "label-mark", "rules", "model-value"])) : e.field.type === "collectible_options" ? (openBlock(), createBlock(_sfc_main$
|
|
1541
|
+
"onUpdate:modelValue": a
|
|
1542
|
+
}, null, 8, ["label", "sublabel", "label-mark", "rules", "model-value"])) : e.field.type === "collectible_options" ? (openBlock(), createBlock(_sfc_main$p, {
|
|
1544
1543
|
key: 7,
|
|
1545
1544
|
"model-value": unref(s),
|
|
1546
|
-
"onUpdate:modelValue":
|
|
1545
|
+
"onUpdate:modelValue": a,
|
|
1547
1546
|
"no-campaign": !1,
|
|
1548
1547
|
schema: unref(t).schema
|
|
1549
|
-
}, null, 8, ["model-value", "schema"])) : e.field.type === "target_location" ? (openBlock(), createBlock(_sfc_main$
|
|
1548
|
+
}, null, 8, ["model-value", "schema"])) : e.field.type === "target_location" ? (openBlock(), createBlock(_sfc_main$q, {
|
|
1550
1549
|
key: 8,
|
|
1551
1550
|
"model-value": unref(s),
|
|
1552
|
-
"onUpdate:modelValue":
|
|
1551
|
+
"onUpdate:modelValue": a
|
|
1553
1552
|
}, null, 8, ["model-value"])) : e.field.type == "effect" ? (openBlock(), createElementBlock(Fragment, { key: 9 }, [
|
|
1554
|
-
createVNode(_sfc_main$
|
|
1553
|
+
createVNode(_sfc_main$o, {
|
|
1555
1554
|
"model-value": unref(s),
|
|
1556
|
-
"onUpdate:modelValue":
|
|
1555
|
+
"onUpdate:modelValue": a,
|
|
1557
1556
|
"can-set-auto-apply": e.field.property == "campaign.effect"
|
|
1558
1557
|
}, null, 8, ["model-value", "can-set-auto-apply"]),
|
|
1559
1558
|
unref(s) ? createCommentVNode("", !0) : (openBlock(), createBlock(p, {
|
|
@@ -1562,37 +1561,37 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1562
1561
|
text: "Effect is required",
|
|
1563
1562
|
state: "error"
|
|
1564
1563
|
}))
|
|
1565
|
-
], 64)) : e.field.type === "message" ? (openBlock(), createBlock(_sfc_main$
|
|
1564
|
+
], 64)) : e.field.type === "message" ? (openBlock(), createBlock(_sfc_main$s, {
|
|
1566
1565
|
key: 10,
|
|
1567
1566
|
"model-value": unref(s),
|
|
1568
|
-
"onUpdate:modelValue":
|
|
1569
|
-
"helper-text": unref(ZodHelper).helperText(
|
|
1567
|
+
"onUpdate:modelValue": a,
|
|
1568
|
+
"helper-text": unref(ZodHelper).helperText(n(), ""),
|
|
1570
1569
|
"trigger-type": e.field.extras,
|
|
1571
|
-
"helper-state": unref(ZodHelper).helperState(
|
|
1572
|
-
}, null, 8, ["model-value", "helper-text", "trigger-type", "helper-state"])) : e.field.type === "earning_option" ? (openBlock(), createBlock(_sfc_main$
|
|
1570
|
+
"helper-state": unref(ZodHelper).helperState(n(), "")
|
|
1571
|
+
}, null, 8, ["model-value", "helper-text", "trigger-type", "helper-state"])) : e.field.type === "earning_option" ? (openBlock(), createBlock(_sfc_main$8, {
|
|
1573
1572
|
key: 11,
|
|
1574
1573
|
"model-value": unref(s),
|
|
1575
|
-
"onUpdate:modelValue":
|
|
1574
|
+
"onUpdate:modelValue": a,
|
|
1576
1575
|
extras: e.extras
|
|
1577
|
-
}, null, 8, ["model-value", "extras"])) : e.field.type === "validity_option" ? (openBlock(), createBlock(_sfc_main$
|
|
1576
|
+
}, null, 8, ["model-value", "extras"])) : e.field.type === "validity_option" ? (openBlock(), createBlock(_sfc_main$r, {
|
|
1578
1577
|
key: 12,
|
|
1579
1578
|
type: "custom",
|
|
1580
1579
|
"model-value": unref(s),
|
|
1581
|
-
"onUpdate:modelValue":
|
|
1582
|
-
"helper-text": unref(ZodHelper).helperText(
|
|
1583
|
-
"helper-state": unref(ZodHelper).helperState(
|
|
1584
|
-
}, null, 8, ["model-value", "helper-text", "helper-state"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$
|
|
1580
|
+
"onUpdate:modelValue": a,
|
|
1581
|
+
"helper-text": unref(ZodHelper).helperText(n(), ""),
|
|
1582
|
+
"helper-state": unref(ZodHelper).helperState(n(), "")
|
|
1583
|
+
}, null, 8, ["model-value", "helper-text", "helper-state"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$7, {
|
|
1585
1584
|
key: 13,
|
|
1586
1585
|
"model-value": unref(s),
|
|
1587
|
-
"onUpdate:modelValue":
|
|
1588
|
-
}, null, 8, ["model-value"])) : e.field.type === "reward_pool" ? (openBlock(), createBlock(_sfc_main$
|
|
1586
|
+
"onUpdate:modelValue": a
|
|
1587
|
+
}, null, 8, ["model-value"])) : e.field.type === "reward_pool" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
1589
1588
|
key: 14,
|
|
1590
1589
|
"model-value": unref(s),
|
|
1591
|
-
"onUpdate:modelValue":
|
|
1590
|
+
"onUpdate:modelValue": a
|
|
1592
1591
|
}, null, 8, ["model-value"])) : e.field.type === "rule_schedule" ? (openBlock(), createElementBlock(Fragment, { key: 15 }, [
|
|
1593
|
-
createVNode(_sfc_main$
|
|
1592
|
+
createVNode(_sfc_main$9, {
|
|
1594
1593
|
"model-value": unref(s),
|
|
1595
|
-
"onUpdate:modelValue":
|
|
1594
|
+
"onUpdate:modelValue": a,
|
|
1596
1595
|
"start-date": e.extras.start,
|
|
1597
1596
|
"end-date": e.extras.end
|
|
1598
1597
|
}, null, 8, ["model-value", "start-date", "end-date"]),
|
|
@@ -1603,9 +1602,9 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1603
1602
|
state: "error"
|
|
1604
1603
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1605
1604
|
], 64)) : e.field.type === "rule_user" ? (openBlock(), createElementBlock(Fragment, { key: 16 }, [
|
|
1606
|
-
createVNode(_sfc_main$
|
|
1605
|
+
createVNode(_sfc_main$h, {
|
|
1607
1606
|
"model-value": unref(s),
|
|
1608
|
-
"onUpdate:modelValue":
|
|
1607
|
+
"onUpdate:modelValue": a
|
|
1609
1608
|
}, null, 8, ["model-value"]),
|
|
1610
1609
|
e.helperText ? (openBlock(), createBlock(p, {
|
|
1611
1610
|
key: 0,
|
|
@@ -1619,9 +1618,9 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1619
1618
|
state: "warning",
|
|
1620
1619
|
text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
|
|
1621
1620
|
}, null, 8, ["text"])) : createCommentVNode("", !0),
|
|
1622
|
-
createVNode(_sfc_main$
|
|
1621
|
+
createVNode(_sfc_main$g, {
|
|
1623
1622
|
"model-value": unref(s),
|
|
1624
|
-
"onUpdate:modelValue":
|
|
1623
|
+
"onUpdate:modelValue": a
|
|
1625
1624
|
}, null, 8, ["model-value"]),
|
|
1626
1625
|
e.helperText ? (openBlock(), createBlock(p, {
|
|
1627
1626
|
key: 1,
|
|
@@ -1630,9 +1629,9 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1630
1629
|
state: "error"
|
|
1631
1630
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1632
1631
|
], 64)) : e.field.type === "rule_bill" ? (openBlock(), createElementBlock(Fragment, { key: 18 }, [
|
|
1633
|
-
createVNode(_sfc_main$
|
|
1632
|
+
createVNode(_sfc_main$f, {
|
|
1634
1633
|
"model-value": unref(s),
|
|
1635
|
-
"onUpdate:modelValue":
|
|
1634
|
+
"onUpdate:modelValue": a
|
|
1636
1635
|
}, null, 8, ["model-value"]),
|
|
1637
1636
|
e.helperText ? (openBlock(), createBlock(p, {
|
|
1638
1637
|
key: 0,
|
|
@@ -1641,9 +1640,9 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1641
1640
|
state: "error"
|
|
1642
1641
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1643
1642
|
], 64)) : e.field.type === "rule_feedback" ? (openBlock(), createElementBlock(Fragment, { key: 19 }, [
|
|
1644
|
-
createVNode(_sfc_main$
|
|
1643
|
+
createVNode(_sfc_main$d, {
|
|
1645
1644
|
"model-value": unref(s),
|
|
1646
|
-
"onUpdate:modelValue":
|
|
1645
|
+
"onUpdate:modelValue": a
|
|
1647
1646
|
}, null, 8, ["model-value"]),
|
|
1648
1647
|
e.helperText ? (openBlock(), createBlock(p, {
|
|
1649
1648
|
key: 0,
|
|
@@ -1652,9 +1651,9 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1652
1651
|
state: "error"
|
|
1653
1652
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1654
1653
|
], 64)) : e.field.type === "rule_birthday" ? (openBlock(), createElementBlock(Fragment, { key: 20 }, [
|
|
1655
|
-
createVNode(_sfc_main$
|
|
1654
|
+
createVNode(_sfc_main$e, {
|
|
1656
1655
|
"model-value": unref(s),
|
|
1657
|
-
"onUpdate:modelValue":
|
|
1656
|
+
"onUpdate:modelValue": a
|
|
1658
1657
|
}, null, 8, ["model-value"]),
|
|
1659
1658
|
e.helperText ? (openBlock(), createBlock(p, {
|
|
1660
1659
|
key: 0,
|
|
@@ -1663,9 +1662,9 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1663
1662
|
state: "error"
|
|
1664
1663
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1665
1664
|
], 64)) : e.field.type === "promotion_game_type" ? (openBlock(), createElementBlock(Fragment, { key: 21 }, [
|
|
1666
|
-
createVNode(_sfc_main$
|
|
1665
|
+
createVNode(_sfc_main$3, {
|
|
1667
1666
|
"model-value": unref(s),
|
|
1668
|
-
"onUpdate:modelValue":
|
|
1667
|
+
"onUpdate:modelValue": a
|
|
1669
1668
|
}, null, 8, ["model-value"]),
|
|
1670
1669
|
e.helperText ? (openBlock(), createBlock(p, {
|
|
1671
1670
|
key: 0,
|
|
@@ -1673,13 +1672,45 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1673
1672
|
text: e.helperText,
|
|
1674
1673
|
state: "error"
|
|
1675
1674
|
}, null, 8, ["text"])) : createCommentVNode("", !0)
|
|
1676
|
-
], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$
|
|
1675
|
+
], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(o.field), 1));
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
}), _hoisted_1$1 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-600" }, "Campaign summary", -1), _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1), _hoisted_3$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_4$1 = { class: "fm-typo-en-body-lg-600" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1679
|
+
__name: "CampaignSummary",
|
|
1680
|
+
props: {
|
|
1681
|
+
data: {
|
|
1682
|
+
type: Object,
|
|
1683
|
+
required: !0
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
setup(e) {
|
|
1687
|
+
return (u, o) => {
|
|
1688
|
+
const r = resolveComponent("FmCard");
|
|
1689
|
+
return openBlock(), createBlock(r, {
|
|
1690
|
+
variant: "outlined",
|
|
1691
|
+
class: "p-16 space-y-8"
|
|
1692
|
+
}, {
|
|
1693
|
+
default: withCtx(() => [
|
|
1694
|
+
_hoisted_1$1,
|
|
1695
|
+
_hoisted_2$1,
|
|
1696
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (a, s) => (openBlock(), createElementBlock("div", {
|
|
1697
|
+
class: "space-y-4",
|
|
1698
|
+
key: s
|
|
1699
|
+
}, [
|
|
1700
|
+
a ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1701
|
+
createElementVNode("div", _hoisted_3$1, toDisplayString(s), 1),
|
|
1702
|
+
createElementVNode("div", _hoisted_4$1, toDisplayString(a), 1)
|
|
1703
|
+
], 64)) : createCommentVNode("", !0)
|
|
1704
|
+
]))), 128))
|
|
1705
|
+
]),
|
|
1706
|
+
_: 1
|
|
1707
|
+
});
|
|
1677
1708
|
};
|
|
1678
1709
|
}
|
|
1679
1710
|
}), _hoisted_1 = { class: "xs:hidden px-24 pb-[14px] pt-[22px] flex items-center justify-between w-full border-b" }, _hoisted_2 = { class: "flex items-center gap-8" }, _hoisted_3 = {
|
|
1680
1711
|
key: 0,
|
|
1681
1712
|
class: "max-w-6xl mx-auto"
|
|
1682
|
-
}, _hoisted_4 = { class: "hidden xs:flex gap-8 items-center w-full px-16 py-8 border-b border-fm-color-neutral-gray-100" }, _hoisted_5 = { class: "grid grid-cols-3 gap-40" }, _hoisted_6 = { class: "col-span-2 space-y-40 xs:col-span-3 xs:px-16 xs:pt-16" }, _hoisted_7 = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, _hoisted_8 = { class: "w-full flex items-center justify-end gap-8 pb-24" }, _hoisted_9 =
|
|
1713
|
+
}, _hoisted_4 = { class: "hidden xs:flex gap-8 items-center w-full px-16 py-8 border-b border-fm-color-neutral-gray-100" }, _hoisted_5 = { class: "grid grid-cols-3 gap-40" }, _hoisted_6 = { class: "col-span-2 space-y-40 xs:col-span-3 xs:px-16 xs:pt-16" }, _hoisted_7 = { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, _hoisted_8 = { class: "w-full flex items-center justify-end gap-8 pb-24" }, _hoisted_9 = { class: "max-w-6xl mx-auto rounded-md p-4 w-full" }, _hoisted_10 = { class: "animate-pulse flex space-x-4 pt-16" }, _hoisted_11 = { class: "grid grid-cols-3 w-full gap-40" }, _hoisted_12 = /* @__PURE__ */ createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
|
|
1683
1714
|
/* @__PURE__ */ createElementVNode("div", { class: "flex-1 space-y-6 py-1" }, [
|
|
1684
1715
|
/* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
|
|
1685
1716
|
/* @__PURE__ */ createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
|
|
@@ -1744,6 +1775,15 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1744
1775
|
return errors.value.filter((o) => u.includes(o.path.join(".")));
|
|
1745
1776
|
}
|
|
1746
1777
|
__expose({ showSheet });
|
|
1778
|
+
function showSummaryDialog() {
|
|
1779
|
+
Dialog.open({
|
|
1780
|
+
title: "",
|
|
1781
|
+
dialogComponent: _sfc_main$1,
|
|
1782
|
+
dialogComponentProps: {
|
|
1783
|
+
data: data.value
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
}
|
|
1747
1787
|
function onUpdateProperty(e, u) {
|
|
1748
1788
|
if (_.set(data.value, e, u), e == "campaign.event.type") {
|
|
1749
1789
|
const o = RuleBuilder.setRuleToGroup(
|
|
@@ -1798,13 +1838,13 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1798
1838
|
e.success && (emits("submit:model-value", cleanPF(JSON.parse(JSON.stringify(e.data)))), sheetVisible.value = !1);
|
|
1799
1839
|
}
|
|
1800
1840
|
return (e, u) => {
|
|
1801
|
-
const o = resolveComponent("FmButton"), r = resolveComponent("FmStep"),
|
|
1802
|
-
return openBlock(), createBlock(
|
|
1841
|
+
const o = resolveComponent("FmButton"), r = resolveComponent("FmStep"), a = resolveComponent("FmStepper"), s = resolveComponent("FmCard"), n = resolveComponent("FmTopSheet");
|
|
1842
|
+
return openBlock(), createBlock(n, {
|
|
1803
1843
|
"fullscreen-size": "lg",
|
|
1804
1844
|
modelValue: unref(sheetVisible),
|
|
1805
1845
|
"onUpdate:modelValue": [
|
|
1806
|
-
u[
|
|
1807
|
-
u[
|
|
1846
|
+
u[7] || (u[7] = (t) => isRef(sheetVisible) ? sheetVisible.value = t : null),
|
|
1847
|
+
u[8] || (u[8] = (t) => sheetVisible.value = t)
|
|
1808
1848
|
]
|
|
1809
1849
|
}, createSlots({
|
|
1810
1850
|
"top-sheet-header": withCtx(() => [
|
|
@@ -1829,10 +1869,10 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1829
1869
|
unref(isLoading) ? {
|
|
1830
1870
|
name: "default",
|
|
1831
1871
|
fn: withCtx(() => [
|
|
1832
|
-
createElementVNode("div",
|
|
1833
|
-
createElementVNode("div",
|
|
1834
|
-
createElementVNode("div",
|
|
1835
|
-
|
|
1872
|
+
createElementVNode("div", _hoisted_9, [
|
|
1873
|
+
createElementVNode("div", _hoisted_10, [
|
|
1874
|
+
createElementVNode("div", _hoisted_11, [
|
|
1875
|
+
_hoisted_12,
|
|
1836
1876
|
createVNode(s, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
|
|
1837
1877
|
])
|
|
1838
1878
|
])
|
|
@@ -1843,7 +1883,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1843
1883
|
name: "default",
|
|
1844
1884
|
fn: withCtx(() => [
|
|
1845
1885
|
unref(data) ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
1846
|
-
createVNode(
|
|
1886
|
+
createVNode(a, {
|
|
1847
1887
|
modelValue: unref(currentStep),
|
|
1848
1888
|
"onUpdate:modelValue": u[1] || (u[1] = (t) => isRef(currentStep) ? currentStep.value = t : null),
|
|
1849
1889
|
orientation: "horizontal",
|
|
@@ -1866,7 +1906,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1866
1906
|
variant: "tertiary",
|
|
1867
1907
|
onClick: u[2] || (u[2] = (t) => sheetVisible.value = !1)
|
|
1868
1908
|
}),
|
|
1869
|
-
createVNode(
|
|
1909
|
+
createVNode(a, {
|
|
1870
1910
|
modelValue: unref(currentStep),
|
|
1871
1911
|
"onUpdate:modelValue": u[3] || (u[3] = (t) => isRef(currentStep) ? currentStep.value = t : null),
|
|
1872
1912
|
orientation: "horizontal",
|
|
@@ -1875,7 +1915,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1875
1915
|
default: withCtx(() => [
|
|
1876
1916
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (t, l) => (openBlock(), createBlock(r, {
|
|
1877
1917
|
key: t.name,
|
|
1878
|
-
title: unref(
|
|
1918
|
+
title: unref(sheetTitle),
|
|
1879
1919
|
description: t.name,
|
|
1880
1920
|
value: l + 1,
|
|
1881
1921
|
error: () => stepErrors(l).length > 0,
|
|
@@ -1886,7 +1926,8 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1886
1926
|
}, 8, ["modelValue"]),
|
|
1887
1927
|
createVNode(o, {
|
|
1888
1928
|
icon: "info",
|
|
1889
|
-
variant: "tertiary"
|
|
1929
|
+
variant: "tertiary",
|
|
1930
|
+
onClick: u[4] || (u[4] = () => showSummaryDialog())
|
|
1890
1931
|
})
|
|
1891
1932
|
]),
|
|
1892
1933
|
createElementVNode("div", _hoisted_5, [
|
|
@@ -1911,7 +1952,7 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1911
1952
|
}, [
|
|
1912
1953
|
createElementVNode("div", _hoisted_7, toDisplayString(t.name), 1),
|
|
1913
1954
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(t.fields, (c, y) => (openBlock(), createElementBlock("div", { key: y }, [
|
|
1914
|
-
(openBlock(), createBlock(_sfc_main$
|
|
1955
|
+
(openBlock(), createBlock(_sfc_main$2, {
|
|
1915
1956
|
key: y,
|
|
1916
1957
|
field: c,
|
|
1917
1958
|
modelValue: unref(_).get(unref(data), c.property),
|
|
@@ -1934,34 +1975,19 @@ const _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = /* @__PURE__ */ cre
|
|
|
1934
1975
|
label: "Back",
|
|
1935
1976
|
variant: "tertiary",
|
|
1936
1977
|
disabled: unref(currentStep) == 1,
|
|
1937
|
-
onClick: u[
|
|
1978
|
+
onClick: u[5] || (u[5] = (t) => currentStep.value--)
|
|
1938
1979
|
}, null, 8, ["disabled"]),
|
|
1939
1980
|
createVNode(o, {
|
|
1940
1981
|
disabled: stepErrors().length > 0,
|
|
1941
1982
|
label: unref(currentStep) - 1 < unref(template).steps.length - 1 ? "Next" : "Submit",
|
|
1942
|
-
onClick: u[
|
|
1983
|
+
onClick: u[6] || (u[6] = (t) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
|
|
1943
1984
|
}, null, 8, ["disabled", "label"])
|
|
1944
1985
|
])
|
|
1945
1986
|
]),
|
|
1946
|
-
createVNode(
|
|
1947
|
-
|
|
1948
|
-
class: "
|
|
1949
|
-
},
|
|
1950
|
-
default: withCtx(() => [
|
|
1951
|
-
_hoisted_9,
|
|
1952
|
-
_hoisted_10,
|
|
1953
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(unref(data)), (t, l) => (openBlock(), createElementBlock("div", {
|
|
1954
|
-
class: "space-y-4",
|
|
1955
|
-
key: l
|
|
1956
|
-
}, [
|
|
1957
|
-
t ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1958
|
-
createElementVNode("div", _hoisted_11, toDisplayString(l), 1),
|
|
1959
|
-
createElementVNode("div", _hoisted_12, toDisplayString(t), 1)
|
|
1960
|
-
], 64)) : createCommentVNode("", !0)
|
|
1961
|
-
]))), 128))
|
|
1962
|
-
]),
|
|
1963
|
-
_: 1
|
|
1964
|
-
})
|
|
1987
|
+
createVNode(_sfc_main$1, {
|
|
1988
|
+
data: unref(data),
|
|
1989
|
+
class: "xs:hidden"
|
|
1990
|
+
}, null, 8, ["data"])
|
|
1965
1991
|
])
|
|
1966
1992
|
])) : createCommentVNode("", !0)
|
|
1967
1993
|
]),
|