@feedmepos/mf-connect 0.1.3-prod → 0.1.4-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-07T9poLx.js +423 -0
- package/dist/{App-DvtYt9h5.js → App-C6MukSCT.js} +276 -275
- package/dist/Broadcast-CzsgeZNO.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DoH4RX_Y.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BirunpzI.js} +8 -8
- package/dist/Card-DQnyWZZf.js +824 -0
- package/dist/{Collections-C5-k8WkG.js → Collections-BV7CSqRw.js} +4 -4
- package/dist/Credit-CxsbYGLZ.js +220 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCbvlp5V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKSZYxvb.js} +918 -901
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DpsrI-Z3.js +345 -0
- package/dist/Experience-eMUbhq7h.js +221 -0
- package/dist/Game-CxAG2ViS.js +255 -0
- package/dist/Marketing-CozMj2Y5.js +316 -0
- package/dist/Member-DM1dj3F5.js +69 -0
- package/dist/{MemberList-CMefeirT.js → MemberList-DNjK9BbG.js} +14 -14
- package/dist/{MemberTransactions-B9oYdzjR.js → MemberTransactions-CsjN3LZA.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B0T7ze7r.js → MessageInput.vue_vue_type_script_setup_true_lang-DVQE9v2R.js} +2 -2
- package/dist/Mission-BugvTPPH.js +261 -0
- package/dist/Point-D8BjGtqT.js +222 -0
- package/dist/Promotion-mc9KBzoJ.js +253 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BGM1doWM.js → RuleGroup.vue_vue_type_script_setup_true_lang-B2H3D_kZ.js} +15 -15
- package/dist/Segment-DZRFA-Pb.js +565 -0
- package/dist/Setting-DxNhR44e.js +1871 -0
- package/dist/Store-CdkJWpjV.js +1530 -0
- package/dist/StoreRewards-Cdturia8.js +400 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-JumDBZLs.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D7GcOiUM.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BtBCggcN.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-nuCOrrLE.js} +1 -1
- package/dist/{Tier-ms8r2E7c.js → Tier-I_MMd39Y.js} +470 -445
- package/dist/{Title-BBKoBs46.js → Title-DK5gmUvo.js} +298 -282
- package/dist/Transaction-BXpTIMS_.js +39 -0
- package/dist/Voucher-BQ5h2G0I.js +490 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-eAP99wyg.js +141 -0
- package/dist/app-CL2Wxzv5.js +5639 -0
- package/dist/{app-CGgrMOc_.js → app-DTAyCT-G.js} +1 -1
- package/dist/app.js +4 -3
- package/dist/{business-DeMUnCNX.js → business-B9OUlaFZ.js} +1 -1
- package/dist/{campaign-CBszI6An.js → campaign-CNbUA51l.js} +2 -2
- package/dist/{collection.fn-D4Qgx1aW.js → collection.fn-D_i45T4Q.js} +2 -2
- package/dist/dto-B4208_es.js +2770 -0
- package/dist/{effect-2p4_SGbQ.js → effect-Ye_yr8et.js} +1 -1
- package/dist/{email-addresses-Bc9od2gA.js → email-addresses-Gm7Dyaxy.js} +1 -1
- package/dist/{export-BK6FgeQO.js → export-Buee5oUV.js} +3 -3
- package/dist/{helper-DUkKW7uc.js → helper-BBlHhMFc.js} +1 -1
- package/dist/{index-BWWnWRpt.js → index-BxJgFvym.js} +2 -2
- package/dist/{index-g4L04WYz.js → index-ByaM-yoc.js} +91 -86
- package/dist/{index-B9f-K1No.js → index-C0QHb5SL.js} +2 -2
- package/dist/{index-M1SmasnI.js → index-C363BG5A.js} +3 -3
- package/dist/{index-Ci8tkzSn.js → index-CLL3no-v.js} +1 -1
- package/dist/{index-Cvbyv9Hx.js → index-ChSVaFk3.js} +1 -1
- package/dist/{index-D4HYMbSu.js → index-Co9n8I_5.js} +3 -3
- package/dist/index-CoGNKU8v.js +3 -0
- package/dist/{index-BFcrfL4W.js → index-DHGcUMVN.js} +1 -1
- package/dist/{index-CTmiZrHu.js → index-DWWtZSrm.js} +1 -1
- package/dist/{index-DRaETKbn.js → index-DdVZgYE4.js} +258 -256
- package/dist/{index-AZ8cKg9n.js → index-Dx3HwWcb.js} +1 -1
- package/dist/{index.esm2017-kvuav0Sd.js → index.esm2017-Dd02dg_O.js} +38 -38
- package/dist/{loading-MNCADfHc.js → loading-Or1ZDzDS.js} +11 -11
- package/dist/{membership-CsbTF-DX.js → membership-B8h5ku-v.js} +3 -3
- package/dist/{money-Lo7kavmu.js → money-CmsKAJBT.js} +1 -1
- package/dist/{number-BviV2K5O.js → number-iEhp7Uai.js} +1 -1
- package/dist/{rule-DKrUrnrM.js → rule-BORkgSMK.js} +3 -3
- package/dist/{rule-builder-DjPniLk6.js → rule-builder-DEfkSr68.js} +1 -1
- package/dist/{template-DteMEC9C.js → template-C_Y7bhlI.js} +4 -4
- package/dist/{usePagination-BKTq-UbV.js → usePagination-Ci8-uZvb.js} +1 -1
- package/dist/vue-i18n-BXzrZRP6.js +2365 -0
- package/package.json +7 -4
- package/dist/Analytic-DiPWt78u.js +0 -423
- package/dist/Broadcast-Dv4XcvBh.js +0 -216
- package/dist/Card-DDvwlZF0.js +0 -823
- package/dist/Credit-BDQIr_FJ.js +0 -214
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BQzgcn4V.js +0 -344
- package/dist/Experience-B9H3tOF0.js +0 -211
- package/dist/Game-cy3_ppLO.js +0 -250
- package/dist/Marketing-CWXV2n5F.js +0 -309
- package/dist/Member-DyTX22Zk.js +0 -92
- package/dist/Mission-DxSO3iES.js +0 -248
- package/dist/Point-C5UtlqkX.js +0 -220
- package/dist/Promotion-DhSGTj-R.js +0 -244
- package/dist/Segment-BzI6Ykxp.js +0 -564
- package/dist/Setting-SRUWwF9w.js +0 -1870
- package/dist/Store-CIrn_7Mh.js +0 -1533
- package/dist/StoreRewards-BYc0vgnr.js +0 -429
- package/dist/Transaction-IZL9-6fe.js +0 -36
- package/dist/Voucher-CIWulmcc.js +0 -485
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
- package/dist/app-BQvluJk_.js +0 -2974
- package/dist/dto-Dtvg93Bz.js +0 -1145
- package/dist/index-UR1Lxi0C.js +0 -11
|
@@ -4,14 +4,14 @@ var z = (f, r, d) => oe(f, typeof r != "symbol" ? r + "" : r, d);
|
|
|
4
4
|
import { defineComponent as G, ref as p, computed as H, watch as O, resolveComponent as u, openBlock as y, createBlock as L, unref as e, isRef as K, withCtx as I, createElementVNode as b, createVNode as s, createElementBlock as P, Fragment as R, renderList as te, createCommentVNode as U, onMounted as ae, h as T } from "vue";
|
|
5
5
|
import { h as j } from "./moment-BWErdI6_.js";
|
|
6
6
|
import { components as le } from "@feedmepos/ui-library";
|
|
7
|
-
import { u as J, a as ne } from "./loading-
|
|
7
|
+
import { u as J, a as ne } from "./loading-Or1ZDzDS.js";
|
|
8
8
|
import { J as se } from "./JsonViewer-v8_C7l5N.js";
|
|
9
9
|
import { u as re } from "./app-wDQR6dpb.js";
|
|
10
10
|
import { useRoute as Q, useRouter as ie } from "vue-router";
|
|
11
|
-
import { c as N } from "./index-
|
|
12
|
-
import { u as Y, a as ue, _ as de, w as ce } from "./usePagination-
|
|
11
|
+
import { c as N } from "./index-DWWtZSrm.js";
|
|
12
|
+
import { u as Y, a as ue, _ as de, w as ce } from "./usePagination-Ci8-uZvb.js";
|
|
13
13
|
import { g as me } from "./user-Bm4KttFq.js";
|
|
14
|
-
import { m as pe } from "./index-
|
|
14
|
+
import { m as pe } from "./index-DHGcUMVN.js";
|
|
15
15
|
import { o as fe } from "./objectId-dwaoBfJX.js";
|
|
16
16
|
const ge = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), be = { class: "space-y-16" }, Ce = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), ve = { class: "gap-16 grid grid-cols-2" }, he = { class: "flex items-center gap-8" }, ye = /* @__PURE__ */ G({
|
|
17
17
|
__name: "CreateCollectionSheet",
|
|
@@ -0,0 +1,220 @@
|
|
|
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, u as W } from "./loading-Or1ZDzDS.js";
|
|
5
|
+
import { u as X } from "./business-B9OUlaFZ.js";
|
|
6
|
+
import { u as Y } from "./campaign-CNbUA51l.js";
|
|
7
|
+
import { g as V, a as L } from "./dto-B4208_es.js";
|
|
8
|
+
import { u as Z } from "./vue-i18n-BXzrZRP6.js";
|
|
9
|
+
import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
+
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKSZYxvb.js";
|
|
11
|
+
import { u as te } from "./template-C_Y7bhlI.js";
|
|
12
|
+
import { c as _ } from "./index-DWWtZSrm.js";
|
|
13
|
+
const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { key: 0 }, fe = /* @__PURE__ */ n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), ye = [
|
|
14
|
+
fe
|
|
15
|
+
], ge = /* @__PURE__ */ n("img", {
|
|
16
|
+
src: G,
|
|
17
|
+
class: "aspect-square w-[150px]"
|
|
18
|
+
}, null, -1), _e = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
19
|
+
/* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your credit program"),
|
|
20
|
+
/* @__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. ")
|
|
21
|
+
], -1), Be = /* @__PURE__ */ N({
|
|
22
|
+
__name: "Credit",
|
|
23
|
+
setup(he) {
|
|
24
|
+
const { t: r } = Z(), I = {
|
|
25
|
+
label: r("connect.program.common.actions.create", {
|
|
26
|
+
type: r("connect.program.credit.title").toLowerCase()
|
|
27
|
+
}),
|
|
28
|
+
value: "create",
|
|
29
|
+
isPrimary: !0,
|
|
30
|
+
prependIcon: "add"
|
|
31
|
+
}, R = te("CREDIT", J()), B = X(), m = Y(), { global: D, minor: w } = W, s = S({
|
|
32
|
+
searchKey: "",
|
|
33
|
+
location: null
|
|
34
|
+
}), d = j(
|
|
35
|
+
() => m.campaigns.credit.filter(
|
|
36
|
+
(e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
|
|
37
|
+
)
|
|
38
|
+
), T = [
|
|
39
|
+
{
|
|
40
|
+
header: r("connect.program.common.table.title"),
|
|
41
|
+
accessorFn: (e) => e.name
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
header: r("connect.program.common.table.status"),
|
|
45
|
+
cell(e) {
|
|
46
|
+
return V(e.row.original);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
header: r("connect.program.common.table.summary"),
|
|
51
|
+
accessorFn: (e) => L(e)
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
header: r("connect.program.common.table.actions"),
|
|
55
|
+
cell(e) {
|
|
56
|
+
return M(O.FmButton, {
|
|
57
|
+
variant: "tertiary",
|
|
58
|
+
icon: "delete",
|
|
59
|
+
iconColor: "neutral-gray-400",
|
|
60
|
+
onClick: (a) => {
|
|
61
|
+
a.stopPropagation(), b(e.row.original);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
], x = S();
|
|
67
|
+
async function b(e) {
|
|
68
|
+
await Q.remove(
|
|
69
|
+
r("connect.program.common.remove.confirm", { name: e.name })
|
|
70
|
+
) && await w(
|
|
71
|
+
async () => {
|
|
72
|
+
await _.delete(e._id), await m.read("CREDIT");
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
message: r("connect.program.common.remove.removing", { name: e.name }),
|
|
76
|
+
successMessage: r("connect.program.common.remove.removed", {
|
|
77
|
+
name: e.name
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
async function f(e) {
|
|
83
|
+
e ? await a() : R.open(async (p) => {
|
|
84
|
+
await a(p);
|
|
85
|
+
});
|
|
86
|
+
async function a(p) {
|
|
87
|
+
var u;
|
|
88
|
+
(u = x.value) == null || u.showSheet(
|
|
89
|
+
!0,
|
|
90
|
+
"CREDIT",
|
|
91
|
+
e ? await _.readById(e._id) : void 0,
|
|
92
|
+
p
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
async function E(e) {
|
|
97
|
+
await w(
|
|
98
|
+
async () => {
|
|
99
|
+
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("CREDIT");
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
|
|
103
|
+
successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
return A(async () => {
|
|
108
|
+
await D(async () => {
|
|
109
|
+
await m.read("CREDIT");
|
|
110
|
+
});
|
|
111
|
+
}), (e, a) => {
|
|
112
|
+
const p = i("FmPageHead"), u = i("FmSearch"), K = i("FmTable"), F = i("FmButton"), $ = i("FmListItem"), P = i("FmList"), U = i("FmCard");
|
|
113
|
+
return l(), y(h, null, [
|
|
114
|
+
c(p, {
|
|
115
|
+
title: t(r)("connect.program.credit.title"),
|
|
116
|
+
actions: t(d).length > 0 ? [I] : [],
|
|
117
|
+
"onClick:action": a[0] || (a[0] = () => f())
|
|
118
|
+
}, null, 8, ["title", "actions"]),
|
|
119
|
+
n("div", ae, [
|
|
120
|
+
c(u, {
|
|
121
|
+
modelValue: t(s).searchKey,
|
|
122
|
+
"onUpdate:modelValue": a[1] || (a[1] = (o) => t(s).searchKey = o),
|
|
123
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
124
|
+
placeholder: "search",
|
|
125
|
+
collapsible: ""
|
|
126
|
+
}, null, 8, ["modelValue"]),
|
|
127
|
+
t(m).campaigns.credit && t(m).campaigns.credit.length > 0 ? (l(), y(h, { key: 0 }, [
|
|
128
|
+
n("div", ne, [
|
|
129
|
+
n("div", re, [
|
|
130
|
+
c(ee, {
|
|
131
|
+
modelValue: t(s).location,
|
|
132
|
+
"onUpdate:modelValue": a[2] || (a[2] = (o) => t(s).location = o),
|
|
133
|
+
label: "Location: ",
|
|
134
|
+
"show-item-label": !0,
|
|
135
|
+
icon: "storefront",
|
|
136
|
+
placement: "bottom-start",
|
|
137
|
+
items: t(B).locationItems
|
|
138
|
+
}, null, 8, ["modelValue", "items"])
|
|
139
|
+
]),
|
|
140
|
+
c(u, {
|
|
141
|
+
modelValue: t(s).searchKey,
|
|
142
|
+
"onUpdate:modelValue": a[3] || (a[3] = (o) => t(s).searchKey = o),
|
|
143
|
+
class: "xs:hidden",
|
|
144
|
+
placeholder: "search",
|
|
145
|
+
collapsible: ""
|
|
146
|
+
}, null, 8, ["modelValue"])
|
|
147
|
+
]),
|
|
148
|
+
c(K, {
|
|
149
|
+
class: "xs:hidden",
|
|
150
|
+
"row-data": t(d),
|
|
151
|
+
"column-defs": T,
|
|
152
|
+
"search-value": t(s).searchKey,
|
|
153
|
+
"column-filter": [],
|
|
154
|
+
onRowClick: a[4] || (a[4] = (o) => f(o.original)),
|
|
155
|
+
"hide-footer": t(d).length < 10
|
|
156
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
157
|
+
c(P, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
158
|
+
default: C(() => [
|
|
159
|
+
(l(!0), y(h, null, H(t(d).filter(
|
|
160
|
+
(o) => o.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
|
|
161
|
+
), (o) => (l(), v($, {
|
|
162
|
+
key: o._id.toString(),
|
|
163
|
+
onClick: (k) => f(o),
|
|
164
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
165
|
+
}, {
|
|
166
|
+
default: C(() => [
|
|
167
|
+
n("div", se, [
|
|
168
|
+
n("div", ce, [
|
|
169
|
+
(l(), v(q(t(V)(o)))),
|
|
170
|
+
n("div", ie, g(o.currentReceive ?? 0) + " used ", 1)
|
|
171
|
+
]),
|
|
172
|
+
n("div", le, [
|
|
173
|
+
n("div", me, g(o.name), 1),
|
|
174
|
+
n("div", de, g(t(L)(o)), 1)
|
|
175
|
+
]),
|
|
176
|
+
n("div", pe, " Credit received: " + g(o.currentReceive ?? 0), 1)
|
|
177
|
+
]),
|
|
178
|
+
c(F, {
|
|
179
|
+
icon: "delete",
|
|
180
|
+
"icon-color": "neutral-gray-400",
|
|
181
|
+
variant: "tertiary",
|
|
182
|
+
onClick: (k) => (k.stopPropagation(), b(o))
|
|
183
|
+
}, null, 8, ["onClick"])
|
|
184
|
+
]),
|
|
185
|
+
_: 2
|
|
186
|
+
}, 1032, ["onClick"]))), 128))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}),
|
|
190
|
+
t(d).length == 0 ? (l(), y("div", ue, ye)) : z("", !0)
|
|
191
|
+
], 64)) : (l(), v(U, {
|
|
192
|
+
key: 1,
|
|
193
|
+
variant: "outlined",
|
|
194
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
195
|
+
}, {
|
|
196
|
+
default: C(() => [
|
|
197
|
+
ge,
|
|
198
|
+
_e,
|
|
199
|
+
c(F, {
|
|
200
|
+
variant: "primary",
|
|
201
|
+
label: "Create credit program",
|
|
202
|
+
icon: "add",
|
|
203
|
+
onClick: a[5] || (a[5] = (o) => f())
|
|
204
|
+
})
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
})),
|
|
208
|
+
c(oe, {
|
|
209
|
+
ref_key: "sheetRef",
|
|
210
|
+
ref: x,
|
|
211
|
+
"onSubmit:modelValue": E
|
|
212
|
+
}, null, 512)
|
|
213
|
+
])
|
|
214
|
+
], 64);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
export {
|
|
219
|
+
Be as default
|
|
220
|
+
};
|