@feedmepos/mf-connect 0.1.98-beta.3 → 0.1.98-beta.31

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.
Files changed (123) hide show
  1. package/dist/{App-DEtGn29M.js → App-BhjPzSiY.js} +808 -665
  2. package/dist/{AuditLogs-Mrm0iq9P.js → AuditLogs-Ch6LolQM.js} +9 -9
  3. package/dist/{Bin-D9Pu0L6h.js → Bin-DN-id6dz.js} +8 -8
  4. package/dist/{Broadcast-BZDQtN8x.js → Broadcast-DW2DVP1Y.js} +39 -36
  5. package/dist/CampaignAnalytic-DT-nSIGr.js +1666 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bxlbz-JW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-R-VzWmm8.js} +6 -5
  7. package/dist/{Card-BdMSuxr4.js → Card-BS6sPsHL.js} +18 -18
  8. package/dist/{Collections-D2IOFKrJ.js → Collections-BpdLOygl.js} +14 -13
  9. package/dist/Credit-iyO7xUul.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-q8PuaqGc.js} +34 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js → EffectSheet.vue_vue_type_style_index_0_lang-C4RJCmCF.js} +6 -6
  12. package/dist/{Experience-Dm5TDsKH.js → Experience-Cc_lsAuN.js} +112 -86
  13. package/dist/{FileSaver.min-G6JMp965.js → FileSaver.min-DlK0mbcs.js} +1 -1
  14. package/dist/Game-N5oRxhfD.js +356 -0
  15. package/dist/{Grab-BXfBhrCM.js → Grab-C4JOX7S9.js} +32 -31
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js → ImageInput.vue_vue_type_script_setup_true_lang-ttCaGoaA.js} +1 -1
  17. package/dist/{Index-DfPPobH8.js → Index-BTPfwIiL.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js → LocationPicker.vue_vue_type_script_setup_true_lang-CsOOd9Vz.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Csse-q2U.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CECNBs_-.js} +1 -1
  20. package/dist/LoyaltyDashboard-qZRDd1VL.js +1345 -0
  21. package/dist/{MainLayout-DxAYEJg1.js → MainLayout-yONDAqXN.js} +1 -1
  22. package/dist/{Marketing-CPQQG8Y9.js → Marketing-CtxinaIp.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-ssilnzNw.js → MarketingMaterialEdit-BbYHbOjZ.js} +6 -6
  24. package/dist/{Member-DmoUk3Dx.js → Member-BswZb-b-.js} +11 -11
  25. package/dist/{MemberList-Cm2BWPrW.js → MemberList-DclEAn1h.js} +36 -35
  26. package/dist/{MemberTransactions-Cxr87RMl.js → MemberTransactions-B4sc1Ahe.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js → MessageInput.vue_vue_type_script_setup_true_lang-en_MLf2q.js} +5434 -5279
  28. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  29. package/dist/Mission-B2_SB07l.js +360 -0
  30. package/dist/Overview-BETAx6sC.js +1104 -0
  31. package/dist/{Overview-CfigslHq.js → Overview-DJ8DB7p1.js} +18 -18
  32. package/dist/Point-I5sYY0AV.js +288 -0
  33. package/dist/Promotion-BZiOiGCt.js +423 -0
  34. package/dist/{Queue-B7kxDPZV.js → Queue-BirX_EC7.js} +12 -12
  35. package/dist/{Record-BGULqygn.js → Record-C0K6Ns45.js} +9 -9
  36. package/dist/Review-BoISkcF5.js +45 -0
  37. package/dist/ReviewFacebookCallback-DI_v42cz.js +238 -0
  38. package/dist/ReviewGoogleCallback-bWRrVgif.js +213 -0
  39. package/dist/{Reward-C0w5c1Th.js → Reward-Cq52vwUr.js} +16 -16
  40. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CspVlyRZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-BW_TCNUF.js} +11 -11
  41. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js → RuleGroup.vue_vue_type_script_setup_true_lang-BB42pC95.js} +16 -15
  42. package/dist/{Segment-I_p06AoA.js → Segment-BmOC4d7i.js} +39 -37
  43. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js → SelectItems.vue_vue_type_script_setup_true_lang-QClugajp.js} +2 -2
  44. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUwwzTTV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaQdSfIF.js} +12 -12
  45. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2Nv32U5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-W7APn7Cu.js} +4 -4
  46. package/dist/{Setting-DOMSAMUz.js → Setting-Dgt0LCbv.js} +40 -40
  47. package/dist/{SettingAdvertisements-IeGC6PHz.js → SettingAdvertisements-DAUdwr1p.js} +12 -12
  48. package/dist/Settings-gGFgpQbO.js +179 -0
  49. package/dist/{Store-DLzj0qGi.js → Store-IaZXjlU_.js} +21 -21
  50. package/dist/{StoreRewards-BPhAkGNl.js → StoreRewards-DnNuYefP.js} +15 -15
  51. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DpcaOgdN.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DTLHTyc_.js} +190 -187
  52. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-euqTCLNl.js} +2 -2
  53. package/dist/{Tier-7MveQA4f.js → Tier-DUZjJBxp.js} +36 -34
  54. package/dist/{Title-kyAzLGqm.js → Title-CoElyNyo.js} +39 -37
  55. package/dist/{Transaction-Chl3d3Ai.js → Transaction-eywJjImp.js} +2 -2
  56. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DJ5_Kqpv.js} +6 -6
  57. package/dist/{Voucher-CxIPPul5.js → Voucher-CAiuvTfM.js} +156 -133
  58. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BDnbUGdG.js} +12 -12
  59. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CiOmadge.js → ZodTextField.vue_vue_type_script_setup_true_lang-D5rXidZV.js} +2 -2
  60. package/dist/{app-5YllsPJi.js → app-DhDmESYL.js} +3356 -2864
  61. package/dist/app.js +1 -1
  62. package/dist/{business-C0zArPJj.js → business-GzfuJslR.js} +1 -1
  63. package/dist/campaign-D5fwJP6R.js +100 -0
  64. package/dist/{campaign-BHl5a5Z1.js → campaign-DFT642vU.js} +74 -96
  65. package/dist/{campaign.enum-CHWTkc9k.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  66. package/dist/{campaign.fn-BtwnAETQ.js → campaign.fn-DkdIAZ7i.js} +115 -115
  67. package/dist/{collectible.enum-BvoISTK3.js → collectible.enum-Liy2wH3s.js} +1 -1
  68. package/dist/collection.fn-OGlCjGmW.js +26 -0
  69. package/dist/{duplicateCampaign-C27ikU2f.js → duplicateCampaign-iTVcbRn-.js} +2 -2
  70. package/dist/{effect-CARgKjhU.js → effect-CGAWPcrm.js} +1 -1
  71. package/dist/{email-addresses-CnTsfZHe.js → email-addresses-BE2S4Dj8.js} +2 -2
  72. package/dist/{export-CO8-3Ob9.js → export-D_fy-zua.js} +3 -3
  73. package/dist/google-C3S8u0mT.js +4 -0
  74. package/dist/{helper-C617AZcV.js → helper-C3C4SOin.js} +1 -1
  75. package/dist/{index-B0BE7PIS.js → index-BAApyOCS.js} +1 -1
  76. package/dist/{index-gPrU9b68.js → index-Be5nXR7v.js} +8027 -10766
  77. package/dist/{index-hKv7PcTR.js → index-Bh9_cs1A.js} +1 -1
  78. package/dist/{index-wL9aIsub.js → index-Bt33uSj8.js} +587 -578
  79. package/dist/{index-CtXx42Yb.js → index-C0miKj5V.js} +1 -1
  80. package/dist/index-C8cXXcLk.js +45 -0
  81. package/dist/{index-9AxeGyVh.js → index-CKAtCHMa.js} +272 -369
  82. package/dist/{index-DMvP3cOz.js → index-CWIwKELy.js} +184 -210
  83. package/dist/{index-DNf6qgpV.js → index-CXmuQ0jf.js} +2 -2
  84. package/dist/index-C_H8jFYf.js +2743 -0
  85. package/dist/{index-CFO8nwbC.js → index-CdH2ReVb.js} +8 -7
  86. package/dist/{index-Da8trM3D.js → index-CdZ_RusD.js} +1 -1
  87. package/dist/{index-CEJgFylS.js → index-CgRL0HwK.js} +26 -17
  88. package/dist/index-CsGEC4Aw.js +146 -0
  89. package/dist/{index-CMfyVF2h.js → index-D-btpqVA.js} +105 -123
  90. package/dist/{index-B2ZvboNZ.js → index-DTZ7EAcZ.js} +1 -1
  91. package/dist/{index-DIcwj1r2.js → index-QHOmMZSD.js} +1 -1
  92. package/dist/{index.esm2017-BFgbXDc8.js → index.esm2017-G5LoANQX.js} +105 -105
  93. package/dist/{loading-BxpiUNaf.js → loading-BPNkTxXT.js} +1 -1
  94. package/dist/{lodash-rPOvq9te.js → lodash-9ta4Nkqt.js} +1 -1
  95. package/dist/{membership-lfX5TNVQ.js → membership-BYkSHLOw.js} +3 -3
  96. package/dist/{money-CuUoYzPn.js → money-3C0zWUC8.js} +1 -1
  97. package/dist/{number-DMk8hvKt.js → number-d4dGkDp-.js} +1 -1
  98. package/dist/objectid-DnLDUQct.js +145 -0
  99. package/dist/{plugins-CyYjHO_X.js → plugins-DpkzBj4v.js} +3 -3
  100. package/dist/{reward-BxwaSc-X.js → reward-X01fpNlm.js} +1 -1
  101. package/dist/{rule-76SluGaP.js → rule-TAnVjqJf.js} +3 -3
  102. package/dist/rule-builder-BcmfLik_.js +126 -0
  103. package/dist/{template-ByceGw-A.js → template-Dw2oNW4d.js} +6 -6
  104. package/dist/timezone-Df1SYjKC.js +20 -0
  105. package/dist/{trigger-CxM5x3Sj.js → trigger-BPnDSdB4.js} +5 -5
  106. package/dist/{useMarketingMaterialActions-CHXVZ61f.js → useMarketingMaterialActions-CeoTwfgs.js} +3 -3
  107. package/dist/{usePagination-BKfoMHBB.js → usePagination-nnXuyQTt.js} +1 -1
  108. package/dist/{user-Cqjv0IpD.js → user-C0_0nUJU.js} +1 -1
  109. package/dist/{vue-i18n-Q-nKu_E3.js → vue-i18n-LQy4nXEW.js} +246 -246
  110. package/dist/{xlsx-D1LobU8O.js → xlsx-DZTNL-Ht.js} +1 -1
  111. package/dist/{zod-B5vUvKbD.js → zod-D-SNQ7Pu.js} +1 -1
  112. package/package.json +3 -3
  113. package/dist/Credit-BWyLeJpj.js +0 -260
  114. package/dist/Game-BB81nS7Y.js +0 -330
  115. package/dist/LoyaltyDashboard-BWC3rDDk.js +0 -1082
  116. package/dist/Mission-ChWPNxbI.js +0 -334
  117. package/dist/Point-Ko81Ny1q.js +0 -262
  118. package/dist/Promotion-CfyscRNN.js +0 -397
  119. package/dist/Review-C7Nx6a5t.js +0 -959
  120. package/dist/ReviewFacebookCallback-DKmL0TYZ.js +0 -243
  121. package/dist/ReviewGoogleCallback-C6iFFEfS.js +0 -208
  122. package/dist/campaign-C_49MeEc.js +0 -219
  123. package/dist/objectid-VPzb0Etb.js +0 -145
@@ -1,10 +1,11 @@
1
- import { R as RuleOperator, _ } from "./index-wL9aIsub.js";
2
- import { i as isRuleGroup } from "./index-9AxeGyVh.js";
1
+ import { R as RuleOperator, _ } from "./index-Bt33uSj8.js";
2
+ import { i as isRuleGroup } from "./rule-builder-BcmfLik_.js";
3
3
  import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
4
4
  import { useDialog } from "@feedmepos/ui-library";
5
- import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-DMvP3cOz.js";
6
- import "./index-gPrU9b68.js";
7
- import "./index-CFO8nwbC.js";
5
+ import "./index-CKAtCHMa.js";
6
+ import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-CWIwKELy.js";
7
+ import "./index-Be5nXR7v.js";
8
+ import "./index-CdH2ReVb.js";
8
9
  function validateRule(data, r, date) {
9
10
  const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
10
11
  function meetConditions(e) {
@@ -2,27 +2,27 @@ import { defineComponent as Z, ref as y, computed as E, watch as ne, onMounted a
2
2
  import { _ as ve } from "./campaign-CpzFl8Vr.js";
3
3
  import { h as oe } from "./moment-D7p2TMB-.js";
4
4
  import { useDialog as ye, components as se } from "@feedmepos/ui-library";
5
- import "./index-gPrU9b68.js";
6
- import { u as J } from "./loading-BxpiUNaf.js";
5
+ import "./index-Be5nXR7v.js";
6
+ import { u as J } from "./loading-BPNkTxXT.js";
7
7
  import { u as ce } from "./app-wDQR6dpb.js";
8
- import { u as W } from "./membership-lfX5TNVQ.js";
8
+ import { u as W } from "./membership-BYkSHLOw.js";
9
9
  import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
10
- import { p as pe, f as ie, n as xe } from "./plugins-CyYjHO_X.js";
11
- import { m as L } from "./index-DIcwj1r2.js";
12
- import { z as re } from "./app-5YllsPJi.js";
13
- import { Z as de } from "./zod-B5vUvKbD.js";
14
- import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js";
15
- import "./index-9AxeGyVh.js";
16
- import { l as Ce } from "./index-DMvP3cOz.js";
17
- import "./index-wL9aIsub.js";
18
- import "./index-CFO8nwbC.js";
19
- import { O as Se } from "./objectid-VPzb0Etb.js";
10
+ import { p as pe, f as ie, n as xe } from "./plugins-DpkzBj4v.js";
11
+ import { m as L } from "./index-QHOmMZSD.js";
12
+ import { z as re } from "./app-DhDmESYL.js";
13
+ import { Z as de } from "./zod-D-SNQ7Pu.js";
14
+ import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-ttCaGoaA.js";
15
+ import "./index-CKAtCHMa.js";
16
+ import { l as Ce } from "./index-CWIwKELy.js";
17
+ import "./index-Bt33uSj8.js";
18
+ import "./index-CdH2ReVb.js";
19
+ import { O as Se } from "./objectid-DnLDUQct.js";
20
20
  import { a as he, c as _e } from "./object-BYyQ0PZp.js";
21
- import { u as we } from "./business-C0zArPJj.js";
22
- import { w as ke } from "./xlsx-D1LobU8O.js";
23
- import { a as Fe, C as Ve } from "./export-CO8-3Ob9.js";
24
- import { u as $e, _ as Me } from "./usePagination-BKfoMHBB.js";
25
- import { u as Be } from "./vue-i18n-Q-nKu_E3.js";
21
+ import { u as we } from "./business-GzfuJslR.js";
22
+ import { w as ke } from "./xlsx-DZTNL-Ht.js";
23
+ import { a as Fe, C as Ve } from "./export-D_fy-zua.js";
24
+ import { u as $e, _ as Me } from "./usePagination-nnXuyQTt.js";
25
+ import { u as Be } from "./vue-i18n-LQy4nXEW.js";
26
26
  import { o as Ue } from "./objectId-dwaoBfJX.js";
27
27
  const Ae = { class: "space-y-16" }, De = { class: "gap-16 grid grid-cols-2" }, Ie = { class: "space-y-16" }, Ne = {
28
28
  key: 0,
@@ -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-gPrU9b68.js";
7
+ import "./index-Be5nXR7v.js";
8
8
  import { J as me } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as le } from "./loading-BxpiUNaf.js";
9
+ import { u as le } from "./loading-BPNkTxXT.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, u as ge } from "./campaign-C_49MeEc.js";
12
+ import { c as re } from "./index-CsGEC4Aw.js";
13
13
  import { e as b } from "./index-vh86FiIQ.js";
14
- import { u as J, w as ve } from "./xlsx-D1LobU8O.js";
15
- import { u as he, _ as be } from "./usePagination-BKfoMHBB.js";
16
- import { c as te } from "./plugins-CyYjHO_X.js";
17
- import { m as Ce } from "./index-DIcwj1r2.js";
14
+ import { u as J, w as ge } from "./xlsx-DZTNL-Ht.js";
15
+ import { u as ve, _ as he } from "./usePagination-nnXuyQTt.js";
16
+ import { c as te } from "./plugins-DpkzBj4v.js";
17
+ import { u as be } from "./campaign-D5fwJP6R.js";
18
+ import { m as Ce } from "./index-QHOmMZSD.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" }, Ke = /* @__PURE__ */ ae({
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 = ge(), U = D(
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 } = he(N(F.value));
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 ve(
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(be, {
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
- Ke as default
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-DpkzBj4v.js";
5
+ import { u as ee } from "./loading-BPNkTxXT.js";
6
+ import { u as te } from "./business-GzfuJslR.js";
7
+ import { u as oe } from "./campaign-D5fwJP6R.js";
8
+ import { a as ae, b as V, c as B } from "./campaign-DFT642vU.js";
9
+ import { c as ne, p as re } from "./duplicateCampaign-iTVcbRn-.js";
10
+ import { u as ie } from "./vue-i18n-LQy4nXEW.js";
11
+ import { _ as se } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
+ import { _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-q8PuaqGc.js";
13
+ import { u as le } from "./template-Dw2oNW4d.js";
14
+ import "./index-C0miKj5V.js";
15
+ import { useRouter as me } from "vue-router";
16
+ import { c as f } from "./index-CsGEC4Aw.js";
17
+ import { R as de } from "./app-DhDmESYL.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
+ };
@@ -1,40 +1,44 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, createCommentVNode, computed, onMounted, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, unref, isRef, createTextVNode, normalizeClass, resolveDynamicComponent, toRefs, normalizeStyle, createSlots } from "vue";
2
- import { _ } from "./lodash-rPOvq9te.js";
3
- import { F as Fh, z as z$1 } from "./app-5YllsPJi.js";
4
- import { Z as ZodHelper } from "./zod-B5vUvKbD.js";
5
- import { F as FdoObjectId, z } from "./index-gPrU9b68.js";
6
- import { t as FdoGroup, a as F_RUNNABLE_CAMPAIGN_TYPE, u as FdtoRunnableCampaign, v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-DMvP3cOz.js";
7
- import { F as FdtoCollectibleConfig } from "./index-wL9aIsub.js";
8
- import { i as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, a as isRuleEntry, T as TEMPLATES } from "./index-9AxeGyVh.js";
9
- import { u as useMembershipStore } from "./membership-lfX5TNVQ.js";
10
- import { u as useBusinessStore } from "./business-C0zArPJj.js";
2
+ import { _ } from "./lodash-9ta4Nkqt.js";
3
+ import { F as Fh, z as z$1 } from "./app-DhDmESYL.js";
4
+ import { Z as ZodHelper } from "./zod-D-SNQ7Pu.js";
5
+ import { z } from "./index-C_H8jFYf.js";
6
+ import { t as FdoGroup, a as F_RUNNABLE_CAMPAIGN_TYPE, u as FdtoRunnableCampaign, v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-CWIwKELy.js";
7
+ import { F as FdoObjectId } from "./index-Be5nXR7v.js";
8
+ import { F as FdtoCollectibleConfig } from "./index-Bt33uSj8.js";
9
+ import { i as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, a as isRuleEntry } from "./rule-builder-BcmfLik_.js";
10
+ import { u as useMembershipStore } from "./membership-BYkSHLOw.js";
11
+ import { u as useBusinessStore } from "./business-GzfuJslR.js";
11
12
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
12
13
  import { h as hooks } from "./moment-D7p2TMB-.js";
13
- import { f as featureVersionMapping } from "./campaign.enum-CHWTkc9k.js";
14
- import { _ as _sfc_main$u } from "./ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js";
15
- import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js";
16
- import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js";
17
- import { c as core, S as SvcConfig } from "./index-DNf6qgpV.js";
18
- import { p as prompt, f as firebaseStorage } from "./plugins-CyYjHO_X.js";
19
- import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js";
14
+ import { f as featureVersionMapping } from "./campaign.enum-Dx-Zo68Q.js";
15
+ import { _ as _sfc_main$u } from "./ImageInput.vue_vue_type_script_setup_true_lang-ttCaGoaA.js";
16
+ import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-C4RJCmCF.js";
17
+ import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-euqTCLNl.js";
18
+ import { c as core, S as SvcConfig } from "./index-CXmuQ0jf.js";
19
+ import { p as prompt, f as firebaseStorage } from "./plugins-DpkzBj4v.js";
20
+ import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-QClugajp.js";
20
21
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
- import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js";
22
- import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js";
23
- import { u as useI18n } from "./vue-i18n-Q-nKu_E3.js";
24
- import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-CxM5x3Sj.js";
25
- import { _ as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js";
26
- import { C as CountryTimezone, m as moment } from "./index-CMfyVF2h.js";
27
- import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-76SluGaP.js";
22
+ import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-DJ5_Kqpv.js";
23
+ import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BB42pC95.js";
24
+ import { u as useI18n } from "./vue-i18n-LQy4nXEW.js";
25
+ import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-BPnDSdB4.js";
26
+ import { a as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-en_MLf2q.js";
27
+ import { m as moment } from "./index-D-btpqVA.js";
28
+ import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-TAnVjqJf.js";
28
29
  import { useCoreStore } from "@feedmepos/mf-common";
29
- import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js";
30
- import "./index-CFO8nwbC.js";
31
- import { a as F_GAME_TYPE } from "./collectible.enum-BvoISTK3.js";
32
- import { u as useLoading } from "./loading-BxpiUNaf.js";
33
- import { i as initCollectibleConfig } from "./helper-C617AZcV.js";
34
- import { d as CollectionUtils, e as getCampaignSummaryObject } from "./campaign-BHl5a5Z1.js";
30
+ import { C as CountryTimezone } from "./timezone-Df1SYjKC.js";
31
+ import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BDnbUGdG.js";
32
+ import { T as TEMPLATES } from "./index-CKAtCHMa.js";
33
+ import "./index-CdH2ReVb.js";
34
+ import { a as F_GAME_TYPE } from "./collectible.enum-Liy2wH3s.js";
35
+ import { u as useLoading } from "./loading-BPNkTxXT.js";
36
+ import { i as initCollectibleConfig } from "./helper-C3C4SOin.js";
37
+ import { C as CollectionUtils } from "./collection.fn-OGlCjGmW.js";
35
38
  import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
39
+ import { d as getCampaignSummaryObject } from "./campaign-DFT642vU.js";
36
40
  import { useDialog } from "@feedmepos/ui-library";
37
- import { u as useCampaignStore } from "./campaign-C_49MeEc.js";
41
+ import { u as useCampaignStore } from "./campaign-D5fwJP6R.js";
38
42
  import { a as cleanPF } from "./object-BYyQ0PZp.js";
39
43
  function campaignRefinement(e, s) {
40
44
  var d, i;
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as B, ref as O, onMounted as Q, computed as G, resolveComponent as x, openBlock as d, createElementBlock as b, renderSlot as W, toDisplayString as V, createCommentVNode as f, createBlock as u, unref as e, isRef as q, createVNode as h, normalizeClass as Z, watch as X, withCtx as w, resolveDynamicComponent as P, Fragment as _, createElementVNode as k, createTextVNode as ee } from "vue";
2
- import { z as te, l as le } from "./app-5YllsPJi.js";
3
- import { Z as r } from "./zod-B5vUvKbD.js";
4
- import { g as oe, f as ae } from "./index-wL9aIsub.js";
5
- import { u as I } from "./vue-i18n-Q-nKu_E3.js";
6
- import { s as S } from "./effect-CARgKjhU.js";
7
- import { p as ne } from "./plugins-CyYjHO_X.js";
2
+ import { z as te, l as le } from "./app-DhDmESYL.js";
3
+ import { Z as r } from "./zod-D-SNQ7Pu.js";
4
+ import { g as oe, f as ae } from "./index-Bt33uSj8.js";
5
+ import { u as I } from "./vue-i18n-LQy4nXEW.js";
6
+ import { s as S } from "./effect-CGAWPcrm.js";
7
+ import { p as ne } from "./plugins-DpkzBj4v.js";
8
8
  const ie = { class: "flex flex-col gap-8" }, de = {
9
9
  key: 0,
10
10
  class: "fm-typo-en-body-lg-600"