@feedmepos/mf-connect 0.1.117-dev → 0.1.118-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/{App-BpcsgH7K.js → App-BHcTqLff.js} +89 -97
- package/dist/{Bin-Cm0wjQeR.js → Bin-DWhXJmHo.js} +8 -8
- package/dist/{Broadcast-BoJaHqnO.js → Broadcast-Ct1DL8Pd.js} +21 -22
- package/dist/{CampaignAnalytic-Eg4xZW0B.js → CampaignAnalytic-BSEKCM-4.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BxRg2Wu8.js} +10 -9
- package/dist/{Card-BfkMcFaG.js → Card-B7DwrAPH.js} +23 -23
- package/dist/{Collections-RXmxQbII.js → Collections-BJw4JJq_.js} +185 -197
- package/dist/{Credit-CsRPM1jv.js → Credit-BteIGXkp.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CSFwIzOS.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJotVIKM.js +3496 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js → EffectSheet.vue_vue_type_style_index_0_lang-BDZ21UHA.js} +30 -30
- package/dist/{Experience-BC8Pj-v9.js → Experience-C_VQVfJX.js} +31 -32
- package/dist/{FileSaver.min-DzmoQFA0.js → FileSaver.min-CMiQUZQE.js} +1 -1
- package/dist/{Game-DJXNHFBs.js → Game-BiHMrMBF.js} +18 -19
- package/dist/{GiftCardSetup-_0n8lU-t.js → GiftCardSetup-DtJIm6oI.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BKGnPAEj.js} +7 -7
- package/dist/{Goals-DSZwKpds.js → Goals-B7VjLMDT.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js → ImageInput.vue_vue_type_script_setup_true_lang-C9ecPgpJ.js} +1 -1
- package/dist/{Index-Cbi0bquE.js → Index-D_DIHKZG.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js → LocationPicker.vue_vue_type_script_setup_true_lang-DSwB0Ubn.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-dk8_eVwd.js} +1 -1
- package/dist/{LoyaltyDashboard-fK90c27A.js → LoyaltyDashboard-DOgHeJdK.js} +15 -15
- package/dist/{MainLayout-Bf-l9yL4.js → MainLayout-CfYgoXLS.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js → MainLayout.vue_vue_type_script_setup_true_lang-Bz2LGHUd.js} +3 -3
- package/dist/{Marketing-B7cZGsO-.js → Marketing-B6TCrwaR.js} +4 -4
- package/dist/{MarketingMaterialEdit-5IcV2ct6.js → MarketingMaterialEdit-Bu3a9NGj.js} +211 -214
- package/dist/{Member-BGTrRVdq.js → Member-X51KrYXV.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CYU21JaO.js} +48 -40
- package/dist/{MemberImportHistory--FxkTJmu.js → MemberImportHistory-CHd9fx7E.js} +7 -7
- package/dist/{MemberList-EjY5dgwt.js → MemberList-D4L3bSlw.js} +105 -103
- package/dist/{MemberTransactions-Oia7LIFK.js → MemberTransactions-CEgjfhnX.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js → MessageInput.vue_vue_type_script_setup_true_lang-zsaig_yK.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-YZQkKG66.js} +1 -1
- package/dist/{Mission-BFHYb4aT.js → Mission-BEVtvY0-.js} +21 -22
- package/dist/{Overview-d5U37aot.js → Overview-4QRkldza.js} +144 -145
- package/dist/{Overview-BVNyQxFL.js → Overview-DVoXXZ16.js} +21 -21
- package/dist/{Point-CXkqH02Z.js → Point-BJmebaL9.js} +21 -22
- package/dist/{Promotion-DdxNvlOO.js → Promotion-DWZZBofu.js} +131 -137
- package/dist/{Queue-C96oNKyP.js → Queue-DLdsyhCT.js} +46 -46
- package/dist/{Record-Bj2e2Y4i.js → Record-QOD3XELf.js} +9 -9
- package/dist/{Review-CJK5S1oI.js → Review-CKmhyuqj.js} +2 -2
- package/dist/ReviewFacebookCallback-C6DlaJ_j.js +238 -0
- package/dist/{ReviewGoogleCallback-Dmk4VyGA.js → ReviewGoogleCallback-CDriVQPZ.js} +5 -5
- package/dist/{Reward-Dh2YI0Xb.js → Reward-DftoZfPN.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js → RewardGroup.vue_vue_type_script_setup_true_lang-ZgYX2QwC.js} +14 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHmBwLNP.js +1884 -0
- package/dist/{Segment-FYvtCkqH.js → Segment-URdB0lnl.js} +307 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmI2LAsz.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCEgZzA4.js} +4 -4
- package/dist/{Setting-CUAWjCqa.js → Setting-BDIHH2Wk.js} +148 -159
- package/dist/{SettingAdvertisements-COIQwUD6.js → SettingAdvertisements-CkJYZnIN.js} +12 -12
- package/dist/Settings-9gaegvYJ.js +179 -0
- package/dist/{Store-BAXwiyvx.js → Store-CV0kYncl.js} +29 -29
- package/dist/{StoreRewards-2mUavtUg.js → StoreRewards-30kSkAZ_.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dgwyk3NA.js +1265 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CDUhH6wp.js +142 -0
- package/dist/{Tier-BmAOzRHL.js → Tier-DiQSC3iv.js} +688 -2576
- package/dist/{Title-DMxiUg30.js → Title-DixxpjAg.js} +95 -96
- package/dist/{Transaction-CF6hXEpN.js → Transaction-DQK4LUGD.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CL-GKkuD.js} +26 -26
- package/dist/{Voucher-DrtITxq-.js → Voucher-CSVlk_Hr.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CiSoy0Ky.js} +12 -12
- package/dist/{WhatsappAccount-Bb0Y7ikk.js → WhatsappAccount-CQYbv2Ew.js} +66 -64
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DjgRo9iA.js} +1 -1
- package/dist/{WhatsappBot-DNvvaPey.js → WhatsappBot-DdO9Bfvh.js} +324 -322
- package/dist/{WhatsappBotLogs-C8M-1pvv.js → WhatsappBotLogs-CjjWJGND.js} +11 -11
- package/dist/{WhatsappBotSettings-D6egqUyU.js → WhatsappBotSettings-DYGx-kRr.js} +287 -288
- package/dist/{WhatsappLayout-DeQTPuF6.js → WhatsappLayout-B6k_79Kl.js} +3 -3
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DTUytfe5.js +261 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js → ZodTextField.vue_vue_type_script_setup_true_lang-DdCUr_Zm.js} +2 -2
- package/dist/{app-BjdLqYQq.js → app-CqQeNnGq.js} +3382 -4110
- package/dist/app.js +3 -4
- package/dist/{base.export-B68z5BF6.js → base.export-Dls5LQeu.js} +2 -2
- package/dist/{business-D9fgkHxb.js → business-gvLSQklz.js} +1 -1
- package/dist/{campaign-Dw_ujovr.js → campaign-BqazvOUj.js} +94 -121
- package/dist/{campaign-eMaPX8r6.js → campaign-Cd6GmA4U.js} +25 -31
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/{campaign.fn-DFjGNvmN.js → campaign.fn-C0oMb1fs.js} +99 -99
- package/dist/{collection.fn-CCOWtB-c.js → collection.fn-CERMsFPh.js} +2 -2
- package/dist/{currency-CTLKReFC.js → currency-IkiKiNg1.js} +1 -1
- package/dist/{effect-CTI1ZH57.js → effect-j_T62HBN.js} +1 -1
- package/dist/{email-addresses-B74e3bnB.js → email-addresses-CN1kPlEj.js} +2 -2
- package/dist/{feature-flag-DVdEaChJ.js → feature-flag-DDfyOLsv.js} +88 -88
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-as9K-piK.js → helper-DVUe13eh.js} +1 -1
- package/dist/{index-BW7FoVEA.js → index-9RBtEPPj.js} +1 -1
- package/dist/{index-Czg-2Ni0.js → index-BmIfGArh.js} +3 -3
- package/dist/{index-DKI8401o.js → index-BvkqHehI.js} +7 -7
- package/dist/{index-B0h0iYWP.js → index-BvoOJdfc.js} +2 -2
- package/dist/{index-CWLOcQ6j.js → index-C-IajuP1.js} +9 -9
- package/dist/{index-3LjKJhQa.js → index-COuLtOaw.js} +1 -1
- package/dist/{index-QHqcSN2q.js → index-CPyK4a5J.js} +4 -4
- package/dist/{index-BbVbqe4Y.js → index-CWGbeg5X.js} +6 -19
- package/dist/{index-CHU3UePP.js → index-C_SaKemI.js} +1 -1
- package/dist/{index-BEKMTiFb.js → index-Cjy0SXCn.js} +197 -197
- package/dist/{index-C5V6u2Qd.js → index-DALsfLV7.js} +2613 -2699
- package/dist/{index-CQxkDpX0.js → index-DMiaWY0s.js} +581 -682
- package/dist/{index-B_wRpO02.js → index-D_1pnadB.js} +15 -29
- package/dist/{index-TAoQpeLQ.js → index-DzbVgUEP.js} +1 -1
- package/dist/{index-C-iwb2Ln.js → index-I9lmcd2w.js} +2 -2
- package/dist/{index-wsCCqwdr.js → index-UJHdDEG1.js} +2 -2
- package/dist/{index-DcZiikOH.js → index-ep_Kxxid.js} +2 -2
- package/dist/{index-BhTrG89b.js → index-fNYUguDQ.js} +232 -389
- package/dist/{index-Ba719MYq.js → index-jS16KX9p.js} +1 -1
- package/dist/{index-Ckz6u3ac.js → index-k7FFxt_M.js} +2 -2
- package/dist/{index-8mBfDn3M.js → index-lzQ6ehOk.js} +251 -608
- package/dist/{index.esm2017-DL6rTGDW.js → index.esm2017-vJKhLfdu.js} +177 -177
- package/dist/{loading-x6IScY4K.js → loading-jZV2Dm--.js} +1 -1
- package/dist/{lodash-nwnDizYo.js → lodash-C2pLek0l.js} +1 -1
- package/dist/{member-import-C-b01Tyd.js → member-import-BKI7soRD.js} +1 -1
- package/dist/{membership-DfarOMtO.js → membership-smdlFpPr.js} +2 -2
- package/dist/{money-CFn-jR4W.js → money-5XyTnYwW.js} +1 -1
- package/dist/{number-CSlyDL2x.js → number-DHU9qJJQ.js} +1 -1
- package/dist/objectid-jT5g6pGt.js +145 -0
- package/dist/{onboarding-DyaFaaF2.js → onboarding-C_5pyGx-.js} +25 -25
- package/dist/{onboardingSetup-DQt91O9f.js → onboardingSetup-Bd1V-Ipy.js} +2 -2
- package/dist/{plugins-DEHr0UOe.js → plugins-D1Ru-da5.js} +3 -3
- package/dist/{reward-Du_Pv-4p.js → reward-BqPl68Xk.js} +1 -1
- package/dist/{rule-DfqmQTVK.js → rule-WBrRXwL-.js} +492 -572
- package/dist/rule-builder-DAlSbaWh.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DDquG4Xc.js +236 -0
- package/dist/{timezone-_4tabIaK.js → timezone-O4qrCDcK.js} +1 -1
- package/dist/{transaction.fn-C46PHwCV.js → transaction.fn-CY_F8Nb8.js} +2 -2
- package/dist/{trigger-Dipr6btC.js → trigger-D-vySeIB.js} +8 -8
- package/dist/{useMarketingMaterialActions-BAw2ZjeF.js → useMarketingMaterialActions-kA6SLHy_.js} +4 -4
- package/dist/{usePagination-D6RZ18zS.js → usePagination-AYE_RJH2.js} +1 -1
- package/dist/{user-BCexQj3Q.js → user-DJcMkYXP.js} +1 -1
- package/dist/vue-i18n-kXHiDb_1.js +2365 -0
- package/dist/{xlsx-BTxt_Jg6.js → xlsx--s3hBdDk.js} +224 -224
- package/dist/{zod-T4wMYjWT.js → zod-IpHRbxaJ.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BNnUiVnD.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +0 -4442
- package/dist/Grab-DDc7e-AC.js +0 -301
- package/dist/ReviewFacebookCallback-ChG7TRy5.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +0 -1923
- package/dist/Settings-D2gFPvmW.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +0 -7007
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +0 -253
- package/dist/duplicateCampaign-BcpBfUGL.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-zcT6ESET.js +0 -145
- package/dist/template-CcbNF4PF.js +0 -188
- package/dist/vue-i18n-DXvyTCZf.js +0 -2365
package/dist/Grab-DDc7e-AC.js
DELETED
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
import { defineComponent as q, ref as L, computed as z, h as J, onMounted as Q, resolveComponent as u, openBlock as f, createElementBlock as k, Fragment as F, createVNode as l, unref as i, withCtx as x, createElementVNode as m, renderList as W, createBlock as O, resolveDynamicComponent as X, toDisplayString as Y } from "vue";
|
|
2
|
-
import { _ as Z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as ee, components as te } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as P } from "./plugins-DEHr0UOe.js";
|
|
5
|
-
import { u as oe } from "./loading-x6IScY4K.js";
|
|
6
|
-
import { u as ne } from "./business-D9fgkHxb.js";
|
|
7
|
-
import { u as ae } from "./campaign-eMaPX8r6.js";
|
|
8
|
-
import { u as re } from "./vue-i18n-DXvyTCZf.js";
|
|
9
|
-
import { h as d } from "./moment-D7p2TMB-.js";
|
|
10
|
-
import { a as se, b as V } from "./campaign-Dw_ujovr.js";
|
|
11
|
-
import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js";
|
|
12
|
-
import { u as le } from "./template-CcbNF4PF.js";
|
|
13
|
-
import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
14
|
-
import { c as C } from "./index-DcZiikOH.js";
|
|
15
|
-
const me = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ q({
|
|
16
|
-
__name: "Grab",
|
|
17
|
-
setup(_e) {
|
|
18
|
-
const { t: o } = re(), I = {
|
|
19
|
-
label: o("connect.grab.createCampaign"),
|
|
20
|
-
value: "create",
|
|
21
|
-
isPrimary: !0,
|
|
22
|
-
prependIcon: "add"
|
|
23
|
-
}, A = le("GRAB", ee()), S = ne(), g = ae(), { global: R, minor: T } = oe, K = [
|
|
24
|
-
{
|
|
25
|
-
label: "Bill promotion",
|
|
26
|
-
value: "BILL"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "Item promotion",
|
|
30
|
-
value: "ITEM"
|
|
31
|
-
}
|
|
32
|
-
], c = L({
|
|
33
|
-
searchKey: "",
|
|
34
|
-
location: [],
|
|
35
|
-
effectType: []
|
|
36
|
-
});
|
|
37
|
-
function E(e) {
|
|
38
|
-
const t = c.value.location;
|
|
39
|
-
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((a) => {
|
|
40
|
-
var s;
|
|
41
|
-
return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(a);
|
|
42
|
-
}) : e.targetLocation.includes(t);
|
|
43
|
-
}
|
|
44
|
-
function j(e) {
|
|
45
|
-
var s, r;
|
|
46
|
-
const t = c.value.effectType;
|
|
47
|
-
if (!t || t.length === 0) return !0;
|
|
48
|
-
const a = (r = (s = e.effect) == null ? void 0 : s.options) == null ? void 0 : r.target;
|
|
49
|
-
return t.includes(a);
|
|
50
|
-
}
|
|
51
|
-
const p = z(
|
|
52
|
-
() => g.campaigns.grab.filter(
|
|
53
|
-
(e) => E(e) && j(e)
|
|
54
|
-
)
|
|
55
|
-
), G = [
|
|
56
|
-
{
|
|
57
|
-
header: o("connect.grab.promotionTitle"),
|
|
58
|
-
accessorFn: (e) => e.name
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
header: o("connect.grab.period"),
|
|
62
|
-
accessorFn: (e) => {
|
|
63
|
-
const t = d(e.timeframeOptions.start).format("DD/MM/YYYY"), a = d(e.timeframeOptions.end).format("DD/MM/YYYY");
|
|
64
|
-
return `${t} - ${a}`;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
header: o("connect.grab.status"),
|
|
69
|
-
accessorFn: (e) => se(e),
|
|
70
|
-
cell(e) {
|
|
71
|
-
return V(e.row.original);
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
header: o("connect.grab.summary"),
|
|
76
|
-
cell(e) {
|
|
77
|
-
const t = ie(e.row.original.discount);
|
|
78
|
-
return t ? `${t.type} - ${t.adjustment}` : "-";
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
header: o("connect.grab.actions"),
|
|
83
|
-
cell(e) {
|
|
84
|
-
return J(te.FmButton, {
|
|
85
|
-
variant: "tertiary",
|
|
86
|
-
icon: "delete",
|
|
87
|
-
iconColor: "neutral-gray-400",
|
|
88
|
-
onClick: (t) => {
|
|
89
|
-
t.stopPropagation(), D(e.row.original);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
], B = L();
|
|
95
|
-
async function D(e) {
|
|
96
|
-
await P.remove(o("connect.grab.confirmRemove", { name: e.name })) && await T(
|
|
97
|
-
async () => {
|
|
98
|
-
await C.delete(e._id), await g.read("PROMOTION");
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
message: o("connect.grab.removing", { name: e.name }),
|
|
102
|
-
successMessage: o("connect.grab.removedSuccessfully", {
|
|
103
|
-
name: e.name
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
async function b(e) {
|
|
109
|
-
e ? await t() : A.open(async (a) => {
|
|
110
|
-
await t(a);
|
|
111
|
-
});
|
|
112
|
-
async function t(a) {
|
|
113
|
-
var s;
|
|
114
|
-
(s = B.value) == null || s.showSheet(
|
|
115
|
-
!0,
|
|
116
|
-
"GRAB",
|
|
117
|
-
e ? await C.readById(e._id) : void 0,
|
|
118
|
-
a
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
async function N(e) {
|
|
123
|
-
var a;
|
|
124
|
-
const t = await U(e.campaign);
|
|
125
|
-
if (t.length > 0) {
|
|
126
|
-
const s = t.map(
|
|
127
|
-
(r) => `"${r.name}" (${d(r.timeframeOptions.start).format("DD/MM/YYYY")} - ${d(r.timeframeOptions.end).format("DD/MM/YYYY")})`
|
|
128
|
-
).join(`
|
|
129
|
-
`);
|
|
130
|
-
return await ((a = P.dialog) == null ? void 0 : a.open({
|
|
131
|
-
title: o("connect.grab.conflictDetected"),
|
|
132
|
-
message: o("connect.grab.conflictMessage", {
|
|
133
|
-
conflicts: s
|
|
134
|
-
}),
|
|
135
|
-
closeButton: !0,
|
|
136
|
-
overlay: !0,
|
|
137
|
-
primaryActions: {
|
|
138
|
-
close: !0,
|
|
139
|
-
text: "OK"
|
|
140
|
-
}
|
|
141
|
-
})), !1;
|
|
142
|
-
}
|
|
143
|
-
await T(
|
|
144
|
-
async () => (e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await g.read("PROMOTION"), !0),
|
|
145
|
-
{
|
|
146
|
-
message: o(
|
|
147
|
-
e.campaign._id ? "connect.grab.updating" : "connect.grab.creating"
|
|
148
|
-
),
|
|
149
|
-
successMessage: o(
|
|
150
|
-
e.campaign._id ? "connect.grab.updatedSuccessfully" : "connect.grab.createdSuccessfully"
|
|
151
|
-
)
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
async function U(e) {
|
|
156
|
-
const t = g.campaigns.grab, a = [], s = !!e._id;
|
|
157
|
-
for (const r of t) {
|
|
158
|
-
if (s && r._id === e._id) continue;
|
|
159
|
-
const _ = d(e.timeframeOptions.start), y = d(e.timeframeOptions.end), h = d(r.timeframeOptions.start), v = d(r.timeframeOptions.end);
|
|
160
|
-
if (_.isBefore(v) && y.isAfter(h) || h.isBefore(y) && v.isAfter(_)) {
|
|
161
|
-
const n = e.discount, w = r.discount;
|
|
162
|
-
n.scope.type === w.scope.type && a.push(r);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return a;
|
|
166
|
-
}
|
|
167
|
-
async function H(e) {
|
|
168
|
-
switch (e) {
|
|
169
|
-
case "create":
|
|
170
|
-
b();
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return Q(async () => {
|
|
175
|
-
await R(async () => {
|
|
176
|
-
await S.readLocations(), await g.read("PROMOTION");
|
|
177
|
-
});
|
|
178
|
-
}), (e, t) => {
|
|
179
|
-
const a = u("FmPill"), s = u("FmPageHead"), r = u("FmSearch"), _ = u("FmTable"), y = u("FmButton"), h = u("FmListItem"), v = u("FmList"), M = u("FmCard");
|
|
180
|
-
return f(), k(F, null, [
|
|
181
|
-
l(s, {
|
|
182
|
-
title: i(o)("connect.grab.title"),
|
|
183
|
-
actions: i(p).length > 0 ? [I] : [],
|
|
184
|
-
"onClick:action": H
|
|
185
|
-
}, {
|
|
186
|
-
prepend: x(() => [
|
|
187
|
-
l(a, { variant: "beta" }),
|
|
188
|
-
l(a, { variant: "premium" })
|
|
189
|
-
]),
|
|
190
|
-
_: 1
|
|
191
|
-
}, 8, ["title", "actions"]),
|
|
192
|
-
m("div", me, [
|
|
193
|
-
l(r, {
|
|
194
|
-
modelValue: c.value.searchKey,
|
|
195
|
-
"onUpdate:modelValue": t[0] || (t[0] = (n) => c.value.searchKey = n),
|
|
196
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
197
|
-
placeholder: i(o)("connect.grab.search"),
|
|
198
|
-
collapsible: ""
|
|
199
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
200
|
-
i(p) && i(p).length > 0 ? (f(), k(F, { key: 0 }, [
|
|
201
|
-
m("div", ue, [
|
|
202
|
-
m("div", de, [
|
|
203
|
-
l($, {
|
|
204
|
-
label: `${i(o)("connect.common.location")}: `,
|
|
205
|
-
"right-icon": "keyboard_arrow_down",
|
|
206
|
-
modelValue: c.value.location,
|
|
207
|
-
"onUpdate:modelValue": t[1] || (t[1] = (n) => c.value.location = n),
|
|
208
|
-
icon: "storefront",
|
|
209
|
-
"show-item-label": !0,
|
|
210
|
-
items: i(S).locationOptions
|
|
211
|
-
}, null, 8, ["label", "modelValue", "items"]),
|
|
212
|
-
l($, {
|
|
213
|
-
label: "Type:",
|
|
214
|
-
"right-icon": "keyboard_arrow_down",
|
|
215
|
-
modelValue: c.value.effectType,
|
|
216
|
-
"onUpdate:modelValue": t[2] || (t[2] = (n) => c.value.effectType = n),
|
|
217
|
-
icon: "filter_list",
|
|
218
|
-
"show-item-label": !0,
|
|
219
|
-
items: K
|
|
220
|
-
}, null, 8, ["modelValue"])
|
|
221
|
-
]),
|
|
222
|
-
l(r, {
|
|
223
|
-
modelValue: c.value.searchKey,
|
|
224
|
-
"onUpdate:modelValue": t[3] || (t[3] = (n) => c.value.searchKey = n),
|
|
225
|
-
class: "xs:hidden",
|
|
226
|
-
placeholder: "search",
|
|
227
|
-
collapsible: ""
|
|
228
|
-
}, null, 8, ["modelValue"])
|
|
229
|
-
]),
|
|
230
|
-
l(_, {
|
|
231
|
-
class: "xs:hidden",
|
|
232
|
-
"row-data": i(p),
|
|
233
|
-
"column-defs": G,
|
|
234
|
-
"search-value": c.value.searchKey,
|
|
235
|
-
"column-filter": [],
|
|
236
|
-
onRowClick: t[4] || (t[4] = (n) => b(n.original)),
|
|
237
|
-
"hide-footer": i(p).length < 10
|
|
238
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
239
|
-
l(v, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
240
|
-
default: x(() => [
|
|
241
|
-
(f(!0), k(F, null, W(i(p).filter(
|
|
242
|
-
(n) => n.name.toLowerCase().includes(c.value.searchKey.toLowerCase())
|
|
243
|
-
), (n) => (f(), O(h, {
|
|
244
|
-
key: n._id.toString(),
|
|
245
|
-
onClick: (w) => b(n),
|
|
246
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
247
|
-
}, {
|
|
248
|
-
default: x(() => [
|
|
249
|
-
m("div", pe, [
|
|
250
|
-
m("div", fe, [
|
|
251
|
-
(f(), O(X(i(V)(n))))
|
|
252
|
-
])
|
|
253
|
-
]),
|
|
254
|
-
l(y, {
|
|
255
|
-
icon: "delete",
|
|
256
|
-
"icon-color": "neutral-gray-400",
|
|
257
|
-
variant: "tertiary",
|
|
258
|
-
onClick: (w) => (w.stopPropagation(), D(n))
|
|
259
|
-
}, null, 8, ["onClick"])
|
|
260
|
-
]),
|
|
261
|
-
_: 2
|
|
262
|
-
}, 1032, ["onClick"]))), 128))
|
|
263
|
-
]),
|
|
264
|
-
_: 1
|
|
265
|
-
})
|
|
266
|
-
], 64)) : (f(), O(M, {
|
|
267
|
-
key: 1,
|
|
268
|
-
variant: "outlined",
|
|
269
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
270
|
-
}, {
|
|
271
|
-
default: x(() => [
|
|
272
|
-
t[6] || (t[6] = m("img", {
|
|
273
|
-
src: Z,
|
|
274
|
-
class: "aspect-square w-[150px]"
|
|
275
|
-
}, null, -1)),
|
|
276
|
-
m("div", ge, [
|
|
277
|
-
m("div", ye, Y(i(o)("connect.grab.createPromotionCampaign")), 1),
|
|
278
|
-
m("div", be, Y(i(o)("connect.grab.description")), 1)
|
|
279
|
-
]),
|
|
280
|
-
l(y, {
|
|
281
|
-
variant: "primary",
|
|
282
|
-
label: i(o)("connect.grab.createPromotionCampaign"),
|
|
283
|
-
icon: "add",
|
|
284
|
-
onClick: t[5] || (t[5] = (n) => b())
|
|
285
|
-
}, null, 8, ["label"])
|
|
286
|
-
]),
|
|
287
|
-
_: 1
|
|
288
|
-
}))
|
|
289
|
-
]),
|
|
290
|
-
l(ce, {
|
|
291
|
-
ref_key: "sheetRef",
|
|
292
|
-
ref: B,
|
|
293
|
-
"onSubmit:modelValue": N
|
|
294
|
-
}, null, 512)
|
|
295
|
-
], 64);
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
export {
|
|
300
|
-
Pe as default
|
|
301
|
-
};
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { defineComponent as L, computed as T, openBlock as i, createElementBlock as m, normalizeClass as B, createElementVNode as u, createBlock as P, unref as e, toDisplayString as y, createCommentVNode as F, createVNode as v, onMounted as $, ref as I, Fragment as E, renderList as R, resolveComponent as M, isRef as N } from "vue";
|
|
2
|
-
import { u as C } from "./vue-i18n-DXvyTCZf.js";
|
|
3
|
-
import { components as x } from "@feedmepos/ui-library";
|
|
4
|
-
import { r as S } from "./index-CWLOcQ6j.js";
|
|
5
|
-
import { u as j } from "./business-D9fgkHxb.js";
|
|
6
|
-
import { _ as U } from "./LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js";
|
|
7
|
-
import { R as z } from "./app-BjdLqYQq.js";
|
|
8
|
-
import { useRouter as V } from "vue-router";
|
|
9
|
-
const A = ["src"], H = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, D = {
|
|
10
|
-
key: 2,
|
|
11
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
12
|
-
}, G = /* @__PURE__ */ L({
|
|
13
|
-
__name: "FacebookPageConfig",
|
|
14
|
-
props: {
|
|
15
|
-
page: {},
|
|
16
|
-
expanded: { type: Boolean },
|
|
17
|
-
availableLocations: {}
|
|
18
|
-
},
|
|
19
|
-
emits: ["toggleExpand", "toggleLocation"],
|
|
20
|
-
setup(s, { emit: t }) {
|
|
21
|
-
const k = s, f = t, { t: r } = C(), g = T(() => k.page.locationIds);
|
|
22
|
-
return (h, p) => (i(), m("div", {
|
|
23
|
-
class: B([
|
|
24
|
-
"rounded-lg border overflow-hidden transition-colors",
|
|
25
|
-
s.expanded ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
26
|
-
])
|
|
27
|
-
}, [
|
|
28
|
-
u("button", {
|
|
29
|
-
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
30
|
-
onClick: p[0] || (p[0] = (c) => f("toggleExpand"))
|
|
31
|
-
}, [
|
|
32
|
-
s.page.pageProfileImageUrl ? (i(), m("img", {
|
|
33
|
-
key: 0,
|
|
34
|
-
src: s.page.pageProfileImageUrl,
|
|
35
|
-
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
36
|
-
}, null, 8, A)) : (i(), P(e(x).FmIcon, {
|
|
37
|
-
key: 1,
|
|
38
|
-
name: "thumb_up",
|
|
39
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
40
|
-
})),
|
|
41
|
-
u("span", H, y(s.page.pageName), 1),
|
|
42
|
-
s.page.locationIds.length > 0 ? (i(), m("span", D, y(e(r)("connect.review.locationsSelected", s.page.locationIds.length)), 1)) : F("", !0),
|
|
43
|
-
v(e(x).FmIcon, {
|
|
44
|
-
name: s.expanded ? "expand_less" : "expand_more",
|
|
45
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
46
|
-
}, null, 8, ["name"])
|
|
47
|
-
]),
|
|
48
|
-
s.expanded ? (i(), P(U, {
|
|
49
|
-
key: 0,
|
|
50
|
-
locations: s.availableLocations,
|
|
51
|
-
"selected-ids": e(g),
|
|
52
|
-
onToggle: p[1] || (p[1] = (c) => f("toggleLocation", c))
|
|
53
|
-
}, null, 8, ["locations", "selected-ids"])) : F("", !0)
|
|
54
|
-
], 2));
|
|
55
|
-
}
|
|
56
|
-
}), O = { class: "flex flex-col gap-8" }, W = /* @__PURE__ */ L({
|
|
57
|
-
__name: "FacebookPageLocationMapping",
|
|
58
|
-
props: {
|
|
59
|
-
pages: {}
|
|
60
|
-
},
|
|
61
|
-
emits: ["update:pages"],
|
|
62
|
-
setup(s, { emit: t }) {
|
|
63
|
-
const k = s, f = j();
|
|
64
|
-
$(() => f.readLocations());
|
|
65
|
-
const r = t, g = I(null), h = T(() => {
|
|
66
|
-
const l = /* @__PURE__ */ new Set();
|
|
67
|
-
for (const b of k.pages)
|
|
68
|
-
b.locationIds.forEach((a) => l.add(a));
|
|
69
|
-
return l;
|
|
70
|
-
});
|
|
71
|
-
function p(l) {
|
|
72
|
-
const b = new Set(l.locationIds);
|
|
73
|
-
return f.locations.filter((a) => {
|
|
74
|
-
const n = a._id.toString();
|
|
75
|
-
return !h.value.has(n) || b.has(n);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function c(l, b) {
|
|
79
|
-
const a = b._id.toString(), n = k.pages.map((o) => {
|
|
80
|
-
if (o.facebookPageId !== l) return o;
|
|
81
|
-
const _ = o.locationIds.includes(a);
|
|
82
|
-
return {
|
|
83
|
-
...o,
|
|
84
|
-
locationIds: _ ? o.locationIds.filter((d) => d !== a) : [...o.locationIds, a]
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
r("update:pages", n);
|
|
88
|
-
}
|
|
89
|
-
function w(l) {
|
|
90
|
-
g.value = g.value === l ? null : l;
|
|
91
|
-
}
|
|
92
|
-
return (l, b) => (i(), m("div", O, [
|
|
93
|
-
(i(!0), m(E, null, R(s.pages, (a) => (i(), P(G, {
|
|
94
|
-
key: a.facebookPageId,
|
|
95
|
-
page: a,
|
|
96
|
-
expanded: e(g) === a.facebookPageId,
|
|
97
|
-
"available-locations": p(a),
|
|
98
|
-
onToggleExpand: (n) => w(a.facebookPageId),
|
|
99
|
-
onToggleLocation: (n) => c(a.facebookPageId, n)
|
|
100
|
-
}, null, 8, ["page", "expanded", "available-locations", "onToggleExpand", "onToggleLocation"]))), 128))
|
|
101
|
-
]));
|
|
102
|
-
}
|
|
103
|
-
}), q = { class: "flex flex-col min-h-full gap-16 p-24" }, J = {
|
|
104
|
-
key: 0,
|
|
105
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
106
|
-
}, K = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Q = {
|
|
107
|
-
key: 1,
|
|
108
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
109
|
-
}, X = { class: "fm-typo-en-body-lg-600" }, Y = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Z = {
|
|
110
|
-
key: 2,
|
|
111
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
112
|
-
}, ee = { class: "fm-typo-en-body-lg-600" }, oe = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, te = { class: "fm-typo-en-body-lg-600" }, ne = { class: "flex gap-8 justify-end mt-auto pt-8" }, me = /* @__PURE__ */ L({
|
|
113
|
-
__name: "ReviewFacebookCallback",
|
|
114
|
-
setup(s) {
|
|
115
|
-
const { t } = C(), k = V();
|
|
116
|
-
function f() {
|
|
117
|
-
return k.replace({ name: z["$connect-REVIEW_SETTINGS"] });
|
|
118
|
-
}
|
|
119
|
-
const r = I([]), g = I(!1), h = I(!1), p = I(!1), c = I(null), w = T(
|
|
120
|
-
() => r.value.some((n) => n.locationIds.length > 0)
|
|
121
|
-
);
|
|
122
|
-
function l(n, o) {
|
|
123
|
-
return n instanceof Error ? n.message : o;
|
|
124
|
-
}
|
|
125
|
-
async function b() {
|
|
126
|
-
const n = window.location.hash;
|
|
127
|
-
if (!n) {
|
|
128
|
-
c.value = t("connect.review.noToken");
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const _ = new URLSearchParams(n.slice(1)).get("access_token");
|
|
132
|
-
if (!_) {
|
|
133
|
-
c.value = t("connect.review.noToken");
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
g.value = !0;
|
|
137
|
-
try {
|
|
138
|
-
const d = await S.connectFacebook(_);
|
|
139
|
-
r.value = (d == null ? void 0 : d.pages) ?? [], r.value.length === 0 && (c.value = t("connect.review.facebook.noPages"));
|
|
140
|
-
} catch (d) {
|
|
141
|
-
c.value = l(d, t("connect.review.facebook.failed"));
|
|
142
|
-
} finally {
|
|
143
|
-
g.value = !1;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
async function a() {
|
|
147
|
-
if (!w.value) {
|
|
148
|
-
c.value = t("connect.review.noMappings");
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const n = r.value.map((o) => ({
|
|
152
|
-
facebookPageId: o.facebookPageId,
|
|
153
|
-
locationIds: o.locationIds
|
|
154
|
-
}));
|
|
155
|
-
h.value = !0;
|
|
156
|
-
try {
|
|
157
|
-
await S.updateFacebookPages(n), p.value = !0, setTimeout(f, 2e3);
|
|
158
|
-
} catch (o) {
|
|
159
|
-
c.value = l(o, t("connect.review.facebook.failed"));
|
|
160
|
-
} finally {
|
|
161
|
-
h.value = !1;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return $(b), (n, o) => {
|
|
165
|
-
const _ = M("FmPageHead");
|
|
166
|
-
return i(), m(E, null, [
|
|
167
|
-
v(_, {
|
|
168
|
-
title: e(t)("connect.navigation.review")
|
|
169
|
-
}, null, 8, ["title"]),
|
|
170
|
-
u("div", q, [
|
|
171
|
-
e(g) ? (i(), m("div", J, [
|
|
172
|
-
v(e(x).FmIcon, {
|
|
173
|
-
name: "sync",
|
|
174
|
-
size: "xl",
|
|
175
|
-
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
176
|
-
}),
|
|
177
|
-
u("p", K, y(e(t)("connect.review.facebook.fetching")), 1)
|
|
178
|
-
])) : e(p) ? (i(), m("div", Q, [
|
|
179
|
-
v(e(x).FmIcon, {
|
|
180
|
-
name: "check_circle",
|
|
181
|
-
size: "xl",
|
|
182
|
-
class: "text-fm-color-typo-success"
|
|
183
|
-
}),
|
|
184
|
-
u("p", X, y(e(t)("connect.review.facebook.success")), 1),
|
|
185
|
-
u("p", Y, y(e(t)("connect.review.redirecting")), 1)
|
|
186
|
-
])) : e(c) ? (i(), m("div", Z, [
|
|
187
|
-
v(e(x).FmIcon, {
|
|
188
|
-
name: "error",
|
|
189
|
-
size: "xl",
|
|
190
|
-
class: "text-fm-color-system-error-500"
|
|
191
|
-
}),
|
|
192
|
-
u("p", ee, y(e(t)("connect.review.errorTitle")), 1),
|
|
193
|
-
u("p", oe, y(e(c)), 1),
|
|
194
|
-
v(e(x).FmButton, {
|
|
195
|
-
label: e(t)("connect.review.goBack"),
|
|
196
|
-
onClick: o[0] || (o[0] = (d) => f())
|
|
197
|
-
}, null, 8, ["label"])
|
|
198
|
-
])) : e(r).length > 0 ? (i(), m(E, { key: 3 }, [
|
|
199
|
-
u("p", te, y(e(t)("connect.review.facebook.selectPage")), 1),
|
|
200
|
-
v(W, {
|
|
201
|
-
pages: e(r),
|
|
202
|
-
"onUpdate:pages": o[1] || (o[1] = (d) => N(r) ? r.value = d : null)
|
|
203
|
-
}, null, 8, ["pages"]),
|
|
204
|
-
u("div", ne, [
|
|
205
|
-
v(e(x).FmButton, {
|
|
206
|
-
variant: "secondary",
|
|
207
|
-
label: e(t)("connect.review.cancel"),
|
|
208
|
-
onClick: o[2] || (o[2] = (d) => f())
|
|
209
|
-
}, null, 8, ["label"]),
|
|
210
|
-
v(e(x).FmButton, {
|
|
211
|
-
label: e(t)("connect.review.connect"),
|
|
212
|
-
disabled: !e(w),
|
|
213
|
-
loading: e(h),
|
|
214
|
-
onClick: a
|
|
215
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
216
|
-
])
|
|
217
|
-
], 64)) : F("", !0)
|
|
218
|
-
])
|
|
219
|
-
], 64);
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
export {
|
|
224
|
-
me as default
|
|
225
|
-
};
|