@feedmepos/mf-connect 0.1.98-prod → 0.1.100-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-BHDjuMfN.js → Analytic-XINt9B5E.js} +68 -67
- package/dist/{App-BSSze_b9.js → App-D9rsw0Yw.js} +811 -665
- package/dist/{Bin-DfzoQbE0.js → Bin-Bn4jz9a5.js} +8 -8
- package/dist/{Broadcast-DsqO4SXX.js → Broadcast-C2lNY8LH.js} +37 -34
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQ0x2VJp.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B92vx_Vk.js} +6 -6
- package/dist/{Card-VxbqomXV.js → Card-VjSIVoYP.js} +18 -18
- package/dist/{Collections-CvD98I3M.js → Collections-XUNGy8IL.js} +16 -15
- package/dist/{Credit-BhM2m2L2.js → Credit-Di0w45Hp.js} +11 -10
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DvfrrjHc.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-C32lZqSA.js} +32 -32
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CPx9U9fU.js → EffectSheet.vue_vue_type_style_index_0_lang-D3DrzR4N.js} +6 -6
- package/dist/{Experience-uWQRb-qf.js → Experience-BJSRITSv.js} +30 -29
- package/dist/{FileSaver.min-DKNoHTvP.js → FileSaver.min-B_Ymi-NF.js} +1 -1
- package/dist/{Game-BgT3oNx7.js → Game-DMM7drh2.js} +12 -11
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-ClqrJbU6.js → ImageInput.vue_vue_type_script_setup_true_lang-Co4kHzny.js} +1 -1
- package/dist/{Index-D3RgVj9V.js → Index-CuNMEC3w.js} +10 -10
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-CerTVWce.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CkCpumzB.js → LottieAnimation.vue_vue_type_script_setup_true_lang-XSvUUehA.js} +1 -1
- package/dist/{MainLayout-B2RiPsIR.js → MainLayout-D346WHmU.js} +1 -1
- package/dist/{Marketing-FrE7k7eW.js → Marketing-BwNU3ZkH.js} +4 -4
- package/dist/{MarketingMaterialEdit-DGNjEUu-.js → MarketingMaterialEdit-BXGBbKBt.js} +6 -6
- package/dist/{Member-CgTagUQ9.js → Member-B4He21B9.js} +11 -11
- package/dist/{MemberList-CKbzsDMX.js → MemberList-BsrjrcEu.js} +26 -26
- package/dist/{MemberTransactions-CnY5cFdv.js → MemberTransactions-s4DsYK7K.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DqivG_O4.js → MessageInput.vue_vue_type_script_setup_true_lang-BAKTr2Pq.js} +5434 -5279
- package/dist/{Mission-BGNqy7wQ.js → Mission-C3Hkny_r.js} +42 -41
- package/dist/Overview-BRf4GaDa.js +969 -0
- package/dist/{Overview-CnpF74wa.js → Overview-rjoe2HYr.js} +18 -18
- package/dist/{Point-BHgIy7Bz.js → Point-JJ2fRCIx.js} +25 -24
- package/dist/{Promotion-CNQvO5Lq.js → Promotion-fbSo4NJd.js} +12 -11
- package/dist/{Queue-CoPBE0UP.js → Queue-DE2G8iin.js} +16 -16
- package/dist/{Record-BuDQ15FJ.js → Record-C-8Q6nj7.js} +9 -9
- package/dist/Review-DH2P029F.js +46 -0
- package/dist/ReviewFacebookCallback-65plwW_E.js +238 -0
- package/dist/ReviewGoogleCallback-BUrwTtDU.js +213 -0
- package/dist/{Reward-BQlCO3Dk.js → Reward-CuxO88gi.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-nhNr_T7D.js → RewardGroup.vue_vue_type_script_setup_true_lang-BWxRzc64.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-lnxwLa8o.js → RuleGroup.vue_vue_type_script_setup_true_lang-C9GeT2EK.js} +14 -14
- package/dist/{Segment-DKFAXGzY.js → Segment-DcmanYob.js} +24 -24
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CUR7djaM.js → SelectItems.vue_vue_type_script_setup_true_lang-CEuhMVfD.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CZ3s2W8Q.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CuxO3_3_.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbilZk82.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DScmPfA-.js} +4 -4
- package/dist/{Setting-hrDZ1cQR.js → Setting-CFTp0GmM.js} +14 -14
- package/dist/{SettingAdvertisements-CQsx4JqQ.js → SettingAdvertisements-8xmkoUKa.js} +12 -12
- package/dist/Settings-gILVyEj2.js +228 -0
- package/dist/{Store-Cgmsklnt.js → Store-DQVq0Xi6.js} +21 -21
- package/dist/{StoreRewards-CrPO4DKG.js → StoreRewards-DmSlqv8a.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-yesp6BoT.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CyHk--_H.js} +350 -401
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BnKybdKJ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-udy1jEkk.js} +2 -2
- package/dist/{Tier-DgKMMyKr.js → Tier-CTY4RIwU.js} +100 -99
- package/dist/{Title-BKijiEFV.js → Title-5HaDc6DJ.js} +30 -29
- package/dist/{Transaction-zHL4q_wj.js → Transaction-Bkx0TKcE.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DjafpVOa.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CxlCuX9E.js} +6 -6
- package/dist/{Voucher-DW4-SD1w.js → Voucher-YC-bec2o.js} +15 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-y2wm2Bcu.js → VoucherEditor.vue_vue_type_script_setup_true_lang-2M6Vq8n7.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BWZUE554.js → ZodTextField.vue_vue_type_script_setup_true_lang-DFtesZs1.js} +2 -2
- package/dist/{app-B23RANXL.js → app-D0hzDd4e.js} +3629 -2961
- package/dist/app.js +1 -1
- package/dist/{business-BFU-2tpT.js → business-BnGi3KpM.js} +1 -1
- package/dist/campaign-Bxl_qdCX.js +94 -0
- package/dist/{campaign-BEKKOWya.js → campaign-p_ahNQqG.js} +8 -8
- package/dist/{campaign.enum-5KIiekYl.js → campaign.enum-6c5-J08o.js} +1 -1
- package/dist/{campaign.fn-CyWn_KL-.js → campaign.fn-CFny8OoE.js} +169 -169
- package/dist/{collectible.enum-DmmR-4Nj.js → collectible.enum-DzAp8NtK.js} +1 -1
- package/dist/{collection.fn-BB1OjBHL.js → collection.fn-DfJWUHyr.js} +2 -2
- package/dist/{dto-p31OYANk.js → dto-CEtiwWkS.js} +4 -4
- package/dist/{effect-DNDXE2iM.js → effect-D8goCe5E.js} +1 -1
- package/dist/{email-addresses-DXSkxrZ6.js → email-addresses-D06zPBLT.js} +2 -2
- package/dist/{export-zMj-UAnF.js → export-HaMl_Azr.js} +3 -3
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-D32ml7Qv.js → helper-CCtbisll.js} +1 -1
- package/dist/{index-Cc15IFUt.js → index-BO1Znykz.js} +1 -1
- package/dist/{index-DSGHkaP0.js → index-BOdZ1yDb.js} +1 -1
- package/dist/{index-PrTZHXNT.js → index-BrrdqEYe.js} +1 -1
- package/dist/index-CXhfmTIq.js +61 -0
- package/dist/index-CfIjhpNE.js +130 -0
- package/dist/index-CqDkGInW.js +45 -0
- package/dist/{index-B2OiTtF5.js → index-D-frQ2XF.js} +1 -1
- package/dist/{index-B9-jeiQR.js → index-DOfCIojC.js} +274 -293
- package/dist/{index-BWHk6oqv.js → index-DOsqahSi.js} +3 -3
- package/dist/{index-9jgqbdnt.js → index-DWEToi5v.js} +2 -2
- package/dist/{index-CA09A75h.js → index-Db7pTgFI.js} +3 -3
- package/dist/{index-CcnOzrwY.js → index-Dv6xFaU8.js} +1 -1
- package/dist/{index-DvHLsdIR.js → index-DzAMDjV5.js} +372 -103
- package/dist/{index-BmmFSQPd.js → index-tp4p25fB.js} +3 -3
- package/dist/{index-txVWLdtz.js → index-vulLVFK6.js} +1 -1
- package/dist/{index.esm2017-BJG8dqci.js → index.esm2017-DcvVBTwu.js} +1 -1
- package/dist/{loading-DuZVM_Ow.js → loading-CCOPHoh7.js} +1 -1
- package/dist/{lodash-DqQem5rZ.js → lodash-Do054Rv4.js} +1 -1
- package/dist/{membership-CvoEzwor.js → membership-D3vhqFT0.js} +3 -3
- package/dist/{money-B9PJ_JYh.js → money-VTIkdUl1.js} +1 -1
- package/dist/{number-GIC15kny.js → number-Ba3vNpgw.js} +1 -1
- package/dist/{objectid-CtJ4pTf2.js → objectid-DcsNOw8j.js} +6 -6
- package/dist/{plugins-XAhAFHmZ.js → plugins-Dk2lSfQI.js} +3 -3
- package/dist/{reward-Dy0Z6PLL.js → reward-BCRoFqpp.js} +1 -1
- package/dist/{rule-CUu9I1Ly.js → rule-DDB9bCnP.js} +3 -3
- package/dist/{rule-builder-DPmaehAO.js → rule-builder-CeD7EpXo.js} +1 -1
- package/dist/{template-BHtdbnoX.js → template-DpCblGWK.js} +7 -7
- package/dist/{timezone-BE1YhvLN.js → timezone-B4lML23K.js} +2 -2
- package/dist/{trigger-BcHfjuiZ.js → trigger-BgQMlw3-.js} +5 -5
- package/dist/{useMarketingMaterialActions-YQq4LWOp.js → useMarketingMaterialActions-Bnnnqi34.js} +3 -3
- package/dist/{usePagination-B1KK2gTx.js → usePagination-CbMNQlO7.js} +1 -1
- package/dist/{user-BTRRi1B3.js → user-Bi7G6H-v.js} +1 -1
- package/dist/{vue-i18n-D8NX5Rry.js → vue-i18n-DP39yHHU.js} +165 -165
- package/dist/{xlsx-C9LzK7Kg.js → xlsx-DwXPVJ6t.js} +1 -1
- package/dist/{zod-D3ciRzE4.js → zod-DERH6pU3.js} +1 -1
- package/package.json +1 -1
- package/dist/campaign-CwlWx58O.js +0 -213
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as ve, ref as F, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as de, createTextVNode as ce, createCommentVNode as z, h as te, onMounted as _e } from "vue";
|
|
2
2
|
import { _ as ge } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { u as Z } from "./vue-i18n-
|
|
4
|
-
import { u as ue } from "./loading-
|
|
5
|
-
import { p as K } from "./plugins-
|
|
3
|
+
import { u as Z } from "./vue-i18n-DP39yHHU.js";
|
|
4
|
+
import { u as ue } from "./loading-CCOPHoh7.js";
|
|
5
|
+
import { p as K } from "./plugins-Dk2lSfQI.js";
|
|
6
6
|
import { J as X } from "./JsonViewer-v8_C7l5N.js";
|
|
7
|
-
import { Z as N } from "./zod-
|
|
7
|
+
import { Z as N } from "./zod-DERH6pU3.js";
|
|
8
8
|
import { u as W } from "./app-wDQR6dpb.js";
|
|
9
|
-
import { u as Q, _ as we } from "./RewardGroup.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as me } from "./reward-
|
|
11
|
-
import { m as le, c as se } from "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
14
|
-
import { a as ye, b as be } from "./index-
|
|
15
|
-
import "./index-
|
|
16
|
-
import { C as fe } from "./membership-
|
|
17
|
-
import { t as ee } from "./helper-
|
|
9
|
+
import { u as Q, _ as we } from "./RewardGroup.vue_vue_type_script_setup_true_lang-BWxRzc64.js";
|
|
10
|
+
import { u as me } from "./reward-BCRoFqpp.js";
|
|
11
|
+
import { m as le, c as se } from "./index-DOfCIojC.js";
|
|
12
|
+
import "./index-Db7pTgFI.js";
|
|
13
|
+
import "./index-tp4p25fB.js";
|
|
14
|
+
import { a as ye, b as be } from "./index-DzAMDjV5.js";
|
|
15
|
+
import "./index-DOsqahSi.js";
|
|
16
|
+
import { C as fe } from "./membership-D3vhqFT0.js";
|
|
17
|
+
import { t as ee } from "./helper-CCtbisll.js";
|
|
18
18
|
import { c as H } from "./object-qECH92oz.js";
|
|
19
19
|
import { useDialog as xe, components as oe } from "@feedmepos/ui-library";
|
|
20
|
-
import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { a as Re, _ as Se, b as Fe } from "./trigger-
|
|
22
|
-
import { O as ke } from "./objectid-
|
|
20
|
+
import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DFtesZs1.js";
|
|
21
|
+
import { a as Re, _ as Se, b as Fe } from "./trigger-BgQMlw3-.js";
|
|
22
|
+
import { O as ke } from "./objectid-DcsNOw8j.js";
|
|
23
23
|
import { c as $e } from "./string-Gcy5IM_H.js";
|
|
24
|
-
import { r as pe } from "./index-
|
|
25
|
-
import { u as Pe } from "./business-
|
|
24
|
+
import { r as pe } from "./index-BOdZ1yDb.js";
|
|
25
|
+
import { u as Pe } from "./business-BnGi3KpM.js";
|
|
26
26
|
const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { class: "space-y-4 hidden xs:!block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, je = { class: "flex-1 space-y-4" }, De = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
|
|
27
27
|
__name: "ReferralRewadGroupCard",
|
|
28
28
|
props: {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as H, ref as I, computed as q, h as x, onMounted as z, resolveComponent as m, openBlock as
|
|
1
|
+
import { defineComponent as H, ref as I, computed as q, h as x, onMounted as z, resolveComponent as m, openBlock as d, createElementBlock as v, Fragment as k, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as u, renderList as G, createBlock as F, resolveDynamicComponent as J } from "vue";
|
|
2
2
|
import { _ as Q } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as W, components as V } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as X } from "./plugins-
|
|
5
|
-
import { u as Y } from "./loading-
|
|
6
|
-
import { u as Z } from "./business-
|
|
7
|
-
import { u as ee
|
|
8
|
-
import { g as te, a as $, b as N } from "./campaign-
|
|
9
|
-
import { u as oe, c as ae, p as ne } from "./template-
|
|
4
|
+
import { p as X } from "./plugins-Dk2lSfQI.js";
|
|
5
|
+
import { u as Y } from "./loading-CCOPHoh7.js";
|
|
6
|
+
import { u as Z } from "./business-BnGi3KpM.js";
|
|
7
|
+
import { u as ee } from "./campaign-Bxl_qdCX.js";
|
|
8
|
+
import { g as te, a as $, b as N } from "./campaign-p_ahNQqG.js";
|
|
9
|
+
import { u as oe, c as ae, p as ne } from "./template-DpCblGWK.js";
|
|
10
10
|
import { _ as ie } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
-
import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { u as re } from "./vue-i18n-
|
|
13
|
-
|
|
11
|
+
import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C32lZqSA.js";
|
|
12
|
+
import { u as re } from "./vue-i18n-DP39yHHU.js";
|
|
13
|
+
import { c as f } from "./index-CfIjhpNE.js";
|
|
14
|
+
const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "flex items-center gap-8" }, Ce = { class: "flex flex-col gap-16 text-center" }, we = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ H({
|
|
14
15
|
__name: "Point",
|
|
15
16
|
setup(xe) {
|
|
16
17
|
const { t: i } = re(), D = {
|
|
@@ -20,7 +21,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
20
21
|
value: "create",
|
|
21
22
|
isPrimary: !0,
|
|
22
23
|
prependIcon: "add"
|
|
23
|
-
}, K = oe("COIN", W()), C = Z(),
|
|
24
|
+
}, K = oe("COIN", W()), C = Z(), p = ee(), { global: O, minor: S } = Y, l = I({
|
|
24
25
|
searchKey: "",
|
|
25
26
|
location: []
|
|
26
27
|
});
|
|
@@ -32,7 +33,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
32
33
|
}) : e.targetLocation.includes(t);
|
|
33
34
|
}
|
|
34
35
|
const g = q(
|
|
35
|
-
() =>
|
|
36
|
+
() => p.campaigns.point.filter((e) => A(e))
|
|
36
37
|
), R = [
|
|
37
38
|
{
|
|
38
39
|
header: i("connect.program.common.table.title"),
|
|
@@ -76,7 +77,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
76
77
|
async function L(e) {
|
|
77
78
|
await X.remove(`Are you sure you want to remove ${e.name}?`) && await S(
|
|
78
79
|
async () => {
|
|
79
|
-
await f.delete(e._id), await
|
|
80
|
+
await f.delete(e._id), await p.read("COIN");
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
83
|
message: `Removing ${e.name}`,
|
|
@@ -115,7 +116,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
115
116
|
async function U(e) {
|
|
116
117
|
await S(
|
|
117
118
|
async () => {
|
|
118
|
-
e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await
|
|
119
|
+
e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("COIN");
|
|
119
120
|
},
|
|
120
121
|
{
|
|
121
122
|
message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
|
|
@@ -125,11 +126,11 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
125
126
|
}
|
|
126
127
|
return z(async () => {
|
|
127
128
|
await O(async () => {
|
|
128
|
-
await
|
|
129
|
+
await p.read("COIN");
|
|
129
130
|
});
|
|
130
131
|
}), (e, t) => {
|
|
131
132
|
const c = m("FmPill"), r = m("FmPageHead"), B = m("FmSearch"), j = m("FmTable"), b = m("FmButton"), T = m("FmListItem"), E = m("FmList"), M = m("FmCard");
|
|
132
|
-
return
|
|
133
|
+
return d(), v(k, null, [
|
|
133
134
|
s(r, {
|
|
134
135
|
title: o(i)("connect.program.point.title"),
|
|
135
136
|
actions: o(g).length > 0 && o(C).isPremium ? [D] : [],
|
|
@@ -151,9 +152,9 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
151
152
|
placeholder: "search",
|
|
152
153
|
collapsible: ""
|
|
153
154
|
}, null, 8, ["modelValue"]),
|
|
154
|
-
o(
|
|
155
|
-
n("div",
|
|
156
|
-
n("div",
|
|
155
|
+
o(p).campaigns.point && o(p).campaigns.point.length > 0 ? (d(), v(k, { key: 0 }, [
|
|
156
|
+
n("div", pe, [
|
|
157
|
+
n("div", de, [
|
|
157
158
|
s(ie, {
|
|
158
159
|
label: `${o(i)("connect.common.location")}: `,
|
|
159
160
|
"right-icon": "keyboard_arrow_down",
|
|
@@ -183,9 +184,9 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
183
184
|
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
184
185
|
s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
185
186
|
default: h(() => [
|
|
186
|
-
(
|
|
187
|
+
(d(!0), v(k, null, G(o(g).filter(
|
|
187
188
|
(a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
|
|
188
|
-
), (a) => (
|
|
189
|
+
), (a) => (d(), F(T, {
|
|
189
190
|
key: a._id.toString(),
|
|
190
191
|
onClick: (_) => y(a),
|
|
191
192
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
@@ -193,7 +194,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
193
194
|
default: h(() => [
|
|
194
195
|
n("div", ue, [
|
|
195
196
|
n("div", fe, [
|
|
196
|
-
(
|
|
197
|
+
(d(), F(J(o($)(a))))
|
|
197
198
|
]),
|
|
198
199
|
n("div", ge, [
|
|
199
200
|
n("div", ye, u(a.name), 1),
|
|
@@ -222,7 +223,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
222
223
|
]),
|
|
223
224
|
_: 1
|
|
224
225
|
})
|
|
225
|
-
], 64)) : (
|
|
226
|
+
], 64)) : (d(), F(M, {
|
|
226
227
|
key: 1,
|
|
227
228
|
variant: "outlined",
|
|
228
229
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
@@ -257,5 +258,5 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
|
|
|
257
258
|
}
|
|
258
259
|
});
|
|
259
260
|
export {
|
|
260
|
-
|
|
261
|
+
Oe as default
|
|
261
262
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { defineComponent as E, ref as w, resolveComponent as d, openBlock as f, createBlock as S, unref as a, isRef as oe, withCtx as k, createElementVNode as r, createVNode as c, computed as te, h as I, onMounted as ne, createElementBlock as L, Fragment as B, renderList as ae, resolveDynamicComponent as se, toDisplayString as F } from "vue";
|
|
2
2
|
import { _ as ie } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as re, components as $ } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as j } from "./plugins-
|
|
5
|
-
import { u as le } from "./loading-
|
|
6
|
-
import { u as ce } from "./business-
|
|
7
|
-
import {
|
|
8
|
-
import { u as ue } from "./vue-i18n-
|
|
9
|
-
import { g as de, a as D } from "./campaign-
|
|
10
|
-
import { u as pe, c as fe, p as ye } from "./template-
|
|
11
|
-
import { e as q } from "./effect-
|
|
4
|
+
import { p as j } from "./plugins-Dk2lSfQI.js";
|
|
5
|
+
import { u as le } from "./loading-CCOPHoh7.js";
|
|
6
|
+
import { u as ce } from "./business-BnGi3KpM.js";
|
|
7
|
+
import { u as me } from "./campaign-Bxl_qdCX.js";
|
|
8
|
+
import { u as ue } from "./vue-i18n-DP39yHHU.js";
|
|
9
|
+
import { g as de, a as D } from "./campaign-p_ahNQqG.js";
|
|
10
|
+
import { u as pe, c as fe, p as ye } from "./template-DpCblGWK.js";
|
|
11
|
+
import { e as q } from "./effect-D8goCe5E.js";
|
|
12
12
|
import { c as K } from "./string-Gcy5IM_H.js";
|
|
13
|
-
import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
13
|
+
import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C32lZqSA.js";
|
|
14
|
+
import { c as y } from "./index-CfIjhpNE.js";
|
|
14
15
|
import { _ as U } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
15
16
|
const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
|
|
16
17
|
__name: "QueueSheet",
|
|
@@ -69,7 +70,7 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
|
|
|
69
70
|
}, 8, ["modelValue"]);
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
|
-
}), we = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, be = { class: "flex gap-8 overflow-x-auto" }, Ce = { class: "space-y-8" }, xe = { class: "flex w-full gap-4 items-center" }, Fe = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "flex items-center gap-8" }, Te = { class: "flex flex-col gap-16 text-center" }, Ve = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
73
|
+
}), we = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, be = { class: "flex gap-8 overflow-x-auto" }, Ce = { class: "space-y-8" }, xe = { class: "flex w-full gap-4 items-center" }, Fe = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "flex items-center gap-8" }, Te = { class: "flex flex-col gap-16 text-center" }, Ve = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, He = /* @__PURE__ */ E({
|
|
73
74
|
__name: "Promotion",
|
|
74
75
|
setup(Q) {
|
|
75
76
|
const { t: n } = ue(), R = {
|
|
@@ -387,5 +388,5 @@ const he = { class: "space-y-8" }, _e = /* @__PURE__ */ E({
|
|
|
387
388
|
}
|
|
388
389
|
});
|
|
389
390
|
export {
|
|
390
|
-
|
|
391
|
+
He as default
|
|
391
392
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { defineComponent as h, h as n, ref as A, watch as B, onBeforeMount as U, resolveComponent as V, openBlock as z, createElementBlock as O, Fragment as q, createVNode as m, unref as o, createElementVNode as g } from "vue";
|
|
2
|
-
import { u as L, _ as
|
|
2
|
+
import { u as L, _ as Y } from "./usePagination-CbMNQlO7.js";
|
|
3
3
|
import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
4
4
|
import { c as u } from "./string-Gcy5IM_H.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { useDialog as
|
|
7
|
-
import {
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./index-
|
|
11
|
-
import "./index-
|
|
5
|
+
import { c as G } from "./plugins-Dk2lSfQI.js";
|
|
6
|
+
import { useDialog as K, components as b } from "@feedmepos/ui-library";
|
|
7
|
+
import { J as c, c as d } from "./index-DOfCIojC.js";
|
|
8
|
+
import "./index-Db7pTgFI.js";
|
|
9
|
+
import "./index-tp4p25fB.js";
|
|
10
|
+
import "./index-DzAMDjV5.js";
|
|
11
|
+
import "./index-DOsqahSi.js";
|
|
12
12
|
import { h as y } from "./moment-D7p2TMB-.js";
|
|
13
|
-
import { u as j } from "./vue-i18n-
|
|
14
|
-
import { u as H, v as W, w as $ } from "./index.esm2017-
|
|
15
|
-
import { useRoute as
|
|
16
|
-
import { g as
|
|
13
|
+
import { u as j } from "./vue-i18n-DP39yHHU.js";
|
|
14
|
+
import { u as H, v as W, w as $ } from "./index.esm2017-DcvVBTwu.js";
|
|
15
|
+
import { useRoute as J } from "vue-router";
|
|
16
|
+
import { g as Q, S as X, u as Z } from "./index-DWEToi5v.js";
|
|
17
17
|
import { o as ee } from "./objectId-dwaoBfJX.js";
|
|
18
18
|
const te = () => {
|
|
19
19
|
if (!X.getBusinessId()) throw new Error("Invalid business ID");
|
|
20
20
|
return Z("queues");
|
|
21
21
|
}, oe = {
|
|
22
22
|
async readImportMember(p, w) {
|
|
23
|
-
return
|
|
23
|
+
return Q(
|
|
24
24
|
await te().get("", {
|
|
25
25
|
params: { ...p, ...w }
|
|
26
26
|
})
|
|
@@ -31,7 +31,7 @@ var ae = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDo
|
|
|
31
31
|
const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, Ee = /* @__PURE__ */ h({
|
|
32
32
|
__name: "Queue",
|
|
33
33
|
setup(p) {
|
|
34
|
-
const x =
|
|
34
|
+
const x = J().query.type, { t: E } = j(), v = K(), D = [
|
|
35
35
|
{
|
|
36
36
|
header: "ID",
|
|
37
37
|
accessorKey: "_id",
|
|
@@ -46,7 +46,7 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
|
|
|
46
46
|
size: "sm",
|
|
47
47
|
class: "cursor-pointer mr-4",
|
|
48
48
|
onClick: (e) => {
|
|
49
|
-
e.preventDefault(), e.stopPropagation(),
|
|
49
|
+
e.preventDefault(), e.stopPropagation(), G(t.row.original._id.toString());
|
|
50
50
|
}
|
|
51
51
|
}),
|
|
52
52
|
n(
|
|
@@ -235,7 +235,7 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
|
|
|
235
235
|
}, null, 8, ["modelValue", "items"])
|
|
236
236
|
])
|
|
237
237
|
]),
|
|
238
|
-
m(
|
|
238
|
+
m(Y, {
|
|
239
239
|
loading: o(i).isLoading,
|
|
240
240
|
"row-data": o(N),
|
|
241
241
|
"row-count": o(i).totalRows,
|
|
@@ -2,19 +2,19 @@ var q = Object.defineProperty;
|
|
|
2
2
|
var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[o] = m;
|
|
3
3
|
var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
|
|
4
4
|
import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
|
|
5
|
-
import { u as oe, _ as ae } from "./usePagination-
|
|
6
|
-
import { g as A } from "./user-
|
|
5
|
+
import { u as oe, _ as ae } from "./usePagination-CbMNQlO7.js";
|
|
6
|
+
import { g as A } from "./user-Bi7G6H-v.js";
|
|
7
7
|
import { components as R } from "@feedmepos/ui-library";
|
|
8
|
-
import "./index-
|
|
9
|
-
import { u as j } from "./vue-i18n-
|
|
10
|
-
import { u as L } from "./loading-
|
|
8
|
+
import "./index-tp4p25fB.js";
|
|
9
|
+
import { u as j } from "./vue-i18n-DP39yHHU.js";
|
|
10
|
+
import { u as L } from "./loading-CCOPHoh7.js";
|
|
11
11
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
12
|
-
import { r as v } from "./index-
|
|
12
|
+
import { r as v } from "./index-BOdZ1yDb.js";
|
|
13
13
|
import { c as ie, a as ne } from "./object-qECH92oz.js";
|
|
14
|
-
import { u as ce } from "./membership-
|
|
14
|
+
import { u as ce } from "./membership-D3vhqFT0.js";
|
|
15
15
|
import { c as le } from "./string-Gcy5IM_H.js";
|
|
16
|
-
import { c as de } from "./plugins-
|
|
17
|
-
import { u as V, w as me } from "./xlsx-
|
|
16
|
+
import { c as de } from "./plugins-Dk2lSfQI.js";
|
|
17
|
+
import { u as V, w as me } from "./xlsx-DwXPVJ6t.js";
|
|
18
18
|
import { e as f } from "./index-vh86FiIQ.js";
|
|
19
19
|
import { h as ue } from "./moment-D7p2TMB-.js";
|
|
20
20
|
import { o as pe } from "./objectId-dwaoBfJX.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent as p, computed as d, resolveComponent as o, openBlock as v, createElementBlock as f, Fragment as R, createVNode as n, unref as l, createElementVNode as s } from "vue";
|
|
2
|
+
import { u as E } from "./vue-i18n-DP39yHHU.js";
|
|
3
|
+
import { R as V } from "./app-D0hzDd4e.js";
|
|
4
|
+
import { useRouter as b } from "vue-router";
|
|
5
|
+
const w = { class: "flex flex-col" }, x = { class: "px-24" }, k = /* @__PURE__ */ p({
|
|
6
|
+
__name: "Review",
|
|
7
|
+
setup(F) {
|
|
8
|
+
const { t: a } = E(), c = b(), t = [
|
|
9
|
+
{
|
|
10
|
+
label: a("connect.review.tabs.overview"),
|
|
11
|
+
value: V["$connect-REVIEW_OVERVIEW"]
|
|
12
|
+
}
|
|
13
|
+
// Hidden until the external review source rollout is ready.
|
|
14
|
+
// {
|
|
15
|
+
// label: t('connect.review.tabs.settings'),
|
|
16
|
+
// value: ROUTE_NAME['$connect-REVIEW_SETTINGS'],
|
|
17
|
+
// },
|
|
18
|
+
], r = d(
|
|
19
|
+
() => t.find((e) => e.value === c.currentRoute.value.name) ?? t[0]
|
|
20
|
+
);
|
|
21
|
+
async function m(e) {
|
|
22
|
+
await c.push({ name: e });
|
|
23
|
+
}
|
|
24
|
+
return (e, T) => {
|
|
25
|
+
const u = o("FmPageHead"), i = o("FmTabs"), _ = o("RouterView");
|
|
26
|
+
return v(), f(R, null, [
|
|
27
|
+
n(u, {
|
|
28
|
+
title: l(a)("connect.navigation.review")
|
|
29
|
+
}, null, 8, ["title"]),
|
|
30
|
+
s("div", w, [
|
|
31
|
+
s("div", x, [
|
|
32
|
+
n(i, {
|
|
33
|
+
"model-value": l(r).value,
|
|
34
|
+
items: t,
|
|
35
|
+
"onUpdate:modelValue": m
|
|
36
|
+
}, null, 8, ["model-value"])
|
|
37
|
+
]),
|
|
38
|
+
n(_)
|
|
39
|
+
])
|
|
40
|
+
], 64);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
k as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { defineComponent as C, computed as M, openBlock as l, createElementBlock as g, normalizeClass as j, createElementVNode as u, createBlock as T, unref as e, toDisplayString as h, createCommentVNode as S, createVNode as y, onMounted as B, ref as P, Fragment as $, renderList as U, resolveComponent as z, isRef as V } from "vue";
|
|
2
|
+
import { u as R } from "./vue-i18n-DP39yHHU.js";
|
|
3
|
+
import { components as I } from "@feedmepos/ui-library";
|
|
4
|
+
import { r as L } from "./index-CXhfmTIq.js";
|
|
5
|
+
import { u as A } from "./business-BnGi3KpM.js";
|
|
6
|
+
import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-CerTVWce.js";
|
|
7
|
+
import { R as D } from "./app-D0hzDd4e.js";
|
|
8
|
+
import { useRouter as G } from "vue-router";
|
|
9
|
+
const O = ["src"], W = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, q = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
12
|
+
}, J = /* @__PURE__ */ C({
|
|
13
|
+
__name: "FacebookPageConfig",
|
|
14
|
+
props: {
|
|
15
|
+
page: {},
|
|
16
|
+
expanded: { type: Boolean },
|
|
17
|
+
availableLocations: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["toggleExpand", "toggleLocation"],
|
|
20
|
+
setup(s, { emit: n }) {
|
|
21
|
+
const _ = s, f = n, { t: i } = R(), m = M(() => _.page.locationIds);
|
|
22
|
+
return (w, p) => (l(), g("div", {
|
|
23
|
+
class: j([
|
|
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 ? (l(), g("img", {
|
|
33
|
+
key: 0,
|
|
34
|
+
src: s.page.pageProfileImageUrl,
|
|
35
|
+
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
36
|
+
}, null, 8, O)) : (l(), T(e(I).FmIcon, {
|
|
37
|
+
key: 1,
|
|
38
|
+
name: "thumb_up",
|
|
39
|
+
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
40
|
+
})),
|
|
41
|
+
u("span", W, h(s.page.pageName), 1),
|
|
42
|
+
s.page.locationIds.length > 0 ? (l(), g("span", q, h(e(i)("connect.review.locationsSelected", s.page.locationIds.length)), 1)) : S("", !0),
|
|
43
|
+
y(e(I).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 ? (l(), T(H, {
|
|
49
|
+
key: 0,
|
|
50
|
+
locations: s.availableLocations,
|
|
51
|
+
"selected-ids": e(m),
|
|
52
|
+
onToggle: p[1] || (p[1] = (c) => f("toggleLocation", c))
|
|
53
|
+
}, null, 8, ["locations", "selected-ids"])) : S("", !0)
|
|
54
|
+
], 2));
|
|
55
|
+
}
|
|
56
|
+
}), K = { class: "flex flex-col gap-8" }, Q = /* @__PURE__ */ C({
|
|
57
|
+
__name: "FacebookPageLocationMapping",
|
|
58
|
+
props: {
|
|
59
|
+
pages: {}
|
|
60
|
+
},
|
|
61
|
+
emits: ["update:pages"],
|
|
62
|
+
setup(s, { emit: n }) {
|
|
63
|
+
const _ = s, f = A();
|
|
64
|
+
B(() => f.readLocations());
|
|
65
|
+
const i = n, m = P(null), w = M(() => {
|
|
66
|
+
const r = /* @__PURE__ */ new Set();
|
|
67
|
+
for (const v of _.pages)
|
|
68
|
+
v.locationIds.forEach((a) => r.add(a));
|
|
69
|
+
return r;
|
|
70
|
+
});
|
|
71
|
+
function p(r) {
|
|
72
|
+
const v = new Set(r.locationIds);
|
|
73
|
+
return f.locations.filter((a) => {
|
|
74
|
+
const b = a._id.toString();
|
|
75
|
+
return !w.value.has(b) || v.has(b);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function c(r, v) {
|
|
79
|
+
const a = v._id.toString(), b = _.pages.map((o) => {
|
|
80
|
+
if (o.facebookPageId !== r) return o;
|
|
81
|
+
const t = o.locationIds.includes(a);
|
|
82
|
+
return {
|
|
83
|
+
...o,
|
|
84
|
+
locationIds: t ? o.locationIds.filter((k) => k !== a) : [...o.locationIds, a]
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
i("update:pages", b);
|
|
88
|
+
}
|
|
89
|
+
function F(r) {
|
|
90
|
+
m.value = m.value === r ? null : r;
|
|
91
|
+
}
|
|
92
|
+
return (r, v) => (l(), g("div", K, [
|
|
93
|
+
(l(!0), g($, null, U(s.pages, (a) => (l(), T(J, {
|
|
94
|
+
key: a.facebookPageId,
|
|
95
|
+
page: a,
|
|
96
|
+
expanded: e(m) === a.facebookPageId,
|
|
97
|
+
"available-locations": p(a),
|
|
98
|
+
onToggleExpand: (b) => F(a.facebookPageId),
|
|
99
|
+
onToggleLocation: (b) => c(a.facebookPageId, b)
|
|
100
|
+
}, null, 8, ["page", "expanded", "available-locations", "onToggleExpand", "onToggleLocation"]))), 128))
|
|
101
|
+
]));
|
|
102
|
+
}
|
|
103
|
+
}), X = { class: "flex flex-col min-h-full gap-16 p-24" }, Y = {
|
|
104
|
+
key: 0,
|
|
105
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
106
|
+
}, Z = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ee = {
|
|
107
|
+
key: 1,
|
|
108
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
109
|
+
}, oe = { class: "fm-typo-en-body-lg-600" }, te = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ne = {
|
|
110
|
+
key: 2,
|
|
111
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
112
|
+
}, ae = { class: "fm-typo-en-body-lg-600" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ce = { class: "fm-typo-en-body-lg-600" }, le = { class: "flex gap-8 justify-end mt-auto pt-8" }, ve = /* @__PURE__ */ C({
|
|
113
|
+
__name: "ReviewFacebookCallback",
|
|
114
|
+
setup(s) {
|
|
115
|
+
const { t: n } = R(), _ = G();
|
|
116
|
+
function f() {
|
|
117
|
+
return _.replace({ name: D["$connect-REVIEW_SETTINGS"] });
|
|
118
|
+
}
|
|
119
|
+
const i = P([]), m = P(!1), w = P(!1), p = P(!1), c = P(null), F = M(
|
|
120
|
+
() => i.value.some((o) => o.locationIds.length > 0)
|
|
121
|
+
);
|
|
122
|
+
function r(o, t) {
|
|
123
|
+
const k = new Map(
|
|
124
|
+
t.map((d) => [d.facebookPageId, d])
|
|
125
|
+
);
|
|
126
|
+
return o.map((d) => {
|
|
127
|
+
var x;
|
|
128
|
+
return {
|
|
129
|
+
...d,
|
|
130
|
+
locationIds: ((x = k.get(d.facebookPageId)) == null ? void 0 : x.locationIds) ?? []
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function v(o, t) {
|
|
135
|
+
return o instanceof Error ? o.message : t;
|
|
136
|
+
}
|
|
137
|
+
async function a() {
|
|
138
|
+
var d;
|
|
139
|
+
const o = window.location.hash;
|
|
140
|
+
if (!o) {
|
|
141
|
+
c.value = n("connect.review.noToken");
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const k = new URLSearchParams(o.slice(1)).get("access_token");
|
|
145
|
+
if (!k) {
|
|
146
|
+
c.value = n("connect.review.noToken");
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
m.value = !0;
|
|
150
|
+
try {
|
|
151
|
+
const x = await L.getSource(), N = ((d = x == null ? void 0 : x.facebook) == null ? void 0 : d.pages) ?? [], E = await L.connectFacebook(k);
|
|
152
|
+
i.value = r((E == null ? void 0 : E.pages) ?? [], N), i.value.length === 0 && (c.value = n("connect.review.facebook.noPages"));
|
|
153
|
+
} catch (x) {
|
|
154
|
+
c.value = v(x, n("connect.review.facebook.failed"));
|
|
155
|
+
} finally {
|
|
156
|
+
m.value = !1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
async function b() {
|
|
160
|
+
const o = i.value.filter((t) => t.locationIds.length > 0).map((t) => ({
|
|
161
|
+
facebookPageId: t.facebookPageId,
|
|
162
|
+
locationIds: t.locationIds
|
|
163
|
+
}));
|
|
164
|
+
if (o.length === 0) {
|
|
165
|
+
c.value = n("connect.review.noMappings");
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
w.value = !0;
|
|
169
|
+
try {
|
|
170
|
+
await L.updateFacebookPages(o), p.value = !0, setTimeout(f, 2e3);
|
|
171
|
+
} catch (t) {
|
|
172
|
+
c.value = v(t, n("connect.review.facebook.failed"));
|
|
173
|
+
} finally {
|
|
174
|
+
w.value = !1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return B(a), (o, t) => {
|
|
178
|
+
const k = z("FmPageHead");
|
|
179
|
+
return l(), g($, null, [
|
|
180
|
+
y(k, {
|
|
181
|
+
title: e(n)("connect.navigation.review")
|
|
182
|
+
}, null, 8, ["title"]),
|
|
183
|
+
u("div", X, [
|
|
184
|
+
e(m) ? (l(), g("div", Y, [
|
|
185
|
+
y(e(I).FmIcon, {
|
|
186
|
+
name: "sync",
|
|
187
|
+
size: "xl",
|
|
188
|
+
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
189
|
+
}),
|
|
190
|
+
u("p", Z, h(e(n)("connect.review.facebook.fetching")), 1)
|
|
191
|
+
])) : e(p) ? (l(), g("div", ee, [
|
|
192
|
+
y(e(I).FmIcon, {
|
|
193
|
+
name: "check_circle",
|
|
194
|
+
size: "xl",
|
|
195
|
+
class: "text-fm-color-typo-success"
|
|
196
|
+
}),
|
|
197
|
+
u("p", oe, h(e(n)("connect.review.facebook.success")), 1),
|
|
198
|
+
u("p", te, h(e(n)("connect.review.redirecting")), 1)
|
|
199
|
+
])) : e(c) ? (l(), g("div", ne, [
|
|
200
|
+
y(e(I).FmIcon, {
|
|
201
|
+
name: "error",
|
|
202
|
+
size: "xl",
|
|
203
|
+
class: "text-fm-color-system-error-500"
|
|
204
|
+
}),
|
|
205
|
+
u("p", ae, h(e(n)("connect.review.errorTitle")), 1),
|
|
206
|
+
u("p", se, h(e(c)), 1),
|
|
207
|
+
y(e(I).FmButton, {
|
|
208
|
+
label: e(n)("connect.review.goBack"),
|
|
209
|
+
onClick: t[0] || (t[0] = (d) => f())
|
|
210
|
+
}, null, 8, ["label"])
|
|
211
|
+
])) : e(i).length > 0 ? (l(), g($, { key: 3 }, [
|
|
212
|
+
u("p", ce, h(e(n)("connect.review.facebook.selectPage")), 1),
|
|
213
|
+
y(Q, {
|
|
214
|
+
pages: e(i),
|
|
215
|
+
"onUpdate:pages": t[1] || (t[1] = (d) => V(i) ? i.value = d : null)
|
|
216
|
+
}, null, 8, ["pages"]),
|
|
217
|
+
u("div", le, [
|
|
218
|
+
y(e(I).FmButton, {
|
|
219
|
+
variant: "outlined",
|
|
220
|
+
label: e(n)("connect.review.cancel"),
|
|
221
|
+
onClick: t[2] || (t[2] = (d) => f())
|
|
222
|
+
}, null, 8, ["label"]),
|
|
223
|
+
y(e(I).FmButton, {
|
|
224
|
+
label: e(n)("connect.review.connect"),
|
|
225
|
+
disabled: !e(F),
|
|
226
|
+
loading: e(w),
|
|
227
|
+
onClick: b
|
|
228
|
+
}, null, 8, ["label", "disabled", "loading"])
|
|
229
|
+
])
|
|
230
|
+
], 64)) : S("", !0)
|
|
231
|
+
])
|
|
232
|
+
], 64);
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
export {
|
|
237
|
+
ve as default
|
|
238
|
+
};
|