@feedmepos/mf-connect 0.1.98-beta.6 → 0.1.98-beta.60

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 (147) hide show
  1. package/dist/{App-CvJ0ASlp.js → App-BUwQLdzG.js} +812 -666
  2. package/dist/{AuditLogs-Bt9S2LKL.js → AuditLogs-laNQB1ef.js} +14 -13
  3. package/dist/{Bin-ZSCDSioa.js → Bin-Bfboeea_.js} +8 -8
  4. package/dist/{Broadcast-BT0R11RB.js → Broadcast-CDz-_eDz.js} +40 -37
  5. package/dist/CampaignAnalytic-BiA-5XG3.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-LweQ57aG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VrTN-c_a.js} +6 -5
  7. package/dist/Card-CKHaW8N7.js +1084 -0
  8. package/dist/{Collections-H7zhe9zN.js → Collections-DRocQb1D.js} +14 -13
  9. package/dist/Credit-DWaoVhSP.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-B7ZdULCu.js +53 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-B2sZFWUF.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-3ERieT1j.js} +54 -52
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-qNmiKaJc.js → EffectSheet.vue_vue_type_style_index_0_lang-yDUjXV2O.js} +35 -35
  13. package/dist/{Experience-CH5tg-tm.js → Experience-C1_LpneJ.js} +112 -86
  14. package/dist/{FileSaver.min-DNFqiyZb.js → FileSaver.min-CWJ-6CFP.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-DtTYcSZk.js +356 -0
  17. package/dist/GiftCardSetup-B770Rl1Q.js +662 -0
  18. package/dist/{Grab-3s_sLewD.js → Grab-CN0gmIxT.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-fbmoN1e9.js → ImageInput.vue_vue_type_script_setup_true_lang-BaAhKWhX.js} +1 -1
  20. package/dist/{Index-zTWZCiEo.js → Index-0F6aq3f9.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BOxYPkf5.js → LocationPicker.vue_vue_type_script_setup_true_lang-BrKj8W2H.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-wjJ_cwft.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DOuHSVdR.js} +1 -1
  23. package/dist/LoyaltyDashboard-CtXyDFqa.js +2865 -0
  24. package/dist/MainLayout-BSWLr3gE.js +143 -0
  25. package/dist/{Marketing-Bto1OvK1.js → Marketing-Ci2haxRd.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-D7rIqF5U.js → MarketingMaterialEdit-Cw6R0bNM.js} +15 -14
  27. package/dist/Member-DEzSTAQy.js +649 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-BrhSxbrI.js +1287 -0
  29. package/dist/MemberImportHistory-BGfNLzma.js +187 -0
  30. package/dist/MemberList-Cq5Gsv3G.js +336 -0
  31. package/dist/{MemberTransactions-CjTtGB2y.js → MemberTransactions-BrUVZRtt.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DvKL7BL5.js → MessageInput.vue_vue_type_script_setup_true_lang-DCQ6Fse-.js} +5434 -5279
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CETwYfZD.js +40 -0
  34. package/dist/Mission-Do4IonLo.js +360 -0
  35. package/dist/{Overview-mxGLyFvE.js → Overview-DA90l9Kb.js} +21 -20
  36. package/dist/Overview-DN-nJxw9.js +1316 -0
  37. package/dist/Point-DQ4w857n.js +288 -0
  38. package/dist/Promotion-Rgt9LcYi.js +423 -0
  39. package/dist/{Queue-DgaFyyyH.js → Queue-SzypUxgD.js} +14 -13
  40. package/dist/{Record-BRol__6_.js → Record-DYvPPhIW.js} +9 -9
  41. package/dist/Review-B0TERyHM.js +45 -0
  42. package/dist/ReviewFacebookCallback-BJ5jQ3Dv.js +238 -0
  43. package/dist/ReviewGoogleCallback-BKQD39dv.js +213 -0
  44. package/dist/{Reward-DQI0PvmR.js → Reward-BexlVT_C.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B6bvQNsU.js → RewardGroup.vue_vue_type_script_setup_true_lang-C-ygqNur.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DgAU7jGo.js → RuleGroup.vue_vue_type_script_setup_true_lang-DjxIJcdv.js} +103 -109
  47. package/dist/{Segment-DFaLx0QZ.js → Segment-CYa4GjtQ.js} +30 -29
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cpb2i9iV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-b-K-VDJC.js} +31 -30
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-MvoepHn9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-t2mlDDtn.js} +4 -4
  50. package/dist/{Setting-D2NjFJvq.js → Setting-Dmm5BKdF.js} +14 -14
  51. package/dist/{SettingAdvertisements-CPWgSMaA.js → SettingAdvertisements-cy4cRBop.js} +12 -12
  52. package/dist/Settings-DMQuLDM4.js +230 -0
  53. package/dist/Store-B7KflfSk.js +2612 -0
  54. package/dist/{StoreRewards-Ccj12pyq.js → StoreRewards-BKae8uZn.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-sbIR-k1R.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CfWTn0Xd.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DRT3N9SD.js} +2 -2
  57. package/dist/{Tier-vaJoohiM.js → Tier-BeTz6LHH.js} +2296 -750
  58. package/dist/{Title-BqHC7-v9.js → Title-OEVVw5I-.js} +39 -37
  59. package/dist/Transaction-D-MZjntW.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Dporb9KE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-xIEOUOdo.js} +26 -26
  61. package/dist/{Voucher-DeN6C6DQ.js → Voucher-BJCf3pSa.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-De16fuC4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BFQ_CYub.js} +115 -121
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DAC-j0Ln.js → ZodTextField.vue_vue_type_script_setup_true_lang-DGDw3Too.js} +2 -2
  64. package/dist/{app-n4Y2jMee.js → app-J8VIC7-H.js} +29852 -25997
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-HYFFI4OS.js +75 -0
  67. package/dist/{business-jn-_l48y.js → business-BonuheMK.js} +5 -5
  68. package/dist/{campaign-rgDnocfT.js → campaign-7CI7gfS5.js} +74 -96
  69. package/dist/campaign-Ct7jhugP.js +100 -0
  70. package/dist/{campaign.enum-C9HvoKuq.js → campaign.enum-OzJ9IbAW.js} +1 -1
  71. package/dist/{campaign.fn-D21ettpH.js → campaign.fn-CDjxE9B2.js} +99 -99
  72. package/dist/{collectible.enum-_HVU4lWn.js → collectible.enum-Dw_tlI9E.js} +1 -1
  73. package/dist/collection.fn-CER0_NEn.js +26 -0
  74. package/dist/currency-CTUS4vS8.js +7 -0
  75. package/dist/{duplicateCampaign-gzVwrnWb.js → duplicateCampaign-CMQ-RMH-.js} +11 -11
  76. package/dist/{effect-DhpIv1L3.js → effect-DBeGoMNE.js} +1 -1
  77. package/dist/{email-addresses-DPxYLSoa.js → email-addresses-BH3mQzan.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-WYHUnHVy.js → helper-DJe_JbKJ.js} +1 -1
  80. package/dist/{index-BdnHQSDd.js → index-B14H1rLW.js} +5 -4
  81. package/dist/{index-7HizF3GI.js → index-BOVnM3gL.js} +1588 -1522
  82. package/dist/{index-Cvfavr2M.js → index-BRCB6yJ6.js} +232 -200
  83. package/dist/{index-BPsofsGt.js → index-BZKKS7jO.js} +1933 -2560
  84. package/dist/{index-BuLfxJyC.js → index-BlwAgY_z.js} +105 -123
  85. package/dist/index-BmN_Qcw7.js +151 -0
  86. package/dist/index-Bnk3vdb-.js +72 -0
  87. package/dist/index-BzVTqlVH.js +137 -0
  88. package/dist/{index--fNMSXUf.js → index-CEDhjZzd.js} +1 -1
  89. package/dist/{index-BdqRrCt8.js → index-CM9GTQIo.js} +5 -5
  90. package/dist/index-CN8VyVEB.js +53 -0
  91. package/dist/{index-Cte6dHHy.js → index-COuceEFz.js} +14 -14
  92. package/dist/{index-BN-FP9kx.js → index-CWR2s6Nt.js} +1 -1
  93. package/dist/index-CrMBqkKk.js +897 -0
  94. package/dist/{index-xao4ggML.js → index-D9f3AIaO.js} +5 -5
  95. package/dist/index-Do36kJeb.js +51 -0
  96. package/dist/{index-C-5YgmkC.js → index-bGByr1XM.js} +7 -5
  97. package/dist/{index-DUTFNEn9.js → index-bJX4zgh0.js} +4 -4
  98. package/dist/{index.esm2017-CjzFPUCa.js → index.esm2017-BpCPgTjc.js} +128 -128
  99. package/dist/{loading-CojnK00V.js → loading-D_rPJ-Yc.js} +1 -1
  100. package/dist/{lodash-CLkg5jTT.js → lodash-BM976Z2I.js} +1 -1
  101. package/dist/member-import-C5rhD3f8.js +187 -0
  102. package/dist/membership-CIQCEKiL.js +274 -0
  103. package/dist/{money-CyaLaEKo.js → money-BrMT193t.js} +1 -1
  104. package/dist/{number-DEtI4bEX.js → number-DOcD1tqL.js} +1 -1
  105. package/dist/objectid-CAdRRoFu.js +145 -0
  106. package/dist/{plugins-MnP1vCcg.js → plugins-696Z9K6A.js} +3 -3
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-Dk3D26xC.js → reward-lSVIBiE9.js} +1 -1
  109. package/dist/{rule-B1Agad1n.js → rule-BUGAimk8.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-DpqLCq1p.js → template-01_h2Gac.js} +6 -6
  112. package/dist/timezone-okTdM2YU.js +20 -0
  113. package/dist/transaction.fn-Nz0T33ex.js +64 -0
  114. package/dist/{trigger-cwPN-4Ia.js → trigger-CKj1X6zs.js} +17 -17
  115. package/dist/useMarketingMaterialActions-yKqKaPpe.js +96 -0
  116. package/dist/{usePagination-D8zBMxdJ.js → usePagination-D6cYlfni.js} +1 -1
  117. package/dist/{user-EUGwaL2f.js → user-DX5qCQfz.js} +1 -1
  118. package/dist/{vue-i18n-BBj45p9N.js → vue-i18n-DowpocqN.js} +204 -204
  119. package/dist/{xlsx-DiMIlKmu.js → xlsx-Dv4SuJbw.js} +1 -1
  120. package/dist/{zod-B1cU167C.js → zod-DVw24Ejy.js} +1 -1
  121. package/package.json +6 -5
  122. package/dist/Card-Wdh8lyUv.js +0 -910
  123. package/dist/Credit-BuKLrFtM.js +0 -260
  124. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  125. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  126. package/dist/Game-C9s4qZz4.js +0 -330
  127. package/dist/LoyaltyDashboard-tOOk6zvV.js +0 -1082
  128. package/dist/MainLayout-iWi1DzXS.js +0 -41
  129. package/dist/Member-BdgdT-sa.js +0 -280
  130. package/dist/MemberList-DBIE-RWC.js +0 -1601
  131. package/dist/Mission-CWR6FBvN.js +0 -334
  132. package/dist/Point-BIt82fJk.js +0 -262
  133. package/dist/Promotion-Cl1vPi0B.js +0 -397
  134. package/dist/Review-DmV2YnFd.js +0 -1076
  135. package/dist/ReviewFacebookCallback-B5XgAWXo.js +0 -243
  136. package/dist/ReviewGoogleCallback-CYR03Wfd.js +0 -208
  137. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CAImd3yc.js +0 -181
  138. package/dist/Store-DjUe8ady.js +0 -1996
  139. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B7w69A3j.js +0 -1130
  140. package/dist/Transaction-BOmDOGnD.js +0 -39
  141. package/dist/campaign-BnI7-ceP.js +0 -219
  142. package/dist/export-CWAxYj7W.js +0 -97
  143. package/dist/index-B6EBgIUx.js +0 -85
  144. package/dist/index-CxR1baaG.js +0 -52
  145. package/dist/membership-CeX8E_I9.js +0 -255
  146. package/dist/objectid-CMau7CW-.js +0 -145
  147. package/dist/useMarketingMaterialActions-CGzfJ68e.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-xao4ggML.js";
7
+ import "./index-D9f3AIaO.js";
8
8
  import { J as me } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as le } from "./loading-CojnK00V.js";
9
+ import { u as le } from "./loading-D_rPJ-Yc.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-BnI7-ceP.js";
12
+ import { c as re } from "./index-BmN_Qcw7.js";
13
13
  import { e as b } from "./index-vh86FiIQ.js";
14
- import { u as J, w as ve } from "./xlsx-DiMIlKmu.js";
15
- import { u as he, _ as be } from "./usePagination-D8zBMxdJ.js";
16
- import { c as te } from "./plugins-MnP1vCcg.js";
17
- import { m as Ce } from "./index-C-5YgmkC.js";
14
+ import { u as J, w as ge } from "./xlsx-Dv4SuJbw.js";
15
+ import { u as ve, _ as he } from "./usePagination-D6cYlfni.js";
16
+ import { c as te } from "./plugins-696Z9K6A.js";
17
+ import { u as be } from "./campaign-Ct7jhugP.js";
18
+ import { m as Ce } from "./index-bGByr1XM.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-696Z9K6A.js";
5
+ import { u as ee } from "./loading-D_rPJ-Yc.js";
6
+ import { u as te } from "./business-BonuheMK.js";
7
+ import { u as oe } from "./campaign-Ct7jhugP.js";
8
+ import { a as ae, b as V, c as B } from "./campaign-7CI7gfS5.js";
9
+ import { c as ne, p as re } from "./duplicateCampaign-CMQ-RMH-.js";
10
+ import { u as ie } from "./vue-i18n-DowpocqN.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-3ERieT1j.js";
13
+ import { u as le } from "./template-01_h2Gac.js";
14
+ import "./index-CEDhjZzd.js";
15
+ import { useRouter as me } from "vue-router";
16
+ import { c as f } from "./index-BmN_Qcw7.js";
17
+ import { R as de } from "./app-J8VIC7-H.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-DowpocqN.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
+ };