@feedmepos/mf-connect 0.1.118-prod → 0.1.119-dev
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/README.md +12 -8
- package/dist/{App-BHcTqLff.js → App-z-u6skb5.js} +349 -337
- package/dist/AuditLogs-J0UJ3HJW.js +2016 -0
- package/dist/{Bin-DWhXJmHo.js → Bin-Dh9RAgYi.js} +8 -8
- package/dist/{Broadcast-Ct1DL8Pd.js → Broadcast-Dg6azPS8.js} +22 -21
- package/dist/{CampaignAnalytic-BSEKCM-4.js → CampaignAnalytic-CVB4dstO.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BxRg2Wu8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DYgBeT23.js} +8 -9
- package/dist/{Card-B7DwrAPH.js → Card-CY736Ul0.js} +22 -22
- package/dist/{Collections-BJw4JJq_.js → Collections-CdTKWkZZ.js} +197 -185
- package/dist/{Credit-BteIGXkp.js → Credit-CUhEKlMI.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CSFwIzOS.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CBwgeTXh.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BC4jTtVY.js +4439 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BDZ21UHA.js → EffectSheet.vue_vue_type_style_index_0_lang-D5-EKqG9.js} +30 -30
- package/dist/{Experience-C_VQVfJX.js → Experience-CMp09U-6.js} +32 -31
- package/dist/{FileSaver.min-CMiQUZQE.js → FileSaver.min-Bq5McdmK.js} +1 -1
- package/dist/{Game-BiHMrMBF.js → Game-Dv5NvG-q.js} +19 -18
- package/dist/{GiftCardSetup-DtJIm6oI.js → GiftCardSetup-SO2Tk5In.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BKGnPAEj.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CgG5vHCp.js} +7 -7
- package/dist/{Goals-B7VjLMDT.js → Goals-BEwQP4cY.js} +4 -4
- package/dist/Grab-npbL7p7S.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C9ecPgpJ.js → ImageInput.vue_vue_type_script_setup_true_lang-BDGEqsWE.js} +1 -1
- package/dist/{Index-D_DIHKZG.js → Index-8F2LOWng.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DSwB0Ubn.js → LocationPicker.vue_vue_type_script_setup_true_lang-BwAjki7Y.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-dk8_eVwd.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DK4C0Y9j.js} +1 -1
- package/dist/{LoyaltyDashboard-DOgHeJdK.js → LoyaltyDashboard-rWm0b8cm.js} +15 -15
- package/dist/{MainLayout-CfYgoXLS.js → MainLayout-ezbgp2IQ.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Bz2LGHUd.js → MainLayout.vue_vue_type_script_setup_true_lang-1QY5-U5y.js} +3 -3
- package/dist/{Marketing-B6TCrwaR.js → Marketing-DcWF4xVc.js} +4 -4
- package/dist/{MarketingMaterialEdit-Bu3a9NGj.js → MarketingMaterialEdit-C1bXj_hU.js} +214 -211
- package/dist/{Member-X51KrYXV.js → Member-CgDZqGsV.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CYU21JaO.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dh1_j06F.js} +39 -47
- package/dist/{MemberImportHistory-CHd9fx7E.js → MemberImportHistory-DT3QJ5se.js} +7 -7
- package/dist/{MemberList-D4L3bSlw.js → MemberList-Bm05jnbk.js} +103 -105
- package/dist/{MemberTransactions-CEgjfhnX.js → MemberTransactions-D90tTpdC.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-zsaig_yK.js → MessageInput.vue_vue_type_script_setup_true_lang-jvgjOXXA.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-YZQkKG66.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CxL-Nh6i.js} +1 -1
- package/dist/{Mission-BEVtvY0-.js → Mission-D_l2eJI3.js} +22 -21
- package/dist/{Overview-DVoXXZ16.js → Overview-1AYfTeMD.js} +20 -20
- package/dist/{Overview-4QRkldza.js → Overview-BOZBnorP.js} +145 -144
- package/dist/{Point-BJmebaL9.js → Point-Cqy4XzeG.js} +22 -21
- package/dist/{Promotion-DWZZBofu.js → Promotion-9RDNbCgB.js} +137 -131
- package/dist/{Queue-DLdsyhCT.js → Queue-D2Eie_np.js} +45 -45
- package/dist/{Record-QOD3XELf.js → Record-e4B--FD8.js} +9 -9
- package/dist/{Review-CKmhyuqj.js → Review-DcUpSvc-.js} +2 -2
- package/dist/ReviewFacebookCallback-BhHdYb4X.js +225 -0
- package/dist/{ReviewGoogleCallback-CDriVQPZ.js → ReviewGoogleCallback-JPkamgo2.js} +5 -5
- package/dist/Reward-BQJw-R8V.js +444 -0
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-ZgYX2QwC.js → RewardGroup.vue_vue_type_script_setup_true_lang-D_DSQ8q2.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DfWjXTx3.js +1923 -0
- package/dist/{Segment-URdB0lnl.js → Segment-Cjdqsqqg.js} +303 -306
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmI2LAsz.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-g-CJUZBF.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCEgZzA4.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-lbH0b170.js} +4 -4
- package/dist/{Setting-BDIHH2Wk.js → Setting-B3HK4mtx.js} +159 -148
- package/dist/{SettingAdvertisements-CkJYZnIN.js → SettingAdvertisements-BQFJpdIm.js} +12 -12
- package/dist/Settings-DKWkiRuA.js +286 -0
- package/dist/{Store-CV0kYncl.js → Store-mp1LyXwr.js} +28 -28
- package/dist/{StoreRewards-30kSkAZ_.js → StoreRewards-DiSB6d7_.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BAYKqf-Y.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-be7ksTJw.js +7007 -0
- package/dist/{Tier-DiQSC3iv.js → Tier-CxaXh96q.js} +2575 -687
- package/dist/{Title-DixxpjAg.js → Title-Byz0TGpi.js} +95 -94
- package/dist/{Transaction-DQK4LUGD.js → Transaction-CNXulI3o.js} +2 -2
- package/dist/Upselling-Dto64bmE.js +1013 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CL-GKkuD.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C0bfVZf8.js} +26 -26
- package/dist/{Voucher-CSVlk_Hr.js → Voucher-CVw3E8Y4.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CiSoy0Ky.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C0d3ktXA.js} +12 -12
- package/dist/{WhatsappAccount-CQYbv2Ew.js → WhatsappAccount-5vLzjaIV.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DjgRo9iA.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CwGBRX-Q.js} +1 -1
- package/dist/{WhatsappBot-DdO9Bfvh.js → WhatsappBot-BWJbD7Gk.js} +6 -6
- package/dist/{WhatsappBotLogs-CjjWJGND.js → WhatsappBotLogs-C8gpmZyC.js} +6 -6
- package/dist/{WhatsappBotSettings-DYGx-kRr.js → WhatsappBotSettings-BvPnKHz-.js} +4 -4
- package/dist/WhatsappLayout-DJXhXeXf.js +21 -0
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DTUytfe5.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BxUYjrWQ.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DdCUr_Zm.js → ZodTextField.vue_vue_type_script_setup_true_lang-CkjzVKif.js} +2 -2
- package/dist/{app-CqQeNnGq.js → app-BF1vds2J.js} +11496 -10741
- package/dist/app.js +4 -3
- package/dist/{base.export-Dls5LQeu.js → base.export-B7FU8J4P.js} +2 -2
- package/dist/{business-gvLSQklz.js → business-DkUMhys1.js} +1 -1
- package/dist/{campaign-Cd6GmA4U.js → campaign-0AgQP43B.js} +34 -28
- package/dist/{campaign-BqazvOUj.js → campaign-C9cVkGMF.js} +121 -94
- package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
- package/dist/campaign.fn-N6rJeDUx.js +776 -0
- package/dist/{collection.fn-CERMsFPh.js → collection.fn-B_QnW0e3.js} +2 -2
- package/dist/{currency-IkiKiNg1.js → currency-XQmondpC.js} +1 -1
- package/dist/duplicateCampaign-CvQRWP-Z.js +51 -0
- package/dist/{effect-j_T62HBN.js → effect-Mwn1x6qN.js} +1 -1
- package/dist/{email-addresses-CN1kPlEj.js → email-addresses-DQQAi6-l.js} +2 -2
- package/dist/{feature-flag-DDfyOLsv.js → feature-flag-B1VMMZMd.js} +144 -144
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-DVUe13eh.js → helper-D1R8vyjc.js} +1 -1
- package/dist/{index-fNYUguDQ.js → index-BU6CU5MP.js} +389 -232
- package/dist/{index-DALsfLV7.js → index-Bm43wR8L.js} +2699 -2613
- package/dist/{index-jS16KX9p.js → index-Bym-ZIcv.js} +1 -1
- package/dist/{index-BvoOJdfc.js → index-C9Nbb7wc.js} +2 -2
- package/dist/{index-UJHdDEG1.js → index-CLlGMbnP.js} +1 -1
- package/dist/{index-BvkqHehI.js → index-CPB7j8Wn.js} +10 -10
- package/dist/{index-COuLtOaw.js → index-CRAuAyO3.js} +1 -1
- package/dist/{index-k7FFxt_M.js → index-Cg8Z5eYT.js} +2 -2
- package/dist/{index-CPyK4a5J.js → index-CzE9ZPDV.js} +4 -4
- package/dist/{index-Cjy0SXCn.js → index-D5BwAYuA.js} +197 -197
- package/dist/{index-ep_Kxxid.js → index-DMfCzjiA.js} +2 -2
- package/dist/{index-DMiaWY0s.js → index-DQnCdGWe.js} +682 -581
- package/dist/{index-D_1pnadB.js → index-DaUhJ6xV.js} +29 -15
- package/dist/{index-9RBtEPPj.js → index-P8DDRVa3.js} +1 -1
- package/dist/{index-C_SaKemI.js → index-Rs75lw-x.js} +1 -1
- package/dist/{index-C-IajuP1.js → index-ZYrey0SM.js} +10 -10
- package/dist/{index-CWGbeg5X.js → index-eR9mqPPV.js} +19 -6
- package/dist/{index-BmIfGArh.js → index-mOGrVzUV.js} +3 -3
- package/dist/{index-lzQ6ehOk.js → index-ug7pxPAX.js} +608 -251
- package/dist/{index-DzbVgUEP.js → index-ytSMcSMt.js} +1 -1
- package/dist/{index.esm2017-vJKhLfdu.js → index.esm2017-Gkctw9Mb.js} +111 -111
- package/dist/{loading-jZV2Dm--.js → loading-kUQqT44G.js} +1 -1
- package/dist/{lodash-C2pLek0l.js → lodash-B4AjV7YZ.js} +1 -1
- package/dist/{member-import-BKI7soRD.js → member-import-CwDUG5mj.js} +1 -1
- package/dist/{membership-smdlFpPr.js → membership-BI6U8-eM.js} +2 -2
- package/dist/{money-5XyTnYwW.js → money-Bum-AbB7.js} +1 -1
- package/dist/{number-DHU9qJJQ.js → number-uAoNqG-N.js} +1 -1
- package/dist/objectid-CPTCMH2h.js +145 -0
- package/dist/{onboarding-C_5pyGx-.js → onboarding-wtYzQipv.js} +36 -36
- package/dist/{onboardingSetup-Bd1V-Ipy.js → onboardingSetup-DlYM-oqd.js} +2 -2
- package/dist/{plugins-D1Ru-da5.js → plugins-BGyTPNfc.js} +3 -3
- package/dist/{reward-BqPl68Xk.js → reward-D0xtG-bp.js} +1 -1
- package/dist/{rule-WBrRXwL-.js → rule-BAA5-vRj.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-DKgW9ul3.js +188 -0
- package/dist/{timezone-O4qrCDcK.js → timezone-Bbw2OeEP.js} +1 -1
- package/dist/{transaction.fn-CY_F8Nb8.js → transaction.fn-DZdNjP_E.js} +2 -2
- package/dist/{trigger-D-vySeIB.js → trigger-BpotFb7G.js} +9 -9
- package/dist/{useMarketingMaterialActions-kA6SLHy_.js → useMarketingMaterialActions-CQ1M0N9c.js} +4 -4
- package/dist/{usePagination-AYE_RJH2.js → usePagination-qALFI_Td.js} +1 -1
- package/dist/{user-DJcMkYXP.js → user-X_94TRIK.js} +1 -1
- package/dist/vue-i18n-CRFpVnMa.js +2365 -0
- package/dist/{xlsx--s3hBdDk.js → xlsx-DW48eXDT.js} +224 -224
- package/dist/{zod-IpHRbxaJ.js → zod-BAP9II5C.js} +1 -1
- package/package.json +8 -3
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJotVIKM.js +0 -3496
- package/dist/ReviewFacebookCallback-C6DlaJ_j.js +0 -238
- package/dist/Reward-DftoZfPN.js +0 -442
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHmBwLNP.js +0 -1884
- package/dist/Settings-9gaegvYJ.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dgwyk3NA.js +0 -1265
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CDUhH6wp.js +0 -142
- package/dist/WhatsappLayout-B6k_79Kl.js +0 -21
- package/dist/campaign.fn-C0oMb1fs.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-jT5g6pGt.js +0 -145
- package/dist/rule-builder-DAlSbaWh.js +0 -102
- package/dist/template-DDquG4Xc.js +0 -236
- package/dist/vue-i18n-kXHiDb_1.js +0 -2365
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { defineComponent as K, ref as x, computed as h, resolveComponent as f, openBlock as v, createBlock as E, unref as t, isRef as J, withCtx as A, createElementVNode as y, createVNode as s, createCommentVNode as k, createElementBlock as H, Fragment as M, h as O, onMounted as W, toDisplayString as Y } from "vue";
|
|
2
|
+
import { _ as Z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as z, components as L } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as X } from "./loading-kUQqT44G.js";
|
|
5
|
+
import { u as q, C as Q } from "./membership-BI6U8-eM.js";
|
|
6
|
+
import { f as B, p as ee } from "./plugins-BGyTPNfc.js";
|
|
7
|
+
import { u as te } from "./vue-i18n-CRFpVnMa.js";
|
|
8
|
+
import { c as oe } from "./object-BYyQ0PZp.js";
|
|
9
|
+
import { Z as F } from "./zod-BAP9II5C.js";
|
|
10
|
+
import "./index-Bm43wR8L.js";
|
|
11
|
+
import { a as j } from "./index-C9Nbb7wc.js";
|
|
12
|
+
import { useCoreStore as ae } from "@feedmepos/mf-common";
|
|
13
|
+
import { _ as le, a as ne } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-C0d3ktXA.js";
|
|
14
|
+
import { _ as ie } from "./EffectSheet.vue_vue_type_style_index_0_lang-D5-EKqG9.js";
|
|
15
|
+
import { J as N } from "./JsonViewer-v8_C7l5N.js";
|
|
16
|
+
import { _ as re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CkjzVKif.js";
|
|
17
|
+
import { i as se } from "./helper-D1R8vyjc.js";
|
|
18
|
+
import { u as de, r as P } from "./reward-D0xtG-bp.js";
|
|
19
|
+
import "./index-Bym-ZIcv.js";
|
|
20
|
+
import { C as pe } from "./campaign.fn-N6rJeDUx.js";
|
|
21
|
+
import { e as ce } from "./effect-Mwn1x6qN.js";
|
|
22
|
+
import { useRouter as me } from "vue-router";
|
|
23
|
+
import { R as ue } from "./app-BF1vds2J.js";
|
|
24
|
+
const ye = { class: "flex gap-8 items-center justify-start" }, fe = /* @__PURE__ */ K({
|
|
25
|
+
__name: "EditRewardSheet",
|
|
26
|
+
emits: ["update"],
|
|
27
|
+
setup(G, { expose: i, emit: I }) {
|
|
28
|
+
const d = q(), { minor: C } = X, w = x(!1), l = x({}), m = x(), T = h(
|
|
29
|
+
() => {
|
|
30
|
+
var e, o;
|
|
31
|
+
return ((e = d.loyaltyRewards.items.find(
|
|
32
|
+
(r) => {
|
|
33
|
+
var p;
|
|
34
|
+
return r.value === ((p = l.value.option) == null ? void 0 : p.collectible);
|
|
35
|
+
}
|
|
36
|
+
)) == null ? void 0 : e.raw.type) ?? ((o = l.value.option) == null ? void 0 : o.collectibleType);
|
|
37
|
+
}
|
|
38
|
+
), g = h(
|
|
39
|
+
() => {
|
|
40
|
+
var e;
|
|
41
|
+
return ((e = l.value.option) == null ? void 0 : e.type) === "LOYALTY" && (T.value === "CREDIT" || T.value === "TITLE");
|
|
42
|
+
}
|
|
43
|
+
), c = h(() => g.value ? j.superRefine((e, o) => {
|
|
44
|
+
var r, p, R, _;
|
|
45
|
+
!((p = (r = e.option) == null ? void 0 : r.validityOption) != null && p.validForDay) && !((_ = (R = e.option) == null ? void 0 : R.validityOption) != null && _.validBefore) && o.addIssue({
|
|
46
|
+
code: "custom",
|
|
47
|
+
path: [],
|
|
48
|
+
message: "Validity must be set"
|
|
49
|
+
});
|
|
50
|
+
}) : j), b = h(() => {
|
|
51
|
+
const e = c.value.safeParse(l.value);
|
|
52
|
+
return e.success ? [] : e.error.errors;
|
|
53
|
+
});
|
|
54
|
+
function $(e, o) {
|
|
55
|
+
e && (m.value = void 0, l.value = o), w.value = e;
|
|
56
|
+
}
|
|
57
|
+
const V = I;
|
|
58
|
+
async function S() {
|
|
59
|
+
const e = c.value.safeParse(l.value);
|
|
60
|
+
!e.success || !e.data || (await C(
|
|
61
|
+
async () => {
|
|
62
|
+
var o;
|
|
63
|
+
e.data.option.type === "VOUCHER" && m.value && (e.data.option.collectibleConfig.image = await B.update(
|
|
64
|
+
((o = e.data.option.collectibleConfig) == null ? void 0 : o.image) || B.collectibleImagePath(void 0, m.value),
|
|
65
|
+
m.value
|
|
66
|
+
));
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
message: "Uploading reward image",
|
|
70
|
+
successMessage: "Reward image updated"
|
|
71
|
+
}
|
|
72
|
+
), V("update", e.data));
|
|
73
|
+
}
|
|
74
|
+
function U(e) {
|
|
75
|
+
e === "VOUCHER" ? l.value.option = {
|
|
76
|
+
collectible: null,
|
|
77
|
+
type: "VOUCHER",
|
|
78
|
+
collectibleConfig: se("VOUCHER", {
|
|
79
|
+
business: ae().currentBusiness.value._id
|
|
80
|
+
}),
|
|
81
|
+
earningOption: {
|
|
82
|
+
amount: 1,
|
|
83
|
+
type: "FIXED"
|
|
84
|
+
},
|
|
85
|
+
validityOption: {
|
|
86
|
+
validForDay: 7
|
|
87
|
+
}
|
|
88
|
+
} : l.value.option = {
|
|
89
|
+
collectible: d.loyaltyRewards.raw[0]._id,
|
|
90
|
+
collectibleType: d.loyaltyRewards.raw[0].type,
|
|
91
|
+
type: "LOYALTY",
|
|
92
|
+
earningOption: {
|
|
93
|
+
amount: 1,
|
|
94
|
+
type: "FIXED"
|
|
95
|
+
},
|
|
96
|
+
validityOption: {
|
|
97
|
+
validForDay: 7
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function D(e) {
|
|
102
|
+
l.value.option.collectible = e, l.value.option.collectibleType = d.loyaltyRewards.raw.find(
|
|
103
|
+
(o) => o._id === e
|
|
104
|
+
).type;
|
|
105
|
+
}
|
|
106
|
+
const a = x();
|
|
107
|
+
return i({
|
|
108
|
+
showSheet: $
|
|
109
|
+
}), (e, o) => {
|
|
110
|
+
const r = f("FmSelect"), p = f("FmForm"), R = f("FmButton"), _ = f("FmSideSheet");
|
|
111
|
+
return v(), E(_, {
|
|
112
|
+
"max-width": 560,
|
|
113
|
+
modelValue: t(w),
|
|
114
|
+
"onUpdate:modelValue": [
|
|
115
|
+
o[8] || (o[8] = (n) => J(w) ? w.value = n : null),
|
|
116
|
+
o[9] || (o[9] = (n) => w.value = n)
|
|
117
|
+
],
|
|
118
|
+
header: "Edit reward"
|
|
119
|
+
}, {
|
|
120
|
+
"side-sheet-footer": A(() => [
|
|
121
|
+
y("div", ye, [
|
|
122
|
+
s(R, {
|
|
123
|
+
variant: "primary",
|
|
124
|
+
type: "button",
|
|
125
|
+
label: "Confirm",
|
|
126
|
+
disabled: t(b).length > 0,
|
|
127
|
+
onClick: o[6] || (o[6] = (n) => S())
|
|
128
|
+
}, null, 8, ["disabled"]),
|
|
129
|
+
s(R, {
|
|
130
|
+
variant: "secondary",
|
|
131
|
+
type: "button",
|
|
132
|
+
label: "Cancel",
|
|
133
|
+
onClick: o[7] || (o[7] = (n) => w.value = !1)
|
|
134
|
+
})
|
|
135
|
+
])
|
|
136
|
+
]),
|
|
137
|
+
default: A(() => [
|
|
138
|
+
s(N, { json: t(l) }, null, 8, ["json"]),
|
|
139
|
+
s(p, {
|
|
140
|
+
class: "flex flex-col gap-y-24",
|
|
141
|
+
ref_key: "formRef",
|
|
142
|
+
ref: a,
|
|
143
|
+
onValidationSuccess: o[5] || (o[5] = (n) => S())
|
|
144
|
+
}, {
|
|
145
|
+
default: A(() => {
|
|
146
|
+
var n;
|
|
147
|
+
return [
|
|
148
|
+
s(re, {
|
|
149
|
+
modelValue: t(l).name,
|
|
150
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => t(l).name = u),
|
|
151
|
+
label: "Reward Name",
|
|
152
|
+
schema: t(F).typeAtPath(t(c), "name", []),
|
|
153
|
+
"error-text": t(F).helperText(t(b), "name")
|
|
154
|
+
}, null, 8, ["modelValue", "schema", "error-text"]),
|
|
155
|
+
s(r, {
|
|
156
|
+
label: "Reward Type",
|
|
157
|
+
disabled: !!t(l)._id,
|
|
158
|
+
items: [
|
|
159
|
+
{ label: "Voucher", value: "VOUCHER" },
|
|
160
|
+
{ label: "Loyalty", value: "LOYALTY" }
|
|
161
|
+
],
|
|
162
|
+
"model-value": t(l).option.type,
|
|
163
|
+
"onUpdate:modelValue": U
|
|
164
|
+
}, null, 8, ["disabled", "model-value"]),
|
|
165
|
+
t(l).option.type == "LOYALTY" ? (v(), E(r, {
|
|
166
|
+
key: 0,
|
|
167
|
+
label: "Loyalty type",
|
|
168
|
+
items: t(d).loyaltyRewards.items,
|
|
169
|
+
"model-value": t(l).option.collectible,
|
|
170
|
+
"onUpdate:modelValue": D
|
|
171
|
+
}, null, 8, ["items", "model-value"])) : k("", !0),
|
|
172
|
+
t(l).option.type === "LOYALTY" ? (v(), H(M, { key: 1 }, [
|
|
173
|
+
o[10] || (o[10] = y("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
|
|
174
|
+
t(T) !== "TITLE" ? (v(), E(le, {
|
|
175
|
+
key: 0,
|
|
176
|
+
class: "mt-[-8px]",
|
|
177
|
+
rules: [
|
|
178
|
+
t(F).ruleAtPath(t(c), "option.earningOption", [
|
|
179
|
+
t(l).option.type
|
|
180
|
+
])
|
|
181
|
+
],
|
|
182
|
+
"helper-state": t(F).helperState(t(b), "option.earningOption"),
|
|
183
|
+
"error-text": t(F).helperText(t(b), "option.earningOption"),
|
|
184
|
+
"fixed-type": !0,
|
|
185
|
+
"model-value": t(l).option.earningOption,
|
|
186
|
+
"onUpdate:modelValue": o[1] || (o[1] = (u) => t(l).option.earningOption = u)
|
|
187
|
+
}, null, 8, ["rules", "helper-state", "error-text", "model-value"])) : k("", !0),
|
|
188
|
+
s(ie, {
|
|
189
|
+
class: "!gap-24",
|
|
190
|
+
"for-credit": t(g),
|
|
191
|
+
type: t(l).option.type === "VOUCHER" ? "range" : "custom",
|
|
192
|
+
rules: [
|
|
193
|
+
t(F).ruleAtPath(t(c), "option.validityOption", [
|
|
194
|
+
t(l).option.type
|
|
195
|
+
])
|
|
196
|
+
],
|
|
197
|
+
"model-value": t(l).option.validityOption,
|
|
198
|
+
"onUpdate:modelValue": o[2] || (o[2] = (u) => t(l).option.validityOption = u)
|
|
199
|
+
}, null, 8, ["for-credit", "type", "rules", "model-value"])
|
|
200
|
+
], 64)) : k("", !0),
|
|
201
|
+
t(l).option.type === "VOUCHER" ? (v(), E(ne, {
|
|
202
|
+
key: 2,
|
|
203
|
+
"reward-image": t(m),
|
|
204
|
+
"model-value": ((n = t(l)) == null ? void 0 : n.option.collectibleConfig) ?? void 0,
|
|
205
|
+
"onUpdate:modelValue": o[3] || (o[3] = (u) => t(l).option.collectibleConfig = u),
|
|
206
|
+
"onUpdate:rewardImage": o[4] || (o[4] = (u) => m.value = u)
|
|
207
|
+
}, null, 8, ["reward-image", "model-value"])) : k("", !0),
|
|
208
|
+
s(N, { json: t(b) }, null, 8, ["json"])
|
|
209
|
+
];
|
|
210
|
+
}),
|
|
211
|
+
_: 1
|
|
212
|
+
}, 512)
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
}, 8, ["modelValue"]);
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}), we = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, ge = { class: "flex flex-col gap-16 text-center" }, be = { class: "fm-typo-en-title-sm-800" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ K({
|
|
219
|
+
__name: "Reward",
|
|
220
|
+
setup(G) {
|
|
221
|
+
const { t: i } = te(), I = {
|
|
222
|
+
label: i("connect.storeRewards.create"),
|
|
223
|
+
value: "create",
|
|
224
|
+
isPrimary: !0,
|
|
225
|
+
prependIcon: "add"
|
|
226
|
+
}, d = q(), C = de(), { global: w, minor: l } = X, m = me(), T = z(), g = x({
|
|
227
|
+
searchKey: "",
|
|
228
|
+
columnFilters: []
|
|
229
|
+
}), c = h(() => C.rewards);
|
|
230
|
+
function b(a) {
|
|
231
|
+
m.push({
|
|
232
|
+
name: ue["$connect-STORE_REWARD_COLLECTIONS"],
|
|
233
|
+
params: { id: a }
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
const $ = [
|
|
237
|
+
{
|
|
238
|
+
header: i("connect.storeRewards.table.name"),
|
|
239
|
+
accessorFn: (a) => a.name
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
header: i("connect.storeRewards.table.type"),
|
|
243
|
+
cell(a) {
|
|
244
|
+
return a.row.original.collectibleConfig ? Q[a.row.original.collectibleConfig.type].chip() : "N/A";
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
header: i("connect.storeRewards.table.summary"),
|
|
249
|
+
accessorFn: (a) => {
|
|
250
|
+
var e, o;
|
|
251
|
+
if (a.option.type === "VOUCHER")
|
|
252
|
+
return ce((o = (e = a.option.collectibleConfig) == null ? void 0 : e.extras) == null ? void 0 : o.effect);
|
|
253
|
+
if (a.option.collectibleType == "TITLE") {
|
|
254
|
+
const r = d.sortedTitles.find(
|
|
255
|
+
(p) => p._id == a.option.collectible
|
|
256
|
+
);
|
|
257
|
+
return `Get ${r == null ? void 0 : r.name} valid for ${a.option.validityOption.validForDay} days`;
|
|
258
|
+
}
|
|
259
|
+
return `Get ${a.option.earningOption.amount} ${pe.formattedType(a.option.collectibleType)}`;
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
header: i("connect.storeRewards.table.actions"),
|
|
264
|
+
cell(a) {
|
|
265
|
+
return O("div", { class: "flex items-center justify-end gap-4" }, [
|
|
266
|
+
O(
|
|
267
|
+
L.FmMenu,
|
|
268
|
+
{
|
|
269
|
+
placement: "bottom-end",
|
|
270
|
+
onClick: (e) => {
|
|
271
|
+
e.stopPropagation();
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"menu-button": () => O(L.FmButton, {
|
|
276
|
+
icon: "more_vert",
|
|
277
|
+
iconColor: "neutral-gray-400",
|
|
278
|
+
variant: "tertiary"
|
|
279
|
+
}),
|
|
280
|
+
default: () => [
|
|
281
|
+
a.row.original.option.type === "VOUCHER" && O(L.FmMenuItem, {
|
|
282
|
+
label: "View collections",
|
|
283
|
+
onClick: async (e) => {
|
|
284
|
+
e.stopPropagation(), b(
|
|
285
|
+
a.row.original.option.collectible
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
}),
|
|
289
|
+
O(
|
|
290
|
+
L.FmMenuItem,
|
|
291
|
+
{
|
|
292
|
+
onClick: async (e) => {
|
|
293
|
+
e.stopPropagation(), S(a.row.original);
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
label: O(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
301
|
+
},
|
|
302
|
+
"Delete"
|
|
303
|
+
)
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
]);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
], V = x();
|
|
313
|
+
async function S(a) {
|
|
314
|
+
await ee.remove(
|
|
315
|
+
i("connect.storeRewards.delete.confirm"),
|
|
316
|
+
i("connect.storeRewards.delete.title")
|
|
317
|
+
) && await l(
|
|
318
|
+
async () => {
|
|
319
|
+
await P.deleteReward(a._id), await C.readRewards();
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
message: i("connect.storeRewards.delete.message"),
|
|
323
|
+
successMessage: i("connect.storeRewards.delete.success")
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
async function U(a) {
|
|
328
|
+
var e;
|
|
329
|
+
a || (a = {
|
|
330
|
+
name: "",
|
|
331
|
+
option: {
|
|
332
|
+
type: "LOYALTY",
|
|
333
|
+
collectible: d.loyaltyRewards.items[0].value,
|
|
334
|
+
collectibleType: d.loyaltyRewards.items[0].raw.type,
|
|
335
|
+
validityOption: {
|
|
336
|
+
validForDay: 7
|
|
337
|
+
},
|
|
338
|
+
earningOption: {
|
|
339
|
+
type: "FIXED",
|
|
340
|
+
amount: 1
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}), (e = V.value) == null || e.showSheet(!0, oe(a));
|
|
344
|
+
}
|
|
345
|
+
async function D(a) {
|
|
346
|
+
let e = !1;
|
|
347
|
+
a._id && a.option.type === "VOUCHER" && await new Promise((o) => {
|
|
348
|
+
T.open({
|
|
349
|
+
title: "Confirmation",
|
|
350
|
+
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
351
|
+
primaryActions: { text: "Update all", close: !0 },
|
|
352
|
+
secondaryActions: { text: "Update future only", close: !0 }
|
|
353
|
+
}).onPrimary(async () => {
|
|
354
|
+
e = !0, o();
|
|
355
|
+
}).onSecondary(async () => {
|
|
356
|
+
o();
|
|
357
|
+
});
|
|
358
|
+
}), await l(
|
|
359
|
+
async () => {
|
|
360
|
+
var o;
|
|
361
|
+
a.collectibleConfig = void 0, a._id ? await P.updateReward(a._id, {
|
|
362
|
+
...a,
|
|
363
|
+
updateCollection: e
|
|
364
|
+
}) : await P.createReward(a), await C.readRewards(), (o = V.value) == null || o.showSheet(!1);
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
message: "Updating reward",
|
|
368
|
+
successMessage: "Reward updated successfully"
|
|
369
|
+
}
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
return W(async () => {
|
|
373
|
+
await w(async () => {
|
|
374
|
+
await d.readMembership(), await d.readRewards(), await C.readRewards();
|
|
375
|
+
});
|
|
376
|
+
}), (a, e) => {
|
|
377
|
+
const o = f("FmPageHead"), r = f("FmSearch"), p = f("FmTable"), R = f("FmButton"), _ = f("FmCard");
|
|
378
|
+
return v(), H(M, null, [
|
|
379
|
+
s(o, {
|
|
380
|
+
title: t(i)("connect.reward.title"),
|
|
381
|
+
actions: [I],
|
|
382
|
+
"back-button": !0,
|
|
383
|
+
"onClick:action": e[0] || (e[0] = () => U()),
|
|
384
|
+
"onClick:back": e[1] || (e[1] = () => {
|
|
385
|
+
var n;
|
|
386
|
+
return (n = t(m)) == null ? void 0 : n.back();
|
|
387
|
+
})
|
|
388
|
+
}, null, 8, ["title", "actions"]),
|
|
389
|
+
y("div", we, [
|
|
390
|
+
t(c) && t(c).length > 0 ? (v(), H(M, { key: 0 }, [
|
|
391
|
+
y("div", ve, [
|
|
392
|
+
e[6] || (e[6] = y("div", { class: "flex gap-8" }, null, -1)),
|
|
393
|
+
s(r, {
|
|
394
|
+
modelValue: t(g).searchKey,
|
|
395
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => t(g).searchKey = n),
|
|
396
|
+
class: "",
|
|
397
|
+
placeholder: "search",
|
|
398
|
+
collapsible: ""
|
|
399
|
+
}, null, 8, ["modelValue"])
|
|
400
|
+
]),
|
|
401
|
+
s(p, {
|
|
402
|
+
"row-data": t(c),
|
|
403
|
+
"column-defs": $,
|
|
404
|
+
"search-value": t(g).searchKey,
|
|
405
|
+
"column-filter": t(g).columnFilters,
|
|
406
|
+
onRowClick: e[3] || (e[3] = (n) => U(n.original)),
|
|
407
|
+
"hide-footer": t(c).length < 10
|
|
408
|
+
}, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
|
|
409
|
+
], 64)) : (v(), E(_, {
|
|
410
|
+
key: 1,
|
|
411
|
+
variant: "outlined",
|
|
412
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
413
|
+
}, {
|
|
414
|
+
default: A(() => [
|
|
415
|
+
e[7] || (e[7] = y("img", {
|
|
416
|
+
src: Z,
|
|
417
|
+
class: "aspect-square w-[150px]"
|
|
418
|
+
}, null, -1)),
|
|
419
|
+
y("div", ge, [
|
|
420
|
+
y("div", be, Y(t(i)("connect.storeRewards.empty.title")), 1),
|
|
421
|
+
y("div", Re, Y(t(i)("connect.storeRewards.empty.description")), 1)
|
|
422
|
+
]),
|
|
423
|
+
s(R, {
|
|
424
|
+
variant: "primary",
|
|
425
|
+
label: t(i)("connect.storeRewards.empty.action"),
|
|
426
|
+
onClick: e[4] || (e[4] = (n) => U()),
|
|
427
|
+
icon: "add"
|
|
428
|
+
}, null, 8, ["label"])
|
|
429
|
+
]),
|
|
430
|
+
_: 1
|
|
431
|
+
})),
|
|
432
|
+
s(fe, {
|
|
433
|
+
ref_key: "rewardSheetRef",
|
|
434
|
+
ref: V,
|
|
435
|
+
onUpdate: e[5] || (e[5] = (n) => D(n))
|
|
436
|
+
}, null, 512)
|
|
437
|
+
])
|
|
438
|
+
], 64);
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
export {
|
|
443
|
+
Ne as default
|
|
444
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
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-kUQqT44G.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-CkjzVKif.js";
|
|
5
|
+
import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-C0bfVZf8.js";
|
|
6
|
+
import { Z as L } from "./zod-BAP9II5C.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 "./index-
|
|
11
|
-
import "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
14
|
-
import
|
|
15
|
-
import "./index-
|
|
9
|
+
import { r as k } from "./index-CRAuAyO3.js";
|
|
10
|
+
import { c as E } from "./index-ug7pxPAX.js";
|
|
11
|
+
import "./index-DQnCdGWe.js";
|
|
12
|
+
import "./index-Bm43wR8L.js";
|
|
13
|
+
import "./index-mOGrVzUV.js";
|
|
14
|
+
import "./index-BU6CU5MP.js";
|
|
15
|
+
import "./index-C9Nbb7wc.js";
|
|
16
16
|
import "./index-I9lmcd2w.js";
|
|
17
|
-
import "./index-
|
|
18
|
-
import { u as J } from "./vue-i18n-
|
|
17
|
+
import "./index-P8DDRVa3.js";
|
|
18
|
+
import { u as J } from "./vue-i18n-CRFpVnMa.js";
|
|
19
19
|
import { c as C } from "./object-BYyQ0PZp.js";
|
|
20
20
|
import { useDialog as Z } from "@feedmepos/ui-library";
|
|
21
21
|
const A = N("mf-connect-referral", () => {
|