@feedmepos/mf-connect 0.1.82-prod → 0.1.83-prod

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 (103) hide show
  1. package/dist/{Analytic-D850nvXy.js → Analytic-1OYb8L9c.js} +11 -11
  2. package/dist/{App-Dwp2SQFt.js → App-oQ4_lEV2.js} +7 -7
  3. package/dist/{Bin-t3dMVk18.js → Bin-CQ8CYWAf.js} +8 -8
  4. package/dist/Broadcast-BLq5lca6.js +265 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CFa7asTL.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-0BKgyMxn.js} +6 -6
  6. package/dist/{Card-DueuT99c.js → Card-BbcMCzvO.js} +19 -19
  7. package/dist/{Collections-D50oEyeZ.js → Collections-0LOyEUoF.js} +8 -8
  8. package/dist/Credit-Crrc3MSu.js +259 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js} +245 -241
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-L0-aFhRw.js → EffectSheet.vue_vue_type_style_index_0_lang-DQaMkTla.js} +6 -6
  11. package/dist/Experience-DJiUmONI.js +258 -0
  12. package/dist/{FileSaver.min-DH3eS7yi.js → FileSaver.min-CFEGc8v5.js} +1 -1
  13. package/dist/Game-ChHy4S4P.js +329 -0
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BIKcbIag.js → ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js} +1 -1
  15. package/dist/{Index-BucLJQqP.js → Index-CL5auUCN.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CIoZurPE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-H5IjhmOA.js} +1 -1
  17. package/dist/{MainLayout-DYGrSfgc.js → MainLayout-Bf4G5U5F.js} +1 -1
  18. package/dist/{Marketing-CsAIdNjF.js → Marketing-cNwSm-dt.js} +6 -6
  19. package/dist/{Member-D4HF_VGN.js → Member-fT7a7zFo.js} +11 -11
  20. package/dist/{MemberList-CPoA4ovd.js → MemberList-gEN36Erj.js} +27 -27
  21. package/dist/{MemberTransactions-AMv9NeIb.js → MemberTransactions-C4YgiUw-.js} +1 -1
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhhSwnK0.js → MessageInput.vue_vue_type_script_setup_true_lang-BNDrmYqp.js} +9 -9
  23. package/dist/Mission-Bz9P2pjX.js +333 -0
  24. package/dist/{Overview-ByO2p2Wx.js → Overview-BG3Z7Daz.js} +19 -19
  25. package/dist/Point-BBeSJ5p5.js +261 -0
  26. package/dist/Promotion-VmaOESn2.js +390 -0
  27. package/dist/{Queue-BD29Mmbf.js → Queue-DKtUhOBh.js} +11 -11
  28. package/dist/{Record-CNLiN6YR.js → Record-Cb45m9I8.js} +9 -9
  29. package/dist/{Reward-Ceo3M1yD.js → Reward-D_uvCEMe.js} +16 -16
  30. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJWQEL9W.js → RewardGroup.vue_vue_type_script_setup_true_lang-yUUMGEUJ.js} +12 -12
  31. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CWuWGs6r.js → RuleGroup.vue_vue_type_script_setup_true_lang-CIb7igvo.js} +15 -15
  32. package/dist/{Segment-BOQUlP-m.js → Segment-BJ8XUyeG.js} +25 -25
  33. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BcXeiz0p.js → SelectItems.vue_vue_type_script_setup_true_lang-ht4qyiQM.js} +2 -2
  34. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CJ--FC-i.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DC6OQ7Zb.js} +12 -12
  35. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-9emjG6Nc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js} +4 -4
  36. package/dist/{Setting-CWapXD31.js → Setting-CS1wSxO9.js} +14 -14
  37. package/dist/{SettingAdvertisements-QEf2eyem.js → SettingAdvertisements-CWP7VthZ.js} +12 -12
  38. package/dist/{Store-Bfm2olbH.js → Store-cy0uZfSE.js} +22 -22
  39. package/dist/{StoreRewards-DNDkyxxn.js → StoreRewards-DDAvmlEn.js} +15 -15
  40. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-zKLbY4Qb.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CevWXAb6.js} +20 -20
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D3-wIOQ7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CPJ4fCu-.js} +1 -1
  42. package/dist/{Tier-uC45o2AK.js → Tier-CUT_0eYp.js} +22 -22
  43. package/dist/{Title-zDjlDJCB.js → Title-DcelZU7H.js} +20 -20
  44. package/dist/{Transaction-Bo9FEjMQ.js → Transaction-CwcJnFIO.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BR5F0bWS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BuDS-vUd.js} +6 -6
  46. package/dist/{Voucher-B7BTa4Vt.js → Voucher-z6o5rwFx.js} +162 -141
  47. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjrjJW7x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-FVdeM5pH.js} +12 -12
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DeAkLgaX.js → ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js} +2 -2
  49. package/dist/{app-CkUBXnib.js → app-BUFlIAB5.js} +73 -43
  50. package/dist/app.js +1 -1
  51. package/dist/{business-C8P05bjQ.js → business-CEL6Cxr7.js} +1 -1
  52. package/dist/{campaign-DcLhSQVQ.js → campaign-Bz3O-DFr.js} +1 -1
  53. package/dist/{campaign-CyYAvl3p.js → campaign-CfB7ZWIg.js} +8 -8
  54. package/dist/{campaign.enum-h6B-mP82.js → campaign.enum-CCKHGvL9.js} +1 -1
  55. package/dist/{campaign.fn-CStjDAoU.js → campaign.fn-Cu0sRSpP.js} +114 -114
  56. package/dist/{collectible.enum-DT-wjl-a.js → collectible.enum-DeWSJ9OK.js} +1 -1
  57. package/dist/{collection.fn-14o3RW2e.js → collection.fn-hPDt2qvz.js} +2 -2
  58. package/dist/{dto-Bv09Baex.js → dto-BKwcpb4T.js} +4 -4
  59. package/dist/{effect-CF0s7QWQ.js → effect-D070CPN_.js} +1 -1
  60. package/dist/{email-addresses-B5qrHbxg.js → email-addresses-C0fE6EMy.js} +2 -2
  61. package/dist/{export-B6nvdBmg.js → export-CG1ypExs.js} +3 -3
  62. package/dist/{helper-B4-2ut7E.js → helper-C9NBolO7.js} +1 -1
  63. package/dist/{index-B-y0UTZw.js → index-4gCsL8Hl.js} +6 -6
  64. package/dist/{index-D5xt8OjL.js → index-6rFsv3Yg.js} +1 -1
  65. package/dist/{index-BebGg-0n.js → index-B30LtrWw.js} +1 -1
  66. package/dist/{index-DVb99_67.js → index-B613auFn.js} +1 -1
  67. package/dist/{index-HhVIn4Bn.js → index-BGi7UFjn.js} +1 -1
  68. package/dist/{index-DzQjej5Y.js → index-BXSp11TE.js} +4 -4
  69. package/dist/{index-DRX9TTMn.js → index-CM-qkxMr.js} +3 -3
  70. package/dist/{index-DesSizn4.js → index-CZoTFXja.js} +3 -3
  71. package/dist/{index-DG_Ej3ec.js → index-D7AT7i0e.js} +3 -3
  72. package/dist/{index-DIQ2MyWF.js → index-DDMr6_UT.js} +4 -4
  73. package/dist/{index-XDg25M5a.js → index-DGNPGZh4.js} +1 -1
  74. package/dist/{index-CR8brl_k.js → index-DLnZyneY.js} +1 -1
  75. package/dist/{index-Ct90ybe0.js → index-DcfdUpTw.js} +1 -1
  76. package/dist/{index.esm2017-1A2eV8x_.js → index.esm2017-D0u5JnGx.js} +1 -1
  77. package/dist/{loading-B0_BwPgo.js → loading-Rn4BXFlo.js} +1 -1
  78. package/dist/{lodash-DxIglhqk.js → lodash-Ds-QoR_N.js} +1 -1
  79. package/dist/{membership-H_whlbUP.js → membership-BjklIT2n.js} +3 -3
  80. package/dist/{money-DEE8QW6m.js → money-DMyZXL-e.js} +1 -1
  81. package/dist/{number-BmN5A4Cu.js → number-Cyny8l0t.js} +1 -1
  82. package/dist/{objectid-B8LZDZOt.js → objectid-Bs1Sha1n.js} +6 -6
  83. package/dist/{plugins-DTrOHd7d.js → plugins-BdQ8LmZm.js} +3 -3
  84. package/dist/{reward-CsJhkkaT.js → reward-ZGs3fpY1.js} +1 -1
  85. package/dist/{rule-ByMxYH4c.js → rule-BH0ICJcx.js} +3 -3
  86. package/dist/{rule-builder-DwGwUlV1.js → rule-builder-D2sz7Xd9.js} +1 -1
  87. package/dist/template-_QJbP7yG.js +236 -0
  88. package/dist/{timezone-Bpe-fhwZ.js → timezone-ulqdIvC-.js} +2 -2
  89. package/dist/{trigger-CEprJYiD.js → trigger-BiXZCT3j.js} +5 -5
  90. package/dist/{usePagination-Du6qS5aj.js → usePagination-Ck7buuI_.js} +1 -1
  91. package/dist/{user-Be8HNWuo.js → user-BWTfkoD6.js} +1 -1
  92. package/dist/{vue-i18n-fg0FtbNR.js → vue-i18n-CmMTYitu.js} +158 -158
  93. package/dist/{xlsx-CSQJ3YWk.js → xlsx-BF8PJO-P.js} +1 -1
  94. package/dist/{zod-BB7zZ5ec.js → zod-C5iXeYjP.js} +1 -1
  95. package/package.json +1 -1
  96. package/dist/Broadcast-DORnkgZc.js +0 -232
  97. package/dist/Credit-CIWSRGuJ.js +0 -225
  98. package/dist/Experience-qABtjxNP.js +0 -224
  99. package/dist/Game-D67q1zKd.js +0 -299
  100. package/dist/Mission-CRinLn7e.js +0 -303
  101. package/dist/Point-4JqzbNgP.js +0 -227
  102. package/dist/Promotion-DlWVF6hF.js +0 -358
  103. package/dist/template-Bdwy6QXF.js +0 -188
@@ -1,21 +1,21 @@
1
1
  import { defineComponent as I, ref as y, watch as X, onMounted as T, resolveComponent as x, openBlock as d, createBlock as A, withCtx as P, createVNode as b, unref as t, createElementVNode as r, createElementBlock as k, Fragment as $, renderList as D, computed as G, toDisplayString as M, isRef as j, createSlots as Y, createCommentVNode as V, createTextVNode as ee, reactive as te, onBeforeMount as ae } from "vue";
2
2
  import { _ as ne } from "./campaign-CpzFl8Vr.js";
3
- import "./index-DRX9TTMn.js";
4
- import "./campaign-CyYAvl3p.js";
3
+ import "./index-CM-qkxMr.js";
4
+ import "./campaign-CfB7ZWIg.js";
5
5
  import { useRouter as le } from "vue-router";
6
- import { c as E, u as oe } from "./campaign-DcLhSQVQ.js";
7
- import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DeAkLgaX.js";
8
- import { Z as ie } from "./zod-BB7zZ5ec.js";
9
- import { F as re } from "./dto-Bv09Baex.js";
6
+ import { c as E, u as oe } from "./campaign-Bz3O-DFr.js";
7
+ import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BGuVeHZU.js";
8
+ import { Z as ie } from "./zod-C5iXeYjP.js";
9
+ import { F as re } from "./dto-BKwcpb4T.js";
10
10
  import { J as ue } from "./JsonViewer-v8_C7l5N.js";
11
- import "./index-DIQ2MyWF.js";
11
+ import "./index-DDMr6_UT.js";
12
12
  import { useSnackbar as ce } from "@feedmepos/ui-library";
13
13
  import { u as me } from "./app-wDQR6dpb.js";
14
- import { u as de } from "./loading-B0_BwPgo.js";
15
- import { C as pe } from "./campaign.fn-CStjDAoU.js";
14
+ import { u as de } from "./loading-Rn4BXFlo.js";
15
+ import { C as pe } from "./campaign.fn-Cu0sRSpP.js";
16
16
  import { g as ve } from "./object-qECH92oz.js";
17
- import { u as fe } from "./membership-H_whlbUP.js";
18
- import { u as ye } from "./vue-i18n-fg0FtbNR.js";
17
+ import { u as fe } from "./membership-BjklIT2n.js";
18
+ import { u as ye } from "./vue-i18n-CmMTYitu.js";
19
19
  const ge = { class: "ml-32 flex flex-col" }, _e = /* @__PURE__ */ I({
20
20
  __name: "CampaignCard",
21
21
  props: {
@@ -2,16 +2,16 @@ import { defineComponent as ht, ref as te, h as G, computed as Ee, watch as ft,
2
2
  import { useRouter as sn, useRoute as mt, RouterView as on } from "vue-router";
3
3
  import { useCoreStore as be, FeedMeAuth as an } from "@feedmepos/mf-common";
4
4
  import { u as cn } from "./app-wDQR6dpb.js";
5
- import { u as ln } from "./business-C8P05bjQ.js";
6
- import "./index-XDg25M5a.js";
5
+ import { u as ln } from "./business-CEL6Cxr7.js";
6
+ import "./index-DGNPGZh4.js";
7
7
  import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
- import { u as hn } from "./vue-i18n-fg0FtbNR.js";
9
- import { C as Ge, m as fn } from "./timezone-Bpe-fhwZ.js";
10
- import { R as f } from "./app-CkUBXnib.js";
8
+ import { u as hn } from "./vue-i18n-CmMTYitu.js";
9
+ import { C as Ge, m as fn } from "./timezone-ulqdIvC-.js";
10
+ import { R as f } from "./app-BUFlIAB5.js";
11
11
  import { J as pn } from "./JsonViewer-v8_C7l5N.js";
12
- import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as W, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as Pn } from "./index.esm2017-1A2eV8x_.js";
12
+ import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as W, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as Pn } from "./index.esm2017-D0u5JnGx.js";
13
13
  import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
14
- import { S as Ke, c as An } from "./index-DRX9TTMn.js";
14
+ import { S as Ke, c as An } from "./index-CM-qkxMr.js";
15
15
  const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Nn = /* @__PURE__ */ ht({
16
16
  __name: "NavigationTab",
17
17
  setup(n) {
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as C, ref as c, h as s, onMounted as x, resolveComponent as d, openBlock as S, createElementBlock as B, Fragment as M, createVNode as l, unref as o, createElementVNode as u } from "vue";
2
2
  import { components as p } from "@feedmepos/ui-library";
3
- import { u as K } from "./loading-B0_BwPgo.js";
4
- import { u as R } from "./business-C8P05bjQ.js";
5
- import { C as A } from "./campaign-CyYAvl3p.js";
6
- import { _ as P } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DysfUOSp.js";
3
+ import { u as K } from "./loading-Rn4BXFlo.js";
4
+ import { u as R } from "./business-CEL6Cxr7.js";
5
+ import { C as A } from "./campaign-CfB7ZWIg.js";
6
+ import { _ as P } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js";
7
7
  import { _ as U } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
8
- import { _ as Y } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-9emjG6Nc.js";
9
- import { u as D } from "./vue-i18n-fg0FtbNR.js";
8
+ import { _ as Y } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-i_BRgBRC.js";
9
+ import { u as D } from "./vue-i18n-CmMTYitu.js";
10
10
  import { h as E } from "./moment-D7p2TMB-.js";
11
- import { p as I } from "./plugins-DTrOHd7d.js";
12
- import { c as g } from "./campaign-DcLhSQVQ.js";
11
+ import { p as I } from "./plugins-BdQ8LmZm.js";
12
+ import { c as g } from "./campaign-Bz3O-DFr.js";
13
13
  const T = { class: "px-24 flex flex-col gap-y-16" }, $ = { class: "flex items-center justify-between w-full" }, j = { class: "flex gap-8 overflow-x-auto" }, oe = /* @__PURE__ */ C({
14
14
  __name: "Bin",
15
15
  setup(H) {
@@ -0,0 +1,265 @@
1
+ import { defineComponent as H, ref as C, computed as q, onMounted as z, resolveComponent as m, openBlock as d, createElementBlock as h, Fragment as v, createVNode as i, unref as a, createElementVNode as n, withCtx as x, renderList as G, createBlock as S, resolveDynamicComponent as J, toDisplayString as u, createCommentVNode as Q, h as k } from "vue";
2
+ import { _ as W } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as X, components as L } from "@feedmepos/ui-library";
4
+ import { p as Y } from "./plugins-BdQ8LmZm.js";
5
+ import { u as Z } from "./loading-Rn4BXFlo.js";
6
+ import { u as ee } from "./business-CEL6Cxr7.js";
7
+ import { u as te, c as g } from "./campaign-Bz3O-DFr.js";
8
+ import { a as V, b as R, g as ae } from "./campaign-CfB7ZWIg.js";
9
+ import { u as oe, c as ne, p as se } from "./template-_QJbP7yG.js";
10
+ import { u as ce } from "./vue-i18n-CmMTYitu.js";
11
+ import { _ as ie } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
12
+ import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-NtZKuPgi.js";
13
+ const le = { class: "px-24 flex flex-col gap-y-16" }, me = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, ue = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "flex items-center gap-8" }, we = { key: 0 }, be = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, Ce = { class: "flex flex-col gap-16 text-center" }, ve = { class: "fm-typo-en-title-sm-800" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ H({
14
+ __name: "Broadcast",
15
+ setup(Se) {
16
+ const { t: s } = ce(), O = {
17
+ label: s("connect.campaign.common.createCampaign"),
18
+ value: "create",
19
+ isPrimary: !0,
20
+ prependIcon: "add"
21
+ }, T = oe("BROADCAST", X()), I = ee(), p = te(), { global: K, minor: F } = Z, B = C((/* @__PURE__ */ new Date()).toISOString()), r = C({
22
+ searchKey: "",
23
+ location: []
24
+ });
25
+ function P(e) {
26
+ const t = r.value.location;
27
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
28
+ var c;
29
+ return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
30
+ }) : e.targetLocation.includes(t);
31
+ }
32
+ const f = q(
33
+ () => p.campaigns.broadcast.filter((e) => P(e))
34
+ ), $ = [
35
+ {
36
+ header: "Broadcast title",
37
+ accessorFn: (e) => e.name
38
+ },
39
+ {
40
+ header: "Status",
41
+ accessorFn: (e) => ae(e),
42
+ cell(e) {
43
+ return V(e.row.original);
44
+ }
45
+ },
46
+ {
47
+ header: "Summary",
48
+ accessorFn: (e) => R(e)
49
+ },
50
+ {
51
+ header: "Message sent",
52
+ accessorFn: (e) => e.currentReceive ?? "N/A"
53
+ },
54
+ {
55
+ header: "Actions",
56
+ cell(e) {
57
+ return k("div", { class: "flex items-center gap-8 justify-end" }, [
58
+ k(L.FmButton, {
59
+ variant: "tertiary",
60
+ icon: "content_copy",
61
+ iconColor: "neutral-gray-400",
62
+ onClick: async (t) => {
63
+ t.stopPropagation(), await D(e.row.original);
64
+ }
65
+ }),
66
+ k(L.FmButton, {
67
+ variant: "tertiary",
68
+ icon: "delete",
69
+ iconColor: "neutral-gray-400",
70
+ onClick: (t) => {
71
+ t.stopPropagation(), A(e.row.original);
72
+ }
73
+ })
74
+ ]);
75
+ }
76
+ }
77
+ ], w = C();
78
+ async function A(e) {
79
+ await Y.remove(
80
+ s("connect.campaign.common.remove.confirm", { name: e.name })
81
+ ) && await F(
82
+ async () => {
83
+ await g.delete(e._id), await p.read("BROADCAST");
84
+ },
85
+ {
86
+ message: s("connect.campaign.common.remove.removing", { name: e.name }),
87
+ successMessage: s("connect.campaign.common.remove.removed", {
88
+ name: e.name
89
+ })
90
+ }
91
+ );
92
+ }
93
+ async function y(e) {
94
+ B.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await t() : T.open(async (l) => {
95
+ await t(l);
96
+ });
97
+ async function t(l) {
98
+ var c;
99
+ (c = w.value) == null || c.showSheet(
100
+ !0,
101
+ "BROADCAST",
102
+ e ? await g.readById(e._id) : void 0,
103
+ l
104
+ );
105
+ }
106
+ }
107
+ async function D(e) {
108
+ var c;
109
+ if (!await ne(e.name))
110
+ return;
111
+ B.value = (/* @__PURE__ */ new Date()).toISOString();
112
+ const t = await g.readById(e._id), l = se(t);
113
+ (c = w.value) == null || c.showSheet(
114
+ !0,
115
+ "BROADCAST",
116
+ l,
117
+ t.template
118
+ );
119
+ }
120
+ async function j(e) {
121
+ await F(
122
+ async () => {
123
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await p.read("BROADCAST");
124
+ },
125
+ {
126
+ message: s(
127
+ `connect.campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
128
+ ),
129
+ successMessage: s("connect.campaign.broadcast.update.success", {
130
+ action: e.campaign._id ? "updated" : "created"
131
+ })
132
+ }
133
+ );
134
+ }
135
+ return z(async () => {
136
+ await K(async () => {
137
+ await p.read("BROADCAST");
138
+ });
139
+ }), (e, t) => {
140
+ const l = m("FmPageHead"), c = m("FmSearch"), M = m("FmTable"), b = m("FmButton"), N = m("FmListItem"), U = m("FmList"), E = m("FmCard");
141
+ return d(), h(v, null, [
142
+ i(l, {
143
+ title: a(s)("connect.campaign.broadcast.title"),
144
+ actions: a(f).length > 0 ? [O] : [],
145
+ "onClick:action": t[0] || (t[0] = () => y())
146
+ }, null, 8, ["title", "actions"]),
147
+ n("div", le, [
148
+ i(c, {
149
+ modelValue: a(r).searchKey,
150
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => a(r).searchKey = o),
151
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
152
+ placeholder: a(s)("connect.campaign.common.search"),
153
+ collapsible: ""
154
+ }, null, 8, ["modelValue", "placeholder"]),
155
+ a(p).campaigns.broadcast && a(p).campaigns.broadcast.length > 0 ? (d(), h(v, { key: 0 }, [
156
+ n("div", me, [
157
+ n("div", de, [
158
+ i(ie, {
159
+ label: `${a(s)("connect.campaign.common.location")}: `,
160
+ "right-icon": "keyboard_arrow_down",
161
+ modelValue: a(r).location,
162
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => a(r).location = o),
163
+ icon: "storefront",
164
+ "show-item-label": !0,
165
+ items: a(I).locationOptions
166
+ }, null, 8, ["label", "modelValue", "items"])
167
+ ]),
168
+ i(c, {
169
+ modelValue: a(r).searchKey,
170
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => a(r).searchKey = o),
171
+ class: "xs:hidden sm:hidden",
172
+ placeholder: "search",
173
+ collapsible: ""
174
+ }, null, 8, ["modelValue"])
175
+ ]),
176
+ i(M, {
177
+ class: "xs:hidden sm:hidden",
178
+ "row-data": a(f),
179
+ "column-defs": $,
180
+ "search-value": a(r).searchKey,
181
+ "column-filter": [],
182
+ onRowClick: t[4] || (t[4] = (o) => y(o.original)),
183
+ "hide-footer": !0
184
+ }, null, 8, ["row-data", "search-value"]),
185
+ i(U, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
186
+ default: x(() => [
187
+ (d(!0), h(v, null, G(a(f).filter(
188
+ (o) => o.name.toLowerCase().includes(a(r).searchKey.toLowerCase())
189
+ ), (o) => (d(), S(N, {
190
+ key: o._id.toString(),
191
+ onClick: (_) => y(o),
192
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
193
+ }, {
194
+ default: x(() => [
195
+ n("div", pe, [
196
+ n("div", ue, [
197
+ (d(), S(J(a(V)(o)))),
198
+ n("div", ge, u(o.currentReceive ?? 0) + " sent ", 1)
199
+ ]),
200
+ n("div", fe, [
201
+ n("div", ye, u(o.name), 1),
202
+ n("div", _e, u(a(R)(o)), 1)
203
+ ])
204
+ ]),
205
+ n("div", he, [
206
+ i(b, {
207
+ icon: "content_copy",
208
+ "icon-color": "neutral-gray-400",
209
+ variant: "tertiary",
210
+ onClick: async (_) => {
211
+ _.stopPropagation(), await D(o);
212
+ }
213
+ }, null, 8, ["onClick"]),
214
+ i(b, {
215
+ icon: "delete",
216
+ "icon-color": "neutral-gray-400",
217
+ variant: "tertiary",
218
+ onClick: (_) => (_.stopPropagation(), A(o))
219
+ }, null, 8, ["onClick"])
220
+ ])
221
+ ]),
222
+ _: 2
223
+ }, 1032, ["onClick"]))), 128))
224
+ ]),
225
+ _: 1
226
+ }),
227
+ a(f).length == 0 ? (d(), h("div", we, [
228
+ n("div", be, u(a(s)("connect.campaign.common.noResults")), 1)
229
+ ])) : Q("", !0)
230
+ ], 64)) : (d(), S(E, {
231
+ key: 1,
232
+ variant: "outlined",
233
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
234
+ }, {
235
+ default: x(() => [
236
+ t[6] || (t[6] = n("img", {
237
+ src: W,
238
+ class: "aspect-square w-[150px]"
239
+ }, null, -1)),
240
+ n("div", Ce, [
241
+ n("div", ve, u(a(s)("connect.campaign.broadcast.create.title")), 1),
242
+ n("div", xe, u(a(s)("connect.campaign.broadcast.create.description")), 1)
243
+ ]),
244
+ i(b, {
245
+ variant: "primary",
246
+ label: a(s)("connect.campaign.broadcast.create.button"),
247
+ icon: "add",
248
+ onClick: t[5] || (t[5] = (o) => y())
249
+ }, null, 8, ["label"])
250
+ ]),
251
+ _: 1
252
+ })),
253
+ i(re, {
254
+ ref_key: "sheetRef",
255
+ ref: w,
256
+ "onSubmit:modelValue": j
257
+ }, null, 512)
258
+ ])
259
+ ], 64);
260
+ };
261
+ }
262
+ });
263
+ export {
264
+ Pe as default
265
+ };
@@ -1,11 +1,11 @@
1
- import { R as RuleOperator, _ } from "./index-DesSizn4.js";
2
- import { i as isRuleGroup } from "./rule-builder-DwGwUlV1.js";
1
+ import { R as RuleOperator, _ } from "./index-CZoTFXja.js";
2
+ import { i as isRuleGroup } from "./rule-builder-D2sz7Xd9.js";
3
3
  import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
4
4
  import { useDialog } from "@feedmepos/ui-library";
5
- import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-DzQjej5Y.js";
6
- import "./index-B-y0UTZw.js";
7
- import "./index-Ct90ybe0.js";
8
- import "./index-DG_Ej3ec.js";
5
+ import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-BXSp11TE.js";
6
+ import "./index-4gCsL8Hl.js";
7
+ import "./index-DcfdUpTw.js";
8
+ import "./index-D7AT7i0e.js";
9
9
  function validateRule(data, r, date) {
10
10
  const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
11
11
  function meetConditions(e) {
@@ -2,28 +2,28 @@ import { defineComponent as Z, ref as y, computed as E, watch as ne, onMounted a
2
2
  import { _ as ve } from "./campaign-CpzFl8Vr.js";
3
3
  import { h as oe } from "./moment-D7p2TMB-.js";
4
4
  import { useDialog as ye, components as se } from "@feedmepos/ui-library";
5
- import "./index-DIQ2MyWF.js";
6
- import { u as J } from "./loading-B0_BwPgo.js";
5
+ import "./index-DDMr6_UT.js";
6
+ import { u as J } from "./loading-Rn4BXFlo.js";
7
7
  import { u as ce } from "./app-wDQR6dpb.js";
8
- import { u as W } from "./membership-H_whlbUP.js";
8
+ import { u as W } from "./membership-BjklIT2n.js";
9
9
  import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
10
- import { p as pe, f as ie, n as xe } from "./plugins-DTrOHd7d.js";
11
- import { m as L } from "./index-D5xt8OjL.js";
12
- import { z as re } from "./app-CkUBXnib.js";
13
- import { Z as de } from "./zod-BB7zZ5ec.js";
14
- import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-BIKcbIag.js";
15
- import { k as Ce } from "./index-DzQjej5Y.js";
16
- import "./index-DesSizn4.js";
17
- import "./index-B-y0UTZw.js";
18
- import "./index-Ct90ybe0.js";
19
- import "./index-DG_Ej3ec.js";
20
- import { O as Se } from "./objectid-B8LZDZOt.js";
10
+ import { p as pe, f as ie, n as xe } from "./plugins-BdQ8LmZm.js";
11
+ import { m as L } from "./index-6rFsv3Yg.js";
12
+ import { z as re } from "./app-BUFlIAB5.js";
13
+ import { Z as de } from "./zod-C5iXeYjP.js";
14
+ import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-BBavh70d.js";
15
+ import { k as Ce } from "./index-BXSp11TE.js";
16
+ import "./index-CZoTFXja.js";
17
+ import "./index-4gCsL8Hl.js";
18
+ import "./index-DcfdUpTw.js";
19
+ import "./index-D7AT7i0e.js";
20
+ import { O as Se } from "./objectid-Bs1Sha1n.js";
21
21
  import { a as he, c as _e } from "./object-qECH92oz.js";
22
- import { u as we } from "./business-C8P05bjQ.js";
23
- import { w as ke } from "./xlsx-CSQJ3YWk.js";
24
- import { a as Fe, C as Ve } from "./export-B6nvdBmg.js";
25
- import { u as $e, _ as Me } from "./usePagination-Du6qS5aj.js";
26
- import { u as Be } from "./vue-i18n-fg0FtbNR.js";
22
+ import { u as we } from "./business-CEL6Cxr7.js";
23
+ import { w as ke } from "./xlsx-BF8PJO-P.js";
24
+ import { a as Fe, C as Ve } from "./export-CG1ypExs.js";
25
+ import { u as $e, _ as Me } from "./usePagination-Ck7buuI_.js";
26
+ import { u as Be } from "./vue-i18n-CmMTYitu.js";
27
27
  import { o as Ue } from "./objectId-dwaoBfJX.js";
28
28
  const Ae = { class: "space-y-16" }, De = { class: "gap-16 grid grid-cols-2" }, Ie = { class: "space-y-16" }, Ne = {
29
29
  key: 0,
@@ -4,18 +4,18 @@ var J = (v, u, b) => ue(v, typeof u != "symbol" ? u + "" : u, b);
4
4
  import { defineComponent as ae, ref as C, computed as D, watch as W, resolveComponent as p, openBlock as V, createBlock as Q, unref as t, isRef as Z, withCtx as Y, createElementVNode as S, createVNode as i, createElementBlock as T, Fragment as L, renderList as ce, createCommentVNode as q, h as I, onMounted as de } from "vue";
5
5
  import { h as E } from "./moment-D7p2TMB-.js";
6
6
  import { components as ee } from "@feedmepos/ui-library";
7
- import "./index-DIQ2MyWF.js";
7
+ import "./index-DDMr6_UT.js";
8
8
  import { J as me } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as le } from "./loading-B0_BwPgo.js";
9
+ import { u as le } from "./loading-Rn4BXFlo.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-DcLhSQVQ.js";
12
+ import { c as re, u as ge } from "./campaign-Bz3O-DFr.js";
13
13
  import { e as h } from "./index-vh86FiIQ.js";
14
- import { u as X, w as be } from "./xlsx-CSQJ3YWk.js";
15
- import { g as he } from "./user-Be8HNWuo.js";
16
- import { u as Ce, _ as ve } from "./usePagination-Du6qS5aj.js";
17
- import { a as te } from "./plugins-DTrOHd7d.js";
18
- import { m as ye } from "./index-D5xt8OjL.js";
14
+ import { u as X, w as be } from "./xlsx-BF8PJO-P.js";
15
+ import { g as he } from "./user-BWTfkoD6.js";
16
+ import { u as Ce, _ as ve } from "./usePagination-Ck7buuI_.js";
17
+ import { a as te } from "./plugins-BdQ8LmZm.js";
18
+ import { m as ye } from "./index-6rFsv3Yg.js";
19
19
  import { o as oe } from "./objectId-dwaoBfJX.js";
20
20
  const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, Ve = { class: "flex items-center gap-8" }, we = /* @__PURE__ */ ae({
21
21
  __name: "CreateCollectionSheet",