@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.51
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-DP8oPOug.js +427 -0
- package/dist/{App-C8Qfnkhz.js → App-DSFvQRnz.js} +441 -420
- package/dist/AuditLogs-YSw2xsZw.js +1885 -0
- package/dist/Bin-Da_eermT.js +166 -0
- package/dist/{Broadcast-BK-1MQkL.js → Broadcast-DoNlWo4j.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DItda2cA.js} +6 -8
- package/dist/Card-CbxtYecE.js +896 -0
- package/dist/{Collections-TA4iW1r0.js → Collections-p1UhWf85.js} +27 -31
- package/dist/{Credit-Df9iFQjZ.js → Credit-DQta1iUA.js} +17 -16
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CEWFRlr3.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-BN5MFZTx.js} +6 -6
- package/dist/{Experience-ByLFXKn6.js → Experience-BnwKk_PO.js} +26 -25
- package/dist/{Game-B6Ez0pfW.js → Game-_4Hj3Yyt.js} +21 -20
- package/dist/Index-Bmz1R6hW.js +259 -0
- package/dist/Marketing-D0V260mx.js +20071 -0
- package/dist/{Member-TobP1ISp.js → Member-BIEihOp5.js} +4 -4
- package/dist/MemberList-C4EbD7jO.js +1598 -0
- package/dist/MemberTransactions-DvYurEaZ.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-vGMke4sb.js} +6 -6
- package/dist/{Mission-D9uTVo0G.js → Mission-C6gKiY9l.js} +97 -84
- package/dist/Overview-xqu1_7-7.js +1078 -0
- package/dist/{Point-4rDr-53e.js → Point-C02Z0_w5.js} +26 -25
- package/dist/{Promotion-BKO_dtQk.js → Promotion-BBfa32MT.js} +55 -48
- package/dist/Record-Bcj2D0fP.js +340 -0
- package/dist/Reward-BMvRwWnr.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-gt0h6XDa.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CPw-z0L1.js +1637 -0
- package/dist/Segment-BpkWm7ah.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-_t32qpAQ.js +181 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWNF7Srw.js +147 -0
- package/dist/{Setting-B7oISD0D.js → Setting-QEqA9Sjr.js} +610 -586
- package/dist/Store-Bb5Qh_fa.js +1744 -0
- package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-CqmFv4KN.js} +33 -32
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-SGMgGM-I.js +939 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bd63YQLw.js} +1 -1
- package/dist/{Tier-DkxdNj-K.js → Tier-BG4EQUN4.js} +327 -318
- package/dist/{Title-VFpCOsMO.js → Title-CLZYAG35.js} +199 -184
- package/dist/{Transaction-BgKD8n2L.js → Transaction-DxKmtuW2.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DWqf1lcK.js +130 -0
- package/dist/Voucher-BiBkN12U.js +353 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bv6ro9Ul.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-DaN1_uKj.js} +1 -1
- package/dist/{app-DA-t-2Zt.js → app-BDYHz7bx.js} +1 -1
- package/dist/{app-DUl5dav5.js → app-BToiZpVg.js} +1758 -1496
- package/dist/app.js +1 -1
- package/dist/{business-CeCitOY4.js → business-Cdck2Mo8.js} +1 -1
- package/dist/{campaign-CcLM6e4s.js → campaign-U0MVzGkd.js} +2 -2
- package/dist/campaign-V6y28epS.js +1810 -0
- package/dist/campaign.enum-C2ZHkwav.js +20 -0
- package/dist/campaign.fn-C8hqL7sq.js +758 -0
- package/dist/collectible.enum-DPFWrwtU.js +19 -0
- package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUtvp8Q7.js} +2 -2
- package/dist/dto-CO3dr-5e.js +214 -0
- package/dist/{effect-Dt7rXOBy.js → effect-CTIglwNj.js} +9 -9
- package/dist/email-addresses-fTprqBTm.js +705 -0
- package/dist/{export-CyioiboQ.js → export-BNfnVhxu.js} +5 -5
- package/dist/{helper-FA_9AhGV.js → helper-BB4sHiiB.js} +1 -1
- package/dist/index-BZjpXQbO.js +32 -0
- package/dist/index-BnJgi3GR.js +54 -0
- package/dist/{index-DLN4Kzz_.js → index-BpmAtLiE.js} +1 -1
- package/dist/{index-igxrd5jC.js → index-ByUriI6F.js} +1500 -1479
- package/dist/{index-BiFueJiF.js → index-CUDAo9HK.js} +259 -193
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-DbbO3wip.js → index-DHEtLTYr.js} +48 -4
- package/dist/{index-CCdXvb92.js → index-DTnTvdIA.js} +1 -1
- package/dist/{index-CyNdsVrw.js → index-DbzMtv9Z.js} +1 -1
- package/dist/index-DwbN8FHi.js +44 -0
- package/dist/index-czQ4GAtE.js +115 -0
- package/dist/{index-C20XBD7G.js → index-fkBcbLFu.js} +2192 -931
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/index-wzNzbg46.js +29000 -0
- package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-OtiYpLFF.js} +33 -33
- package/dist/loading-D_NOvElg.js +71 -0
- package/dist/{membership-DFiY8aVd.js → membership-6M1ftDbz.js} +54 -46
- package/dist/money-D6phwlff.js +15 -0
- package/dist/number-CT9IX-wU.js +12 -0
- package/dist/objectid-DtS-zHmd.js +145 -0
- package/dist/{loading-CZ0fiViM.js → plugins-CFv-0uV9.js} +2990 -3062
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-B2aqMThx.js +36 -0
- package/dist/{rule-C3e1xTqN.js → rule-DxUsHy8Q.js} +180 -177
- package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-BqkRAa1C.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-C2OKWd_e.js → template-5OZEG9e3.js} +5 -5
- package/dist/trigger-D7aLiQDF.js +144 -0
- package/dist/user-CMYgbV2m.js +54 -0
- package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-Cad7169E.js} +216 -216
- package/dist/{xlsx-CtXdl3ls.js → xlsx-rV-XTyJC.js} +1 -1
- package/package.json +9 -7
- package/dist/Analytic-C_ZFR5jh.js +0 -622
- package/dist/Card-C7dUFJKe.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
- package/dist/Marketing-BaqZUeVI.js +0 -316
- package/dist/MemberList-B9cutmEh.js +0 -1733
- package/dist/MemberTransactions-DRHA7AOF.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
- package/dist/Segment-Dj8nc3AE.js +0 -437
- package/dist/Store-CJ3wcohQ.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
- package/dist/Voucher-BbTLt8Pt.js +0 -490
- package/dist/dto-CRJma6eX.js +0 -2770
- package/dist/index-B1e0LtDe.js +0 -99
- package/dist/index-Be2ZYDy_.js +0 -298
- package/dist/index-CDkITvze.js +0 -762
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DPP5F3bT.js +0 -206
- package/dist/index-Dbo3DDwp.js +0 -29193
- package/dist/money-D8hUEfP4.js +0 -15
- package/dist/number-DL3GAeVt.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as j, ref as
|
|
1
|
+
import { defineComponent as j, ref as P, computed as A, h as E, onMounted as M, resolveComponent as l, openBlock as d, createElementBlock as w, Fragment as b, createVNode as r, unref as t, withCtx as g, createElementVNode as n, toDisplayString as c, renderList as H, createBlock as x, resolveDynamicComponent as q } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as Q
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
4
|
+
import { p as Q } from "./plugins-CFv-0uV9.js";
|
|
5
|
+
import { u as W } from "./loading-D_NOvElg.js";
|
|
6
|
+
import { u as X } from "./business-Cdck2Mo8.js";
|
|
7
|
+
import { u as Y } from "./campaign-U0MVzGkd.js";
|
|
8
|
+
import { g as V, a as I } from "./campaign-V6y28epS.js";
|
|
8
9
|
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-
|
|
10
|
-
import { u as te } from "./template-
|
|
11
|
-
import { u as oe } from "./vue-i18n-
|
|
12
|
-
import { c as _ } from "./index-
|
|
13
|
-
const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, ce = { 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 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex flex-col gap-16 text-center" }, ge = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
10
|
+
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CEWFRlr3.js";
|
|
11
|
+
import { u as te } from "./template-5OZEG9e3.js";
|
|
12
|
+
import { u as oe } from "./vue-i18n-Cad7169E.js";
|
|
13
|
+
import { c as _ } from "./index-czQ4GAtE.js";
|
|
14
|
+
const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, ce = { 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 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex flex-col gap-16 text-center" }, ge = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $e = /* @__PURE__ */ j({
|
|
14
15
|
__name: "Point",
|
|
15
16
|
setup(he) {
|
|
16
17
|
const { t: s } = oe(), B = {
|
|
@@ -20,7 +21,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
20
21
|
value: "create",
|
|
21
22
|
isPrimary: !0,
|
|
22
23
|
prependIcon: "add"
|
|
23
|
-
}, $ = te("COIN", G()),
|
|
24
|
+
}, $ = te("COIN", G()), h = X(), m = Y(), { global: K, minor: C } = W, i = P({
|
|
24
25
|
searchKey: "",
|
|
25
26
|
location: null
|
|
26
27
|
}), u = A(
|
|
@@ -35,12 +36,12 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
35
36
|
{
|
|
36
37
|
header: s("connect.program.common.table.status"),
|
|
37
38
|
cell(e) {
|
|
38
|
-
return
|
|
39
|
+
return V(e.row.original);
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
{
|
|
42
43
|
header: s("connect.program.common.table.summary"),
|
|
43
|
-
accessorFn: (e) =>
|
|
44
|
+
accessorFn: (e) => I(e)
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
header: s("connect.program.common.table.actions"),
|
|
@@ -55,7 +56,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
|
-
], v =
|
|
59
|
+
], v = P();
|
|
59
60
|
async function F(e) {
|
|
60
61
|
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await C(
|
|
61
62
|
async () => {
|
|
@@ -98,10 +99,10 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
98
99
|
});
|
|
99
100
|
}), (e, o) => {
|
|
100
101
|
const p = l("FmPill"), y = l("FmPageHead"), k = l("FmSearch"), O = l("FmTable"), S = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
|
|
101
|
-
return d(),
|
|
102
|
+
return d(), w(b, null, [
|
|
102
103
|
r(y, {
|
|
103
104
|
title: t(s)("connect.program.point.title"),
|
|
104
|
-
actions: t(u).length > 0 ? [B] : [],
|
|
105
|
+
actions: t(u).length > 0 && t(h).isPremium ? [B] : [],
|
|
105
106
|
"onClick:action": o[0] || (o[0] = () => f())
|
|
106
107
|
}, {
|
|
107
108
|
title: g(() => [
|
|
@@ -120,7 +121,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
120
121
|
placeholder: "search",
|
|
121
122
|
collapsible: ""
|
|
122
123
|
}, null, 8, ["modelValue"]),
|
|
123
|
-
t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(),
|
|
124
|
+
t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(), w(b, { key: 0 }, [
|
|
124
125
|
n("div", ie, [
|
|
125
126
|
n("div", re, [
|
|
126
127
|
r(Z, {
|
|
@@ -130,7 +131,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
130
131
|
"show-item-label": !0,
|
|
131
132
|
icon: "storefront",
|
|
132
133
|
placement: "bottom-start",
|
|
133
|
-
items: t(
|
|
134
|
+
items: t(h).locationItems
|
|
134
135
|
}, null, 8, ["modelValue", "items"])
|
|
135
136
|
]),
|
|
136
137
|
r(k, {
|
|
@@ -152,9 +153,9 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
152
153
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
153
154
|
r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
154
155
|
default: g(() => [
|
|
155
|
-
(d(!0),
|
|
156
|
+
(d(!0), w(b, null, H(t(u).filter(
|
|
156
157
|
(a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
157
|
-
), (a) => (d(),
|
|
158
|
+
), (a) => (d(), x(U, {
|
|
158
159
|
key: a._id.toString(),
|
|
159
160
|
onClick: (L) => f(a),
|
|
160
161
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
@@ -162,12 +163,12 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
162
163
|
default: g(() => [
|
|
163
164
|
n("div", le, [
|
|
164
165
|
n("div", ce, [
|
|
165
|
-
(d(),
|
|
166
|
+
(d(), x(q(t(V)(a)))),
|
|
166
167
|
n("div", me, c(t(s)("program.point.used", { count: a.currentReceive ?? 0 })), 1)
|
|
167
168
|
]),
|
|
168
169
|
n("div", de, [
|
|
169
170
|
n("div", pe, c(a.name), 1),
|
|
170
|
-
n("div", ue, c(t(
|
|
171
|
+
n("div", ue, c(t(I)(a)), 1)
|
|
171
172
|
]),
|
|
172
173
|
n("div", fe, " Point received: " + c(a.currentReceive ?? 0), 1)
|
|
173
174
|
]),
|
|
@@ -183,7 +184,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
183
184
|
]),
|
|
184
185
|
_: 1
|
|
185
186
|
})
|
|
186
|
-
], 64)) : (d(),
|
|
187
|
+
], 64)) : (d(), x(T, {
|
|
187
188
|
key: 1,
|
|
188
189
|
variant: "outlined",
|
|
189
190
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
@@ -200,7 +201,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
200
201
|
r(S, {
|
|
201
202
|
variant: "primary",
|
|
202
203
|
label: "Create point program",
|
|
203
|
-
disabled: !t(
|
|
204
|
+
disabled: !t(h).isPremium,
|
|
204
205
|
icon: "add",
|
|
205
206
|
onClick: o[5] || (o[5] = (a) => f())
|
|
206
207
|
}, null, 8, ["disabled"])
|
|
@@ -218,5 +219,5 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
218
219
|
}
|
|
219
220
|
});
|
|
220
221
|
export {
|
|
221
|
-
|
|
222
|
+
$e as default
|
|
222
223
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { defineComponent as H, ref as S, computed as q, h as z, onMounted as G, resolveComponent as
|
|
1
|
+
import { defineComponent as H, ref as S, computed as q, h as z, onMounted as G, resolveComponent as r, openBlock as m, createElementBlock as h, Fragment as w, createVNode as i, unref as a, createElementVNode as s, withCtx as v, renderList as J, createBlock as b, resolveDynamicComponent as Q, toDisplayString as g } from "vue";
|
|
2
2
|
import { _ as W } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as X, components as Y } from "@feedmepos/ui-library";
|
|
4
|
-
import { c as O, p as I
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { c as O, p as I } from "./plugins-CFv-0uV9.js";
|
|
5
|
+
import { u as Z } from "./loading-D_NOvElg.js";
|
|
6
|
+
import { u as ee } from "./business-Cdck2Mo8.js";
|
|
7
|
+
import { u as oe } from "./campaign-U0MVzGkd.js";
|
|
8
|
+
import { u as te } from "./vue-i18n-Cad7169E.js";
|
|
9
|
+
import { g as V } from "./campaign-V6y28epS.js";
|
|
10
|
+
import { e as L } from "./effect-CTIglwNj.js";
|
|
10
11
|
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-
|
|
12
|
-
import { u as se } from "./template-
|
|
13
|
-
import { c as u } from "./index-
|
|
14
|
-
const
|
|
12
|
+
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CEWFRlr3.js";
|
|
13
|
+
import { u as se } from "./template-5OZEG9e3.js";
|
|
14
|
+
import { c as u } from "./index-czQ4GAtE.js";
|
|
15
|
+
const ce = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { 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" }, Te = /* @__PURE__ */ H({
|
|
15
16
|
__name: "Promotion",
|
|
16
17
|
setup(_e) {
|
|
17
18
|
const { t } = te(), T = {
|
|
@@ -24,12 +25,12 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
24
25
|
value: "sync",
|
|
25
26
|
isPrimary: !1,
|
|
26
27
|
prependIcon: "refresh"
|
|
27
|
-
}, M = se("PROMOTION", X()), x = ee(), f = oe(), { global: R, minor: _ } = Z,
|
|
28
|
+
}, M = se("PROMOTION", X()), x = ee(), f = oe(), { global: R, minor: _ } = Z, c = S({
|
|
28
29
|
searchKey: "",
|
|
29
30
|
location: null
|
|
30
|
-
}),
|
|
31
|
+
}), l = q(
|
|
31
32
|
() => f.campaigns.promotion.filter(
|
|
32
|
-
(e) => !
|
|
33
|
+
(e) => !c.value.location || !e.targetLocation || e.targetLocation.includes(c.value.location)
|
|
33
34
|
)
|
|
34
35
|
), K = [
|
|
35
36
|
{
|
|
@@ -65,13 +66,17 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
65
66
|
}
|
|
66
67
|
], C = S();
|
|
67
68
|
async function F(e) {
|
|
68
|
-
await I.remove(
|
|
69
|
+
await I.remove(
|
|
70
|
+
t("connect.promotion.confirmRemove", { name: e.name })
|
|
71
|
+
) && await _(
|
|
69
72
|
async () => {
|
|
70
73
|
await u.delete(e._id), await f.read("PROMOTION");
|
|
71
74
|
},
|
|
72
75
|
{
|
|
73
|
-
message: t("promotion.removing", { name: e.name }),
|
|
74
|
-
successMessage: t("promotion.removedSuccessfully", {
|
|
76
|
+
message: t("connect.promotion.removing", { name: e.name }),
|
|
77
|
+
successMessage: t("connect.promotion.removedSuccessfully", {
|
|
78
|
+
name: e.name
|
|
79
|
+
})
|
|
75
80
|
}
|
|
76
81
|
);
|
|
77
82
|
}
|
|
@@ -95,9 +100,11 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
95
100
|
e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await f.read("PROMOTION");
|
|
96
101
|
},
|
|
97
102
|
{
|
|
98
|
-
message: t(
|
|
103
|
+
message: t(
|
|
104
|
+
e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
|
|
105
|
+
),
|
|
99
106
|
successMessage: t(
|
|
100
|
-
e.campaign._id ? "promotion.updatedSuccessfully" : "promotion.createdSuccessfully"
|
|
107
|
+
e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
|
|
101
108
|
)
|
|
102
109
|
}
|
|
103
110
|
);
|
|
@@ -128,27 +135,27 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
128
135
|
await x.readLocations(), await f.read("PROMOTION");
|
|
129
136
|
});
|
|
130
137
|
}), (e, n) => {
|
|
131
|
-
const p =
|
|
138
|
+
const p = r("FmPageHead"), d = r("FmSearch"), $ = r("FmTable"), D = r("FmChip"), k = r("FmButton"), U = r("FmListItem"), j = r("FmList"), E = r("FmCard");
|
|
132
139
|
return m(), h(w, null, [
|
|
133
|
-
|
|
140
|
+
i(p, {
|
|
134
141
|
title: a(t)("connect.promotion.title"),
|
|
135
|
-
actions: a(
|
|
142
|
+
actions: a(l).length > 0 ? [T, B] : [],
|
|
136
143
|
"onClick:action": A
|
|
137
144
|
}, null, 8, ["title", "actions"]),
|
|
138
|
-
s("div",
|
|
139
|
-
|
|
140
|
-
modelValue:
|
|
141
|
-
"onUpdate:modelValue": n[0] || (n[0] = (o) =>
|
|
145
|
+
s("div", ce, [
|
|
146
|
+
i(d, {
|
|
147
|
+
modelValue: c.value.searchKey,
|
|
148
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => c.value.searchKey = o),
|
|
142
149
|
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
143
150
|
placeholder: a(t)("connect.promotion.search"),
|
|
144
151
|
collapsible: ""
|
|
145
152
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
146
|
-
a(
|
|
147
|
-
s("div",
|
|
148
|
-
s("div",
|
|
149
|
-
|
|
150
|
-
modelValue:
|
|
151
|
-
"onUpdate:modelValue": n[1] || (n[1] = (o) =>
|
|
153
|
+
a(l) && a(l).length > 0 ? (m(), h(w, { key: 0 }, [
|
|
154
|
+
s("div", ie, [
|
|
155
|
+
s("div", re, [
|
|
156
|
+
i(ne, {
|
|
157
|
+
modelValue: c.value.location,
|
|
158
|
+
"onUpdate:modelValue": n[1] || (n[1] = (o) => c.value.location = o),
|
|
152
159
|
label: a(t)("connect.promotion.location"),
|
|
153
160
|
"show-item-label": !0,
|
|
154
161
|
icon: "storefront",
|
|
@@ -156,37 +163,37 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
156
163
|
items: a(x).locationItems
|
|
157
164
|
}, null, 8, ["modelValue", "label", "items"])
|
|
158
165
|
]),
|
|
159
|
-
|
|
160
|
-
modelValue:
|
|
161
|
-
"onUpdate:modelValue": n[2] || (n[2] = (o) =>
|
|
166
|
+
i(d, {
|
|
167
|
+
modelValue: c.value.searchKey,
|
|
168
|
+
"onUpdate:modelValue": n[2] || (n[2] = (o) => c.value.searchKey = o),
|
|
162
169
|
class: "xs:hidden",
|
|
163
170
|
placeholder: "search",
|
|
164
171
|
collapsible: ""
|
|
165
172
|
}, null, 8, ["modelValue"])
|
|
166
173
|
]),
|
|
167
|
-
|
|
174
|
+
i($, {
|
|
168
175
|
class: "xs:hidden",
|
|
169
|
-
"row-data": a(
|
|
176
|
+
"row-data": a(l),
|
|
170
177
|
"column-defs": K,
|
|
171
|
-
"search-value":
|
|
178
|
+
"search-value": c.value.searchKey,
|
|
172
179
|
"column-filter": [],
|
|
173
180
|
onRowClick: n[3] || (n[3] = (o) => y(o.original)),
|
|
174
|
-
"hide-footer": a(
|
|
181
|
+
"hide-footer": a(l).length < 10
|
|
175
182
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
176
|
-
|
|
183
|
+
i(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
177
184
|
default: v(() => [
|
|
178
|
-
(m(!0), h(w, null, J(a(
|
|
179
|
-
(o) => o.name.toLowerCase().includes(
|
|
185
|
+
(m(!0), h(w, null, J(a(l).filter(
|
|
186
|
+
(o) => o.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
|
|
180
187
|
), (o) => (m(), b(U, {
|
|
181
188
|
key: o._id.toString(),
|
|
182
189
|
onClick: (P) => y(o),
|
|
183
190
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
184
191
|
}, {
|
|
185
192
|
default: v(() => [
|
|
186
|
-
s("div",
|
|
193
|
+
s("div", le, [
|
|
187
194
|
s("div", me, [
|
|
188
195
|
(m(), b(Q(a(V)(o)))),
|
|
189
|
-
|
|
196
|
+
i(D, {
|
|
190
197
|
class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
191
198
|
compact: !0,
|
|
192
199
|
label: `${a(O).title(o.effect.options.target)} promotion`
|
|
@@ -197,7 +204,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
197
204
|
s("div", ue, g(a(L)(o.effect)), 1)
|
|
198
205
|
])
|
|
199
206
|
]),
|
|
200
|
-
|
|
207
|
+
i(k, {
|
|
201
208
|
icon: "delete",
|
|
202
209
|
"icon-color": "neutral-gray-400",
|
|
203
210
|
variant: "tertiary",
|
|
@@ -223,7 +230,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
223
230
|
s("div", ye, g(a(t)("connect.promotion.createPromotionCampaign")), 1),
|
|
224
231
|
s("div", ge, g(a(t)("connect.promotion.description")), 1)
|
|
225
232
|
]),
|
|
226
|
-
|
|
233
|
+
i(k, {
|
|
227
234
|
variant: "primary",
|
|
228
235
|
label: a(t)("connect.promotion.createPromotionCampaign"),
|
|
229
236
|
icon: "add",
|
|
@@ -233,7 +240,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
233
240
|
_: 1
|
|
234
241
|
}))
|
|
235
242
|
]),
|
|
236
|
-
|
|
243
|
+
i(ae, {
|
|
237
244
|
ref_key: "sheetRef",
|
|
238
245
|
ref: C,
|
|
239
246
|
"onSubmit:modelValue": N
|
|
@@ -243,5 +250,5 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
243
250
|
}
|
|
244
251
|
});
|
|
245
252
|
export {
|
|
246
|
-
|
|
253
|
+
Te as default
|
|
247
254
|
};
|