@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.
Files changed (167) hide show
  1. package/dist/{App-DsB2o1oB.js → App-DievprEi.js} +853 -683
  2. package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-DrdqOhZL.js} +16 -13
  3. package/dist/{Bin-DMr7K8Kj.js → Bin-Ci2k3z77.js} +8 -8
  4. package/dist/Broadcast-CpDMAG1o.js +306 -0
  5. package/dist/CampaignAnalytic-uRyGaLaN.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -5
  7. package/dist/Card-tb98Kyr-.js +1086 -0
  8. package/dist/{Collections-B0uGC2FE.js → Collections-P1S5WjnJ.js} +14 -13
  9. package/dist/Credit-DwK7JYf-.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js +4432 -0
  12. 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
  13. package/dist/Experience-BejtRlOj.js +288 -0
  14. package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-C-hmBaHm.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-n8qL896g.js +356 -0
  17. package/dist/GiftCardSetup-Bgsfcu7N.js +736 -0
  18. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js +424 -0
  19. package/dist/Goals-BB8LJlq3.js +247 -0
  20. package/dist/{Grab-DmmwrGzk.js → Grab-COq3Ujst.js} +33 -32
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
  22. package/dist/{Index-m7l4insz.js → Index-BdkIinaE.js} +10 -10
  23. 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
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
  25. package/dist/LoyaltyDashboard-D4Jtpw0n.js +2911 -0
  26. package/dist/MainLayout-Ca-Xm3eZ.js +143 -0
  27. package/dist/{Marketing-C9pSIdBU.js → Marketing-Cpe4s7NZ.js} +7 -6
  28. package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-nTeS9VVx.js} +15 -14
  29. package/dist/Member-DgGZ4Cdg.js +654 -0
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js +1281 -0
  31. package/dist/MemberImportHistory-rdlbDVWU.js +187 -0
  32. package/dist/MemberList-BC4aRJTt.js +334 -0
  33. package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-BFfdTttp.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +5928 -5644
  35. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js +40 -0
  36. package/dist/Mission-BWCNKTjU.js +363 -0
  37. package/dist/Overview--Q7vzhNK.js +1316 -0
  38. package/dist/{Overview-DOJj4XvO.js → Overview-i02Wnyjn.js} +23 -20
  39. package/dist/Point-CiWxqny5.js +297 -0
  40. package/dist/Promotion-B0G9qfBm.js +426 -0
  41. package/dist/{Queue-55G2gtP5.js → Queue-YfwgYmzH.js} +16 -13
  42. package/dist/{Record-DNPI02c6.js → Record-CCuwrPKW.js} +9 -9
  43. package/dist/Review-ymsfdh7Q.js +45 -0
  44. package/dist/ReviewFacebookCallback-DyDExWvP.js +238 -0
  45. package/dist/ReviewGoogleCallback-DNyg3n2S.js +213 -0
  46. package/dist/{Reward-CnP8R2pS.js → Reward-BKIb0ezH.js} +28 -28
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +26 -23
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +198 -186
  49. package/dist/{Segment-CxiQnnyj.js → Segment-D5_pp7fh.js} +278 -276
  50. 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
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
  52. package/dist/Setting-CD78gIMU.js +574 -0
  53. package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
  54. package/dist/Settings-DI_tryQV.js +230 -0
  55. package/dist/Store-BV2JTRNZ.js +2615 -0
  56. package/dist/{StoreRewards-DILeipMG.js → StoreRewards-Bk55YXyO.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +1331 -0
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
  59. package/dist/{Tier-BAZ1xuKL.js → Tier-CO2K30Ew.js} +2576 -757
  60. package/dist/{Title-CcNAt47f.js → Title-qProQh3T.js} +41 -37
  61. package/dist/Transaction-qL5L-fE_.js +45 -0
  62. 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
  63. package/dist/Voucher-VFD1LY9Y.js +837 -0
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +118 -124
  65. package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
  66. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
  67. package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
  68. package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
  69. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
  70. package/dist/{app-Z-UKRG5V.js → app-BEYzXWZO.js} +50954 -42517
  71. package/dist/app.js +1 -1
  72. package/dist/base.export-S_82Elmg.js +75 -0
  73. package/dist/browser-BSAOEeIM.js +1478 -0
  74. package/dist/{business-C7EF6cKC.js → business-DH7djUl8.js} +5 -5
  75. package/dist/campaign-DlHDgoFX.js +100 -0
  76. package/dist/campaign-k_WHxsOR.js +400 -0
  77. package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  78. package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-B-4JRzft.js} +67 -67
  79. package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
  80. package/dist/collection.fn-zQwWDzZT.js +26 -0
  81. package/dist/currency-CQVHXBFe.js +7 -0
  82. package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-YTXMbJTj.js} +11 -11
  83. package/dist/{effect-BcB8IlTI.js → effect-CQkVLHWi.js} +1 -1
  84. package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-BIoVbPGC.js} +209 -201
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/{helper-BSgrCJRv.js → helper-BCkTvF4m.js} +1 -1
  87. package/dist/{index-CoHWpylO.js → index-B-bQnb0_.js} +2115 -2557
  88. package/dist/index-BAJOC43K.js +14550 -0
  89. package/dist/{index-HXiYGO4_.js → index-BFIHEBnX.js} +6343 -7693
  90. package/dist/{index-VlFWaBrg.js → index-BJIQe3QJ.js} +1 -1
  91. package/dist/{index-BpI-BI4H.js → index-BJkRTH5T.js} +4 -4
  92. package/dist/index-BOJogkKQ.js +172 -0
  93. package/dist/{index-BoYEqLif.js → index-BRPajAkE.js} +1517 -263
  94. package/dist/{index-CsoBDon4.js → index-BTkxgos0.js} +1590 -1523
  95. package/dist/index-BUP4aHq8.js +32438 -0
  96. package/dist/index-BYvnqARr.js +902 -0
  97. package/dist/{index-hlyg-wxV.js → index-Bonq819P.js} +1 -1
  98. package/dist/{index-CIBPhxlC.js → index-C6mOI2Pp.js} +105 -123
  99. package/dist/{index-Bf6jNZit.js → index-CDIe15AY.js} +24 -9
  100. package/dist/index-CTrcdIkt.js +137 -0
  101. package/dist/index-C_H8jFYf.js +2743 -0
  102. package/dist/index-CpnchVe1.js +74 -0
  103. package/dist/index-D5AR7A5e.js +151 -0
  104. package/dist/index-D7-Q86HI.js +54 -0
  105. package/dist/index-DdOj8Hew.js +53 -0
  106. package/dist/{index-iMPtFp54.js → index-Dvqguh2B.js} +10 -9
  107. package/dist/{index-Bm0QPucw.js → index-hAKRfE-4.js} +14 -14
  108. package/dist/index-o2Ga_qaX.js +39 -0
  109. package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-D0fhMMPG.js} +128 -128
  110. package/dist/{loading-CSXr0Yqz.js → loading-C686AMVG.js} +1 -1
  111. package/dist/{lodash-Bh7XKI-R.js → lodash-CANlWUWW.js} +1 -1
  112. package/dist/member-import-UzJ6ByIS.js +188 -0
  113. package/dist/membership-DCVzFaFy.js +274 -0
  114. package/dist/{money-BZIST_m9.js → money-DuazwoX7.js} +1 -1
  115. package/dist/{number-DXLR2w95.js → number-B2HFiV0g.js} +1 -1
  116. package/dist/objectid-Bq-oVMdP.js +145 -0
  117. package/dist/onboarding-BxvNxz-9.js +131 -0
  118. package/dist/onboardingSetup-CcvKmyx8.js +17 -0
  119. package/dist/{plugins-4FlbwoES.js → plugins-C39O5j42.js} +13 -12
  120. package/dist/remy-Qz_pNsUS.js +13 -0
  121. package/dist/{reward-DUbl79bZ.js → reward-HYt-2nxt.js} +1 -1
  122. package/dist/{rule-BQUoZ4l_.js → rule-3xNIYM7z.js} +337 -275
  123. package/dist/style.css +1 -1
  124. package/dist/{template-BoiSG7G7.js → template-D37Z_b0m.js} +6 -6
  125. package/dist/timezone-JwnQgpaU.js +20 -0
  126. package/dist/transaction.fn-C5vswLI_.js +71 -0
  127. package/dist/{trigger-D5g5m6tT.js → trigger-Bc6s2cvq.js} +17 -17
  128. package/dist/useMarketingMaterialActions-DMGyAXcy.js +96 -0
  129. package/dist/{usePagination-DHePBBoR.js → usePagination-DLOOwiiY.js} +1 -1
  130. package/dist/{user-C_ToSo-g.js → user-CTIGugVF.js} +1 -1
  131. package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-Dpic36zz.js} +287 -287
  132. package/dist/{xlsx-h4G1C-xj.js → xlsx-CT9_1SFr.js} +786 -786
  133. package/dist/{zod-CgigfJar.js → zod-CGVrMcDl.js} +1 -1
  134. package/package.json +10 -6
  135. package/dist/Broadcast-C9akM-TB.js +0 -266
  136. package/dist/Card-DRkIYs0M.js +0 -910
  137. package/dist/Credit-V5YA_hGx.js +0 -260
  138. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  139. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
  140. package/dist/Experience-WTWy5yY6.js +0 -259
  141. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  142. package/dist/Game-BwOfTCW5.js +0 -330
  143. package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
  144. package/dist/MainLayout-Du5kZOtA.js +0 -41
  145. package/dist/Member-DUV_vbPI.js +0 -280
  146. package/dist/MemberList-Ye4nOk-i.js +0 -1601
  147. package/dist/Mission-BBmCGpt8.js +0 -334
  148. package/dist/Point-Bzg6hi6o.js +0 -262
  149. package/dist/Promotion-BMXIp_ef.js +0 -397
  150. package/dist/Review-CYNPPxYU.js +0 -1141
  151. package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
  152. package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
  153. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
  154. package/dist/Setting-jHAjccod.js +0 -2047
  155. package/dist/Store-Cu-hKmVa.js +0 -1996
  156. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
  157. package/dist/Transaction-D7DO3dKQ.js +0 -39
  158. package/dist/Voucher-Cq-n1CaC.js +0 -421
  159. package/dist/campaign--MjoY1Mn.js +0 -219
  160. package/dist/campaign-DHBuP4UA.js +0 -277
  161. package/dist/export-CjB7qxZ9.js +0 -97
  162. package/dist/index-BIAjmMga.js +0 -85
  163. package/dist/index-Bv4MBLQ5.js +0 -52
  164. package/dist/index-hbyCVNa7.js +0 -30289
  165. package/dist/membership-CfredTm3.js +0 -255
  166. package/dist/objectid-Dg4ZodlT.js +0 -145
  167. package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
@@ -1,39 +0,0 @@
1
- import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
2
- import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js";
3
- import { u as C } from "./vue-i18n-BcYh6_51.js";
4
- const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
5
- __name: "Transaction",
6
- setup(V) {
7
- const { t: n } = C(), a = [
8
- {
9
- label: n("connect.transaction.tabs.collection"),
10
- value: "collection"
11
- },
12
- {
13
- label: n("connect.transaction.tabs.store"),
14
- value: "store"
15
- }
16
- ], e = f(a[0]);
17
- return (B, c) => {
18
- const i = s("FmPageHead"), u = s("FmTabs");
19
- return t(), v(b, null, [
20
- r(i, {
21
- title: o(n)("connect.transaction.title")
22
- }, null, 8, ["title"]),
23
- k("div", T, [
24
- r(u, {
25
- "model-value": o(e).value,
26
- items: a,
27
- "onUpdate:modelValue": c[0] || (c[0] = (p) => e.value = a.find((_) => _.value === p))
28
- }, null, 8, ["model-value"]),
29
- (t(), l(x, null, [
30
- o(e).value == "collection" ? (t(), l(m(g), { key: 0 })) : o(e).value == "store" ? (t(), l(m(y), { key: 1 })) : F("", !0)
31
- ], 1024))
32
- ])
33
- ], 64);
34
- };
35
- }
36
- });
37
- export {
38
- P as default
39
- };
@@ -1,421 +0,0 @@
1
- import { defineComponent as te, ref as U, computed as ne, h as m, onMounted as ae, resolveComponent as d, openBlock as u, createElementBlock as T, Fragment as P, createVNode as l, unref as t, createElementVNode as c, withCtx as R, renderList as re, createBlock as h, resolveDynamicComponent as ce, createCommentVNode as L, toDisplayString as v } from "vue";
2
- import { _ as ie } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as se, components as p } from "@feedmepos/ui-library";
4
- import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
5
- import { c as le, p as me } from "./plugins-4FlbwoES.js";
6
- import { useCoreStore as ue } from "@feedmepos/mf-common";
7
- import { u as de } from "./loading-CSXr0Yqz.js";
8
- import { u as pe } from "./business-C7EF6cKC.js";
9
- import { u as fe, c as _ } from "./campaign--MjoY1Mn.js";
10
- import { a as ye, b as $, c as D } from "./campaign-DHBuP4UA.js";
11
- import { c as he, p as ge } from "./duplicateCampaign-2ODeDw3a.js";
12
- import "./index-hlyg-wxV.js";
13
- import { u as ve } from "./template-BoiSG7G7.js";
14
- import { _ as _e } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js";
15
- import { _ as Ce } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js";
16
- import { u as we } from "./vue-i18n-BcYh6_51.js";
17
- import { T as be } from "./trigger-D5g5m6tT.js";
18
- import { useRouter as ke } from "vue-router";
19
- import { R as K } from "./app-Z-UKRG5V.js";
20
- var xe = { 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/" };
21
- const Fe = { class: "px-24 flex flex-col gap-y-16" }, Ve = { class: "flex items-center justify-between w-full" }, Se = { class: "flex gap-8 overflow-x-auto" }, Ue = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "space-y-4" }, Le = { class: "fm-typo-en-body-lg-600" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Be = { class: "flex flex-col gap-16 text-center" }, Oe = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ao = /* @__PURE__ */ te({
22
- __name: "Voucher",
23
- setup(Me) {
24
- const { t: a } = we(), N = {
25
- label: a("connect.voucher.createCampaign"),
26
- value: "create",
27
- isPrimary: !0,
28
- prependIcon: "add"
29
- }, I = se(), j = ve("VOUCHER", I), q = pe(), y = fe(), { global: G, minor: E } = de, B = ke(), s = U({
30
- searchKey: "",
31
- location: [],
32
- triggerType: []
33
- }), C = ne(
34
- () => y.campaigns.voucher.filter(
35
- (e) => W(e) && z(e)
36
- )
37
- ), X = be.VOUCHER.map((e) => ({
38
- label: e.name,
39
- value: e.value
40
- }));
41
- function W(e) {
42
- const o = s.value.location;
43
- return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
44
- (r) => {
45
- var i;
46
- return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(r);
47
- }
48
- ) : e.targetLocation.includes(o);
49
- }
50
- function k(e) {
51
- return e.hideInApp === !1;
52
- }
53
- function x(e) {
54
- return e.event.type === "SIMPLE_CLAIM" && !k(e);
55
- }
56
- function z(e) {
57
- const o = s.value.triggerType;
58
- if (!o || o.length === 0) return !0;
59
- const r = e.event.type;
60
- return o.includes(r);
61
- }
62
- const Q = [
63
- {
64
- header: a("connect.voucher.voucherTitle"),
65
- accessorFn: (e) => e.name,
66
- cell(e) {
67
- const o = [e.row.original.name];
68
- return k(e.row.original) && o.push(
69
- m(p.FmChip, {
70
- label: "Feedvibe",
71
- class: "text-fm-color-primary bg-fm-color-system-warning-100",
72
- compact: !0
73
- })
74
- ), m("div", { class: "flex items-center gap-4" }, o);
75
- }
76
- },
77
- {
78
- header: a("connect.voucher.status"),
79
- accessorFn: (e) => ye(e),
80
- cell(e) {
81
- return $(e.row.original);
82
- }
83
- },
84
- {
85
- header: a("connect.voucher.summary"),
86
- accessorFn: (e) => D(e)
87
- },
88
- {
89
- header: a("connect.voucher.quota"),
90
- accessorFn: (e) => {
91
- var o;
92
- return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
93
- }
94
- },
95
- {
96
- header: a("connect.voucher.claimed"),
97
- accessorFn: (e) => {
98
- var o;
99
- return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
100
- }
101
- },
102
- {
103
- header: a("connect.voucher.actions"),
104
- cell(e) {
105
- return m("div", { class: "flex items-center justify-end" }, [
106
- m(p.FmButton, {
107
- icon: "visibility",
108
- variant: "tertiary",
109
- iconColor: "neutral-gray-400",
110
- onClick: async (o) => {
111
- o.stopPropagation(), await B.push({
112
- name: K["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
113
- params: { id: e.row.original._id }
114
- });
115
- }
116
- }),
117
- m(
118
- p.FmMenu,
119
- {
120
- placement: "bottom-end",
121
- onClick: (o) => {
122
- o.stopPropagation();
123
- }
124
- },
125
- {
126
- "menu-button": () => m(p.FmButton, {
127
- icon: "more_vert",
128
- iconColor: "neutral-gray-400",
129
- variant: "tertiary"
130
- }),
131
- default: () => {
132
- const o = [
133
- m(p.FmMenuItem, {
134
- label: a("connect.voucher.duplicate"),
135
- onClick: async (r) => {
136
- r.stopPropagation(), await A(e.row.original);
137
- }
138
- }),
139
- m(
140
- p.FmMenuItem,
141
- {
142
- onClick: async (r) => {
143
- r.stopPropagation(), O(e.row.original);
144
- }
145
- },
146
- {
147
- label: m(
148
- "div",
149
- {
150
- class: "text-fm-color-typo-error fm-typo-en-body-md-400"
151
- },
152
- a("connect.voucher.remove")
153
- )
154
- }
155
- )
156
- ];
157
- return x(e.row.original) && (o.unshift(
158
- m(p.FmMenuItem, {
159
- label: a("connect.voucher.send"),
160
- onClick: async (r) => {
161
- var i;
162
- r.stopPropagation(), (i = V.value) == null || i.showSheet({
163
- campaignId: e.row.original._id
164
- });
165
- }
166
- })
167
- ), o.unshift(
168
- m(p.FmMenuItem, {
169
- label: a("connect.voucher.share"),
170
- onClick: async (r) => {
171
- r.stopPropagation(), await le(
172
- `https://${ue().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
173
- {
174
- successMessage: "Voucher link copied to clipboard"
175
- }
176
- );
177
- }
178
- })
179
- )), o;
180
- }
181
- }
182
- )
183
- ]);
184
- }
185
- }
186
- ], F = U(), V = U();
187
- async function O(e) {
188
- await me.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await E(
189
- async () => {
190
- await _.delete(e._id), await y.read("VOUCHER");
191
- },
192
- {
193
- message: a("connect.voucher.removing", { name: e.name }),
194
- successMessage: a("connect.voucher.removedSuccessfully", {
195
- name: e.name
196
- })
197
- }
198
- );
199
- }
200
- async function w(e) {
201
- e ? await o(await _.readById(e._id)) : j.open(async (r) => {
202
- await o(void 0, r);
203
- });
204
- async function o(r, i) {
205
- var b;
206
- (b = F.value) == null || b.showSheet(!0, "VOUCHER", r, i);
207
- }
208
- }
209
- async function A(e) {
210
- var i;
211
- if (!await he(e.name))
212
- return;
213
- const o = await _.readById(e._id), r = ge(o);
214
- (i = F.value) == null || i.showSheet(
215
- !0,
216
- "VOUCHER",
217
- r,
218
- o.template
219
- );
220
- }
221
- async function Z(e) {
222
- e.campaign._id && await new Promise((o) => {
223
- I.open({
224
- title: "Confirmation",
225
- message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
226
- primaryActions: { text: "Update all", close: !0 },
227
- secondaryActions: { text: "Update future only", close: !0 }
228
- }).onPrimary(async () => {
229
- var r;
230
- e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
231
- }).onSecondary(async () => {
232
- o();
233
- });
234
- }), await E(
235
- async () => {
236
- e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await y.read("VOUCHER");
237
- },
238
- {
239
- message: a(
240
- e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
241
- ),
242
- successMessage: a(
243
- e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
244
- )
245
- }
246
- );
247
- }
248
- return ae(async () => {
249
- await G(async () => {
250
- await y.read("VOUCHER");
251
- });
252
- }), (e, o) => {
253
- const r = d("FmPageHead"), i = d("FmSearch"), b = d("FmTable"), J = d("FmChip"), g = d("FmButton"), Y = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
254
- return u(), T(P, null, [
255
- l(r, {
256
- title: t(a)("connect.voucher.title"),
257
- actions: t(C).length > 0 ? [N] : [],
258
- "onClick:action": o[0] || (o[0] = () => w())
259
- }, null, 8, ["title", "actions"]),
260
- c("div", Fe, [
261
- l(i, {
262
- modelValue: t(s).searchKey,
263
- "onUpdate:modelValue": o[1] || (o[1] = (n) => t(s).searchKey = n),
264
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
265
- placeholder: t(a)("connect.voucher.search"),
266
- collapsible: ""
267
- }, null, 8, ["modelValue", "placeholder"]),
268
- t(y).campaigns.voucher && t(y).campaigns.voucher.length > 0 ? (u(), T(P, { key: 0 }, [
269
- c("div", Ve, [
270
- c("div", Se, [
271
- l(H, {
272
- label: `${t(a)("connect.common.location")}: `,
273
- "right-icon": "keyboard_arrow_down",
274
- modelValue: t(s).location,
275
- "onUpdate:modelValue": o[2] || (o[2] = (n) => t(s).location = n),
276
- icon: "storefront",
277
- "show-item-label": !0,
278
- items: t(q).locationOptions
279
- }, null, 8, ["label", "modelValue", "items"]),
280
- l(H, {
281
- label: "Type:",
282
- "right-icon": "keyboard_arrow_down",
283
- modelValue: t(s).triggerType,
284
- "onUpdate:modelValue": o[3] || (o[3] = (n) => t(s).triggerType = n),
285
- icon: "filter_list",
286
- "show-item-label": !0,
287
- items: t(X)
288
- }, null, 8, ["modelValue", "items"])
289
- ]),
290
- l(i, {
291
- modelValue: t(s).searchKey,
292
- "onUpdate:modelValue": o[4] || (o[4] = (n) => t(s).searchKey = n),
293
- class: "xs:hidden sm:hidden",
294
- placeholder: t(a)("connect.voucher.search"),
295
- collapsible: ""
296
- }, null, 8, ["modelValue", "placeholder"])
297
- ]),
298
- l(b, {
299
- class: "xs:hidden sm:hidden",
300
- "row-data": t(C),
301
- "column-defs": Q,
302
- "search-value": t(s).searchKey,
303
- "column-filter": [],
304
- onRowClick: o[5] || (o[5] = (n) => w(n.original)),
305
- "hide-footer": t(C).length < 10
306
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
307
- l(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
308
- default: R(() => [
309
- (u(!0), T(P, null, re(t(C).filter(
310
- (n) => n.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
311
- ), (n) => (u(), h(Y, {
312
- key: n._id.toString(),
313
- onClick: (S) => w(n),
314
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
315
- }, {
316
- default: R(() => {
317
- var S;
318
- return [
319
- c("div", Ue, [
320
- c("div", Te, [
321
- (u(), h(ce(t($)(n)))),
322
- k(n) ? (u(), h(J, {
323
- key: 0,
324
- label: "Feedvibe",
325
- class: "text-fm-color-primary bg-fm-color-system-warning-100",
326
- compact: ""
327
- })) : L("", !0),
328
- c("div", Pe, v(((S = n.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0) + " claimed ", 1)
329
- ]),
330
- c("div", Re, [
331
- c("div", Le, v(n.name), 1),
332
- c("div", Ie, v(t(D)(n)), 1)
333
- ])
334
- ]),
335
- c("div", Ee, [
336
- l(g, {
337
- icon: "content_copy",
338
- "icon-color": "neutral-gray-400",
339
- variant: "tertiary",
340
- onClick: async (f) => {
341
- f.stopPropagation(), await A(n);
342
- }
343
- }, null, 8, ["onClick"]),
344
- x(n) ? (u(), h(g, {
345
- key: 0,
346
- icon: "visibility",
347
- "icon-color": "neutral-gray-400",
348
- variant: "tertiary",
349
- onClick: async (f) => {
350
- f.stopPropagation(), await t(B).push({
351
- name: t(K)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
352
- params: { id: n._id }
353
- });
354
- }
355
- }, null, 8, ["onClick"])) : L("", !0),
356
- x(n) ? (u(), h(g, {
357
- key: 1,
358
- icon: "send",
359
- "icon-color": "neutral-gray-400",
360
- variant: "tertiary",
361
- onClick: (f) => {
362
- var M;
363
- f.stopPropagation(), (M = t(V)) == null || M.showSheet({
364
- campaignId: n._id
365
- });
366
- }
367
- }, null, 8, ["onClick"])) : L("", !0),
368
- l(g, {
369
- icon: "delete",
370
- "icon-color": "neutral-gray-400",
371
- variant: "tertiary",
372
- onClick: (f) => (f.stopPropagation(), O(n))
373
- }, null, 8, ["onClick"])
374
- ])
375
- ];
376
- }),
377
- _: 2
378
- }, 1032, ["onClick"]))), 128))
379
- ]),
380
- _: 1
381
- })
382
- ], 64)) : (u(), h(oe, {
383
- key: 1,
384
- variant: "outlined",
385
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
386
- }, {
387
- default: R(() => [
388
- o[7] || (o[7] = c("img", {
389
- src: ie,
390
- class: "aspect-square w-[150px]"
391
- }, null, -1)),
392
- c("div", Be, [
393
- c("div", Oe, v(t(a)("connect.voucher.createVoucherCampaign")), 1),
394
- c("div", Ae, v(t(a)("connect.voucher.description")), 1)
395
- ]),
396
- l(g, {
397
- variant: "primary",
398
- label: t(a)("connect.voucher.createVoucherCampaign"),
399
- icon: "add",
400
- onClick: o[6] || (o[6] = (n) => w())
401
- }, null, 8, ["label"])
402
- ]),
403
- _: 1
404
- })),
405
- l(_e, {
406
- ref_key: "sheetRef",
407
- ref: F,
408
- "onSubmit:modelValue": Z
409
- }, null, 512),
410
- l(Ce, {
411
- ref_key: "sendVoucherSheetRef",
412
- ref: V
413
- }, null, 512)
414
- ])
415
- ], 64);
416
- };
417
- }
418
- });
419
- export {
420
- ao as default
421
- };
@@ -1,219 +0,0 @@
1
- import { defineStore as w } from "pinia";
2
- import { reactive as I, onMounted as b, ref as o } from "vue";
3
- import { g as a, S as l, b as d } from "./index-HXiYGO4_.js";
4
- const s = () => {
5
- const e = l.getBusinessId();
6
- if (!e) throw new Error("Invalid business ID");
7
- return d(`businesses/${e}/campaigns`, {
8
- // url: 'http://localhost:3000/portal/',
9
- });
10
- }, u = {
11
- async readAllGrouped(e) {
12
- const t = a(
13
- await s().get("grouped", { params: e })
14
- );
15
- return {
16
- meta: t.meta,
17
- resources: t.resources
18
- };
19
- },
20
- async readAll(e, t) {
21
- const n = a(
22
- await s().get("", {
23
- params: { ...e, ...t }
24
- })
25
- );
26
- return {
27
- meta: n.meta,
28
- resources: n.resources
29
- };
30
- },
31
- async readById(e) {
32
- return a(await s().get(`/${e}`));
33
- },
34
- async create(e) {
35
- return a(await s().post("", e));
36
- },
37
- async update(e, t) {
38
- return a(await s().put(e, t));
39
- },
40
- async delete(e) {
41
- return a(await s().delete(e));
42
- },
43
- async readCollectionsByCampaignId(e, t) {
44
- const n = a(
45
- await s().get(`/${e}/collections`, {
46
- params: t
47
- })
48
- );
49
- return {
50
- meta: n.meta,
51
- resources: n.resources
52
- };
53
- },
54
- async readTransactions(e) {
55
- return a(
56
- await s().get(
57
- `/${e}/collections/transactions`
58
- )
59
- );
60
- },
61
- async createCollectionByCampaignId(e, t) {
62
- return a(
63
- await s().post(`/${e}/collections`, t)
64
- );
65
- },
66
- async readGroups() {
67
- return a(await s().get("/groups")) ?? [];
68
- },
69
- async readStats(e) {
70
- return a(
71
- await s().get("/stats", { params: e })
72
- );
73
- },
74
- async createGroup(e) {
75
- return a(await s().post("/groups", e));
76
- },
77
- async updateGroup(e, t) {
78
- return a(
79
- await s().put(`/groups/${e}`, t)
80
- );
81
- },
82
- async deleteGroup(e) {
83
- return a(await s().delete(`/groups/${e}`));
84
- },
85
- async sendCollection(e, t) {
86
- return a(
87
- await s().post(
88
- `/${e}/collections/send`,
89
- t
90
- )
91
- );
92
- },
93
- async sendStamp(e, t) {
94
- return a(
95
- await s().post(
96
- `/${e}/collections/send-stamp`,
97
- t
98
- )
99
- );
100
- },
101
- async syncAllPromotion() {
102
- return a(await s().post("/promotion/sync"));
103
- },
104
- async readAllDeleted(e, t) {
105
- const n = a(
106
- await s().get("/bin", {
107
- params: { ...e, ...t }
108
- })
109
- );
110
- return {
111
- meta: n.meta,
112
- resources: n.resources
113
- };
114
- },
115
- async restore(e) {
116
- return a(
117
- await s().post(`/${e}/restore`)
118
- );
119
- },
120
- async getPromotionQueue() {
121
- return a(await s().get("/promotion/queue"));
122
- }
123
- }, p = () => {
124
- const e = l.getBusinessId();
125
- if (!e) throw new Error("Invalid business ID");
126
- return d(`businesses/${e}/campaigns`, {
127
- noIdRequired: !0
128
- });
129
- }, f = {
130
- async readAll() {
131
- return a(await p().get("templates"));
132
- },
133
- async readById(e) {
134
- return a(
135
- await p().get(`templates/${e}`)
136
- );
137
- }
138
- }, E = w("mf-connect-campaign", () => {
139
- const e = I({
140
- promotion: [],
141
- voucher: [],
142
- broadcast: [],
143
- experience: [],
144
- point: [],
145
- credit: [],
146
- token: [],
147
- mission: [],
148
- grab: [],
149
- all: []
150
- });
151
- b(() => {
152
- console.log("🔧 CampaignStore Installed");
153
- });
154
- const t = o([]), n = o([]), c = o([]);
155
- async function m(h) {
156
- const i = await u.readAll({
157
- limit: 1e3,
158
- skip: 0,
159
- sortBy: "_id",
160
- descending: !0
161
- });
162
- Object.keys(e).forEach((r) => {
163
- e[r] = [];
164
- }), e.all = i.resources.filter(
165
- (r) => r.type !== "MEMBERSHIP"
166
- );
167
- for (const r of i.resources)
168
- switch (r.type) {
169
- case "PROMOTION":
170
- e.promotion.push(r);
171
- break;
172
- case "VOUCHER":
173
- e.voucher.push(r), c.value.push(r);
174
- break;
175
- case "BROADCAST":
176
- ["SCHEDULE", "FEEDBACK"].includes(r.event.type) && e.broadcast.push(r);
177
- break;
178
- case "POINT":
179
- e.experience.push(r);
180
- break;
181
- case "COIN":
182
- e.point.push(r);
183
- break;
184
- case "CREDIT":
185
- e.credit.push(r);
186
- break;
187
- case "GAME":
188
- e.token.push(r);
189
- break;
190
- case "MISSION":
191
- e.mission.push(r);
192
- break;
193
- case "GRAB":
194
- e.grab.push(r);
195
- break;
196
- }
197
- }
198
- async function g() {
199
- n.value = await u.readGroups();
200
- }
201
- async function y() {
202
- t.value = await f.readAll();
203
- }
204
- return {
205
- // State
206
- campaigns: e,
207
- templates: t,
208
- groups: n,
209
- voucher: c,
210
- // Actions
211
- read: m,
212
- readGroups: g,
213
- readTemplates: y
214
- };
215
- });
216
- export {
217
- u as c,
218
- E as u
219
- };