@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.80
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-CJap-Cat.js → Analytic-LOK5TzX0.js} +31 -32
- package/dist/{App-CLTtX1QT.js → App-Bk5Z5u5_.js} +617 -607
- package/dist/AuditLogs-Rezf9EeA.js +1991 -0
- package/dist/{Bin-C2xMLxoE.js → Bin-B8yzS5bD.js} +10 -10
- package/dist/Broadcast-CZ0QCvua.js +266 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-iJQS2Ck9.js} +6 -6
- package/dist/{Card-BPrCNLQy.js → Card-BQOv5yB9.js} +145 -140
- package/dist/Collections-qenPlCd2.js +540 -0
- package/dist/Credit-BJLskbVu.js +260 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKWCWOU_.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dw1qQfnG.js +351 -0
- package/dist/Experience-BjfEiGT8.js +259 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-C013Tr1o.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
- package/dist/Game-Gw_tFjen.js +330 -0
- package/dist/Grab-Bdv7SaB9.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-Ba4L39GL.js} +49 -48
- package/dist/{Index-DMdNgISh.js → Index-C67U3YDJ.js} +54 -54
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-pQ8sF5KW.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-o-eN3J4i.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-DPjqCyJ5.js} +1 -1
- package/dist/Marketing-DtEooXof.js +166 -0
- package/dist/MarketingMaterialEdit-Balw055Y.js +1065 -0
- package/dist/{Member-CnSXGQi_.js → Member-QA7TQnyw.js} +38 -37
- package/dist/{MemberList-DcpEKV1D.js → MemberList-CSJQFYlh.js} +486 -491
- package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-D-46vda_.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-6a7_lw74.js} +13443 -10607
- package/dist/Mission-DJVxFbX5.js +334 -0
- package/dist/{Overview-elpi-jpI.js → Overview-Btkh3oiI.js} +24 -25
- package/dist/Point-CVdF9GtN.js +262 -0
- package/dist/Promotion-BtmlvUd3.js +396 -0
- package/dist/{Queue-GvBhNEFe.js → Queue-BfiCMsLC.js} +23 -24
- package/dist/{Record-CbSxgo8i.js → Record-B07QGPli.js} +10 -10
- package/dist/Review-BeZ90jW9.js +621 -0
- package/dist/ReviewFacebookCallback-CwAcKaib.js +243 -0
- package/dist/ReviewGoogleCallback-CVK6Yc5E.js +213 -0
- package/dist/{Reward-QCGlrq89.js → Reward-CyXqNpAa.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-BICsdgSh.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BgKGNK7y.js +1912 -0
- package/dist/{Segment-5PndnEUa.js → Segment-B9g57O7g.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-BwDOXE87.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DXDcJLYF.js} +12 -12
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CROBk6cD.js +226 -0
- package/dist/Setting-BHteqZv6.js +2039 -0
- package/dist/SettingAdvertisements-CubrbuSL.js +264 -0
- package/dist/Store-u6LYUnmp.js +1996 -0
- package/dist/StoreRewards-D9h0YnEx.js +535 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-vrYqDGOa.js +1129 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-WgNstmNx.js +7007 -0
- package/dist/{Tier-BKKxG29r.js → Tier-CBdi4sPT.js} +561 -480
- package/dist/{Title-CReZgw8V.js → Title-BegmN7hs.js} +151 -149
- package/dist/{Transaction-HWCmSVaJ.js → Transaction-C6XMd9_r.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BBf4BP4m.js} +7 -7
- package/dist/Voucher-D6hSas_z.js +421 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-ZOlAZ_q5.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bs8TNiCY.js} +2 -2
- package/dist/app-Duwed9mD.js +59309 -0
- package/dist/app.js +1 -1
- package/dist/{business-Bc-EMd2p.js → business-6oZ8Rgui.js} +11 -8
- package/dist/campaign-CzenWLhs.js +219 -0
- package/dist/campaign-PYce7g0o.js +253 -0
- package/dist/campaign.enum-KHniCp5a.js +26 -0
- package/dist/campaign.fn-dOSgHJcU.js +776 -0
- package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-BZA1DKIB.js} +1 -1
- package/dist/{collection.fn-AjDNdFe1.js → collection.fn-CyfrdKBf.js} +2 -2
- package/dist/dto-DYmM2ud_.js +222 -0
- package/dist/duplicateCampaign-BXaDK8Q6.js +51 -0
- package/dist/effect-DBI_JHbP.js +89 -0
- package/dist/{email-addresses-B0SzUCQM.js → email-addresses-BNs-WN79.js} +2 -2
- package/dist/{export-Bgz6WcNZ.js → export-DTCCKE2m.js} +4 -4
- package/dist/{helper-B1vFwohM.js → helper-CeYr7Anh.js} +22 -7
- package/dist/index-38u-cCwD.js +3431 -0
- package/dist/{index-Cm2sBagk.js → index-BdjY7GRO.js} +1 -1
- package/dist/index-CGMiuxyf.js +85 -0
- package/dist/index-CQZbm9P5.js +8912 -0
- package/dist/index-Cal60fAm.js +48 -0
- package/dist/{index-DT2viYsL.js → index-CnRLkzpg.js} +617 -191
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-CSQY21Zb.js → index-D-kPBF9C.js} +3 -3
- package/dist/{index-DVQnrex_.js → index-DcFYm1fy.js} +3 -3
- package/dist/index-DjONNxbl.js +30289 -0
- package/dist/{index-26SopNpv.js → index-ItaoypTr.js} +1 -1
- package/dist/index-_jxXI4_v.js +28899 -0
- package/dist/{index-DwT9RLst.js → index-nXfjG8UQ.js} +23 -12
- package/dist/{index-BIRmS75g.js → index-pHQfP2e7.js} +1 -1
- package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-CokFPnqn.js} +185 -185
- package/dist/{loading-C6Ouh0mG.js → loading-fZQi5zP8.js} +1 -1
- package/dist/{lodash-B5I3zXaY.js → lodash-R-DIRmbj.js} +1 -1
- package/dist/{membership-DU0BwIj8.js → membership-CApN5ZJ1.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-Bg7GuE5s.js → money-C6I6vVy2.js} +1 -1
- package/dist/{number-Ddmqo5D_.js → number-Dq4d381U.js} +1 -1
- package/dist/objectid-Kv5GREBk.js +145 -0
- package/dist/{campaign-BeF8kTyg.js → plugins-9_UvAdJ2.js} +784 -777
- package/dist/remy-NLAa-9Qg.js +46 -0
- package/dist/{reward-CN4gvn4c.js → reward-DXHGeGYY.js} +1 -1
- package/dist/{rule-CpiqqR0c.js → rule-B_XgRDr-.js} +505 -487
- package/dist/rule-builder-BMXyzu8k.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-CnyTUzQU.js +188 -0
- package/dist/timezone-Izs3ibB-.js +1156 -0
- package/dist/trigger-Dda3NmaE.js +213 -0
- package/dist/usePagination-Byxk4XVn.js +220 -0
- package/dist/user-BZxO8qdh.js +55 -0
- package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DDbkmbSf.js} +433 -433
- package/dist/{xlsx-qJHsnW7k.js → xlsx-D8yNl8dN.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-Xp7TePRP.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-DW4rwNOn.js +0 -1887
- package/dist/Broadcast-Dhc0j16O.js +0 -227
- package/dist/Collections-CsUJEmqz.js +0 -465
- package/dist/Credit-Mqa-0XJd.js +0 -222
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
- package/dist/Experience-BD5C3old.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-D4xsi8Ym.js +0 -278
- package/dist/Marketing-axcQYl8k.js +0 -20073
- package/dist/Mission-BHZiL-GH.js +0 -296
- package/dist/Point-gKvdggAl.js +0 -226
- package/dist/Promotion-7x2F_sFX.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
- package/dist/Setting-Cab47wfH.js +0 -1936
- package/dist/Store-BFL3T9B5.js +0 -1842
- package/dist/StoreRewards-C43dCJtM.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
- package/dist/Voucher-BhUAcPZg.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-BGaUIdCr.js +0 -7086
- package/dist/app-DccKBdW_.js +0 -33357
- package/dist/campaign-DbJZEU7P.js +0 -96
- package/dist/campaign.enum-PBKYGUQY.js +0 -20
- package/dist/campaign.fn-Cq-4LfQj.js +0 -758
- package/dist/dto-8NvMMYAb.js +0 -214
- package/dist/effect-DZhcEQ5g.js +0 -78
- package/dist/index-CQQedv0M.js +0 -32260
- package/dist/index-CTgQRqQR.js +0 -30038
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DGaywhpY.js +0 -76
- package/dist/index-DOfLDlI8.js +0 -8861
- package/dist/index-DVpAocyR.js +0 -3120
- package/dist/index-DlJGd8RC.js +0 -121
- package/dist/index-Dm65CTdy.js +0 -38
- package/dist/objectid-MCaJXAgq.js +0 -145
- package/dist/plugins-C-CRzeyC.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-DmkJng-x.js +0 -89
- package/dist/template-DTZgnkl5.js +0 -190
- package/dist/trigger-CPjJ73Rc.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-8VIt8A1x.js +0 -54
package/dist/Mission-BHZiL-GH.js
DELETED
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as w, computed as q, h as l, onMounted as z, resolveComponent as m, openBlock as p, createElementBlock as x, Fragment as v, createVNode as c, unref as t, createElementVNode as s, withCtx as C, renderList as W, createBlock as b, resolveDynamicComponent as G, toDisplayString as u } from "vue";
|
|
2
|
-
import { _ as J } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { u as Q } from "./loading-C6Ouh0mG.js";
|
|
4
|
-
import { g as X, a as B, b as P } from "./campaign-BeF8kTyg.js";
|
|
5
|
-
import { a as Y, p as Z } from "./plugins-C-CRzeyC.js";
|
|
6
|
-
import { u as ee } from "./business-Bc-EMd2p.js";
|
|
7
|
-
import { u as oe } from "./campaign-DbJZEU7P.js";
|
|
8
|
-
import { useDialog as te, components as _ } from "@feedmepos/ui-library";
|
|
9
|
-
import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
-
import { u as ae } from "./template-DTZgnkl5.js";
|
|
11
|
-
import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js";
|
|
12
|
-
import { s as ie } from "./index-CsaQJMAR.js";
|
|
13
|
-
import { u as ce } from "./vue-i18n-DVmD9I_o.js";
|
|
14
|
-
import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js";
|
|
15
|
-
import { c as h } from "./index-DlJGd8RC.js";
|
|
16
|
-
const le = { class: "px-24 flex flex-col gap-y-16" }, me = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, ue = { class: "flex w-full gap-4 items-center" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "flex flex-col gap-16 text-center" }, xe = { class: "fm-typo-en-title-sm-800" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ H({
|
|
17
|
-
__name: "Mission",
|
|
18
|
-
setup(Ce) {
|
|
19
|
-
const { t: n } = ce(), R = {
|
|
20
|
-
label: n("connect.program.common.actions.create", {
|
|
21
|
-
type: n("connect.program.mission.title").toLowerCase()
|
|
22
|
-
}),
|
|
23
|
-
value: "create",
|
|
24
|
-
isPrimary: !0,
|
|
25
|
-
prependIcon: "add"
|
|
26
|
-
}, S = te(), K = ae("MISSION", S), N = ee(), d = oe(), { global: T, minor: F } = Q, i = w({
|
|
27
|
-
searchKey: "",
|
|
28
|
-
location: null
|
|
29
|
-
}), f = q(
|
|
30
|
-
() => d.campaigns.mission.filter(
|
|
31
|
-
(e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
|
|
32
|
-
)
|
|
33
|
-
), U = [
|
|
34
|
-
{
|
|
35
|
-
header: n("connect.program.common.table.title"),
|
|
36
|
-
accessorKey: "name",
|
|
37
|
-
// accessorFn: (v) => v.name,
|
|
38
|
-
cell(e) {
|
|
39
|
-
return l("div", { class: "flex items-center justify-between gap-4" }, [
|
|
40
|
-
l("div", { class: "flex items-center" }, [
|
|
41
|
-
l(
|
|
42
|
-
_.FmTooltip,
|
|
43
|
-
{
|
|
44
|
-
content: e.row.original._id,
|
|
45
|
-
onClick: (o) => {
|
|
46
|
-
o.stopPropagation(), Y(e.row.original._id);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
[
|
|
50
|
-
l(_.FmIcon, {
|
|
51
|
-
name: "info",
|
|
52
|
-
outline: !0,
|
|
53
|
-
size: "sm"
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
)
|
|
57
|
-
]),
|
|
58
|
-
l("div", { class: "flex-1" }, e.row.original.name)
|
|
59
|
-
]);
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
header: n("connect.campaign.mission.type"),
|
|
64
|
-
accessorFn: (e) => ie(e.mission.type)
|
|
65
|
-
//v.effect,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
header: n("connect.program.common.table.status"),
|
|
69
|
-
accessorFn: (e) => X(e),
|
|
70
|
-
cell(e) {
|
|
71
|
-
return B(e.row.original);
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
header: n("connect.program.common.table.summary"),
|
|
76
|
-
accessorFn: (e) => P(e)
|
|
77
|
-
//v.effect,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
header: n("connect.campaign.mission.received"),
|
|
81
|
-
accessorFn: (e) => {
|
|
82
|
-
var o;
|
|
83
|
-
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
header: n("connect.program.common.table.actions"),
|
|
88
|
-
cell(e) {
|
|
89
|
-
return l("div", { class: "flex items-center gap-8" }, [
|
|
90
|
-
l(_.FmButton, {
|
|
91
|
-
variant: "tertiary",
|
|
92
|
-
icon: "send",
|
|
93
|
-
iconColor: "neutral-gray-400",
|
|
94
|
-
onClick: (o) => {
|
|
95
|
-
o.stopPropagation(), A(e.row.original);
|
|
96
|
-
}
|
|
97
|
-
}),
|
|
98
|
-
l(_.FmButton, {
|
|
99
|
-
variant: "tertiary",
|
|
100
|
-
icon: "delete",
|
|
101
|
-
iconColor: "neutral-gray-400",
|
|
102
|
-
onClick: (o) => {
|
|
103
|
-
o.stopPropagation(), V(e.row.original);
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
]);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
], k = w(), I = w();
|
|
110
|
-
async function V(e) {
|
|
111
|
-
await Z.remove(
|
|
112
|
-
n("connect.program.common.remove.confirm", { name: e.name })
|
|
113
|
-
) && await F(
|
|
114
|
-
async () => {
|
|
115
|
-
await h.delete(e._id), await d.read("MISSION");
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
message: n("connect.program.common.remove.removing", { name: e.name }),
|
|
119
|
-
successMessage: n("connect.program.common.remove.removed", {
|
|
120
|
-
name: e.name
|
|
121
|
-
})
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
async function y(e) {
|
|
126
|
-
e ? await o() : K.open(async (r) => {
|
|
127
|
-
await o(r);
|
|
128
|
-
});
|
|
129
|
-
async function o(r) {
|
|
130
|
-
var g;
|
|
131
|
-
(g = k.value) == null || g.showSheet(
|
|
132
|
-
!0,
|
|
133
|
-
"MISSION",
|
|
134
|
-
e ? await h.readById(e._id) : void 0,
|
|
135
|
-
r
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
async function O(e) {
|
|
140
|
-
e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
|
|
141
|
-
S.open({
|
|
142
|
-
title: "Confirmation",
|
|
143
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
144
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
145
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
146
|
-
}).onPrimary(async () => {
|
|
147
|
-
var r;
|
|
148
|
-
e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
|
|
149
|
-
}).onSecondary(async () => {
|
|
150
|
-
o();
|
|
151
|
-
});
|
|
152
|
-
}), await F(
|
|
153
|
-
async () => {
|
|
154
|
-
e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await d.read("MISSION");
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
message: n(
|
|
158
|
-
e.campaign._id ? "connect.program.common.update.updating" : "connect.program.common.update.creating",
|
|
159
|
-
{ type: "Mission" }
|
|
160
|
-
),
|
|
161
|
-
successMessage: n("connect.program.common.update.success", {
|
|
162
|
-
type: "Mission",
|
|
163
|
-
action: e.campaign._id ? "updated" : "created"
|
|
164
|
-
})
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
function A(e) {
|
|
169
|
-
var o;
|
|
170
|
-
(o = I.value) == null || o.showSheet({
|
|
171
|
-
campaign: e
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
return z(async () => {
|
|
175
|
-
await T(async () => {
|
|
176
|
-
await d.read("MISSION"), console.log(f);
|
|
177
|
-
});
|
|
178
|
-
}), (e, o) => {
|
|
179
|
-
const r = m("FmPageHead"), g = m("FmSearch"), D = m("FmTable"), M = m("FmButton"), $ = m("FmListItem"), j = m("FmList"), E = m("FmCard");
|
|
180
|
-
return p(), x(v, null, [
|
|
181
|
-
c(r, {
|
|
182
|
-
title: t(n)("connect.campaign.mission.title"),
|
|
183
|
-
actions: t(f).length > 0 ? [R] : [],
|
|
184
|
-
"onClick:action": o[0] || (o[0] = () => y())
|
|
185
|
-
}, null, 8, ["title", "actions"]),
|
|
186
|
-
s("div", le, [
|
|
187
|
-
c(g, {
|
|
188
|
-
modelValue: t(i).searchKey,
|
|
189
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
|
|
190
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
191
|
-
placeholder: t(n)("connect.program.common.search"),
|
|
192
|
-
collapsible: ""
|
|
193
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
194
|
-
t(d).campaigns.mission && t(d).campaigns.mission.length > 0 ? (p(), x(v, { key: 0 }, [
|
|
195
|
-
s("div", me, [
|
|
196
|
-
s("div", de, [
|
|
197
|
-
c(ne, {
|
|
198
|
-
modelValue: t(i).location,
|
|
199
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
|
|
200
|
-
label: t(n)("connect.program.common.location"),
|
|
201
|
-
"show-item-label": !0,
|
|
202
|
-
icon: "storefront",
|
|
203
|
-
placement: "bottom-start",
|
|
204
|
-
items: t(N).locationItems
|
|
205
|
-
}, null, 8, ["modelValue", "label", "items"])
|
|
206
|
-
]),
|
|
207
|
-
c(g, {
|
|
208
|
-
modelValue: t(i).searchKey,
|
|
209
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
|
|
210
|
-
class: "xs:hidden",
|
|
211
|
-
placeholder: "search",
|
|
212
|
-
collapsible: ""
|
|
213
|
-
}, null, 8, ["modelValue"])
|
|
214
|
-
]),
|
|
215
|
-
c(D, {
|
|
216
|
-
class: "xs:hidden",
|
|
217
|
-
"row-data": t(f),
|
|
218
|
-
"column-defs": U,
|
|
219
|
-
"search-value": t(i).searchKey,
|
|
220
|
-
"column-filter": [],
|
|
221
|
-
onRowClick: o[4] || (o[4] = (a) => y(a.original)),
|
|
222
|
-
"hide-footer": t(f).length < 10
|
|
223
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
224
|
-
c(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
225
|
-
default: C(() => [
|
|
226
|
-
(p(!0), x(v, null, W(t(f).filter(
|
|
227
|
-
(a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
228
|
-
), (a) => (p(), b($, {
|
|
229
|
-
key: a._id.toString(),
|
|
230
|
-
onClick: (L) => y(a),
|
|
231
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
232
|
-
}, {
|
|
233
|
-
default: C(() => [
|
|
234
|
-
s("div", pe, [
|
|
235
|
-
s("div", ue, [
|
|
236
|
-
(p(), b(G(t(B)(a)))),
|
|
237
|
-
s("div", fe, u(a.currentReceive ?? 0) + " used ", 1)
|
|
238
|
-
]),
|
|
239
|
-
s("div", ge, [
|
|
240
|
-
s("div", ye, u(a.name), 1),
|
|
241
|
-
s("div", _e, u(t(P)(a)), 1)
|
|
242
|
-
]),
|
|
243
|
-
s("div", he, " Token received: " + u(a.currentReceive ?? 0), 1)
|
|
244
|
-
]),
|
|
245
|
-
c(M, {
|
|
246
|
-
icon: "delete",
|
|
247
|
-
"icon-color": "neutral-gray-400",
|
|
248
|
-
variant: "tertiary",
|
|
249
|
-
onClick: (L) => (L.stopPropagation(), V(a))
|
|
250
|
-
}, null, 8, ["onClick"])
|
|
251
|
-
]),
|
|
252
|
-
_: 2
|
|
253
|
-
}, 1032, ["onClick"]))), 128))
|
|
254
|
-
]),
|
|
255
|
-
_: 1
|
|
256
|
-
})
|
|
257
|
-
], 64)) : (p(), b(E, {
|
|
258
|
-
key: 1,
|
|
259
|
-
variant: "outlined",
|
|
260
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
261
|
-
}, {
|
|
262
|
-
default: C(() => [
|
|
263
|
-
o[6] || (o[6] = s("img", {
|
|
264
|
-
src: J,
|
|
265
|
-
class: "aspect-square w-[150px]"
|
|
266
|
-
}, null, -1)),
|
|
267
|
-
s("div", we, [
|
|
268
|
-
s("div", xe, u(t(n)("connect.campaign.mission.createProgram")), 1),
|
|
269
|
-
s("div", ve, u(t(n)("connect.campaign.mission.description")), 1)
|
|
270
|
-
]),
|
|
271
|
-
c(M, {
|
|
272
|
-
variant: "primary",
|
|
273
|
-
label: t(n)("connect.campaign.mission.create"),
|
|
274
|
-
icon: "add",
|
|
275
|
-
onClick: o[5] || (o[5] = (a) => y())
|
|
276
|
-
}, null, 8, ["label"])
|
|
277
|
-
]),
|
|
278
|
-
_: 1
|
|
279
|
-
})),
|
|
280
|
-
c(se, {
|
|
281
|
-
ref_key: "sheetRef",
|
|
282
|
-
ref: k,
|
|
283
|
-
"onSubmit:modelValue": O
|
|
284
|
-
}, null, 512),
|
|
285
|
-
c(re, {
|
|
286
|
-
ref_key: "sendCollectionSheetRef",
|
|
287
|
-
ref: I
|
|
288
|
-
}, null, 512)
|
|
289
|
-
])
|
|
290
|
-
], 64);
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
export {
|
|
295
|
-
Oe as default
|
|
296
|
-
};
|
package/dist/Point-gKvdggAl.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
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 b, Fragment as w, createVNode as r, unref as t, withCtx as y, createElementVNode as n, toDisplayString as c, renderList as H, createBlock as C, resolveDynamicComponent as q } from "vue";
|
|
2
|
-
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as Q } from "./plugins-C-CRzeyC.js";
|
|
5
|
-
import { u as W } from "./loading-C6Ouh0mG.js";
|
|
6
|
-
import { u as X } from "./business-Bc-EMd2p.js";
|
|
7
|
-
import { u as Y } from "./campaign-DbJZEU7P.js";
|
|
8
|
-
import { g as Z, a as V, b as I } from "./campaign-BeF8kTyg.js";
|
|
9
|
-
import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
-
import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js";
|
|
11
|
-
import { u as oe } from "./template-DTZgnkl5.js";
|
|
12
|
-
import { u as ae } from "./vue-i18n-DVmD9I_o.js";
|
|
13
|
-
import { c as _ } from "./index-DlJGd8RC.js";
|
|
14
|
-
const ne = { class: "flex items-center" }, se = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ie = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ j({
|
|
15
|
-
__name: "Point",
|
|
16
|
-
setup(be) {
|
|
17
|
-
const { t: s } = ae(), B = {
|
|
18
|
-
label: s("connect.program.common.actions.create", {
|
|
19
|
-
type: s("connect.program.point.title").toLowerCase()
|
|
20
|
-
}),
|
|
21
|
-
value: "create",
|
|
22
|
-
isPrimary: !0,
|
|
23
|
-
prependIcon: "add"
|
|
24
|
-
}, $ = oe("COIN", G()), h = X(), m = Y(), { global: K, minor: x } = W, i = P({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: null
|
|
27
|
-
}), u = A(
|
|
28
|
-
() => m.campaigns.point.filter(
|
|
29
|
-
(e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
|
|
30
|
-
)
|
|
31
|
-
), N = [
|
|
32
|
-
{
|
|
33
|
-
header: s("connect.program.common.table.title"),
|
|
34
|
-
accessorFn: (e) => e.name
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
header: s("connect.program.common.table.status"),
|
|
38
|
-
accessorFn: (e) => Z(e),
|
|
39
|
-
cell(e) {
|
|
40
|
-
return V(e.row.original);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
header: s("connect.program.common.table.summary"),
|
|
45
|
-
accessorFn: (e) => I(e)
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
header: s("connect.program.common.table.actions"),
|
|
49
|
-
cell(e) {
|
|
50
|
-
return E(J.FmButton, {
|
|
51
|
-
variant: "tertiary",
|
|
52
|
-
icon: "delete",
|
|
53
|
-
iconColor: "neutral-gray-400",
|
|
54
|
-
onClick: (o) => {
|
|
55
|
-
o.stopPropagation(), F(e.row.original);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
], v = P();
|
|
61
|
-
async function F(e) {
|
|
62
|
-
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await x(
|
|
63
|
-
async () => {
|
|
64
|
-
await _.delete(e._id), await m.read("COIN");
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
message: `Removing ${e.name}`,
|
|
68
|
-
successMessage: `Removed ${e.name} successfully`
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
async function f(e) {
|
|
73
|
-
e ? await o() : $.open(async (p) => {
|
|
74
|
-
await o(p);
|
|
75
|
-
});
|
|
76
|
-
async function o(p) {
|
|
77
|
-
var g;
|
|
78
|
-
(g = v.value) == null || g.showSheet(
|
|
79
|
-
!0,
|
|
80
|
-
"COIN",
|
|
81
|
-
e ? await _.readById(e._id) : void 0,
|
|
82
|
-
p
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
async function R(e) {
|
|
87
|
-
await x(
|
|
88
|
-
async () => {
|
|
89
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("COIN");
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
|
|
93
|
-
successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
return M(async () => {
|
|
98
|
-
await K(async () => {
|
|
99
|
-
await m.read("COIN");
|
|
100
|
-
});
|
|
101
|
-
}), (e, o) => {
|
|
102
|
-
const p = l("FmPill"), g = l("FmPageHead"), k = l("FmSearch"), O = l("FmTable"), S = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
|
|
103
|
-
return d(), b(w, null, [
|
|
104
|
-
r(g, {
|
|
105
|
-
title: t(s)("connect.program.point.title"),
|
|
106
|
-
actions: t(u).length > 0 && t(h).isPremium ? [B] : [],
|
|
107
|
-
"onClick:action": o[0] || (o[0] = () => f())
|
|
108
|
-
}, {
|
|
109
|
-
title: y(() => [
|
|
110
|
-
n("div", ne, [
|
|
111
|
-
n("span", se, c(t(s)("connect.program.point.title")), 1),
|
|
112
|
-
r(p, { variant: "premium" })
|
|
113
|
-
])
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
}, 8, ["title", "actions"]),
|
|
117
|
-
n("div", ie, [
|
|
118
|
-
r(k, {
|
|
119
|
-
modelValue: t(i).searchKey,
|
|
120
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
|
|
121
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
122
|
-
placeholder: "search",
|
|
123
|
-
collapsible: ""
|
|
124
|
-
}, null, 8, ["modelValue"]),
|
|
125
|
-
t(m).campaigns.point && t(m).campaigns.point.length > 0 ? (d(), b(w, { key: 0 }, [
|
|
126
|
-
n("div", re, [
|
|
127
|
-
n("div", le, [
|
|
128
|
-
r(ee, {
|
|
129
|
-
modelValue: t(i).location,
|
|
130
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
|
|
131
|
-
label: "Location: ",
|
|
132
|
-
"show-item-label": !0,
|
|
133
|
-
icon: "storefront",
|
|
134
|
-
placement: "bottom-start",
|
|
135
|
-
items: t(h).locationItems
|
|
136
|
-
}, null, 8, ["modelValue", "items"])
|
|
137
|
-
]),
|
|
138
|
-
r(k, {
|
|
139
|
-
modelValue: t(i).searchKey,
|
|
140
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
|
|
141
|
-
class: "xs:hidden",
|
|
142
|
-
placeholder: "search",
|
|
143
|
-
collapsible: ""
|
|
144
|
-
}, null, 8, ["modelValue"])
|
|
145
|
-
]),
|
|
146
|
-
r(O, {
|
|
147
|
-
class: "xs:hidden",
|
|
148
|
-
"row-data": t(u),
|
|
149
|
-
"column-defs": N,
|
|
150
|
-
"search-value": t(i).searchKey,
|
|
151
|
-
"column-filter": [],
|
|
152
|
-
onRowClick: o[4] || (o[4] = (a) => f(a.original)),
|
|
153
|
-
"hide-footer": t(u).length < 10
|
|
154
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
155
|
-
r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
156
|
-
default: y(() => [
|
|
157
|
-
(d(!0), b(w, null, H(t(u).filter(
|
|
158
|
-
(a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
159
|
-
), (a) => (d(), C(U, {
|
|
160
|
-
key: a._id.toString(),
|
|
161
|
-
onClick: (L) => f(a),
|
|
162
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
163
|
-
}, {
|
|
164
|
-
default: y(() => [
|
|
165
|
-
n("div", ce, [
|
|
166
|
-
n("div", me, [
|
|
167
|
-
(d(), C(q(t(V)(a)))),
|
|
168
|
-
n("div", de, c(t(s)("connect.program.point.used", {
|
|
169
|
-
count: a.currentReceive ?? 0
|
|
170
|
-
})), 1)
|
|
171
|
-
]),
|
|
172
|
-
n("div", pe, [
|
|
173
|
-
n("div", ue, c(a.name), 1),
|
|
174
|
-
n("div", fe, c(t(I)(a)), 1)
|
|
175
|
-
]),
|
|
176
|
-
n("div", ge, " Point received: " + c(a.currentReceive ?? 0), 1)
|
|
177
|
-
]),
|
|
178
|
-
r(S, {
|
|
179
|
-
icon: "delete",
|
|
180
|
-
"icon-color": "neutral-gray-400",
|
|
181
|
-
variant: "tertiary",
|
|
182
|
-
onClick: (L) => (L.stopPropagation(), F(a))
|
|
183
|
-
}, null, 8, ["onClick"])
|
|
184
|
-
]),
|
|
185
|
-
_: 2
|
|
186
|
-
}, 1032, ["onClick"]))), 128))
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
})
|
|
190
|
-
], 64)) : (d(), C(T, {
|
|
191
|
-
key: 1,
|
|
192
|
-
variant: "outlined",
|
|
193
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
194
|
-
}, {
|
|
195
|
-
default: y(() => [
|
|
196
|
-
o[6] || (o[6] = n("img", {
|
|
197
|
-
src: z,
|
|
198
|
-
class: "aspect-square w-[150px]"
|
|
199
|
-
}, null, -1)),
|
|
200
|
-
n("div", ye, [
|
|
201
|
-
n("div", _e, c(t(s)("connect.program.point.empty_state.title")), 1),
|
|
202
|
-
n("div", he, c(t(s)("connect.program.point.empty_state.description")), 1)
|
|
203
|
-
]),
|
|
204
|
-
r(S, {
|
|
205
|
-
variant: "primary",
|
|
206
|
-
label: "Create point program",
|
|
207
|
-
disabled: !t(h).isPremium,
|
|
208
|
-
icon: "add",
|
|
209
|
-
onClick: o[5] || (o[5] = (a) => f())
|
|
210
|
-
}, null, 8, ["disabled"])
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
})),
|
|
214
|
-
r(te, {
|
|
215
|
-
ref_key: "sheetRef",
|
|
216
|
-
ref: v,
|
|
217
|
-
"onSubmit:modelValue": R
|
|
218
|
-
}, null, 512)
|
|
219
|
-
])
|
|
220
|
-
], 64);
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
export {
|
|
225
|
-
Ke as default
|
|
226
|
-
};
|