@feedmepos/mf-connect 0.1.47-prod → 0.1.49-prod
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-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
- package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
- package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
- package/dist/Broadcast-CbF3d_N7.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
- package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
- package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
- package/dist/Credit-DiTnwnFe.js +228 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
- package/dist/Experience-CjMVeGsX.js +229 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
- package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
- package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
- package/dist/MemberList-CZtriA_Q.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
- package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
- package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
- package/dist/Point-51MD49EM.js +232 -0
- package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
- package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
- package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
- package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
- package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
- package/dist/Setting-DGDgmP84.js +1936 -0
- package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
- package/dist/StoreRewards-DFF_0g59.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
- package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
- package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
- package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
- package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
- package/dist/app-DaFoFS2V.js +57962 -0
- package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
- package/dist/app.js +1 -1
- package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
- package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
- package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
- package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
- package/dist/campaign.fn-B-xvcbEb.js +758 -0
- package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
- package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
- package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
- package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
- package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
- package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
- package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
- package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
- package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
- package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
- package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
- package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
- package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
- package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
- package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
- package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
- package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
- package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
- package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
- package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
- package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
- package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
- package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
- package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
- package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
- package/dist/objectid-BQJRv_jX.js +145 -0
- package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
- package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
- package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
- package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
- package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
- package/dist/timezone-B64-HrWi.js +1150 -0
- package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
- package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
- package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
- package/package.json +5 -4
- package/dist/Broadcast-T2a5tN8R.js +0 -227
- package/dist/Credit-DQQCXqS0.js +0 -222
- package/dist/Experience-DzTV21vX.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/MemberList-DLSLGQ02.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Point-BeBYi1BT.js +0 -226
- package/dist/Setting-Dt0sG_hk.js +0 -1936
- package/dist/StoreRewards-DuSsWnTE.js +0 -423
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
- package/dist/app-jRT7vsk_.js +0 -33357
- package/dist/campaign.fn-C-UojhHv.js +0 -758
- package/dist/objectid-CVDLTdni.js +0 -145
- package/dist/usePagination-JoYaROkV.js +0 -223
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-connect",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49-prod",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@ckeditor/ckeditor5-vue": "^7.3.0",
|
|
20
20
|
"@feedmepos/core": "2.14.36",
|
|
21
21
|
"@feedmepos/menu": "1.0.34",
|
|
22
|
-
"@feedmepos/mf-common": "1.
|
|
23
|
-
"@feedmepos/mf-core-ui": "1.0.
|
|
22
|
+
"@feedmepos/mf-common": "1.27.2",
|
|
23
|
+
"@feedmepos/mf-core-ui": "1.0.21",
|
|
24
24
|
"@feedmepos/ui-library": "1.6.7",
|
|
25
25
|
"@tailwindcss/typography": "^0.5.16",
|
|
26
26
|
"@types/qrcode": "^1.5.5",
|
|
@@ -38,13 +38,14 @@
|
|
|
38
38
|
"i18next": "24.2.1",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
40
|
"moment": "^2.30.1",
|
|
41
|
+
"moment-timezone": "^0.6.0",
|
|
41
42
|
"pinia": "^2.1.7",
|
|
42
43
|
"qrcode": "^1.5.3",
|
|
43
44
|
"rrule": "^2.8.1",
|
|
44
45
|
"unplugin-auto-import": "^0.17.8",
|
|
45
46
|
"uuid": "^10.0.0",
|
|
46
47
|
"vite-plugin-vue-devtools": "^7.6.4",
|
|
47
|
-
"vue": "^3.
|
|
48
|
+
"vue": "^3.5.13",
|
|
48
49
|
"vue-i18n": "10.0.5",
|
|
49
50
|
"vue-router": "^4.4.0",
|
|
50
51
|
"vue3-lottie": "^3.3.0",
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as h, computed as U, onMounted as j, resolveComponent as r, openBlock as l, createElementBlock as y, Fragment as b, createVNode as i, unref as t, createElementVNode as n, withCtx as v, renderList as E, createBlock as w, resolveDynamicComponent as H, toDisplayString as d, createCommentVNode as q, h as z } from "vue";
|
|
2
|
-
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as J, components as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as W } from "./plugins-Dn7JDHi7.js";
|
|
5
|
-
import { u as X } from "./loading-c4b7n9Xp.js";
|
|
6
|
-
import { u as Y } from "./business-DVlHPzaL.js";
|
|
7
|
-
import { u as Z } from "./campaign-D9KeUWA7.js";
|
|
8
|
-
import { a as B, b as A, g as ee } from "./campaign-l-u9A514.js";
|
|
9
|
-
import { u as te } from "./vue-i18n--_Wu1nMj.js";
|
|
10
|
-
import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
11
|
-
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js";
|
|
12
|
-
import { u as ne } from "./template-BSQLFHf4.js";
|
|
13
|
-
import { c as _ } from "./index-1BGPM6Uy.js";
|
|
14
|
-
const se = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, pe = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { key: 0 }, ge = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, ye = /* @__PURE__ */ n("img", {
|
|
15
|
-
src: G,
|
|
16
|
-
class: "aspect-square w-[150px]"
|
|
17
|
-
}, null, -1), _e = { class: "flex flex-col gap-16 text-center" }, he = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ N({
|
|
18
|
-
__name: "Broadcast",
|
|
19
|
-
setup(ve) {
|
|
20
|
-
const { t: s } = te(), V = {
|
|
21
|
-
label: s("connect.campaign.common.createCampaign"),
|
|
22
|
-
value: "create",
|
|
23
|
-
isPrimary: !0,
|
|
24
|
-
prependIcon: "add"
|
|
25
|
-
}, D = ne("BROADCAST", J()), R = Y(), m = Z(), { global: L, minor: C } = X, T = h((/* @__PURE__ */ new Date()).toISOString()), c = h({
|
|
26
|
-
searchKey: "",
|
|
27
|
-
location: null
|
|
28
|
-
}), f = U(
|
|
29
|
-
() => m.campaigns.broadcast.filter(
|
|
30
|
-
(e) => !c.value.location || !e.targetLocation || e.targetLocation.includes(c.value.location)
|
|
31
|
-
)
|
|
32
|
-
), I = [
|
|
33
|
-
{
|
|
34
|
-
header: "Broadcast title",
|
|
35
|
-
accessorFn: (e) => e.name
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
header: "Status",
|
|
39
|
-
accessorFn: (e) => ee(e),
|
|
40
|
-
cell(e) {
|
|
41
|
-
return B(e.row.original);
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
header: "Summary",
|
|
46
|
-
accessorFn: (e) => A(e)
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
header: "Message sent",
|
|
50
|
-
accessorFn: (e) => e.currentReceive ?? "N/A"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
header: "Actions",
|
|
54
|
-
cell(e) {
|
|
55
|
-
return z(Q.FmButton, {
|
|
56
|
-
variant: "tertiary",
|
|
57
|
-
icon: "delete",
|
|
58
|
-
iconColor: "neutral-gray-400",
|
|
59
|
-
onClick: (a) => {
|
|
60
|
-
a.stopPropagation(), S(e.row.original);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
], x = h();
|
|
66
|
-
async function S(e) {
|
|
67
|
-
await W.remove(
|
|
68
|
-
s("connect.campaign.common.remove.confirm", { name: e.name })
|
|
69
|
-
) && await C(
|
|
70
|
-
async () => {
|
|
71
|
-
await _.delete(e._id), await m.read("BROADCAST");
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
message: s("connect.campaign.common.remove.removing", { name: e.name }),
|
|
75
|
-
successMessage: s("connect.campaign.common.remove.removed", {
|
|
76
|
-
name: e.name
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
async function g(e) {
|
|
82
|
-
T.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await a() : D.open(async (p) => {
|
|
83
|
-
await a(p);
|
|
84
|
-
});
|
|
85
|
-
async function a(p) {
|
|
86
|
-
var u;
|
|
87
|
-
(u = x.value) == null || u.showSheet(
|
|
88
|
-
!0,
|
|
89
|
-
"BROADCAST",
|
|
90
|
-
e ? await _.readById(e._id) : void 0,
|
|
91
|
-
p
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
async function K(e) {
|
|
96
|
-
await C(
|
|
97
|
-
async () => {
|
|
98
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("BROADCAST");
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
message: s(
|
|
102
|
-
`connect.campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
|
|
103
|
-
),
|
|
104
|
-
successMessage: s("connect.campaign.broadcast.update.success", {
|
|
105
|
-
action: e.campaign._id ? "updated" : "created"
|
|
106
|
-
})
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
return j(async () => {
|
|
111
|
-
await L(async () => {
|
|
112
|
-
await m.read("BROADCAST");
|
|
113
|
-
});
|
|
114
|
-
}), (e, a) => {
|
|
115
|
-
const p = r("FmPageHead"), u = r("FmSearch"), O = r("FmTable"), F = r("FmButton"), $ = r("FmListItem"), P = r("FmList"), M = r("FmCard");
|
|
116
|
-
return l(), y(b, null, [
|
|
117
|
-
i(p, {
|
|
118
|
-
title: t(s)("connect.campaign.broadcast.title"),
|
|
119
|
-
actions: t(f).length > 0 ? [V] : [],
|
|
120
|
-
"onClick:action": a[0] || (a[0] = () => g())
|
|
121
|
-
}, null, 8, ["title", "actions"]),
|
|
122
|
-
n("div", se, [
|
|
123
|
-
i(u, {
|
|
124
|
-
modelValue: t(c).searchKey,
|
|
125
|
-
"onUpdate:modelValue": a[1] || (a[1] = (o) => t(c).searchKey = o),
|
|
126
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
127
|
-
placeholder: t(s)("connect.campaign.common.search"),
|
|
128
|
-
collapsible: ""
|
|
129
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
130
|
-
t(m).campaigns.broadcast && t(m).campaigns.broadcast.length > 0 ? (l(), y(b, { key: 0 }, [
|
|
131
|
-
n("div", ce, [
|
|
132
|
-
n("div", ie, [
|
|
133
|
-
i(oe, {
|
|
134
|
-
modelValue: t(c).location,
|
|
135
|
-
"onUpdate:modelValue": a[2] || (a[2] = (o) => t(c).location = o),
|
|
136
|
-
label: `${t(s)("connect.campaign.common.location")}: `,
|
|
137
|
-
"show-item-label": !0,
|
|
138
|
-
icon: "storefront",
|
|
139
|
-
placement: "bottom-start",
|
|
140
|
-
items: t(R).locationItems
|
|
141
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
142
|
-
]),
|
|
143
|
-
i(u, {
|
|
144
|
-
modelValue: t(c).searchKey,
|
|
145
|
-
"onUpdate:modelValue": a[3] || (a[3] = (o) => t(c).searchKey = o),
|
|
146
|
-
class: "xs:hidden",
|
|
147
|
-
placeholder: "search",
|
|
148
|
-
collapsible: ""
|
|
149
|
-
}, null, 8, ["modelValue"])
|
|
150
|
-
]),
|
|
151
|
-
i(O, {
|
|
152
|
-
class: "xs:hidden",
|
|
153
|
-
"row-data": t(f),
|
|
154
|
-
"column-defs": I,
|
|
155
|
-
"search-value": t(c).searchKey,
|
|
156
|
-
"column-filter": [],
|
|
157
|
-
onRowClick: a[4] || (a[4] = (o) => g(o.original)),
|
|
158
|
-
"hide-footer": !0
|
|
159
|
-
}, null, 8, ["row-data", "search-value"]),
|
|
160
|
-
i(P, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
161
|
-
default: v(() => [
|
|
162
|
-
(l(!0), y(b, null, E(t(f).filter(
|
|
163
|
-
(o) => o.name.toLowerCase().includes(t(c).searchKey.toLowerCase())
|
|
164
|
-
), (o) => (l(), w($, {
|
|
165
|
-
key: o._id.toString(),
|
|
166
|
-
onClick: (k) => g(o),
|
|
167
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
168
|
-
}, {
|
|
169
|
-
default: v(() => [
|
|
170
|
-
n("div", re, [
|
|
171
|
-
n("div", le, [
|
|
172
|
-
(l(), w(H(t(B)(o)))),
|
|
173
|
-
n("div", me, d(o.currentReceive ?? 0) + " sent ", 1)
|
|
174
|
-
]),
|
|
175
|
-
n("div", de, [
|
|
176
|
-
n("div", pe, d(o.name), 1),
|
|
177
|
-
n("div", ue, d(t(A)(o)), 1)
|
|
178
|
-
])
|
|
179
|
-
]),
|
|
180
|
-
i(F, {
|
|
181
|
-
icon: "delete",
|
|
182
|
-
"icon-color": "neutral-gray-400",
|
|
183
|
-
variant: "tertiary",
|
|
184
|
-
onClick: (k) => (k.stopPropagation(), S(o))
|
|
185
|
-
}, null, 8, ["onClick"])
|
|
186
|
-
]),
|
|
187
|
-
_: 2
|
|
188
|
-
}, 1032, ["onClick"]))), 128))
|
|
189
|
-
]),
|
|
190
|
-
_: 1
|
|
191
|
-
}),
|
|
192
|
-
t(f).length == 0 ? (l(), y("div", fe, [
|
|
193
|
-
n("div", ge, d(t(s)("connect.campaign.common.noResults")), 1)
|
|
194
|
-
])) : q("", !0)
|
|
195
|
-
], 64)) : (l(), w(M, {
|
|
196
|
-
key: 1,
|
|
197
|
-
variant: "outlined",
|
|
198
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
199
|
-
}, {
|
|
200
|
-
default: v(() => [
|
|
201
|
-
ye,
|
|
202
|
-
n("div", _e, [
|
|
203
|
-
n("div", he, d(t(s)("connect.campaign.broadcast.create.title")), 1),
|
|
204
|
-
n("div", be, d(t(s)("connect.campaign.broadcast.create.description")), 1)
|
|
205
|
-
]),
|
|
206
|
-
i(F, {
|
|
207
|
-
variant: "primary",
|
|
208
|
-
label: t(s)("connect.campaign.broadcast.create.button"),
|
|
209
|
-
icon: "add",
|
|
210
|
-
onClick: a[5] || (a[5] = (o) => g())
|
|
211
|
-
}, null, 8, ["label"])
|
|
212
|
-
]),
|
|
213
|
-
_: 1
|
|
214
|
-
})),
|
|
215
|
-
i(ae, {
|
|
216
|
-
ref_key: "sheetRef",
|
|
217
|
-
ref: x,
|
|
218
|
-
"onSubmit:modelValue": K
|
|
219
|
-
}, null, 512)
|
|
220
|
-
])
|
|
221
|
-
], 64);
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
export {
|
|
226
|
-
Ie as default
|
|
227
|
-
};
|
package/dist/Credit-DQQCXqS0.js
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as S, computed as j, h as M, onMounted as A, resolveComponent as i, openBlock as l, createElementBlock as y, Fragment as h, createVNode as c, unref as t, createElementVNode as n, withCtx as C, renderList as H, createBlock as v, resolveDynamicComponent as q, toDisplayString as g, createCommentVNode as z } from "vue";
|
|
2
|
-
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as J, components as O } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as Q } from "./plugins-Dn7JDHi7.js";
|
|
5
|
-
import { u as W } from "./loading-c4b7n9Xp.js";
|
|
6
|
-
import { u as X } from "./business-DVlHPzaL.js";
|
|
7
|
-
import { u as Y } from "./campaign-D9KeUWA7.js";
|
|
8
|
-
import { g as Z, a as V, b as L } from "./campaign-l-u9A514.js";
|
|
9
|
-
import { u as ee } from "./vue-i18n--_Wu1nMj.js";
|
|
10
|
-
import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
11
|
-
import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js";
|
|
12
|
-
import { u as ae } from "./template-BSQLFHf4.js";
|
|
13
|
-
import { c as _ } from "./index-1BGPM6Uy.js";
|
|
14
|
-
const ne = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, ie = { 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 = { key: 0 }, ye = /* @__PURE__ */ n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), ge = [
|
|
15
|
-
ye
|
|
16
|
-
], _e = /* @__PURE__ */ n("img", {
|
|
17
|
-
src: G,
|
|
18
|
-
class: "aspect-square w-[150px]"
|
|
19
|
-
}, null, -1), he = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
20
|
-
/* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
|
|
21
|
-
/* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credits are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
|
|
22
|
-
], -1), Te = /* @__PURE__ */ N({
|
|
23
|
-
__name: "Credit",
|
|
24
|
-
setup(Ce) {
|
|
25
|
-
const { t: r } = ee(), I = {
|
|
26
|
-
label: r("connect.program.common.actions.create", {
|
|
27
|
-
type: r("connect.program.credit.title").toLowerCase()
|
|
28
|
-
}),
|
|
29
|
-
value: "create",
|
|
30
|
-
isPrimary: !0,
|
|
31
|
-
prependIcon: "add"
|
|
32
|
-
}, R = ae("CREDIT", J()), B = X(), m = Y(), { global: D, minor: w } = W, s = S({
|
|
33
|
-
searchKey: "",
|
|
34
|
-
location: null
|
|
35
|
-
}), d = j(
|
|
36
|
-
() => m.campaigns.credit.filter(
|
|
37
|
-
(e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
|
|
38
|
-
)
|
|
39
|
-
), T = [
|
|
40
|
-
{
|
|
41
|
-
header: r("connect.program.common.table.title"),
|
|
42
|
-
accessorFn: (e) => e.name
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
header: r("connect.program.common.table.status"),
|
|
46
|
-
accessorFn: (e) => Z(e),
|
|
47
|
-
cell(e) {
|
|
48
|
-
return V(e.row.original);
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
header: r("connect.program.common.table.summary"),
|
|
53
|
-
accessorFn: (e) => L(e)
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
header: r("connect.program.common.table.actions"),
|
|
57
|
-
cell(e) {
|
|
58
|
-
return M(O.FmButton, {
|
|
59
|
-
variant: "tertiary",
|
|
60
|
-
icon: "delete",
|
|
61
|
-
iconColor: "neutral-gray-400",
|
|
62
|
-
onClick: (a) => {
|
|
63
|
-
a.stopPropagation(), x(e.row.original);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
], b = S();
|
|
69
|
-
async function x(e) {
|
|
70
|
-
await Q.remove(
|
|
71
|
-
r("connect.program.common.remove.confirm", { name: e.name })
|
|
72
|
-
) && await w(
|
|
73
|
-
async () => {
|
|
74
|
-
await _.delete(e._id), await m.read("CREDIT");
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
message: r("connect.program.common.remove.removing", { name: e.name }),
|
|
78
|
-
successMessage: r("connect.program.common.remove.removed", {
|
|
79
|
-
name: e.name
|
|
80
|
-
})
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
async function f(e) {
|
|
85
|
-
e ? await a() : R.open(async (p) => {
|
|
86
|
-
await a(p);
|
|
87
|
-
});
|
|
88
|
-
async function a(p) {
|
|
89
|
-
var u;
|
|
90
|
-
(u = b.value) == null || u.showSheet(
|
|
91
|
-
!0,
|
|
92
|
-
"CREDIT",
|
|
93
|
-
e ? await _.readById(e._id) : void 0,
|
|
94
|
-
p
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
async function E(e) {
|
|
99
|
-
await w(
|
|
100
|
-
async () => {
|
|
101
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("CREDIT");
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
|
|
105
|
-
successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
return A(async () => {
|
|
110
|
-
await D(async () => {
|
|
111
|
-
await m.read("CREDIT");
|
|
112
|
-
});
|
|
113
|
-
}), (e, a) => {
|
|
114
|
-
const p = i("FmPageHead"), u = i("FmSearch"), K = i("FmTable"), F = i("FmButton"), $ = i("FmListItem"), P = i("FmList"), U = i("FmCard");
|
|
115
|
-
return l(), y(h, null, [
|
|
116
|
-
c(p, {
|
|
117
|
-
title: t(r)("connect.program.credit.title"),
|
|
118
|
-
actions: t(d).length > 0 ? [I] : [],
|
|
119
|
-
"onClick:action": a[0] || (a[0] = () => f())
|
|
120
|
-
}, null, 8, ["title", "actions"]),
|
|
121
|
-
n("div", ne, [
|
|
122
|
-
c(u, {
|
|
123
|
-
modelValue: t(s).searchKey,
|
|
124
|
-
"onUpdate:modelValue": a[1] || (a[1] = (o) => t(s).searchKey = o),
|
|
125
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
126
|
-
placeholder: "search",
|
|
127
|
-
collapsible: ""
|
|
128
|
-
}, null, 8, ["modelValue"]),
|
|
129
|
-
t(m).campaigns.credit && t(m).campaigns.credit.length > 0 ? (l(), y(h, { key: 0 }, [
|
|
130
|
-
n("div", re, [
|
|
131
|
-
n("div", se, [
|
|
132
|
-
c(oe, {
|
|
133
|
-
modelValue: t(s).location,
|
|
134
|
-
"onUpdate:modelValue": a[2] || (a[2] = (o) => t(s).location = o),
|
|
135
|
-
label: "Location: ",
|
|
136
|
-
"show-item-label": !0,
|
|
137
|
-
icon: "storefront",
|
|
138
|
-
placement: "bottom-start",
|
|
139
|
-
items: t(B).locationItems
|
|
140
|
-
}, null, 8, ["modelValue", "items"])
|
|
141
|
-
]),
|
|
142
|
-
c(u, {
|
|
143
|
-
modelValue: t(s).searchKey,
|
|
144
|
-
"onUpdate:modelValue": a[3] || (a[3] = (o) => t(s).searchKey = o),
|
|
145
|
-
class: "xs:hidden",
|
|
146
|
-
placeholder: "search",
|
|
147
|
-
collapsible: ""
|
|
148
|
-
}, null, 8, ["modelValue"])
|
|
149
|
-
]),
|
|
150
|
-
c(K, {
|
|
151
|
-
class: "xs:hidden",
|
|
152
|
-
"row-data": t(d),
|
|
153
|
-
"column-defs": T,
|
|
154
|
-
"search-value": t(s).searchKey,
|
|
155
|
-
"column-filter": [],
|
|
156
|
-
onRowClick: a[4] || (a[4] = (o) => f(o.original)),
|
|
157
|
-
"hide-footer": t(d).length < 10
|
|
158
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
159
|
-
c(P, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
160
|
-
default: C(() => [
|
|
161
|
-
(l(!0), y(h, null, H(t(d).filter(
|
|
162
|
-
(o) => o.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
|
|
163
|
-
), (o) => (l(), v($, {
|
|
164
|
-
key: o._id.toString(),
|
|
165
|
-
onClick: (k) => f(o),
|
|
166
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
167
|
-
}, {
|
|
168
|
-
default: C(() => [
|
|
169
|
-
n("div", ce, [
|
|
170
|
-
n("div", ie, [
|
|
171
|
-
(l(), v(q(t(V)(o)))),
|
|
172
|
-
n("div", le, g(o.currentReceive ?? 0) + " used ", 1)
|
|
173
|
-
]),
|
|
174
|
-
n("div", me, [
|
|
175
|
-
n("div", de, g(o.name), 1),
|
|
176
|
-
n("div", pe, g(t(L)(o)), 1)
|
|
177
|
-
]),
|
|
178
|
-
n("div", ue, " Credit received: " + g(o.currentReceive ?? 0), 1)
|
|
179
|
-
]),
|
|
180
|
-
c(F, {
|
|
181
|
-
icon: "delete",
|
|
182
|
-
"icon-color": "neutral-gray-400",
|
|
183
|
-
variant: "tertiary",
|
|
184
|
-
onClick: (k) => (k.stopPropagation(), x(o))
|
|
185
|
-
}, null, 8, ["onClick"])
|
|
186
|
-
]),
|
|
187
|
-
_: 2
|
|
188
|
-
}, 1032, ["onClick"]))), 128))
|
|
189
|
-
]),
|
|
190
|
-
_: 1
|
|
191
|
-
}),
|
|
192
|
-
t(d).length == 0 ? (l(), y("div", fe, ge)) : z("", !0)
|
|
193
|
-
], 64)) : (l(), v(U, {
|
|
194
|
-
key: 1,
|
|
195
|
-
variant: "outlined",
|
|
196
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
197
|
-
}, {
|
|
198
|
-
default: C(() => [
|
|
199
|
-
_e,
|
|
200
|
-
he,
|
|
201
|
-
c(F, {
|
|
202
|
-
variant: "primary",
|
|
203
|
-
label: "Create credit program",
|
|
204
|
-
icon: "add",
|
|
205
|
-
onClick: a[5] || (a[5] = (o) => f())
|
|
206
|
-
})
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
})),
|
|
210
|
-
c(te, {
|
|
211
|
-
ref_key: "sheetRef",
|
|
212
|
-
ref: b,
|
|
213
|
-
"onSubmit:modelValue": E
|
|
214
|
-
}, null, 512)
|
|
215
|
-
])
|
|
216
|
-
], 64);
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
export {
|
|
221
|
-
Te as default
|
|
222
|
-
};
|