@feedmepos/mf-connect 0.1.38-beta.7 → 0.1.38-beta.71

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 (153) hide show
  1. package/dist/{Analytic-NNi-22sK.js → Analytic-BY0xqCru.js} +16 -16
  2. package/dist/{App-Bu14Mro_.js → App-n6-XqhU7.js} +625 -619
  3. package/dist/AuditLogs-Dml3WjdH.js +1991 -0
  4. package/dist/{Bin-CnAQA85j.js → Bin-DaPZyWm-.js} +10 -10
  5. package/dist/Broadcast-hLmkBNne.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DC_fReu7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BahnNhzD.js} +6 -6
  7. package/dist/{Card-DqAGiETA.js → Card-C_Fm3E0s.js} +144 -140
  8. package/dist/Collections-DAUsUa0c.js +540 -0
  9. package/dist/Credit-DklbckuQ.js +261 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-vpnaCdLI.js +3167 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js +351 -0
  14. package/dist/Experience-D3Ve8dCI.js +260 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-Bg15HHd0.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-BJzRdZNg.js +331 -0
  18. package/dist/GenerateMaterial-pDWgptXt.js +589 -0
  19. package/dist/Grab-B0D8SpcD.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js} +49 -48
  21. package/dist/{Index-loHkiwyo.js → Index-ysSM8-pd.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C7bEzQ4b.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-Kt1Wiz87.js} +1 -1
  24. package/dist/Marketing-CFS6ff03.js +145 -0
  25. package/dist/MarketingMaterialEdit-BDYr5Rlw.js +746 -0
  26. package/dist/{Member-BQjQQdoA.js → Member-Dgb3QBKF.js} +38 -37
  27. package/dist/{MemberList-WPsEUKf_.js → MemberList-CfcQUvN8.js} +158 -159
  28. package/dist/{MemberTransactions-BtM7dugy.js → MemberTransactions-BVwGdpXo.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bl9sFIwG.js → MessageInput.vue_vue_type_script_setup_true_lang-Dj3h51yH.js} +13463 -10597
  30. package/dist/Mission-B9K8-Wrt.js +335 -0
  31. package/dist/{Overview-Bsf5IPOg.js → Overview-DJgKxAvU.js} +24 -25
  32. package/dist/Point-lev1_Nit.js +263 -0
  33. package/dist/Promotion-De9e8yPj.js +397 -0
  34. package/dist/{Queue-XFVbSuDw.js → Queue-DH_F0Ekd.js} +14 -15
  35. package/dist/{Record-CQzujESE.js → Record-CH2AZqzF.js} +10 -10
  36. package/dist/{Reward-Dj_h_May.js → Reward-BUgOAjd4.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Clxk-oYM.js → RewardGroup.vue_vue_type_script_setup_true_lang-KTaTLjjw.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-rs5kKp_v.js +1912 -0
  39. package/dist/{Segment-D_DUu_Sp.js → Segment-DL6O--Aw.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3C2mVlv.js → SelectItems.vue_vue_type_script_setup_true_lang-ZUGDMD5J.js} +23 -23
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0vsl8oV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIeyrheH.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-5HkJROSb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BAtXxIjO.js} +4 -4
  43. package/dist/Setting-DOA80XlJ.js +1999 -0
  44. package/dist/SettingAdvertisements-Dl0eisXq.js +263 -0
  45. package/dist/Store-fni1Xblz.js +1995 -0
  46. package/dist/StoreRewards-CLMO-kNi.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BlBovyiT.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jYcuAa.js +7005 -0
  49. package/dist/{Tier-YQsLRt06.js → Tier-B0_DiVNv.js} +561 -480
  50. package/dist/{Title-C5gxYNvh.js → Title-twptCzpk.js} +149 -147
  51. package/dist/{Transaction-CZ_QdIii.js → Transaction-CTX5I6gO.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bp-rIgz4.js} +7 -7
  53. package/dist/Voucher-C7Kxmzjr.js +422 -0
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-lZQTZUUU.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js → ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js} +2 -2
  56. package/dist/app-D5GVWKxc.js +59071 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-DZYFoAKz.js → business-BvNsRlY4.js} +11 -8
  59. package/dist/{campaign-Ca4l6UUg.js → campaign-DRErhSfb.js} +29 -25
  60. package/dist/campaign-MN_o01w6.js +253 -0
  61. package/dist/campaign.enum-BtfwwLCf.js +26 -0
  62. package/dist/campaign.fn-BgSGxLPo.js +776 -0
  63. package/dist/{collectible.enum-DnIeDAB-.js → collectible.enum-CV2tpD2C.js} +1 -1
  64. package/dist/{collection.fn-mQfXEwJv.js → collection.fn-BYjqObg7.js} +2 -2
  65. package/dist/dto-CyhnIGn-.js +222 -0
  66. package/dist/duplicateCampaign-jOZ1UznM.js +51 -0
  67. package/dist/effect-NKfquhhR.js +89 -0
  68. package/dist/{email-addresses-CQYqi2rN.js → email-addresses-EmFJeFmB.js} +2 -2
  69. package/dist/{export-BsikVZw2.js → export-B70Bp6s8.js} +9 -10
  70. package/dist/{helper-n74IteBU.js → helper-DiSstsUa.js} +22 -7
  71. package/dist/index-5FmmWAib.js +30289 -0
  72. package/dist/index-B09KKPb4.js +3419 -0
  73. package/dist/{index-CrHCbDIs.js → index-BgP5ZHK6.js} +3 -3
  74. package/dist/{index-DRrSsoqp.js → index-C46EHygk.js} +1 -1
  75. package/dist/{index-Bg3fAg5z.js → index-CD7Ji4Nw.js} +1 -1
  76. package/dist/{index-BJ-IAF-1.js → index-CHXlBh7-.js} +1 -1
  77. package/dist/{index-BpjT8Rx0.js → index-Cr2243n7.js} +455 -245
  78. package/dist/index-CrDg9PFk.js +8912 -0
  79. package/dist/index-CuvNtC_M.js +61 -0
  80. package/dist/{index-Dt6wui_L.js → index-DK45XoFG.js} +3 -3
  81. package/dist/{index-DTErPYrT.js → index-Qg_bzaF2.js} +1 -1
  82. package/dist/{index-Do7TcKmg.js → index-bAmlAkpk.js} +4 -1
  83. package/dist/index-nTpkh7pU.js +28897 -0
  84. package/dist/index-tvZKdKVU.js +36 -0
  85. package/dist/{index.esm2017-T7F54Aqa.js → index.esm2017-B8fYlj6l.js} +185 -185
  86. package/dist/loading-DVr3dbZ1.js +215 -0
  87. package/dist/{lodash-B5I3zXaY.js → lodash-BNr1VEn2.js} +1 -1
  88. package/dist/{membership-BRy4jMt2.js → membership-LEuPDIbe.js} +3 -3
  89. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  90. package/dist/{money-B9Auav5u.js → money-CogUwiv6.js} +1 -1
  91. package/dist/{number-BdhIBsUp.js → number-C5wGUTN5.js} +1 -1
  92. package/dist/objectid-DbUENFHd.js +145 -0
  93. package/dist/{campaign-162kZMje.js → plugins-BxKrsjEx.js} +784 -777
  94. package/dist/remy-D_Deb3ue.js +13 -0
  95. package/dist/{reward-UuqZUHsq.js → reward-CM4Wx2zA.js} +1 -1
  96. package/dist/{rule-D158NIpm.js → rule-CMMr2GMg.js} +505 -487
  97. package/dist/rule-builder-D5QsmOxi.js +102 -0
  98. package/dist/style.css +11 -2
  99. package/dist/template-BDKqBasy.js +188 -0
  100. package/dist/timezone-DuaWQsQ2.js +1154 -0
  101. package/dist/trigger-IcyZcRow.js +213 -0
  102. package/dist/usePagination-D8OEDsCt.js +223 -0
  103. package/dist/user-u3blYzG2.js +55 -0
  104. package/dist/vue-i18n-DfD8ZY6j.js +2365 -0
  105. package/dist/{xlsx-Ddqi5i8p.js → xlsx-Bgf4_JHr.js} +1 -1
  106. package/dist/{zod-Bg2FbC-D.js → zod-9J33xiFS.js} +32 -31
  107. package/package.json +14 -6
  108. package/dist/AuditLogs-Cai9CVBl.js +0 -1887
  109. package/dist/Broadcast-DskXjXn4.js +0 -227
  110. package/dist/Collections-DuaIQAk7.js +0 -465
  111. package/dist/Credit-D40Vzu2g.js +0 -222
  112. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  113. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsQ4iAsV.js +0 -2185
  114. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js +0 -347
  115. package/dist/Experience-B9yHQPuj.js +0 -223
  116. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  117. package/dist/Game-e9-Q3qmO.js +0 -278
  118. package/dist/Marketing-CipbukIV.js +0 -20073
  119. package/dist/Mission-B_DJ3Yu_.js +0 -296
  120. package/dist/Point-DMphcWjy.js +0 -226
  121. package/dist/Promotion-B33A-Jwe.js +0 -289
  122. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CGAXTOLN.js +0 -1751
  123. package/dist/Setting-CtdC4G3W.js +0 -1936
  124. package/dist/Store-DCksWACh.js +0 -1842
  125. package/dist/StoreRewards-CHWKYKet.js +0 -423
  126. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D1TDyD6N.js +0 -1029
  127. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D59sGO3F.js +0 -139
  128. package/dist/Voucher-BzV8yZ3o.js +0 -384
  129. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js +0 -419
  130. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  131. package/dist/app-FFOpPHwj.js +0 -33357
  132. package/dist/app-az9e8Yfl.js +0 -7086
  133. package/dist/campaign.enum-DWjyDV2D.js +0 -20
  134. package/dist/campaign.fn-DWWJ74z-.js +0 -758
  135. package/dist/dto-mKZIPV4o.js +0 -214
  136. package/dist/effect-B8UexeyG.js +0 -78
  137. package/dist/index-5ShiAY8U.js +0 -8861
  138. package/dist/index-Bf6AmJwX.js +0 -32260
  139. package/dist/index-C5gjIb5d.js +0 -146
  140. package/dist/index-C9YrDtDN.js +0 -38
  141. package/dist/index-CK-MAqWE.js +0 -3120
  142. package/dist/index-CsaQJMAR.js +0 -66
  143. package/dist/index-f4MzX8IY.js +0 -30038
  144. package/dist/loading-BEAayQS-.js +0 -71
  145. package/dist/objectid-K-JVTsfA.js +0 -145
  146. package/dist/plugins-CWlRYif_.js +0 -208
  147. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  148. package/dist/rule-builder-DNeViq0I.js +0 -89
  149. package/dist/template-B02wYF7G.js +0 -190
  150. package/dist/trigger-BDjnKHLI.js +0 -144
  151. package/dist/usePagination-BeF5K3M7.js +0 -223
  152. package/dist/user-DbP37Ohh.js +0 -54
  153. package/dist/vue-i18n-BbhkYWlk.js +0 -2365
@@ -0,0 +1,397 @@
1
+ import { defineComponent as Q, ref as w, resolveComponent as d, openBlock as f, createBlock as S, unref as a, isRef as te, withCtx as k, createElementVNode as i, createVNode as c, computed as ne, h as I, onMounted as ae, createElementBlock as L, Fragment as B, renderList as se, resolveDynamicComponent as ie, toDisplayString as h } from "vue";
2
+ import { _ as re } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as le, components as N } from "@feedmepos/ui-library";
4
+ import { c as $, p as j } from "./plugins-BxKrsjEx.js";
5
+ import { u as ce } from "./loading-DVr3dbZ1.js";
6
+ import { u as me } from "./business-BvNsRlY4.js";
7
+ import { u as ue } from "./campaign-DRErhSfb.js";
8
+ import { u as de } from "./vue-i18n-DfD8ZY6j.js";
9
+ import { g as q, a as pe, b as K } from "./campaign-MN_o01w6.js";
10
+ import { c as fe, p as ye } from "./duplicateCampaign-jOZ1UznM.js";
11
+ import { e as U } from "./effect-NKfquhhR.js";
12
+ import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-vpnaCdLI.js";
13
+ import { c as y } from "./index-bAmlAkpk.js";
14
+ import { u as he } from "./template-BDKqBasy.js";
15
+ import { _ as E } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
16
+ const _e = { class: "space-y-8" }, be = /* @__PURE__ */ Q({
17
+ __name: "QueueSheet",
18
+ emits: ["update:model-value"],
19
+ setup(H, { expose: n, emit: R }) {
20
+ const p = w(!1), _ = w([]);
21
+ async function P() {
22
+ p.value = !0;
23
+ const r = await y.getPromotionQueue();
24
+ console.log(r, "jobs"), _.value = r;
25
+ }
26
+ const v = [
27
+ {
28
+ header: "Started At",
29
+ accessorFn: (r) => r.createdAt,
30
+ enableSorting: !0
31
+ },
32
+ {
33
+ header: "Campaigns",
34
+ accessorFn: (r) => r.campaigns
35
+ // cell(props) {
36
+ // const r = props.row.original;
37
+ // return h('div', {
38
+ // innerHTML: r.campaigns.map((c: any) => c.name).join(', '),
39
+ // });
40
+ // },
41
+ }
42
+ ];
43
+ return n({
44
+ showSheet: P
45
+ }), (r, u) => {
46
+ const b = d("FmTable"), T = d("FmSideSheet");
47
+ return f(), S(T, {
48
+ "max-width": 550,
49
+ header: "Promotion Sync Queue",
50
+ modelValue: a(p),
51
+ "onUpdate:modelValue": [
52
+ u[1] || (u[1] = (s) => te(p) ? p.value = s : null),
53
+ u[2] || (u[2] = (s) => p.value = s)
54
+ ]
55
+ }, {
56
+ default: k(() => [
57
+ i("div", _e, [
58
+ u[3] || (u[3] = i("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Promotion synchronizing to your restaurant(s) is queued here. Depending on the number of campaigns and restaurants, this process may take several minutes. No task displayed here means there are no pending promotions to sync. ", -1)),
59
+ c(b, {
60
+ modelValue: r.tableRef,
61
+ "onUpdate:modelValue": u[0] || (u[0] = (s) => r.tableRef = s),
62
+ "column-filter": r.jobFilters,
63
+ "column-defs": v,
64
+ "row-data": a(_),
65
+ "hide-footer": a(_).length <= 10
66
+ }, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"])
67
+ ])
68
+ ]),
69
+ _: 1
70
+ }, 8, ["modelValue"]);
71
+ };
72
+ }
73
+ }), we = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, Ce = { class: "flex gap-8 overflow-x-auto" }, xe = { class: "space-y-8" }, Fe = { class: "flex w-full gap-4 items-center" }, Se = { class: "space-y-4" }, ke = { class: "fm-typo-en-body-lg-600" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "flex items-center gap-8" }, Oe = { class: "flex flex-col gap-16 text-center" }, Ie = { class: "fm-typo-en-title-sm-800" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ge = /* @__PURE__ */ Q({
74
+ __name: "Promotion",
75
+ setup(H) {
76
+ const { t: n } = de(), R = {
77
+ label: n("connect.promotion.createCampaign"),
78
+ value: "create",
79
+ isPrimary: !0,
80
+ prependIcon: "add"
81
+ }, p = {
82
+ label: "Force sync",
83
+ value: "sync",
84
+ isPrimary: !1,
85
+ prependIcon: "refresh"
86
+ }, _ = {
87
+ label: "Queue",
88
+ value: "queue",
89
+ isPrimary: !1,
90
+ prependIcon: "work_history"
91
+ }, P = he("PROMOTION", le()), v = me(), r = ue(), { global: u, minor: b } = ce, T = [
92
+ {
93
+ label: "Bill promotion",
94
+ value: "BILL"
95
+ },
96
+ {
97
+ label: "Item promotion",
98
+ value: "ITEM"
99
+ }
100
+ ], s = w({
101
+ searchKey: "",
102
+ location: [],
103
+ effectType: []
104
+ });
105
+ function z(e) {
106
+ const o = s.value.location;
107
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((m) => {
108
+ var l;
109
+ return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(m);
110
+ }) : e.targetLocation.includes(o);
111
+ }
112
+ function G(e) {
113
+ var l, x;
114
+ const o = s.value.effectType;
115
+ if (!o || o.length === 0) return !0;
116
+ const m = (x = (l = e.effect) == null ? void 0 : l.options) == null ? void 0 : x.target;
117
+ return o.includes(m);
118
+ }
119
+ const g = ne(
120
+ () => r.campaigns.promotion.filter(
121
+ (e) => z(e) && G(e)
122
+ )
123
+ ), J = [
124
+ {
125
+ header: n("connect.promotion.promotionTitle"),
126
+ accessorFn: (e) => e.name
127
+ },
128
+ {
129
+ header: n("connect.promotion.campaignDate"),
130
+ accessorFn: (e) => q(e)
131
+ },
132
+ {
133
+ header: n("connect.promotion.status"),
134
+ accessorFn: (e) => pe(e),
135
+ cell(e) {
136
+ return K(e.row.original);
137
+ }
138
+ },
139
+ {
140
+ header: n("connect.promotion.type"),
141
+ accessorFn: (e) => `${$.title(e.effect.options.target)} promotion`
142
+ },
143
+ {
144
+ header: n("connect.promotion.summary"),
145
+ accessorFn: (e) => U(e.effect)
146
+ },
147
+ {
148
+ header: n("connect.promotion.actions"),
149
+ cell(e) {
150
+ return I("div", { class: "flex items-center gap-8 justify-end" }, [
151
+ I(N.FmButton, {
152
+ variant: "tertiary",
153
+ icon: "content_copy",
154
+ iconColor: "neutral-gray-400",
155
+ onClick: async (o) => {
156
+ o.stopPropagation(), await M(e.row.original);
157
+ }
158
+ }),
159
+ I(N.FmButton, {
160
+ variant: "tertiary",
161
+ icon: "delete",
162
+ iconColor: "neutral-gray-400",
163
+ onClick: (o) => {
164
+ o.stopPropagation(), D(e.row.original);
165
+ }
166
+ })
167
+ ]);
168
+ }
169
+ }
170
+ ], V = w(), A = w();
171
+ async function D(e) {
172
+ await j.remove(
173
+ n("connect.promotion.confirmRemove", { name: e.name })
174
+ ) && await b(
175
+ async () => {
176
+ await y.delete(e._id), await r.read("PROMOTION");
177
+ },
178
+ {
179
+ message: n("connect.promotion.removing", { name: e.name }),
180
+ successMessage: n("connect.promotion.removedSuccessfully", {
181
+ name: e.name
182
+ })
183
+ }
184
+ );
185
+ }
186
+ async function C(e) {
187
+ e ? await o() : P.open(async (m) => {
188
+ await o(m);
189
+ });
190
+ async function o(m) {
191
+ var l;
192
+ (l = V.value) == null || l.showSheet(
193
+ !0,
194
+ "PROMOTION",
195
+ e ? await y.readById(e._id) : void 0,
196
+ m
197
+ );
198
+ }
199
+ }
200
+ async function M(e) {
201
+ var l;
202
+ if (!await fe(e.name))
203
+ return;
204
+ const o = await y.readById(e._id), m = ye(o);
205
+ (l = V.value) == null || l.showSheet(
206
+ !0,
207
+ "PROMOTION",
208
+ m,
209
+ o.template
210
+ );
211
+ }
212
+ async function W(e) {
213
+ await b(
214
+ async () => {
215
+ e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await r.read("PROMOTION");
216
+ },
217
+ {
218
+ message: n(
219
+ e.campaign._id ? "connect.promotion.updating" : "connect.promotion.creating"
220
+ ),
221
+ successMessage: n(
222
+ e.campaign._id ? "connect.promotion.updatedSuccessfully" : "connect.promotion.createdSuccessfully"
223
+ )
224
+ }
225
+ );
226
+ }
227
+ async function X(e) {
228
+ var o;
229
+ switch (e) {
230
+ case "create":
231
+ C();
232
+ break;
233
+ case "sync":
234
+ await j.confirm(
235
+ "Are you sure you want to synchronize all promotions to POS?",
236
+ "Force sync"
237
+ ) && b(
238
+ async () => {
239
+ await y.syncAllPromotion();
240
+ },
241
+ {
242
+ message: "Syncing promotions...",
243
+ successMessage: "All promotions synced"
244
+ }
245
+ );
246
+ break;
247
+ case "queue":
248
+ (o = A.value) == null || o.showSheet();
249
+ break;
250
+ }
251
+ }
252
+ return ae(async () => {
253
+ await u(async () => {
254
+ await v.readLocations(), await r.read("PROMOTION");
255
+ });
256
+ }), (e, o) => {
257
+ const m = d("FmPageHead"), l = d("FmSearch"), x = d("FmTable"), Y = d("FmChip"), O = d("FmButton"), Z = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
258
+ return f(), L(B, null, [
259
+ c(m, {
260
+ title: a(n)("connect.promotion.title"),
261
+ actions: a(g).length > 0 ? [R, p, _] : [],
262
+ "onClick:action": X
263
+ }, null, 8, ["title", "actions"]),
264
+ i("div", we, [
265
+ c(l, {
266
+ modelValue: s.value.searchKey,
267
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.searchKey = t),
268
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
269
+ placeholder: a(n)("connect.promotion.search"),
270
+ collapsible: ""
271
+ }, null, 8, ["modelValue", "placeholder"]),
272
+ a(g) && a(g).length > 0 ? (f(), L(B, { key: 0 }, [
273
+ i("div", ve, [
274
+ i("div", Ce, [
275
+ c(E, {
276
+ label: `${a(n)("connect.common.location")}: `,
277
+ "right-icon": "keyboard_arrow_down",
278
+ modelValue: s.value.location,
279
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => s.value.location = t),
280
+ icon: "storefront",
281
+ "show-item-label": !0,
282
+ items: a(v).locationOptions
283
+ }, null, 8, ["label", "modelValue", "items"]),
284
+ c(E, {
285
+ label: "Type:",
286
+ "right-icon": "keyboard_arrow_down",
287
+ modelValue: s.value.effectType,
288
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => s.value.effectType = t),
289
+ icon: "filter_list",
290
+ "show-item-label": !0,
291
+ items: T
292
+ }, null, 8, ["modelValue"])
293
+ ]),
294
+ c(l, {
295
+ modelValue: s.value.searchKey,
296
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => s.value.searchKey = t),
297
+ class: "xs:hidden sm:hidden",
298
+ placeholder: "search",
299
+ collapsible: ""
300
+ }, null, 8, ["modelValue"])
301
+ ]),
302
+ c(x, {
303
+ class: "xs:hidden sm:hidden",
304
+ "row-data": a(g),
305
+ "column-defs": J,
306
+ "search-value": s.value.searchKey,
307
+ "column-filter": [],
308
+ onRowClick: o[4] || (o[4] = (t) => C(t.original)),
309
+ "hide-footer": a(g).length < 10
310
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
311
+ c(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
312
+ default: k(() => [
313
+ (f(!0), L(B, null, se(a(g).filter(
314
+ (t) => t.name.toLowerCase().includes(s.value.searchKey.toLowerCase())
315
+ ), (t) => (f(), S(Z, {
316
+ key: t._id.toString(),
317
+ onClick: (F) => C(t),
318
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
319
+ }, {
320
+ default: k(() => [
321
+ i("div", xe, [
322
+ i("div", Fe, [
323
+ (f(), S(ie(a(K)(t)))),
324
+ c(Y, {
325
+ class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
326
+ compact: !0,
327
+ label: `${a($).title(t.effect.options.target)} promotion`
328
+ }, null, 8, ["label"])
329
+ ]),
330
+ i("div", Se, [
331
+ i("div", ke, h(t.name), 1),
332
+ i("div", Pe, h(a(U)(t.effect)), 1),
333
+ i("div", Te, h(a(n)("connect.promotion.campaignDate")) + ": " + h(a(q)(t)), 1)
334
+ ])
335
+ ]),
336
+ i("div", Ve, [
337
+ c(O, {
338
+ icon: "content_copy",
339
+ "icon-color": "neutral-gray-400",
340
+ variant: "tertiary",
341
+ onClick: async (F) => {
342
+ F.stopPropagation(), await M(t);
343
+ }
344
+ }, null, 8, ["onClick"]),
345
+ c(O, {
346
+ icon: "delete",
347
+ "icon-color": "neutral-gray-400",
348
+ variant: "tertiary",
349
+ onClick: (F) => (F.stopPropagation(), D(t))
350
+ }, null, 8, ["onClick"])
351
+ ])
352
+ ]),
353
+ _: 2
354
+ }, 1032, ["onClick"]))), 128))
355
+ ]),
356
+ _: 1
357
+ })
358
+ ], 64)) : (f(), S(oe, {
359
+ key: 1,
360
+ variant: "outlined",
361
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
362
+ }, {
363
+ default: k(() => [
364
+ o[6] || (o[6] = i("img", {
365
+ src: re,
366
+ class: "aspect-square w-[150px]"
367
+ }, null, -1)),
368
+ i("div", Oe, [
369
+ i("div", Ie, h(a(n)("connect.promotion.createPromotionCampaign")), 1),
370
+ i("div", Le, h(a(n)("connect.promotion.description")), 1)
371
+ ]),
372
+ c(O, {
373
+ variant: "primary",
374
+ label: a(n)("connect.promotion.createPromotionCampaign"),
375
+ icon: "add",
376
+ onClick: o[5] || (o[5] = (t) => C())
377
+ }, null, 8, ["label"])
378
+ ]),
379
+ _: 1
380
+ }))
381
+ ]),
382
+ c(ge, {
383
+ ref_key: "sheetRef",
384
+ ref: V,
385
+ "onSubmit:modelValue": W
386
+ }, null, 512),
387
+ c(be, {
388
+ ref_key: "queueSheetRef",
389
+ ref: A
390
+ }, null, 512)
391
+ ], 64);
392
+ };
393
+ }
394
+ });
395
+ export {
396
+ Ge as default
397
+ };
@@ -1,19 +1,18 @@
1
1
  import { defineComponent as h, h as n, ref as A, watch as B, onBeforeMount as U, resolveComponent as V, openBlock as z, createElementBlock as O, Fragment as q, createVNode as m, unref as o, createElementVNode as g } from "vue";
2
- import { u as G, _ as L } from "./usePagination-BeF5K3M7.js";
3
- import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
4
- import { c as u, a as Y } from "./plugins-CWlRYif_.js";
2
+ import { u as G, _ as L } from "./usePagination-D8OEDsCt.js";
3
+ import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
4
+ import { c as u, a as Y } from "./plugins-BxKrsjEx.js";
5
5
  import { useDialog as j, components as y } from "@feedmepos/ui-library";
6
- import "./index-BpjT8Rx0.js";
7
- import { J as c, c as d } from "./index-CK-MAqWE.js";
8
- import "./index-5ShiAY8U.js";
9
- import "./index-C9YrDtDN.js";
10
- import "./index-Dt6wui_L.js";
11
- import "./index-Bf6AmJwX.js";
12
- import { h as b } from "./moment-BWErdI6_.js";
13
- import { u as W } from "./vue-i18n-BbhkYWlk.js";
14
- import { u as H, v as J, w as K } from "./index.esm2017-T7F54Aqa.js";
6
+ import "./index-Cr2243n7.js";
7
+ import { J as c, c as d } from "./index-B09KKPb4.js";
8
+ import "./index-CrDg9PFk.js";
9
+ import "./index-5FmmWAib.js";
10
+ import "./index-DK45XoFG.js";
11
+ import { h as b } from "./moment-D7p2TMB-.js";
12
+ import { u as W } from "./vue-i18n-DfD8ZY6j.js";
13
+ import { u as H, v as J, w as K } from "./index.esm2017-B8fYlj6l.js";
15
14
  import { useRoute as Q } from "vue-router";
16
- import { g as $, S as Z, u as X } from "./index-f4MzX8IY.js";
15
+ import { g as $, S as Z, u as X } from "./index-nTpkh7pU.js";
17
16
  import { o as ee } from "./objectId-dwaoBfJX.js";
18
17
  const te = () => {
19
18
  if (!Z.getBusinessId()) throw new Error("Invalid business ID");
@@ -28,7 +27,7 @@ const te = () => {
28
27
  }
29
28
  };
30
29
  var ae = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" };
31
- const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, xe = /* @__PURE__ */ h({
30
+ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-center justify-between" }, se = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, ve = /* @__PURE__ */ h({
32
31
  __name: "Queue",
33
32
  setup(p) {
34
33
  const v = Q().query.type, { t: x } = W(), E = j(), C = [
@@ -256,5 +255,5 @@ const re = { class: "p-24 flex flex-col gap-y-2" }, ne = { class: "flex items-ce
256
255
  }
257
256
  });
258
257
  export {
259
- xe as default
258
+ ve as default
260
259
  };
@@ -2,20 +2,20 @@ var q = Object.defineProperty;
2
2
  var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[o] = m;
3
3
  var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
4
4
  import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
5
- import { u as oe, _ as ae } from "./usePagination-BeF5K3M7.js";
6
- import { g as A } from "./user-DbP37Ohh.js";
5
+ import { u as oe, _ as ae } from "./usePagination-D8OEDsCt.js";
6
+ import { g as A } from "./user-u3blYzG2.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-Bf6AmJwX.js";
9
- import { u as j } from "./vue-i18n-BbhkYWlk.js";
10
- import { u as L } from "./loading-BEAayQS-.js";
8
+ import "./index-5FmmWAib.js";
9
+ import { u as j } from "./vue-i18n-DfD8ZY6j.js";
10
+ import { u as L } from "./loading-DVr3dbZ1.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-BJ-IAF-1.js";
12
+ import { r as v } from "./index-CHXlBh7-.js";
13
13
  import { c as ie, a as ne } from "./object-qECH92oz.js";
14
- import { u as ce } from "./membership-BRy4jMt2.js";
15
- import { a as le, c as de } from "./plugins-CWlRYif_.js";
16
- import { u as V, w as me } from "./xlsx-Ddqi5i8p.js";
14
+ import { u as ce } from "./membership-LEuPDIbe.js";
15
+ import { a as le, c as de } from "./plugins-BxKrsjEx.js";
16
+ import { u as V, w as me } from "./xlsx-Bgf4_JHr.js";
17
17
  import { e as f } from "./index-vh86FiIQ.js";
18
- import { h as ue } from "./moment-BWErdI6_.js";
18
+ import { h as ue } from "./moment-D7p2TMB-.js";
19
19
  import { o as pe } from "./objectId-dwaoBfJX.js";
20
20
  const fe = {
21
21
  key: 0,
@@ -1,26 +1,26 @@
1
1
  import { defineComponent as X, ref as x, computed as H, resolveComponent as w, openBlock as b, createBlock as h, unref as t, isRef as Z, withCtx as A, createElementVNode as f, createVNode as d, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as O, onMounted as q, toDisplayString as B } from "vue";
2
2
  import { _ as z } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as Q, components as L } from "@feedmepos/ui-library";
4
- import { u as G } from "./loading-BEAayQS-.js";
5
- import { u as J, C as ee } from "./membership-BRy4jMt2.js";
6
- import { f as j, p as te } from "./plugins-CWlRYif_.js";
7
- import { u as oe } from "./vue-i18n-BbhkYWlk.js";
4
+ import { u as G } from "./loading-DVr3dbZ1.js";
5
+ import { u as J, C as ee } from "./membership-LEuPDIbe.js";
6
+ import { f as j, p as te } from "./plugins-BxKrsjEx.js";
7
+ import { u as oe } from "./vue-i18n-DfD8ZY6j.js";
8
8
  import { c as ae } from "./object-qECH92oz.js";
9
- import { Z as _ } from "./zod-Bg2FbC-D.js";
10
- import "./index-5ShiAY8U.js";
11
- import { F as N } from "./index-Dt6wui_L.js";
9
+ import { Z as _ } from "./zod-9J33xiFS.js";
10
+ import "./index-CrDg9PFk.js";
11
+ import { F as N } from "./index-DK45XoFG.js";
12
12
  import { useCoreStore as le } from "@feedmepos/mf-common";
13
- import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js";
14
- import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js";
13
+ import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-lZQTZUUU.js";
14
+ import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js";
15
15
  import { J as K } from "./JsonViewer-v8_C7l5N.js";
16
- import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js";
17
- import { i as de } from "./helper-n74IteBU.js";
18
- import { u as pe, r as P } from "./reward-UuqZUHsq.js";
19
- import "./index-DRrSsoqp.js";
20
- import { C as ce } from "./campaign.fn-DWWJ74z-.js";
21
- import { e as me } from "./effect-B8UexeyG.js";
16
+ import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js";
17
+ import { i as de } from "./helper-DiSstsUa.js";
18
+ import { u as pe, r as P } from "./reward-CM4Wx2zA.js";
19
+ import "./index-C46EHygk.js";
20
+ import { C as ce } from "./campaign.fn-BgSGxLPo.js";
21
+ import { e as me } from "./effect-NKfquhhR.js";
22
22
  import { useRouter as ue } from "vue-router";
23
- import { R as ye } from "./app-az9e8Yfl.js";
23
+ import { R as ye } from "./app-D5GVWKxc.js";
24
24
  const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ X({
25
25
  __name: "EditRewardSheet",
26
26
  emits: ["update"],
@@ -1,19 +1,18 @@
1
1
  import { ref as p, defineComponent as T, computed as x, resolveComponent as y, openBlock as U, createBlock as G, unref as e, isRef as $, withCtx as b, createElementVNode as v, createVNode as u, toDisplayString as j } from "vue";
2
- import { u as B } from "./loading-BEAayQS-.js";
2
+ import { u as B } from "./loading-DVr3dbZ1.js";
3
3
  import { J as P } from "./JsonViewer-v8_C7l5N.js";
4
- import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js";
5
- import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js";
6
- import { Z as L } from "./zod-Bg2FbC-D.js";
4
+ import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js";
5
+ import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-Bp-rIgz4.js";
6
+ import { Z as L } from "./zod-9J33xiFS.js";
7
7
  import { u as V } from "./app-wDQR6dpb.js";
8
8
  import { defineStore as N } from "pinia";
9
- import { r as k } from "./index-BJ-IAF-1.js";
10
- import { c as E } from "./index-BpjT8Rx0.js";
11
- import "./index-CK-MAqWE.js";
12
- import "./index-5ShiAY8U.js";
13
- import "./index-C9YrDtDN.js";
14
- import "./index-Dt6wui_L.js";
15
- import "./index-Bf6AmJwX.js";
16
- import { u as J } from "./vue-i18n-BbhkYWlk.js";
9
+ import { r as k } from "./index-CHXlBh7-.js";
10
+ import { c as E } from "./index-Cr2243n7.js";
11
+ import "./index-B09KKPb4.js";
12
+ import "./index-CrDg9PFk.js";
13
+ import "./index-5FmmWAib.js";
14
+ import "./index-DK45XoFG.js";
15
+ import { u as J } from "./vue-i18n-DfD8ZY6j.js";
17
16
  import { c as C } from "./object-qECH92oz.js";
18
17
  import { useDialog as Z } from "@feedmepos/ui-library";
19
18
  const A = N("mf-connect-referral", () => {
@@ -103,7 +102,7 @@ const A = N("mf-connect-referral", () => {
103
102
  }, 8, ["modelValue", "header"]);
104
103
  };
105
104
  }
106
- }), de = /* @__PURE__ */ T({
105
+ }), me = /* @__PURE__ */ T({
107
106
  __name: "RewardGroup",
108
107
  setup(h, { expose: _ }) {
109
108
  const { minor: c } = B, n = Z(), m = A(), s = x(() => {
@@ -145,6 +144,6 @@ const A = N("mf-connect-referral", () => {
145
144
  }
146
145
  });
147
146
  export {
148
- de as _,
147
+ me as _,
149
148
  A as u
150
149
  };