@feedmepos/mf-connect 0.1.47-prod → 0.1.49-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
- package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
- package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
- package/dist/Broadcast-CbF3d_N7.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
- package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
- package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
- package/dist/Credit-DiTnwnFe.js +228 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
- package/dist/Experience-CjMVeGsX.js +229 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
- package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
- package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
- package/dist/MemberList-CZtriA_Q.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
- package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
- package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
- package/dist/Point-51MD49EM.js +232 -0
- package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
- package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
- package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
- package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
- package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
- package/dist/Setting-DGDgmP84.js +1936 -0
- package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
- package/dist/StoreRewards-DFF_0g59.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
- package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
- package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
- package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
- package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
- package/dist/app-DaFoFS2V.js +57962 -0
- package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
- package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
- package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
- package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
- package/dist/campaign.fn-B-xvcbEb.js +758 -0
- package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
- package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
- package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
- package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
- package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
- package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
- package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
- package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
- package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
- package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
- package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
- package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
- package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
- package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
- package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
- package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
- package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
- package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
- package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
- package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
- package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
- package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
- package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
- package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
- package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
- package/dist/objectid-BQJRv_jX.js +145 -0
- package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
- package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
- package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
- package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
- package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
- package/dist/timezone-B64-HrWi.js +1150 -0
- package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
- package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
- package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
- package/package.json +5 -4
- package/dist/Broadcast-T2a5tN8R.js +0 -227
- package/dist/Credit-DQQCXqS0.js +0 -222
- package/dist/Experience-DzTV21vX.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/MemberList-DLSLGQ02.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Point-BeBYi1BT.js +0 -226
- package/dist/Setting-Dt0sG_hk.js +0 -1936
- package/dist/StoreRewards-DuSsWnTE.js +0 -423
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
- package/dist/app-jRT7vsk_.js +0 -33357
- package/dist/campaign.fn-C-UojhHv.js +0 -758
- package/dist/objectid-CVDLTdni.js +0 -145
- package/dist/usePagination-JoYaROkV.js +0 -223
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, ref as k, resolveComponent as p, openBlock as d, createBlock as h, withCtx as f, renderSlot as q, createVNode as s, createTextVNode as E, toDisplayString as F, createElementVNode as a, computed as N, createElementBlock as O, Fragment as S, renderList as z, unref as e, normalizeClass as J, createCommentVNode as R, resolveDynamicComponent as H } from "vue";
|
|
2
|
-
import { c as X } from "./index-BLdVWQId.js";
|
|
3
|
-
import { e as K, F as Q } from "./index-DNTd-FNx.js";
|
|
4
|
-
import { C as W } from "./membership-oBIs4sbL.js";
|
|
5
|
-
import { Z as g } from "./zod-Bg2FbC-D.js";
|
|
6
|
-
import { _ as Y } from "./SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js";
|
|
7
|
-
import { u as ee } from "./business-DVlHPzaL.js";
|
|
8
|
-
import { useCoreStore as te } from "@feedmepos/mf-common";
|
|
9
|
-
import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js";
|
|
10
|
-
import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
11
|
-
import { _ as ae, a as ne } from "./EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js";
|
|
12
|
-
import { _ as se } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js";
|
|
13
|
-
import { u as me } from "./vue-i18n--_Wu1nMj.js";
|
|
14
|
-
import { i as re } from "./helper-CGwOThAl.js";
|
|
15
|
-
const ie = { class: "flex justify-end gap-8 w-full" }, ue = /* @__PURE__ */ U({
|
|
16
|
-
__name: "MenuSheet",
|
|
17
|
-
props: {
|
|
18
|
-
modelValue: {},
|
|
19
|
-
filterItems: { type: Function }
|
|
20
|
-
},
|
|
21
|
-
emits: ["confirm"],
|
|
22
|
-
setup(l, { emit: $ }) {
|
|
23
|
-
const C = k(), n = k(!1);
|
|
24
|
-
function o() {
|
|
25
|
-
var r;
|
|
26
|
-
(r = C.value) == null || r.onConfirm();
|
|
27
|
-
}
|
|
28
|
-
const y = $;
|
|
29
|
-
return (r, x) => {
|
|
30
|
-
const i = p("FmField"), v = p("FmButton"), I = p("FmSideSheet");
|
|
31
|
-
return d(), h(I, {
|
|
32
|
-
modelValue: n.value,
|
|
33
|
-
"onUpdate:modelValue": x[1] || (x[1] = (b) => n.value = b),
|
|
34
|
-
title: "Select Items",
|
|
35
|
-
"close-button": !1,
|
|
36
|
-
"dismiss-away": !0,
|
|
37
|
-
"max-width": 560
|
|
38
|
-
}, {
|
|
39
|
-
"side-sheet-button": f(() => [
|
|
40
|
-
q(r.$slots, "side-sheet-button", {}, () => [
|
|
41
|
-
s(i, { class: "text-fm-color-typo-tertiary cursor-pointer" }, {
|
|
42
|
-
default: f(() => [
|
|
43
|
-
E(F(r.modelValue.length) + " item(s) selected ", 1)
|
|
44
|
-
]),
|
|
45
|
-
_: 1
|
|
46
|
-
})
|
|
47
|
-
])
|
|
48
|
-
]),
|
|
49
|
-
"side-sheet-footer": f(() => [
|
|
50
|
-
a("div", ie, [
|
|
51
|
-
s(v, {
|
|
52
|
-
variant: "tertiary",
|
|
53
|
-
onClick: x[0] || (x[0] = (b) => n.value = !1),
|
|
54
|
-
label: "Cancel"
|
|
55
|
-
}),
|
|
56
|
-
s(v, {
|
|
57
|
-
variant: "primary",
|
|
58
|
-
onClick: o,
|
|
59
|
-
label: "Confirm"
|
|
60
|
-
})
|
|
61
|
-
])
|
|
62
|
-
]),
|
|
63
|
-
default: f(() => [
|
|
64
|
-
s(Y, {
|
|
65
|
-
class: "h-full",
|
|
66
|
-
"max-height": 0,
|
|
67
|
-
ref_key: "selectItemRef",
|
|
68
|
-
ref: C,
|
|
69
|
-
"initial-value": r.modelValue,
|
|
70
|
-
"filter-items": r.filterItems,
|
|
71
|
-
"on-complete": (b) => {
|
|
72
|
-
y("confirm", b), n.value = !1;
|
|
73
|
-
}
|
|
74
|
-
}, null, 8, ["initial-value", "filter-items", "on-complete"])
|
|
75
|
-
]),
|
|
76
|
-
_: 3
|
|
77
|
-
}, 8, ["modelValue"]);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}), de = { class: "space-y-24" }, ce = { class: "grid grid-cols-2 gap-16" }, pe = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-16" }, ve = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-lg-600" }, "Spending type", -1), be = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-lg-400" }, "Amount spent", -1), ge = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, xe = {
|
|
81
|
-
key: 0,
|
|
82
|
-
class: "xs:!block flex gap-16 items-center pt-8"
|
|
83
|
-
}, Ve = /* @__PURE__ */ a("div", { class: "xs:py-4 text-center" }, "for every", -1), he = { class: "fm-typo-en-body-lg-400" }, _e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Fe = {
|
|
84
|
-
key: 0,
|
|
85
|
-
class: "pt-8 space-y-8"
|
|
86
|
-
}, Ce = { class: "flex items-center gap-16 xs:block xs:space-y-8 w-fit" }, Ie = { class: "xs:!block flex gap-16 items-center" }, Oe = /* @__PURE__ */ a("div", { class: "xs:py-4 text-center" }, "for every", -1), Ze = /* @__PURE__ */ U({
|
|
87
|
-
__name: "EarningOptionInput",
|
|
88
|
-
props: {
|
|
89
|
-
modelValue: {
|
|
90
|
-
type: Object
|
|
91
|
-
},
|
|
92
|
-
extras: {
|
|
93
|
-
type: Object
|
|
94
|
-
},
|
|
95
|
-
fixedType: {
|
|
96
|
-
type: Boolean
|
|
97
|
-
},
|
|
98
|
-
errorText: {
|
|
99
|
-
type: String
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
emits: ["update:model-value"],
|
|
103
|
-
setup(l, { emit: $ }) {
|
|
104
|
-
var I, b, P;
|
|
105
|
-
const C = ee(), n = l, o = $, y = [
|
|
106
|
-
{
|
|
107
|
-
label: "Based on spending",
|
|
108
|
-
sublabel: "Customers earn rewards based on how much they spend.",
|
|
109
|
-
value: "PROPORTIONAL"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
label: "Fixed amount",
|
|
113
|
-
sublabel: "Customers earn a set amount of rewards for specific actions.",
|
|
114
|
-
value: "FIXED"
|
|
115
|
-
}
|
|
116
|
-
].filter((c) => {
|
|
117
|
-
var t, _;
|
|
118
|
-
return n.fixedType || ((_ = (t = n.extras) == null ? void 0 : t.campaign) == null ? void 0 : _.event.type) != "BILL_COMPLETED" ? c.value == "FIXED" : !0;
|
|
119
|
-
}), r = N(() => {
|
|
120
|
-
var t, _;
|
|
121
|
-
const c = n.extras && "configs" in n.extras ? n.extras.configs.type : (t = n.extras) == null ? void 0 : t.campaign.type;
|
|
122
|
-
return (((_ = W[c]) == null ? void 0 : _.name) || "reward").toLowerCase();
|
|
123
|
-
}), x = N(() => {
|
|
124
|
-
const c = K.safeParse(n.modelValue);
|
|
125
|
-
return c.success ? [] : c.error.errors;
|
|
126
|
-
});
|
|
127
|
-
function i(c) {
|
|
128
|
-
var t;
|
|
129
|
-
c != ((t = n.modelValue) == null ? void 0 : t.type) && o(
|
|
130
|
-
"update:model-value",
|
|
131
|
-
c === "FIXED" ? {
|
|
132
|
-
type: "FIXED",
|
|
133
|
-
amount: 1
|
|
134
|
-
} : {
|
|
135
|
-
type: "PROPORTIONAL",
|
|
136
|
-
amount: 1,
|
|
137
|
-
every: 1
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
const v = k(
|
|
142
|
-
((I = n.modelValue) == null ? void 0 : I.type) === "PROPORTIONAL" && !!((P = (b = n.modelValue) == null ? void 0 : b.property) != null && P.length) || !1
|
|
143
|
-
);
|
|
144
|
-
return (c, t) => {
|
|
145
|
-
var L, B, D;
|
|
146
|
-
const _ = p("FmCard"), T = p("FmStepperField"), A = p("FmRadio"), j = p("FmPill"), G = p("FmButton"), M = p("FmRadioGroup"), Z = p("FmHelperText");
|
|
147
|
-
return d(), O("div", de, [
|
|
148
|
-
a("div", ce, [
|
|
149
|
-
(d(!0), O(S, null, z(e(y), (m) => {
|
|
150
|
-
var V, u;
|
|
151
|
-
return d(), h(_, {
|
|
152
|
-
variant: "outlined",
|
|
153
|
-
class: J(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
154
|
-
"col-span-2": e(y).length == 1,
|
|
155
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((V = l.modelValue) == null ? void 0 : V.type) === m.value,
|
|
156
|
-
"hover:bg-fm-color-opacity-sm": ((u = l.modelValue) == null ? void 0 : u.type) != m.value
|
|
157
|
-
}]),
|
|
158
|
-
onClick: (w) => i(m.value),
|
|
159
|
-
key: m.value
|
|
160
|
-
}, {
|
|
161
|
-
default: f(() => [
|
|
162
|
-
a("div", pe, F(m.label), 1),
|
|
163
|
-
a("div", fe, F(m.sublabel), 1)
|
|
164
|
-
]),
|
|
165
|
-
_: 2
|
|
166
|
-
}, 1032, ["class", "onClick"]);
|
|
167
|
-
}), 128))
|
|
168
|
-
]),
|
|
169
|
-
a("div", ye, [
|
|
170
|
-
((L = l.modelValue) == null ? void 0 : L.type) === "FIXED" ? (d(), h(T, {
|
|
171
|
-
key: 0,
|
|
172
|
-
label: `Receive ${e(r)}(s)`,
|
|
173
|
-
class: "flex-1",
|
|
174
|
-
"model-value": ((B = l.modelValue) == null ? void 0 : B.amount) ?? null,
|
|
175
|
-
"onUpdate:modelValue": t[0] || (t[0] = (m) => o("update:model-value", {
|
|
176
|
-
...l.modelValue ?? { type: "FIXED" },
|
|
177
|
-
amount: m
|
|
178
|
-
}))
|
|
179
|
-
}, null, 8, ["label", "model-value"])) : ((D = l.modelValue) == null ? void 0 : D.type) === "PROPORTIONAL" ? (d(), O(S, { key: 1 }, [
|
|
180
|
-
ve,
|
|
181
|
-
s(M, {
|
|
182
|
-
"model-value": e(v),
|
|
183
|
-
"onUpdate:modelValue": t[6] || (t[6] = (m) => {
|
|
184
|
-
e(v) != m && (o("update:model-value", {
|
|
185
|
-
...l.modelValue ?? {
|
|
186
|
-
type: "PROPORTIONAL",
|
|
187
|
-
amount: 1,
|
|
188
|
-
every: 1
|
|
189
|
-
},
|
|
190
|
-
property: m ? [] : void 0,
|
|
191
|
-
every: 1
|
|
192
|
-
}), v.value = m);
|
|
193
|
-
})
|
|
194
|
-
}, {
|
|
195
|
-
default: f(() => [
|
|
196
|
-
s(A, {
|
|
197
|
-
label: "Amount spent",
|
|
198
|
-
sublabel: `Receive ${e(r)} by amount spent`,
|
|
199
|
-
value: !1
|
|
200
|
-
}, {
|
|
201
|
-
label: f(() => {
|
|
202
|
-
var m, V;
|
|
203
|
-
return [
|
|
204
|
-
be,
|
|
205
|
-
a("div", ge, " Receive " + F(e(r)) + " by amount spent ", 1),
|
|
206
|
-
e(v) ? R("", !0) : (d(), O("div", xe, [
|
|
207
|
-
s(T, {
|
|
208
|
-
label: `Receive ${e(r)}(s)`,
|
|
209
|
-
inputmode: "decimal",
|
|
210
|
-
class: "flex-1",
|
|
211
|
-
"model-value": ((m = l.modelValue) == null ? void 0 : m.amount) ?? null,
|
|
212
|
-
"onUpdate:modelValue": t[1] || (t[1] = (u) => o("update:model-value", {
|
|
213
|
-
...l.modelValue ?? { type: "FIXED" },
|
|
214
|
-
amount: u
|
|
215
|
-
}))
|
|
216
|
-
}, null, 8, ["label", "model-value"]),
|
|
217
|
-
Ve,
|
|
218
|
-
s(T, {
|
|
219
|
-
label: `Amount spend (${e(X.Config).getCountry().currency.symbol})`,
|
|
220
|
-
class: "flex-1",
|
|
221
|
-
inputmode: "decimal",
|
|
222
|
-
"model-value": ((V = l.modelValue) == null ? void 0 : V.every) ?? null,
|
|
223
|
-
"onUpdate:modelValue": t[2] || (t[2] = (u) => o("update:model-value", {
|
|
224
|
-
...l.modelValue,
|
|
225
|
-
every: u
|
|
226
|
-
}))
|
|
227
|
-
}, {
|
|
228
|
-
prepend: f(() => [
|
|
229
|
-
E(F(e(X.Config).getCountry().currency.symbol), 1)
|
|
230
|
-
]),
|
|
231
|
-
_: 1
|
|
232
|
-
}, 8, ["label", "model-value"])
|
|
233
|
-
]))
|
|
234
|
-
];
|
|
235
|
-
}),
|
|
236
|
-
_: 1
|
|
237
|
-
}, 8, ["sublabel"]),
|
|
238
|
-
s(A, {
|
|
239
|
-
label: "Product bought",
|
|
240
|
-
sublabel: `Receive ${e(r)} by product bought`,
|
|
241
|
-
value: !0,
|
|
242
|
-
disabled: !e(C).isPremium
|
|
243
|
-
}, {
|
|
244
|
-
label: f(() => {
|
|
245
|
-
var m, V;
|
|
246
|
-
return [
|
|
247
|
-
a("div", he, [
|
|
248
|
-
E(" Product bought "),
|
|
249
|
-
s(j, { variant: "premium" })
|
|
250
|
-
]),
|
|
251
|
-
a("div", _e, " Receive " + F(e(r)) + " by product bought ", 1),
|
|
252
|
-
e(v) ? (d(), O("div", Fe, [
|
|
253
|
-
a("div", Ce, [
|
|
254
|
-
s(ue, {
|
|
255
|
-
"model-value": n.modelValue.property || [],
|
|
256
|
-
onConfirm: t[3] || (t[3] = (u) => o("update:model-value", {
|
|
257
|
-
...l.modelValue,
|
|
258
|
-
property: u
|
|
259
|
-
}))
|
|
260
|
-
}, {
|
|
261
|
-
"side-sheet-button": f(() => {
|
|
262
|
-
var u, w;
|
|
263
|
-
return [
|
|
264
|
-
s(G, {
|
|
265
|
-
label: (u = n.modelValue.property) != null && u.length ? `${(w = n.modelValue.property) == null ? void 0 : w.length} product(s) selected` : "Select product",
|
|
266
|
-
icon: "link",
|
|
267
|
-
variant: "secondary"
|
|
268
|
-
}, null, 8, ["label"])
|
|
269
|
-
];
|
|
270
|
-
}),
|
|
271
|
-
_: 1
|
|
272
|
-
}, 8, ["model-value"])
|
|
273
|
-
]),
|
|
274
|
-
a("div", Ie, [
|
|
275
|
-
s(T, {
|
|
276
|
-
inputmode: "decimal",
|
|
277
|
-
label: `Receive ${e(r)}(s)`,
|
|
278
|
-
class: "flex-1",
|
|
279
|
-
"model-value": ((m = l.modelValue) == null ? void 0 : m.amount) ?? null,
|
|
280
|
-
"onUpdate:modelValue": t[4] || (t[4] = (u) => o("update:model-value", {
|
|
281
|
-
...l.modelValue ?? { type: "FIXED" },
|
|
282
|
-
amount: u
|
|
283
|
-
}))
|
|
284
|
-
}, null, 8, ["label", "model-value"]),
|
|
285
|
-
Oe,
|
|
286
|
-
s(T, {
|
|
287
|
-
label: "Item purchased",
|
|
288
|
-
class: "flex-1",
|
|
289
|
-
"model-value": ((V = l.modelValue) == null ? void 0 : V.every) ?? null,
|
|
290
|
-
inputmode: "numeric",
|
|
291
|
-
"max-fraction-digits": 0,
|
|
292
|
-
"onUpdate:modelValue": t[5] || (t[5] = (u) => o("update:model-value", {
|
|
293
|
-
...l.modelValue,
|
|
294
|
-
every: u
|
|
295
|
-
}))
|
|
296
|
-
}, null, 8, ["model-value"])
|
|
297
|
-
])
|
|
298
|
-
])) : R("", !0)
|
|
299
|
-
];
|
|
300
|
-
}),
|
|
301
|
-
_: 1
|
|
302
|
-
}, 8, ["sublabel", "disabled"])
|
|
303
|
-
]),
|
|
304
|
-
_: 1
|
|
305
|
-
}, 8, ["model-value"])
|
|
306
|
-
], 64)) : R("", !0)
|
|
307
|
-
]),
|
|
308
|
-
l.errorText || e(x).length > 0 ? (d(), h(Z, {
|
|
309
|
-
key: 0,
|
|
310
|
-
class: "!mt-4",
|
|
311
|
-
text: l.errorText || e(g).helperText(e(x), ""),
|
|
312
|
-
state: "error"
|
|
313
|
-
}, null, 8, ["text"])) : R("", !0)
|
|
314
|
-
]);
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
}), Re = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, $e = /* @__PURE__ */ a("div", null, "Voucher description should not exceed 200 characters.", -1), Pe = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1), Te = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Usage configuration", -1), ke = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1), qe = /* @__PURE__ */ U({
|
|
318
|
-
__name: "VoucherEditor",
|
|
319
|
-
props: {
|
|
320
|
-
modelValue: {
|
|
321
|
-
type: Object
|
|
322
|
-
},
|
|
323
|
-
rewardImage: {
|
|
324
|
-
type: Object
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
emits: ["update:model-value", "update:reward-image"],
|
|
328
|
-
setup(l, { emit: $ }) {
|
|
329
|
-
const { t: C } = me(), o = k(
|
|
330
|
-
l.modelValue ?? re("VOUCHER", {
|
|
331
|
-
business: te().currentBusiness.value._id,
|
|
332
|
-
name: ""
|
|
333
|
-
})
|
|
334
|
-
), y = Q, r = $;
|
|
335
|
-
return (x, i) => {
|
|
336
|
-
var b, P, c;
|
|
337
|
-
const v = p("FmTextarea"), I = p("FmHelperText");
|
|
338
|
-
return d(), O(S, null, [
|
|
339
|
-
s(oe, {
|
|
340
|
-
modelValue: e(o).name,
|
|
341
|
-
"onUpdate:modelValue": i[0] || (i[0] = (t) => e(o).name = t),
|
|
342
|
-
label: "Voucher name",
|
|
343
|
-
schema: e(g).typeAtPath(e(y), "name", [e(o).type])
|
|
344
|
-
}, null, 8, ["modelValue", "schema"]),
|
|
345
|
-
s(v, {
|
|
346
|
-
class: "!mb-[-16px]",
|
|
347
|
-
modelValue: e(o).description,
|
|
348
|
-
"onUpdate:modelValue": i[1] || (i[1] = (t) => e(o).description = t),
|
|
349
|
-
rules: [e(g).ruleAtPath(e(y), "description", [e(o).type])]
|
|
350
|
-
}, {
|
|
351
|
-
label: f(() => [
|
|
352
|
-
(d(), h(H(
|
|
353
|
-
e(g).toInputLabel(
|
|
354
|
-
e(g).typeAtPath(e(y), "description", [e(o).type]),
|
|
355
|
-
"Voucher description"
|
|
356
|
-
)
|
|
357
|
-
)))
|
|
358
|
-
]),
|
|
359
|
-
_: 1
|
|
360
|
-
}, 8, ["modelValue", "rules"]),
|
|
361
|
-
a("div", Re, [
|
|
362
|
-
$e,
|
|
363
|
-
a("div", null, F(((b = e(o).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
|
|
364
|
-
]),
|
|
365
|
-
s(le, {
|
|
366
|
-
class: "w-1/2 xs:w-2/3",
|
|
367
|
-
"aspect-ratio": "16/9",
|
|
368
|
-
file: l.rewardImage ?? void 0,
|
|
369
|
-
thumbnail: e(o).image ?? void 0,
|
|
370
|
-
"onUpdate:file": i[2] || (i[2] = async (t) => {
|
|
371
|
-
r("update:reward-image", t), t || (e(o).image = null);
|
|
372
|
-
})
|
|
373
|
-
}, {
|
|
374
|
-
label: f(() => [
|
|
375
|
-
(d(), h(H(
|
|
376
|
-
e(g).toInputLabel(
|
|
377
|
-
e(g).typeAtPath(e(y), "image", [e(o).type]),
|
|
378
|
-
"Voucher image"
|
|
379
|
-
)
|
|
380
|
-
)))
|
|
381
|
-
]),
|
|
382
|
-
_: 1
|
|
383
|
-
}, 8, ["file", "thumbnail"]),
|
|
384
|
-
Pe,
|
|
385
|
-
s(ae, {
|
|
386
|
-
"model-value": e(o).extras.effect,
|
|
387
|
-
"onUpdate:modelValue": i[3] || (i[3] = (t) => e(o).extras.effect = t)
|
|
388
|
-
}, null, 8, ["model-value"]),
|
|
389
|
-
e(o).extras.effect == null ? (d(), h(I, {
|
|
390
|
-
key: 0,
|
|
391
|
-
class: "!mt-8",
|
|
392
|
-
text: e(C)("connect.campaign.common.effect_required"),
|
|
393
|
-
state: "error"
|
|
394
|
-
}, null, 8, ["text"])) : R("", !0),
|
|
395
|
-
Te,
|
|
396
|
-
s(ne, {
|
|
397
|
-
"model-value": e(o).options,
|
|
398
|
-
"no-campaign": e(o).noCampaign,
|
|
399
|
-
"onUpdate:modelValue": i[4] || (i[4] = (t) => e(o).options = t),
|
|
400
|
-
schema: e(g).typeAtPath(e(y), "options", ["VOUCHER"])
|
|
401
|
-
}, null, 8, ["model-value", "no-campaign", "schema"]),
|
|
402
|
-
ke,
|
|
403
|
-
e(o).type === "VOUCHER" ? (d(), h(se, {
|
|
404
|
-
key: 1,
|
|
405
|
-
"model-value": ((c = (P = e(o).extras) == null ? void 0 : P.targetLocation) == null ? void 0 : c.map(String)) ?? null,
|
|
406
|
-
type: "select",
|
|
407
|
-
"onUpdate:modelValue": i[5] || (i[5] = (t) => {
|
|
408
|
-
e(o).extras.targetLocation = t;
|
|
409
|
-
}),
|
|
410
|
-
rules: [e(g).ruleAtPath(e(y), "extras.targetLocation")]
|
|
411
|
-
}, null, 8, ["model-value", "rules"])) : R("", !0)
|
|
412
|
-
], 64);
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
export {
|
|
417
|
-
Ze as _,
|
|
418
|
-
qe as a
|
|
419
|
-
};
|