@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-beta.81
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-C9JWdPcg.js +761 -0
- package/dist/{App-SRz4257n.js → App-BVEfQEjU.js} +441 -420
- package/dist/AuditLogs-qbqxB_Oz.js +1887 -0
- package/dist/Bin-DPfStHeL.js +166 -0
- package/dist/{Broadcast-DmkrJGp2.js → Broadcast-CrQZDeiZ.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CZXSxA9u.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Fpcw9NWs.js} +14 -10
- package/dist/Card-d7rnO53X.js +905 -0
- package/dist/Collections-5rEy2lvX.js +464 -0
- package/dist/{Credit-CcNrq9qk.js → Credit-CHyEsV7R.js} +36 -34
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CLqubY_R.js +2182 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js → EffectSheet.vue_vue_type_style_index_0_lang-DEmIYpS6.js} +49 -49
- package/dist/{Experience-DNsQLzDH.js → Experience-DhDLyUFN.js} +32 -30
- package/dist/FileSaver.min-NlMItPOc.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-CoOZBnN-.js +278 -0
- package/dist/Index-BxzvptzX.js +259 -0
- package/dist/Marketing-CwxJ5Upf.js +20071 -0
- package/dist/Member-D1SRjLZd.js +287 -0
- package/dist/MemberList-C-8mcfuk.js +1606 -0
- package/dist/MemberTransactions-C7uwJdn8.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-GCEQCVOt.js → MessageInput.vue_vue_type_script_setup_true_lang-ChQ3zuj7.js} +152 -137
- package/dist/Mission-CtF_zohU.js +296 -0
- package/dist/Overview-g9HqRUmv.js +1079 -0
- package/dist/{Point-Ck8EG_3k.js → Point-BrifiJTO.js} +55 -53
- package/dist/Promotion-D-VpO9Y1.js +289 -0
- package/dist/Queue-V6tLLO52.js +260 -0
- package/dist/Record-C_eSy9Pl.js +341 -0
- package/dist/Reward-BcS5W2o6.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-B_g46hrr.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CFvxrx8L.js +1728 -0
- package/dist/Segment-B7JtvneQ.js +880 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BX-E0sDn.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPByAnL2.js +188 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DE7ROhd5.js +147 -0
- package/dist/Setting-1KOQwRHn.js +1932 -0
- package/dist/Store-Dj84K8ZK.js +1842 -0
- package/dist/StoreRewards-7rXn3J0B.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D7zdyg9d.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D6T7vFXj.js} +1 -1
- package/dist/{Tier-CJ9-d8Zg.js → Tier-CwS_A8F5.js} +350 -334
- package/dist/{Title-DZCpvg4q.js → Title-YAj_vykl.js} +245 -222
- package/dist/{Transaction-DpnTxlbf.js → Transaction-CvbHHpIT.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CYXM679D.js +130 -0
- package/dist/Voucher-C0V9koK8.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DwfF_8uQ.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js → ZodTextField.vue_vue_type_script_setup_true_lang-D3mmtmvI.js} +1 -1
- package/dist/{app-DzAexOqx.js → app-D5BiHqr1.js} +2712 -1266
- package/dist/app-TANcLG-R.js +33357 -0
- package/dist/app.js +1 -1
- package/dist/business-DxNWLRXa.js +79 -0
- package/dist/{campaign-winsqufa.js → campaign-DhEbMRyc.js} +2 -2
- package/dist/campaign-DqFW5qoE.js +1810 -0
- package/dist/campaign.enum-DGpeHkL2.js +20 -0
- package/dist/campaign.fn-BqP9eKCL.js +758 -0
- package/dist/collectible.enum-CSFqER3H.js +19 -0
- package/dist/{collection.fn-CI5Llblg.js → collection.fn-CA112Q3U.js} +2 -2
- package/dist/dto-UeacqOxr.js +214 -0
- package/dist/{effect-CdkrIYgX.js → effect-CEB8v8KY.js} +33 -16
- package/dist/email-addresses-DLDeL77c.js +705 -0
- package/dist/{export-DGxfief1.js → export-B_8_zEGl.js} +5 -5
- package/dist/{helper-B8RqcTNu.js → helper-BN4JZQLv.js} +1 -1
- package/dist/index-B-O8sm9u.js +54 -0
- package/dist/index-B-WW-LtM.js +56 -0
- package/dist/index-BOQonmqm.js +32 -0
- package/dist/{index-9w43_U1v.js → index-CboHpXNN.js} +1506 -1480
- package/dist/{index-A34xEz20.js → index-CjJOf_Ko.js} +2246 -871
- package/dist/index-CsU66Lo8.js +115 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-Csb4GQq-.js +29556 -0
- package/dist/{index-wzdbEEcZ.js → index-Cv54KpqR.js} +1 -1
- package/dist/{index-Cw_aXFH6.js → index-D-9zLobO.js} +269 -173
- package/dist/{index-HZC9LLAX.js → index-DLEuoM6n.js} +48 -4
- package/dist/{index-CZgQVRsm.js → index-DX1pCi2M.js} +1 -1
- package/dist/{index-OzicErwL.js → index-Dtvx0B0f.js} +24 -21
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{loading-DuEFUCwF.js → index-wwxalEHE.js} +4609 -4886
- package/dist/{index.esm2017-CppSMh_U.js → index.esm2017-B8lg2TL9.js} +206 -206
- package/dist/loading-C7yV_Gjh.js +71 -0
- package/dist/{membership-nsMtWeTC.js → membership-DVqBNqdx.js} +80 -66
- package/dist/money-DlG5z_tl.js +15 -0
- package/dist/number-CEbwCzov.js +12 -0
- package/dist/objectid-Du3yg6Vv.js +145 -0
- package/dist/plugins-D_RKZlC6.js +208 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-Bv14VitO.js +36 -0
- package/dist/{rule-CPIMqt1h.js → rule-BR5ZUIKH.js} +185 -178
- package/dist/{rule-builder-CSs5XRKP.js → rule-builder-CITle0qo.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CJZoYavu.js → template-ybPO7TWN.js} +5 -5
- package/dist/trigger-5C6n0ORq.js +144 -0
- package/dist/user-CP3tloTS.js +54 -0
- package/dist/vue-i18n-DGew8_SZ.js +2365 -0
- package/dist/{xlsx-BZlnYinX.js → xlsx-CsBnmxHp.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-5QztrYSp.js +0 -622
- package/dist/Card-BsjFTVsH.js +0 -825
- package/dist/Collections-7wqZHOax.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js +0 -2813
- package/dist/Game-DlzDerT7.js +0 -255
- package/dist/Marketing-BqhpaG4o.js +0 -316
- package/dist/Member-AFgZcdtz.js +0 -69
- package/dist/MemberList-BKgrLz2C.js +0 -1733
- package/dist/MemberTransactions-BwT3zE2a.js +0 -38
- package/dist/Mission-BTAia7AS.js +0 -261
- package/dist/Promotion-0v3kvsK3.js +0 -247
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BkFm7tXq.js +0 -1753
- package/dist/Segment-BenLupqV.js +0 -437
- package/dist/Setting-0fpREqpJ.js +0 -1901
- package/dist/Store-BDGwe4ar.js +0 -1511
- package/dist/StoreRewards-TDZt9H1V.js +0 -401
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js +0 -890
- package/dist/Voucher-DsP_rh8I.js +0 -490
- package/dist/app-Cg2pTZJK.js +0 -53428
- package/dist/business-Cw_qGw8y.js +0 -78
- package/dist/dto-ozu1smC3.js +0 -2770
- package/dist/index-BLACZ3-L.js +0 -206
- package/dist/index-BaozRfWB.js +0 -762
- package/dist/index-CjVmULNd.js +0 -99
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DAEmawcj.js +0 -298
- package/dist/index-Oxr-mU6h.js +0 -29193
- package/dist/money-BGZPFtUc.js +0 -15
- package/dist/number-4J0xvXP9.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
- package/dist/vue-i18n-CCyiVzOE.js +0 -2365
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, ref as p, resolveComponent as _, openBlock as l, createElementBlock as d, createVNode as f, unref as e, createBlock as r, createCommentVNode as v } from "vue";
|
|
2
|
-
import { _ as b, a as k } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js";
|
|
3
|
-
import { useRouter as x } from "vue-router";
|
|
4
|
-
const C = { class: "flex flex-col gap-y-32 pb-24" }, N = /* @__PURE__ */ i({
|
|
5
|
-
__name: "MemberTransactions",
|
|
6
|
-
setup(T) {
|
|
7
|
-
const s = x(), t = [
|
|
8
|
-
{
|
|
9
|
-
label: "Collection",
|
|
10
|
-
value: "collection"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
label: "Store",
|
|
14
|
-
value: "store"
|
|
15
|
-
}
|
|
16
|
-
], o = p(t[0]), a = s.currentRoute.value.params.id;
|
|
17
|
-
return (y, n) => {
|
|
18
|
-
const u = _("FmTabs");
|
|
19
|
-
return l(), d("div", C, [
|
|
20
|
-
f(u, {
|
|
21
|
-
"model-value": e(o).value,
|
|
22
|
-
items: t,
|
|
23
|
-
"onUpdate:modelValue": n[0] || (n[0] = (c) => o.value = t.find((m) => m.value === c))
|
|
24
|
-
}, null, 8, ["model-value"]),
|
|
25
|
-
e(o).value == "collection" ? (l(), r(b, {
|
|
26
|
-
key: 0,
|
|
27
|
-
user: e(a)
|
|
28
|
-
}, null, 8, ["user"])) : e(o).value == "store" ? (l(), r(k, {
|
|
29
|
-
key: 1,
|
|
30
|
-
user: e(a)
|
|
31
|
-
}, null, 8, ["user"])) : v("", !0)
|
|
32
|
-
]);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
export {
|
|
37
|
-
N as default
|
|
38
|
-
};
|
package/dist/Mission-BTAia7AS.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, ref as V, computed as E, h as m, onMounted as A, resolveComponent as r, openBlock as d, createElementBlock as h, Fragment as b, createVNode as c, unref as t, createElementVNode as s, withCtx as w, renderList as H, createBlock as x, resolveDynamicComponent as q, toDisplayString as p } from "vue";
|
|
2
|
-
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as G, components as v } from "@feedmepos/ui-library";
|
|
4
|
-
import { a as J, p as Q, u as W } from "./loading-DuEFUCwF.js";
|
|
5
|
-
import { u as X } from "./business-Cw_qGw8y.js";
|
|
6
|
-
import { u as Y } from "./campaign-winsqufa.js";
|
|
7
|
-
import { g as L, b as M } from "./dto-ozu1smC3.js";
|
|
8
|
-
import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
9
|
-
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js";
|
|
10
|
-
import { u as oe } from "./template-CJZoYavu.js";
|
|
11
|
-
import { s as te } from "./index-CuvNtC_M.js";
|
|
12
|
-
import { u as ne } from "./vue-i18n-CCyiVzOE.js";
|
|
13
|
-
import { c as _ } from "./index-CjVmULNd.js";
|
|
14
|
-
const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, re = { 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" }, ge = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = /* @__PURE__ */ $({
|
|
15
|
-
__name: "Mission",
|
|
16
|
-
setup(_e) {
|
|
17
|
-
const { t: n } = ne(), B = {
|
|
18
|
-
label: n("connect.program.common.actions.create", {
|
|
19
|
-
type: n("connect.program.mission.title").toLowerCase()
|
|
20
|
-
}),
|
|
21
|
-
value: "create",
|
|
22
|
-
isPrimary: !0,
|
|
23
|
-
prependIcon: "add"
|
|
24
|
-
}, K = oe("MISSION", G()), N = X(), l = Y(), { global: P, minor: C } = W, i = V({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: null
|
|
27
|
-
}), u = E(
|
|
28
|
-
() => l.campaigns.mission.filter(
|
|
29
|
-
(e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
|
|
30
|
-
)
|
|
31
|
-
), R = [
|
|
32
|
-
{
|
|
33
|
-
header: n("connect.program.common.table.title"),
|
|
34
|
-
accessorKey: "name",
|
|
35
|
-
// accessorFn: (v) => v.name,
|
|
36
|
-
cell(e) {
|
|
37
|
-
return m("div", { class: "flex items-center justify-between gap-4" }, [
|
|
38
|
-
m("div", { class: "flex items-center" }, [
|
|
39
|
-
m(
|
|
40
|
-
v.FmTooltip,
|
|
41
|
-
{
|
|
42
|
-
content: e.row.original._id,
|
|
43
|
-
onClick: (o) => {
|
|
44
|
-
o.stopPropagation(), J(e.row.original._id);
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
[
|
|
48
|
-
m(v.FmIcon, {
|
|
49
|
-
name: "info",
|
|
50
|
-
outline: !0,
|
|
51
|
-
size: "sm"
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
)
|
|
55
|
-
]),
|
|
56
|
-
m("div", { class: "flex-1" }, e.row.original.name)
|
|
57
|
-
]);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
header: n("connect.campaign.mission.type"),
|
|
62
|
-
accessorFn: (e) => te(e.mission.type)
|
|
63
|
-
//v.effect,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
header: n("connect.program.common.table.status"),
|
|
67
|
-
cell(e) {
|
|
68
|
-
return L(e.row.original);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
header: n("connect.program.common.table.summary"),
|
|
73
|
-
accessorFn: (e) => M(e)
|
|
74
|
-
//v.effect,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
header: n("connect.campaign.mission.received"),
|
|
78
|
-
accessorFn: (e) => {
|
|
79
|
-
var o;
|
|
80
|
-
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
header: n("connect.program.common.table.actions"),
|
|
85
|
-
cell(e) {
|
|
86
|
-
return m(v.FmButton, {
|
|
87
|
-
variant: "tertiary",
|
|
88
|
-
icon: "delete",
|
|
89
|
-
iconColor: "neutral-gray-400",
|
|
90
|
-
onClick: (o) => {
|
|
91
|
-
o.stopPropagation(), F(e.row.original);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
], S = V();
|
|
97
|
-
async function F(e) {
|
|
98
|
-
await Q.remove(
|
|
99
|
-
n("connect.program.common.remove.confirm", { name: e.name })
|
|
100
|
-
) && await C(
|
|
101
|
-
async () => {
|
|
102
|
-
await _.delete(e._id), await l.read("MISSION");
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
message: n("connect.program.common.remove.removing", { name: e.name }),
|
|
106
|
-
successMessage: n("connect.program.common.remove.removed", {
|
|
107
|
-
name: e.name
|
|
108
|
-
})
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
async function y(e) {
|
|
113
|
-
e ? await o() : K.open(async (f) => {
|
|
114
|
-
await o(f);
|
|
115
|
-
});
|
|
116
|
-
async function o(f) {
|
|
117
|
-
var g;
|
|
118
|
-
(g = S.value) == null || g.showSheet(
|
|
119
|
-
!0,
|
|
120
|
-
"MISSION",
|
|
121
|
-
e ? await _.readById(e._id) : void 0,
|
|
122
|
-
f
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
async function T(e) {
|
|
127
|
-
await C(
|
|
128
|
-
async () => {
|
|
129
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await l.read("MISSION");
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
message: n(
|
|
133
|
-
e.campaign._id ? "connect.program.common.update.updating" : "connect.program.common.update.creating",
|
|
134
|
-
{ type: "Mission" }
|
|
135
|
-
),
|
|
136
|
-
successMessage: n("connect.program.common.update.success", {
|
|
137
|
-
type: "Mission",
|
|
138
|
-
action: e.campaign._id ? "updated" : "created"
|
|
139
|
-
})
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
return A(async () => {
|
|
144
|
-
await P(async () => {
|
|
145
|
-
await l.read("MISSION"), console.log(u);
|
|
146
|
-
});
|
|
147
|
-
}), (e, o) => {
|
|
148
|
-
const f = r("FmPageHead"), g = r("FmSearch"), O = r("FmTable"), k = r("FmButton"), j = r("FmListItem"), D = r("FmList"), U = r("FmCard");
|
|
149
|
-
return d(), h(b, null, [
|
|
150
|
-
c(f, {
|
|
151
|
-
title: t(n)("connect.campaign.mission.title"),
|
|
152
|
-
actions: t(u).length > 0 ? [B] : [],
|
|
153
|
-
"onClick:action": o[0] || (o[0] = () => y())
|
|
154
|
-
}, null, 8, ["title", "actions"]),
|
|
155
|
-
s("div", ae, [
|
|
156
|
-
c(g, {
|
|
157
|
-
modelValue: t(i).searchKey,
|
|
158
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
|
|
159
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
160
|
-
placeholder: t(n)("connect.program.common.search"),
|
|
161
|
-
collapsible: ""
|
|
162
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
163
|
-
t(l).campaigns.mission && t(l).campaigns.mission.length > 0 ? (d(), h(b, { key: 0 }, [
|
|
164
|
-
s("div", se, [
|
|
165
|
-
s("div", ie, [
|
|
166
|
-
c(Z, {
|
|
167
|
-
modelValue: t(i).location,
|
|
168
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
|
|
169
|
-
label: t(n)("connect.program.common.location"),
|
|
170
|
-
"show-item-label": !0,
|
|
171
|
-
icon: "storefront",
|
|
172
|
-
placement: "bottom-start",
|
|
173
|
-
items: t(N).locationItems
|
|
174
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
175
|
-
]),
|
|
176
|
-
c(g, {
|
|
177
|
-
modelValue: t(i).searchKey,
|
|
178
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
|
|
179
|
-
class: "xs:hidden",
|
|
180
|
-
placeholder: "search",
|
|
181
|
-
collapsible: ""
|
|
182
|
-
}, null, 8, ["modelValue"])
|
|
183
|
-
]),
|
|
184
|
-
c(O, {
|
|
185
|
-
class: "xs:hidden",
|
|
186
|
-
"row-data": t(u),
|
|
187
|
-
"column-defs": R,
|
|
188
|
-
"search-value": t(i).searchKey,
|
|
189
|
-
"column-filter": [],
|
|
190
|
-
onRowClick: o[4] || (o[4] = (a) => y(a.original)),
|
|
191
|
-
"hide-footer": t(u).length < 10
|
|
192
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
193
|
-
c(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
194
|
-
default: w(() => [
|
|
195
|
-
(d(!0), h(b, null, H(t(u).filter(
|
|
196
|
-
(a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
197
|
-
), (a) => (d(), x(j, {
|
|
198
|
-
key: a._id.toString(),
|
|
199
|
-
onClick: (I) => y(a),
|
|
200
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
201
|
-
}, {
|
|
202
|
-
default: w(() => [
|
|
203
|
-
s("div", ce, [
|
|
204
|
-
s("div", re, [
|
|
205
|
-
(d(), x(q(t(L)(a)))),
|
|
206
|
-
s("div", le, p(a.currentReceive ?? 0) + " used ", 1)
|
|
207
|
-
]),
|
|
208
|
-
s("div", me, [
|
|
209
|
-
s("div", de, p(a.name), 1),
|
|
210
|
-
s("div", pe, p(t(M)(a)), 1)
|
|
211
|
-
]),
|
|
212
|
-
s("div", ue, " Token received: " + p(a.currentReceive ?? 0), 1)
|
|
213
|
-
]),
|
|
214
|
-
c(k, {
|
|
215
|
-
icon: "delete",
|
|
216
|
-
"icon-color": "neutral-gray-400",
|
|
217
|
-
variant: "tertiary",
|
|
218
|
-
onClick: (I) => (I.stopPropagation(), F(a))
|
|
219
|
-
}, null, 8, ["onClick"])
|
|
220
|
-
]),
|
|
221
|
-
_: 2
|
|
222
|
-
}, 1032, ["onClick"]))), 128))
|
|
223
|
-
]),
|
|
224
|
-
_: 1
|
|
225
|
-
})
|
|
226
|
-
], 64)) : (d(), x(U, {
|
|
227
|
-
key: 1,
|
|
228
|
-
variant: "outlined",
|
|
229
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
230
|
-
}, {
|
|
231
|
-
default: w(() => [
|
|
232
|
-
o[6] || (o[6] = s("img", {
|
|
233
|
-
src: z,
|
|
234
|
-
class: "aspect-square w-[150px]"
|
|
235
|
-
}, null, -1)),
|
|
236
|
-
s("div", fe, [
|
|
237
|
-
s("div", ge, p(t(n)("connect.campaign.mission.createProgram")), 1),
|
|
238
|
-
s("div", ye, p(t(n)("connect.campaign.mission.description")), 1)
|
|
239
|
-
]),
|
|
240
|
-
c(k, {
|
|
241
|
-
variant: "primary",
|
|
242
|
-
label: t(n)("connect.campaign.mission.create"),
|
|
243
|
-
icon: "add",
|
|
244
|
-
onClick: o[5] || (o[5] = (a) => y())
|
|
245
|
-
}, null, 8, ["label"])
|
|
246
|
-
]),
|
|
247
|
-
_: 1
|
|
248
|
-
})),
|
|
249
|
-
c(ee, {
|
|
250
|
-
ref_key: "sheetRef",
|
|
251
|
-
ref: S,
|
|
252
|
-
"onSubmit:modelValue": T
|
|
253
|
-
}, null, 512)
|
|
254
|
-
])
|
|
255
|
-
], 64);
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
export {
|
|
260
|
-
Be as default
|
|
261
|
-
};
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as S, computed as q, h as z, onMounted as G, resolveComponent as l, openBlock as m, createElementBlock as h, Fragment as w, createVNode as r, unref as a, createElementVNode as s, withCtx as v, renderList as J, createBlock as b, resolveDynamicComponent as Q, toDisplayString as g } from "vue";
|
|
2
|
-
import { _ as W } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as X, components as Y } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as O, p as I, u as Z } from "./loading-DuEFUCwF.js";
|
|
5
|
-
import { u as ee } from "./business-Cw_qGw8y.js";
|
|
6
|
-
import { u as oe } from "./campaign-winsqufa.js";
|
|
7
|
-
import { u as te } from "./vue-i18n-CCyiVzOE.js";
|
|
8
|
-
import { g as V } from "./dto-ozu1smC3.js";
|
|
9
|
-
import { e as L } from "./effect-CdkrIYgX.js";
|
|
10
|
-
import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
11
|
-
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js";
|
|
12
|
-
import { u as se } from "./template-CJZoYavu.js";
|
|
13
|
-
import { c as u } from "./index-CjVmULNd.js";
|
|
14
|
-
const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, pe = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, 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" }, Le = /* @__PURE__ */ H({
|
|
15
|
-
__name: "Promotion",
|
|
16
|
-
setup(_e) {
|
|
17
|
-
const { t } = te(), T = {
|
|
18
|
-
label: t("connect.promotion.createCampaign"),
|
|
19
|
-
value: "create",
|
|
20
|
-
isPrimary: !0,
|
|
21
|
-
prependIcon: "add"
|
|
22
|
-
}, B = {
|
|
23
|
-
label: "Force sync",
|
|
24
|
-
value: "sync",
|
|
25
|
-
isPrimary: !1,
|
|
26
|
-
prependIcon: "refresh"
|
|
27
|
-
}, M = se("PROMOTION", X()), x = ee(), f = oe(), { global: R, minor: _ } = Z, i = S({
|
|
28
|
-
searchKey: "",
|
|
29
|
-
location: null
|
|
30
|
-
}), c = q(
|
|
31
|
-
() => f.campaigns.promotion.filter(
|
|
32
|
-
(e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
|
|
33
|
-
)
|
|
34
|
-
), K = [
|
|
35
|
-
{
|
|
36
|
-
header: t("connect.promotion.promotionTitle"),
|
|
37
|
-
accessorFn: (e) => e.name
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
header: t("connect.promotion.status"),
|
|
41
|
-
cell(e) {
|
|
42
|
-
return V(e.row.original);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
header: t("connect.promotion.type"),
|
|
47
|
-
accessorFn: (e) => `${O.title(e.effect.options.target)} promotion`
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
header: t("connect.promotion.summary"),
|
|
51
|
-
accessorFn: (e) => L(e.effect)
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
header: t("connect.promotion.actions"),
|
|
55
|
-
cell(e) {
|
|
56
|
-
return z(Y.FmButton, {
|
|
57
|
-
variant: "tertiary",
|
|
58
|
-
icon: "delete",
|
|
59
|
-
iconColor: "neutral-gray-400",
|
|
60
|
-
onClick: (n) => {
|
|
61
|
-
n.stopPropagation(), F(e.row.original);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
], C = S();
|
|
67
|
-
async function F(e) {
|
|
68
|
-
await I.remove(t("promotion.confirmRemove", { name: e.name })) && await _(
|
|
69
|
-
async () => {
|
|
70
|
-
await u.delete(e._id), await f.read("PROMOTION");
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
message: t("promotion.removing", { name: e.name }),
|
|
74
|
-
successMessage: t("promotion.removedSuccessfully", { name: e.name })
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
async function y(e) {
|
|
79
|
-
e ? await n() : M.open(async (p) => {
|
|
80
|
-
await n(p);
|
|
81
|
-
});
|
|
82
|
-
async function n(p) {
|
|
83
|
-
var d;
|
|
84
|
-
(d = C.value) == null || d.showSheet(
|
|
85
|
-
!0,
|
|
86
|
-
"PROMOTION",
|
|
87
|
-
e ? await u.readById(e._id) : void 0,
|
|
88
|
-
p
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
async function N(e) {
|
|
93
|
-
await _(
|
|
94
|
-
async () => {
|
|
95
|
-
e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await f.read("PROMOTION");
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
message: t(e.campaign._id ? "promotion.updating" : "promotion.creating"),
|
|
99
|
-
successMessage: t(
|
|
100
|
-
e.campaign._id ? "promotion.updatedSuccessfully" : "promotion.createdSuccessfully"
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
async function A(e) {
|
|
106
|
-
switch (e) {
|
|
107
|
-
case "create":
|
|
108
|
-
y();
|
|
109
|
-
break;
|
|
110
|
-
case "sync":
|
|
111
|
-
await I.confirm(
|
|
112
|
-
"Are you sure you want to synchronize all promotions to POS?",
|
|
113
|
-
"Force sync"
|
|
114
|
-
) && _(
|
|
115
|
-
async () => {
|
|
116
|
-
await u.syncAllPromotion();
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
message: "Syncing promotions...",
|
|
120
|
-
successMessage: "All promotions synced"
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return G(async () => {
|
|
127
|
-
await R(async () => {
|
|
128
|
-
await x.readLocations(), await f.read("PROMOTION");
|
|
129
|
-
});
|
|
130
|
-
}), (e, n) => {
|
|
131
|
-
const p = l("FmPageHead"), d = l("FmSearch"), $ = l("FmTable"), D = l("FmChip"), k = l("FmButton"), U = l("FmListItem"), j = l("FmList"), E = l("FmCard");
|
|
132
|
-
return m(), h(w, null, [
|
|
133
|
-
r(p, {
|
|
134
|
-
title: a(t)("connect.promotion.title"),
|
|
135
|
-
actions: a(c).length > 0 ? [T, B] : [],
|
|
136
|
-
"onClick:action": A
|
|
137
|
-
}, null, 8, ["title", "actions"]),
|
|
138
|
-
s("div", ie, [
|
|
139
|
-
r(d, {
|
|
140
|
-
modelValue: i.value.searchKey,
|
|
141
|
-
"onUpdate:modelValue": n[0] || (n[0] = (o) => i.value.searchKey = o),
|
|
142
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
143
|
-
placeholder: a(t)("connect.promotion.search"),
|
|
144
|
-
collapsible: ""
|
|
145
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
146
|
-
a(c) && a(c).length > 0 ? (m(), h(w, { key: 0 }, [
|
|
147
|
-
s("div", re, [
|
|
148
|
-
s("div", le, [
|
|
149
|
-
r(ne, {
|
|
150
|
-
modelValue: i.value.location,
|
|
151
|
-
"onUpdate:modelValue": n[1] || (n[1] = (o) => i.value.location = o),
|
|
152
|
-
label: a(t)("connect.promotion.location"),
|
|
153
|
-
"show-item-label": !0,
|
|
154
|
-
icon: "storefront",
|
|
155
|
-
placement: "bottom-start",
|
|
156
|
-
items: a(x).locationItems
|
|
157
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
158
|
-
]),
|
|
159
|
-
r(d, {
|
|
160
|
-
modelValue: i.value.searchKey,
|
|
161
|
-
"onUpdate:modelValue": n[2] || (n[2] = (o) => i.value.searchKey = o),
|
|
162
|
-
class: "xs:hidden",
|
|
163
|
-
placeholder: "search",
|
|
164
|
-
collapsible: ""
|
|
165
|
-
}, null, 8, ["modelValue"])
|
|
166
|
-
]),
|
|
167
|
-
r($, {
|
|
168
|
-
class: "xs:hidden",
|
|
169
|
-
"row-data": a(c),
|
|
170
|
-
"column-defs": K,
|
|
171
|
-
"search-value": i.value.searchKey,
|
|
172
|
-
"column-filter": [],
|
|
173
|
-
onRowClick: n[3] || (n[3] = (o) => y(o.original)),
|
|
174
|
-
"hide-footer": a(c).length < 10
|
|
175
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
176
|
-
r(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
177
|
-
default: v(() => [
|
|
178
|
-
(m(!0), h(w, null, J(a(c).filter(
|
|
179
|
-
(o) => o.name.toLowerCase().includes(i.value.searchKey.toLowerCase())
|
|
180
|
-
), (o) => (m(), b(U, {
|
|
181
|
-
key: o._id.toString(),
|
|
182
|
-
onClick: (P) => y(o),
|
|
183
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
184
|
-
}, {
|
|
185
|
-
default: v(() => [
|
|
186
|
-
s("div", ce, [
|
|
187
|
-
s("div", me, [
|
|
188
|
-
(m(), b(Q(a(V)(o)))),
|
|
189
|
-
r(D, {
|
|
190
|
-
class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
191
|
-
compact: !0,
|
|
192
|
-
label: `${a(O).title(o.effect.options.target)} promotion`
|
|
193
|
-
}, null, 8, ["label"])
|
|
194
|
-
]),
|
|
195
|
-
s("div", pe, [
|
|
196
|
-
s("div", de, g(o.name), 1),
|
|
197
|
-
s("div", ue, g(a(L)(o.effect)), 1)
|
|
198
|
-
])
|
|
199
|
-
]),
|
|
200
|
-
r(k, {
|
|
201
|
-
icon: "delete",
|
|
202
|
-
"icon-color": "neutral-gray-400",
|
|
203
|
-
variant: "tertiary",
|
|
204
|
-
onClick: (P) => (P.stopPropagation(), F(o))
|
|
205
|
-
}, null, 8, ["onClick"])
|
|
206
|
-
]),
|
|
207
|
-
_: 2
|
|
208
|
-
}, 1032, ["onClick"]))), 128))
|
|
209
|
-
]),
|
|
210
|
-
_: 1
|
|
211
|
-
})
|
|
212
|
-
], 64)) : (m(), b(E, {
|
|
213
|
-
key: 1,
|
|
214
|
-
variant: "outlined",
|
|
215
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
216
|
-
}, {
|
|
217
|
-
default: v(() => [
|
|
218
|
-
n[5] || (n[5] = s("img", {
|
|
219
|
-
src: W,
|
|
220
|
-
class: "aspect-square w-[150px]"
|
|
221
|
-
}, null, -1)),
|
|
222
|
-
s("div", fe, [
|
|
223
|
-
s("div", ye, g(a(t)("connect.promotion.createPromotionCampaign")), 1),
|
|
224
|
-
s("div", ge, g(a(t)("connect.promotion.description")), 1)
|
|
225
|
-
]),
|
|
226
|
-
r(k, {
|
|
227
|
-
variant: "primary",
|
|
228
|
-
label: a(t)("connect.promotion.createPromotionCampaign"),
|
|
229
|
-
icon: "add",
|
|
230
|
-
onClick: n[4] || (n[4] = (o) => y())
|
|
231
|
-
}, null, 8, ["label"])
|
|
232
|
-
]),
|
|
233
|
-
_: 1
|
|
234
|
-
}))
|
|
235
|
-
]),
|
|
236
|
-
r(ae, {
|
|
237
|
-
ref_key: "sheetRef",
|
|
238
|
-
ref: C,
|
|
239
|
-
"onSubmit:modelValue": N
|
|
240
|
-
}, null, 512)
|
|
241
|
-
], 64);
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
export {
|
|
246
|
-
Le as default
|
|
247
|
-
};
|