@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-beta.80
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-DsB2o1oB.js → App-DievprEi.js} +853 -683
- package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-DrdqOhZL.js} +16 -13
- package/dist/{Bin-DMr7K8Kj.js → Bin-Ci2k3z77.js} +8 -8
- package/dist/Broadcast-CpDMAG1o.js +306 -0
- package/dist/CampaignAnalytic-uRyGaLaN.js +1830 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -5
- package/dist/Card-tb98Kyr-.js +1086 -0
- package/dist/{Collections-B0uGC2FE.js → Collections-P1S5WjnJ.js} +14 -13
- package/dist/Credit-DwK7JYf-.js +286 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js +53 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js +4432 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js} +36 -36
- package/dist/Experience-BejtRlOj.js +288 -0
- package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-C-hmBaHm.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-n8qL896g.js +356 -0
- package/dist/GiftCardSetup-Bgsfcu7N.js +736 -0
- package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js +424 -0
- package/dist/Goals-BB8LJlq3.js +247 -0
- package/dist/{Grab-DmmwrGzk.js → Grab-COq3Ujst.js} +33 -32
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
- package/dist/{Index-m7l4insz.js → Index-BdkIinaE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
- package/dist/LoyaltyDashboard-D4Jtpw0n.js +2911 -0
- package/dist/MainLayout-Ca-Xm3eZ.js +143 -0
- package/dist/{Marketing-C9pSIdBU.js → Marketing-Cpe4s7NZ.js} +7 -6
- package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-nTeS9VVx.js} +15 -14
- package/dist/Member-DgGZ4Cdg.js +654 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js +1281 -0
- package/dist/MemberImportHistory-rdlbDVWU.js +187 -0
- package/dist/MemberList-BC4aRJTt.js +334 -0
- package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-BFfdTttp.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +5928 -5644
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js +40 -0
- package/dist/Mission-BWCNKTjU.js +363 -0
- package/dist/Overview--Q7vzhNK.js +1316 -0
- package/dist/{Overview-DOJj4XvO.js → Overview-i02Wnyjn.js} +23 -20
- package/dist/Point-CiWxqny5.js +297 -0
- package/dist/Promotion-B0G9qfBm.js +426 -0
- package/dist/{Queue-55G2gtP5.js → Queue-YfwgYmzH.js} +16 -13
- package/dist/{Record-DNPI02c6.js → Record-CCuwrPKW.js} +9 -9
- package/dist/Review-ymsfdh7Q.js +45 -0
- package/dist/ReviewFacebookCallback-DyDExWvP.js +238 -0
- package/dist/ReviewGoogleCallback-DNyg3n2S.js +213 -0
- package/dist/{Reward-CnP8R2pS.js → Reward-BKIb0ezH.js} +28 -28
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +26 -23
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +198 -186
- package/dist/{Segment-CxiQnnyj.js → Segment-D5_pp7fh.js} +278 -276
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js} +45 -42
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
- package/dist/Setting-CD78gIMU.js +574 -0
- package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
- package/dist/Settings-DI_tryQV.js +230 -0
- package/dist/Store-BV2JTRNZ.js +2615 -0
- package/dist/{StoreRewards-DILeipMG.js → StoreRewards-Bk55YXyO.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +1331 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
- package/dist/{Tier-BAZ1xuKL.js → Tier-CO2K30Ew.js} +2576 -757
- package/dist/{Title-CcNAt47f.js → Title-qProQh3T.js} +41 -37
- package/dist/Transaction-qL5L-fE_.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js} +26 -26
- package/dist/Voucher-VFD1LY9Y.js +837 -0
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +118 -124
- package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
- package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
- package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
- package/dist/{app-Z-UKRG5V.js → app-BEYzXWZO.js} +50954 -42517
- package/dist/app.js +1 -1
- package/dist/base.export-S_82Elmg.js +75 -0
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-C7EF6cKC.js → business-DH7djUl8.js} +5 -5
- package/dist/campaign-DlHDgoFX.js +100 -0
- package/dist/campaign-k_WHxsOR.js +400 -0
- package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
- package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-B-4JRzft.js} +67 -67
- package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/collection.fn-zQwWDzZT.js +26 -0
- package/dist/currency-CQVHXBFe.js +7 -0
- package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-YTXMbJTj.js} +11 -11
- package/dist/{effect-BcB8IlTI.js → effect-CQkVLHWi.js} +1 -1
- package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-BIoVbPGC.js} +209 -201
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-BSgrCJRv.js → helper-BCkTvF4m.js} +1 -1
- package/dist/{index-CoHWpylO.js → index-B-bQnb0_.js} +2115 -2557
- package/dist/index-BAJOC43K.js +14550 -0
- package/dist/{index-HXiYGO4_.js → index-BFIHEBnX.js} +6343 -7693
- package/dist/{index-VlFWaBrg.js → index-BJIQe3QJ.js} +1 -1
- package/dist/{index-BpI-BI4H.js → index-BJkRTH5T.js} +4 -4
- package/dist/index-BOJogkKQ.js +172 -0
- package/dist/{index-BoYEqLif.js → index-BRPajAkE.js} +1517 -263
- package/dist/{index-CsoBDon4.js → index-BTkxgos0.js} +1590 -1523
- package/dist/index-BUP4aHq8.js +32438 -0
- package/dist/index-BYvnqARr.js +902 -0
- package/dist/{index-hlyg-wxV.js → index-Bonq819P.js} +1 -1
- package/dist/{index-CIBPhxlC.js → index-C6mOI2Pp.js} +105 -123
- package/dist/{index-Bf6jNZit.js → index-CDIe15AY.js} +24 -9
- package/dist/index-CTrcdIkt.js +137 -0
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/index-CpnchVe1.js +74 -0
- package/dist/index-D5AR7A5e.js +151 -0
- package/dist/index-D7-Q86HI.js +54 -0
- package/dist/index-DdOj8Hew.js +53 -0
- package/dist/{index-iMPtFp54.js → index-Dvqguh2B.js} +10 -9
- package/dist/{index-Bm0QPucw.js → index-hAKRfE-4.js} +14 -14
- package/dist/index-o2Ga_qaX.js +39 -0
- package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-D0fhMMPG.js} +128 -128
- package/dist/{loading-CSXr0Yqz.js → loading-C686AMVG.js} +1 -1
- package/dist/{lodash-Bh7XKI-R.js → lodash-CANlWUWW.js} +1 -1
- package/dist/member-import-UzJ6ByIS.js +188 -0
- package/dist/membership-DCVzFaFy.js +274 -0
- package/dist/{money-BZIST_m9.js → money-DuazwoX7.js} +1 -1
- package/dist/{number-DXLR2w95.js → number-B2HFiV0g.js} +1 -1
- package/dist/objectid-Bq-oVMdP.js +145 -0
- package/dist/onboarding-BxvNxz-9.js +131 -0
- package/dist/onboardingSetup-CcvKmyx8.js +17 -0
- package/dist/{plugins-4FlbwoES.js → plugins-C39O5j42.js} +13 -12
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-DUbl79bZ.js → reward-HYt-2nxt.js} +1 -1
- package/dist/{rule-BQUoZ4l_.js → rule-3xNIYM7z.js} +337 -275
- package/dist/style.css +1 -1
- package/dist/{template-BoiSG7G7.js → template-D37Z_b0m.js} +6 -6
- package/dist/timezone-JwnQgpaU.js +20 -0
- package/dist/transaction.fn-C5vswLI_.js +71 -0
- package/dist/{trigger-D5g5m6tT.js → trigger-Bc6s2cvq.js} +17 -17
- package/dist/useMarketingMaterialActions-DMGyAXcy.js +96 -0
- package/dist/{usePagination-DHePBBoR.js → usePagination-DLOOwiiY.js} +1 -1
- package/dist/{user-C_ToSo-g.js → user-CTIGugVF.js} +1 -1
- package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-Dpic36zz.js} +287 -287
- package/dist/{xlsx-h4G1C-xj.js → xlsx-CT9_1SFr.js} +786 -786
- package/dist/{zod-CgigfJar.js → zod-CGVrMcDl.js} +1 -1
- package/package.json +10 -6
- package/dist/Broadcast-C9akM-TB.js +0 -266
- package/dist/Card-DRkIYs0M.js +0 -910
- package/dist/Credit-V5YA_hGx.js +0 -260
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
- package/dist/Experience-WTWy5yY6.js +0 -259
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-BwOfTCW5.js +0 -330
- package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
- package/dist/MainLayout-Du5kZOtA.js +0 -41
- package/dist/Member-DUV_vbPI.js +0 -280
- package/dist/MemberList-Ye4nOk-i.js +0 -1601
- package/dist/Mission-BBmCGpt8.js +0 -334
- package/dist/Point-Bzg6hi6o.js +0 -262
- package/dist/Promotion-BMXIp_ef.js +0 -397
- package/dist/Review-CYNPPxYU.js +0 -1141
- package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
- package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
- package/dist/Setting-jHAjccod.js +0 -2047
- package/dist/Store-Cu-hKmVa.js +0 -1996
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
- package/dist/Transaction-D7DO3dKQ.js +0 -39
- package/dist/Voucher-Cq-n1CaC.js +0 -421
- package/dist/campaign--MjoY1Mn.js +0 -219
- package/dist/campaign-DHBuP4UA.js +0 -277
- package/dist/export-CjB7qxZ9.js +0 -97
- package/dist/index-BIAjmMga.js +0 -85
- package/dist/index-Bv4MBLQ5.js +0 -52
- package/dist/index-hbyCVNa7.js +0 -30289
- package/dist/membership-CfredTm3.js +0 -255
- package/dist/objectid-Dg4ZodlT.js +0 -145
- package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
|
@@ -4,17 +4,18 @@ var Z = (y, u, v) => ue(y, typeof u != "symbol" ? u + "" : u, v);
|
|
|
4
4
|
import { defineComponent as ae, ref as C, computed as D, watch as W, resolveComponent as p, openBlock as w, createBlock as Q, unref as o, isRef as ee, withCtx as Y, createElementVNode as V, createVNode as i, createElementBlock as T, Fragment as L, renderList as ce, createCommentVNode as q, h, onMounted as de } from "vue";
|
|
5
5
|
import { h as E } from "./moment-D7p2TMB-.js";
|
|
6
6
|
import { components as X } from "@feedmepos/ui-library";
|
|
7
|
-
import "./index-
|
|
7
|
+
import "./index-BFIHEBnX.js";
|
|
8
8
|
import { J as me } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
-
import { u as le } from "./loading-
|
|
9
|
+
import { u as le } from "./loading-C686AMVG.js";
|
|
10
10
|
import { u as pe } from "./app-wDQR6dpb.js";
|
|
11
11
|
import { useRoute as ne, useRouter as fe } from "vue-router";
|
|
12
|
-
import { c as re
|
|
12
|
+
import { c as re } from "./index-D5AR7A5e.js";
|
|
13
13
|
import { e as b } from "./index-vh86FiIQ.js";
|
|
14
|
-
import { u as J, w as
|
|
15
|
-
import { u as
|
|
16
|
-
import { c as te } from "./plugins-
|
|
17
|
-
import {
|
|
14
|
+
import { u as J, w as ge } from "./xlsx-CT9_1SFr.js";
|
|
15
|
+
import { u as ve, _ as he } from "./usePagination-DLOOwiiY.js";
|
|
16
|
+
import { c as te } from "./plugins-C39O5j42.js";
|
|
17
|
+
import { u as be } from "./campaign-DlHDgoFX.js";
|
|
18
|
+
import { m as Ce } from "./index-CDIe15AY.js";
|
|
18
19
|
import { o as oe } from "./objectId-dwaoBfJX.js";
|
|
19
20
|
const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, Se = { class: "flex items-center gap-8" }, Ve = /* @__PURE__ */ ae({
|
|
20
21
|
__name: "CreateCollectionSheet",
|
|
@@ -269,7 +270,7 @@ class we {
|
|
|
269
270
|
}
|
|
270
271
|
}
|
|
271
272
|
var Fe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
272
|
-
const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex items-center justify-end py-4 xs:hidden" },
|
|
273
|
+
const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex items-center justify-end py-4 xs:hidden" }, je = /* @__PURE__ */ ae({
|
|
273
274
|
__name: "Collections",
|
|
274
275
|
setup(y) {
|
|
275
276
|
function u(l) {
|
|
@@ -296,7 +297,7 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
|
|
|
296
297
|
successMessage: "Collection link copied to clipboard"
|
|
297
298
|
});
|
|
298
299
|
}
|
|
299
|
-
const A =
|
|
300
|
+
const A = be(), U = D(
|
|
300
301
|
() => A.campaigns.voucher.find(
|
|
301
302
|
(l) => {
|
|
302
303
|
var e;
|
|
@@ -411,7 +412,7 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
|
|
|
411
412
|
}, N = (l) => {
|
|
412
413
|
const e = K[M.name];
|
|
413
414
|
return (c) => e(l, c);
|
|
414
|
-
}, { tableMeta: g, rowData: j, onSort: r, debouncedFetchData: t, onSearch: B } =
|
|
415
|
+
}, { tableMeta: g, rowData: j, onSort: r, debouncedFetchData: t, onSearch: B } = ve(N(F.value));
|
|
415
416
|
async function O() {
|
|
416
417
|
var l;
|
|
417
418
|
await t(), (l = P.value) == null || l.showSheet(!1);
|
|
@@ -452,7 +453,7 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
|
|
|
452
453
|
}
|
|
453
454
|
b.page++;
|
|
454
455
|
}
|
|
455
|
-
await
|
|
456
|
+
await ge(
|
|
456
457
|
l.buildExcel(),
|
|
457
458
|
`vouchers-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
458
459
|
{
|
|
@@ -513,7 +514,7 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
|
|
|
513
514
|
collapsible: ""
|
|
514
515
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
515
516
|
]),
|
|
516
|
-
i(
|
|
517
|
+
i(he, {
|
|
517
518
|
loading: o(g).isLoading,
|
|
518
519
|
"row-data": o(j),
|
|
519
520
|
"column-defs": o(_),
|
|
@@ -536,5 +537,5 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
|
|
|
536
537
|
}
|
|
537
538
|
});
|
|
538
539
|
export {
|
|
539
|
-
|
|
540
|
+
je as default
|
|
540
541
|
};
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { defineComponent as q, ref as I, computed as G, h as C, onMounted as Y, resolveComponent as m, openBlock as d, createElementBlock as h, Fragment as b, createVNode as s, unref as o, createElementVNode as n, withCtx as x, renderList as z, createBlock as k, resolveDynamicComponent as J, toDisplayString as w, createCommentVNode as Q } from "vue";
|
|
2
|
+
import { _ as W } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as X, components as F } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as Z } from "./plugins-C39O5j42.js";
|
|
5
|
+
import { u as ee } from "./loading-C686AMVG.js";
|
|
6
|
+
import { u as te } from "./business-DH7djUl8.js";
|
|
7
|
+
import { u as oe } from "./campaign-DlHDgoFX.js";
|
|
8
|
+
import { a as ae, b as V, c as B } from "./campaign-k_WHxsOR.js";
|
|
9
|
+
import { c as ne, p as re } from "./duplicateCampaign-YTXMbJTj.js";
|
|
10
|
+
import { u as ie } from "./vue-i18n-Dpic36zz.js";
|
|
11
|
+
import { _ as se } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
12
|
+
import { _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js";
|
|
13
|
+
import { u as le } from "./template-D37Z_b0m.js";
|
|
14
|
+
import "./index-Bonq819P.js";
|
|
15
|
+
import { useRouter as me } from "vue-router";
|
|
16
|
+
import { c as f } from "./index-D5AR7A5e.js";
|
|
17
|
+
import { R as de } from "./app-BEYzXWZO.js";
|
|
18
|
+
const pe = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, ge = { class: "flex gap-8 overflow-x-auto" }, fe = { class: "space-y-8" }, ye = { class: "flex w-full gap-4 items-center" }, _e = { class: "space-y-4" }, Ce = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "flex items-center gap-8" }, ve = { key: 0 }, be = { class: "flex flex-col gap-16 text-center" }, xe = { class: "fm-typo-en-title-sm-800" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ q({
|
|
19
|
+
__name: "Credit",
|
|
20
|
+
setup(Fe) {
|
|
21
|
+
const { t: r } = ie(), T = me(), E = {
|
|
22
|
+
label: r("connect.program.common.actions.create", {
|
|
23
|
+
type: r("connect.program.credit.title").toLowerCase()
|
|
24
|
+
}),
|
|
25
|
+
value: "create",
|
|
26
|
+
isPrimary: !0,
|
|
27
|
+
prependIcon: "add"
|
|
28
|
+
}, P = le("CREDIT", X()), A = te(), p = oe(), { global: $, minor: L } = ee, c = I({
|
|
29
|
+
searchKey: "",
|
|
30
|
+
location: []
|
|
31
|
+
});
|
|
32
|
+
function K(e) {
|
|
33
|
+
const t = c.value.location;
|
|
34
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
35
|
+
var i;
|
|
36
|
+
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
|
|
37
|
+
}) : e.targetLocation.includes(t);
|
|
38
|
+
}
|
|
39
|
+
const g = G(
|
|
40
|
+
() => p.campaigns.credit.filter((e) => K(e))
|
|
41
|
+
), N = [
|
|
42
|
+
{
|
|
43
|
+
header: r("connect.program.common.table.title"),
|
|
44
|
+
accessorFn: (e) => e.name
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
header: r("connect.program.common.table.status"),
|
|
48
|
+
accessorFn: (e) => ae(e),
|
|
49
|
+
cell(e) {
|
|
50
|
+
return V(e.row.original);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
header: r("connect.program.common.table.summary"),
|
|
55
|
+
accessorFn: (e) => B(e)
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
header: r("connect.program.common.table.actions"),
|
|
59
|
+
cell(e) {
|
|
60
|
+
return C("div", { class: "flex items-center gap-8 justify-end" }, [
|
|
61
|
+
C(F.FmButton, {
|
|
62
|
+
variant: "tertiary",
|
|
63
|
+
icon: "insights",
|
|
64
|
+
iconColor: "neutral-gray-400",
|
|
65
|
+
onClick: async (t) => {
|
|
66
|
+
t.stopPropagation(), await S(e.row.original);
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
C(F.FmButton, {
|
|
70
|
+
variant: "tertiary",
|
|
71
|
+
icon: "content_copy",
|
|
72
|
+
iconColor: "neutral-gray-400",
|
|
73
|
+
onClick: async (t) => {
|
|
74
|
+
t.stopPropagation(), await D(e.row.original);
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
C(F.FmButton, {
|
|
78
|
+
variant: "tertiary",
|
|
79
|
+
icon: "delete",
|
|
80
|
+
iconColor: "neutral-gray-400",
|
|
81
|
+
onClick: (t) => {
|
|
82
|
+
t.stopPropagation(), R(e.row.original);
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
]);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
], v = I();
|
|
89
|
+
async function R(e) {
|
|
90
|
+
await Z.remove(
|
|
91
|
+
r("connect.program.common.remove.confirm", { name: e.name })
|
|
92
|
+
) && await L(
|
|
93
|
+
async () => {
|
|
94
|
+
await f.delete(e._id), await p.read("CREDIT");
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
message: r("connect.program.common.remove.removing", { name: e.name }),
|
|
98
|
+
successMessage: r("connect.program.common.remove.removed", {
|
|
99
|
+
name: e.name
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
async function y(e) {
|
|
105
|
+
e ? await t() : P.open(async (l) => {
|
|
106
|
+
await t(l);
|
|
107
|
+
});
|
|
108
|
+
async function t(l) {
|
|
109
|
+
var i;
|
|
110
|
+
(i = v.value) == null || i.showSheet(
|
|
111
|
+
!0,
|
|
112
|
+
"CREDIT",
|
|
113
|
+
e ? await f.readById(e._id) : void 0,
|
|
114
|
+
l
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async function S(e) {
|
|
119
|
+
await T.push({
|
|
120
|
+
name: de["$connect-PROGRAM_CREDIT_ANALYTIC"],
|
|
121
|
+
params: { id: e._id }
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
async function D(e) {
|
|
125
|
+
var i;
|
|
126
|
+
if (!await ne(e.name))
|
|
127
|
+
return;
|
|
128
|
+
const t = await f.readById(e._id), l = re(t, {
|
|
129
|
+
keepCollectible: !0
|
|
130
|
+
});
|
|
131
|
+
(i = v.value) == null || i.showSheet(
|
|
132
|
+
!0,
|
|
133
|
+
"CREDIT",
|
|
134
|
+
l,
|
|
135
|
+
t.template
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
async function U(e) {
|
|
139
|
+
await L(
|
|
140
|
+
async () => {
|
|
141
|
+
e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("CREDIT");
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} credit program`,
|
|
145
|
+
successMessage: `Credit program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
return Y(async () => {
|
|
150
|
+
await $(async () => {
|
|
151
|
+
await p.read("CREDIT");
|
|
152
|
+
});
|
|
153
|
+
}), (e, t) => {
|
|
154
|
+
const l = m("FmPageHead"), i = m("FmSearch"), M = m("FmTable"), _ = m("FmButton"), j = m("FmListItem"), O = m("FmList"), H = m("FmCard");
|
|
155
|
+
return d(), h(b, null, [
|
|
156
|
+
s(l, {
|
|
157
|
+
title: o(r)("connect.program.credit.title"),
|
|
158
|
+
actions: o(g).length > 0 ? [E] : [],
|
|
159
|
+
"onClick:action": t[0] || (t[0] = () => y())
|
|
160
|
+
}, null, 8, ["title", "actions"]),
|
|
161
|
+
n("div", pe, [
|
|
162
|
+
s(i, {
|
|
163
|
+
modelValue: o(c).searchKey,
|
|
164
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
|
|
165
|
+
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
166
|
+
placeholder: "search",
|
|
167
|
+
collapsible: ""
|
|
168
|
+
}, null, 8, ["modelValue"]),
|
|
169
|
+
o(p).campaigns.credit && o(p).campaigns.credit.length > 0 ? (d(), h(b, { key: 0 }, [
|
|
170
|
+
n("div", ue, [
|
|
171
|
+
n("div", ge, [
|
|
172
|
+
s(se, {
|
|
173
|
+
label: `${o(r)("connect.common.location")}: `,
|
|
174
|
+
"right-icon": "keyboard_arrow_down",
|
|
175
|
+
modelValue: o(c).location,
|
|
176
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
|
|
177
|
+
icon: "storefront",
|
|
178
|
+
"show-item-label": !0,
|
|
179
|
+
items: o(A).locationOptions
|
|
180
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
181
|
+
]),
|
|
182
|
+
s(i, {
|
|
183
|
+
modelValue: o(c).searchKey,
|
|
184
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
|
|
185
|
+
class: "xs:hidden sm:hidden",
|
|
186
|
+
placeholder: "search",
|
|
187
|
+
collapsible: ""
|
|
188
|
+
}, null, 8, ["modelValue"])
|
|
189
|
+
]),
|
|
190
|
+
s(M, {
|
|
191
|
+
class: "xs:hidden sm:hidden",
|
|
192
|
+
"row-data": o(g),
|
|
193
|
+
"column-defs": N,
|
|
194
|
+
"search-value": o(c).searchKey,
|
|
195
|
+
"column-filter": [],
|
|
196
|
+
onRowClick: t[4] || (t[4] = (a) => y(a.original)),
|
|
197
|
+
"hide-footer": o(g).length < 10
|
|
198
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
199
|
+
s(O, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
200
|
+
default: x(() => [
|
|
201
|
+
(d(!0), h(b, null, z(o(g).filter(
|
|
202
|
+
(a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
|
|
203
|
+
), (a) => (d(), k(j, {
|
|
204
|
+
key: a._id.toString(),
|
|
205
|
+
onClick: (u) => y(a),
|
|
206
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
207
|
+
}, {
|
|
208
|
+
default: x(() => [
|
|
209
|
+
n("div", fe, [
|
|
210
|
+
n("div", ye, [
|
|
211
|
+
(d(), k(J(o(V)(a))))
|
|
212
|
+
]),
|
|
213
|
+
n("div", _e, [
|
|
214
|
+
n("div", Ce, w(a.name), 1),
|
|
215
|
+
n("div", he, w(o(B)(a)), 1)
|
|
216
|
+
])
|
|
217
|
+
]),
|
|
218
|
+
n("div", we, [
|
|
219
|
+
s(_, {
|
|
220
|
+
icon: "insights",
|
|
221
|
+
"icon-color": "neutral-gray-400",
|
|
222
|
+
variant: "tertiary",
|
|
223
|
+
onClick: async (u) => {
|
|
224
|
+
u.stopPropagation(), await S(a);
|
|
225
|
+
}
|
|
226
|
+
}, null, 8, ["onClick"]),
|
|
227
|
+
s(_, {
|
|
228
|
+
icon: "content_copy",
|
|
229
|
+
"icon-color": "neutral-gray-400",
|
|
230
|
+
variant: "tertiary",
|
|
231
|
+
onClick: async (u) => {
|
|
232
|
+
u.stopPropagation(), await D(a);
|
|
233
|
+
}
|
|
234
|
+
}, null, 8, ["onClick"]),
|
|
235
|
+
s(_, {
|
|
236
|
+
icon: "delete",
|
|
237
|
+
"icon-color": "neutral-gray-400",
|
|
238
|
+
variant: "tertiary",
|
|
239
|
+
onClick: (u) => (u.stopPropagation(), R(a))
|
|
240
|
+
}, null, 8, ["onClick"])
|
|
241
|
+
])
|
|
242
|
+
]),
|
|
243
|
+
_: 2
|
|
244
|
+
}, 1032, ["onClick"]))), 128))
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}),
|
|
248
|
+
o(g).length == 0 ? (d(), h("div", ve, [...t[6] || (t[6] = [
|
|
249
|
+
n("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
|
|
250
|
+
])])) : Q("", !0)
|
|
251
|
+
], 64)) : (d(), k(H, {
|
|
252
|
+
key: 1,
|
|
253
|
+
variant: "outlined",
|
|
254
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
255
|
+
}, {
|
|
256
|
+
default: x(() => [
|
|
257
|
+
t[7] || (t[7] = n("img", {
|
|
258
|
+
src: W,
|
|
259
|
+
class: "aspect-square w-[150px]"
|
|
260
|
+
}, null, -1)),
|
|
261
|
+
n("div", be, [
|
|
262
|
+
n("div", xe, w(o(r)("connect.program.credit.empty_state.title")), 1),
|
|
263
|
+
n("div", ke, w(o(r)("connect.program.credit.empty_state.description")), 1)
|
|
264
|
+
]),
|
|
265
|
+
s(_, {
|
|
266
|
+
variant: "primary",
|
|
267
|
+
label: "Create credit program",
|
|
268
|
+
icon: "add",
|
|
269
|
+
onClick: t[5] || (t[5] = (a) => y())
|
|
270
|
+
})
|
|
271
|
+
]),
|
|
272
|
+
_: 1
|
|
273
|
+
})),
|
|
274
|
+
s(ce, {
|
|
275
|
+
ref_key: "sheetRef",
|
|
276
|
+
ref: v,
|
|
277
|
+
"onSubmit:modelValue": U
|
|
278
|
+
}, null, 512)
|
|
279
|
+
])
|
|
280
|
+
], 64);
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
export {
|
|
285
|
+
Oe as default
|
|
286
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent as h, computed as d, resolveComponent as i, openBlock as p, createBlock as D, unref as s, isRef as b, withCtx as R, createVNode as V } from "vue";
|
|
2
|
+
import { h as n } from "./moment-D7p2TMB-.js";
|
|
3
|
+
import { u as k } from "./vue-i18n-Dpic36zz.js";
|
|
4
|
+
const l = "YYYY-MM-DD", w = /* @__PURE__ */ h({
|
|
5
|
+
__name: "DateRangeChip",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {},
|
|
8
|
+
readonly: { type: Boolean }
|
|
9
|
+
},
|
|
10
|
+
emits: ["update:model-value"],
|
|
11
|
+
setup(f, { emit: g }) {
|
|
12
|
+
const { t: r } = k(), t = f, v = g, e = d({
|
|
13
|
+
get: () => ({
|
|
14
|
+
startDate: t.modelValue.startDate ? n(t.modelValue.startDate).format(l) : void 0,
|
|
15
|
+
endDate: t.modelValue.endDate ? n(t.modelValue.endDate).format(l) : void 0
|
|
16
|
+
}),
|
|
17
|
+
set: (a) => v("update:model-value", { ...a })
|
|
18
|
+
}), m = d(() => {
|
|
19
|
+
var a, o;
|
|
20
|
+
return !((a = e.value) != null && a.startDate) && !((o = e.value) != null && o.endDate) ? r("connect.loyalty.dashboard.filters.dateRange.noSelection") : `${u.value.startDate ?? r("connect.loyalty.dashboard.filters.dateRange.start")} - ${u.value.endDate ?? r("connect.loyalty.dashboard.filters.dateRange.end")}`;
|
|
21
|
+
}), u = d(() => ({
|
|
22
|
+
startDate: e.value.startDate ? n(e.value.startDate).format(l) : void 0,
|
|
23
|
+
endDate: e.value.endDate ? n(e.value.endDate).format(l) : void 0
|
|
24
|
+
}));
|
|
25
|
+
return (a, o) => {
|
|
26
|
+
const c = i("FmChip"), y = i("FmDateRangePicker");
|
|
27
|
+
return t.readonly ? (p(), D(c, {
|
|
28
|
+
key: 1,
|
|
29
|
+
label: s(m),
|
|
30
|
+
icon: "calendar_month",
|
|
31
|
+
class: "text-fm-color-neutral-gray-400"
|
|
32
|
+
}, null, 8, ["label"])) : (p(), D(y, {
|
|
33
|
+
key: 0,
|
|
34
|
+
modelValue: s(e),
|
|
35
|
+
"onUpdate:modelValue": o[0] || (o[0] = (_) => b(e) ? e.value = _ : null),
|
|
36
|
+
"show-predefined-range": ""
|
|
37
|
+
}, {
|
|
38
|
+
"trigger-button": R(() => [
|
|
39
|
+
V(c, {
|
|
40
|
+
label: s(m),
|
|
41
|
+
icon: "calendar_month",
|
|
42
|
+
"right-icon": "keyboard_arrow_down",
|
|
43
|
+
class: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
44
|
+
}, null, 8, ["label"])
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["modelValue"]));
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
w as _
|
|
53
|
+
};
|