@feedmepos/mf-connect 0.1.38-beta.3 → 0.1.38-beta.31
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-DlzNe_iy.js → Analytic-C_nMR1Be.js} +15 -15
- package/dist/{App-S5t6byxx.js → App-s6O0r91S.js} +624 -618
- package/dist/{AuditLogs-FO7SmMm2.js → AuditLogs-BcVkpvGw.js} +14 -14
- package/dist/{Bin-D--pK-f4.js → Bin-C5g9jHoQ.js} +9 -9
- package/dist/Broadcast-JPTVWDJC.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C6MYdWnX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CloO2B7A.js} +6 -6
- package/dist/{Card-DHL6WnwR.js → Card-Dgj6yukn.js} +143 -137
- package/dist/{Collections-DnonNjPT.js → Collections-D-aFYRCq.js} +82 -76
- package/dist/Credit-BZcRB9Wj.js +228 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DnPPICf0.js +3117 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C4zzEOCb.js → EffectSheet.vue_vue_type_style_index_0_lang-DbSiVLaJ.js} +100 -99
- package/dist/Experience-DHQPxVv3.js +229 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/{Game-Bkl0JnBq.js → Game-C1XnMgil.js} +103 -97
- package/dist/Grab-BbHccgZO.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js} +8 -8
- package/dist/{Index-BXTpF6kN.js → Index-DYZsN2H3.js} +54 -54
- package/dist/{Marketing-kk88gqDC.js → Marketing-DnsPHYpt.js} +7112 -5424
- package/dist/{Member-Cq-orpRf.js → Member-rkdV1fVo.js} +10 -10
- package/dist/{MemberList-B0K6Djc0.js → MemberList-QaB13bxO.js} +33 -33
- package/dist/{MemberTransactions-BCrJz8M9.js → MemberTransactions-Dw5qHQVW.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BcGhTM5H.js → MessageInput.vue_vue_type_script_setup_true_lang-DGyv0LMu.js} +5789 -5515
- package/dist/{Mission-BF1Z-Veq.js → Mission-B7rAzf6O.js} +112 -106
- package/dist/{Overview-CLSBBnZz.js → Overview-Cg4Szz05.js} +21 -21
- package/dist/Point-DuKS8-0D.js +232 -0
- package/dist/{Promotion-CGwxt3l3.js → Promotion-CFtLq-LB.js} +11 -11
- package/dist/{Queue-Dihw6DCV.js → Queue-BZONVNCP.js} +13 -13
- package/dist/{Record-ChSb722p.js → Record-jNEahJNC.js} +10 -10
- package/dist/{Reward-8oKlHA-x.js → Reward-VS6C6NQO.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D--YGFcF.js → RewardGroup.vue_vue_type_script_setup_true_lang-D4KMGgkv.js} +11 -11
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cb-WJA0i.js +1763 -0
- package/dist/{Segment-BbYgbJ7w.js → Segment-DK5tqeOF.js} +274 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dy_G8md1.js → SelectItems.vue_vue_type_script_setup_true_lang-AYAwO37B.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BFhY3cve.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-K8js6fbo.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-WEiXy4o1.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-lcPHPa4K.js} +3 -3
- package/dist/{Setting-B75a5DWV.js → Setting-BtiUlWRc.js} +459 -444
- package/dist/{Store-Cb8Et93b.js → Store-DqFW5hr_.js} +472 -465
- package/dist/{StoreRewards-DEI9VJHO.js → StoreRewards-g-3WtxwG.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BGBl4Zla.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DNT4PWgl.js} +208 -222
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-92NnMkro.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CXYnNSta.js} +1 -1
- package/dist/{Tier-BB4AyAZV.js → Tier-SHij9zKX.js} +230 -227
- package/dist/{Title-Cla1U1ye.js → Title-_2JVV1rW.js} +142 -139
- package/dist/{Transaction-fHFbemk-.js → Transaction-BHLb6hZN.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-yS5qh7za.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DolBmHzN.js} +6 -6
- package/dist/{Voucher-CraCvVuq.js → Voucher-CJk8ZuCA.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DqKT6Fep.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BviU3rz6.js} +86 -86
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B14K5zel.js → ZodTextField.vue_vue_type_script_setup_true_lang-R4Xcn7gl.js} +1 -1
- package/dist/app-BpcIC6Ud.js +57962 -0
- package/dist/{app-B8hYhD6p.js → app-D9ygZVP0.js} +678 -597
- package/dist/app.js +1 -1
- package/dist/{business-CwtLYoAT.js → business-CzJxdKc-.js} +11 -8
- package/dist/{campaign-BwM5SLyy.js → campaign-RKjwSpJk.js} +29 -16
- package/dist/{campaign-Bea47E3G.js → campaign-s_7F9I6R.js} +29 -25
- package/dist/{campaign.enum-v4z9v1aa.js → campaign.enum-BlGYJ6p4.js} +3 -2
- package/dist/{campaign.fn-CV5s8XUt.js → campaign.fn-aH0pz1jU.js} +95 -95
- package/dist/{collectible.enum-BGt9xa0D.js → collectible.enum-DYV8J5Mg.js} +1 -1
- package/dist/{collection.fn-DFzVxsA9.js → collection.fn-lLG_rLyd.js} +2 -2
- package/dist/dto-Cx-z2h2_.js +222 -0
- package/dist/{effect-DQtWLIrF.js → effect-DV2GiHqM.js} +1 -1
- package/dist/{email-addresses-I8wDL9bh.js → email-addresses-DTfbKDsC.js} +1 -1
- package/dist/{export-BauRZnqp.js → export-hHjutAC3.js} +4 -4
- package/dist/{helper-B2Q1CLCG.js → helper-oy_DH4P5.js} +1 -1
- package/dist/{index-CCJqmSob.js → index-8t9y1bUZ.js} +1 -1
- package/dist/{index-B20y17xe.js → index-B1C5UjP5.js} +3 -3
- package/dist/{index-DQpw4Va-.js → index-B79nkieV.js} +1452 -1452
- package/dist/{index-DGuR3NRj.js → index-BA6oC2L9.js} +3 -3
- package/dist/{index-BdizAaMz.js → index-Ba05Naif.js} +16 -16
- package/dist/{index-B1Bdn9rV.js → index-BoRTW-dI.js} +196 -16
- package/dist/{index-CgYAHnlX.js → index-CUGS4y58.js} +861 -714
- package/dist/{index-IXY9hkrD.js → index-CV_3mltA.js} +1 -1
- package/dist/{index-DtfWwcp4.js → index-ClgsfK3Y.js} +1 -1
- package/dist/{index-dK8fMQ5h.js → index-CtxtD8HE.js} +1 -1
- package/dist/{index-aguYFa7D.js → index-CycW9ri6.js} +6347 -6305
- package/dist/{index-s1IB44jY.js → index-D8JDdV2w.js} +1 -1
- package/dist/{index-Bv3aqvRF.js → index-DJlZYwDo.js} +11 -4
- package/dist/{index-yOFbPJEE.js → index-sSxaqeIi.js} +1 -1
- package/dist/{index.esm2017-VwpfHNpU.js → index.esm2017-B3-oEraK.js} +34 -34
- package/dist/{loading-BFKvxqlx.js → loading-D98ofaCB.js} +1 -1
- package/dist/{membership-Cgzqg1Vw.js → membership-CwbI7ZrE.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-DIh7Uegf.js → money-D5cHxcPB.js} +1 -1
- package/dist/{number-onslf0BL.js → number-CPEEKMZZ.js} +1 -1
- package/dist/objectid-Be_atBnH.js +145 -0
- package/dist/{plugins-hfoXoiK2.js → plugins-B55BRo5q.js} +2 -2
- package/dist/{reward-CYC7hCgM.js → reward-xrTcTYjt.js} +1 -1
- package/dist/rule-builder-NTDBB2kj.js +93 -0
- package/dist/{rule-C_M3oFLI.js → rule-w89XmfIg.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/{template-C6URy7QF.js → template-Bt_auQZW.js} +5 -5
- package/dist/timezone-BcBn2Kb_.js +1151 -0
- package/dist/{trigger-CZAiHFT5.js → trigger-D_6mNiva.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-uo2wREaB.js → user-B6YOJ_7r.js} +1 -1
- package/dist/{vue-i18n-Ba5EWUgR.js → vue-i18n-QvFKKqSt.js} +418 -418
- package/dist/{xlsx-CIJPKm4G.js → xlsx-Dr9Ctrs4.js} +1 -1
- package/package.json +6 -5
- package/dist/Broadcast-BYL3w06w.js +0 -227
- package/dist/Credit-BMeykOe-.js +0 -222
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6Ps8njr.js +0 -2185
- package/dist/Experience-Lu8sCso6.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Point-BZ2Bgfw8.js +0 -226
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-GSqXPvRs.js +0 -1728
- package/dist/app-BVCw28s0.js +0 -33357
- package/dist/dto-BgJqr4qT.js +0 -214
- package/dist/objectid-vtlpVGBH.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-BOG14MYK.js +0 -89
- package/dist/usePagination-BeF5K3M7.js +0 -223
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as P, ref as
|
|
2
|
-
import { z as te } from "./app-
|
|
1
|
+
import { defineComponent as P, ref as O, onMounted as Q, computed as H, resolveComponent as y, openBlock as i, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as c, unref as e, isRef as q, createVNode as F, normalizeClass as G, watch as X, withCtx as b, resolveDynamicComponent as D, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
|
|
2
|
+
import { z as te } from "./app-D9ygZVP0.js";
|
|
3
3
|
import { Z as u } from "./zod-Bg2FbC-D.js";
|
|
4
|
-
import {
|
|
5
|
-
import { u as Z } from "./vue-i18n-
|
|
6
|
-
import { s as R } from "./effect-
|
|
7
|
-
import { p as ae } from "./plugins-
|
|
8
|
-
import {
|
|
9
|
-
const ie = { class: "flex flex-col gap-8" },
|
|
4
|
+
import { g as le, f as oe } from "./index-Ba05Naif.js";
|
|
5
|
+
import { u as Z } from "./vue-i18n-QvFKKqSt.js";
|
|
6
|
+
import { s as R } from "./effect-DV2GiHqM.js";
|
|
7
|
+
import { p as ae } from "./plugins-B55BRo5q.js";
|
|
8
|
+
import { e as ne } from "./app-BpcIC6Ud.js";
|
|
9
|
+
const ie = { class: "flex flex-col gap-8" }, de = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "fm-typo-en-body-lg-600"
|
|
12
|
-
},
|
|
12
|
+
}, se = { key: 1 }, me = {
|
|
13
13
|
key: 2,
|
|
14
14
|
class: "space-y-16"
|
|
15
15
|
}, re = /* @__PURE__ */ P({
|
|
@@ -41,16 +41,16 @@ const ie = { class: "flex flex-col gap-8" }, se = {
|
|
|
41
41
|
emits: ["update:model-value"],
|
|
42
42
|
setup(t, { emit: g }) {
|
|
43
43
|
var A, B;
|
|
44
|
-
const { t:
|
|
45
|
-
{ label:
|
|
46
|
-
{ label:
|
|
47
|
-
], a =
|
|
44
|
+
const { t: s } = Z(), l = t, S = g, o = [
|
|
45
|
+
{ label: s("connect.template.validity_option.date_range"), value: "range" },
|
|
46
|
+
{ label: s("connect.template.validity_option.custom"), value: "custom" }
|
|
47
|
+
], a = O(!1);
|
|
48
48
|
Q(() => {
|
|
49
49
|
a.value = l.modelValue && Object.entries(l.modelValue).filter(
|
|
50
50
|
([p, r]) => p != "followFirstReceive" && r != null
|
|
51
51
|
).length > 0;
|
|
52
52
|
});
|
|
53
|
-
const n =
|
|
53
|
+
const n = O(
|
|
54
54
|
l.type ? o.find((p) => p.value === l.type) : (A = l.modelValue) != null && A.validBefore || (B = l.modelValue) != null && B.validAfter ? o[0] : o[1]
|
|
55
55
|
), h = H(
|
|
56
56
|
() => l.forCredit ? le : oe
|
|
@@ -58,93 +58,94 @@ const ie = { class: "flex flex-col gap-8" }, se = {
|
|
|
58
58
|
const p = h.value.safeParse(l.modelValue);
|
|
59
59
|
return p.success ? [] : p.error.errors;
|
|
60
60
|
});
|
|
61
|
-
function
|
|
61
|
+
function d(p) {
|
|
62
62
|
S("update:model-value", p);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
var r,
|
|
64
|
+
function C(p) {
|
|
65
|
+
var r, k;
|
|
66
66
|
if (p.value == "range")
|
|
67
|
-
return
|
|
67
|
+
return d({
|
|
68
68
|
followFirstReceive: (r = l.modelValue) == null ? void 0 : r.followFirstReceive,
|
|
69
69
|
validAfter: void 0,
|
|
70
70
|
validBefore: void 0
|
|
71
71
|
});
|
|
72
72
|
if (p.value == "custom")
|
|
73
|
-
return a.value = !1,
|
|
74
|
-
validForDay: (
|
|
73
|
+
return a.value = !1, d({
|
|
74
|
+
validForDay: (k = l.modelValue) == null ? void 0 : k.validForDay
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
return (p, r) => {
|
|
78
78
|
var I, $, j, E, M, N, L, z;
|
|
79
|
-
const
|
|
80
|
-
return
|
|
79
|
+
const k = y("FmButtonGroup"), Y = y("FmSimpleDateRangePicker"), J = y("FmSwitch"), K = y("FmStepperField"), T = y("FmHelperText");
|
|
80
|
+
return i(), x("div", ie, [
|
|
81
81
|
W(p.$slots, "label", {}, () => [
|
|
82
|
-
t.label ? (
|
|
82
|
+
t.label ? (i(), x("div", de, w(t.label), 1)) : v("", !0)
|
|
83
83
|
]),
|
|
84
|
-
t.type ? v("", !0) : (
|
|
84
|
+
t.type ? v("", !0) : (i(), c(k, {
|
|
85
85
|
key: 0,
|
|
86
86
|
modelValue: e(n),
|
|
87
87
|
"onUpdate:modelValue": [
|
|
88
|
-
r[0] || (r[0] = (
|
|
89
|
-
r[1] || (r[1] = (
|
|
88
|
+
r[0] || (r[0] = (f) => q(n) ? n.value = f : null),
|
|
89
|
+
r[1] || (r[1] = (f) => C(f))
|
|
90
90
|
],
|
|
91
91
|
items: o
|
|
92
92
|
}, null, 8, ["modelValue"])),
|
|
93
|
-
e(n).value === "range" ? (
|
|
94
|
-
|
|
93
|
+
e(n).value === "range" ? (i(), x("div", se, [
|
|
94
|
+
F(Y, {
|
|
95
95
|
"model-value": {
|
|
96
96
|
startDate: (I = t.modelValue) != null && I.validAfter ? new Date(($ = t.modelValue) == null ? void 0 : $.validAfter).toISOString() : null,
|
|
97
97
|
endDate: (j = t.modelValue) != null && j.validAfter ? new Date(((E = t.modelValue) == null ? void 0 : E.validBefore) || "").toISOString() : null
|
|
98
98
|
},
|
|
99
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
99
|
+
"onUpdate:modelValue": r[2] || (r[2] = (f) => {
|
|
100
100
|
var V;
|
|
101
|
-
|
|
101
|
+
d({
|
|
102
102
|
followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive,
|
|
103
|
-
validAfter: new Date(
|
|
104
|
-
validBefore: new Date(
|
|
103
|
+
validAfter: new Date(f.startDate).toISOString(),
|
|
104
|
+
validBefore: new Date(f.endDate).toISOString()
|
|
105
105
|
});
|
|
106
106
|
})
|
|
107
107
|
}, null, 8, ["model-value"])
|
|
108
|
-
])) : e(n).value === "custom" ? (
|
|
109
|
-
|
|
108
|
+
])) : e(n).value === "custom" ? (i(), x("div", me, [
|
|
109
|
+
t.forCredit ? v("", !0) : (i(), c(J, {
|
|
110
|
+
key: 0,
|
|
110
111
|
"model-value": e(a),
|
|
111
|
-
label: e(
|
|
112
|
+
label: e(s)("connect.template.validity_option.expire"),
|
|
112
113
|
"label-placement": "right",
|
|
113
|
-
"onUpdate:modelValue": r[3] || (r[3] = (
|
|
114
|
+
"onUpdate:modelValue": r[3] || (r[3] = (f) => {
|
|
114
115
|
var V;
|
|
115
|
-
a.value =
|
|
116
|
-
validForDay:
|
|
116
|
+
a.value = f, d({
|
|
117
|
+
validForDay: f ? 1 : void 0,
|
|
117
118
|
followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
|
|
118
119
|
});
|
|
119
120
|
})
|
|
120
|
-
}, null, 8, ["model-value", "label"]),
|
|
121
|
-
e(a) ? (
|
|
122
|
-
key:
|
|
123
|
-
label: e(
|
|
121
|
+
}, null, 8, ["model-value", "label"])),
|
|
122
|
+
e(a) || t.forCredit ? (i(), c(K, {
|
|
123
|
+
key: 1,
|
|
124
|
+
label: e(s)("connect.template.validity_option.after_day"),
|
|
124
125
|
class: G([{
|
|
125
|
-
"opacity-50 pointer-events-none": !e(a)
|
|
126
|
+
"opacity-50 pointer-events-none": !e(a) && !t.forCredit
|
|
126
127
|
}, "mt-[-4px]"]),
|
|
127
128
|
"max-fraction-digits": 0,
|
|
128
|
-
disabled: !e(a),
|
|
129
|
+
disabled: !e(a) && !t.forCredit,
|
|
129
130
|
"show-steppers": !1,
|
|
130
131
|
max: 99999,
|
|
131
|
-
"append-text": e(
|
|
132
|
+
"append-text": e(s)("connect.template.validity_option.days"),
|
|
132
133
|
"model-value": ((M = l.modelValue) == null ? void 0 : M.validForDay) ?? null,
|
|
133
|
-
"onUpdate:modelValue": r[4] || (r[4] = (
|
|
134
|
+
"onUpdate:modelValue": r[4] || (r[4] = (f) => {
|
|
134
135
|
var V;
|
|
135
|
-
return
|
|
136
|
-
validForDay:
|
|
136
|
+
return d({
|
|
137
|
+
validForDay: f == null ? void 0 : parseInt(f.toString()),
|
|
137
138
|
followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
|
|
138
139
|
});
|
|
139
140
|
})
|
|
140
141
|
}, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : v("", !0)
|
|
141
142
|
])) : v("", !0),
|
|
142
|
-
((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(a) ? (
|
|
143
|
+
((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(a) ? (i(), c(T, {
|
|
143
144
|
key: 3,
|
|
144
|
-
text: e(
|
|
145
|
+
text: e(s)("connect.template.validity_option.expire_follow_first_receive")
|
|
145
146
|
}, null, 8, ["text"])) : v("", !0),
|
|
146
|
-
|
|
147
|
-
text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(
|
|
147
|
+
F(T, {
|
|
148
|
+
text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(s)("connect.template.validity_option.expires_on_same_day") : e(u).helperText(e(m), "")),
|
|
148
149
|
state: t.helperText ? "error" : ((z = l.modelValue) == null ? void 0 : z.validForDay) === 0 ? "warning" : e(u).helperState(e(m), "")
|
|
149
150
|
}, null, 8, ["text", "state"])
|
|
150
151
|
]);
|
|
@@ -170,97 +171,97 @@ const ie = { class: "flex flex-col gap-8" }, se = {
|
|
|
170
171
|
},
|
|
171
172
|
emits: ["update:model-value"],
|
|
172
173
|
setup(t, { emit: g }) {
|
|
173
|
-
const { t:
|
|
174
|
+
const { t: s } = Z(), l = t, S = g, o = O(l.modelValue ?? {});
|
|
174
175
|
return X(o, () => S("update:model-value", o.value)), (a, n) => {
|
|
175
176
|
const h = y("FmSwitch"), m = y("FmStepperField");
|
|
176
|
-
return
|
|
177
|
-
t.isMission ? v("", !0) : (
|
|
177
|
+
return i(), x("div", ue, [
|
|
178
|
+
t.isMission ? v("", !0) : (i(), c(h, {
|
|
178
179
|
key: 0,
|
|
179
|
-
label: e(
|
|
180
|
+
label: e(s)("connect.template.enable_transfer"),
|
|
180
181
|
"label-placement": "right",
|
|
181
182
|
modelValue: e(o).enableTransfer,
|
|
182
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
183
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => e(o).enableTransfer = d)
|
|
183
184
|
}, null, 8, ["label", "modelValue"])),
|
|
184
|
-
t.noCampaign ? v("", !0) : (
|
|
185
|
+
t.noCampaign ? v("", !0) : (i(), x("div", {
|
|
185
186
|
key: 1,
|
|
186
187
|
class: G(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
|
|
187
188
|
}, [
|
|
188
|
-
|
|
189
|
+
F(m, {
|
|
189
190
|
modelValue: e(o).maxPerUser,
|
|
190
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
191
|
+
"onUpdate:modelValue": n[1] || (n[1] = (d) => e(o).maxPerUser = d),
|
|
191
192
|
"show-steppers": !1,
|
|
192
193
|
rules: [e(u).ruleAtPath(t.schema, "maxPerUser")],
|
|
193
|
-
"helper-text": e(
|
|
194
|
+
"helper-text": e(s)("connect.template.leave_empty_unlimited")
|
|
194
195
|
}, {
|
|
195
|
-
label:
|
|
196
|
-
(
|
|
196
|
+
label: b(() => [
|
|
197
|
+
(i(), c(D(
|
|
197
198
|
e(u).toInputLabel(
|
|
198
199
|
e(u).typeAtPath(t.schema, "maxPerUser"),
|
|
199
|
-
e(
|
|
200
|
+
e(s)("connect.template.max_per_user")
|
|
200
201
|
)
|
|
201
202
|
)))
|
|
202
203
|
]),
|
|
203
204
|
_: 1
|
|
204
205
|
}, 8, ["modelValue", "rules", "helper-text"]),
|
|
205
|
-
t.isMission ? v("", !0) : (
|
|
206
|
+
t.isMission ? v("", !0) : (i(), c(m, {
|
|
206
207
|
key: 0,
|
|
207
208
|
modelValue: e(o).maxReceive,
|
|
208
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
209
|
+
"onUpdate:modelValue": n[2] || (n[2] = (d) => e(o).maxReceive = d),
|
|
209
210
|
"show-steppers": !1,
|
|
210
211
|
rules: [e(u).ruleAtPath(t.schema, "maxReceive")],
|
|
211
|
-
"helper-text": e(
|
|
212
|
+
"helper-text": e(s)("connect.template.leave_empty_unlimited")
|
|
212
213
|
}, {
|
|
213
|
-
label:
|
|
214
|
-
(
|
|
214
|
+
label: b(() => [
|
|
215
|
+
(i(), c(D(
|
|
215
216
|
e(u).toInputLabel(
|
|
216
217
|
e(u).typeAtPath(t.schema, "maxReceive"),
|
|
217
|
-
e(
|
|
218
|
+
e(s)("connect.template.max_distribute")
|
|
218
219
|
)
|
|
219
220
|
)))
|
|
220
221
|
]),
|
|
221
222
|
_: 1
|
|
222
223
|
}, 8, ["modelValue", "rules", "helper-text"]))
|
|
223
224
|
], 2)),
|
|
224
|
-
t.isMission ? v("", !0) : (
|
|
225
|
-
|
|
225
|
+
t.isMission ? v("", !0) : (i(), x(_, { key: 2 }, [
|
|
226
|
+
F(m, {
|
|
226
227
|
modelValue: e(o).maxUse,
|
|
227
|
-
"onUpdate:modelValue": n[3] || (n[3] = (
|
|
228
|
+
"onUpdate:modelValue": n[3] || (n[3] = (d) => e(o).maxUse = d),
|
|
228
229
|
"append-text": "use(s)",
|
|
229
230
|
"show-steppers": !1,
|
|
230
231
|
rules: [e(u).ruleAtPath(t.schema, "maxUse")]
|
|
231
232
|
}, {
|
|
232
|
-
label:
|
|
233
|
-
(
|
|
233
|
+
label: b(() => [
|
|
234
|
+
(i(), c(D(
|
|
234
235
|
e(u).toInputLabel(
|
|
235
236
|
e(u).typeAtPath(t.schema, "maxUse"),
|
|
236
|
-
e(
|
|
237
|
+
e(s)("connect.template.usage_count")
|
|
237
238
|
)
|
|
238
239
|
)))
|
|
239
240
|
]),
|
|
240
241
|
_: 1
|
|
241
242
|
}, 8, ["modelValue", "rules"]),
|
|
242
|
-
e(o).maxUse && e(o).maxUse > 1 ? (
|
|
243
|
+
e(o).maxUse && e(o).maxUse > 1 ? (i(), c(m, {
|
|
243
244
|
key: 0,
|
|
244
245
|
modelValue: e(o).cooldown,
|
|
245
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
246
|
+
"onUpdate:modelValue": n[4] || (n[4] = (d) => e(o).cooldown = d),
|
|
246
247
|
"append-text": "minute(s)",
|
|
247
248
|
"show-steppers": !1,
|
|
248
249
|
rules: [e(u).ruleAtPath(t.schema, "cooldown")]
|
|
249
250
|
}, {
|
|
250
|
-
label:
|
|
251
|
-
(
|
|
251
|
+
label: b(() => [
|
|
252
|
+
(i(), c(D(
|
|
252
253
|
e(u).toInputLabel(
|
|
253
254
|
e(u).typeAtPath(t.schema, "cooldown"),
|
|
254
|
-
e(
|
|
255
|
+
e(s)("connect.template.cooldown")
|
|
255
256
|
)
|
|
256
257
|
)))
|
|
257
258
|
]),
|
|
258
259
|
_: 1
|
|
259
260
|
}, 8, ["modelValue", "rules"])) : v("", !0),
|
|
260
|
-
|
|
261
|
+
F(re, {
|
|
261
262
|
modelValue: e(o).validityOption,
|
|
262
|
-
"onUpdate:modelValue": n[5] || (n[5] = (
|
|
263
|
-
label: e(
|
|
263
|
+
"onUpdate:modelValue": n[5] || (n[5] = (d) => e(o).validityOption = d),
|
|
264
|
+
label: e(s)("connect.template.validity_option.title")
|
|
264
265
|
}, null, 8, ["modelValue", "label"])
|
|
265
266
|
], 64))
|
|
266
267
|
]);
|
|
@@ -279,13 +280,13 @@ const ie = { class: "flex flex-col gap-8" }, se = {
|
|
|
279
280
|
},
|
|
280
281
|
emits: ["update:model-value"],
|
|
281
282
|
setup(t, { emit: g }) {
|
|
282
|
-
const
|
|
283
|
+
const s = g, l = O(!1);
|
|
283
284
|
async function S(o) {
|
|
284
|
-
o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") &&
|
|
285
|
+
o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") && s("update:model-value", null);
|
|
285
286
|
}
|
|
286
287
|
return (o, a) => {
|
|
287
288
|
const n = y("FmButton"), h = y("FmSideSheet");
|
|
288
|
-
return
|
|
289
|
+
return i(), c(h, {
|
|
289
290
|
"max-width": 550,
|
|
290
291
|
header: "Apply discount",
|
|
291
292
|
modelValue: e(l),
|
|
@@ -294,23 +295,23 @@ const ie = { class: "flex flex-col gap-8" }, se = {
|
|
|
294
295
|
a[3] || (a[3] = (m) => l.value = m)
|
|
295
296
|
]
|
|
296
297
|
}, {
|
|
297
|
-
"side-sheet-button":
|
|
298
|
-
var m,
|
|
298
|
+
"side-sheet-button": b(() => {
|
|
299
|
+
var m, d, C, A;
|
|
299
300
|
return [
|
|
300
301
|
U("div", pe, [
|
|
301
302
|
a[4] || (a[4] = U("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the discount you want to offer your customer. ", -1)),
|
|
302
|
-
t.modelValue ? (
|
|
303
|
+
t.modelValue ? (i(), x("div", ce, [
|
|
303
304
|
U("div", fe, [
|
|
304
305
|
U("div", null, w((m = e(R)(t.modelValue)) == null ? void 0 : m.type), 1),
|
|
305
|
-
U("div", ve, w((
|
|
306
|
+
U("div", ve, w((d = e(R)(t.modelValue)) == null ? void 0 : d.adjustment) + " with " + w((C = e(R)(t.modelValue)) == null ? void 0 : C.requirements) + " " + w((A = e(R)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
|
|
306
307
|
]),
|
|
307
|
-
|
|
308
|
+
F(n, {
|
|
308
309
|
icon: "delete",
|
|
309
310
|
"icon-color": "neutral-gray-400",
|
|
310
311
|
variant: "tertiary",
|
|
311
312
|
onClick: S
|
|
312
313
|
})
|
|
313
|
-
])) : (
|
|
314
|
+
])) : (i(), c(n, {
|
|
314
315
|
key: 0,
|
|
315
316
|
label: "Apply discount",
|
|
316
317
|
icon: "add",
|
|
@@ -321,17 +322,17 @@ const ie = { class: "flex flex-col gap-8" }, se = {
|
|
|
321
322
|
])
|
|
322
323
|
];
|
|
323
324
|
}),
|
|
324
|
-
"side-sheet-footer":
|
|
325
|
-
ee(w(void 0))
|
|
326
|
-
])),
|
|
327
|
-
default:
|
|
328
|
-
|
|
325
|
+
"side-sheet-footer": b(() => [...a[5] || (a[5] = [
|
|
326
|
+
ee(w(void 0), -1)
|
|
327
|
+
])]),
|
|
328
|
+
default: b(() => [
|
|
329
|
+
F(e(ne), {
|
|
329
330
|
class: "fm-effect-sheet",
|
|
330
331
|
title: "",
|
|
331
332
|
"can-set-auto-apply": t.canSetAutoApply,
|
|
332
333
|
"disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
|
|
333
334
|
"initial-value": t.modelValue,
|
|
334
|
-
onOnConfirm: a[0] || (a[0] = (m) => (
|
|
335
|
+
onOnConfirm: a[0] || (a[0] = (m) => (s("update:model-value", m), l.value = !1)),
|
|
335
336
|
onOnCancel: a[1] || (a[1] = (m) => l.value = !1)
|
|
336
337
|
}, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
|
|
337
338
|
]),
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { defineComponent as E, ref as S, computed as U, onMounted as j, resolveComponent as m, openBlock as p, createElementBlock as _, Fragment as x, createVNode as i, unref as o, createElementVNode as a, withCtx as h, renderList as M, createBlock as w, resolveDynamicComponent as H, toDisplayString as u, h as q } from "vue";
|
|
2
|
+
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as Q } from "./plugins-B55BRo5q.js";
|
|
5
|
+
import { u as W } from "./loading-D98ofaCB.js";
|
|
6
|
+
import { u as X } from "./business-CzJxdKc-.js";
|
|
7
|
+
import { u as Y } from "./campaign-s_7F9I6R.js";
|
|
8
|
+
import { a as L, b as V, g as Z } from "./campaign-RKjwSpJk.js";
|
|
9
|
+
import { u as ee } from "./vue-i18n-QvFKKqSt.js";
|
|
10
|
+
import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
+
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DnPPICf0.js";
|
|
12
|
+
import { u as ne } from "./template-Bt_auQZW.js";
|
|
13
|
+
import { c as g } from "./index-sSxaqeIi.js";
|
|
14
|
+
const ae = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ E({
|
|
15
|
+
__name: "Experience",
|
|
16
|
+
setup(_e) {
|
|
17
|
+
const { t: r } = ee(), P = {
|
|
18
|
+
label: r("connect.program.common.actions.create", {
|
|
19
|
+
type: r("connect.program.experience.title").toLowerCase()
|
|
20
|
+
}),
|
|
21
|
+
value: "create",
|
|
22
|
+
isPrimary: !0,
|
|
23
|
+
prependIcon: "add"
|
|
24
|
+
}, B = ne("POINT", G()), I = X(), d = Y(), { global: T, minor: v } = W, s = S({
|
|
25
|
+
searchKey: "",
|
|
26
|
+
location: []
|
|
27
|
+
});
|
|
28
|
+
function $(e) {
|
|
29
|
+
const t = s.value.location;
|
|
30
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
31
|
+
var c;
|
|
32
|
+
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
+
}) : e.targetLocation.includes(t);
|
|
34
|
+
}
|
|
35
|
+
const f = U(
|
|
36
|
+
() => d.campaigns.experience.filter((e) => $(e))
|
|
37
|
+
), K = [
|
|
38
|
+
{
|
|
39
|
+
header: "Program title",
|
|
40
|
+
accessorFn: (e) => e.name
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
header: "Status",
|
|
44
|
+
accessorFn: (e) => Z(e),
|
|
45
|
+
cell(e) {
|
|
46
|
+
return L(e.row.original);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
header: "Summary",
|
|
51
|
+
accessorFn: (e) => V(e)
|
|
52
|
+
//v.effect,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
header: "Actions",
|
|
56
|
+
cell(e) {
|
|
57
|
+
return q(J.FmButton, {
|
|
58
|
+
variant: "tertiary",
|
|
59
|
+
icon: "delete",
|
|
60
|
+
iconColor: "neutral-gray-400",
|
|
61
|
+
onClick: (t) => {
|
|
62
|
+
t.stopPropagation(), C(e.row.original);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
], b = S();
|
|
68
|
+
async function C(e) {
|
|
69
|
+
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await v(
|
|
70
|
+
async () => {
|
|
71
|
+
await g.delete(e._id), await d.read("POINT");
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
message: `Removing ${e.name}`,
|
|
75
|
+
successMessage: `Removed ${e.name} successfully`
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
async function y(e) {
|
|
80
|
+
e ? await t() : B.open(async (l) => {
|
|
81
|
+
await t(l);
|
|
82
|
+
});
|
|
83
|
+
async function t(l) {
|
|
84
|
+
var c;
|
|
85
|
+
(c = b.value) == null || c.showSheet(
|
|
86
|
+
!0,
|
|
87
|
+
"POINT",
|
|
88
|
+
e ? await g.readById(e._id) : void 0,
|
|
89
|
+
l
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async function N(e) {
|
|
94
|
+
await v(
|
|
95
|
+
async () => {
|
|
96
|
+
e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await d.read("POINT");
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
message: r("connect.program.common.update.updating", {
|
|
100
|
+
type: r("connect.program.experience.title")
|
|
101
|
+
}),
|
|
102
|
+
successMessage: r("connect.program.common.update.success", {
|
|
103
|
+
type: r("connect.program.experience.title"),
|
|
104
|
+
action: e.campaign._id ? "updated" : "created"
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return j(async () => {
|
|
110
|
+
await T(async () => {
|
|
111
|
+
await d.read("POINT");
|
|
112
|
+
});
|
|
113
|
+
}), (e, t) => {
|
|
114
|
+
const l = m("FmPageHead"), c = m("FmSearch"), R = m("FmTable"), F = m("FmButton"), A = m("FmListItem"), O = m("FmList"), D = m("FmCard");
|
|
115
|
+
return p(), _(x, null, [
|
|
116
|
+
i(l, {
|
|
117
|
+
title: o(r)("connect.program.experience.title"),
|
|
118
|
+
actions: o(f).length > 0 ? [P] : [],
|
|
119
|
+
"onClick:action": t[0] || (t[0] = () => y())
|
|
120
|
+
}, null, 8, ["title", "actions"]),
|
|
121
|
+
a("div", ae, [
|
|
122
|
+
i(c, {
|
|
123
|
+
modelValue: o(s).searchKey,
|
|
124
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => o(s).searchKey = n),
|
|
125
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
126
|
+
placeholder: o(r)("connect.program.common.search"),
|
|
127
|
+
collapsible: ""
|
|
128
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
129
|
+
o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(x, { key: 0 }, [
|
|
130
|
+
a("div", re, [
|
|
131
|
+
a("div", se, [
|
|
132
|
+
i(te, {
|
|
133
|
+
label: `${o(r)("connect.common.location")}: `,
|
|
134
|
+
"right-icon": "keyboard_arrow_down",
|
|
135
|
+
modelValue: o(s).location,
|
|
136
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => o(s).location = n),
|
|
137
|
+
icon: "storefront",
|
|
138
|
+
"show-item-label": !0,
|
|
139
|
+
items: o(I).locationOptions
|
|
140
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
141
|
+
]),
|
|
142
|
+
i(c, {
|
|
143
|
+
modelValue: o(s).searchKey,
|
|
144
|
+
"onUpdate:modelValue": t[3] || (t[3] = (n) => o(s).searchKey = n),
|
|
145
|
+
class: "xs:hidden",
|
|
146
|
+
placeholder: "search",
|
|
147
|
+
collapsible: ""
|
|
148
|
+
}, null, 8, ["modelValue"])
|
|
149
|
+
]),
|
|
150
|
+
i(R, {
|
|
151
|
+
class: "xs:hidden",
|
|
152
|
+
"row-data": o(f),
|
|
153
|
+
"column-defs": K,
|
|
154
|
+
"search-value": o(s).searchKey,
|
|
155
|
+
"column-filter": [],
|
|
156
|
+
onRowClick: t[4] || (t[4] = (n) => y(n.original)),
|
|
157
|
+
"hide-footer": o(f).length < 10
|
|
158
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
159
|
+
i(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
160
|
+
default: h(() => [
|
|
161
|
+
(p(!0), _(x, null, M(o(f).filter(
|
|
162
|
+
(n) => n.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
|
|
163
|
+
), (n) => (p(), w(A, {
|
|
164
|
+
key: n._id.toString(),
|
|
165
|
+
onClick: (k) => y(n),
|
|
166
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
167
|
+
}, {
|
|
168
|
+
default: h(() => [
|
|
169
|
+
a("div", ie, [
|
|
170
|
+
a("div", ce, [
|
|
171
|
+
(p(), w(H(o(L)(n)))),
|
|
172
|
+
a("div", le, u(n.currentReceive ?? 0) + " used ", 1)
|
|
173
|
+
]),
|
|
174
|
+
a("div", me, [
|
|
175
|
+
a("div", de, u(n.name), 1),
|
|
176
|
+
a("div", pe, u(o(V)(n)), 1)
|
|
177
|
+
]),
|
|
178
|
+
a("div", ue, u(o(r)("connect.program.experience.received", {
|
|
179
|
+
count: n.currentReceive ?? 0
|
|
180
|
+
})), 1)
|
|
181
|
+
]),
|
|
182
|
+
i(F, {
|
|
183
|
+
icon: "delete",
|
|
184
|
+
"icon-color": "neutral-gray-400",
|
|
185
|
+
variant: "tertiary",
|
|
186
|
+
onClick: (k) => (k.stopPropagation(), C(n))
|
|
187
|
+
}, null, 8, ["onClick"])
|
|
188
|
+
]),
|
|
189
|
+
_: 2
|
|
190
|
+
}, 1032, ["onClick"]))), 128))
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
})
|
|
194
|
+
], 64)) : (p(), w(D, {
|
|
195
|
+
key: 1,
|
|
196
|
+
variant: "outlined",
|
|
197
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
198
|
+
}, {
|
|
199
|
+
default: h(() => [
|
|
200
|
+
t[6] || (t[6] = a("img", {
|
|
201
|
+
src: z,
|
|
202
|
+
class: "aspect-square w-[150px]"
|
|
203
|
+
}, null, -1)),
|
|
204
|
+
a("div", fe, [
|
|
205
|
+
a("div", ye, u(o(r)("connect.program.experience.empty_state.title")), 1),
|
|
206
|
+
a("div", ge, u(o(r)("connect.program.experience.empty_state.description")), 1)
|
|
207
|
+
]),
|
|
208
|
+
i(F, {
|
|
209
|
+
variant: "primary",
|
|
210
|
+
label: "Create experience program",
|
|
211
|
+
icon: "add",
|
|
212
|
+
onClick: t[5] || (t[5] = (n) => y())
|
|
213
|
+
})
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
})),
|
|
217
|
+
i(oe, {
|
|
218
|
+
ref_key: "sheetRef",
|
|
219
|
+
ref: b,
|
|
220
|
+
"onSubmit:modelValue": N
|
|
221
|
+
}, null, 512)
|
|
222
|
+
])
|
|
223
|
+
], 64);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
export {
|
|
228
|
+
Ie as default
|
|
229
|
+
};
|