@feedmepos/mf-connect 0.1.0-beta.3 → 0.1.0-beta.31
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-C-QC9ivZ.js +424 -0
- package/dist/{App-gzbM97vW.js → App-NASVRSh2.js} +397 -384
- package/dist/{Broadcast-BwYZkTs0.js → Broadcast-Cffg7nbY.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DIh9rz6T.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CA4kVwMl.js} +8 -8
- package/dist/Card-CmYFb1_Y.js +897 -0
- package/dist/{Collections-Df6tlo8S.js → Collections-CibvGIpU.js} +4 -4
- package/dist/{Credit-BPel8vA9.js → Credit-Ck6i9ySs.js} +14 -14
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B35zbHHI.js +2198 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BT8ucS5G.js → EffectSheet.vue_vue_type_style_index_0_lang-CQV77_cx.js} +8 -8
- package/dist/{Experience-CPpz1Zwx.js → Experience-CWUX2QvS.js} +8 -8
- package/dist/{Game-ByLblISC.js → Game-D3cdZrlc.js} +15 -15
- package/dist/Index-CWLZiYXT.js +255 -0
- package/dist/Marketing-Bol8eY5d.js +20070 -0
- package/dist/{Member-CCc_FEZY.js → Member-Cso-T2Xk.js} +4 -4
- package/dist/MemberList-Bqns9wko.js +1045 -0
- package/dist/{MemberTransactions-DD5ahSbY.js → MemberTransactions-zNw-30Xu.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DSPvWk4C.js → MessageInput.vue_vue_type_script_setup_true_lang-BLS5fNr6.js} +2 -2
- package/dist/{Mission-VH4057I-.js → Mission-C0-K0A_5.js} +98 -86
- package/dist/Overview-fZ9NvFKz.js +1024 -0
- package/dist/{Point-Bu3IlpH4.js → Point-D3gGhQlP.js} +23 -23
- package/dist/{Promotion-B45AOHis.js → Promotion-COCJIfu-.js} +53 -47
- package/dist/Record-C0a4Cn1U.js +209 -0
- package/dist/Reward-D0G4CBYd.js +411 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-zSOwxAcS.js +151 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AmIdaAeX.js +1639 -0
- package/dist/Segment-eBM3aveX.js +567 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BgMuKAjE.js +181 -0
- package/dist/{Setting-CF09eRQJ.js → Setting-Dfye6fs5.js} +8 -8
- package/dist/Store-rQfwc8d6.js +1745 -0
- package/dist/{StoreRewards-0iGExjqQ.js → StoreRewards-DVTNMWdG.js} +12 -12
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-3dvBoXz2.js +957 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BEfxin47.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DxGIUrmO.js} +1 -1
- package/dist/{Tier-IaeWe7rM.js → Tier-DekrYu5l.js} +327 -317
- package/dist/{Title-DD67Zxh5.js → Title-oAWsBqoM.js} +199 -183
- package/dist/{Transaction-BsPDnLzB.js → Transaction-Ss2XCksi.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BMIqnBts.js +130 -0
- package/dist/{Voucher-M7JfcKo0.js → Voucher-CjPJxdw8.js} +31 -31
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DlWCpoOp.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-k0lprU2i.js → ZodTextField.vue_vue_type_script_setup_true_lang-FXQNhMrv.js} +1 -1
- package/dist/{app-HFICF0vL.js → app-C_zlbFNe.js} +1285 -1283
- package/dist/{app-DwujUNP-.js → app-WUJQRyEM.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-BaF1QJXa.js → business-C0e_E2xp.js} +1 -1
- package/dist/{campaign-CTDtmAE9.js → campaign-iWzbtNA5.js} +2 -2
- package/dist/collectible.enum-QITAo8Jg.js +19 -0
- package/dist/{collection.fn-DMW03W4R.js → collection.fn-R3hvasuZ.js} +2 -2
- package/dist/{dto-gpaNZHzQ.js → dto-D_tjJ72q.js} +78 -86
- package/dist/{effect-CBUmtwet.js → effect-_bpW5fmr.js} +9 -9
- package/dist/email-addresses-DUKn8uD0.js +705 -0
- package/dist/{export-Bdh_PbsW.js → export-CEBWZ8ko.js} +3 -3
- package/dist/{helper-Cu9elRvl.js → helper-CuF45pbY.js} +1 -1
- package/dist/{index-NXiDu42U.js → index-BO8RnVxy.js} +1 -1
- package/dist/{index-CArqG03W.js → index-BPc3wxOE.js} +39 -35
- package/dist/index-BXTQ6onZ.js +1067 -0
- package/dist/index-C4aPU80a.js +38 -0
- package/dist/{index-At6yms5t.js → index-CBzSPD25.js} +30 -26
- package/dist/{index-Ch6XwPzF.js → index-CR0ZVZQG.js} +1 -1
- package/dist/{index-DrGrOgZB.js → index-CXFwMV0s.js} +13 -1
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-Dfdg2Q3E.js → index-Dh6xIUXJ.js} +1 -1
- package/dist/{index-ogzk-Mj4.js → index-LMvyNoHf.js} +1 -1
- package/dist/{index-Crw-Vgo5.js → index-S6sFiBxK.js} +1500 -1479
- package/dist/index-SpDFfOz_.js +54 -0
- package/dist/{index-CtH2S49l.js → index-Urbp7cdO.js} +203 -195
- package/dist/index-pHbs1GrF.js +29000 -0
- package/dist/{index.esm2017-CeJpvUbA.js → index.esm2017-BunOalUj.js} +33 -33
- package/dist/{loading-Cn8ml_vy.js → loading-CYFsZ9UB.js} +591 -597
- package/dist/{membership-CX4AKMlH.js → membership-C9089j0H.js} +51 -43
- package/dist/money-D-zGFohv.js +15 -0
- package/dist/number-UFl4zW6h.js +12 -0
- package/dist/objectid-BKIyQ5iE.js +145 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-LYKGLzXz.js +36 -0
- package/dist/{rule-Cv83Y59R.js → rule-BUUKmR4_.js} +180 -177
- package/dist/{rule-builder-Dew4yB5Q.js → rule-builder-9JUuOcMH.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CSnbgM1o.js → template-CkXuF0cN.js} +5 -5
- package/dist/trigger-DjAx9efN.js +114 -0
- package/dist/user-DbsZta3D.js +54 -0
- package/dist/{vue-i18n-CNH_IhVd.js → vue-i18n-yYO72Mbp.js} +2 -2
- package/dist/{xlsx-D4DUZHix.js → xlsx-Dagi6ArS.js} +1 -1
- package/package.json +8 -7
- package/dist/Analytic-BC5BA6pN.js +0 -622
- package/dist/Card-CBYQGKwY.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-PsrS7I0r.js +0 -2809
- package/dist/Marketing-D0vm80e_.js +0 -316
- package/dist/MemberList-CrnipE9y.js +0 -1733
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ijc2OYh9.js +0 -1753
- package/dist/Segment-ZWsp48aC.js +0 -437
- package/dist/Store-B_G6Dhmq.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CaxUr9zl.js +0 -890
- package/dist/index-8MaN7rez.js +0 -762
- package/dist/index-BjdHxGDn.js +0 -298
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-RP0XOPRL.js +0 -29193
- package/dist/money-BTejgvKu.js +0 -15
- package/dist/number-Cen5TucC.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,15 +1,15 @@
|
|
|
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, u as W } from "./loading-
|
|
5
|
-
import { u as X } from "./business-
|
|
6
|
-
import { u as Y } from "./campaign-
|
|
7
|
-
import { g as
|
|
4
|
+
import { p as Q, u as W } from "./loading-CYFsZ9UB.js";
|
|
5
|
+
import { u as X } from "./business-C0e_E2xp.js";
|
|
6
|
+
import { u as Y } from "./campaign-iWzbtNA5.js";
|
|
7
|
+
import { g as V, a as I } from "./dto-D_tjJ72q.js";
|
|
8
8
|
import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
9
|
-
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as te } from "./template-
|
|
11
|
-
import { u as oe } from "./vue-i18n-
|
|
12
|
-
import { c as _ } from "./index-
|
|
9
|
+
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-B35zbHHI.js";
|
|
10
|
+
import { u as te } from "./template-CkXuF0cN.js";
|
|
11
|
+
import { u as oe } from "./vue-i18n-yYO72Mbp.js";
|
|
12
|
+
import { c as _ } from "./index-BO8RnVxy.js";
|
|
13
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" }, Be = /* @__PURE__ */ j({
|
|
14
14
|
__name: "Point",
|
|
15
15
|
setup(he) {
|
|
@@ -20,7 +20,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
20
20
|
value: "create",
|
|
21
21
|
isPrimary: !0,
|
|
22
22
|
prependIcon: "add"
|
|
23
|
-
}, $ = te("COIN", G()),
|
|
23
|
+
}, $ = te("COIN", G()), h = X(), m = Y(), { global: K, minor: C } = W, i = P({
|
|
24
24
|
searchKey: "",
|
|
25
25
|
location: null
|
|
26
26
|
}), u = A(
|
|
@@ -35,12 +35,12 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
35
35
|
{
|
|
36
36
|
header: s("connect.program.common.table.status"),
|
|
37
37
|
cell(e) {
|
|
38
|
-
return
|
|
38
|
+
return V(e.row.original);
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
header: s("connect.program.common.table.summary"),
|
|
43
|
-
accessorFn: (e) =>
|
|
43
|
+
accessorFn: (e) => I(e)
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
header: s("connect.program.common.table.actions"),
|
|
@@ -55,7 +55,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
], v =
|
|
58
|
+
], v = P();
|
|
59
59
|
async function F(e) {
|
|
60
60
|
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await C(
|
|
61
61
|
async () => {
|
|
@@ -98,10 +98,10 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
98
98
|
});
|
|
99
99
|
}), (e, o) => {
|
|
100
100
|
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(),
|
|
101
|
+
return d(), w(b, null, [
|
|
102
102
|
r(y, {
|
|
103
103
|
title: t(s)("connect.program.point.title"),
|
|
104
|
-
actions: t(u).length > 0 ? [B] : [],
|
|
104
|
+
actions: t(u).length > 0 && t(h).isPremium ? [B] : [],
|
|
105
105
|
"onClick:action": o[0] || (o[0] = () => f())
|
|
106
106
|
}, {
|
|
107
107
|
title: g(() => [
|
|
@@ -120,7 +120,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
120
120
|
placeholder: "search",
|
|
121
121
|
collapsible: ""
|
|
122
122
|
}, null, 8, ["modelValue"]),
|
|
123
|
-
t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(),
|
|
123
|
+
t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(), w(b, { key: 0 }, [
|
|
124
124
|
n("div", ie, [
|
|
125
125
|
n("div", re, [
|
|
126
126
|
r(Z, {
|
|
@@ -130,7 +130,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
130
130
|
"show-item-label": !0,
|
|
131
131
|
icon: "storefront",
|
|
132
132
|
placement: "bottom-start",
|
|
133
|
-
items: t(
|
|
133
|
+
items: t(h).locationItems
|
|
134
134
|
}, null, 8, ["modelValue", "items"])
|
|
135
135
|
]),
|
|
136
136
|
r(k, {
|
|
@@ -152,9 +152,9 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
152
152
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
153
153
|
r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
154
154
|
default: g(() => [
|
|
155
|
-
(d(!0),
|
|
155
|
+
(d(!0), w(b, null, H(t(u).filter(
|
|
156
156
|
(a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
157
|
-
), (a) => (d(),
|
|
157
|
+
), (a) => (d(), x(U, {
|
|
158
158
|
key: a._id.toString(),
|
|
159
159
|
onClick: (L) => f(a),
|
|
160
160
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
@@ -162,12 +162,12 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
162
162
|
default: g(() => [
|
|
163
163
|
n("div", le, [
|
|
164
164
|
n("div", ce, [
|
|
165
|
-
(d(),
|
|
165
|
+
(d(), x(q(t(V)(a)))),
|
|
166
166
|
n("div", me, c(t(s)("program.point.used", { count: a.currentReceive ?? 0 })), 1)
|
|
167
167
|
]),
|
|
168
168
|
n("div", de, [
|
|
169
169
|
n("div", pe, c(a.name), 1),
|
|
170
|
-
n("div", ue, c(t(
|
|
170
|
+
n("div", ue, c(t(I)(a)), 1)
|
|
171
171
|
]),
|
|
172
172
|
n("div", fe, " Point received: " + c(a.currentReceive ?? 0), 1)
|
|
173
173
|
]),
|
|
@@ -183,7 +183,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
183
183
|
]),
|
|
184
184
|
_: 1
|
|
185
185
|
})
|
|
186
|
-
], 64)) : (d(),
|
|
186
|
+
], 64)) : (d(), x(T, {
|
|
187
187
|
key: 1,
|
|
188
188
|
variant: "outlined",
|
|
189
189
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
@@ -200,7 +200,7 @@ const ae = { class: "flex items-center" }, ne = { class: "fm-typo-en-title-md-60
|
|
|
200
200
|
r(S, {
|
|
201
201
|
variant: "primary",
|
|
202
202
|
label: "Create point program",
|
|
203
|
-
disabled: !t(
|
|
203
|
+
disabled: !t(h).isPremium,
|
|
204
204
|
icon: "add",
|
|
205
205
|
onClick: o[5] || (o[5] = (a) => f())
|
|
206
206
|
}, null, 8, ["disabled"])
|
|
@@ -1,17 +1,17 @@
|
|
|
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, u as Z } from "./loading-
|
|
5
|
-
import { u as ee } from "./business-
|
|
6
|
-
import { u as oe } from "./campaign-
|
|
7
|
-
import { u as te } from "./vue-i18n-
|
|
8
|
-
import { g as V } from "./dto-
|
|
9
|
-
import { e as L } from "./effect-
|
|
4
|
+
import { c as O, p as I, u as Z } from "./loading-CYFsZ9UB.js";
|
|
5
|
+
import { u as ee } from "./business-C0e_E2xp.js";
|
|
6
|
+
import { u as oe } from "./campaign-iWzbtNA5.js";
|
|
7
|
+
import { u as te } from "./vue-i18n-yYO72Mbp.js";
|
|
8
|
+
import { g as V } from "./dto-D_tjJ72q.js";
|
|
9
|
+
import { e as L } from "./effect-_bpW5fmr.js";
|
|
10
10
|
import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
11
|
-
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { u as se } from "./template-
|
|
13
|
-
import { c as u } from "./index-
|
|
14
|
-
const
|
|
11
|
+
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-B35zbHHI.js";
|
|
12
|
+
import { u as se } from "./template-CkXuF0cN.js";
|
|
13
|
+
import { c as u } from "./index-BO8RnVxy.js";
|
|
14
|
+
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" }, Le = /* @__PURE__ */ H({
|
|
15
15
|
__name: "Promotion",
|
|
16
16
|
setup(_e) {
|
|
17
17
|
const { t } = te(), T = {
|
|
@@ -24,12 +24,12 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
24
24
|
value: "sync",
|
|
25
25
|
isPrimary: !1,
|
|
26
26
|
prependIcon: "refresh"
|
|
27
|
-
}, M = se("PROMOTION", X()), x = ee(), f = oe(), { global: R, minor: _ } = Z,
|
|
27
|
+
}, M = se("PROMOTION", X()), x = ee(), f = oe(), { global: R, minor: _ } = Z, c = S({
|
|
28
28
|
searchKey: "",
|
|
29
29
|
location: null
|
|
30
|
-
}),
|
|
30
|
+
}), l = q(
|
|
31
31
|
() => f.campaigns.promotion.filter(
|
|
32
|
-
(e) => !
|
|
32
|
+
(e) => !c.value.location || !e.targetLocation || e.targetLocation.includes(c.value.location)
|
|
33
33
|
)
|
|
34
34
|
), K = [
|
|
35
35
|
{
|
|
@@ -65,13 +65,17 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
65
65
|
}
|
|
66
66
|
], C = S();
|
|
67
67
|
async function F(e) {
|
|
68
|
-
await I.remove(
|
|
68
|
+
await I.remove(
|
|
69
|
+
t("connect.promotion.confirmRemove", { name: e.name })
|
|
70
|
+
) && await _(
|
|
69
71
|
async () => {
|
|
70
72
|
await u.delete(e._id), await f.read("PROMOTION");
|
|
71
73
|
},
|
|
72
74
|
{
|
|
73
|
-
message: t("promotion.removing", { name: e.name }),
|
|
74
|
-
successMessage: t("promotion.removedSuccessfully", {
|
|
75
|
+
message: t("connect.promotion.removing", { name: e.name }),
|
|
76
|
+
successMessage: t("connect.promotion.removedSuccessfully", {
|
|
77
|
+
name: e.name
|
|
78
|
+
})
|
|
75
79
|
}
|
|
76
80
|
);
|
|
77
81
|
}
|
|
@@ -95,9 +99,11 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
95
99
|
e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await f.read("PROMOTION");
|
|
96
100
|
},
|
|
97
101
|
{
|
|
98
|
-
message: t(
|
|
102
|
+
message: t(
|
|
103
|
+
e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
|
|
104
|
+
),
|
|
99
105
|
successMessage: t(
|
|
100
|
-
e.campaign._id ? "promotion.updatedSuccessfully" : "promotion.createdSuccessfully"
|
|
106
|
+
e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
|
|
101
107
|
)
|
|
102
108
|
}
|
|
103
109
|
);
|
|
@@ -128,27 +134,27 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
128
134
|
await x.readLocations(), await f.read("PROMOTION");
|
|
129
135
|
});
|
|
130
136
|
}), (e, n) => {
|
|
131
|
-
const p =
|
|
137
|
+
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
138
|
return m(), h(w, null, [
|
|
133
|
-
|
|
139
|
+
i(p, {
|
|
134
140
|
title: a(t)("connect.promotion.title"),
|
|
135
|
-
actions: a(
|
|
141
|
+
actions: a(l).length > 0 ? [T, B] : [],
|
|
136
142
|
"onClick:action": A
|
|
137
143
|
}, null, 8, ["title", "actions"]),
|
|
138
|
-
s("div",
|
|
139
|
-
|
|
140
|
-
modelValue:
|
|
141
|
-
"onUpdate:modelValue": n[0] || (n[0] = (o) =>
|
|
144
|
+
s("div", ce, [
|
|
145
|
+
i(d, {
|
|
146
|
+
modelValue: c.value.searchKey,
|
|
147
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => c.value.searchKey = o),
|
|
142
148
|
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
143
149
|
placeholder: a(t)("connect.promotion.search"),
|
|
144
150
|
collapsible: ""
|
|
145
151
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
146
|
-
a(
|
|
147
|
-
s("div",
|
|
148
|
-
s("div",
|
|
149
|
-
|
|
150
|
-
modelValue:
|
|
151
|
-
"onUpdate:modelValue": n[1] || (n[1] = (o) =>
|
|
152
|
+
a(l) && a(l).length > 0 ? (m(), h(w, { key: 0 }, [
|
|
153
|
+
s("div", ie, [
|
|
154
|
+
s("div", re, [
|
|
155
|
+
i(ne, {
|
|
156
|
+
modelValue: c.value.location,
|
|
157
|
+
"onUpdate:modelValue": n[1] || (n[1] = (o) => c.value.location = o),
|
|
152
158
|
label: a(t)("connect.promotion.location"),
|
|
153
159
|
"show-item-label": !0,
|
|
154
160
|
icon: "storefront",
|
|
@@ -156,37 +162,37 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
156
162
|
items: a(x).locationItems
|
|
157
163
|
}, null, 8, ["modelValue", "label", "items"])
|
|
158
164
|
]),
|
|
159
|
-
|
|
160
|
-
modelValue:
|
|
161
|
-
"onUpdate:modelValue": n[2] || (n[2] = (o) =>
|
|
165
|
+
i(d, {
|
|
166
|
+
modelValue: c.value.searchKey,
|
|
167
|
+
"onUpdate:modelValue": n[2] || (n[2] = (o) => c.value.searchKey = o),
|
|
162
168
|
class: "xs:hidden",
|
|
163
169
|
placeholder: "search",
|
|
164
170
|
collapsible: ""
|
|
165
171
|
}, null, 8, ["modelValue"])
|
|
166
172
|
]),
|
|
167
|
-
|
|
173
|
+
i($, {
|
|
168
174
|
class: "xs:hidden",
|
|
169
|
-
"row-data": a(
|
|
175
|
+
"row-data": a(l),
|
|
170
176
|
"column-defs": K,
|
|
171
|
-
"search-value":
|
|
177
|
+
"search-value": c.value.searchKey,
|
|
172
178
|
"column-filter": [],
|
|
173
179
|
onRowClick: n[3] || (n[3] = (o) => y(o.original)),
|
|
174
|
-
"hide-footer": a(
|
|
180
|
+
"hide-footer": a(l).length < 10
|
|
175
181
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
176
|
-
|
|
182
|
+
i(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
177
183
|
default: v(() => [
|
|
178
|
-
(m(!0), h(w, null, J(a(
|
|
179
|
-
(o) => o.name.toLowerCase().includes(
|
|
184
|
+
(m(!0), h(w, null, J(a(l).filter(
|
|
185
|
+
(o) => o.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
|
|
180
186
|
), (o) => (m(), b(U, {
|
|
181
187
|
key: o._id.toString(),
|
|
182
188
|
onClick: (P) => y(o),
|
|
183
189
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
184
190
|
}, {
|
|
185
191
|
default: v(() => [
|
|
186
|
-
s("div",
|
|
192
|
+
s("div", le, [
|
|
187
193
|
s("div", me, [
|
|
188
194
|
(m(), b(Q(a(V)(o)))),
|
|
189
|
-
|
|
195
|
+
i(D, {
|
|
190
196
|
class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
|
|
191
197
|
compact: !0,
|
|
192
198
|
label: `${a(O).title(o.effect.options.target)} promotion`
|
|
@@ -197,7 +203,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
197
203
|
s("div", ue, g(a(L)(o.effect)), 1)
|
|
198
204
|
])
|
|
199
205
|
]),
|
|
200
|
-
|
|
206
|
+
i(k, {
|
|
201
207
|
icon: "delete",
|
|
202
208
|
"icon-color": "neutral-gray-400",
|
|
203
209
|
variant: "tertiary",
|
|
@@ -223,7 +229,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
223
229
|
s("div", ye, g(a(t)("connect.promotion.createPromotionCampaign")), 1),
|
|
224
230
|
s("div", ge, g(a(t)("connect.promotion.description")), 1)
|
|
225
231
|
]),
|
|
226
|
-
|
|
232
|
+
i(k, {
|
|
227
233
|
variant: "primary",
|
|
228
234
|
label: a(t)("connect.promotion.createPromotionCampaign"),
|
|
229
235
|
icon: "add",
|
|
@@ -233,7 +239,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-
|
|
|
233
239
|
_: 1
|
|
234
240
|
}))
|
|
235
241
|
]),
|
|
236
|
-
|
|
242
|
+
i(ae, {
|
|
237
243
|
ref_key: "sheetRef",
|
|
238
244
|
ref: C,
|
|
239
245
|
"onSubmit:modelValue": N
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { defineComponent as b, ref as w, resolveComponent as y, openBlock as R, createBlock as z, unref as o, isRef as A, withCtx as I, createElementVNode as F, createVNode as C, h as c, onMounted as M, createElementBlock as N, Fragment as V } from "vue";
|
|
2
|
+
import { u as $, _ as U } from "./usePagination-BeF5K3M7.js";
|
|
3
|
+
import { g as v } from "./user-DbsZta3D.js";
|
|
4
|
+
import { components as g } from "@feedmepos/ui-library";
|
|
5
|
+
import { u as B, a as E, c as L } from "./loading-CYFsZ9UB.js";
|
|
6
|
+
import { u as T } from "./vue-i18n-yYO72Mbp.js";
|
|
7
|
+
import { useCoreStore as O } from "@feedmepos/mf-common";
|
|
8
|
+
import { r as P } from "./index-C4aPU80a.js";
|
|
9
|
+
import { c as K, a as W } from "./object-qECH92oz.js";
|
|
10
|
+
import { u as j } from "./membership-C9089j0H.js";
|
|
11
|
+
const q = { class: "flex flex-col space-y-16 pr-12" }, G = /* @__PURE__ */ b({
|
|
12
|
+
__name: "UpdateCriteriaProgressSheet",
|
|
13
|
+
emits: ["refresh"],
|
|
14
|
+
setup(k, { expose: p, emit: h }) {
|
|
15
|
+
const u = h;
|
|
16
|
+
T();
|
|
17
|
+
const { minor: _ } = B, n = w(!1), a = w({}), S = O(), e = [
|
|
18
|
+
{
|
|
19
|
+
header: "Criteria title",
|
|
20
|
+
accessorFn: (i) => i.name
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
header: "Status",
|
|
24
|
+
cell(i) {
|
|
25
|
+
var x;
|
|
26
|
+
const t = i.row.original, l = (x = a.value.criteria_progress) == null ? void 0 : x.find(
|
|
27
|
+
(D) => D.criteria === t._id
|
|
28
|
+
), d = l ? "Completed" : "Pending", m = l ? "text-fm-color-typo-success bg-fm-color-system-success-100" : "text-fm-color-typo-warning bg-fm-color-system-warning-100";
|
|
29
|
+
return [
|
|
30
|
+
c(g.FmChip, {
|
|
31
|
+
label: d,
|
|
32
|
+
compact: !0,
|
|
33
|
+
class: m
|
|
34
|
+
})
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "actions",
|
|
40
|
+
cell(i) {
|
|
41
|
+
var d;
|
|
42
|
+
const t = i.row.original;
|
|
43
|
+
return [
|
|
44
|
+
!((d = a.value.criteria_progress) == null ? void 0 : d.some(
|
|
45
|
+
(m) => m.criteria === t._id
|
|
46
|
+
)) && t.type == "MANUAL" ? c(g.FmButton, {
|
|
47
|
+
variant: "secondary",
|
|
48
|
+
label: "Mark as completed",
|
|
49
|
+
size: "md",
|
|
50
|
+
onClick: (m) => {
|
|
51
|
+
m.stopPropagation(), r(t._id.toString());
|
|
52
|
+
}
|
|
53
|
+
}) : null
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
async function r(i) {
|
|
59
|
+
var l;
|
|
60
|
+
const t = K(W(a.value));
|
|
61
|
+
t.criteria_progress = [
|
|
62
|
+
{
|
|
63
|
+
criteria: i,
|
|
64
|
+
ref: `ADMIN:${(l = S.user) == null ? void 0 : l.id}:${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
65
|
+
completedAt: /* @__PURE__ */ new Date()
|
|
66
|
+
}
|
|
67
|
+
], _(
|
|
68
|
+
async () => {
|
|
69
|
+
await P.updateCriteriaProgress(
|
|
70
|
+
a.value._id,
|
|
71
|
+
t
|
|
72
|
+
), n.value = !1, u("refresh");
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
message: "Updating criteria progress",
|
|
76
|
+
successMessage: "Criteria progress updated successfully"
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function s(i, t) {
|
|
81
|
+
n.value = i, a.value = t;
|
|
82
|
+
}
|
|
83
|
+
function f() {
|
|
84
|
+
n.value = !1;
|
|
85
|
+
}
|
|
86
|
+
return p({
|
|
87
|
+
showSheet: s,
|
|
88
|
+
hideSheet: f,
|
|
89
|
+
data: a
|
|
90
|
+
}), (i, t) => {
|
|
91
|
+
const l = y("FmTable"), d = y("FmSideSheet");
|
|
92
|
+
return R(), z(d, {
|
|
93
|
+
"max-width": 768,
|
|
94
|
+
modelValue: o(n),
|
|
95
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => A(n) ? n.value = m : null),
|
|
96
|
+
header: "Referee Criteria"
|
|
97
|
+
}, {
|
|
98
|
+
default: I(() => [
|
|
99
|
+
F("div", q, [
|
|
100
|
+
C(l, {
|
|
101
|
+
"row-data": o(a).criteria,
|
|
102
|
+
"hide-footer": !0,
|
|
103
|
+
"page-size": 100,
|
|
104
|
+
"column-defs": e
|
|
105
|
+
}, null, 8, ["row-data"])
|
|
106
|
+
])
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}, 8, ["modelValue"]);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}), ae = /* @__PURE__ */ b({
|
|
113
|
+
__name: "Record",
|
|
114
|
+
setup(k) {
|
|
115
|
+
j();
|
|
116
|
+
const p = w(null), h = [
|
|
117
|
+
{
|
|
118
|
+
header: "ID",
|
|
119
|
+
meta: {
|
|
120
|
+
maxWidth: "100px"
|
|
121
|
+
},
|
|
122
|
+
cell(e) {
|
|
123
|
+
return c("div", { class: "flex items-center" }, [
|
|
124
|
+
c(g.FmIcon, {
|
|
125
|
+
name: "content_copy",
|
|
126
|
+
outline: !0,
|
|
127
|
+
size: "sm",
|
|
128
|
+
class: "cursor-pointer mr-4",
|
|
129
|
+
onClick: (r) => {
|
|
130
|
+
r.preventDefault(), r.stopPropagation(), E(e.row.original._id.toString());
|
|
131
|
+
}
|
|
132
|
+
}),
|
|
133
|
+
c(
|
|
134
|
+
"div",
|
|
135
|
+
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
136
|
+
e.row.original._id.toString()
|
|
137
|
+
)
|
|
138
|
+
]);
|
|
139
|
+
},
|
|
140
|
+
enableSorting: !1
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
header: "Referer info",
|
|
144
|
+
enableSorting: !0,
|
|
145
|
+
cell(e) {
|
|
146
|
+
return e.row.original.pf_referer ? v(e.row.original.pf_referer, !0) : "N/A";
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
header: "Referee info",
|
|
151
|
+
enableSorting: !0,
|
|
152
|
+
cell(e) {
|
|
153
|
+
return e.row.original.pf_referee ? v(e.row.original.pf_referee, !0) : "N/A";
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
header: "Referee criteria",
|
|
158
|
+
accessorKey: "criteria",
|
|
159
|
+
id: "criteria",
|
|
160
|
+
cell(e) {
|
|
161
|
+
const r = e.row.original.criteria_progress.length, s = e.row.original.criteria.length;
|
|
162
|
+
return s === 0 ? c("div", "No criteria") : c("div", `${r}/${s} completed criteria`);
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
header: "Status",
|
|
167
|
+
id: "status",
|
|
168
|
+
cell(e) {
|
|
169
|
+
const r = e.row.original.status;
|
|
170
|
+
return c(g.FmChip, {
|
|
171
|
+
label: L.title(r),
|
|
172
|
+
compact: !0,
|
|
173
|
+
class: r == "COMPLETED" ? "text-fm-color-typo-success bg-fm-color-system-success-100" : "text-fm-color-typo-primary bg-fm-color-system-primary-100"
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
], { tableMeta: u, rowData: _, onSort: n, debouncedFetchData: a, onSearch: S } = $(P.readRecords);
|
|
178
|
+
return M(async () => {
|
|
179
|
+
await a();
|
|
180
|
+
}), (e, r) => (R(), N(V, null, [
|
|
181
|
+
F("div", null, [
|
|
182
|
+
C(U, {
|
|
183
|
+
loading: o(u).isLoading,
|
|
184
|
+
"row-data": o(_),
|
|
185
|
+
"row-count": o(u).totalRows,
|
|
186
|
+
"column-defs": h,
|
|
187
|
+
"shrink-at": !1,
|
|
188
|
+
"page-count": o(u).pageCount,
|
|
189
|
+
"page-index": o(u).pageIndex,
|
|
190
|
+
"page-size": o(u).pageSize,
|
|
191
|
+
onSortChange: o(n),
|
|
192
|
+
onPageChange: r[0] || (r[0] = (s) => o(a)({ pageSize: s.pageSize, pageIndex: s.pageIndex })),
|
|
193
|
+
onRowClick: r[1] || (r[1] = (s) => {
|
|
194
|
+
var f;
|
|
195
|
+
return (f = o(p)) == null ? void 0 : f.showSheet(!0, s.original);
|
|
196
|
+
})
|
|
197
|
+
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
|
|
198
|
+
]),
|
|
199
|
+
C(G, {
|
|
200
|
+
ref_key: "updateCriteriaProgressSheetRef",
|
|
201
|
+
ref: p,
|
|
202
|
+
onRefresh: o(a)
|
|
203
|
+
}, null, 8, ["onRefresh"])
|
|
204
|
+
], 64));
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
export {
|
|
208
|
+
ae as default
|
|
209
|
+
};
|