@feedmepos/mf-connect 0.1.82-prod → 0.1.83-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-D850nvXy.js → Analytic-1OYb8L9c.js} +11 -11
- package/dist/{App-Dwp2SQFt.js → App-oQ4_lEV2.js} +7 -7
- package/dist/{Bin-t3dMVk18.js → Bin-CQ8CYWAf.js} +8 -8
- package/dist/Broadcast-BLq5lca6.js +265 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CFa7asTL.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-0BKgyMxn.js} +6 -6
- package/dist/{Card-DueuT99c.js → Card-BbcMCzvO.js} +19 -19
- package/dist/{Collections-D50oEyeZ.js → Collections-0LOyEUoF.js} +8 -8
- package/dist/Credit-Crrc3MSu.js +259 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js} +245 -241
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L0-aFhRw.js → EffectSheet.vue_vue_type_style_index_0_lang-DQaMkTla.js} +6 -6
- package/dist/Experience-DJiUmONI.js +258 -0
- package/dist/{FileSaver.min-DH3eS7yi.js → FileSaver.min-CFEGc8v5.js} +1 -1
- package/dist/Game-ChHy4S4P.js +329 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BIKcbIag.js → ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js} +1 -1
- package/dist/{Index-BucLJQqP.js → Index-CL5auUCN.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CIoZurPE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-H5IjhmOA.js} +1 -1
- package/dist/{MainLayout-DYGrSfgc.js → MainLayout-Bf4G5U5F.js} +1 -1
- package/dist/{Marketing-CsAIdNjF.js → Marketing-cNwSm-dt.js} +6 -6
- package/dist/{Member-D4HF_VGN.js → Member-fT7a7zFo.js} +11 -11
- package/dist/{MemberList-CPoA4ovd.js → MemberList-gEN36Erj.js} +27 -27
- package/dist/{MemberTransactions-AMv9NeIb.js → MemberTransactions-C4YgiUw-.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhhSwnK0.js → MessageInput.vue_vue_type_script_setup_true_lang-BNDrmYqp.js} +9 -9
- package/dist/Mission-Bz9P2pjX.js +333 -0
- package/dist/{Overview-ByO2p2Wx.js → Overview-BG3Z7Daz.js} +19 -19
- package/dist/Point-BBeSJ5p5.js +261 -0
- package/dist/Promotion-VmaOESn2.js +390 -0
- package/dist/{Queue-BD29Mmbf.js → Queue-DKtUhOBh.js} +11 -11
- package/dist/{Record-CNLiN6YR.js → Record-Cb45m9I8.js} +9 -9
- package/dist/{Reward-Ceo3M1yD.js → Reward-D_uvCEMe.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJWQEL9W.js → RewardGroup.vue_vue_type_script_setup_true_lang-yUUMGEUJ.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CWuWGs6r.js → RuleGroup.vue_vue_type_script_setup_true_lang-CIb7igvo.js} +15 -15
- package/dist/{Segment-BOQUlP-m.js → Segment-BJ8XUyeG.js} +25 -25
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BcXeiz0p.js → SelectItems.vue_vue_type_script_setup_true_lang-ht4qyiQM.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CJ--FC-i.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DC6OQ7Zb.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9emjG6Nc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js} +4 -4
- package/dist/{Setting-CWapXD31.js → Setting-CS1wSxO9.js} +14 -14
- package/dist/{SettingAdvertisements-QEf2eyem.js → SettingAdvertisements-CWP7VthZ.js} +12 -12
- package/dist/{Store-Bfm2olbH.js → Store-cy0uZfSE.js} +22 -22
- package/dist/{StoreRewards-DNDkyxxn.js → StoreRewards-DDAvmlEn.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-zKLbY4Qb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CevWXAb6.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D3-wIOQ7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CPJ4fCu-.js} +1 -1
- package/dist/{Tier-uC45o2AK.js → Tier-CUT_0eYp.js} +22 -22
- package/dist/{Title-zDjlDJCB.js → Title-DcelZU7H.js} +20 -20
- package/dist/{Transaction-Bo9FEjMQ.js → Transaction-CwcJnFIO.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BR5F0bWS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BuDS-vUd.js} +6 -6
- package/dist/{Voucher-B7BTa4Vt.js → Voucher-z6o5rwFx.js} +162 -141
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjrjJW7x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-FVdeM5pH.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DeAkLgaX.js → ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js} +2 -2
- package/dist/{app-CkUBXnib.js → app-BUFlIAB5.js} +73 -43
- package/dist/app.js +1 -1
- package/dist/{business-C8P05bjQ.js → business-CEL6Cxr7.js} +1 -1
- package/dist/{campaign-DcLhSQVQ.js → campaign-Bz3O-DFr.js} +1 -1
- package/dist/{campaign-CyYAvl3p.js → campaign-CfB7ZWIg.js} +8 -8
- package/dist/{campaign.enum-h6B-mP82.js → campaign.enum-CCKHGvL9.js} +1 -1
- package/dist/{campaign.fn-CStjDAoU.js → campaign.fn-Cu0sRSpP.js} +114 -114
- package/dist/{collectible.enum-DT-wjl-a.js → collectible.enum-DeWSJ9OK.js} +1 -1
- package/dist/{collection.fn-14o3RW2e.js → collection.fn-hPDt2qvz.js} +2 -2
- package/dist/{dto-Bv09Baex.js → dto-BKwcpb4T.js} +4 -4
- package/dist/{effect-CF0s7QWQ.js → effect-D070CPN_.js} +1 -1
- package/dist/{email-addresses-B5qrHbxg.js → email-addresses-C0fE6EMy.js} +2 -2
- package/dist/{export-B6nvdBmg.js → export-CG1ypExs.js} +3 -3
- package/dist/{helper-B4-2ut7E.js → helper-C9NBolO7.js} +1 -1
- package/dist/{index-B-y0UTZw.js → index-4gCsL8Hl.js} +6 -6
- package/dist/{index-D5xt8OjL.js → index-6rFsv3Yg.js} +1 -1
- package/dist/{index-BebGg-0n.js → index-B30LtrWw.js} +1 -1
- package/dist/{index-DVb99_67.js → index-B613auFn.js} +1 -1
- package/dist/{index-HhVIn4Bn.js → index-BGi7UFjn.js} +1 -1
- package/dist/{index-DzQjej5Y.js → index-BXSp11TE.js} +4 -4
- package/dist/{index-DRX9TTMn.js → index-CM-qkxMr.js} +3 -3
- package/dist/{index-DesSizn4.js → index-CZoTFXja.js} +3 -3
- package/dist/{index-DG_Ej3ec.js → index-D7AT7i0e.js} +3 -3
- package/dist/{index-DIQ2MyWF.js → index-DDMr6_UT.js} +4 -4
- package/dist/{index-XDg25M5a.js → index-DGNPGZh4.js} +1 -1
- package/dist/{index-CR8brl_k.js → index-DLnZyneY.js} +1 -1
- package/dist/{index-Ct90ybe0.js → index-DcfdUpTw.js} +1 -1
- package/dist/{index.esm2017-1A2eV8x_.js → index.esm2017-D0u5JnGx.js} +1 -1
- package/dist/{loading-B0_BwPgo.js → loading-Rn4BXFlo.js} +1 -1
- package/dist/{lodash-DxIglhqk.js → lodash-Ds-QoR_N.js} +1 -1
- package/dist/{membership-H_whlbUP.js → membership-BjklIT2n.js} +3 -3
- package/dist/{money-DEE8QW6m.js → money-DMyZXL-e.js} +1 -1
- package/dist/{number-BmN5A4Cu.js → number-Cyny8l0t.js} +1 -1
- package/dist/{objectid-B8LZDZOt.js → objectid-Bs1Sha1n.js} +6 -6
- package/dist/{plugins-DTrOHd7d.js → plugins-BdQ8LmZm.js} +3 -3
- package/dist/{reward-CsJhkkaT.js → reward-ZGs3fpY1.js} +1 -1
- package/dist/{rule-ByMxYH4c.js → rule-BH0ICJcx.js} +3 -3
- package/dist/{rule-builder-DwGwUlV1.js → rule-builder-D2sz7Xd9.js} +1 -1
- package/dist/template-_QJbP7yG.js +236 -0
- package/dist/{timezone-Bpe-fhwZ.js → timezone-ulqdIvC-.js} +2 -2
- package/dist/{trigger-CEprJYiD.js → trigger-BiXZCT3j.js} +5 -5
- package/dist/{usePagination-Du6qS5aj.js → usePagination-Ck7buuI_.js} +1 -1
- package/dist/{user-Be8HNWuo.js → user-BWTfkoD6.js} +1 -1
- package/dist/{vue-i18n-fg0FtbNR.js → vue-i18n-CmMTYitu.js} +158 -158
- package/dist/{xlsx-CSQJ3YWk.js → xlsx-BF8PJO-P.js} +1 -1
- package/dist/{zod-BB7zZ5ec.js → zod-C5iXeYjP.js} +1 -1
- package/package.json +1 -1
- package/dist/Broadcast-DORnkgZc.js +0 -232
- package/dist/Credit-CIWSRGuJ.js +0 -225
- package/dist/Experience-qABtjxNP.js +0 -224
- package/dist/Game-D67q1zKd.js +0 -299
- package/dist/Mission-CRinLn7e.js +0 -303
- package/dist/Point-4JqzbNgP.js +0 -227
- package/dist/Promotion-DlWVF6hF.js +0 -358
- package/dist/template-Bdwy6QXF.js +0 -188
package/dist/Mission-CRinLn7e.js
DELETED
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, ref as x, computed as W, h as m, onMounted as G, resolveComponent as d, openBlock as u, createElementBlock as b, Fragment as C, createVNode as r, unref as t, createElementVNode as s, withCtx as v, renderList as J, createBlock as S, resolveDynamicComponent as Q, toDisplayString as f } from "vue";
|
|
2
|
-
import { _ as X } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { u as Y } from "./loading-B0_BwPgo.js";
|
|
4
|
-
import { g as Z, a as B, b as P } from "./campaign-CyYAvl3p.js";
|
|
5
|
-
import { a as ee, p as oe } from "./plugins-DTrOHd7d.js";
|
|
6
|
-
import { u as te } from "./business-C8P05bjQ.js";
|
|
7
|
-
import { u as ne, c as _ } from "./campaign-DcLhSQVQ.js";
|
|
8
|
-
import { useDialog as ae, components as h } from "@feedmepos/ui-library";
|
|
9
|
-
import { _ as se } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
10
|
-
import { u as ie } from "./template-Bdwy6QXF.js";
|
|
11
|
-
import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js";
|
|
12
|
-
import { s as ce } from "./index-CuvNtC_M.js";
|
|
13
|
-
import { u as le } from "./vue-i18n-fg0FtbNR.js";
|
|
14
|
-
import { _ as me } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-CJ--FC-i.js";
|
|
15
|
-
const de = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-center justify-between w-full" }, ue = { class: "flex gap-8 overflow-x-auto" }, fe = { class: "space-y-8" }, ge = { class: "flex w-full gap-4 items-center" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "flex flex-col gap-16 text-center" }, be = { class: "fm-typo-en-title-sm-800" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ue = /* @__PURE__ */ z({
|
|
16
|
-
__name: "Mission",
|
|
17
|
-
setup(ve) {
|
|
18
|
-
const { t: n } = le(), K = {
|
|
19
|
-
label: n("connect.program.common.actions.create", {
|
|
20
|
-
type: n("connect.program.mission.title").toLowerCase()
|
|
21
|
-
}),
|
|
22
|
-
value: "create",
|
|
23
|
-
isPrimary: !0,
|
|
24
|
-
prependIcon: "add"
|
|
25
|
-
}, F = ae(), R = ie("MISSION", F), A = te(), p = ne(), { global: N, minor: k } = Y, c = x({
|
|
26
|
-
searchKey: "",
|
|
27
|
-
location: []
|
|
28
|
-
});
|
|
29
|
-
function O(e) {
|
|
30
|
-
const o = c.value.location;
|
|
31
|
-
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((i) => {
|
|
32
|
-
var l;
|
|
33
|
-
return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(i);
|
|
34
|
-
}) : e.targetLocation.includes(o);
|
|
35
|
-
}
|
|
36
|
-
const g = W(
|
|
37
|
-
() => p.campaigns.mission.filter((e) => O(e))
|
|
38
|
-
), U = [
|
|
39
|
-
{
|
|
40
|
-
header: n("connect.program.common.table.title"),
|
|
41
|
-
accessorKey: "name",
|
|
42
|
-
// accessorFn: (v) => v.name,
|
|
43
|
-
cell(e) {
|
|
44
|
-
return m("div", { class: "flex items-center justify-between gap-4" }, [
|
|
45
|
-
m("div", { class: "flex items-center" }, [
|
|
46
|
-
m(
|
|
47
|
-
h.FmTooltip,
|
|
48
|
-
{
|
|
49
|
-
content: e.row.original._id,
|
|
50
|
-
onClick: (o) => {
|
|
51
|
-
o.stopPropagation(), ee(e.row.original._id);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
[
|
|
55
|
-
m(h.FmIcon, {
|
|
56
|
-
name: "info",
|
|
57
|
-
outline: !0,
|
|
58
|
-
size: "sm"
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
)
|
|
62
|
-
]),
|
|
63
|
-
m("div", { class: "flex-1" }, e.row.original.name)
|
|
64
|
-
]);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
header: n("connect.campaign.mission.type"),
|
|
69
|
-
accessorFn: (e) => ce(e.mission.type)
|
|
70
|
-
//v.effect,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
header: n("connect.program.common.table.status"),
|
|
74
|
-
accessorFn: (e) => Z(e),
|
|
75
|
-
cell(e) {
|
|
76
|
-
return B(e.row.original);
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
header: n("connect.program.common.table.summary"),
|
|
81
|
-
accessorFn: (e) => P(e)
|
|
82
|
-
//v.effect,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
header: n("connect.campaign.mission.received"),
|
|
86
|
-
accessorFn: (e) => {
|
|
87
|
-
var o;
|
|
88
|
-
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
header: n("connect.program.common.table.actions"),
|
|
93
|
-
cell(e) {
|
|
94
|
-
return m("div", { class: "flex items-center gap-8" }, [
|
|
95
|
-
m(h.FmButton, {
|
|
96
|
-
variant: "tertiary",
|
|
97
|
-
icon: "send",
|
|
98
|
-
iconColor: "neutral-gray-400",
|
|
99
|
-
onClick: (o) => {
|
|
100
|
-
o.stopPropagation(), $(e.row.original);
|
|
101
|
-
}
|
|
102
|
-
}),
|
|
103
|
-
m(h.FmButton, {
|
|
104
|
-
variant: "tertiary",
|
|
105
|
-
icon: "delete",
|
|
106
|
-
iconColor: "neutral-gray-400",
|
|
107
|
-
onClick: (o) => {
|
|
108
|
-
o.stopPropagation(), V(e.row.original);
|
|
109
|
-
}
|
|
110
|
-
})
|
|
111
|
-
]);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
], I = x(), L = x();
|
|
115
|
-
async function V(e) {
|
|
116
|
-
await oe.remove(
|
|
117
|
-
n("connect.program.common.remove.confirm", { name: e.name })
|
|
118
|
-
) && await k(
|
|
119
|
-
async () => {
|
|
120
|
-
await _.delete(e._id), await p.read("MISSION");
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
message: n("connect.program.common.remove.removing", { name: e.name }),
|
|
124
|
-
successMessage: n("connect.program.common.remove.removed", {
|
|
125
|
-
name: e.name
|
|
126
|
-
})
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
async function y(e) {
|
|
131
|
-
e ? await o() : R.open(async (i) => {
|
|
132
|
-
await o(i);
|
|
133
|
-
});
|
|
134
|
-
async function o(i) {
|
|
135
|
-
var l;
|
|
136
|
-
(l = I.value) == null || l.showSheet(
|
|
137
|
-
!0,
|
|
138
|
-
"MISSION",
|
|
139
|
-
e ? await _.readById(e._id) : void 0,
|
|
140
|
-
i
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
async function T(e) {
|
|
145
|
-
e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
|
|
146
|
-
F.open({
|
|
147
|
-
title: "Confirmation",
|
|
148
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
149
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
150
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
151
|
-
}).onPrimary(async () => {
|
|
152
|
-
var i;
|
|
153
|
-
e.updateCollections = !0, (i = window.top) == null || i.postMessage("updateAllVoucher", "*"), o();
|
|
154
|
-
}).onSecondary(async () => {
|
|
155
|
-
o();
|
|
156
|
-
});
|
|
157
|
-
}), await k(
|
|
158
|
-
async () => {
|
|
159
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await p.read("MISSION");
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
message: n(
|
|
163
|
-
e.campaign._id ? "connect.program.common.update.updating" : "connect.program.common.update.creating",
|
|
164
|
-
{ type: "Mission" }
|
|
165
|
-
),
|
|
166
|
-
successMessage: n("connect.program.common.update.success", {
|
|
167
|
-
type: "Mission",
|
|
168
|
-
action: e.campaign._id ? "updated" : "created"
|
|
169
|
-
})
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
function $(e) {
|
|
174
|
-
var o;
|
|
175
|
-
(o = L.value) == null || o.showSheet({
|
|
176
|
-
campaign: e
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
return G(async () => {
|
|
180
|
-
await N(async () => {
|
|
181
|
-
await p.read("MISSION"), console.log(g);
|
|
182
|
-
});
|
|
183
|
-
}), (e, o) => {
|
|
184
|
-
const i = d("FmPageHead"), l = d("FmSearch"), D = d("FmTable"), M = d("FmButton"), j = d("FmListItem"), E = d("FmList"), H = d("FmCard");
|
|
185
|
-
return u(), b(C, null, [
|
|
186
|
-
r(i, {
|
|
187
|
-
title: t(n)("connect.campaign.mission.title"),
|
|
188
|
-
actions: t(g).length > 0 ? [K] : [],
|
|
189
|
-
"onClick:action": o[0] || (o[0] = () => y())
|
|
190
|
-
}, null, 8, ["title", "actions"]),
|
|
191
|
-
s("div", de, [
|
|
192
|
-
r(l, {
|
|
193
|
-
modelValue: t(c).searchKey,
|
|
194
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(c).searchKey = a),
|
|
195
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
196
|
-
placeholder: t(n)("connect.program.common.search"),
|
|
197
|
-
collapsible: ""
|
|
198
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
199
|
-
t(p).campaigns.mission && t(p).campaigns.mission.length > 0 ? (u(), b(C, { key: 0 }, [
|
|
200
|
-
s("div", pe, [
|
|
201
|
-
s("div", ue, [
|
|
202
|
-
r(se, {
|
|
203
|
-
label: `${t(n)("connect.program.common.location")}: `,
|
|
204
|
-
"right-icon": "keyboard_arrow_down",
|
|
205
|
-
modelValue: t(c).location,
|
|
206
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(c).location = a),
|
|
207
|
-
icon: "storefront",
|
|
208
|
-
"show-item-label": !0,
|
|
209
|
-
items: t(A).locationOptions
|
|
210
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
211
|
-
]),
|
|
212
|
-
r(l, {
|
|
213
|
-
modelValue: t(c).searchKey,
|
|
214
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(c).searchKey = a),
|
|
215
|
-
class: "xs:hidden sm:hidden",
|
|
216
|
-
placeholder: "search",
|
|
217
|
-
collapsible: ""
|
|
218
|
-
}, null, 8, ["modelValue"])
|
|
219
|
-
]),
|
|
220
|
-
r(D, {
|
|
221
|
-
class: "xs:hidden sm:hidden",
|
|
222
|
-
"row-data": t(g),
|
|
223
|
-
"column-defs": U,
|
|
224
|
-
"search-value": t(c).searchKey,
|
|
225
|
-
"column-filter": [],
|
|
226
|
-
onRowClick: o[4] || (o[4] = (a) => y(a.original)),
|
|
227
|
-
"hide-footer": t(g).length < 10
|
|
228
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
229
|
-
r(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
230
|
-
default: v(() => [
|
|
231
|
-
(u(!0), b(C, null, J(t(g).filter(
|
|
232
|
-
(a) => a.name.toLowerCase().includes(t(c).searchKey.toLowerCase())
|
|
233
|
-
), (a) => (u(), S(j, {
|
|
234
|
-
key: a._id.toString(),
|
|
235
|
-
onClick: (w) => y(a),
|
|
236
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
237
|
-
}, {
|
|
238
|
-
default: v(() => {
|
|
239
|
-
var w;
|
|
240
|
-
return [
|
|
241
|
-
s("div", fe, [
|
|
242
|
-
s("div", ge, [
|
|
243
|
-
(u(), S(Q(t(B)(a))))
|
|
244
|
-
]),
|
|
245
|
-
s("div", ye, [
|
|
246
|
-
s("div", _e, f(a.name), 1),
|
|
247
|
-
s("div", he, f(t(P)(a)), 1)
|
|
248
|
-
]),
|
|
249
|
-
s("div", we, f(t(n)("connect.campaign.mission.received")) + " : " + f(((w = a == null ? void 0 : a.pf_collectible) == null ? void 0 : w.currentReceive) ?? 0), 1)
|
|
250
|
-
]),
|
|
251
|
-
r(M, {
|
|
252
|
-
icon: "delete",
|
|
253
|
-
"icon-color": "neutral-gray-400",
|
|
254
|
-
variant: "tertiary",
|
|
255
|
-
onClick: (q) => (q.stopPropagation(), V(a))
|
|
256
|
-
}, null, 8, ["onClick"])
|
|
257
|
-
];
|
|
258
|
-
}),
|
|
259
|
-
_: 2
|
|
260
|
-
}, 1032, ["onClick"]))), 128))
|
|
261
|
-
]),
|
|
262
|
-
_: 1
|
|
263
|
-
})
|
|
264
|
-
], 64)) : (u(), S(H, {
|
|
265
|
-
key: 1,
|
|
266
|
-
variant: "outlined",
|
|
267
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
268
|
-
}, {
|
|
269
|
-
default: v(() => [
|
|
270
|
-
o[6] || (o[6] = s("img", {
|
|
271
|
-
src: X,
|
|
272
|
-
class: "aspect-square w-[150px]"
|
|
273
|
-
}, null, -1)),
|
|
274
|
-
s("div", xe, [
|
|
275
|
-
s("div", be, f(t(n)("connect.campaign.mission.createProgram")), 1),
|
|
276
|
-
s("div", Ce, f(t(n)("connect.campaign.mission.description")), 1)
|
|
277
|
-
]),
|
|
278
|
-
r(M, {
|
|
279
|
-
variant: "primary",
|
|
280
|
-
label: t(n)("connect.campaign.mission.create"),
|
|
281
|
-
icon: "add",
|
|
282
|
-
onClick: o[5] || (o[5] = (a) => y())
|
|
283
|
-
}, null, 8, ["label"])
|
|
284
|
-
]),
|
|
285
|
-
_: 1
|
|
286
|
-
})),
|
|
287
|
-
r(re, {
|
|
288
|
-
ref_key: "sheetRef",
|
|
289
|
-
ref: I,
|
|
290
|
-
"onSubmit:modelValue": T
|
|
291
|
-
}, null, 512),
|
|
292
|
-
r(me, {
|
|
293
|
-
ref_key: "sendCollectionSheetRef",
|
|
294
|
-
ref: L
|
|
295
|
-
}, null, 512)
|
|
296
|
-
])
|
|
297
|
-
], 64);
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
export {
|
|
302
|
-
Ue as default
|
|
303
|
-
};
|
package/dist/Point-4JqzbNgP.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { defineComponent as j, ref as V, computed as E, h as M, onMounted as H, resolveComponent as l, openBlock as p, createElementBlock as w, Fragment as b, createVNode as i, unref as o, withCtx as y, createElementVNode as n, toDisplayString as u, renderList as q, createBlock as C, resolveDynamicComponent as z } from "vue";
|
|
2
|
-
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as J, components as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as W } from "./plugins-DTrOHd7d.js";
|
|
5
|
-
import { u as X } from "./loading-B0_BwPgo.js";
|
|
6
|
-
import { u as Y } from "./business-C8P05bjQ.js";
|
|
7
|
-
import { u as Z, c as _ } from "./campaign-DcLhSQVQ.js";
|
|
8
|
-
import { g as ee, a as P, b as B } from "./campaign-CyYAvl3p.js";
|
|
9
|
-
import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
10
|
-
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js";
|
|
11
|
-
import { u as ae } from "./template-Bdwy6QXF.js";
|
|
12
|
-
import { u as ne } from "./vue-i18n-fg0FtbNR.js";
|
|
13
|
-
const se = { class: "flex items-center" }, ie = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, re = { class: "px-24 flex flex-col gap-y-16" }, le = { class: "flex items-center justify-between w-full" }, ce = { class: "flex gap-8 overflow-x-auto" }, me = { class: "space-y-8" }, de = { class: "flex w-full gap-4 items-center" }, 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: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ j({
|
|
14
|
-
__name: "Point",
|
|
15
|
-
setup(he) {
|
|
16
|
-
const { t: s } = ne(), I = {
|
|
17
|
-
label: s("connect.program.common.actions.create", {
|
|
18
|
-
type: s("connect.program.point.title").toLowerCase()
|
|
19
|
-
}),
|
|
20
|
-
value: "create",
|
|
21
|
-
isPrimary: !0,
|
|
22
|
-
prependIcon: "add"
|
|
23
|
-
}, $ = ae("COIN", J()), h = Y(), d = Z(), { global: K, minor: x } = X, r = V({
|
|
24
|
-
searchKey: "",
|
|
25
|
-
location: []
|
|
26
|
-
});
|
|
27
|
-
function N(e) {
|
|
28
|
-
const t = r.value.location;
|
|
29
|
-
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((c) => {
|
|
30
|
-
var m;
|
|
31
|
-
return (m = e == null ? void 0 : e.targetLocation) == null ? void 0 : m.includes(c);
|
|
32
|
-
}) : e.targetLocation.includes(t);
|
|
33
|
-
}
|
|
34
|
-
const f = E(
|
|
35
|
-
() => d.campaigns.point.filter((e) => N(e))
|
|
36
|
-
), O = [
|
|
37
|
-
{
|
|
38
|
-
header: s("connect.program.common.table.title"),
|
|
39
|
-
accessorFn: (e) => e.name
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
header: s("connect.program.common.table.status"),
|
|
43
|
-
accessorFn: (e) => ee(e),
|
|
44
|
-
cell(e) {
|
|
45
|
-
return P(e.row.original);
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
header: s("connect.program.common.table.summary"),
|
|
50
|
-
accessorFn: (e) => B(e)
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
header: s("connect.program.common.table.actions"),
|
|
54
|
-
cell(e) {
|
|
55
|
-
return M(Q.FmButton, {
|
|
56
|
-
variant: "tertiary",
|
|
57
|
-
icon: "delete",
|
|
58
|
-
iconColor: "neutral-gray-400",
|
|
59
|
-
onClick: (t) => {
|
|
60
|
-
t.stopPropagation(), F(e.row.original);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
], v = V();
|
|
66
|
-
async function F(e) {
|
|
67
|
-
await W.remove(`Are you sure you want to remove ${e.name}?`) && await x(
|
|
68
|
-
async () => {
|
|
69
|
-
await _.delete(e._id), await d.read("COIN");
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
message: `Removing ${e.name}`,
|
|
73
|
-
successMessage: `Removed ${e.name} successfully`
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
async function g(e) {
|
|
78
|
-
e ? await t() : $.open(async (c) => {
|
|
79
|
-
await t(c);
|
|
80
|
-
});
|
|
81
|
-
async function t(c) {
|
|
82
|
-
var m;
|
|
83
|
-
(m = v.value) == null || m.showSheet(
|
|
84
|
-
!0,
|
|
85
|
-
"COIN",
|
|
86
|
-
e ? await _.readById(e._id) : void 0,
|
|
87
|
-
c
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
async function A(e) {
|
|
92
|
-
await x(
|
|
93
|
-
async () => {
|
|
94
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await d.read("COIN");
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
|
|
98
|
-
successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
return H(async () => {
|
|
103
|
-
await K(async () => {
|
|
104
|
-
await d.read("COIN");
|
|
105
|
-
});
|
|
106
|
-
}), (e, t) => {
|
|
107
|
-
const c = l("FmPill"), m = l("FmPageHead"), k = l("FmSearch"), R = l("FmTable"), L = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
|
|
108
|
-
return p(), w(b, null, [
|
|
109
|
-
i(m, {
|
|
110
|
-
title: o(s)("connect.program.point.title"),
|
|
111
|
-
actions: o(f).length > 0 && o(h).isPremium ? [I] : [],
|
|
112
|
-
"onClick:action": t[0] || (t[0] = () => g())
|
|
113
|
-
}, {
|
|
114
|
-
title: y(() => [
|
|
115
|
-
n("div", se, [
|
|
116
|
-
n("span", ie, u(o(s)("connect.program.point.title")), 1),
|
|
117
|
-
i(c, { variant: "premium" })
|
|
118
|
-
])
|
|
119
|
-
]),
|
|
120
|
-
_: 1
|
|
121
|
-
}, 8, ["title", "actions"]),
|
|
122
|
-
n("div", re, [
|
|
123
|
-
i(k, {
|
|
124
|
-
modelValue: o(r).searchKey,
|
|
125
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(r).searchKey = a),
|
|
126
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
127
|
-
placeholder: "search",
|
|
128
|
-
collapsible: ""
|
|
129
|
-
}, null, 8, ["modelValue"]),
|
|
130
|
-
o(d).campaigns.point && o(d).campaigns.point.length > 0 ? (p(), w(b, { key: 0 }, [
|
|
131
|
-
n("div", le, [
|
|
132
|
-
n("div", ce, [
|
|
133
|
-
i(te, {
|
|
134
|
-
label: `${o(s)("connect.common.location")}: `,
|
|
135
|
-
"right-icon": "keyboard_arrow_down",
|
|
136
|
-
modelValue: o(r).location,
|
|
137
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(r).location = a),
|
|
138
|
-
icon: "storefront",
|
|
139
|
-
"show-item-label": !0,
|
|
140
|
-
items: o(h).locationOptions
|
|
141
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
142
|
-
]),
|
|
143
|
-
i(k, {
|
|
144
|
-
modelValue: o(r).searchKey,
|
|
145
|
-
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(r).searchKey = a),
|
|
146
|
-
class: "xs:hidden sm:hidden",
|
|
147
|
-
placeholder: "search",
|
|
148
|
-
collapsible: ""
|
|
149
|
-
}, null, 8, ["modelValue"])
|
|
150
|
-
]),
|
|
151
|
-
i(R, {
|
|
152
|
-
class: "xs:hidden sm:hidden",
|
|
153
|
-
"row-data": o(f),
|
|
154
|
-
"column-defs": O,
|
|
155
|
-
"search-value": o(r).searchKey,
|
|
156
|
-
"column-filter": [],
|
|
157
|
-
onRowClick: t[4] || (t[4] = (a) => g(a.original)),
|
|
158
|
-
"hide-footer": o(f).length < 10
|
|
159
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
160
|
-
i(D, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
161
|
-
default: y(() => [
|
|
162
|
-
(p(!0), w(b, null, q(o(f).filter(
|
|
163
|
-
(a) => a.name.toLowerCase().includes(o(r).searchKey.toLowerCase())
|
|
164
|
-
), (a) => (p(), C(U, {
|
|
165
|
-
key: a._id.toString(),
|
|
166
|
-
onClick: (S) => g(a),
|
|
167
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
168
|
-
}, {
|
|
169
|
-
default: y(() => [
|
|
170
|
-
n("div", me, [
|
|
171
|
-
n("div", de, [
|
|
172
|
-
(p(), C(z(o(P)(a))))
|
|
173
|
-
]),
|
|
174
|
-
n("div", pe, [
|
|
175
|
-
n("div", ue, u(a.name), 1),
|
|
176
|
-
n("div", fe, u(o(B)(a)), 1)
|
|
177
|
-
])
|
|
178
|
-
]),
|
|
179
|
-
i(L, {
|
|
180
|
-
icon: "delete",
|
|
181
|
-
"icon-color": "neutral-gray-400",
|
|
182
|
-
variant: "tertiary",
|
|
183
|
-
onClick: (S) => (S.stopPropagation(), F(a))
|
|
184
|
-
}, null, 8, ["onClick"])
|
|
185
|
-
]),
|
|
186
|
-
_: 2
|
|
187
|
-
}, 1032, ["onClick"]))), 128))
|
|
188
|
-
]),
|
|
189
|
-
_: 1
|
|
190
|
-
})
|
|
191
|
-
], 64)) : (p(), C(T, {
|
|
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: y(() => [
|
|
197
|
-
t[6] || (t[6] = n("img", {
|
|
198
|
-
src: G,
|
|
199
|
-
class: "aspect-square w-[150px]"
|
|
200
|
-
}, null, -1)),
|
|
201
|
-
n("div", ge, [
|
|
202
|
-
n("div", ye, u(o(s)("connect.program.point.empty_state.title")), 1),
|
|
203
|
-
n("div", _e, u(o(s)("connect.program.point.empty_state.description")), 1)
|
|
204
|
-
]),
|
|
205
|
-
i(L, {
|
|
206
|
-
variant: "primary",
|
|
207
|
-
label: "Create point program",
|
|
208
|
-
disabled: !o(h).isPremium,
|
|
209
|
-
icon: "add",
|
|
210
|
-
onClick: t[5] || (t[5] = (a) => g())
|
|
211
|
-
}, null, 8, ["disabled"])
|
|
212
|
-
]),
|
|
213
|
-
_: 1
|
|
214
|
-
})),
|
|
215
|
-
i(oe, {
|
|
216
|
-
ref_key: "sheetRef",
|
|
217
|
-
ref: v,
|
|
218
|
-
"onSubmit:modelValue": A
|
|
219
|
-
}, null, 512)
|
|
220
|
-
])
|
|
221
|
-
], 64);
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
export {
|
|
226
|
-
Ie as default
|
|
227
|
-
};
|