@feedmepos/mf-connect 0.1.38-beta.21 → 0.1.38-beta.23

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 (94) hide show
  1. package/dist/{Analytic-CEd_WApy.js → Analytic-xMxbAEul.js} +13 -13
  2. package/dist/{App-ulCtuU5o.js → App-DkBJoQa2.js} +303 -307
  3. package/dist/{AuditLogs-BM1Np61K.js → AuditLogs-CkpffM8N.js} +9 -9
  4. package/dist/{Bin-icbjnKXw.js → Bin-D3JHC66F.js} +8 -8
  5. package/dist/{Broadcast-COQ3E8vI.js → Broadcast-eCxNA0EG.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BbXEYOFK.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BMrLc0hX.js} +6 -6
  7. package/dist/{Card-Cwh3GXi0.js → Card-CaOvpWvL.js} +16 -16
  8. package/dist/{Collections-EuOjzpkL.js → Collections-CxScAHZl.js} +6 -6
  9. package/dist/{Credit-BY2Fpdhh.js → Credit-BnPpMq8q.js} +9 -9
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BEnaGmCW.js +3109 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BLw3-hI1.js → EffectSheet.vue_vue_type_style_index_0_lang-DJhtUAk_.js} +6 -6
  12. package/dist/{Experience-rAH7zk71.js → Experience-nMxubr1P.js} +9 -9
  13. package/dist/{Game-DlI0yNF0.js → Game-C8pHAp1o.js} +10 -10
  14. package/dist/Grab-DjTma0rb.js +282 -0
  15. package/dist/{Index-DemXFS3d.js → Index-COHMtBIi.js} +10 -10
  16. package/dist/{Marketing-shNBO9Rc.js → Marketing-C3R9Rw4y.js} +7112 -5424
  17. package/dist/{Member-C19ZgpaL.js → Member-gjwH9kPr.js} +10 -10
  18. package/dist/{MemberList-B2tNB4yg.js → MemberList-Bg_zsGbz.js} +25 -25
  19. package/dist/{MemberTransactions-BN3qaTVY.js → MemberTransactions-7aZsIeZL.js} +1 -1
  20. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BY3j1h72.js → MessageInput.vue_vue_type_script_setup_true_lang-DtPV3l4w.js} +2285 -2219
  21. package/dist/{Mission-j1KI0-hJ.js → Mission-DqAahrB0.js} +10 -10
  22. package/dist/{Overview-BN2Vdu8Q.js → Overview-_b_4mLBe.js} +18 -18
  23. package/dist/{Point-8zy7QcTk.js → Point-CsMZA2do.js} +9 -9
  24. package/dist/{Promotion-mcUcylXB.js → Promotion-j4_gUzqi.js} +10 -10
  25. package/dist/{Queue-BsNv4P8u.js → Queue-MOdvEl5u.js} +10 -10
  26. package/dist/{Record-VA6Bdlnz.js → Record-BQIQBdc6.js} +8 -8
  27. package/dist/{Reward-CVyO3Ga1.js → Reward-DABAfCmo.js} +15 -15
  28. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BR9_a9bJ.js → RewardGroup.vue_vue_type_script_setup_true_lang-D-BK8GZ4.js} +11 -11
  29. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Dhs2whAH.js → RuleGroup.vue_vue_type_script_setup_true_lang-ClwtUvs9.js} +13 -13
  30. package/dist/{Segment-BMgcdIIS.js → Segment-DSpcce-q.js} +22 -22
  31. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CKRpWcn_.js → SelectItems.vue_vue_type_script_setup_true_lang-CZu-7I-8.js} +2 -2
  32. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DZCNcdVW.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D5Oc0pqy.js} +11 -11
  33. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BESF672g.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-7NWmWQjo.js} +3 -3
  34. package/dist/{Setting-BMKKkZTD.js → Setting-DTFpHJd7.js} +11 -11
  35. package/dist/{Store-DdxMDtfL.js → Store-mAraPykq.js} +19 -19
  36. package/dist/{StoreRewards-CRyeHEMF.js → StoreRewards-C1Cw1Nij.js} +13 -13
  37. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS6-9WP9.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C_igl8vi.js} +20 -20
  38. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BTKpclKX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D3c0qO9i.js} +1 -1
  39. package/dist/{Tier-D5Xmp5vV.js → Tier-B7AUECOs.js} +20 -20
  40. package/dist/{Title-CsK2crqD.js → Title-DWw4-4cE.js} +19 -19
  41. package/dist/{Transaction-Dvfc9x4f.js → Transaction-ClZvbeDP.js} +2 -2
  42. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CqCxWltm.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cen_yXF7.js} +6 -6
  43. package/dist/{Voucher-CPN7TMho.js → Voucher-BBYDF1GX.js} +13 -13
  44. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DMye9MS3.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Vscwqd3r.js} +10 -10
  45. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CnaQAEKo.js → ZodTextField.vue_vue_type_script_setup_true_lang-C2yUE0Cq.js} +1 -1
  46. package/dist/{app-DRBevJsF.js → app-9boJd9tw.js} +1 -1
  47. package/dist/{app-DteFjR9L.js → app-DLdolyB3.js} +740 -676
  48. package/dist/app.js +1 -1
  49. package/dist/{business-BqV9jK-p.js → business-D900a5Tb.js} +1 -1
  50. package/dist/{campaign-CsWoG6e_.js → campaign-DXo7F7aH.js} +29 -25
  51. package/dist/{campaign-BHDq-yx-.js → campaign-D_F3xj3O.js} +27 -14
  52. package/dist/{campaign.enum-Dfa96W5V.js → campaign.enum-CG0IjpL0.js} +3 -2
  53. package/dist/{campaign.fn-pLrwyHA_.js → campaign.fn-B6f4zAed.js} +37 -37
  54. package/dist/{collectible.enum-BYTYWPsR.js → collectible.enum-0jg7mZtz.js} +1 -1
  55. package/dist/{collection.fn-CYLIQJig.js → collection.fn-BDcZoQfR.js} +2 -2
  56. package/dist/{dto-DBfDbpyb.js → dto-Diu2Xl3e.js} +51 -39
  57. package/dist/{effect-D9pD5RCk.js → effect-DvIk5Cg6.js} +1 -1
  58. package/dist/{email-addresses-BApvdLkQ.js → email-addresses-DQf3ZdZP.js} +1 -1
  59. package/dist/{export--EfmCiw0.js → export-WSVAzeqR.js} +3 -3
  60. package/dist/{helper-BHiK3pLT.js → helper-CzsKE573.js} +1 -1
  61. package/dist/{index-CD2bkLo_.js → index-1-H1oqKb.js} +1 -1
  62. package/dist/{index-B9_Tn8si.js → index-B6Kbxgky.js} +1 -1
  63. package/dist/{index-DXM3o6kl.js → index-B6KkRHaV.js} +1 -1
  64. package/dist/{index-DYgdunxw.js → index-Bej-AJUB.js} +3 -3
  65. package/dist/{index-C1Vrltkc.js → index-CErvxcDp.js} +1 -1
  66. package/dist/{index-Bqc7PV3K.js → index-D-VZHYyP.js} +1 -1
  67. package/dist/{index-CVxruvVB.js → index-D1fzmeG6.js} +3 -3
  68. package/dist/{index-Pd9RCQxn.js → index-D3wppWii.js} +1 -1
  69. package/dist/{index-COiVJ9pA.js → index-DMg2pJLu.js} +1 -1
  70. package/dist/{index-qd_dvZcw.js → index-DPyNXHg6.js} +16 -16
  71. package/dist/{index-Cc80pBYX.js → index-DWN3abQr.js} +573 -573
  72. package/dist/{index-CDLBLuYq.js → index-DlwPVNEv.js} +845 -708
  73. package/dist/{index-2dknXEFJ.js → index-__X1c_dR.js} +184 -15
  74. package/dist/{index-BSQXDDQY.js → index-uJ-YdKV1.js} +3 -3
  75. package/dist/{index.esm2017-DAWS_ALH.js → index.esm2017-shNT9EQF.js} +1 -1
  76. package/dist/{loading-BVUeda4s.js → loading-CBKMbqM5.js} +1 -1
  77. package/dist/{membership-BL_43RJR.js → membership-DQa8yaY2.js} +3 -3
  78. package/dist/{money-Cd8hLiNc.js → money-IYgOL6F1.js} +1 -1
  79. package/dist/{number-DVb8PSrj.js → number-DXdhRp2S.js} +1 -1
  80. package/dist/{objectid-D33s3gxp.js → objectid-DABStWGB.js} +5 -5
  81. package/dist/{plugins-BKtBkC9Q.js → plugins-DXwZ_v63.js} +2 -2
  82. package/dist/{reward-f41dJcaL.js → reward-DYiYZcJC.js} +1 -1
  83. package/dist/{rule-Cbux1-fC.js → rule-Beum_Zy5.js} +3 -3
  84. package/dist/{rule-builder-BrZeF45Z.js → rule-builder-BLNgIsjE.js} +12 -10
  85. package/dist/style.css +1 -1
  86. package/dist/{template-tqhgmIdT.js → template-C5PTDFfm.js} +4 -4
  87. package/dist/{timezone-DaTVH4y0.js → timezone-PLVeOMdC.js} +1 -1
  88. package/dist/{trigger-C34RfwrT.js → trigger-B0u2ZuY-.js} +4 -4
  89. package/dist/{user-DgKhDLYr.js → user-BlM3HCwC.js} +1 -1
  90. package/dist/{vue-i18n-xo56wiwi.js → vue-i18n-CwrnHMwQ.js} +246 -246
  91. package/dist/{xlsx-D8ZZRjtf.js → xlsx-BAbyCaI0.js} +1 -1
  92. package/package.json +1 -1
  93. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js +0 -2188
  94. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as P, ref as C, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as O, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
2
- import { z as te } from "./app-DteFjR9L.js";
2
+ import { z as te } from "./app-DLdolyB3.js";
3
3
  import { Z as u } from "./zod-Bg2FbC-D.js";
4
- import { f as le, g as oe } from "./index-qd_dvZcw.js";
5
- import { u as Z } from "./vue-i18n-xo56wiwi.js";
6
- import { s as R } from "./effect-D9pD5RCk.js";
7
- import { p as ae } from "./plugins-BKtBkC9Q.js";
8
- import { O as ne } from "./app-DRBevJsF.js";
4
+ import { g as le, f as oe } from "./index-DPyNXHg6.js";
5
+ import { u as Z } from "./vue-i18n-CwrnHMwQ.js";
6
+ import { s as R } from "./effect-DvIk5Cg6.js";
7
+ import { p as ae } from "./plugins-DXwZ_v63.js";
8
+ import { O as ne } from "./app-9boJd9tw.js";
9
9
  const ie = { class: "flex flex-col gap-8" }, se = {
10
10
  key: 0,
11
11
  class: "fm-typo-en-body-lg-600"
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as D, ref as S, computed as E, onMounted as U, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as x, createVNode as c, unref as t, createElementVNode as n, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as M, toDisplayString as p, h as H } from "vue";
2
2
  import { _ as q } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as z, components as G } from "@feedmepos/ui-library";
4
- import { p as J } from "./plugins-BKtBkC9Q.js";
5
- import { u as Q } from "./loading-BVUeda4s.js";
6
- import { u as W } from "./business-BqV9jK-p.js";
7
- import { u as X } from "./campaign-CsWoG6e_.js";
8
- import { a as L, b as V, g as Y } from "./campaign-BHDq-yx-.js";
9
- import { u as Z } from "./vue-i18n-xo56wiwi.js";
4
+ import { p as J } from "./plugins-DXwZ_v63.js";
5
+ import { u as Q } from "./loading-CBKMbqM5.js";
6
+ import { u as W } from "./business-D900a5Tb.js";
7
+ import { u as X } from "./campaign-DXo7F7aH.js";
8
+ import { a as L, b as V, g as Y } from "./campaign-D_F3xj3O.js";
9
+ import { u as Z } from "./vue-i18n-CwrnHMwQ.js";
10
10
  import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
11
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js";
12
- import { u as oe } from "./template-tqhgmIdT.js";
13
- import { c as g } from "./index-CD2bkLo_.js";
11
+ import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BEnaGmCW.js";
12
+ import { u as oe } from "./template-C5PTDFfm.js";
13
+ import { c as g } from "./index-1-H1oqKb.js";
14
14
  const ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "flex flex-col gap-16 text-center" }, fe = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ D({
15
15
  __name: "Experience",
16
16
  setup(ge) {
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as N, ref as v, computed as q, onMounted as z, resolveComponent as r, openBlock as p, createElementBlock as C, Fragment as b, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as c, renderList as J, createBlock as k, resolveDynamicComponent as O, h as l } from "vue";
2
2
  import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as W, components as w } from "@feedmepos/ui-library";
4
- import { a as X, p as Y } from "./plugins-BKtBkC9Q.js";
5
- import { u as Z } from "./loading-BVUeda4s.js";
6
- import { u as ee } from "./business-BqV9jK-p.js";
7
- import { u as te } from "./campaign-CsWoG6e_.js";
8
- import { a as $, b as A, g as oe } from "./campaign-BHDq-yx-.js";
4
+ import { a as X, p as Y } from "./plugins-DXwZ_v63.js";
5
+ import { u as Z } from "./loading-CBKMbqM5.js";
6
+ import { u as ee } from "./business-D900a5Tb.js";
7
+ import { u as te } from "./campaign-DXo7F7aH.js";
8
+ import { a as $, b as A, g as oe } from "./campaign-D_F3xj3O.js";
9
9
  import { _ as ae } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js";
11
- import { u as se } from "./template-tqhgmIdT.js";
12
- import { u as ie } from "./vue-i18n-xo56wiwi.js";
13
- import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DZCNcdVW.js";
14
- import { c as x } from "./index-CD2bkLo_.js";
10
+ import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BEnaGmCW.js";
11
+ import { u as se } from "./template-C5PTDFfm.js";
12
+ import { u as ie } from "./vue-i18n-CwrnHMwQ.js";
13
+ import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-D5Oc0pqy.js";
14
+ import { c as x } from "./index-1-H1oqKb.js";
15
15
  const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "flex flex-col gap-16 text-center" }, ve = { class: "fm-typo-en-title-sm-800" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ N({
16
16
  __name: "Game",
17
17
  setup(be) {
@@ -0,0 +1,282 @@
1
+ import { defineComponent as z, ref as S, computed as q, h as J, onMounted as Q, resolveComponent as m, openBlock as d, createElementBlock as h, Fragment as w, createVNode as s, unref as n, withCtx as b, createElementVNode as c, renderList as W, createBlock as v, resolveDynamicComponent as X, toDisplayString as T } from "vue";
2
+ import { _ as Y } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as Z, components as ee } from "@feedmepos/ui-library";
4
+ import { p as L } from "./plugins-DXwZ_v63.js";
5
+ import { u as te } from "./loading-CBKMbqM5.js";
6
+ import { u as oe } from "./business-D900a5Tb.js";
7
+ import { u as ae } from "./campaign-DXo7F7aH.js";
8
+ import { u as ne } from "./vue-i18n-CwrnHMwQ.js";
9
+ import { g as re, a as B } from "./campaign-D_F3xj3O.js";
10
+ import { s as se, _ as le } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BEnaGmCW.js";
11
+ import { u as ie } from "./template-C5PTDFfm.js";
12
+ import { _ as V } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
13
+ import { c as f } from "./index-1-H1oqKb.js";
14
+ const ce = { class: "px-24 flex flex-col gap-y-16" }, me = { class: "flex items-center justify-between w-full" }, ue = { class: "flex gap-8 overflow-x-auto" }, de = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, fe = { class: "flex flex-col gap-16 text-center" }, ge = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = /* @__PURE__ */ z({
15
+ __name: "Grab",
16
+ setup(be) {
17
+ const { t: a } = ne(), I = {
18
+ label: a("connect.grab.createCampaign"),
19
+ value: "create",
20
+ isPrimary: !0,
21
+ prependIcon: "add"
22
+ }, O = {
23
+ label: "Force sync",
24
+ value: "sync",
25
+ isPrimary: !1,
26
+ prependIcon: "refresh"
27
+ }, A = ie("GRAB", Z()), x = oe(), g = ae(), { global: R, minor: _ } = te, M = [
28
+ {
29
+ label: "Bill promotion",
30
+ value: "BILL"
31
+ },
32
+ {
33
+ label: "Item promotion",
34
+ value: "ITEM"
35
+ }
36
+ ], r = S({
37
+ searchKey: "",
38
+ location: [],
39
+ effectType: []
40
+ });
41
+ function K(e) {
42
+ const t = r.value.location;
43
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
44
+ var i;
45
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
46
+ }) : e.targetLocation.includes(t);
47
+ }
48
+ function $(e) {
49
+ var i, p;
50
+ const t = r.value.effectType;
51
+ if (!t || t.length === 0) return !0;
52
+ const l = (p = (i = e.effect) == null ? void 0 : i.options) == null ? void 0 : p.target;
53
+ return t.includes(l);
54
+ }
55
+ const u = q(
56
+ () => g.campaigns.grab.filter(
57
+ (e) => K(e) && $(e)
58
+ )
59
+ ), D = [
60
+ {
61
+ header: a("connect.grab.promotionTitle"),
62
+ accessorFn: (e) => e.name
63
+ },
64
+ {
65
+ header: a("connect.grab.status"),
66
+ accessorFn: (e) => re(e),
67
+ cell(e) {
68
+ return B(e.row.original);
69
+ }
70
+ },
71
+ {
72
+ header: a("connect.grab.summary"),
73
+ cell(e) {
74
+ const t = se(e.row.original.discount);
75
+ return `${t.type} - ${t.adjustment}`;
76
+ }
77
+ },
78
+ {
79
+ header: a("connect.grab.actions"),
80
+ cell(e) {
81
+ return J(ee.FmButton, {
82
+ variant: "tertiary",
83
+ icon: "delete",
84
+ iconColor: "neutral-gray-400",
85
+ onClick: (t) => {
86
+ t.stopPropagation(), F(e.row.original);
87
+ }
88
+ });
89
+ }
90
+ }
91
+ ], C = S();
92
+ async function F(e) {
93
+ await L.remove(a("connect.grab.confirmRemove", { name: e.name })) && await _(
94
+ async () => {
95
+ await f.delete(e._id), await g.read("PROMOTION");
96
+ },
97
+ {
98
+ message: a("connect.grab.removing", { name: e.name }),
99
+ successMessage: a("connect.grab.removedSuccessfully", {
100
+ name: e.name
101
+ })
102
+ }
103
+ );
104
+ }
105
+ async function y(e) {
106
+ e ? await t() : A.open(async (l) => {
107
+ await t(l);
108
+ });
109
+ async function t(l) {
110
+ var i;
111
+ (i = C.value) == null || i.showSheet(
112
+ !0,
113
+ "GRAB",
114
+ e ? await f.readById(e._id) : void 0,
115
+ l
116
+ );
117
+ }
118
+ }
119
+ async function N(e) {
120
+ await _(
121
+ async () => {
122
+ e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await g.read("PROMOTION");
123
+ },
124
+ {
125
+ message: a(
126
+ e.campaign._id ? "connect.grab.updating" : "connect.grab.creating"
127
+ ),
128
+ successMessage: a(
129
+ e.campaign._id ? "connect.grab.updatedSuccessfully" : "connect.grab.createdSuccessfully"
130
+ )
131
+ }
132
+ );
133
+ }
134
+ async function U(e) {
135
+ switch (e) {
136
+ case "create":
137
+ y();
138
+ break;
139
+ case "sync":
140
+ await L.confirm(
141
+ "Are you sure you want to synchronize all promotions to POS?",
142
+ "Force sync"
143
+ ) && _(
144
+ async () => {
145
+ await f.syncAllPromotion();
146
+ },
147
+ {
148
+ message: "Syncing promotions...",
149
+ successMessage: "All promotions synced"
150
+ }
151
+ );
152
+ break;
153
+ }
154
+ }
155
+ return Q(async () => {
156
+ await R(async () => {
157
+ await x.readLocations(), await g.read("PROMOTION");
158
+ });
159
+ }), (e, t) => {
160
+ const l = m("FmPill"), i = m("FmPageHead"), p = m("FmSearch"), j = m("FmTable"), k = m("FmButton"), E = m("FmListItem"), G = m("FmList"), H = m("FmCard");
161
+ return d(), h(w, null, [
162
+ s(i, {
163
+ title: n(a)("connect.grab.title"),
164
+ actions: n(u).length > 0 ? [I, O] : [],
165
+ "onClick:action": U
166
+ }, {
167
+ prepend: b(() => [
168
+ s(l, { variant: "beta" }),
169
+ s(l, { variant: "premium" })
170
+ ]),
171
+ _: 1
172
+ }, 8, ["title", "actions"]),
173
+ c("div", ce, [
174
+ s(p, {
175
+ modelValue: r.value.searchKey,
176
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => r.value.searchKey = o),
177
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
178
+ placeholder: n(a)("connect.grab.search"),
179
+ collapsible: ""
180
+ }, null, 8, ["modelValue", "placeholder"]),
181
+ n(u) && n(u).length > 0 ? (d(), h(w, { key: 0 }, [
182
+ c("div", me, [
183
+ c("div", ue, [
184
+ s(V, {
185
+ label: `${n(a)("connect.common.location")}: `,
186
+ "right-icon": "keyboard_arrow_down",
187
+ modelValue: r.value.location,
188
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value.location = o),
189
+ icon: "storefront",
190
+ "show-item-label": !0,
191
+ items: n(x).locationOptions
192
+ }, null, 8, ["label", "modelValue", "items"]),
193
+ s(V, {
194
+ label: "Type:",
195
+ "right-icon": "keyboard_arrow_down",
196
+ modelValue: r.value.effectType,
197
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value.effectType = o),
198
+ icon: "filter_list",
199
+ "show-item-label": !0,
200
+ items: M
201
+ }, null, 8, ["modelValue"])
202
+ ]),
203
+ s(p, {
204
+ modelValue: r.value.searchKey,
205
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => r.value.searchKey = o),
206
+ class: "xs:hidden",
207
+ placeholder: "search",
208
+ collapsible: ""
209
+ }, null, 8, ["modelValue"])
210
+ ]),
211
+ s(j, {
212
+ class: "xs:hidden",
213
+ "row-data": n(u),
214
+ "column-defs": D,
215
+ "search-value": r.value.searchKey,
216
+ "column-filter": [],
217
+ onRowClick: t[4] || (t[4] = (o) => y(o.original)),
218
+ "hide-footer": n(u).length < 10
219
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
220
+ s(G, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
221
+ default: b(() => [
222
+ (d(!0), h(w, null, W(n(u).filter(
223
+ (o) => o.name.toLowerCase().includes(r.value.searchKey.toLowerCase())
224
+ ), (o) => (d(), v(E, {
225
+ key: o._id.toString(),
226
+ onClick: (P) => y(o),
227
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
228
+ }, {
229
+ default: b(() => [
230
+ c("div", de, [
231
+ c("div", pe, [
232
+ (d(), v(X(n(B)(o))))
233
+ ])
234
+ ]),
235
+ s(k, {
236
+ icon: "delete",
237
+ "icon-color": "neutral-gray-400",
238
+ variant: "tertiary",
239
+ onClick: (P) => (P.stopPropagation(), F(o))
240
+ }, null, 8, ["onClick"])
241
+ ]),
242
+ _: 2
243
+ }, 1032, ["onClick"]))), 128))
244
+ ]),
245
+ _: 1
246
+ })
247
+ ], 64)) : (d(), v(H, {
248
+ key: 1,
249
+ variant: "outlined",
250
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
251
+ }, {
252
+ default: b(() => [
253
+ t[6] || (t[6] = c("img", {
254
+ src: Y,
255
+ class: "aspect-square w-[150px]"
256
+ }, null, -1)),
257
+ c("div", fe, [
258
+ c("div", ge, T(n(a)("connect.grab.createPromotionCampaign")), 1),
259
+ c("div", ye, T(n(a)("connect.grab.description")), 1)
260
+ ]),
261
+ s(k, {
262
+ variant: "primary",
263
+ label: n(a)("connect.grab.createPromotionCampaign"),
264
+ icon: "add",
265
+ onClick: t[5] || (t[5] = (o) => y())
266
+ }, null, 8, ["label"])
267
+ ]),
268
+ _: 1
269
+ }))
270
+ ]),
271
+ s(le, {
272
+ ref_key: "sheetRef",
273
+ ref: C,
274
+ "onSubmit:modelValue": N
275
+ }, null, 512)
276
+ ], 64);
277
+ };
278
+ }
279
+ });
280
+ export {
281
+ Ve as default
282
+ };
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as $, createElementVNode as c, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, normalizeClass as G, computed as L, Fragment as q, isRef as J } from "vue";
2
- import { u as H } from "./vue-i18n-xo56wiwi.js";
3
- import "./index-B9_Tn8si.js";
2
+ import { u as H } from "./vue-i18n-CwrnHMwQ.js";
3
+ import "./index-B6Kbxgky.js";
4
4
  import { useRouter as K } from "vue-router";
5
- import { u as Q } from "./loading-BVUeda4s.js";
6
- import { f as V, p as X } from "./plugins-BKtBkC9Q.js";
7
- import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-BR9_a9bJ.js";
5
+ import { u as Q } from "./loading-CBKMbqM5.js";
6
+ import { f as V, p as X } from "./plugins-DXwZ_v63.js";
7
+ import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-D-BK8GZ4.js";
8
8
  import { useDialog as ee, useSnackbar as ne, FmButtonVariant as p } from "@feedmepos/ui-library";
9
- import { r as N } from "./index-COiVJ9pA.js";
10
- import { u as ae } from "./reward-f41dJcaL.js";
11
- import { u as oe } from "./business-BqV9jK-p.js";
12
- import { u as te } from "./membership-BL_43RJR.js";
13
- import { R as S } from "./app-DteFjR9L.js";
9
+ import { r as N } from "./index-DMg2pJLu.js";
10
+ import { u as ae } from "./reward-DYiYZcJC.js";
11
+ import { u as oe } from "./business-D900a5Tb.js";
12
+ import { u as te } from "./membership-DQa8yaY2.js";
13
+ import { R as S } from "./app-DLdolyB3.js";
14
14
  const re = { class: "space-y-24" }, le = {
15
15
  key: 0,
16
16
  class: /* @__PURE__ */ G([