@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
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
|
|
2
|
+
import { _ as Z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as ee, components as te } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as P } from "./plugins-B55BRo5q.js";
|
|
5
|
+
import { u as oe } from "./loading-D98ofaCB.js";
|
|
6
|
+
import { u as ne } from "./business-CzJxdKc-.js";
|
|
7
|
+
import { u as ae } from "./campaign-s_7F9I6R.js";
|
|
8
|
+
import { u as re } from "./vue-i18n-QvFKKqSt.js";
|
|
9
|
+
import { h as d } from "./moment-D7p2TMB-.js";
|
|
10
|
+
import { g as se, a as V } from "./campaign-RKjwSpJk.js";
|
|
11
|
+
import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DnPPICf0.js";
|
|
12
|
+
import { u as le } from "./template-Bt_auQZW.js";
|
|
13
|
+
import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
14
|
+
import { c as C } from "./index-sSxaqeIi.js";
|
|
15
|
+
const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ q({
|
|
16
|
+
__name: "Grab",
|
|
17
|
+
setup(_e) {
|
|
18
|
+
const { t: o } = re(), I = {
|
|
19
|
+
label: o("connect.grab.createCampaign"),
|
|
20
|
+
value: "create",
|
|
21
|
+
isPrimary: !0,
|
|
22
|
+
prependIcon: "add"
|
|
23
|
+
}, A = le("GRAB", ee()), S = ne(), g = ae(), { global: R, minor: T } = oe, K = [
|
|
24
|
+
{
|
|
25
|
+
label: "Bill promotion",
|
|
26
|
+
value: "BILL"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: "Item promotion",
|
|
30
|
+
value: "ITEM"
|
|
31
|
+
}
|
|
32
|
+
], c = L({
|
|
33
|
+
searchKey: "",
|
|
34
|
+
location: [],
|
|
35
|
+
effectType: []
|
|
36
|
+
});
|
|
37
|
+
function E(e) {
|
|
38
|
+
const t = c.value.location;
|
|
39
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((a) => {
|
|
40
|
+
var s;
|
|
41
|
+
return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(a);
|
|
42
|
+
}) : e.targetLocation.includes(t);
|
|
43
|
+
}
|
|
44
|
+
function j(e) {
|
|
45
|
+
var s, r;
|
|
46
|
+
const t = c.value.effectType;
|
|
47
|
+
if (!t || t.length === 0) return !0;
|
|
48
|
+
const a = (r = (s = e.effect) == null ? void 0 : s.options) == null ? void 0 : r.target;
|
|
49
|
+
return t.includes(a);
|
|
50
|
+
}
|
|
51
|
+
const p = z(
|
|
52
|
+
() => g.campaigns.grab.filter(
|
|
53
|
+
(e) => E(e) && j(e)
|
|
54
|
+
)
|
|
55
|
+
), G = [
|
|
56
|
+
{
|
|
57
|
+
header: o("connect.grab.promotionTitle"),
|
|
58
|
+
accessorFn: (e) => e.name
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
header: o("connect.grab.period"),
|
|
62
|
+
accessorFn: (e) => {
|
|
63
|
+
const t = d(e.timeframeOptions.start).format("DD/MM/YYYY"), a = d(e.timeframeOptions.end).format("DD/MM/YYYY");
|
|
64
|
+
return `${t} - ${a}`;
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
header: o("connect.grab.status"),
|
|
69
|
+
accessorFn: (e) => se(e),
|
|
70
|
+
cell(e) {
|
|
71
|
+
return V(e.row.original);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
header: o("connect.grab.summary"),
|
|
76
|
+
cell(e) {
|
|
77
|
+
const t = ie(e.row.original.discount);
|
|
78
|
+
return t ? `${t.type} - ${t.adjustment}` : "-";
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
header: o("connect.grab.actions"),
|
|
83
|
+
cell(e) {
|
|
84
|
+
return J(te.FmButton, {
|
|
85
|
+
variant: "tertiary",
|
|
86
|
+
icon: "delete",
|
|
87
|
+
iconColor: "neutral-gray-400",
|
|
88
|
+
onClick: (t) => {
|
|
89
|
+
t.stopPropagation(), D(e.row.original);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
], B = L();
|
|
95
|
+
async function D(e) {
|
|
96
|
+
await P.remove(o("connect.grab.confirmRemove", { name: e.name })) && await T(
|
|
97
|
+
async () => {
|
|
98
|
+
await C.delete(e._id), await g.read("PROMOTION");
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
message: o("connect.grab.removing", { name: e.name }),
|
|
102
|
+
successMessage: o("connect.grab.removedSuccessfully", {
|
|
103
|
+
name: e.name
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
async function b(e) {
|
|
109
|
+
e ? await t() : A.open(async (a) => {
|
|
110
|
+
await t(a);
|
|
111
|
+
});
|
|
112
|
+
async function t(a) {
|
|
113
|
+
var s;
|
|
114
|
+
(s = B.value) == null || s.showSheet(
|
|
115
|
+
!0,
|
|
116
|
+
"GRAB",
|
|
117
|
+
e ? await C.readById(e._id) : void 0,
|
|
118
|
+
a
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async function N(e) {
|
|
123
|
+
var a;
|
|
124
|
+
const t = await U(e.campaign);
|
|
125
|
+
if (t.length > 0) {
|
|
126
|
+
const s = t.map(
|
|
127
|
+
(r) => `"${r.name}" (${d(r.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(r.timeframeOptions.end).format("DD/MM/YYYY")})`
|
|
128
|
+
).join(`
|
|
129
|
+
`);
|
|
130
|
+
return await ((a = P.dialog) == null ? void 0 : a.open({
|
|
131
|
+
title: o("connect.grab.conflictDetected"),
|
|
132
|
+
message: o("connect.grab.conflictMessage", {
|
|
133
|
+
conflicts: s
|
|
134
|
+
}),
|
|
135
|
+
closeButton: !0,
|
|
136
|
+
overlay: !0,
|
|
137
|
+
primaryActions: {
|
|
138
|
+
close: !0,
|
|
139
|
+
text: "OK"
|
|
140
|
+
}
|
|
141
|
+
})), !1;
|
|
142
|
+
}
|
|
143
|
+
await T(
|
|
144
|
+
async () => (e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await g.read("PROMOTION"), !0),
|
|
145
|
+
{
|
|
146
|
+
message: o(
|
|
147
|
+
e.campaign._id ? "connect.grab.updating" : "connect.grab.creating"
|
|
148
|
+
),
|
|
149
|
+
successMessage: o(
|
|
150
|
+
e.campaign._id ? "connect.grab.updatedSuccessfully" : "connect.grab.createdSuccessfully"
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
async function U(e) {
|
|
156
|
+
const t = g.campaigns.grab, a = [], s = !!e._id;
|
|
157
|
+
for (const r of t) {
|
|
158
|
+
if (s && r._id === e._id) continue;
|
|
159
|
+
const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(r.timeframeOptions.start), v = d(r.timeframeOptions.end);
|
|
160
|
+
if (_.isBefore(v) && y.isAfter(h) || h.isBefore(y) && v.isAfter(_)) {
|
|
161
|
+
const n = e.discount, w = r.discount;
|
|
162
|
+
n.scope.type === w.scope.type && a.push(r);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return a;
|
|
166
|
+
}
|
|
167
|
+
async function H(e) {
|
|
168
|
+
switch (e) {
|
|
169
|
+
case "create":
|
|
170
|
+
b();
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return Q(async () => {
|
|
175
|
+
await R(async () => {
|
|
176
|
+
await S.readLocations(), await g.read("PROMOTION");
|
|
177
|
+
});
|
|
178
|
+
}), (e, t) => {
|
|
179
|
+
const a = u("FmPill"), s = u("FmPageHead"), r = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
|
|
180
|
+
return f(), k(F, null, [
|
|
181
|
+
l(s, {
|
|
182
|
+
title: i(o)("connect.grab.title"),
|
|
183
|
+
actions: i(p).length > 0 ? [I] : [],
|
|
184
|
+
"onClick:action": H
|
|
185
|
+
}, {
|
|
186
|
+
prepend: x(() => [
|
|
187
|
+
l(a, { variant: "beta" }),
|
|
188
|
+
l(a, { variant: "premium" })
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["title", "actions"]),
|
|
192
|
+
m("div", me, [
|
|
193
|
+
l(r, {
|
|
194
|
+
modelValue: c.value.searchKey,
|
|
195
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => c.value.searchKey = n),
|
|
196
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
197
|
+
placeholder: i(o)("connect.grab.search"),
|
|
198
|
+
collapsible: ""
|
|
199
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
200
|
+
i(p) && i(p).length > 0 ? (f(), k(F, { key: 0 }, [
|
|
201
|
+
m("div", ue, [
|
|
202
|
+
m("div", de, [
|
|
203
|
+
l($, {
|
|
204
|
+
label: `${i(o)("connect.common.location")}: `,
|
|
205
|
+
"right-icon": "keyboard_arrow_down",
|
|
206
|
+
modelValue: c.value.location,
|
|
207
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => c.value.location = n),
|
|
208
|
+
icon: "storefront",
|
|
209
|
+
"show-item-label": !0,
|
|
210
|
+
items: i(S).locationOptions
|
|
211
|
+
}, null, 8, ["label", "modelValue", "items"]),
|
|
212
|
+
l($, {
|
|
213
|
+
label: "Type:",
|
|
214
|
+
"right-icon": "keyboard_arrow_down",
|
|
215
|
+
modelValue: c.value.effectType,
|
|
216
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => c.value.effectType = n),
|
|
217
|
+
icon: "filter_list",
|
|
218
|
+
"show-item-label": !0,
|
|
219
|
+
items: K
|
|
220
|
+
}, null, 8, ["modelValue"])
|
|
221
|
+
]),
|
|
222
|
+
l(r, {
|
|
223
|
+
modelValue: c.value.searchKey,
|
|
224
|
+
"onUpdate:modelValue": t[3] || (t[3] = (n) => c.value.searchKey = n),
|
|
225
|
+
class: "xs:hidden",
|
|
226
|
+
placeholder: "search",
|
|
227
|
+
collapsible: ""
|
|
228
|
+
}, null, 8, ["modelValue"])
|
|
229
|
+
]),
|
|
230
|
+
l(_, {
|
|
231
|
+
class: "xs:hidden",
|
|
232
|
+
"row-data": i(p),
|
|
233
|
+
"column-defs": G,
|
|
234
|
+
"search-value": c.value.searchKey,
|
|
235
|
+
"column-filter": [],
|
|
236
|
+
onRowClick: t[4] || (t[4] = (n) => b(n.original)),
|
|
237
|
+
"hide-footer": i(p).length < 10
|
|
238
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
239
|
+
l(v, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
240
|
+
default: x(() => [
|
|
241
|
+
(f(!0), k(F, null, W(i(p).filter(
|
|
242
|
+
(n) => n.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
|
|
243
|
+
), (n) => (f(), O(h, {
|
|
244
|
+
key: n._id.toString(),
|
|
245
|
+
onClick: (w) => b(n),
|
|
246
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
247
|
+
}, {
|
|
248
|
+
default: x(() => [
|
|
249
|
+
m("div", pe, [
|
|
250
|
+
m("div", fe, [
|
|
251
|
+
(f(), O(X(i(V)(n))))
|
|
252
|
+
])
|
|
253
|
+
]),
|
|
254
|
+
l(y, {
|
|
255
|
+
icon: "delete",
|
|
256
|
+
"icon-color": "neutral-gray-400",
|
|
257
|
+
variant: "tertiary",
|
|
258
|
+
onClick: (w) => (w.stopPropagation(), D(n))
|
|
259
|
+
}, null, 8, ["onClick"])
|
|
260
|
+
]),
|
|
261
|
+
_: 2
|
|
262
|
+
}, 1032, ["onClick"]))), 128))
|
|
263
|
+
]),
|
|
264
|
+
_: 1
|
|
265
|
+
})
|
|
266
|
+
], 64)) : (f(), O(M, {
|
|
267
|
+
key: 1,
|
|
268
|
+
variant: "outlined",
|
|
269
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
270
|
+
}, {
|
|
271
|
+
default: x(() => [
|
|
272
|
+
t[6] || (t[6] = m("img", {
|
|
273
|
+
src: Z,
|
|
274
|
+
class: "aspect-square w-[150px]"
|
|
275
|
+
}, null, -1)),
|
|
276
|
+
m("div", ge, [
|
|
277
|
+
m("div", ye, Y(i(o)("connect.grab.createPromotionCampaign")), 1),
|
|
278
|
+
m("div", be, Y(i(o)("connect.grab.description")), 1)
|
|
279
|
+
]),
|
|
280
|
+
l(y, {
|
|
281
|
+
variant: "primary",
|
|
282
|
+
label: i(o)("connect.grab.createPromotionCampaign"),
|
|
283
|
+
icon: "add",
|
|
284
|
+
onClick: t[5] || (t[5] = (n) => b())
|
|
285
|
+
}, null, 8, ["label"])
|
|
286
|
+
]),
|
|
287
|
+
_: 1
|
|
288
|
+
}))
|
|
289
|
+
]),
|
|
290
|
+
l(ce, {
|
|
291
|
+
ref_key: "sheetRef",
|
|
292
|
+
ref: B,
|
|
293
|
+
"onSubmit:modelValue": N
|
|
294
|
+
}, null, 512)
|
|
295
|
+
], 64);
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
export {
|
|
300
|
+
Pe as default
|
|
301
|
+
};
|
|
@@ -2,7 +2,7 @@ import { openBlock as l, createElementBlock as o, createElementVNode as i, defin
|
|
|
2
2
|
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
const H = {}, N = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
|
|
4
4
|
function A(e, d) {
|
|
5
|
-
return l(), o("div", N, d[0] || (d[0] = [
|
|
5
|
+
return l(), o("div", N, [...d[0] || (d[0] = [
|
|
6
6
|
i("svg", {
|
|
7
7
|
class: "dark:text-gray-600 h-10 text-gray-200 w-10",
|
|
8
8
|
"aria-hidden": "true",
|
|
@@ -12,7 +12,7 @@ function A(e, d) {
|
|
|
12
12
|
}, [
|
|
13
13
|
i("path", { d: "M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" })
|
|
14
14
|
], -1)
|
|
15
|
-
]));
|
|
15
|
+
])]);
|
|
16
16
|
}
|
|
17
17
|
const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-[400px] space-y-4" }, L = { key: 0 }, T = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, U = {
|
|
18
18
|
key: 1,
|
|
@@ -117,12 +117,12 @@ const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-
|
|
|
117
117
|
onFileUpload: u,
|
|
118
118
|
onFileRejected: n[0] || (n[0] = (j) => u(null))
|
|
119
119
|
}, {
|
|
120
|
-
label: g(() => n[2] || (n[2] = [
|
|
121
|
-
p(r(void 0))
|
|
122
|
-
])),
|
|
123
|
-
"helper-text": g(() => n[3] || (n[3] = [
|
|
124
|
-
p(r(void 0))
|
|
125
|
-
])),
|
|
120
|
+
label: g(() => [...n[2] || (n[2] = [
|
|
121
|
+
p(r(void 0), -1)
|
|
122
|
+
])]),
|
|
123
|
+
"helper-text": g(() => [...n[3] || (n[3] = [
|
|
124
|
+
p(r(void 0), -1)
|
|
125
|
+
])]),
|
|
126
126
|
"accept-text": g(() => [
|
|
127
127
|
i("div", T, [
|
|
128
128
|
i("div", null, "(" + r(e.recommendedSize) + ")", 1),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as
|
|
2
|
-
import { u as H } from "./vue-i18n-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as B, createElementVNode as c, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, normalizeClass as G, computed as L, Fragment as q, isRef as J } from "vue";
|
|
2
|
+
import { u as H } from "./vue-i18n-QvFKKqSt.js";
|
|
3
|
+
import "./index-8t9y1bUZ.js";
|
|
4
4
|
import { useRouter as K } from "vue-router";
|
|
5
|
-
import { u as Q } from "./loading-
|
|
6
|
-
import { f as V, p as X } from "./plugins-
|
|
7
|
-
import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as Q } from "./loading-D98ofaCB.js";
|
|
6
|
+
import { f as V, p as X } from "./plugins-B55BRo5q.js";
|
|
7
|
+
import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-D4KMGgkv.js";
|
|
8
8
|
import { useDialog as ee, useSnackbar as ne, FmButtonVariant as p } from "@feedmepos/ui-library";
|
|
9
|
-
import { r as N } from "./index-
|
|
10
|
-
import { u as ae } from "./reward-
|
|
11
|
-
import { u as oe } from "./business-
|
|
12
|
-
import { u as te } from "./membership-
|
|
13
|
-
import { R as
|
|
9
|
+
import { r as N } from "./index-D8JDdV2w.js";
|
|
10
|
+
import { u as ae } from "./reward-xrTcTYjt.js";
|
|
11
|
+
import { u as oe } from "./business-CzJxdKc-.js";
|
|
12
|
+
import { u as te } from "./membership-CwbI7ZrE.js";
|
|
13
|
+
import { R as $ } from "./app-D9ygZVP0.js";
|
|
14
14
|
const re = { class: "space-y-24" }, le = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: /* @__PURE__ */ G([
|
|
@@ -32,10 +32,10 @@ const re = { class: "space-y-24" }, le = {
|
|
|
32
32
|
modelValue: { type: Boolean }
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:modelValue"],
|
|
35
|
-
setup(
|
|
36
|
-
const y =
|
|
35
|
+
setup(k, { emit: T }) {
|
|
36
|
+
const y = k;
|
|
37
37
|
ee();
|
|
38
|
-
const s = ne(), { t } = H(), i = Y(), { minor: _ } = Q, d = g(!1),
|
|
38
|
+
const s = ne(), { t } = H(), i = Y(), { minor: _ } = Q, d = g(!1), x = T, r = g(null), w = g(null);
|
|
39
39
|
async function h() {
|
|
40
40
|
if (!r.value) {
|
|
41
41
|
s.open({
|
|
@@ -47,18 +47,18 @@ const re = { class: "space-y-24" }, le = {
|
|
|
47
47
|
_(
|
|
48
48
|
async () => {
|
|
49
49
|
d.value = !0;
|
|
50
|
-
const
|
|
50
|
+
const a = await V.update(
|
|
51
51
|
V.referralTermAndConditionPath(),
|
|
52
52
|
r.value
|
|
53
|
-
),
|
|
54
|
-
|
|
53
|
+
), n = i.referralProgram;
|
|
54
|
+
n.term_and_condition = a, await N.update(n), d.value = !1, v();
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
successMessage: "Term and Condition uploaded successfully"
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
61
|
+
async function E() {
|
|
62
62
|
await X.confirm(
|
|
63
63
|
t("connect.referral.term_and_condition.confirm_remove"),
|
|
64
64
|
t("connect.common.confirm"),
|
|
@@ -69,8 +69,8 @@ const re = { class: "space-y-24" }, le = {
|
|
|
69
69
|
d.value = !0, await V.delete(
|
|
70
70
|
V.referralTermAndConditionPath()
|
|
71
71
|
);
|
|
72
|
-
const
|
|
73
|
-
|
|
72
|
+
const n = i.referralProgram;
|
|
73
|
+
n.term_and_condition = void 0, await N.update(n), d.value = !1, v();
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
successMessage: "Term and Condition removed successfully"
|
|
@@ -78,27 +78,27 @@ const re = { class: "space-y-24" }, le = {
|
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
function v() {
|
|
81
|
-
r.value = null,
|
|
81
|
+
r.value = null, x("update:modelValue", !1);
|
|
82
82
|
}
|
|
83
83
|
function l() {
|
|
84
|
-
var
|
|
85
|
-
window.open((
|
|
84
|
+
var a;
|
|
85
|
+
window.open((a = i.referralProgram) == null ? void 0 : a.term_and_condition, "_blank");
|
|
86
86
|
}
|
|
87
87
|
return O(
|
|
88
88
|
() => y.modelValue,
|
|
89
|
-
(
|
|
89
|
+
(a) => {
|
|
90
90
|
r.value = null;
|
|
91
91
|
}
|
|
92
92
|
), I(() => {
|
|
93
|
-
}), (
|
|
94
|
-
const R = m("FmButton"),
|
|
95
|
-
return b(), j(
|
|
96
|
-
"model-value":
|
|
97
|
-
"onUpdate:modelValue":
|
|
93
|
+
}), (a, n) => {
|
|
94
|
+
const R = m("FmButton"), A = m("FmDropField"), u = m("fm-button"), S = m("fm-dialog");
|
|
95
|
+
return b(), j(S, {
|
|
96
|
+
"model-value": k.modelValue,
|
|
97
|
+
"onUpdate:modelValue": n[3] || (n[3] = (C) => a.$emit("update:modelValue", C)),
|
|
98
98
|
"dismiss-away": ""
|
|
99
99
|
}, {
|
|
100
100
|
"dialog-header": P(() => [
|
|
101
|
-
z(
|
|
101
|
+
z(B(a.$t("connect.referral.actions.terms")), 1)
|
|
102
102
|
]),
|
|
103
103
|
"dialog-footer": P(() => [
|
|
104
104
|
c("div", me, [
|
|
@@ -130,7 +130,7 @@ const re = { class: "space-y-24" }, le = {
|
|
|
130
130
|
o(R, {
|
|
131
131
|
variant: e(p).Plain,
|
|
132
132
|
icon: "delete",
|
|
133
|
-
onClick:
|
|
133
|
+
onClick: E
|
|
134
134
|
}, null, 8, ["variant"])
|
|
135
135
|
])) : W("", !0),
|
|
136
136
|
e(r) ? (b(), F("div", se, [
|
|
@@ -138,7 +138,7 @@ const re = { class: "space-y-24" }, le = {
|
|
|
138
138
|
variant: e(p).Tertiary,
|
|
139
139
|
"prepend-icon": "attach_file"
|
|
140
140
|
}, null, 8, ["variant"]),
|
|
141
|
-
c("p", ce,
|
|
141
|
+
c("p", ce, B(e(r).name), 1),
|
|
142
142
|
c("label", {
|
|
143
143
|
ref_key: "fileLabelRef",
|
|
144
144
|
ref: w,
|
|
@@ -147,7 +147,7 @@ const re = { class: "space-y-24" }, le = {
|
|
|
147
147
|
o(u, {
|
|
148
148
|
variant: e(p).Plain,
|
|
149
149
|
label: e(t)("Replace File"),
|
|
150
|
-
onClick:
|
|
150
|
+
onClick: n[1] || (n[1] = () => {
|
|
151
151
|
var f;
|
|
152
152
|
return (f = e(w)) == null ? void 0 : f.click();
|
|
153
153
|
})
|
|
@@ -157,15 +157,15 @@ const re = { class: "space-y-24" }, le = {
|
|
|
157
157
|
accept: ".pdf",
|
|
158
158
|
class: "hidden",
|
|
159
159
|
type: "file",
|
|
160
|
-
onChange:
|
|
160
|
+
onChange: n[2] || (n[2] = (f) => {
|
|
161
161
|
var D, M;
|
|
162
162
|
return r.value = ((M = (D = f.target) == null ? void 0 : D.files) == null ? void 0 : M[0]) ?? null;
|
|
163
163
|
})
|
|
164
164
|
}, null, 32)
|
|
165
165
|
], 512)
|
|
166
166
|
])) : (b(), F("div", ie, [
|
|
167
|
-
o(
|
|
168
|
-
onFileUpload:
|
|
167
|
+
o(A, {
|
|
168
|
+
onFileUpload: n[0] || (n[0] = (f) => r.value = f),
|
|
169
169
|
accept: ".pdf",
|
|
170
170
|
"max-file-size": 8e6
|
|
171
171
|
})
|
|
@@ -177,10 +177,10 @@ const re = { class: "space-y-24" }, le = {
|
|
|
177
177
|
}, 8, ["model-value"]);
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
}), ue = { class: "flex items-center" }, fe = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, pe = { class: "px-24 flex flex-col gap-y-16 pb-24" },
|
|
180
|
+
}), ue = { class: "flex items-center" }, fe = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, pe = { class: "px-24 flex flex-col gap-y-16 pb-24" }, xe = /* @__PURE__ */ U({
|
|
181
181
|
__name: "Index",
|
|
182
|
-
setup(
|
|
183
|
-
const
|
|
182
|
+
setup(k) {
|
|
183
|
+
const T = ae(), y = g(null), { t: s } = H(), t = K(), i = g(!1), _ = oe(), d = te(), x = L(() => _.isPremium ? [
|
|
184
184
|
{
|
|
185
185
|
label: s("connect.referral.actions.terms"),
|
|
186
186
|
value: "term_and_condition"
|
|
@@ -198,44 +198,44 @@ const re = { class: "space-y-24" }, le = {
|
|
|
198
198
|
] : []), r = [
|
|
199
199
|
{
|
|
200
200
|
label: s("connect.referral.tabs.overview"),
|
|
201
|
-
value:
|
|
201
|
+
value: $["$connect-REFERRAL_OVERVIEW"],
|
|
202
202
|
actions: []
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
label: s("connect.referral.tabs.record"),
|
|
206
|
-
value:
|
|
206
|
+
value: $["$connect-REFERRAL_RECORD"],
|
|
207
207
|
actions: []
|
|
208
208
|
}
|
|
209
209
|
], w = L(() => r.find((l) => l.value === t.currentRoute.value.name) ?? r[0]);
|
|
210
210
|
async function h(l) {
|
|
211
211
|
await t.push({ name: l });
|
|
212
212
|
}
|
|
213
|
-
async function
|
|
214
|
-
var
|
|
215
|
-
l === "add_referral_tier" && ((
|
|
213
|
+
async function E(l) {
|
|
214
|
+
var a;
|
|
215
|
+
l === "add_referral_tier" && ((a = y.value) == null || a.onManageRewardGroup(-1)), l === "manage_reward" && await t.push({ name: $["$connect-REWARD_TEMPLATE"] }), l === "term_and_condition" && v();
|
|
216
216
|
}
|
|
217
217
|
async function v() {
|
|
218
218
|
i.value = !0;
|
|
219
219
|
}
|
|
220
220
|
return I(async () => {
|
|
221
|
-
await
|
|
222
|
-
}), (l,
|
|
223
|
-
const
|
|
221
|
+
await T.readRewards(), await _.readPremium(), await d.readSegments();
|
|
222
|
+
}), (l, a) => {
|
|
223
|
+
const n = m("FmPill"), R = m("FmPageHead"), A = m("FmTabs"), u = m("RouterView");
|
|
224
224
|
return b(), F(q, null, [
|
|
225
225
|
o(R, {
|
|
226
|
-
actions: e(
|
|
227
|
-
"onClick:action":
|
|
226
|
+
actions: e(x),
|
|
227
|
+
"onClick:action": E
|
|
228
228
|
}, {
|
|
229
229
|
title: P(() => [
|
|
230
230
|
c("div", ue, [
|
|
231
|
-
c("span", fe,
|
|
232
|
-
o(
|
|
231
|
+
c("span", fe, B(e(s)("connect.referral.title")), 1),
|
|
232
|
+
o(n, { variant: "premium" })
|
|
233
233
|
])
|
|
234
234
|
]),
|
|
235
235
|
_: 1
|
|
236
236
|
}, 8, ["actions"]),
|
|
237
237
|
c("div", pe, [
|
|
238
|
-
o(
|
|
238
|
+
o(A, {
|
|
239
239
|
"model-value": e(w).value,
|
|
240
240
|
items: r,
|
|
241
241
|
"onUpdate:modelValue": h
|
|
@@ -244,7 +244,7 @@ const re = { class: "space-y-24" }, le = {
|
|
|
244
244
|
]),
|
|
245
245
|
o(de, {
|
|
246
246
|
modelValue: e(i),
|
|
247
|
-
"onUpdate:modelValue":
|
|
247
|
+
"onUpdate:modelValue": a[0] || (a[0] = (S) => J(i) ? i.value = S : null)
|
|
248
248
|
}, null, 8, ["modelValue"]),
|
|
249
249
|
o(Z, {
|
|
250
250
|
ref_key: "rewardGroupRef",
|
|
@@ -255,5 +255,5 @@ const re = { class: "space-y-24" }, le = {
|
|
|
255
255
|
}
|
|
256
256
|
});
|
|
257
257
|
export {
|
|
258
|
-
|
|
258
|
+
xe as default
|
|
259
259
|
};
|