@feedmepos/mf-connect 0.1.98-beta.39 → 0.1.98-beta.40
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/package.json +1 -1
- package/dist/App-DwjQisFZ.js +0 -4785
- package/dist/AuditLogs-DMGqmriL.js +0 -2014
- package/dist/Bin-4wvIqogM.js +0 -166
- package/dist/Broadcast-DPpuSZ8_.js +0 -269
- package/dist/CampaignAnalytic-CXFDo2X_.js +0 -1826
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-SLoy1-Kd.js +0 -122
- package/dist/Card-C8SA6un0.js +0 -911
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-BCpSiM_4.js +0 -541
- package/dist/Credit-C8RTBpP7.js +0 -286
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js +0 -3382
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CJTduNh3.js +0 -351
- package/dist/Experience-Bg3kFQQE.js +0 -285
- package/dist/FileSaver.min-DMUuMi9w.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +0 -52
- package/dist/Game-D3DbkRUj.js +0 -356
- package/dist/GiftCardSetup-CxlMM4up.js +0 -542
- package/dist/Grab-DvEK8ixP.js +0 -301
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BBK-UrEe.js +0 -145
- package/dist/Index-Do_9DXuY.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BKPGBYiU.js +0 -48
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-D6wJN9Gj.js +0 -18737
- package/dist/LoyaltyDashboard-B4WqycGN.js +0 -1345
- package/dist/MainLayout-DdxLaufS.js +0 -143
- package/dist/Marketing-CcFEMwKB.js +0 -236
- package/dist/MarketingMaterialEdit-DoYFaMf7.js +0 -1036
- package/dist/Member-BussgBln.js +0 -281
- package/dist/MemberList-BXJxSsjo.js +0 -1603
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-O-XY5nz3.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DsxrIO0r.js +0 -60957
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +0 -38
- package/dist/Mission-CPkM-8Ns.js +0 -360
- package/dist/Overview-BJjpYUJN.js +0 -1080
- package/dist/Overview-C5KF_Jxj.js +0 -1316
- package/dist/Point-FDFwR3Hk.js +0 -288
- package/dist/Promotion-qtucKxn0.js +0 -423
- package/dist/Queue-d91tocPX.js +0 -261
- package/dist/Record-CvkK2iLq.js +0 -342
- package/dist/Review-C_zLGtzU.js +0 -45
- package/dist/ReviewFacebookCallback-Bidg3P76.js +0 -238
- package/dist/ReviewGoogleCallback-DL0lxMBL.js +0 -213
- package/dist/Reward-BTsQaI-J.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BjxA4eMX.js +0 -150
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D4NIDc-C.js +0 -1913
- package/dist/Segment-BgFyB3BK.js +0 -1017
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CkhjFNvZ.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-HYbRyACe.js +0 -189
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-7dv3cAW3.js +0 -226
- package/dist/Setting-BxHoCSxw.js +0 -2047
- package/dist/SettingAdvertisements-WfvuE4fA.js +0 -264
- package/dist/Settings-B42SAvEx.js +0 -179
- package/dist/Store-BnvWfCy-.js +0 -2413
- package/dist/StoreRewards-BRzAMqR-.js +0 -540
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C3FJr1L5.js +0 -1075
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-UZYzUcif.js +0 -7007
- package/dist/Tier-BrzLNat2.js +0 -972
- package/dist/Title-EnlaNXld.js +0 -569
- package/dist/Transaction-BiXNxUGX.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Db5_DKQ0.js +0 -130
- package/dist/Voucher-C2dyk-jj.js +0 -444
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DPE24a-J.js +0 -421
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CI1HM9HA.js +0 -56
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-Bt8HrAEr.js +0 -60740
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -7
- package/dist/business-BwtQpfUr.js +0 -82
- package/dist/campaign-B6U9lwKi.js +0 -255
- package/dist/campaign-C6Cb9s3C.js +0 -100
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign.enum-Dx-Zo68Q.js +0 -26
- package/dist/campaign.fn-B0x2EGhw.js +0 -776
- package/dist/collectible.enum-Liy2wH3s.js +0 -19
- package/dist/collection.fn-DfoA9sJV.js +0 -26
- package/dist/duplicateCampaign-Cnq5N-V8.js +0 -51
- package/dist/effect-B2REbrv8.js +0 -89
- package/dist/email-addresses-BzmOsxLn.js +0 -705
- package/dist/export-jHpRhPQu.js +0 -97
- package/dist/feedme.ico +0 -0
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/helper-DQAHX1kX.js +0 -86
- package/dist/index-4GG-yjdN.js +0 -2963
- package/dist/index-BWgMbKOB.js +0 -85
- package/dist/index-BccUpf0U.js +0 -3
- package/dist/index-BkgkJkVs.js +0 -8919
- package/dist/index-C0PKVTf9.js +0 -32
- package/dist/index-C8cXXcLk.js +0 -45
- package/dist/index-CTTGf4TM.js +0 -151
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DJN4auwx.js +0 -146
- package/dist/index-DMr9ohGV.js +0 -1139
- package/dist/index-DQTo_ytu.js +0 -31
- package/dist/index-DW7-0rf_.js +0 -53
- package/dist/index-Da7J83jM.js +0 -2706
- package/dist/index-Di1Z4vLS.js +0 -27550
- package/dist/index-FoKZGh7Z.js +0 -67
- package/dist/index-N25Px7RQ.js +0 -72
- package/dist/index-PgblELTo.js +0 -897
- package/dist/index-STBMTK1u.js +0 -28900
- package/dist/index-hP3Mgc0u.js +0 -55
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-DV56jzfJ.js +0 -3069
- package/dist/loading-D__sDcq1.js +0 -72
- package/dist/lodash-DgkDIHoV.js +0 -3678
- package/dist/membership-CBjt1MGx.js +0 -255
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-BFUbPKDM.js +0 -15
- package/dist/number-CJb8OUa3.js +0 -12
- package/dist/object-BYyQ0PZp.js +0 -18
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-BMUFNR9T.js +0 -145
- package/dist/plugins-D95ZeD-9.js +0 -1788
- package/dist/remy-Qz_pNsUS.js +0 -13
- package/dist/reward-CSfV_XFK.js +0 -36
- package/dist/rule-DIzVHy2z.js +0 -1969
- package/dist/rule-builder-DF7fCvec.js +0 -126
- package/dist/string-Gcy5IM_H.js +0 -32
- package/dist/style.css +0 -4
- package/dist/template-r3lAQP1B.js +0 -188
- package/dist/tier-BJDhpH6X.js +0 -4
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-D40qRUoz.js +0 -20
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/transaction.fn-DV-cpfOj.js +0 -64
- package/dist/trigger-BEJaSv5R.js +0 -213
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/useMarketingMaterialActions-Bd5BDfE1.js +0 -96
- package/dist/usePagination-DLIo76-X.js +0 -220
- package/dist/user-DtEjuhyM.js +0 -55
- package/dist/vue-i18n-dQ1XCaUv.js +0 -2365
- package/dist/xlsx-BUMZsTov.js +0 -15491
- package/dist/zod-B_pVZhsV.js +0 -91
package/dist/Bin-4wvIqogM.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, ref as c, h as s, onMounted as x, resolveComponent as d, openBlock as S, createElementBlock as B, Fragment as M, createVNode as l, unref as o, createElementVNode as u } from "vue";
|
|
2
|
-
import { components as p } from "@feedmepos/ui-library";
|
|
3
|
-
import { u as K } from "./loading-D__sDcq1.js";
|
|
4
|
-
import { u as R } from "./business-BwtQpfUr.js";
|
|
5
|
-
import { C as A } from "./campaign-B6U9lwKi.js";
|
|
6
|
-
import { _ as P } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js";
|
|
7
|
-
import { _ as U } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
8
|
-
import { _ as Y } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-7dv3cAW3.js";
|
|
9
|
-
import { u as D } from "./vue-i18n-dQ1XCaUv.js";
|
|
10
|
-
import { h as E } from "./moment-D7p2TMB-.js";
|
|
11
|
-
import { p as I } from "./plugins-D95ZeD-9.js";
|
|
12
|
-
import { c as g } from "./index-DJN4auwx.js";
|
|
13
|
-
const T = { class: "px-24 flex flex-col gap-y-16" }, $ = { class: "flex items-center justify-between w-full" }, j = { class: "flex gap-8 overflow-x-auto" }, oe = /* @__PURE__ */ C({
|
|
14
|
-
__name: "Bin",
|
|
15
|
-
setup(H) {
|
|
16
|
-
const { t: n } = D(), y = R(), { global: _, minor: b } = K, a = c({
|
|
17
|
-
searchKey: "",
|
|
18
|
-
location: null
|
|
19
|
-
}), m = c([]), w = [
|
|
20
|
-
{
|
|
21
|
-
header: n("connect.campaign.common.title"),
|
|
22
|
-
accessorFn: (e) => e.name
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
header: n("connect.campaign.common.campaignType"),
|
|
26
|
-
cell(e) {
|
|
27
|
-
return A[e.row.original.type].chip();
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
header: n("connect.campaign.common.deletedAt"),
|
|
32
|
-
cell(e) {
|
|
33
|
-
return E(e.row.original.deletedAt).format("D MMM YYYY, hh:mmA");
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
header: n("connect.voucher.actions"),
|
|
38
|
-
cell(e) {
|
|
39
|
-
return s("div", { class: "flex items-center justify-end" }, [
|
|
40
|
-
s(
|
|
41
|
-
p.FmMenu,
|
|
42
|
-
{
|
|
43
|
-
placement: "bottom-end",
|
|
44
|
-
onClick: (t) => {
|
|
45
|
-
t.stopPropagation();
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"menu-button": () => s(p.FmButton, {
|
|
50
|
-
icon: "more_vert",
|
|
51
|
-
iconColor: "neutral-gray-400",
|
|
52
|
-
variant: "tertiary"
|
|
53
|
-
}),
|
|
54
|
-
default: () => [
|
|
55
|
-
s(
|
|
56
|
-
p.FmMenuItem,
|
|
57
|
-
{
|
|
58
|
-
icon: "restore",
|
|
59
|
-
onClick: async (i) => {
|
|
60
|
-
i.stopPropagation(), F(e.row.original);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
label: s(
|
|
65
|
-
"div",
|
|
66
|
-
{
|
|
67
|
-
class: "fm-typo-en-body-md-400"
|
|
68
|
-
},
|
|
69
|
-
n("connect.campaign.common.actions.restore")
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
]);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
], v = c(), V = c();
|
|
80
|
-
async function F(e) {
|
|
81
|
-
await I.confirm(
|
|
82
|
-
n("connect.campaign.common.restore.confirm", { name: e.name })
|
|
83
|
-
) && await b(
|
|
84
|
-
async () => {
|
|
85
|
-
await g.restore(e._id), await f();
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
message: n("connect.campaign.common.restore.restoring", { name: e.name }),
|
|
89
|
-
successMessage: n("connect.campaign.common.restore.restored", {
|
|
90
|
-
name: e.name
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
async function f() {
|
|
96
|
-
const e = await g.readAllDeleted({
|
|
97
|
-
limit: 1e3,
|
|
98
|
-
skip: 0,
|
|
99
|
-
sortBy: "_id",
|
|
100
|
-
descending: !0
|
|
101
|
-
});
|
|
102
|
-
m.value = e.resources;
|
|
103
|
-
}
|
|
104
|
-
return x(async () => {
|
|
105
|
-
await _(async () => {
|
|
106
|
-
await f();
|
|
107
|
-
});
|
|
108
|
-
}), (e, t) => {
|
|
109
|
-
const i = d("FmPageHead"), h = d("FmSearch"), k = d("FmTable");
|
|
110
|
-
return S(), B(M, null, [
|
|
111
|
-
l(i, {
|
|
112
|
-
title: o(n)("connect.bin.title")
|
|
113
|
-
}, null, 8, ["title"]),
|
|
114
|
-
u("div", T, [
|
|
115
|
-
l(h, {
|
|
116
|
-
modelValue: o(a).searchKey,
|
|
117
|
-
"onUpdate:modelValue": t[0] || (t[0] = (r) => o(a).searchKey = r),
|
|
118
|
-
class: "hidden xs:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
119
|
-
placeholder: o(n)("connect.voucher.search"),
|
|
120
|
-
collapsible: ""
|
|
121
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
122
|
-
u("div", $, [
|
|
123
|
-
u("div", j, [
|
|
124
|
-
l(U, {
|
|
125
|
-
modelValue: o(a).location,
|
|
126
|
-
"onUpdate:modelValue": t[1] || (t[1] = (r) => o(a).location = r),
|
|
127
|
-
label: o(n)("connect.voucher.location"),
|
|
128
|
-
"show-item-label": !0,
|
|
129
|
-
icon: "storefront",
|
|
130
|
-
placement: "bottom-start",
|
|
131
|
-
items: o(y).locationItems
|
|
132
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
133
|
-
]),
|
|
134
|
-
l(h, {
|
|
135
|
-
modelValue: o(a).searchKey,
|
|
136
|
-
"onUpdate:modelValue": t[2] || (t[2] = (r) => o(a).searchKey = r),
|
|
137
|
-
class: "xs:hidden",
|
|
138
|
-
placeholder: o(n)("connect.voucher.search"),
|
|
139
|
-
collapsible: ""
|
|
140
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
141
|
-
]),
|
|
142
|
-
l(k, {
|
|
143
|
-
"row-data": o(m),
|
|
144
|
-
"column-defs": w,
|
|
145
|
-
"search-value": o(a).searchKey,
|
|
146
|
-
"column-filter": [],
|
|
147
|
-
onRowClick: t[3] || (t[3] = (r) => e.onEdit(r.original)),
|
|
148
|
-
"hide-footer": o(m).length < 10
|
|
149
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
150
|
-
l(P, {
|
|
151
|
-
ref_key: "sheetRef",
|
|
152
|
-
ref: v,
|
|
153
|
-
"onSubmit:modelValue": e.onUpdate
|
|
154
|
-
}, null, 8, ["onSubmit:modelValue"]),
|
|
155
|
-
l(Y, {
|
|
156
|
-
ref_key: "sendVoucherSheetRef",
|
|
157
|
-
ref: V
|
|
158
|
-
}, null, 512)
|
|
159
|
-
])
|
|
160
|
-
], 64);
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
export {
|
|
165
|
-
oe as default
|
|
166
|
-
};
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as C, computed as q, onMounted as z, resolveComponent as m, openBlock as d, createElementBlock as h, Fragment as v, createVNode as i, unref as a, createElementVNode as n, withCtx as x, renderList as G, createBlock as S, resolveDynamicComponent as J, toDisplayString as u, createCommentVNode as Q, h as k } from "vue";
|
|
2
|
-
import { _ as W } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as X, components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as Y } from "./plugins-D95ZeD-9.js";
|
|
5
|
-
import { u as Z } from "./loading-D__sDcq1.js";
|
|
6
|
-
import { u as ee } from "./business-BwtQpfUr.js";
|
|
7
|
-
import { u as te } from "./campaign-C6Cb9s3C.js";
|
|
8
|
-
import { b as V, c as R, a as ae } from "./campaign-B6U9lwKi.js";
|
|
9
|
-
import { c as oe, p as ne } from "./duplicateCampaign-Cnq5N-V8.js";
|
|
10
|
-
import { u as se } from "./vue-i18n-dQ1XCaUv.js";
|
|
11
|
-
import { _ as ce } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
12
|
-
import { _ as ie } from "./MessageInput.vue_vue_type_script_setup_true_lang-DsxrIO0r.js";
|
|
13
|
-
import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0OI5QzpR.js";
|
|
14
|
-
import { u as le } from "./template-r3lAQP1B.js";
|
|
15
|
-
import { c as f } from "./index-DJN4auwx.js";
|
|
16
|
-
const me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "flex items-center gap-8" }, be = { key: 0 }, Ce = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, ve = { class: "flex flex-col gap-16 text-center" }, xe = { class: "fm-typo-en-title-sm-800" }, Se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ H({
|
|
17
|
-
__name: "Broadcast",
|
|
18
|
-
setup(ke) {
|
|
19
|
-
const { t: s } = se(), O = {
|
|
20
|
-
label: s("connect.campaign.common.createCampaign"),
|
|
21
|
-
value: "create",
|
|
22
|
-
isPrimary: !0,
|
|
23
|
-
prependIcon: "add"
|
|
24
|
-
}, T = le("BROADCAST", X()), I = ee(), p = te(), { global: K, minor: F } = Z, B = C((/* @__PURE__ */ new Date()).toISOString()), r = C({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: []
|
|
27
|
-
});
|
|
28
|
-
function P(e) {
|
|
29
|
-
const t = r.value.location;
|
|
30
|
-
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
31
|
-
var c;
|
|
32
|
-
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
-
}) : e.targetLocation.includes(t);
|
|
34
|
-
}
|
|
35
|
-
const g = q(
|
|
36
|
-
() => p.campaigns.broadcast.filter((e) => P(e))
|
|
37
|
-
), $ = [
|
|
38
|
-
{
|
|
39
|
-
header: "Broadcast title",
|
|
40
|
-
accessorFn: (e) => e.name
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
header: "Status",
|
|
44
|
-
accessorFn: (e) => ae(e),
|
|
45
|
-
cell(e) {
|
|
46
|
-
return V(e.row.original);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
header: "Summary",
|
|
51
|
-
accessorFn: (e) => R(e)
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
header: "Message sent",
|
|
55
|
-
accessorFn: (e) => e.currentReceive ?? "N/A"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
header: "Actions",
|
|
59
|
-
cell(e) {
|
|
60
|
-
return k("div", { class: "flex items-center gap-8 justify-end" }, [
|
|
61
|
-
k(L.FmButton, {
|
|
62
|
-
variant: "tertiary",
|
|
63
|
-
icon: "content_copy",
|
|
64
|
-
iconColor: "neutral-gray-400",
|
|
65
|
-
onClick: async (t) => {
|
|
66
|
-
t.stopPropagation(), await D(e.row.original);
|
|
67
|
-
}
|
|
68
|
-
}),
|
|
69
|
-
k(L.FmButton, {
|
|
70
|
-
variant: "tertiary",
|
|
71
|
-
icon: "delete",
|
|
72
|
-
iconColor: "neutral-gray-400",
|
|
73
|
-
onClick: (t) => {
|
|
74
|
-
t.stopPropagation(), A(e.row.original);
|
|
75
|
-
}
|
|
76
|
-
})
|
|
77
|
-
]);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
], w = C();
|
|
81
|
-
async function A(e) {
|
|
82
|
-
await Y.remove(
|
|
83
|
-
s("connect.campaign.common.remove.confirm", { name: e.name })
|
|
84
|
-
) && await F(
|
|
85
|
-
async () => {
|
|
86
|
-
await f.delete(e._id), await p.read("BROADCAST");
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
message: s("connect.campaign.common.remove.removing", { name: e.name }),
|
|
90
|
-
successMessage: s("connect.campaign.common.remove.removed", {
|
|
91
|
-
name: e.name
|
|
92
|
-
})
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
async function y(e) {
|
|
97
|
-
B.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await t() : T.open(async (l) => {
|
|
98
|
-
await t(l);
|
|
99
|
-
});
|
|
100
|
-
async function t(l) {
|
|
101
|
-
var c;
|
|
102
|
-
(c = w.value) == null || c.showSheet(
|
|
103
|
-
!0,
|
|
104
|
-
"BROADCAST",
|
|
105
|
-
e ? await f.readById(e._id) : void 0,
|
|
106
|
-
l
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
async function D(e) {
|
|
111
|
-
var c;
|
|
112
|
-
if (!await oe(e.name))
|
|
113
|
-
return;
|
|
114
|
-
B.value = (/* @__PURE__ */ new Date()).toISOString();
|
|
115
|
-
const t = await f.readById(e._id), l = ne(t);
|
|
116
|
-
(c = w.value) == null || c.showSheet(
|
|
117
|
-
!0,
|
|
118
|
-
"BROADCAST",
|
|
119
|
-
l,
|
|
120
|
-
t.template
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
async function j(e) {
|
|
124
|
-
await F(
|
|
125
|
-
async () => {
|
|
126
|
-
e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("BROADCAST");
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
message: s(
|
|
130
|
-
`connect.campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
|
|
131
|
-
),
|
|
132
|
-
successMessage: s("connect.campaign.broadcast.update.success", {
|
|
133
|
-
action: e.campaign._id ? "updated" : "created"
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
return z(async () => {
|
|
139
|
-
await K(async () => {
|
|
140
|
-
await p.read("BROADCAST");
|
|
141
|
-
});
|
|
142
|
-
}), (e, t) => {
|
|
143
|
-
const l = m("FmPageHead"), c = m("FmSearch"), M = m("FmTable"), b = m("FmButton"), N = m("FmListItem"), U = m("FmList"), E = m("FmCard");
|
|
144
|
-
return d(), h(v, null, [
|
|
145
|
-
i(l, {
|
|
146
|
-
title: a(s)("connect.campaign.broadcast.title"),
|
|
147
|
-
actions: a(g).length > 0 ? [O] : [],
|
|
148
|
-
"onClick:action": t[0] || (t[0] = () => y())
|
|
149
|
-
}, null, 8, ["title", "actions"]),
|
|
150
|
-
n("div", me, [
|
|
151
|
-
i(ie),
|
|
152
|
-
i(c, {
|
|
153
|
-
modelValue: a(r).searchKey,
|
|
154
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => a(r).searchKey = o),
|
|
155
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
156
|
-
placeholder: a(s)("connect.campaign.common.search"),
|
|
157
|
-
collapsible: ""
|
|
158
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
159
|
-
a(p).campaigns.broadcast && a(p).campaigns.broadcast.length > 0 ? (d(), h(v, { key: 0 }, [
|
|
160
|
-
n("div", de, [
|
|
161
|
-
n("div", pe, [
|
|
162
|
-
i(ce, {
|
|
163
|
-
label: `${a(s)("connect.campaign.common.location")}: `,
|
|
164
|
-
"right-icon": "keyboard_arrow_down",
|
|
165
|
-
modelValue: a(r).location,
|
|
166
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => a(r).location = o),
|
|
167
|
-
icon: "storefront",
|
|
168
|
-
"show-item-label": !0,
|
|
169
|
-
items: a(I).locationOptions
|
|
170
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
171
|
-
]),
|
|
172
|
-
i(c, {
|
|
173
|
-
modelValue: a(r).searchKey,
|
|
174
|
-
"onUpdate:modelValue": t[3] || (t[3] = (o) => a(r).searchKey = o),
|
|
175
|
-
class: "xs:hidden sm:hidden",
|
|
176
|
-
placeholder: "search",
|
|
177
|
-
collapsible: ""
|
|
178
|
-
}, null, 8, ["modelValue"])
|
|
179
|
-
]),
|
|
180
|
-
i(M, {
|
|
181
|
-
class: "xs:hidden sm:hidden",
|
|
182
|
-
"row-data": a(g),
|
|
183
|
-
"column-defs": $,
|
|
184
|
-
"search-value": a(r).searchKey,
|
|
185
|
-
"column-filter": [],
|
|
186
|
-
onRowClick: t[4] || (t[4] = (o) => y(o.original)),
|
|
187
|
-
"hide-footer": !0
|
|
188
|
-
}, null, 8, ["row-data", "search-value"]),
|
|
189
|
-
i(U, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
190
|
-
default: x(() => [
|
|
191
|
-
(d(!0), h(v, null, G(a(g).filter(
|
|
192
|
-
(o) => o.name.toLowerCase().includes(a(r).searchKey.toLowerCase())
|
|
193
|
-
), (o) => (d(), S(N, {
|
|
194
|
-
key: o._id.toString(),
|
|
195
|
-
onClick: (_) => y(o),
|
|
196
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
197
|
-
}, {
|
|
198
|
-
default: x(() => [
|
|
199
|
-
n("div", ue, [
|
|
200
|
-
n("div", fe, [
|
|
201
|
-
(d(), S(J(a(V)(o)))),
|
|
202
|
-
n("div", ge, u(o.currentReceive ?? 0) + " sent ", 1)
|
|
203
|
-
]),
|
|
204
|
-
n("div", ye, [
|
|
205
|
-
n("div", _e, u(o.name), 1),
|
|
206
|
-
n("div", he, u(a(R)(o)), 1)
|
|
207
|
-
])
|
|
208
|
-
]),
|
|
209
|
-
n("div", we, [
|
|
210
|
-
i(b, {
|
|
211
|
-
icon: "content_copy",
|
|
212
|
-
"icon-color": "neutral-gray-400",
|
|
213
|
-
variant: "tertiary",
|
|
214
|
-
onClick: async (_) => {
|
|
215
|
-
_.stopPropagation(), await D(o);
|
|
216
|
-
}
|
|
217
|
-
}, null, 8, ["onClick"]),
|
|
218
|
-
i(b, {
|
|
219
|
-
icon: "delete",
|
|
220
|
-
"icon-color": "neutral-gray-400",
|
|
221
|
-
variant: "tertiary",
|
|
222
|
-
onClick: (_) => (_.stopPropagation(), A(o))
|
|
223
|
-
}, null, 8, ["onClick"])
|
|
224
|
-
])
|
|
225
|
-
]),
|
|
226
|
-
_: 2
|
|
227
|
-
}, 1032, ["onClick"]))), 128))
|
|
228
|
-
]),
|
|
229
|
-
_: 1
|
|
230
|
-
}),
|
|
231
|
-
a(g).length == 0 ? (d(), h("div", be, [
|
|
232
|
-
n("div", Ce, u(a(s)("connect.campaign.common.noResults")), 1)
|
|
233
|
-
])) : Q("", !0)
|
|
234
|
-
], 64)) : (d(), S(E, {
|
|
235
|
-
key: 1,
|
|
236
|
-
variant: "outlined",
|
|
237
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
238
|
-
}, {
|
|
239
|
-
default: x(() => [
|
|
240
|
-
t[6] || (t[6] = n("img", {
|
|
241
|
-
src: W,
|
|
242
|
-
class: "aspect-square w-[150px]"
|
|
243
|
-
}, null, -1)),
|
|
244
|
-
n("div", ve, [
|
|
245
|
-
n("div", xe, u(a(s)("connect.campaign.broadcast.create.title")), 1),
|
|
246
|
-
n("div", Se, u(a(s)("connect.campaign.broadcast.create.description")), 1)
|
|
247
|
-
]),
|
|
248
|
-
i(b, {
|
|
249
|
-
variant: "primary",
|
|
250
|
-
label: a(s)("connect.campaign.broadcast.create.button"),
|
|
251
|
-
icon: "add",
|
|
252
|
-
onClick: t[5] || (t[5] = (o) => y())
|
|
253
|
-
}, null, 8, ["label"])
|
|
254
|
-
]),
|
|
255
|
-
_: 1
|
|
256
|
-
})),
|
|
257
|
-
i(re, {
|
|
258
|
-
ref_key: "sheetRef",
|
|
259
|
-
ref: w,
|
|
260
|
-
"onSubmit:modelValue": j
|
|
261
|
-
}, null, 512)
|
|
262
|
-
])
|
|
263
|
-
], 64);
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
export {
|
|
268
|
-
Ne as default
|
|
269
|
-
};
|