@feedmepos/mf-connect 0.1.98-beta.4 → 0.1.98-beta.41
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-BGv_JihW.js → App-C6JJ9uQ8.js} +808 -665
- package/dist/{AuditLogs-53rnjCmD.js → AuditLogs-CAlgtDgx.js} +12 -11
- package/dist/{Bin-B0Q_WpuY.js → Bin-D8jwhwER.js} +8 -8
- package/dist/{Broadcast-PiJE1Syl.js → Broadcast-CP8DRfkT.js} +39 -36
- package/dist/CampaignAnalytic-MVjYBFvu.js +1826 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dz2KsBZl.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DeLURz87.js} +7 -5
- package/dist/{Card-DlqMu3Sl.js → Card-QribXJwZ.js} +21 -20
- package/dist/{Collections-BWcBlDDR.js → Collections-X9xbt43V.js} +14 -13
- package/dist/Credit-QmbsW1eb.js +286 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCvH0lGA.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-ClNieHSo.js} +35 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-B_FyeWq4.js → EffectSheet.vue_vue_type_style_index_0_lang-CrGHTNhg.js} +16 -16
- package/dist/{Experience-DacFmPYy.js → Experience-CPGMg847.js} +112 -86
- package/dist/{FileSaver.min-CMZKiGkX.js → FileSaver.min-CK67LsPG.js} +1 -1
- package/dist/Game-BrkiEFCS.js +356 -0
- package/dist/GiftCardSetup-DXNBHF1A.js +542 -0
- package/dist/{Grab-DaBL5y3H.js → Grab-BgtDzK1B.js} +32 -31
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BaY_nQio.js → ImageInput.vue_vue_type_script_setup_true_lang-Dzv2AkKN.js} +1 -1
- package/dist/{Index-2UrjF35w.js → Index-KJgzalOd.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BuVBZsCN.js → LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-6wUxYqWe.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dj74lJ7b.js} +1 -1
- package/dist/LoyaltyDashboard-B2JpbC01.js +1345 -0
- package/dist/MainLayout-DlfTKHQ-.js +143 -0
- package/dist/{Marketing-DEp--hFd.js → Marketing-Crx_JQpi.js} +7 -6
- package/dist/{MarketingMaterialEdit-BHL8Ptsu.js → MarketingMaterialEdit-BfsdcMXJ.js} +15 -14
- package/dist/{Member-BU1YxoEV.js → Member-C50Nrsko.js} +14 -13
- package/dist/{MemberList-zjvJBYf0.js → MemberList-C9uUKw1o.js} +37 -35
- package/dist/{MemberTransactions-BvyLV69V.js → MemberTransactions-DZ7zPOHX.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-_YOM1SlS.js → MessageInput.vue_vue_type_script_setup_true_lang-Du_ZGsbX.js} +5434 -5279
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
- package/dist/Mission-D_km8zi6.js +360 -0
- package/dist/{Overview-BToUlbsH.js → Overview-BBieK6qQ.js} +21 -20
- package/dist/Overview-B_kmLOcc.js +1316 -0
- package/dist/Point-D0q9N7f9.js +288 -0
- package/dist/Promotion-DoFTy-NK.js +423 -0
- package/dist/{Queue-D3vUkKN9.js → Queue-Dh5sDRHW.js} +13 -12
- package/dist/{Record-BViEbZZ8.js → Record-0owEBKqN.js} +9 -9
- package/dist/Review-DV2fnpOH.js +45 -0
- package/dist/ReviewFacebookCallback-D8mnAPzR.js +238 -0
- package/dist/ReviewGoogleCallback-CLzt_ox2.js +213 -0
- package/dist/{Reward-CZsvsYW_.js → Reward-Co20Xrss.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BASPLoRa.js → RewardGroup.vue_vue_type_script_setup_true_lang-0qU49c47.js} +14 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B90meAnV.js → RuleGroup.vue_vue_type_script_setup_true_lang-qdvaXPhJ.js} +17 -15
- package/dist/{Segment-CN8NEg8w.js → Segment-7dQKeHWK.js} +38 -35
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BGyYQST4.js → SelectItems.vue_vue_type_script_setup_true_lang-BUVrUifO.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BxW-Kc6t.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDsV9TD9.js} +37 -36
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-C9dwcEr5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DqPZpddc.js} +4 -4
- package/dist/{Setting-DLPbZW11.js → Setting-Bvahxs-y.js} +14 -14
- package/dist/{SettingAdvertisements-BIq8gS5g.js → SettingAdvertisements-fbXLRwfb.js} +12 -12
- package/dist/Settings-C_HWDFN8.js +179 -0
- package/dist/Store-8yBKDR1b.js +2413 -0
- package/dist/{StoreRewards-BoEjVFk6.js → StoreRewards-DKaJvoJs.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bv9ABH1K.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D23XzJD7.js} +400 -455
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DNHgSfIg.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-JaFhCK_L.js} +2 -2
- package/dist/{Tier-kQ6X9h-t.js → Tier-CD-CjXC3.js} +44 -41
- package/dist/{Title-XosVAF2Y.js → Title-C_lcgye8.js} +49 -46
- package/dist/{Transaction-CO6oLPKR.js → Transaction-BvUYm-rT.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-McMR2Y7Y.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C3Yacz7K.js} +6 -6
- package/dist/{Voucher-CogaCxx2.js → Voucher-CYaG0GLU.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DjHwHFBq.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DF2JqzRe.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Dor9klZ8.js → ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js} +2 -2
- package/dist/{app-C9UPXbDs.js → app-CE5hQ4Uq.js} +6656 -5653
- package/dist/app.js +1 -1
- package/dist/{business-CYpW6-Ls.js → business-CE_4siXc.js} +1 -1
- package/dist/{campaign-BtLa7KeF.js → campaign-BP6rvSpg.js} +74 -96
- package/dist/campaign-CXQtKpeb.js +100 -0
- package/dist/{campaign.enum-DiLhS5il.js → campaign.enum-Dx-Zo68Q.js} +1 -1
- package/dist/{campaign.fn-CLB9gBHo.js → campaign.fn-DKnBpE1N.js} +119 -119
- package/dist/{collectible.enum-CmwWcfBh.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/collection.fn-Cg16QZSp.js +26 -0
- package/dist/{duplicateCampaign-DGhOBd5l.js → duplicateCampaign-DbtVAGsT.js} +2 -2
- package/dist/{effect-CY5Y6sxy.js → effect-CLI8NI4O.js} +1 -1
- package/dist/{email-addresses-BEnOHWj_.js → email-addresses-DlLiZ1io.js} +2 -2
- package/dist/{export-BgYu7SCd.js → export-6Hr34dBU.js} +3 -3
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-DTDgoyEh.js → helper-vkjFqj70.js} +1 -1
- package/dist/index-BIyKgw4m.js +72 -0
- package/dist/{index-C8ehLvXG.js → index-BLQJ-rv3.js} +1 -1
- package/dist/{index-CP-7qATP.js → index-BbTIqReL.js} +1 -1
- package/dist/index-BuMfQxMf.js +897 -0
- package/dist/index-C8cXXcLk.js +45 -0
- package/dist/{index-kS20rM5m.js → index-CSVhIZSY.js} +589 -580
- package/dist/{index-zF0gIg9H.js → index-CVHacTbc.js} +1 -1
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-goRooQn5.js → index-CmNsGhDf.js} +272 -368
- package/dist/index-CnTeeRyJ.js +53 -0
- package/dist/{index-Ck3PeOQ5.js → index-CzbNobLv.js} +105 -123
- package/dist/index-D06n1h1b.js +146 -0
- package/dist/{index-CNKP1_IW.js → index-D4SDAfbP.js} +8027 -10766
- package/dist/{index-DntoqWT_.js → index-DVnYQ3Hs.js} +1 -1
- package/dist/{index-BZVhi3ZG.js → index-DcjnS5Sv.js} +2 -2
- package/dist/{index-DtyWsBgg.js → index-Dx9h0FNH.js} +1 -1
- package/dist/{index-CDk0Itu1.js → index-YgP4ihQL.js} +1 -1
- package/dist/{index-B4IAURA_.js → index-kedErkLZ.js} +1759 -2480
- package/dist/{index-CLZnH782.js → index-lnQT4P3d.js} +10 -9
- package/dist/{index.esm2017-C79fd6cz.js → index.esm2017-Jhv2lkrq.js} +105 -105
- package/dist/{loading-Dfr_97Ri.js → loading-NY-FPxVY.js} +1 -1
- package/dist/{lodash-BX2mJOxF.js → lodash-BC_P6kLg.js} +1 -1
- package/dist/{membership-ncNOUJwj.js → membership-BWaK-9FY.js} +3 -3
- package/dist/{money-vEtTzt04.js → money-COoh4GXK.js} +1 -1
- package/dist/{number-BjgTlMsp.js → number-BX5OEXgq.js} +1 -1
- package/dist/objectid-1SUSRtmY.js +145 -0
- package/dist/{plugins-BVGqEmE1.js → plugins-ur-FAoye.js} +3 -3
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-BGTLhhzT.js → reward-DSsylZ22.js} +1 -1
- package/dist/{rule-BB2VX3Gy.js → rule-BM9GUd1C.js} +3 -3
- package/dist/rule-builder-gC9LH2AC.js +126 -0
- package/dist/{template-DLiHnpjK.js → template-CUV3AMFI.js} +6 -6
- package/dist/timezone-BFZhekOU.js +20 -0
- package/dist/transaction.fn-C5MlkEIC.js +64 -0
- package/dist/{trigger-DrKnfSoi.js → trigger-CbjiuoSo.js} +14 -14
- package/dist/useMarketingMaterialActions-BLisTieA.js +96 -0
- package/dist/{usePagination-Dgd-onzU.js → usePagination-Caah4sJr.js} +1 -1
- package/dist/{user-BcDUmNrZ.js → user-BZC4P_jL.js} +1 -1
- package/dist/{vue-i18n-DNBGmwox.js → vue-i18n-BYz7XAr_.js} +390 -390
- package/dist/{xlsx-BX-U0_Au.js → xlsx-Bn7BqUFA.js} +1 -1
- package/dist/{zod-Mx51GBPY.js → zod-DHH42rXG.js} +1 -1
- package/package.json +3 -3
- package/dist/Credit-CMfcuj5n.js +0 -260
- package/dist/Game-DXKnGuhR.js +0 -330
- package/dist/LoyaltyDashboard-DIArPp71.js +0 -1082
- package/dist/MainLayout-BjvTxTPG.js +0 -41
- package/dist/Mission-BNYk_aPM.js +0 -334
- package/dist/Point-B-L2326L.js +0 -262
- package/dist/Promotion-sMKGkL4w.js +0 -397
- package/dist/Review-CMBAk-Qu.js +0 -1067
- package/dist/ReviewFacebookCallback-BCJTFy3b.js +0 -243
- package/dist/ReviewGoogleCallback-DKUG075r.js +0 -208
- package/dist/Store-DNB3gUIR.js +0 -1996
- package/dist/campaign-CtoHyXVT.js +0 -219
- package/dist/index-P8Qh2yIP.js +0 -52
- package/dist/objectid-C9DiLwge.js +0 -145
- package/dist/useMarketingMaterialActions-B6zaDbNE.js +0 -107
|
@@ -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-BYz7XAr_.js";
|
|
3
|
+
import { components as I } from "@feedmepos/ui-library";
|
|
4
|
+
import { r as L } from "./index-BIyKgw4m.js";
|
|
5
|
+
import { u as A } from "./business-CE_4siXc.js";
|
|
6
|
+
import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js";
|
|
7
|
+
import { R as D } from "./app-CE5hQ4Uq.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
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { defineComponent as E, onMounted as T, ref as w, computed as B, openBlock as d, createElementBlock as p, Fragment as F, renderList as j, normalizeClass as z, unref as e, createElementVNode as m, createVNode as u, toDisplayString as y, createCommentVNode as S, createBlock as P, resolveComponent as U, isRef as V } from "vue";
|
|
2
|
+
import { u as A } from "./vue-i18n-BYz7XAr_.js";
|
|
3
|
+
import { components as v } from "@feedmepos/ui-library";
|
|
4
|
+
import { r as C } from "./index-BIyKgw4m.js";
|
|
5
|
+
import { u as H } from "./business-CE_4siXc.js";
|
|
6
|
+
import { _ as D } from "./LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js";
|
|
7
|
+
import { R as O } from "./app-CE5hQ4Uq.js";
|
|
8
|
+
import { useRouter as W } from "vue-router";
|
|
9
|
+
const q = { class: "flex flex-col gap-8" }, J = ["onClick"], K = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, Q = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
12
|
+
}, X = /* @__PURE__ */ E({
|
|
13
|
+
__name: "GoogleLocationMapping",
|
|
14
|
+
props: {
|
|
15
|
+
locations: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:locations"],
|
|
18
|
+
setup(k, { emit: a }) {
|
|
19
|
+
const N = k, b = a, i = H();
|
|
20
|
+
T(() => i.readLocations());
|
|
21
|
+
const g = w(null), h = B(() => {
|
|
22
|
+
const l = /* @__PURE__ */ new Set();
|
|
23
|
+
for (const r of N.locations)
|
|
24
|
+
r.locationId && l.add(r.locationId);
|
|
25
|
+
return l;
|
|
26
|
+
});
|
|
27
|
+
function L(l) {
|
|
28
|
+
return i.locations.filter((r) => {
|
|
29
|
+
const t = r._id.toString();
|
|
30
|
+
return !h.value.has(t) || l.locationId === t;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function f(l, r) {
|
|
34
|
+
const t = r._id.toString(), _ = N.locations.map((n) => {
|
|
35
|
+
if (n.googleLocationName !== l) return n;
|
|
36
|
+
const o = n.locationId === t;
|
|
37
|
+
return {
|
|
38
|
+
...n,
|
|
39
|
+
locationId: o ? null : t,
|
|
40
|
+
locationName: o ? null : r.name
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
b("update:locations", _);
|
|
44
|
+
}
|
|
45
|
+
function I(l) {
|
|
46
|
+
g.value = g.value === l ? null : l;
|
|
47
|
+
}
|
|
48
|
+
return (l, r) => (d(), p("div", q, [
|
|
49
|
+
(d(!0), p(F, null, j(k.locations, (t) => (d(), p("div", {
|
|
50
|
+
key: t.googleLocationName,
|
|
51
|
+
class: z([
|
|
52
|
+
"rounded-lg border overflow-hidden transition-colors",
|
|
53
|
+
e(g) === t.googleLocationName ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
54
|
+
])
|
|
55
|
+
}, [
|
|
56
|
+
m("button", {
|
|
57
|
+
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
58
|
+
onClick: (_) => I(t.googleLocationName)
|
|
59
|
+
}, [
|
|
60
|
+
u(e(v).FmIcon, {
|
|
61
|
+
name: "storefront",
|
|
62
|
+
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
63
|
+
}),
|
|
64
|
+
m("span", K, y(t.displayName || t.googleLocationName), 1),
|
|
65
|
+
t.locationName ? (d(), p("span", Q, y(t.locationName), 1)) : S("", !0),
|
|
66
|
+
u(e(v).FmIcon, {
|
|
67
|
+
name: e(g) === t.googleLocationName ? "expand_less" : "expand_more",
|
|
68
|
+
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
69
|
+
}, null, 8, ["name"])
|
|
70
|
+
], 8, J),
|
|
71
|
+
e(g) === t.googleLocationName ? (d(), P(D, {
|
|
72
|
+
key: 0,
|
|
73
|
+
locations: L(t),
|
|
74
|
+
"selected-ids": t.locationId ? [t.locationId] : [],
|
|
75
|
+
onToggle: (_) => f(t.googleLocationName, _)
|
|
76
|
+
}, null, 8, ["locations", "selected-ids", "onToggle"])) : S("", !0)
|
|
77
|
+
], 2))), 128))
|
|
78
|
+
]));
|
|
79
|
+
}
|
|
80
|
+
}), Y = { class: "flex flex-col min-h-full gap-16 p-24" }, Z = {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
83
|
+
}, ee = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, oe = {
|
|
84
|
+
key: 1,
|
|
85
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
86
|
+
}, te = { class: "fm-typo-en-body-lg-600" }, ne = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ae = {
|
|
87
|
+
key: 2,
|
|
88
|
+
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
89
|
+
}, le = { 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" }, ie = { class: "flex gap-8 justify-end mt-auto pt-8" }, ve = /* @__PURE__ */ E({
|
|
90
|
+
__name: "ReviewGoogleCallback",
|
|
91
|
+
setup(k) {
|
|
92
|
+
const { t: a } = A(), N = W();
|
|
93
|
+
function b() {
|
|
94
|
+
return N.replace({ name: O["$connect-REVIEW_SETTINGS"] });
|
|
95
|
+
}
|
|
96
|
+
const i = w([]), g = w(!1), h = w(!1), L = w(!1), f = w(null), I = B(
|
|
97
|
+
() => i.value.some((n) => n.locationId !== null)
|
|
98
|
+
);
|
|
99
|
+
function l(n, o) {
|
|
100
|
+
return n instanceof Error ? n.message : o;
|
|
101
|
+
}
|
|
102
|
+
function r(n, o) {
|
|
103
|
+
const x = new Map(
|
|
104
|
+
o.map((s) => [s.googleLocationName, s.location])
|
|
105
|
+
);
|
|
106
|
+
return n.map((s) => {
|
|
107
|
+
const c = x.get(s.googleLocationName) ?? null;
|
|
108
|
+
return {
|
|
109
|
+
googleLocationName: s.googleLocationName,
|
|
110
|
+
displayName: s.displayName,
|
|
111
|
+
locationId: (c == null ? void 0 : c._id) ?? null,
|
|
112
|
+
locationName: (c == null ? void 0 : c.name) ?? null
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
async function t() {
|
|
117
|
+
var s;
|
|
118
|
+
const n = new URLSearchParams(window.location.search), o = n.get("code"), x = n.get("state");
|
|
119
|
+
if (!o || !x) {
|
|
120
|
+
f.value = a("connect.review.noToken");
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
g.value = !0;
|
|
124
|
+
try {
|
|
125
|
+
const c = await C.getSource(), R = ((s = c == null ? void 0 : c.google) == null ? void 0 : s.locations) ?? [], M = window.location.pathname.replace(/\/review(?:\/.*)?$/, ""), G = `${window.location.origin}${M}/review/google/callback`, $ = await C.connectGoogle(o, G, x);
|
|
126
|
+
i.value = r(($ == null ? void 0 : $.locations) ?? [], R), i.value.length === 0 && (f.value = a("connect.review.google.noLocations"));
|
|
127
|
+
} catch (c) {
|
|
128
|
+
f.value = l(c, a("connect.review.google.failed"));
|
|
129
|
+
} finally {
|
|
130
|
+
g.value = !1;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async function _() {
|
|
134
|
+
const n = i.value.map((o) => ({
|
|
135
|
+
googleLocationName: o.googleLocationName,
|
|
136
|
+
displayName: o.displayName,
|
|
137
|
+
locationId: o.locationId
|
|
138
|
+
}));
|
|
139
|
+
if (n.length === 0) {
|
|
140
|
+
f.value = a("connect.review.noMappings");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
h.value = !0;
|
|
144
|
+
try {
|
|
145
|
+
await C.updateGoogleLocations(n), L.value = !0, setTimeout(b, 2e3);
|
|
146
|
+
} catch (o) {
|
|
147
|
+
f.value = l(o, a("connect.review.google.failed"));
|
|
148
|
+
} finally {
|
|
149
|
+
h.value = !1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return T(t), (n, o) => {
|
|
153
|
+
const x = U("FmPageHead");
|
|
154
|
+
return d(), p(F, null, [
|
|
155
|
+
u(x, {
|
|
156
|
+
title: e(a)("connect.navigation.review")
|
|
157
|
+
}, null, 8, ["title"]),
|
|
158
|
+
m("div", Y, [
|
|
159
|
+
e(g) ? (d(), p("div", Z, [
|
|
160
|
+
u(e(v).FmIcon, {
|
|
161
|
+
name: "sync",
|
|
162
|
+
size: "xl",
|
|
163
|
+
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
164
|
+
}),
|
|
165
|
+
m("p", ee, y(e(a)("connect.review.google.fetching")), 1)
|
|
166
|
+
])) : e(L) ? (d(), p("div", oe, [
|
|
167
|
+
u(e(v).FmIcon, {
|
|
168
|
+
name: "check_circle",
|
|
169
|
+
size: "xl",
|
|
170
|
+
class: "text-fm-color-typo-success"
|
|
171
|
+
}),
|
|
172
|
+
m("p", te, y(e(a)("connect.review.google.success")), 1),
|
|
173
|
+
m("p", ne, y(e(a)("connect.review.redirecting")), 1)
|
|
174
|
+
])) : e(f) ? (d(), p("div", ae, [
|
|
175
|
+
u(e(v).FmIcon, {
|
|
176
|
+
name: "error",
|
|
177
|
+
size: "xl",
|
|
178
|
+
class: "text-fm-color-system-error-500"
|
|
179
|
+
}),
|
|
180
|
+
m("p", le, y(e(a)("connect.review.errorTitle")), 1),
|
|
181
|
+
m("p", se, y(e(f)), 1),
|
|
182
|
+
u(e(v).FmButton, {
|
|
183
|
+
label: e(a)("connect.review.goBack"),
|
|
184
|
+
onClick: o[0] || (o[0] = (s) => b())
|
|
185
|
+
}, null, 8, ["label"])
|
|
186
|
+
])) : e(i).length > 0 ? (d(), p(F, { key: 3 }, [
|
|
187
|
+
m("p", ce, y(e(a)("connect.review.google.selectLocation")), 1),
|
|
188
|
+
u(X, {
|
|
189
|
+
locations: e(i),
|
|
190
|
+
"onUpdate:locations": o[1] || (o[1] = (s) => V(i) ? i.value = s : null)
|
|
191
|
+
}, null, 8, ["locations"]),
|
|
192
|
+
m("div", ie, [
|
|
193
|
+
u(e(v).FmButton, {
|
|
194
|
+
variant: "outlined",
|
|
195
|
+
label: e(a)("connect.review.cancel"),
|
|
196
|
+
onClick: o[2] || (o[2] = (s) => b())
|
|
197
|
+
}, null, 8, ["label"]),
|
|
198
|
+
u(e(v).FmButton, {
|
|
199
|
+
label: e(a)("connect.review.connect"),
|
|
200
|
+
disabled: !e(I),
|
|
201
|
+
loading: e(h),
|
|
202
|
+
onClick: _
|
|
203
|
+
}, null, 8, ["label", "disabled", "loading"])
|
|
204
|
+
])
|
|
205
|
+
], 64)) : S("", !0)
|
|
206
|
+
])
|
|
207
|
+
], 64);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
export {
|
|
212
|
+
ve as default
|
|
213
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as X, ref as x, computed as H, resolveComponent as w, openBlock as b, createBlock as h, unref as t, isRef as Z, withCtx as A, createElementVNode as f, createVNode as d, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as
|
|
1
|
+
import { defineComponent as X, ref as x, computed as H, resolveComponent as w, openBlock as b, createBlock as h, unref as t, isRef as Z, withCtx as A, createElementVNode as f, createVNode as d, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as _, onMounted as q, toDisplayString as B } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as Q, components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as G } from "./loading-
|
|
5
|
-
import { u as J, C as ee } from "./membership-
|
|
6
|
-
import { f as j, p as te } from "./plugins-
|
|
7
|
-
import { u as oe } from "./vue-i18n-
|
|
4
|
+
import { u as G } from "./loading-NY-FPxVY.js";
|
|
5
|
+
import { u as J, C as ee } from "./membership-BWaK-9FY.js";
|
|
6
|
+
import { f as j, p as te } from "./plugins-ur-FAoye.js";
|
|
7
|
+
import { u as oe } from "./vue-i18n-BYz7XAr_.js";
|
|
8
8
|
import { c as ae } from "./object-BYyQ0PZp.js";
|
|
9
|
-
import { Z as
|
|
10
|
-
import "./index-
|
|
11
|
-
import {
|
|
9
|
+
import { Z as F } from "./zod-DHH42rXG.js";
|
|
10
|
+
import "./index-CSVhIZSY.js";
|
|
11
|
+
import { a as N } from "./index-lnQT4P3d.js";
|
|
12
12
|
import { useCoreStore as le } from "@feedmepos/mf-common";
|
|
13
|
-
import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-
|
|
13
|
+
import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-DF2JqzRe.js";
|
|
14
|
+
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-CrGHTNhg.js";
|
|
15
15
|
import { J as K } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
-
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { i as de } from "./helper-
|
|
18
|
-
import { u as pe, r as P } from "./reward-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { C as ce } from "./campaign.fn-
|
|
21
|
-
import { e as me } from "./effect-
|
|
16
|
+
import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js";
|
|
17
|
+
import { i as de } from "./helper-vkjFqj70.js";
|
|
18
|
+
import { u as pe, r as P } from "./reward-DSsylZ22.js";
|
|
19
|
+
import "./index-Dx9h0FNH.js";
|
|
20
|
+
import { C as ce } from "./campaign.fn-DKnBpE1N.js";
|
|
21
|
+
import { e as me } from "./effect-CLI8NI4O.js";
|
|
22
22
|
import { useRouter as ue } from "vue-router";
|
|
23
|
-
import { R as ye } from "./app-
|
|
23
|
+
import { R as ye } from "./app-CE5hQ4Uq.js";
|
|
24
24
|
const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ X({
|
|
25
25
|
__name: "EditRewardSheet",
|
|
26
26
|
emits: ["update"],
|
|
@@ -39,7 +39,7 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
39
39
|
const l = R.value.safeParse(a.value);
|
|
40
40
|
return l.success ? [] : l.error.errors;
|
|
41
41
|
});
|
|
42
|
-
function
|
|
42
|
+
function O(l, e) {
|
|
43
43
|
l && (y.value = void 0, a.value = e), v.value = l;
|
|
44
44
|
}
|
|
45
45
|
const D = I;
|
|
@@ -93,7 +93,7 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
93
93
|
}
|
|
94
94
|
const V = x();
|
|
95
95
|
return n({
|
|
96
|
-
showSheet:
|
|
96
|
+
showSheet: O
|
|
97
97
|
}), (l, e) => {
|
|
98
98
|
const o = w("FmSelect"), i = w("FmForm"), m = w("FmButton"), g = w("FmSideSheet");
|
|
99
99
|
return b(), h(g, {
|
|
@@ -137,8 +137,8 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
137
137
|
modelValue: t(a).name,
|
|
138
138
|
"onUpdate:modelValue": e[0] || (e[0] = (s) => t(a).name = s),
|
|
139
139
|
label: "Reward Name",
|
|
140
|
-
schema: t(
|
|
141
|
-
"error-text": t(
|
|
140
|
+
schema: t(F).typeAtPath(t(R), "name", []),
|
|
141
|
+
"error-text": t(F).helperText(t(u), "name")
|
|
142
142
|
}, null, 8, ["modelValue", "schema", "error-text"]),
|
|
143
143
|
d(o, {
|
|
144
144
|
label: "Reward Type",
|
|
@@ -168,12 +168,12 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
168
168
|
key: 0,
|
|
169
169
|
class: "mt-[-8px]",
|
|
170
170
|
rules: [
|
|
171
|
-
t(
|
|
171
|
+
t(F).ruleAtPath(t(R), "option.earningOption", [
|
|
172
172
|
t(a).option.type
|
|
173
173
|
])
|
|
174
174
|
],
|
|
175
|
-
"helper-state": t(
|
|
176
|
-
"error-text": t(
|
|
175
|
+
"helper-state": t(F).helperState(t(u), "option.earningOption"),
|
|
176
|
+
"error-text": t(F).helperText(t(u), "option.earningOption"),
|
|
177
177
|
"fixed-type": !0,
|
|
178
178
|
"model-value": t(a).option.earningOption,
|
|
179
179
|
"onUpdate:modelValue": e[1] || (e[1] = (s) => t(a).option.earningOption = s)
|
|
@@ -188,7 +188,7 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
188
188
|
)) == null ? void 0 : E.raw.type) === "CREDIT",
|
|
189
189
|
type: t(a).option.type === "VOUCHER" ? "range" : "custom",
|
|
190
190
|
rules: [
|
|
191
|
-
t(
|
|
191
|
+
t(F).ruleAtPath(t(R), "option.validityOption", [
|
|
192
192
|
t(a).option.type
|
|
193
193
|
])
|
|
194
194
|
],
|
|
@@ -224,7 +224,7 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
224
224
|
}, p = J(), C = pe(), { global: v, minor: a } = G, y = ue(), R = Q(), u = x({
|
|
225
225
|
searchKey: "",
|
|
226
226
|
columnFilters: []
|
|
227
|
-
}),
|
|
227
|
+
}), O = H(() => C.rewards);
|
|
228
228
|
function D(e) {
|
|
229
229
|
y.push({
|
|
230
230
|
name: ye["$connect-STORE_REWARD_COLLECTIONS"],
|
|
@@ -260,8 +260,8 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
260
260
|
{
|
|
261
261
|
header: n("connect.storeRewards.table.actions"),
|
|
262
262
|
cell(e) {
|
|
263
|
-
return
|
|
264
|
-
|
|
263
|
+
return _("div", { class: "flex items-center justify-end gap-4" }, [
|
|
264
|
+
_(
|
|
265
265
|
L.FmMenu,
|
|
266
266
|
{
|
|
267
267
|
placement: "bottom-end",
|
|
@@ -270,13 +270,13 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
270
270
|
}
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
|
-
"menu-button": () =>
|
|
273
|
+
"menu-button": () => _(L.FmButton, {
|
|
274
274
|
icon: "more_vert",
|
|
275
275
|
iconColor: "neutral-gray-400",
|
|
276
276
|
variant: "tertiary"
|
|
277
277
|
}),
|
|
278
278
|
default: () => [
|
|
279
|
-
e.row.original.option.type === "VOUCHER" &&
|
|
279
|
+
e.row.original.option.type === "VOUCHER" && _(L.FmMenuItem, {
|
|
280
280
|
label: "View collections",
|
|
281
281
|
onClick: async (o) => {
|
|
282
282
|
o.stopPropagation(), D(
|
|
@@ -284,7 +284,7 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
286
|
}),
|
|
287
|
-
|
|
287
|
+
_(
|
|
288
288
|
L.FmMenuItem,
|
|
289
289
|
{
|
|
290
290
|
onClick: async (o) => {
|
|
@@ -292,7 +292,7 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
292
292
|
}
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
|
-
label:
|
|
295
|
+
label: _(
|
|
296
296
|
"div",
|
|
297
297
|
{
|
|
298
298
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
@@ -385,7 +385,7 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
385
385
|
})
|
|
386
386
|
}, null, 8, ["title", "actions"]),
|
|
387
387
|
f("div", ve, [
|
|
388
|
-
t(
|
|
388
|
+
t(O) && t(O).length > 0 ? (b(), M(Y, { key: 0 }, [
|
|
389
389
|
f("div", ge, [
|
|
390
390
|
o[6] || (o[6] = f("div", { class: "flex gap-8" }, null, -1)),
|
|
391
391
|
d(m, {
|
|
@@ -397,12 +397,12 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
|
|
|
397
397
|
}, null, 8, ["modelValue"])
|
|
398
398
|
]),
|
|
399
399
|
d(g, {
|
|
400
|
-
"row-data": t(
|
|
400
|
+
"row-data": t(O),
|
|
401
401
|
"column-defs": S,
|
|
402
402
|
"search-value": t(u).searchKey,
|
|
403
403
|
"column-filter": t(u).columnFilters,
|
|
404
404
|
onRowClick: o[3] || (o[3] = (c) => V(c.original)),
|
|
405
|
-
"hide-footer": t(
|
|
405
|
+
"hide-footer": t(O).length < 10
|
|
406
406
|
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
407
407
|
], 64)) : (b(), h(E, {
|
|
408
408
|
key: 1,
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { ref as p, defineComponent as T, computed as x, resolveComponent as y, openBlock as U, createBlock as G, unref as e, isRef as $, withCtx as b, createElementVNode as v, createVNode as u, toDisplayString as j } from "vue";
|
|
2
|
-
import { u as B } from "./loading-
|
|
2
|
+
import { u as B } from "./loading-NY-FPxVY.js";
|
|
3
3
|
import { J as P } from "./JsonViewer-v8_C7l5N.js";
|
|
4
|
-
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { Z as L } from "./zod-
|
|
4
|
+
import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js";
|
|
5
|
+
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-C3Yacz7K.js";
|
|
6
|
+
import { Z as L } from "./zod-DHH42rXG.js";
|
|
7
7
|
import { u as V } from "./app-wDQR6dpb.js";
|
|
8
8
|
import { defineStore as N } from "pinia";
|
|
9
|
-
import { r as k } from "./index-
|
|
10
|
-
import {
|
|
11
|
-
import "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import
|
|
9
|
+
import { r as k } from "./index-YgP4ihQL.js";
|
|
10
|
+
import { c as E } from "./index-CmNsGhDf.js";
|
|
11
|
+
import "./index-kedErkLZ.js";
|
|
12
|
+
import "./index-CSVhIZSY.js";
|
|
13
|
+
import "./index-D4SDAfbP.js";
|
|
14
|
+
import "./index-BuMfQxMf.js";
|
|
15
|
+
import "./index-lnQT4P3d.js";
|
|
16
|
+
import { u as J } from "./vue-i18n-BYz7XAr_.js";
|
|
16
17
|
import { c as C } from "./object-BYyQ0PZp.js";
|
|
17
18
|
import { useDialog as Z } from "@feedmepos/ui-library";
|
|
18
19
|
const A = N("mf-connect-referral", () => {
|
|
@@ -102,7 +103,7 @@ const A = N("mf-connect-referral", () => {
|
|
|
102
103
|
}, 8, ["modelValue", "header"]);
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
|
-
}),
|
|
106
|
+
}), de = /* @__PURE__ */ T({
|
|
106
107
|
__name: "RewardGroup",
|
|
107
108
|
setup(h, { expose: _ }) {
|
|
108
109
|
const { minor: c } = B, n = Z(), m = A(), s = x(() => {
|
|
@@ -144,6 +145,6 @@ const A = N("mf-connect-referral", () => {
|
|
|
144
145
|
}
|
|
145
146
|
});
|
|
146
147
|
export {
|
|
147
|
-
|
|
148
|
+
de as _,
|
|
148
149
|
A as u
|
|
149
150
|
};
|