@feedmepos/mf-connect 0.1.126-dev → 0.1.126-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-B_Yp6cvN.js → App-DRHHPaMz.js} +216 -224
- package/dist/{Bin-CmIpEIwe.js → Bin-FkcYLSTm.js} +8 -8
- package/dist/{Broadcast-DkV4BdU_.js → Broadcast-Cgqp_BMa.js} +21 -22
- package/dist/{CampaignAnalytic-Dkwo_lpB.js → CampaignAnalytic-kKZ_BwW0.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Ch8Gblw6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CX0mWLjO.js} +10 -9
- package/dist/{Card-DXCkG34M.js → Card-Bu1y37hV.js} +23 -23
- package/dist/{Collections-CybPfSO4.js → Collections-B3mJkBCT.js} +185 -197
- package/dist/{Credit-B-KUzWsX.js → Credit-Bn-2EcVy.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CWHYeYVD.js → DateRangeChip.vue_vue_type_script_setup_true_lang-Cz7pZ7LD.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DIUEjCFW.js +3638 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-nMcH6y5e.js → EffectSheet.vue_vue_type_style_index_0_lang-B7XBiv4l.js} +33 -33
- package/dist/{Experience-Q2NHpa-V.js → Experience-CunbmoAu.js} +31 -32
- package/dist/{FileSaver.min-CKw2rn-J.js → FileSaver.min-ChFSxYyS.js} +1 -1
- package/dist/{Game-lZvkg04z.js → Game-dFDwx_UJ.js} +18 -19
- package/dist/{GiftCardSetup-CPRju80_.js → GiftCardSetup-DYpEqqX0.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Ci686UoB.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DxJdI6gc.js} +7 -7
- package/dist/{Goals-asGsUeVv.js → Goals-DuZzgM_K.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-nk87zPWH.js → ImageInput.vue_vue_type_script_setup_true_lang-lDulspkF.js} +1 -1
- package/dist/{Index-DIasPS4Y.js → Index-BxB2ohT0.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DkOn8p1v.js → LocationPicker.vue_vue_type_script_setup_true_lang-9sKJE1A5.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BdSkxiP-.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CxBNYzcz.js} +1 -1
- package/dist/{LoyaltyDashboard-DlCsZ3YX.js → LoyaltyDashboard-DQzGvQ7j.js} +15 -15
- package/dist/{MainLayout-DLObnTAA.js → MainLayout-MAZ1S06H.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DigSZKt1.js → MainLayout.vue_vue_type_script_setup_true_lang-CeF3LU-N.js} +3 -3
- package/dist/{Marketing-JflPW-w9.js → Marketing-ACF6F7be.js} +4 -4
- package/dist/{MarketingMaterialEdit-fSAB3YVb.js → MarketingMaterialEdit-B8NfkoHg.js} +211 -214
- package/dist/{Member-CzNahXTj.js → Member-rLxDUOr8.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-bqWUIbMG.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Bq3UKX7v.js} +48 -40
- package/dist/{MemberImportHistory--r_A_2Es.js → MemberImportHistory-BuG6DmdV.js} +7 -7
- package/dist/{MemberList-CQZQ4sN8.js → MemberList-CC6zm_I6.js} +105 -103
- package/dist/{MemberTransactions-BPg9JaUA.js → MemberTransactions-Bw2xu6jZ.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BhIFChx-.js → MessageInput.vue_vue_type_script_setup_true_lang-Cav8gQUK.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CdGSNqEp.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8wdY4FnI.js} +1 -1
- package/dist/{Mission-CYCB3YQc.js → Mission-DnEcbALs.js} +21 -22
- package/dist/{Overview-DuNuUYYq.js → Overview-COytI5xN.js} +21 -21
- package/dist/{Overview-B5ylMBHT.js → Overview-DShFohlk.js} +144 -145
- package/dist/{Point-DG-Uwj25.js → Point-CWYwlx0i.js} +21 -22
- package/dist/{Promotion-DqxBQ1yO.js → Promotion-LBrQYtad.js} +131 -137
- package/dist/{Queue-Cy8LGt_Y.js → Queue-DKg5EvDM.js} +46 -46
- package/dist/{Record-CzXbu41w.js → Record--lYpawLN.js} +9 -9
- package/dist/{Review-7VL6gIqp.js → Review-C4pNmJ7n.js} +2 -2
- package/dist/ReviewFacebookCallback-BYXwKQNG.js +238 -0
- package/dist/{ReviewGoogleCallback-1JXR_f5O.js → ReviewGoogleCallback-ge8fL_A-.js} +5 -5
- package/dist/{Reward-BKhUDEu3.js → Reward-B67r1Bpz.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DjjCytWF.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bt0Kx2--.js} +14 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-fLtn32Rw.js +1884 -0
- package/dist/{Segment-DdHDJhaS.js → Segment-DeSC3z5G.js} +307 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-9kGUkHMi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DdjC7X1V.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DeFw0px7.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Crys59UO.js} +4 -4
- package/dist/{Setting-DZKGXw-i.js → Setting-DiDcMU5E.js} +17 -17
- package/dist/{SettingAdvertisements-BBNs8tCw.js → SettingAdvertisements-3wMI9egH.js} +12 -12
- package/dist/Settings-BR6Y1DBZ.js +179 -0
- package/dist/{Store-C8IlE4IH.js → Store-DgefqByH.js} +29 -29
- package/dist/{StoreRewards-DWygRLR1.js → StoreRewards-CS2h5RVB.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CeYYws6P.js → StoreTransactions.vue_vue_type_script_setup_true_lang-gPR8sn4k.js} +25 -25
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Cjnkpd1j.js +142 -0
- package/dist/{Tier-7RoxGHsP.js → Tier-Cye6888q.js} +688 -2583
- package/dist/{Title-0q2Z4HIe.js → Title-B1eJh5oy.js} +95 -96
- package/dist/{Transaction-CFasERdg.js → Transaction-ouzdsBUx.js} +2 -2
- package/dist/{Upselling-DM9R6pYw.js → Upselling-CdQd2Fuk.js} +3 -3
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BDjwcgnc.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSlxe1Hf.js} +26 -26
- package/dist/{Voucher-BkzW2hVV.js → Voucher-CJJt8VlJ.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DaE4xa3x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BzbNaK6H.js} +12 -12
- package/dist/{WhatsappAccount-C3WpDF9O.js → WhatsappAccount-DIxSP6Tp.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BxC_3h52.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-L9Y5lAft.js} +1 -1
- package/dist/{WhatsappBot-DZb-Dn3s.js → WhatsappBot-BXxoaz7-.js} +6 -6
- package/dist/{WhatsappBotLogs--KskC32Z.js → WhatsappBotLogs-D8IfLHk3.js} +6 -6
- package/dist/WhatsappBotSettings-Bq9C7pNZ.js +704 -0
- package/dist/{WhatsappLayout-NIrFGbId.js → WhatsappLayout-3rWwmGRd.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BfD5hHc7.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-C3N-loYJ.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CJGxy7gf.js → ZodTextField.vue_vue_type_script_setup_true_lang-D1dORvMi.js} +2 -2
- package/dist/{app-B9nLnoBt.js → app-BXqas0p1.js} +3386 -4174
- package/dist/app.js +3 -4
- package/dist/{base.export-CBzNea0v.js → base.export-DQCZiS2E.js} +2 -2
- package/dist/{business-aT2zslwu.js → business-RsRhXSh8.js} +1 -1
- package/dist/{campaign-BDCLKFwN.js → campaign-C2X6aa7B.js} +25 -31
- package/dist/{campaign-B6nTwt17.js → campaign-DASPASQ0.js} +113 -126
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/campaign.fn-BEX99lsa.js +776 -0
- package/dist/{collection.fn-CDna_VLD.js → collection.fn-C7jNdh0A.js} +2 -2
- package/dist/{currency-Baum67Wz.js → currency-BvBM_Io9.js} +1 -1
- package/dist/{effect-CeJbflOK.js → effect-BA1yh6Mj.js} +1 -1
- package/dist/{email-addresses-Y3vF73J0.js → email-addresses-haS5P7hq.js} +2 -2
- package/dist/{feature-flag-zn6Ql9tv.js → feature-flag-B4bJnuei.js} +84 -84
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-DZvnn-yx.js → helper-BtTBvFuA.js} +1 -1
- package/dist/{index-CMs3aIA6.js → index-B1dAoOWi.js} +6 -19
- package/dist/{index-DXyOBtgF.js → index-B6A6sHpy.js} +1 -1
- package/dist/{index-B22ojkMy.js → index-BRTy6G9c.js} +2 -2
- package/dist/{index-r_T5o_hF.js → index-BV-YiCDM.js} +2 -2
- package/dist/{index-DJIt5tXC.js → index-BvFq5REc.js} +7 -7
- package/dist/{index-FgM7b2Sw.js → index-C2rjmdar.js} +2 -2
- package/dist/{index-DXKJsqgW.js → index-C7UBk5gq.js} +13 -31
- package/dist/{index-BqniSMV6.js → index-CBfVFFME.js} +197 -197
- package/dist/{index-B3LCTMwV.js → index-CH-uRaZH.js} +41 -52
- package/dist/{index-juXxYQ_a.js → index-CJ-BZCvB.js} +1242 -1314
- package/dist/{index-B5H4znfe.js → index-CXznvd79.js} +4 -4
- package/dist/{index-Da0-7h2j.js → index-ChGZ_S3V.js} +1 -1
- package/dist/{index-DCR1GFCA.js → index-D-D0s8PB.js} +234 -380
- package/dist/{index-BL2zQnXK.js → index-D9zjHXFU.js} +3 -3
- package/dist/{index-CPi3Qwmj.js → index-DAtVp1NI.js} +2613 -2699
- package/dist/{index-DkBOM8za.js → index-DeomfIu9.js} +251 -608
- package/dist/{index-DHNhIloU.js → index-Dg972Dfv.js} +1 -1
- package/dist/{index-BYUEPfbP.js → index-Dm2Dvxph.js} +23 -23
- package/dist/{index-njg4JLa-.js → index-DtbR7I4C.js} +9 -9
- package/dist/{index-B20FfbEE.js → index-Q-iHraJ3.js} +1 -1
- package/dist/{index-CDRTiAEu.js → index-g_SHjVWE.js} +1 -1
- package/dist/{index.esm2017-Dtk7BscN.js → index.esm2017-B7iE1Ggr.js} +93 -93
- package/dist/{loading-PoODMkQD.js → loading-BvlSfSVK.js} +1 -1
- package/dist/{lodash-TthNgH98.js → lodash-Daey2k0N.js} +1 -1
- package/dist/{member-import-D7zs0Jvh.js → member-import-CF9aym_y.js} +1 -1
- package/dist/{membership-Cab-iWQ1.js → membership-DfG-fl80.js} +2 -2
- package/dist/{money-9Q306M3g.js → money-SBIQhxqf.js} +1 -1
- package/dist/{number-D9M3D435.js → number-Cp1bFK9U.js} +1 -1
- package/dist/objectid-BMRA1fIL.js +145 -0
- package/dist/{onboarding-D5LKUHVI.js → onboarding-bjc7C8O-.js} +25 -25
- package/dist/{onboardingSetup-D0jsS6w5.js → onboardingSetup-BAu9TDI6.js} +2 -2
- package/dist/{plugins-CDTKQ1Pg.js → plugins-Def73Eyk.js} +3 -3
- package/dist/{reward-De3e9vYS.js → reward-KecVeztH.js} +1 -1
- package/dist/rule-builder-DgU6P24U.js +102 -0
- package/dist/{rule-trVJgEOe.js → rule-kMIC0vOi.js} +492 -572
- package/dist/style.css +1 -1
- package/dist/template-BH9vS8A9.js +275 -0
- package/dist/{timezone-DkuByUmb.js → timezone-CMX1sJ0a.js} +1 -1
- package/dist/{transaction.fn-CPE-oQhA.js → transaction.fn-Bjy5utxD.js} +2 -2
- package/dist/{trigger-C6oM-8pe.js → trigger-DnnOJVUi.js} +9 -9
- package/dist/{useMarketingMaterialActions-C5scdJQp.js → useMarketingMaterialActions-DMrNOpok.js} +4 -4
- package/dist/{usePagination-CIuTHSSG.js → usePagination-BCY4a-dh.js} +1 -1
- package/dist/{user-Bdlgn2yo.js → user-BTc0S1Vx.js} +1 -1
- package/dist/vue-i18n-7BKLPLxj.js +2365 -0
- package/dist/{xlsx-CvecxUOG.js → xlsx-DR5oLrEs.js} +1 -1
- package/dist/{zod-bniyeWdY.js → zod-CMq39HWn.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-C1U17evK.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C86llTFR.js +0 -4439
- package/dist/Grab-BjFLSMpE.js +0 -301
- package/dist/ReviewFacebookCallback-BwzuPmrz.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Vg7pRGIz.js +0 -1923
- package/dist/Settings-9v0hnBJZ.js +0 -286
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BiN3uRJ_.js +0 -7007
- package/dist/WhatsappBotSettings-Dns_PqVE.js +0 -945
- package/dist/campaign.fn-Ck1t5C1T.js +0 -776
- package/dist/duplicateCampaign-BwrMZgaV.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-DKvQl6FD.js +0 -145
- package/dist/template-Bj3Tb6bP.js +0 -227
- package/dist/vue-i18n-DEpDI-dt.js +0 -2365
package/dist/Grab-BjFLSMpE.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-CDTKQ1Pg.js";
|
|
5
|
-
import { u as oe } from "./loading-PoODMkQD.js";
|
|
6
|
-
import { u as ne } from "./business-aT2zslwu.js";
|
|
7
|
-
import { u as ae } from "./campaign-BDCLKFwN.js";
|
|
8
|
-
import { u as re } from "./vue-i18n-DEpDI-dt.js";
|
|
9
|
-
import { h as d } from "./moment-D7p2TMB-.js";
|
|
10
|
-
import { a as se, b as V } from "./campaign-B6nTwt17.js";
|
|
11
|
-
import { s as ie, _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C86llTFR.js";
|
|
12
|
-
import { u as le } from "./template-Bj3Tb6bP.js";
|
|
13
|
-
import { _ as $ } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
14
|
-
import { c as C } from "./index-r_T5o_hF.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-DEpDI-dt.js";
|
|
3
|
-
import { components as x } from "@feedmepos/ui-library";
|
|
4
|
-
import { r as S } from "./index-njg4JLa-.js";
|
|
5
|
-
import { u as j } from "./business-aT2zslwu.js";
|
|
6
|
-
import { _ as U } from "./LocationPicker.vue_vue_type_script_setup_true_lang-DkOn8p1v.js";
|
|
7
|
-
import { R as z } from "./app-B9nLnoBt.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
|
-
};
|