@feedmepos/mf-connect 0.1.98-beta.5 → 0.1.98-beta.50
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-D_4snNiy.js → App-XRTSw_F1.js} +812 -666
- package/dist/{AuditLogs-KQU1O9_9.js → AuditLogs-CgsvZ-7X.js} +12 -11
- package/dist/{Bin-gp_uuNrE.js → Bin-CDwE00an.js} +8 -8
- package/dist/{Broadcast-CbBaOlnn.js → Broadcast-BOh56jYG.js} +39 -36
- package/dist/CampaignAnalytic-DZkCSGRF.js +1826 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2bro245w.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DqYRlwCj.js} +7 -5
- package/dist/Card-DZ01wmGw.js +1060 -0
- package/dist/{Collections-CKeOHYZ4.js → Collections-CaIWOlsO.js} +14 -13
- package/dist/Credit-C8TM9q2f.js +286 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bh2O4xdy.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-1UH_Ie4E.js} +34 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIdb46VQ.js → EffectSheet.vue_vue_type_style_index_0_lang-CVqMqYhi.js} +6 -6
- package/dist/{Experience-B-c5SMns.js → Experience-Cy0K8E9P.js} +112 -86
- package/dist/{FileSaver.min-DWnvGKCg.js → FileSaver.min-ClaVGDxU.js} +1 -1
- package/dist/Game-DxUNIK1H.js +356 -0
- package/dist/GiftCardSetup-DPuRb-29.js +662 -0
- package/dist/{Grab-BLC4GcgE.js → Grab-VSlV6K7E.js} +32 -31
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-l2CmQ0nR.js → ImageInput.vue_vue_type_script_setup_true_lang-BJQzLNY1.js} +1 -1
- package/dist/{Index-DmAG2skd.js → Index-D_xXXqKL.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-UmynGH00.js → LocationPicker.vue_vue_type_script_setup_true_lang-BJl8_bKp.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BThofu65.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BOaXZf3X.js} +1 -1
- package/dist/LoyaltyDashboard-CWPV6CHM.js +2218 -0
- package/dist/MainLayout-CeA24f8v.js +143 -0
- package/dist/{Marketing-DmY25Ri9.js → Marketing-Bw437-ze.js} +7 -6
- package/dist/{MarketingMaterialEdit-DP9pba44.js → MarketingMaterialEdit-x6JdhQDh.js} +15 -14
- package/dist/Member-zLjxWmJf.js +626 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DM9c_Ow1.js +1287 -0
- package/dist/MemberImportHistory-BvvIfn9o.js +187 -0
- package/dist/MemberList-DqqAduX1.js +336 -0
- package/dist/{MemberTransactions-XRvUfeFB.js → MemberTransactions-j4nWa843.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-g7v3ZoUS.js → MessageInput.vue_vue_type_script_setup_true_lang-z9lYA425.js} +5434 -5279
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
- package/dist/Mission-CPXEtNBm.js +360 -0
- package/dist/Overview-Bel0iCe8.js +1316 -0
- package/dist/{Overview-DgmVlUVi.js → Overview-DySRWqyr.js} +21 -20
- package/dist/Point-ClovAwUI.js +288 -0
- package/dist/Promotion-BiiruWmm.js +423 -0
- package/dist/{Queue-DxtykwmI.js → Queue-DY9zRWWp.js} +13 -12
- package/dist/{Record-fLCi2Oyh.js → Record-BJ6M5bXk.js} +9 -9
- package/dist/Review-Cyi-vRyc.js +45 -0
- package/dist/ReviewFacebookCallback-CdSAfiJ7.js +238 -0
- package/dist/ReviewGoogleCallback-COen72wx.js +213 -0
- package/dist/{Reward-BbdiCAiO.js → Reward-B3--b_8h.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Cfjtk46d.js → RewardGroup.vue_vue_type_script_setup_true_lang-DCmSt5io.js} +14 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CYEBeuQQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-F2B47wb8.js} +17 -15
- package/dist/{Segment-EkGcR2jo.js → Segment-DydGccSi.js} +31 -29
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DND48RGu.js → SelectItems.vue_vue_type_script_setup_true_lang-Bf_1Lw5R.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-sbYDSAFK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BXrHY1DU.js} +37 -36
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8RmLtRC.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DhitF847.js} +4 -4
- package/dist/{Setting-D3swsR6P.js → Setting-DgXgWy7W.js} +14 -14
- package/dist/{SettingAdvertisements-BjhTK11W.js → SettingAdvertisements-TMTfvGdU.js} +12 -12
- package/dist/Settings-b3K8fH29.js +230 -0
- package/dist/Store-jAGYe4R6.js +2615 -0
- package/dist/{StoreRewards-CyrWuwLi.js → StoreRewards-23IXon0V.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BUTYIDGo.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BroaESpx.js} +400 -455
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DJQ022R4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-gnjnQhXP.js} +2 -2
- package/dist/{Tier-DrPqr8_e.js → Tier-B_ixl0ZY.js} +44 -41
- package/dist/{Title-CaZtz98p.js → Title-CUc90kzn.js} +49 -46
- package/dist/Transaction-BNVEjOC4.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BsBqk0Rs.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CkbKlnrt.js} +6 -6
- package/dist/{Voucher-BZcr4D0y.js → Voucher-eALK6zg9.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DXQF3LZK.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CEsMYQ-L.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DI-tCQeb.js → ZodTextField.vue_vue_type_script_setup_true_lang-BEAJ5tb7.js} +2 -2
- package/dist/{app-B0vutEt5.js → app-I3z-EN92.js} +7269 -5971
- package/dist/app.js +1 -1
- package/dist/{business-IZLJeLD-.js → business-D_ksG_j8.js} +5 -5
- package/dist/campaign-BKIxUyuf.js +100 -0
- package/dist/{campaign-BPmgteCL.js → campaign-IZaOdcTr.js} +74 -96
- package/dist/{campaign.enum-BCdlLIt6.js → campaign.enum-k3u4N6yI.js} +1 -1
- package/dist/{campaign.fn-BIFWlQvS.js → campaign.fn-DeQTMPoH.js} +116 -116
- package/dist/{collectible.enum-CiuAWn6_.js → collectible.enum-CSQwvFfW.js} +1 -1
- package/dist/collection.fn-BtWAPYLz.js +26 -0
- package/dist/{duplicateCampaign-BouCkl9n.js → duplicateCampaign-BWdWO-Jv.js} +2 -2
- package/dist/{effect-Cov_Xrar.js → effect-BBSG58dq.js} +1 -1
- package/dist/{email-addresses-BiopO9xi.js → email-addresses-CJg5ttqC.js} +2 -2
- package/dist/{export-DAPTBdHb.js → export-BkjhRe8g.js} +3 -3
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-ClFo4nAk.js → helper-DsSVIIP1.js} +1 -1
- package/dist/index-38Rnr26K.js +53 -0
- package/dist/{index-N5t83KgP.js → index-BbBies0f.js} +1902 -2559
- package/dist/index-BmAoVlN8.js +151 -0
- package/dist/{index-BZvvCPbP.js → index-BsAuvfaE.js} +5 -4
- package/dist/{index-Kllafq_o.js → index-C-phzlda.js} +105 -123
- package/dist/{index-CD_3hR1g.js → index-C0qgi7n9.js} +1 -1
- package/dist/index-CPnv5m8Z.js +137 -0
- package/dist/{index-BeK9AXvx.js → index-CV1kOec1.js} +1 -1
- package/dist/{index-CmgQZKyo.js → index-Ckr8ODhI.js} +1 -1
- package/dist/{index-DTSGYksR.js → index-CtF4Z_fd.js} +281 -372
- package/dist/{index-k9DTOKkN.js → index-CtXqXihA.js} +4 -1
- package/dist/index-DCz9v1dd.js +51 -0
- package/dist/index-DdV1nasM.js +896 -0
- package/dist/index-ZPKkCZxS.js +72 -0
- package/dist/{index-k0hHOUBO.js → index-blX95L2R.js} +579 -571
- package/dist/{index-Bm5E2iD6.js → index-f0JDFqAr.js} +14 -14
- package/dist/{index-pKdJ8574.js → index-iagCxZ13.js} +5 -5
- package/dist/{index-C_AuIVay.js → index-wsdEChJx.js} +5 -5
- package/dist/{index.esm2017-ByFUnorr.js → index.esm2017-BMC-Q91P.js} +164 -164
- package/dist/{loading-t4ygCIAa.js → loading-3obmcgAf.js} +1 -1
- package/dist/{lodash-DwGVChOs.js → lodash-C69G7pFG.js} +1 -1
- package/dist/member-import-BxBe9NE7.js +187 -0
- package/dist/{membership-CMCTmRdh.js → membership-_XX1_j55.js} +3 -3
- package/dist/{money-MhQbdVIt.js → money-DZpYudCC.js} +1 -1
- package/dist/{number-klG94_wm.js → number-BbQQzzRA.js} +1 -1
- package/dist/objectid-kWi62XJQ.js +145 -0
- package/dist/{plugins-2py5EcqG.js → plugins-UfVjLlr4.js} +3 -3
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-CE9z-Us7.js → reward-1G2M5tgv.js} +1 -1
- package/dist/{rule-BKNHxNrQ.js → rule-DHHGjLt5.js} +3 -3
- package/dist/rule-builder-CgNmvg5o.js +126 -0
- package/dist/{template-C9yNa_0m.js → template-Ckva65hw.js} +6 -6
- package/dist/timezone-Ddve0ese.js +20 -0
- package/dist/transaction.fn-7n5XLxfA.js +64 -0
- package/dist/{trigger-Dk0tAyDv.js → trigger-F-XaDRpc.js} +14 -14
- package/dist/useMarketingMaterialActions-DIhnstdO.js +96 -0
- package/dist/{usePagination-cF1F_1NH.js → usePagination-C0TcC_Lo.js} +1 -1
- package/dist/{user-CNPPoxKh.js → user-DeuI7T2e.js} +1 -1
- package/dist/{vue-i18n-Bk_KpCO_.js → vue-i18n-DRrphfc1.js} +191 -191
- package/dist/{xlsx-D3muGzk7.js → xlsx-DaY_eyt1.js} +440 -440
- package/dist/{zod-D72USJGr.js → zod-BDdpK5Gp.js} +1 -1
- package/package.json +5 -3
- package/dist/Card-P7MqKEDT.js +0 -910
- package/dist/Credit-Dp5P2k79.js +0 -260
- package/dist/Game-CNSbh93g.js +0 -330
- package/dist/LoyaltyDashboard-Go9ClMrp.js +0 -1082
- package/dist/MainLayout-Dyw9Qqvh.js +0 -41
- package/dist/Member-DKXzaqlL.js +0 -280
- package/dist/MemberList-BJ5nI3Nz.js +0 -1601
- package/dist/Mission-BvHArY3W.js +0 -334
- package/dist/Point-BR0R03i6.js +0 -262
- package/dist/Promotion-DofFeR2N.js +0 -397
- package/dist/Review-7tFJOnrt.js +0 -1076
- package/dist/ReviewFacebookCallback-yl0w_vF9.js +0 -243
- package/dist/ReviewGoogleCallback-Dn_aF2ZD.js +0 -208
- package/dist/Store-U1jysb7b.js +0 -1996
- package/dist/Transaction-Bj6bSo8R.js +0 -39
- package/dist/campaign-Cxp-DOCG.js +0 -219
- package/dist/index-BQ8XZk2Y.js +0 -85
- package/dist/index-KmCk2ksK.js +0 -52
- package/dist/objectid-C4ak1ctJ.js +0 -145
- package/dist/useMarketingMaterialActions-BiXkdMcs.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-DRrphfc1.js";
|
|
3
|
+
import { components as I } from "@feedmepos/ui-library";
|
|
4
|
+
import { r as L } from "./index-ZPKkCZxS.js";
|
|
5
|
+
import { u as A } from "./business-D_ksG_j8.js";
|
|
6
|
+
import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-BJl8_bKp.js";
|
|
7
|
+
import { R as D } from "./app-I3z-EN92.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-DRrphfc1.js";
|
|
3
|
+
import { components as v } from "@feedmepos/ui-library";
|
|
4
|
+
import { r as C } from "./index-ZPKkCZxS.js";
|
|
5
|
+
import { u as H } from "./business-D_ksG_j8.js";
|
|
6
|
+
import { _ as D } from "./LocationPicker.vue_vue_type_script_setup_true_lang-BJl8_bKp.js";
|
|
7
|
+
import { R as O } from "./app-I3z-EN92.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-3obmcgAf.js";
|
|
5
|
+
import { u as J, C as ee } from "./membership-_XX1_j55.js";
|
|
6
|
+
import { f as j, p as te } from "./plugins-UfVjLlr4.js";
|
|
7
|
+
import { u as oe } from "./vue-i18n-DRrphfc1.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-BDdpK5Gp.js";
|
|
10
|
+
import "./index-blX95L2R.js";
|
|
11
|
+
import { a as N } from "./index-iagCxZ13.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-CEsMYQ-L.js";
|
|
14
|
+
import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-CVqMqYhi.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-BEAJ5tb7.js";
|
|
17
|
+
import { i as de } from "./helper-DsSVIIP1.js";
|
|
18
|
+
import { u as pe, r as P } from "./reward-1G2M5tgv.js";
|
|
19
|
+
import "./index-Ckr8ODhI.js";
|
|
20
|
+
import { C as ce } from "./campaign.fn-DeQTMPoH.js";
|
|
21
|
+
import { e as me } from "./effect-BBSG58dq.js";
|
|
22
22
|
import { useRouter as ue } from "vue-router";
|
|
23
|
-
import { R as ye } from "./app-
|
|
23
|
+
import { R as ye } from "./app-I3z-EN92.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-3obmcgAf.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-BEAJ5tb7.js";
|
|
5
|
+
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-CkbKlnrt.js";
|
|
6
|
+
import { Z as L } from "./zod-BDdpK5Gp.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-CV1kOec1.js";
|
|
10
|
+
import { c as E } from "./index-CtF4Z_fd.js";
|
|
11
|
+
import "./index-BbBies0f.js";
|
|
12
|
+
import "./index-blX95L2R.js";
|
|
13
|
+
import "./index-wsdEChJx.js";
|
|
14
|
+
import "./index-DdV1nasM.js";
|
|
15
|
+
import "./index-iagCxZ13.js";
|
|
16
|
+
import { u as J } from "./vue-i18n-DRrphfc1.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
|
};
|