@feedmepos/mf-connect 0.1.0-beta.70 → 0.1.0-beta.72
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-DEQUEGlq.js → Analytic-CeQ6Tgo4.js} +11 -11
- package/dist/{App-CcoU2SAx.js → App-B94F1eM6.js} +6 -10
- package/dist/{AuditLogs-CiB6u06w.js → AuditLogs-CduUWfDd.js} +8 -8
- package/dist/{Bin-C2_1m5RT.js → Bin-muOo03RK.js} +8 -8
- package/dist/{Broadcast-TotIXDuJ.js → Broadcast-CSco_Ev_.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CixQu3Pr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cfwv0VSC.js} +6 -6
- package/dist/{Card-Ce-_xMgS.js → Card-VojKGWaD.js} +15 -15
- package/dist/{Collections-DKva6Doi.js → Collections-B8dsbCQ6.js} +5 -5
- package/dist/{Credit-BVUxIJ6C.js → Credit-Ck_IuJMF.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKEumoan.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CkEPB1Ri.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ah4bz-qR.js → EffectSheet.vue_vue_type_style_index_0_lang-CA1awHcc.js} +6 -6
- package/dist/{Experience-DV3384o0.js → Experience-CP6Lmado.js} +9 -9
- package/dist/{Game-DY83ti52.js → Game-BfkyvrxR.js} +10 -10
- package/dist/{Index-DEIaZ-2H.js → Index-CsjZUBT3.js} +10 -10
- package/dist/{Marketing-C2RwIlrg.js → Marketing-D-P76e73.js} +6 -6
- package/dist/Member-DplZWFjl.js +348 -0
- package/dist/{MemberList-DSMI6t_D.js → MemberList-rmdZQk6G.js} +24 -24
- package/dist/{MemberTransactions-wXUlbbRq.js → MemberTransactions-BLANcbUF.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DYS0klKm.js → MessageInput.vue_vue_type_script_setup_true_lang-Cfks94UO.js} +17 -20
- package/dist/{Mission-P_KLDEpg.js → Mission-n-ctxUhM.js} +10 -10
- package/dist/{Overview-8vc0f1D7.js → Overview-DZlApGRk.js} +17 -17
- package/dist/{Point-B4Y0Pq60.js → Point-COtP0jzH.js} +9 -9
- package/dist/Promotion-DxOTF9a5.js +289 -0
- package/dist/{Queue-BlPA7PNH.js → Queue-CEIn9dZ3.js} +73 -68
- package/dist/{Record-Cl1qXSSk.js → Record-3ZeBNdJL.js} +7 -7
- package/dist/{Reward-jy6-W1Eh.js → Reward-QiI0aowk.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-d5JNNNHf.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cz0tKJVt.js} +11 -11
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrfQAYP9.js +1727 -0
- package/dist/{Segment-B36Nrvxs.js → Segment-Df47WLC6.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-jN0xUFNR.js → SelectItems.vue_vue_type_script_setup_true_lang-C39_J7OP.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLFTNooB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CCketLSU.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-H_Sehhgf.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DC1qZokI.js} +3 -3
- package/dist/{Setting-AgQf2X4W.js → Setting-BUQfywpm.js} +10 -10
- package/dist/{Store-D3Mm0pan.js → Store-STKhCXHd.js} +18 -18
- package/dist/{StoreRewards-L0VLWz8l.js → StoreRewards-BbyKdrXv.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Zl_cXXSD.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BWilzG-3.js} +37 -37
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-b4mfueTj.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cau0aOLA.js} +1 -1
- package/dist/{Tier-DQq-375x.js → Tier-yaEA-a64.js} +19 -19
- package/dist/{Title-OJxuBvaa.js → Title-BZvC2-Jh.js} +19 -19
- package/dist/{Transaction-vgsYRfD7.js → Transaction-D8Q5tgJB.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cwi0mvC3.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BhhdZbR2.js} +6 -6
- package/dist/{Voucher-BFwLaoxe.js → Voucher-troykwYN.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DNUBaNtJ.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CA-pu2mD.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-ms40eptZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-DGgUG7Qj.js} +1 -1
- package/dist/{app-D7C3Fxfi.js → app-B89lfub2.js} +36 -34
- package/dist/{app-BQFTJ_hE.js → app-CPknSRjl.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/business-hK-Tmb19.js +79 -0
- package/dist/{campaign-UQ8kMVeC.js → campaign-Bz2phAKq.js} +9 -9
- package/dist/{campaign-BkxTDfsK.js → campaign-DxBhaMAH.js} +2 -2
- package/dist/{campaign.enum-BdT-e9h9.js → campaign.enum-CaW4wKab.js} +1 -1
- package/dist/campaign.fn-VlvF65nU.js +758 -0
- package/dist/{collectible.enum-C8kd17Tz.js → collectible.enum-CL4zeuNW.js} +1 -1
- package/dist/{collection.fn-BIw1Y_tv.js → collection.fn-DonS6vla.js} +2 -2
- package/dist/{dto-CwzAhB8x.js → dto-Do28C6Us.js} +4 -4
- package/dist/{effect-CJcvLlKG.js → effect-BNoEad9s.js} +1 -1
- package/dist/{email-addresses-BCJTQPT0.js → email-addresses-DVlPQOMF.js} +1 -1
- package/dist/{export-URRwle1z.js → export-B2HL-u8e.js} +3 -3
- package/dist/{helper-DccnE6zn.js → helper-B-GwBl7o.js} +1 -1
- package/dist/{index-ghSGvG-m.js → index-B1zeyOTK.js} +6 -6
- package/dist/{index-D4MX9e5q.js → index-BgaXtrUK.js} +1 -1
- package/dist/{index-CaxFS90M.js → index-C00luv9F.js} +1 -1
- package/dist/{index-DrE9VkxR.js → index-CJfbls_c.js} +1 -1
- package/dist/{index-FcxOGFKj.js → index-CyLhq-Cu.js} +1 -1
- package/dist/{index-C3lpXz_P.js → index-DDyqoK-5.js} +1 -1
- package/dist/{index-BiIZ7X6d.js → index-DLBH6Pz7.js} +1264 -1264
- package/dist/{index-CFA3EqId.js → index-DdMBH5E3.js} +1 -1
- package/dist/{index-EOPRlB9V.js → index-DoLnZ0VU.js} +3 -3
- package/dist/{index-CPRN3irj.js → index-DrNO2330.js} +4 -4
- package/dist/{index-BsRJ4kVb.js → index-DziwUgQ3.js} +1 -1
- package/dist/{index-OScGm4mF.js → index-zetVbSGH.js} +2 -2
- package/dist/{index.esm2017-CE1CQHrP.js → index.esm2017-DUs_L3s2.js} +124 -124
- package/dist/{loading-B8zghYbj.js → loading-BfH5PK5q.js} +1 -1
- package/dist/{membership-DoJMF2T6.js → membership-BSgYE5mw.js} +3 -3
- package/dist/{money-CTR0rXZw.js → money-CXqLCoho.js} +1 -1
- package/dist/{number-Bhgz9eFP.js → number-CGz3yWyy.js} +1 -1
- package/dist/objectid-CH4l4E6N.js +145 -0
- package/dist/{plugins-B5mQ7CHT.js → plugins-0WrJ_ypd.js} +1189 -1189
- package/dist/{reward-DicsEEHe.js → reward-DdFCP398.js} +1 -1
- package/dist/{rule-s8siRar1.js → rule-Fkz4cRmK.js} +3 -3
- package/dist/{rule-builder-BWb4JTrd.js → rule-builder-Cq_MnX2R.js} +1 -1
- package/dist/{template-Qb5ozfLa.js → template-DzWwfIhG.js} +4 -4
- package/dist/{trigger-Bsb3Kj35.js → trigger-z_YD5Ld4.js} +4 -4
- package/dist/{user-DJ8aHRaM.js → user-qQossvab.js} +1 -1
- package/dist/vue-i18n-CeeBM23W.js +2365 -0
- package/dist/{xlsx-2QxyDFwt.js → xlsx-BaKm4Is1.js} +1 -1
- package/package.json +1 -1
- package/dist/Member-D4fc-wzd.js +0 -333
- package/dist/Promotion-C1CbesgZ.js +0 -255
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DYul_Nu8.js +0 -1640
- package/dist/business-vzpvmTdG.js +0 -78
- package/dist/campaign.fn-lc4ZhFCU.js +0 -758
- package/dist/objectid-DdVJrRBw.js +0 -145
- package/dist/vue-i18n-BG2U7GtN.js +0 -2365
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { defineComponent as J, ref as S, computed as Q, h as W, onMounted as X, resolveComponent as m, openBlock as u, createElementBlock as w, Fragment as v, createVNode as l, unref as a, createElementVNode as r, withCtx as b, renderList as Y, createBlock as x, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
|
|
2
|
+
import { _ as ee } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as oe, components as te } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as O, p as L } from "./plugins-0WrJ_ypd.js";
|
|
5
|
+
import { u as ne } from "./loading-BfH5PK5q.js";
|
|
6
|
+
import { u as ae } from "./business-hK-Tmb19.js";
|
|
7
|
+
import { u as se } from "./campaign-DxBhaMAH.js";
|
|
8
|
+
import { u as re } from "./vue-i18n-CeeBM23W.js";
|
|
9
|
+
import { g as ie, a as V } from "./campaign-Bz2phAKq.js";
|
|
10
|
+
import { e as I } from "./effect-BNoEad9s.js";
|
|
11
|
+
import { _ as le } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CkEPB1Ri.js";
|
|
12
|
+
import { u as ce } from "./template-DzWwfIhG.js";
|
|
13
|
+
import { _ as B } from "./FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js";
|
|
14
|
+
import { c as d } from "./index-BgaXtrUK.js";
|
|
15
|
+
const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-center justify-between w-full" }, ue = { class: "flex gap-8 overflow-x-auto" }, de = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ye = { class: "space-y-4" }, ge = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "flex flex-col gap-16 text-center" }, we = { class: "fm-typo-en-title-sm-800" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ J({
|
|
16
|
+
__name: "Promotion",
|
|
17
|
+
setup(be) {
|
|
18
|
+
const { t: n } = re(), M = {
|
|
19
|
+
label: n("connect.promotion.createCampaign"),
|
|
20
|
+
value: "create",
|
|
21
|
+
isPrimary: !0,
|
|
22
|
+
prependIcon: "add"
|
|
23
|
+
}, R = {
|
|
24
|
+
label: "Force sync",
|
|
25
|
+
value: "sync",
|
|
26
|
+
isPrimary: !1,
|
|
27
|
+
prependIcon: "refresh"
|
|
28
|
+
}, A = ce("PROMOTION", oe()), C = ae(), f = se(), { global: K, minor: h } = ne, N = [
|
|
29
|
+
{
|
|
30
|
+
label: "Bill promotion",
|
|
31
|
+
value: "BILL"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: "Item promotion",
|
|
35
|
+
value: "ITEM"
|
|
36
|
+
}
|
|
37
|
+
], s = S({
|
|
38
|
+
searchKey: "",
|
|
39
|
+
location: [],
|
|
40
|
+
effectType: []
|
|
41
|
+
});
|
|
42
|
+
function $(e) {
|
|
43
|
+
const o = s.value.location;
|
|
44
|
+
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((c) => {
|
|
45
|
+
var i;
|
|
46
|
+
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(c);
|
|
47
|
+
}) : e.targetLocation.includes(o);
|
|
48
|
+
}
|
|
49
|
+
function U(e) {
|
|
50
|
+
var i, g;
|
|
51
|
+
const o = s.value.effectType;
|
|
52
|
+
if (!o || o.length === 0) return !0;
|
|
53
|
+
const c = (g = (i = e.effect) == null ? void 0 : i.options) == null ? void 0 : g.target;
|
|
54
|
+
return o.includes(c);
|
|
55
|
+
}
|
|
56
|
+
const p = Q(
|
|
57
|
+
() => f.campaigns.promotion.filter(
|
|
58
|
+
(e) => $(e) && U(e)
|
|
59
|
+
)
|
|
60
|
+
), D = [
|
|
61
|
+
{
|
|
62
|
+
header: n("connect.promotion.promotionTitle"),
|
|
63
|
+
accessorFn: (e) => e.name
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
header: n("connect.promotion.status"),
|
|
67
|
+
accessorFn: (e) => ie(e),
|
|
68
|
+
cell(e) {
|
|
69
|
+
return V(e.row.original);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
header: n("connect.promotion.type"),
|
|
74
|
+
accessorFn: (e) => `${O.title(e.effect.options.target)} promotion`
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
header: n("connect.promotion.summary"),
|
|
78
|
+
accessorFn: (e) => I(e.effect)
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
header: n("connect.promotion.actions"),
|
|
82
|
+
cell(e) {
|
|
83
|
+
return W(te.FmButton, {
|
|
84
|
+
variant: "tertiary",
|
|
85
|
+
icon: "delete",
|
|
86
|
+
iconColor: "neutral-gray-400",
|
|
87
|
+
onClick: (o) => {
|
|
88
|
+
o.stopPropagation(), k(e.row.original);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
], F = S();
|
|
94
|
+
async function k(e) {
|
|
95
|
+
await L.remove(
|
|
96
|
+
n("connect.promotion.confirmRemove", { name: e.name })
|
|
97
|
+
) && await h(
|
|
98
|
+
async () => {
|
|
99
|
+
await d.delete(e._id), await f.read("PROMOTION");
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
message: n("connect.promotion.removing", { name: e.name }),
|
|
103
|
+
successMessage: n("connect.promotion.removedSuccessfully", {
|
|
104
|
+
name: e.name
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
async function y(e) {
|
|
110
|
+
e ? await o() : A.open(async (c) => {
|
|
111
|
+
await o(c);
|
|
112
|
+
});
|
|
113
|
+
async function o(c) {
|
|
114
|
+
var i;
|
|
115
|
+
(i = F.value) == null || i.showSheet(
|
|
116
|
+
!0,
|
|
117
|
+
"PROMOTION",
|
|
118
|
+
e ? await d.readById(e._id) : void 0,
|
|
119
|
+
c
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
async function E(e) {
|
|
124
|
+
await h(
|
|
125
|
+
async () => {
|
|
126
|
+
e.campaign._id ? await d.update(e.campaign._id, e) : await d.create(e), await f.read("PROMOTION");
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
message: n(
|
|
130
|
+
e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
|
|
131
|
+
),
|
|
132
|
+
successMessage: n(
|
|
133
|
+
e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
async function j(e) {
|
|
139
|
+
switch (e) {
|
|
140
|
+
case "create":
|
|
141
|
+
y();
|
|
142
|
+
break;
|
|
143
|
+
case "sync":
|
|
144
|
+
await L.confirm(
|
|
145
|
+
"Are you sure you want to synchronize all promotions to POS?",
|
|
146
|
+
"Force sync"
|
|
147
|
+
) && h(
|
|
148
|
+
async () => {
|
|
149
|
+
await d.syncAllPromotion();
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
message: "Syncing promotions...",
|
|
153
|
+
successMessage: "All promotions synced"
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return X(async () => {
|
|
160
|
+
await K(async () => {
|
|
161
|
+
await C.readLocations(), await f.read("PROMOTION");
|
|
162
|
+
});
|
|
163
|
+
}), (e, o) => {
|
|
164
|
+
const c = m("FmPageHead"), i = m("FmSearch"), g = m("FmTable"), H = m("FmChip"), T = m("FmButton"), q = m("FmListItem"), z = m("FmList"), G = m("FmCard");
|
|
165
|
+
return u(), w(v, null, [
|
|
166
|
+
l(c, {
|
|
167
|
+
title: a(n)("connect.promotion.title"),
|
|
168
|
+
actions: a(p).length > 0 ? [M, R] : [],
|
|
169
|
+
"onClick:action": j
|
|
170
|
+
}, null, 8, ["title", "actions"]),
|
|
171
|
+
r("div", me, [
|
|
172
|
+
l(i, {
|
|
173
|
+
modelValue: s.value.searchKey,
|
|
174
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.searchKey = t),
|
|
175
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
176
|
+
placeholder: a(n)("connect.promotion.search"),
|
|
177
|
+
collapsible: ""
|
|
178
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
179
|
+
a(p) && a(p).length > 0 ? (u(), w(v, { key: 0 }, [
|
|
180
|
+
r("div", pe, [
|
|
181
|
+
r("div", ue, [
|
|
182
|
+
l(B, {
|
|
183
|
+
label: `${a(n)("connect.common.location")}: `,
|
|
184
|
+
"right-icon": "keyboard_arrow_down",
|
|
185
|
+
modelValue: s.value.location,
|
|
186
|
+
"onUpdate:modelValue": o[1] || (o[1] = (t) => s.value.location = t),
|
|
187
|
+
icon: "storefront",
|
|
188
|
+
"show-item-label": !0,
|
|
189
|
+
items: a(C).locationOptions
|
|
190
|
+
}, null, 8, ["label", "modelValue", "items"]),
|
|
191
|
+
l(B, {
|
|
192
|
+
label: "Type:",
|
|
193
|
+
"right-icon": "keyboard_arrow_down",
|
|
194
|
+
modelValue: s.value.effectType,
|
|
195
|
+
"onUpdate:modelValue": o[2] || (o[2] = (t) => s.value.effectType = t),
|
|
196
|
+
icon: "filter_list",
|
|
197
|
+
"show-item-label": !0,
|
|
198
|
+
items: N
|
|
199
|
+
}, null, 8, ["modelValue"])
|
|
200
|
+
]),
|
|
201
|
+
l(i, {
|
|
202
|
+
modelValue: s.value.searchKey,
|
|
203
|
+
"onUpdate:modelValue": o[3] || (o[3] = (t) => s.value.searchKey = t),
|
|
204
|
+
class: "xs:hidden",
|
|
205
|
+
placeholder: "search",
|
|
206
|
+
collapsible: ""
|
|
207
|
+
}, null, 8, ["modelValue"])
|
|
208
|
+
]),
|
|
209
|
+
l(g, {
|
|
210
|
+
class: "xs:hidden",
|
|
211
|
+
"row-data": a(p),
|
|
212
|
+
"column-defs": D,
|
|
213
|
+
"search-value": s.value.searchKey,
|
|
214
|
+
"column-filter": [],
|
|
215
|
+
onRowClick: o[4] || (o[4] = (t) => y(t.original)),
|
|
216
|
+
"hide-footer": a(p).length < 10
|
|
217
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
218
|
+
l(z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
219
|
+
default: b(() => [
|
|
220
|
+
(u(!0), w(v, null, Y(a(p).filter(
|
|
221
|
+
(t) => t.name.toLowerCase().includes(s.value.searchKey.toLowerCase())
|
|
222
|
+
), (t) => (u(), x(q, {
|
|
223
|
+
key: t._id.toString(),
|
|
224
|
+
onClick: (P) => y(t),
|
|
225
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
226
|
+
}, {
|
|
227
|
+
default: b(() => [
|
|
228
|
+
r("div", de, [
|
|
229
|
+
r("div", fe, [
|
|
230
|
+
(u(), x(Z(a(V)(t)))),
|
|
231
|
+
l(H, {
|
|
232
|
+
class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
233
|
+
compact: !0,
|
|
234
|
+
label: `${a(O).title(t.effect.options.target)} promotion`
|
|
235
|
+
}, null, 8, ["label"])
|
|
236
|
+
]),
|
|
237
|
+
r("div", ye, [
|
|
238
|
+
r("div", ge, _(t.name), 1),
|
|
239
|
+
r("div", _e, _(a(I)(t.effect)), 1)
|
|
240
|
+
])
|
|
241
|
+
]),
|
|
242
|
+
l(T, {
|
|
243
|
+
icon: "delete",
|
|
244
|
+
"icon-color": "neutral-gray-400",
|
|
245
|
+
variant: "tertiary",
|
|
246
|
+
onClick: (P) => (P.stopPropagation(), k(t))
|
|
247
|
+
}, null, 8, ["onClick"])
|
|
248
|
+
]),
|
|
249
|
+
_: 2
|
|
250
|
+
}, 1032, ["onClick"]))), 128))
|
|
251
|
+
]),
|
|
252
|
+
_: 1
|
|
253
|
+
})
|
|
254
|
+
], 64)) : (u(), x(G, {
|
|
255
|
+
key: 1,
|
|
256
|
+
variant: "outlined",
|
|
257
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
258
|
+
}, {
|
|
259
|
+
default: b(() => [
|
|
260
|
+
o[6] || (o[6] = r("img", {
|
|
261
|
+
src: ee,
|
|
262
|
+
class: "aspect-square w-[150px]"
|
|
263
|
+
}, null, -1)),
|
|
264
|
+
r("div", he, [
|
|
265
|
+
r("div", we, _(a(n)("connect.promotion.createPromotionCampaign")), 1),
|
|
266
|
+
r("div", ve, _(a(n)("connect.promotion.description")), 1)
|
|
267
|
+
]),
|
|
268
|
+
l(T, {
|
|
269
|
+
variant: "primary",
|
|
270
|
+
label: a(n)("connect.promotion.createPromotionCampaign"),
|
|
271
|
+
icon: "add",
|
|
272
|
+
onClick: o[5] || (o[5] = (t) => y())
|
|
273
|
+
}, null, 8, ["label"])
|
|
274
|
+
]),
|
|
275
|
+
_: 1
|
|
276
|
+
}))
|
|
277
|
+
]),
|
|
278
|
+
l(le, {
|
|
279
|
+
ref_key: "sheetRef",
|
|
280
|
+
ref: F,
|
|
281
|
+
"onSubmit:modelValue": E
|
|
282
|
+
}, null, 512)
|
|
283
|
+
], 64);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
export {
|
|
288
|
+
Ae as default
|
|
289
|
+
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { c as u, a as
|
|
5
|
-
import { useDialog as
|
|
6
|
-
import "./index-
|
|
7
|
-
import { I as c, k as
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./index-
|
|
11
|
-
import { h as
|
|
12
|
-
import { u as
|
|
13
|
-
import { u as
|
|
14
|
-
import { g as
|
|
15
|
-
import { o as
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
18
|
-
return
|
|
19
|
-
},
|
|
1
|
+
import { defineComponent as h, h as n, ref as T, watch as V, onBeforeMount as N, resolveComponent as B, openBlock as A, createElementBlock as U, Fragment as z, createVNode as m, unref as o, createElementVNode as f } from "vue";
|
|
2
|
+
import { u as q, _ as Y } from "./usePagination-BeF5K3M7.js";
|
|
3
|
+
import { _ as x } from "./FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js";
|
|
4
|
+
import { c as u, a as L } from "./plugins-0WrJ_ypd.js";
|
|
5
|
+
import { useDialog as O, components as w } from "@feedmepos/ui-library";
|
|
6
|
+
import "./index-B1zeyOTK.js";
|
|
7
|
+
import { I as c, k as S } from "./index-DrNO2330.js";
|
|
8
|
+
import "./index-zetVbSGH.js";
|
|
9
|
+
import "./index-DDyqoK-5.js";
|
|
10
|
+
import "./index-DoLnZ0VU.js";
|
|
11
|
+
import { h as y } from "./moment-BWErdI6_.js";
|
|
12
|
+
import { u as $ } from "./vue-i18n-CeeBM23W.js";
|
|
13
|
+
import { u as j, v as H, x as K } from "./index.esm2017-DUs_L3s2.js";
|
|
14
|
+
import { g as W, S as G, u as Q } from "./index-DLBH6Pz7.js";
|
|
15
|
+
import { o as J } from "./objectId-dwaoBfJX.js";
|
|
16
|
+
const X = () => {
|
|
17
|
+
if (!G.getBusinessId()) throw new Error("Invalid business ID");
|
|
18
|
+
return Q("queues");
|
|
19
|
+
}, Z = {
|
|
20
20
|
async readImportMember(d, p) {
|
|
21
|
-
return
|
|
22
|
-
await
|
|
21
|
+
return W(
|
|
22
|
+
await X().get("", {
|
|
23
23
|
params: { ...d, ...p }
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
27
|
+
}, ee = { class: "p-24 flex flex-col gap-y-2" }, te = { class: "flex items-center justify-between" }, oe = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, be = /* @__PURE__ */ h({
|
|
28
28
|
__name: "Queue",
|
|
29
29
|
setup(d) {
|
|
30
|
-
const { t: p } =
|
|
30
|
+
const { t: p } = $(), I = O(), C = [
|
|
31
31
|
{
|
|
32
32
|
header: "ID",
|
|
33
33
|
accessorKey: "_id",
|
|
@@ -42,7 +42,7 @@ const J = () => {
|
|
|
42
42
|
size: "sm",
|
|
43
43
|
class: "cursor-pointer mr-4",
|
|
44
44
|
onClick: (e) => {
|
|
45
|
-
e.preventDefault(), e.stopPropagation(),
|
|
45
|
+
e.preventDefault(), e.stopPropagation(), L(t.row.original._id.toString());
|
|
46
46
|
}
|
|
47
47
|
}),
|
|
48
48
|
n(
|
|
@@ -70,7 +70,7 @@ const J = () => {
|
|
|
70
70
|
return n(w.FmChip, {
|
|
71
71
|
label: e ? u.title(e) : "-",
|
|
72
72
|
compact: !0,
|
|
73
|
-
class:
|
|
73
|
+
class: F(e)
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
76
|
enableSorting: !1
|
|
@@ -82,7 +82,7 @@ const J = () => {
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
header: "Created at",
|
|
85
|
-
accessorFn: (t) =>
|
|
85
|
+
accessorFn: (t) => y(J(t._id.toString())).format("D MMM YYYY, hh:mmA"),
|
|
86
86
|
enableSorting: !0
|
|
87
87
|
},
|
|
88
88
|
{
|
|
@@ -100,7 +100,7 @@ const J = () => {
|
|
|
100
100
|
rel: "noopener"
|
|
101
101
|
},
|
|
102
102
|
e.originalName
|
|
103
|
-
) : e != null && e.originalName
|
|
103
|
+
) : e != null && e.originalName ? n("div", null, e.originalName) : n("div", null, "-");
|
|
104
104
|
},
|
|
105
105
|
enableSorting: !1
|
|
106
106
|
},
|
|
@@ -118,7 +118,7 @@ const J = () => {
|
|
|
118
118
|
},
|
|
119
119
|
enableSorting: !1
|
|
120
120
|
}
|
|
121
|
-
],
|
|
121
|
+
], F = (t) => {
|
|
122
122
|
switch (t) {
|
|
123
123
|
case c.enum.ACTIVE:
|
|
124
124
|
return "text-fm-color-typo-info bg-fm-color-system-info-100";
|
|
@@ -131,7 +131,7 @@ const J = () => {
|
|
|
131
131
|
default:
|
|
132
132
|
return "text-fm-color-typo-primary bg-fm-color-system-primary-100";
|
|
133
133
|
}
|
|
134
|
-
},
|
|
134
|
+
}, v = h({
|
|
135
135
|
name: "FailedReasonDialog",
|
|
136
136
|
props: {
|
|
137
137
|
data: {
|
|
@@ -144,32 +144,37 @@ const J = () => {
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
async function D(t) {
|
|
147
|
-
|
|
147
|
+
I.open({
|
|
148
148
|
title: "Failed Reason",
|
|
149
149
|
closeButton: !0,
|
|
150
150
|
dismissAway: !0,
|
|
151
|
-
contentComponent:
|
|
151
|
+
contentComponent: v,
|
|
152
152
|
contentComponentProps: {
|
|
153
153
|
data: t
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
const
|
|
158
|
-
const e =
|
|
159
|
-
return await
|
|
160
|
-
},
|
|
161
|
-
type: [
|
|
157
|
+
const E = async (t) => {
|
|
158
|
+
const e = j(), r = H(e, t);
|
|
159
|
+
return await K(r);
|
|
160
|
+
}, M = c.options.map((t) => ({ label: u.title(t), value: t })), s = T({
|
|
161
|
+
type: [S.enum.MEMBER_IMPORTED],
|
|
162
162
|
status: []
|
|
163
|
-
}), { tableMeta:
|
|
163
|
+
}), { tableMeta: l, rowData: R, onSort: k, debouncedFetchData: g } = q(
|
|
164
164
|
async (t) => {
|
|
165
165
|
const e = {
|
|
166
|
-
...
|
|
167
|
-
}, r = await
|
|
166
|
+
...s.value
|
|
167
|
+
}, r = await Z.readImportMember(t, e);
|
|
168
168
|
return await Promise.all(
|
|
169
169
|
r.resources.map(async (a) => {
|
|
170
|
-
var
|
|
171
|
-
const
|
|
172
|
-
|
|
170
|
+
var b, _;
|
|
171
|
+
const i = (_ = (b = a.context) == null ? void 0 : b.context) == null ? void 0 : _.file;
|
|
172
|
+
if (y(a.context.emittedAt).diff(y(), "days") < 7 && i)
|
|
173
|
+
try {
|
|
174
|
+
i.downloadUrl = await E(i == null ? void 0 : i.fbFilePath);
|
|
175
|
+
} catch (P) {
|
|
176
|
+
console.log(P);
|
|
177
|
+
}
|
|
173
178
|
})
|
|
174
179
|
), {
|
|
175
180
|
resources: r.resources,
|
|
@@ -177,58 +182,58 @@ const J = () => {
|
|
|
177
182
|
};
|
|
178
183
|
}
|
|
179
184
|
);
|
|
180
|
-
return
|
|
181
|
-
|
|
185
|
+
return V(
|
|
186
|
+
s,
|
|
182
187
|
() => {
|
|
183
188
|
g();
|
|
184
189
|
},
|
|
185
190
|
{ deep: !0 }
|
|
186
|
-
),
|
|
191
|
+
), N(async () => {
|
|
187
192
|
await g();
|
|
188
193
|
}), (t, e) => {
|
|
189
|
-
const r =
|
|
190
|
-
return
|
|
194
|
+
const r = B("FmPageHead");
|
|
195
|
+
return A(), U(z, null, [
|
|
191
196
|
m(r, {
|
|
192
197
|
title: o(p)("connect.queue.title")
|
|
193
198
|
}, null, 8, ["title"]),
|
|
194
|
-
f("div",
|
|
195
|
-
f("div",
|
|
196
|
-
f("div",
|
|
197
|
-
m(
|
|
199
|
+
f("div", ee, [
|
|
200
|
+
f("div", te, [
|
|
201
|
+
f("div", oe, [
|
|
202
|
+
m(x, {
|
|
198
203
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
199
204
|
"right-icon": "keyboard_arrow_down",
|
|
200
|
-
modelValue: o(
|
|
201
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) => o(
|
|
205
|
+
modelValue: o(s).type,
|
|
206
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => o(s).type = a),
|
|
202
207
|
label: "Type: ",
|
|
203
208
|
"show-item-label": !0,
|
|
204
209
|
items: [
|
|
205
210
|
{
|
|
206
211
|
label: "Member Imported",
|
|
207
|
-
value: o(
|
|
212
|
+
value: o(S).enum.MEMBER_IMPORTED
|
|
208
213
|
}
|
|
209
214
|
]
|
|
210
215
|
}, null, 8, ["modelValue", "items"]),
|
|
211
|
-
m(
|
|
216
|
+
m(x, {
|
|
212
217
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
213
218
|
"right-icon": "keyboard_arrow_down",
|
|
214
|
-
modelValue: o(
|
|
215
|
-
"onUpdate:modelValue": e[1] || (e[1] = (a) => o(
|
|
219
|
+
modelValue: o(s).status,
|
|
220
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => o(s).status = a),
|
|
216
221
|
label: "Status: ",
|
|
217
222
|
"show-item-label": !0,
|
|
218
|
-
items: o(
|
|
223
|
+
items: o(M)
|
|
219
224
|
}, null, 8, ["modelValue", "items"])
|
|
220
225
|
])
|
|
221
226
|
]),
|
|
222
|
-
m(
|
|
223
|
-
loading: o(
|
|
224
|
-
"row-data": o(
|
|
225
|
-
"row-count": o(
|
|
226
|
-
"column-defs":
|
|
227
|
-
"page-count": o(
|
|
228
|
-
"page-index": o(
|
|
229
|
-
"page-size": o(
|
|
227
|
+
m(Y, {
|
|
228
|
+
loading: o(l).isLoading,
|
|
229
|
+
"row-data": o(R),
|
|
230
|
+
"row-count": o(l).totalRows,
|
|
231
|
+
"column-defs": C,
|
|
232
|
+
"page-count": o(l).pageCount,
|
|
233
|
+
"page-index": o(l).pageIndex,
|
|
234
|
+
"page-size": o(l).pageSize,
|
|
230
235
|
"shrink-at": !1,
|
|
231
|
-
onSortChange: o(
|
|
236
|
+
onSortChange: o(k),
|
|
232
237
|
onPageChange: e[2] || (e[2] = (a) => o(g)({
|
|
233
238
|
pageSize: a.pageSize,
|
|
234
239
|
pageIndex: a.pageIndex
|
|
@@ -240,5 +245,5 @@ const J = () => {
|
|
|
240
245
|
}
|
|
241
246
|
});
|
|
242
247
|
export {
|
|
243
|
-
|
|
248
|
+
be as default
|
|
244
249
|
};
|
|
@@ -3,16 +3,16 @@ var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
|
|
4
4
|
import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
|
|
5
5
|
import { u as oe, _ as ae } from "./usePagination-BeF5K3M7.js";
|
|
6
|
-
import { g as A } from "./user-
|
|
6
|
+
import { g as A } from "./user-qQossvab.js";
|
|
7
7
|
import { components as R } from "@feedmepos/ui-library";
|
|
8
|
-
import { a as se, c as ie } from "./plugins-
|
|
9
|
-
import { u as j } from "./vue-i18n-
|
|
10
|
-
import { u as L } from "./loading-
|
|
8
|
+
import { a as se, c as ie } from "./plugins-0WrJ_ypd.js";
|
|
9
|
+
import { u as j } from "./vue-i18n-CeeBM23W.js";
|
|
10
|
+
import { u as L } from "./loading-BfH5PK5q.js";
|
|
11
11
|
import { useCoreStore as ne } from "@feedmepos/mf-common";
|
|
12
|
-
import { r as v } from "./index-
|
|
12
|
+
import { r as v } from "./index-CJfbls_c.js";
|
|
13
13
|
import { c as ce, a as le } from "./object-qECH92oz.js";
|
|
14
|
-
import { u as de } from "./membership-
|
|
15
|
-
import { u as V, w as me } from "./xlsx-
|
|
14
|
+
import { u as de } from "./membership-BSgYE5mw.js";
|
|
15
|
+
import { u as V, w as me } from "./xlsx-BaKm4Is1.js";
|
|
16
16
|
import { e as f } from "./index-vh86FiIQ.js";
|
|
17
17
|
import { h as ue } from "./moment-BWErdI6_.js";
|
|
18
18
|
import { o as pe } from "./objectId-dwaoBfJX.js";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { defineComponent as X, ref as x, computed as H, resolveComponent as w, openBlock as b, createBlock as h, unref as t, isRef as Z, withCtx as A, createElementVNode as f, createVNode as d, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as O, onMounted as q, toDisplayString as B } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as Q, components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as G } from "./loading-
|
|
5
|
-
import { u as J, C as ee } from "./membership-
|
|
6
|
-
import { f as j, p as te } from "./plugins-
|
|
7
|
-
import { u as oe } from "./vue-i18n-
|
|
4
|
+
import { u as G } from "./loading-BfH5PK5q.js";
|
|
5
|
+
import { u as J, C as ee } from "./membership-BSgYE5mw.js";
|
|
6
|
+
import { f as j, p as te } from "./plugins-0WrJ_ypd.js";
|
|
7
|
+
import { u as oe } from "./vue-i18n-CeeBM23W.js";
|
|
8
8
|
import { c as ae } from "./object-qECH92oz.js";
|
|
9
9
|
import { Z as _ } from "./zod-Bg2FbC-D.js";
|
|
10
|
-
import "./index-
|
|
11
|
-
import { F as N } from "./index-
|
|
10
|
+
import "./index-zetVbSGH.js";
|
|
11
|
+
import { F as N } from "./index-DoLnZ0VU.js";
|
|
12
12
|
import { useCoreStore as le } from "@feedmepos/mf-common";
|
|
13
|
-
import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
13
|
+
import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-CA-pu2mD.js";
|
|
14
|
+
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-CA1awHcc.js";
|
|
15
15
|
import { J as K } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { i as de } from "./helper-
|
|
18
|
-
import { u as pe, r as P } from "./reward-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { C as ce } from "./campaign.fn-
|
|
21
|
-
import { e as me } from "./effect-
|
|
16
|
+
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DGgUG7Qj.js";
|
|
17
|
+
import { i as de } from "./helper-B-GwBl7o.js";
|
|
18
|
+
import { u as pe, r as P } from "./reward-DdFCP398.js";
|
|
19
|
+
import "./index-DziwUgQ3.js";
|
|
20
|
+
import { C as ce } from "./campaign.fn-VlvF65nU.js";
|
|
21
|
+
import { e as me } from "./effect-BNoEad9s.js";
|
|
22
22
|
import { useRouter as ue } from "vue-router";
|
|
23
|
-
import { R as ye } from "./app-
|
|
23
|
+
import { R as ye } from "./app-B89lfub2.js";
|
|
24
24
|
const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ X({
|
|
25
25
|
__name: "EditRewardSheet",
|
|
26
26
|
emits: ["update"],
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ref as p, defineComponent as T, computed as x, resolveComponent as y, openBlock as U, createBlock as G, unref as e, isRef as $, withCtx as b, createElementVNode as v, createVNode as u, toDisplayString as j } from "vue";
|
|
2
|
-
import { u as B } from "./loading-
|
|
2
|
+
import { u as B } from "./loading-BfH5PK5q.js";
|
|
3
3
|
import { J as P } from "./JsonViewer-v8_C7l5N.js";
|
|
4
|
-
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DGgUG7Qj.js";
|
|
5
|
+
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-BhhdZbR2.js";
|
|
6
6
|
import { Z as L } from "./zod-Bg2FbC-D.js";
|
|
7
7
|
import { u as V } from "./app-wDQR6dpb.js";
|
|
8
8
|
import { defineStore as N } from "pinia";
|
|
9
|
-
import { r as k } from "./index-
|
|
10
|
-
import { c as E } from "./index-
|
|
11
|
-
import "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./plugins-
|
|
16
|
-
import { u as J } from "./vue-i18n-
|
|
9
|
+
import { r as k } from "./index-CJfbls_c.js";
|
|
10
|
+
import { c as E } from "./index-B1zeyOTK.js";
|
|
11
|
+
import "./index-DrNO2330.js";
|
|
12
|
+
import "./index-zetVbSGH.js";
|
|
13
|
+
import "./index-DDyqoK-5.js";
|
|
14
|
+
import "./index-DoLnZ0VU.js";
|
|
15
|
+
import "./plugins-0WrJ_ypd.js";
|
|
16
|
+
import { u as J } from "./vue-i18n-CeeBM23W.js";
|
|
17
17
|
import { c as C } from "./object-qECH92oz.js";
|
|
18
18
|
import { useDialog as Z } from "@feedmepos/ui-library";
|
|
19
19
|
const A = N("mf-connect-referral", () => {
|