@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.71

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 (152) hide show
  1. package/dist/{App-BonFFUVJ.js → App-B-Onur9k.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-BnEeKG1C.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-BH9_nATR.js} +8 -8
  4. package/dist/Broadcast-Gt2ZLLpZ.js +302 -0
  5. package/dist/CampaignAnalytic-BT6zTgNk.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -5
  7. package/dist/Card-dD52oor7.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-7bwYNl3M.js} +14 -13
  9. package/dist/Credit-qZdlqXqR.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js +4213 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-CAaWgWXP.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-BpfY6VnX.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-fhrbFb_5.js +356 -0
  17. package/dist/GiftCardSetup-CTwmNKim.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-BnPfb92x.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-DRwvmm_j.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
  23. package/dist/LoyaltyDashboard-8jn6SIWo.js +2865 -0
  24. package/dist/MainLayout-Bf42AcB1.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-DruTMjiR.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-moEHd_gP.js} +15 -14
  27. package/dist/Member-C9VTQqIm.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js +1279 -0
  29. package/dist/MemberImportHistory-DZVwya9v.js +187 -0
  30. package/dist/MemberList-KusIfy1u.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-msyjdzlI.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js +40 -0
  34. package/dist/Mission-CUUxpBUF.js +360 -0
  35. package/dist/{Overview-nsyJGSCq.js → Overview-C9jyKXHX.js} +21 -20
  36. package/dist/Overview-CYKoF8Hp.js +1316 -0
  37. package/dist/Point-CPpQ07yp.js +288 -0
  38. package/dist/Promotion-CJ95m9Qb.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CX39ILh_.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-6I0qyXB5.js} +9 -9
  41. package/dist/Review-DoWu2XNT.js +45 -0
  42. package/dist/ReviewFacebookCallback-Co-5TnI7.js +238 -0
  43. package/dist/ReviewGoogleCallback-Ca7ZuMcF.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-Cx_N6qBJ.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-Bx0EW966.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-DzEK3dWj.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-BNALbI88.js} +12 -12
  52. package/dist/Settings-Cw85-xzq.js +230 -0
  53. package/dist/Store-BSqW1gwf.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-CJXnS8Qf.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-DfitNxp2.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-QCbtOvKB.js} +39 -37
  59. package/dist/Transaction-dOCzlidD.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-BfoCDwjg.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-BxTElIm-.js} +45168 -37577
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BmUK8hMh.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-DjAiT8tR.js} +5 -5
  68. package/dist/campaign-DlR3KF9m.js +368 -0
  69. package/dist/campaign-tAmQNoq7.js +100 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BjwEQd11.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn-C6kWWIQx.js} +53 -53
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-BrtXpT9S.js} +1 -1
  73. package/dist/collection.fn-CDhfM3Eq.js +26 -0
  74. package/dist/currency-10nX5QnT.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-6oMZOvfM.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-T4YzuTc5.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-BjODnJMM.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BCl5r5yZ.js} +1 -1
  80. package/dist/{index-DgzNGQgE.js → index-B9ZMIUMa.js} +2083 -2559
  81. package/dist/{index-CB7ytKOE.js → index-BBsK7TUw.js} +1588 -1522
  82. package/dist/index-BQk6zTgf.js +32437 -0
  83. package/dist/index-Bd4clHfr.js +901 -0
  84. package/dist/index-BeVWchv7.js +14550 -0
  85. package/dist/index-Bht1Z11w.js +72 -0
  86. package/dist/{index-FD50UHqf.js → index-BiolIgqR.js} +105 -123
  87. package/dist/{index-Cl8t41Sk.js → index-BxU--5J5.js} +5 -5
  88. package/dist/index-Bz6oSli7.js +151 -0
  89. package/dist/index-C5IfNJUl.js +53 -0
  90. package/dist/{index-BWsj6lCJ.js → index-CRvUvCMA.js} +14 -14
  91. package/dist/{index-B6xi1soU.js → index-CnaQt4Pn.js} +1 -1
  92. package/dist/{index-4EtrCy_K.js → index-Ctja--IE.js} +4 -4
  93. package/dist/{index-D6qeYVNz.js → index-D8rGhchh.js} +1 -1
  94. package/dist/{index-BrboOmPq.js → index-DJdTDF9C.js} +347 -216
  95. package/dist/index-DXiJa8Cw.js +137 -0
  96. package/dist/{index-CxdLExX0.js → index-DeQKLilv.js} +24 -9
  97. package/dist/{index-vI-ndGu_.js → index-DhtKt4OL.js} +5 -5
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-CEOegJjn.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-Dx4SCvZY.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-Dq8OKCKK.js} +1 -1
  101. package/dist/member-import-DX-jn2uk.js +187 -0
  102. package/dist/membership-CltAa-gH.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-DsaAjJTI.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-DmhHKYgY.js} +1 -1
  105. package/dist/objectid-BdNv-dZX.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-BFKVM3uC.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward--SjvIeyy.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-CAKdNobZ.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-Cfxc5eM8.js} +6 -6
  112. package/dist/timezone-D2b-V5XD.js +20 -0
  113. package/dist/transaction.fn-B5mLY7bz.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-DvYcjRBZ.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DtqnjMSt.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DKX24g31.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-fWb1NxGO.js} +1 -1
  118. package/dist/vue-i18n-wJReAVJw.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Mthhu4JR.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-CVpVUgBZ.js} +1 -1
  121. package/package.json +10 -6
  122. package/dist/Broadcast-Cy-i-WOT.js +0 -266
  123. package/dist/Card-f2XOtWxp.js +0 -910
  124. package/dist/Credit-CcZF4aQS.js +0 -260
  125. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-CUW7NeVG.js +0 -330
  129. package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
  130. package/dist/MainLayout-R5NxIBR-.js +0 -41
  131. package/dist/Member-CC5F6Bmz.js +0 -280
  132. package/dist/MemberList-Cq4zxopX.js +0 -1601
  133. package/dist/Mission-DcCZ6tAG.js +0 -334
  134. package/dist/Point-D1vLd5hL.js +0 -262
  135. package/dist/Promotion-Cv7MW5RJ.js +0 -397
  136. package/dist/Review-CKhakUMe.js +0 -1123
  137. package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
  138. package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
  140. package/dist/Store-uTRQ6KbC.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
  142. package/dist/Transaction-CnTEfMGU.js +0 -39
  143. package/dist/campaign-CbMlARNI.js +0 -219
  144. package/dist/campaign-f7FT91GR.js +0 -277
  145. package/dist/export-DQR-0lmK.js +0 -97
  146. package/dist/index-COrXX9MR.js +0 -52
  147. package/dist/index-CWiaP-aV.js +0 -28900
  148. package/dist/index-jVfDVEtz.js +0 -85
  149. package/dist/membership-rifuatxU.js +0 -255
  150. package/dist/objectid-DjpWkCxH.js +0 -145
  151. package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
  152. package/dist/vue-i18n-CgMK-TaC.js +0 -2365
@@ -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-Cl8t41Sk.js";
7
+ import "./index-BxU--5J5.js";
8
8
  import { J as me } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as le } from "./loading-DTKDhqew.js";
9
+ import { u as le } from "./loading-Dx4SCvZY.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-CbMlARNI.js";
12
+ import { c as re } from "./index-Bz6oSli7.js";
13
13
  import { e as b } from "./index-vh86FiIQ.js";
14
- import { u as J, w as ve } from "./xlsx-_tQC9Ezf.js";
15
- import { u as he, _ as be } from "./usePagination-BPcPhEnp.js";
16
- import { c as te } from "./plugins-D25PaNJk.js";
17
- import { m as Ce } from "./index-CxdLExX0.js";
14
+ import { u as J, w as ge } from "./xlsx-Mthhu4JR.js";
15
+ import { u as ve, _ as he } from "./usePagination-DKX24g31.js";
16
+ import { c as te } from "./plugins-BFKVM3uC.js";
17
+ import { u as be } from "./campaign-tAmQNoq7.js";
18
+ import { m as Ce } from "./index-DeQKLilv.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-BFKVM3uC.js";
5
+ import { u as ee } from "./loading-Dx4SCvZY.js";
6
+ import { u as te } from "./business-DjAiT8tR.js";
7
+ import { u as oe } from "./campaign-tAmQNoq7.js";
8
+ import { a as ae, b as V, c as B } from "./campaign-DlR3KF9m.js";
9
+ import { c as ne, p as re } from "./duplicateCampaign-6oMZOvfM.js";
10
+ import { u as ie } from "./vue-i18n-wJReAVJw.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-C09W9Qja.js";
13
+ import { u as le } from "./template-Cfxc5eM8.js";
14
+ import "./index-D8rGhchh.js";
15
+ import { useRouter as me } from "vue-router";
16
+ import { c as f } from "./index-Bz6oSli7.js";
17
+ import { R as de } from "./app-BxTElIm-.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-wJReAVJw.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
+ };