@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
@@ -0,0 +1,40 @@
1
+ import { defineComponent as c, resolveComponent as e, openBlock as s, createBlock as a, withCtx as l, createElementVNode as p, unref as m, withModifiers as f, createVNode as u } from "vue";
2
+ import { u as _ } from "./vue-i18n-Dpic36zz.js";
3
+ const d = ["aria-label"], h = /* @__PURE__ */ c({
4
+ __name: "MetricInfoTooltip",
5
+ props: {
6
+ description: {}
7
+ },
8
+ setup(o) {
9
+ const { t: n } = _();
10
+ return (x, t) => {
11
+ const r = e("FmIcon"), i = e("FmTooltip");
12
+ return s(), a(i, {
13
+ variant: "plain",
14
+ placement: "left",
15
+ content: o.description
16
+ }, {
17
+ default: l(() => [
18
+ p("button", {
19
+ type: "button",
20
+ "aria-label": m(n)("connect.loyalty.dashboard.accessibility.metricInformation"),
21
+ onClick: t[0] || (t[0] = f(() => {
22
+ }, ["stop"])),
23
+ class: "inline-flex h-[20px] w-[20px] flex-shrink-0 cursor-help items-center justify-center border-0 bg-transparent p-0"
24
+ }, [
25
+ u(r, {
26
+ name: "info",
27
+ outline: "",
28
+ size: "xs",
29
+ class: "!text-fm-color-typo-tertiary"
30
+ })
31
+ ], 8, d)
32
+ ]),
33
+ _: 1
34
+ }, 8, ["content"]);
35
+ };
36
+ }
37
+ });
38
+ export {
39
+ h as _
40
+ };
@@ -0,0 +1,363 @@
1
+ import { defineComponent as J, ref as x, computed as Q, h as l, onMounted as X, resolveComponent as d, openBlock as u, createElementBlock as v, Fragment as k, createVNode as r, unref as t, createElementVNode as i, withCtx as I, renderList as Z, createBlock as F, resolveDynamicComponent as ee, toDisplayString as g } from "vue";
2
+ import { _ as oe } from "./campaign-CpzFl8Vr.js";
3
+ import { u as te } from "./loading-C686AMVG.js";
4
+ import { a as ne, b as N, c as R } from "./campaign-k_WHxsOR.js";
5
+ import { c as ae, p as ie } from "./duplicateCampaign-YTXMbJTj.js";
6
+ import { c as se, p as re } from "./plugins-C39O5j42.js";
7
+ import { u as ce } from "./business-DH7djUl8.js";
8
+ import { u as le } from "./campaign-DlHDgoFX.js";
9
+ import { useDialog as me, components as f } from "@feedmepos/ui-library";
10
+ import { _ as de } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
11
+ import { u as pe } from "./template-D37Z_b0m.js";
12
+ import { _ as ue } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js";
13
+ import { s as ge } from "./index-CuvNtC_M.js";
14
+ import { u as fe } from "./vue-i18n-Dpic36zz.js";
15
+ import { _ as ye } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js";
16
+ import "./index-Bonq819P.js";
17
+ import { u as _e } from "./onboardingSetup-CcvKmyx8.js";
18
+ import { useRouter as he } from "vue-router";
19
+ import { c as h } from "./index-D5AR7A5e.js";
20
+ import { R as we } from "./app-BEYzXWZO.js";
21
+ const Ce = { class: "px-24 flex flex-col gap-y-16" }, Se = { class: "flex items-center justify-between w-full" }, be = { class: "flex gap-8 overflow-x-auto" }, xe = { class: "space-y-8" }, ve = { class: "flex w-full gap-4 items-center" }, ke = { class: "space-y-4" }, Ie = { class: "fm-typo-en-body-lg-600" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex items-center gap-8" }, Pe = { class: "flex flex-col gap-16 text-center" }, Ve = { class: "fm-typo-en-title-sm-800" }, Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, eo = /* @__PURE__ */ J({
22
+ __name: "Mission",
23
+ setup(Oe) {
24
+ const { t: a } = fe(), A = he(), D = {
25
+ label: a("connect.program.common.actions.create", {
26
+ type: a("connect.program.mission.title").toLowerCase()
27
+ }),
28
+ value: "create",
29
+ isPrimary: !0,
30
+ prependIcon: "add"
31
+ }, M = me(), K = pe("MISSION", M), T = ce(), p = le(), { global: U, minor: L } = te, m = x({
32
+ searchKey: "",
33
+ location: []
34
+ });
35
+ function $(e) {
36
+ const o = m.value.location;
37
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((s) => {
38
+ var c;
39
+ return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(s);
40
+ }) : e.targetLocation.includes(o);
41
+ }
42
+ const y = Q(
43
+ () => p.campaigns.mission.filter((e) => $(e))
44
+ ), E = [
45
+ {
46
+ header: a("connect.program.common.table.title"),
47
+ accessorKey: "name",
48
+ // accessorFn: (v) => v.name,
49
+ cell(e) {
50
+ return l("div", { class: "flex items-center justify-between gap-4" }, [
51
+ l("div", { class: "flex items-center" }, [
52
+ l(
53
+ f.FmTooltip,
54
+ {
55
+ content: e.row.original._id,
56
+ onClick: (o) => {
57
+ o.stopPropagation(), se(e.row.original._id);
58
+ }
59
+ },
60
+ [
61
+ l(f.FmIcon, {
62
+ name: "info",
63
+ outline: !0,
64
+ size: "sm"
65
+ })
66
+ ]
67
+ )
68
+ ]),
69
+ l("div", { class: "flex-1" }, e.row.original.name)
70
+ ]);
71
+ }
72
+ },
73
+ {
74
+ header: a("connect.campaign.mission.type"),
75
+ accessorFn: (e) => ge(e.mission.type)
76
+ //v.effect,
77
+ },
78
+ {
79
+ header: a("connect.program.common.table.status"),
80
+ accessorFn: (e) => ne(e),
81
+ cell(e) {
82
+ return N(e.row.original);
83
+ }
84
+ },
85
+ {
86
+ header: a("connect.program.common.table.summary"),
87
+ accessorFn: (e) => R(e)
88
+ //v.effect,
89
+ },
90
+ {
91
+ header: a("connect.campaign.mission.received"),
92
+ accessorFn: (e) => {
93
+ var o;
94
+ return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
95
+ }
96
+ },
97
+ {
98
+ header: a("connect.program.common.table.actions"),
99
+ cell(e) {
100
+ return l("div", { class: "flex items-center gap-8" }, [
101
+ l(f.FmButton, {
102
+ variant: "tertiary",
103
+ icon: "insights",
104
+ iconColor: "neutral-gray-400",
105
+ onClick: async (o) => {
106
+ o.stopPropagation(), await O(e.row.original);
107
+ }
108
+ }),
109
+ l(f.FmButton, {
110
+ variant: "tertiary",
111
+ icon: "content_copy",
112
+ iconColor: "neutral-gray-400",
113
+ onClick: async (o) => {
114
+ o.stopPropagation(), await B(e.row.original);
115
+ }
116
+ }),
117
+ l(f.FmButton, {
118
+ variant: "tertiary",
119
+ icon: "send",
120
+ iconColor: "neutral-gray-400",
121
+ onClick: (o) => {
122
+ o.stopPropagation(), H(e.row.original);
123
+ }
124
+ }),
125
+ l(f.FmButton, {
126
+ variant: "tertiary",
127
+ icon: "delete",
128
+ iconColor: "neutral-gray-400",
129
+ onClick: (o) => {
130
+ o.stopPropagation(), V(e.row.original);
131
+ }
132
+ })
133
+ ]);
134
+ }
135
+ }
136
+ ], w = x(), P = x();
137
+ async function V(e) {
138
+ await re.remove(
139
+ a("connect.program.common.remove.confirm", { name: e.name })
140
+ ) && await L(
141
+ async () => {
142
+ await h.delete(e._id), await p.read("MISSION");
143
+ },
144
+ {
145
+ message: a("connect.program.common.remove.removing", { name: e.name }),
146
+ successMessage: a("connect.program.common.remove.removed", {
147
+ name: e.name
148
+ })
149
+ }
150
+ );
151
+ }
152
+ async function C(e) {
153
+ e ? await o() : K.open(async (s) => {
154
+ await o(s);
155
+ });
156
+ async function o(s) {
157
+ var c;
158
+ (c = w.value) == null || c.showSheet(
159
+ !0,
160
+ "MISSION",
161
+ e ? await h.readById(e._id) : void 0,
162
+ s
163
+ );
164
+ }
165
+ }
166
+ async function B(e) {
167
+ var c;
168
+ if (!await ae(e.name))
169
+ return;
170
+ const o = await h.readById(e._id), s = ie(o);
171
+ (c = w.value) == null || c.showSheet(
172
+ !0,
173
+ "MISSION",
174
+ s,
175
+ o.template
176
+ );
177
+ }
178
+ async function j(e) {
179
+ e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
180
+ M.open({
181
+ title: "Confirmation",
182
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
183
+ primaryActions: { text: "Update all", close: !0 },
184
+ secondaryActions: { text: "Update future only", close: !0 }
185
+ }).onPrimary(async () => {
186
+ var s;
187
+ e.updateCollections = !0, (s = window.top) == null || s.postMessage("updateAllVoucher", "*"), o();
188
+ }).onSecondary(async () => {
189
+ o();
190
+ });
191
+ }), await L(
192
+ async () => {
193
+ e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await p.read("MISSION");
194
+ },
195
+ {
196
+ message: a(
197
+ e.campaign._id ? "connect.program.common.update.updating" : "connect.program.common.update.creating",
198
+ { type: "Mission" }
199
+ ),
200
+ successMessage: a("connect.program.common.update.success", {
201
+ type: "Mission",
202
+ action: e.campaign._id ? "updated" : "created"
203
+ })
204
+ }
205
+ );
206
+ }
207
+ function H(e) {
208
+ var o;
209
+ (o = P.value) == null || o.showSheet({
210
+ campaign: e
211
+ });
212
+ }
213
+ async function O(e) {
214
+ await A.push({
215
+ name: we["$connect-PROGRAM_MISSION_ANALYTIC"],
216
+ params: { id: e._id }
217
+ });
218
+ }
219
+ const q = _e();
220
+ return X(async () => {
221
+ var e;
222
+ await U(async () => {
223
+ await p.read("MISSION"), console.log(y);
224
+ }), await q.consume() === "MISSION" && ((e = w.value) == null || e.showSheet(!0, "MISSION"));
225
+ }), (e, o) => {
226
+ const s = d("FmPageHead"), c = d("FmSearch"), z = d("FmTable"), S = d("FmButton"), G = d("FmListItem"), W = d("FmList"), Y = d("FmCard");
227
+ return u(), v(k, null, [
228
+ r(s, {
229
+ title: t(a)("connect.campaign.mission.title"),
230
+ actions: t(y).length > 0 ? [D] : [],
231
+ "onClick:action": o[0] || (o[0] = () => C())
232
+ }, null, 8, ["title", "actions"]),
233
+ i("div", Ce, [
234
+ r(c, {
235
+ modelValue: t(m).searchKey,
236
+ "onUpdate:modelValue": o[1] || (o[1] = (n) => t(m).searchKey = n),
237
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
238
+ placeholder: t(a)("connect.program.common.search"),
239
+ collapsible: ""
240
+ }, null, 8, ["modelValue", "placeholder"]),
241
+ t(p).campaigns.mission && t(p).campaigns.mission.length > 0 ? (u(), v(k, { key: 0 }, [
242
+ i("div", Se, [
243
+ i("div", be, [
244
+ r(de, {
245
+ label: `${t(a)("connect.program.common.location")}: `,
246
+ "right-icon": "keyboard_arrow_down",
247
+ modelValue: t(m).location,
248
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => t(m).location = n),
249
+ icon: "storefront",
250
+ "show-item-label": !0,
251
+ items: t(T).locationOptions
252
+ }, null, 8, ["label", "modelValue", "items"])
253
+ ]),
254
+ r(c, {
255
+ modelValue: t(m).searchKey,
256
+ "onUpdate:modelValue": o[3] || (o[3] = (n) => t(m).searchKey = n),
257
+ class: "xs:hidden sm:hidden",
258
+ placeholder: "search",
259
+ collapsible: ""
260
+ }, null, 8, ["modelValue"])
261
+ ]),
262
+ r(z, {
263
+ class: "xs:hidden sm:hidden",
264
+ "row-data": t(y),
265
+ "column-defs": E,
266
+ "search-value": t(m).searchKey,
267
+ "column-filter": [],
268
+ onRowClick: o[4] || (o[4] = (n) => C(n.original)),
269
+ "hide-footer": t(y).length < 10
270
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
271
+ r(W, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
272
+ default: I(() => [
273
+ (u(!0), v(k, null, Z(t(y).filter(
274
+ (n) => n.name.toLowerCase().includes(t(m).searchKey.toLowerCase())
275
+ ), (n) => (u(), F(G, {
276
+ key: n._id.toString(),
277
+ onClick: (b) => C(n),
278
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
279
+ }, {
280
+ default: I(() => {
281
+ var b;
282
+ return [
283
+ i("div", xe, [
284
+ i("div", ve, [
285
+ (u(), F(ee(t(N)(n))))
286
+ ]),
287
+ i("div", ke, [
288
+ i("div", Ie, g(n.name), 1),
289
+ i("div", Fe, g(t(R)(n)), 1)
290
+ ]),
291
+ i("div", Me, g(t(a)("connect.campaign.mission.received")) + " : " + g(((b = n == null ? void 0 : n.pf_collectible) == null ? void 0 : b.currentReceive) ?? 0), 1)
292
+ ]),
293
+ i("div", Le, [
294
+ r(S, {
295
+ icon: "insights",
296
+ "icon-color": "neutral-gray-400",
297
+ variant: "tertiary",
298
+ onClick: async (_) => {
299
+ _.stopPropagation(), await O(n);
300
+ }
301
+ }, null, 8, ["onClick"]),
302
+ r(S, {
303
+ icon: "content_copy",
304
+ "icon-color": "neutral-gray-400",
305
+ variant: "tertiary",
306
+ onClick: async (_) => {
307
+ _.stopPropagation(), await B(n);
308
+ }
309
+ }, null, 8, ["onClick"]),
310
+ r(S, {
311
+ icon: "delete",
312
+ "icon-color": "neutral-gray-400",
313
+ variant: "tertiary",
314
+ onClick: (_) => (_.stopPropagation(), V(n))
315
+ }, null, 8, ["onClick"])
316
+ ])
317
+ ];
318
+ }),
319
+ _: 2
320
+ }, 1032, ["onClick"]))), 128))
321
+ ]),
322
+ _: 1
323
+ })
324
+ ], 64)) : (u(), F(Y, {
325
+ key: 1,
326
+ variant: "outlined",
327
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
328
+ }, {
329
+ default: I(() => [
330
+ o[6] || (o[6] = i("img", {
331
+ src: oe,
332
+ class: "aspect-square w-[150px]"
333
+ }, null, -1)),
334
+ i("div", Pe, [
335
+ i("div", Ve, g(t(a)("connect.campaign.mission.createProgram")), 1),
336
+ i("div", Be, g(t(a)("connect.campaign.mission.description")), 1)
337
+ ]),
338
+ r(S, {
339
+ variant: "primary",
340
+ label: t(a)("connect.campaign.mission.create"),
341
+ icon: "add",
342
+ onClick: o[5] || (o[5] = (n) => C())
343
+ }, null, 8, ["label"])
344
+ ]),
345
+ _: 1
346
+ })),
347
+ r(ue, {
348
+ ref_key: "sheetRef",
349
+ ref: w,
350
+ "onSubmit:modelValue": j
351
+ }, null, 512),
352
+ r(ye, {
353
+ ref_key: "sendCollectionSheetRef",
354
+ ref: P
355
+ }, null, 512)
356
+ ])
357
+ ], 64);
358
+ };
359
+ }
360
+ });
361
+ export {
362
+ eo as default
363
+ };