@feedmepos/mf-connect 0.1.38-beta.61 → 0.1.38-beta.62

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 (107) hide show
  1. package/dist/{Analytic-CM7mh-iO.js → Analytic-Ktq94hC8.js} +14 -14
  2. package/dist/{App-CeCzzsDu.js → App-Daubz7oj.js} +7 -7
  3. package/dist/{AuditLogs-VWx8DFKA.js → AuditLogs-Bwoks-rM.js} +9 -9
  4. package/dist/{Bin-vUuol_I9.js → Bin-asHUb1BJ.js} +8 -8
  5. package/dist/Broadcast-BVB-Mjqq.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CczwlN2n.js} +6 -6
  7. package/dist/{Card-CeIeGET1.js → Card-Bp4EJbgK.js} +17 -17
  8. package/dist/{Collections-CF_OcAL3.js → Collections-CyDN3QhT.js} +7 -7
  9. package/dist/Credit-DrwSgNh7.js +261 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-n8_AVbJA.js} +203 -199
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js → EffectSheet.vue_vue_type_style_index_0_lang-DnAOFGed.js} +6 -6
  12. package/dist/Experience-BBrZLaRM.js +260 -0
  13. package/dist/{FileSaver.min-lgg_oBvT.js → FileSaver.min-o8dgYPp0.js} +1 -1
  14. package/dist/Game-AxwzBRrJ.js +331 -0
  15. package/dist/{GenerateMaterial-B5A7mx2y.js → GenerateMaterial-BObD7Yrf.js} +6 -6
  16. package/dist/{Grab-BgiMqwvj.js → Grab-CiN-phhI.js} +9 -9
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js → ImageInput.vue_vue_type_script_setup_true_lang-CgdcGP3N.js} +1 -1
  18. package/dist/{Index-B85ops8K.js → Index-CQXbQ7vK.js} +10 -10
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D53NnPhs.js} +1 -1
  20. package/dist/{MainLayout-CXGVkD-W.js → MainLayout-COA3zuDN.js} +1 -1
  21. package/dist/{Marketing-Bnijl7lA.js → Marketing-_0bICW80.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-BlUKwSoP.js → MarketingMaterialEdit-L1ab7aJG.js} +4 -4
  23. package/dist/{Member-sT853g51.js → Member-C9RRcxUA.js} +11 -11
  24. package/dist/{MemberList-DYT5_fSP.js → MemberList-CSe2F9QS.js} +25 -25
  25. package/dist/{MemberTransactions-Cqce5ebe.js → MemberTransactions-Da1Nfbi4.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js → MessageInput.vue_vue_type_script_setup_true_lang-DjYaXNTE.js} +8 -8
  27. package/dist/Mission-CTJANu6a.js +335 -0
  28. package/dist/{Overview-B0rwrHR1.js → Overview-CgrXFJ5H.js} +18 -18
  29. package/dist/Point-B4g37KPT.js +263 -0
  30. package/dist/Promotion-V0MoAX2t.js +397 -0
  31. package/dist/{Queue-SVqRUlD_.js → Queue-uUrzJCdY.js} +10 -10
  32. package/dist/{Record-BTjg4ihy.js → Record-BT-4kOS8.js} +9 -9
  33. package/dist/{Reward-DW58VMRO.js → Reward-Cqfur_b7.js} +16 -16
  34. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js → RewardGroup.vue_vue_type_script_setup_true_lang-CWFxdopa.js} +11 -11
  35. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js → RuleGroup.vue_vue_type_script_setup_true_lang-C5BATPr7.js} +14 -14
  36. package/dist/{Segment-Dny8pxP1.js → Segment-DlzmOheV.js} +24 -24
  37. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js → SelectItems.vue_vue_type_script_setup_true_lang-Bur2bSCd.js} +2 -2
  38. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BqYZehIO.js} +12 -12
  39. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CXot-RF0.js} +4 -4
  40. package/dist/{Setting-CjcnxK34.js → Setting-CtIHp56x.js} +13 -13
  41. package/dist/{SettingAdvertisements-CIyDF4C8.js → SettingAdvertisements-nT78blMx.js} +11 -11
  42. package/dist/{Store-B8k5YVqU.js → Store-DA54GAU7.js} +20 -20
  43. package/dist/{StoreRewards-BW08rwpL.js → StoreRewards-BH_CG0_m.js} +14 -14
  44. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js → StoreTransactions.vue_vue_type_script_setup_true_lang-yX42EwdC.js} +19 -19
  45. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CJSNkho6.js} +1 -1
  46. package/dist/{Tier-DKzu4tYw.js → Tier-Bv9Jc58B.js} +23 -23
  47. package/dist/{Title-BK-TXatJ.js → Title-BzhaAeWE.js} +20 -20
  48. package/dist/{Transaction-Duayg1jd.js → Transaction-D6l7eUto.js} +2 -2
  49. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BOlKr1u5.js} +6 -6
  50. package/dist/{Voucher-BEVAkNeJ.js → Voucher-c9rOPty1.js} +164 -142
  51. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js → VoucherEditor.vue_vue_type_script_setup_true_lang-gM2Q2SZj.js} +12 -12
  52. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js → ZodTextField.vue_vue_type_script_setup_true_lang--cPeKAQK.js} +2 -2
  53. package/dist/{app-IvbII0ql.js → app-rrEjDuDH.js} +78 -48
  54. package/dist/app.js +1 -1
  55. package/dist/{business-BFIwFfkq.js → business-BtKxs_y6.js} +1 -1
  56. package/dist/{campaign-w9j4I4jn.js → campaign-Dp6iTHEz.js} +2 -2
  57. package/dist/{campaign-RuIwxc4y.js → campaign-rXQhZIDH.js} +8 -8
  58. package/dist/{campaign.enum-IHLsfdik.js → campaign.enum-Deak-UID.js} +1 -1
  59. package/dist/{campaign.fn-B_P1MkRV.js → campaign.fn-At50e4px.js} +32 -32
  60. package/dist/{collectible.enum-CUgSjO08.js → collectible.enum-BKAKCyYj.js} +1 -1
  61. package/dist/{collection.fn-CrfnNb41.js → collection.fn-DPhZ4J5s.js} +2 -2
  62. package/dist/{dto-jwO_sX9I.js → dto-Dr0nOU62.js} +4 -4
  63. package/dist/duplicateCampaign-5fhHX37P.js +35 -0
  64. package/dist/{effect--0g8PNyt.js → effect-CFMQ5REv.js} +1 -1
  65. package/dist/{email-addresses-HtsxvXw9.js → email-addresses-RpPqY7Ns.js} +2 -2
  66. package/dist/{export-CFEwMRmd.js → export-CYQVBcQQ.js} +2 -2
  67. package/dist/{helper-CCfb24PO.js → helper-NA1sBf5O.js} +1 -1
  68. package/dist/{index-CR3f3BXQ.js → index-B5ZaTTfd.js} +4 -4
  69. package/dist/{index-CppLPpqB.js → index-B7JPvTGD.js} +3 -3
  70. package/dist/{index-CkuPY85X.js → index-CA1VTtfl.js} +1 -1
  71. package/dist/{index-wzSeRJAd.js → index-CXj0NuF-.js} +1 -1
  72. package/dist/{index-Bflu4Rft.js → index-CfdrsgL1.js} +3 -3
  73. package/dist/{index-BR3UbZ0F.js → index-Cjz7ja8g.js} +1 -1
  74. package/dist/{index-DDYH-IEX.js → index-DQBsBSAl.js} +1 -1
  75. package/dist/{index-B-AMMFfT.js → index-De8KJ5ee.js} +4 -4
  76. package/dist/{index-DdZdHioZ.js → index-DgbKnxUQ.js} +6 -6
  77. package/dist/{index-BZEM0T2A.js → index-DoQbrp4H.js} +1 -1
  78. package/dist/{index-Dic_WcAL.js → index-Du1J2M6c.js} +1 -1
  79. package/dist/{index-CZPcwcUo.js → index-FB5JDcqo.js} +3 -3
  80. package/dist/{index-DpjYgKTN.js → index-ZDRZDJJ-.js} +1 -1
  81. package/dist/{index.esm2017-CUnjzfU-.js → index.esm2017-DWyiVIYc.js} +1 -1
  82. package/dist/{loading-CivgDw5C.js → loading-BsFOHhQ7.js} +2 -2
  83. package/dist/{lodash-BSbv_9TG.js → lodash-DYYviyoC.js} +1 -1
  84. package/dist/{membership-j2w1YUO-.js → membership-UU6e1zGd.js} +3 -3
  85. package/dist/{money-DL-x8hiT.js → money-CreQ4gmS.js} +1 -1
  86. package/dist/{number-D1yoFGEr.js → number-CVU6hHec.js} +1 -1
  87. package/dist/{objectid-CHab6j3r.js → objectid-C23E4-r1.js} +13 -13
  88. package/dist/{plugins-P-V4XWmW.js → plugins-DhptoQqr.js} +3 -3
  89. package/dist/{reward-BqMlBQRu.js → reward-CawSKEN7.js} +1 -1
  90. package/dist/{rule-CztsLdki.js → rule-DfoqRN4t.js} +3 -3
  91. package/dist/{rule-builder-DANv7Rmz.js → rule-builder-TeN72YwV.js} +1 -1
  92. package/dist/{template-Dbz3FhHK.js → template-CFKkBFuQ.js} +6 -6
  93. package/dist/{timezone-BgVqObBq.js → timezone-aMH10XL_.js} +2 -2
  94. package/dist/{trigger-CbriUibd.js → trigger-wauWh36i.js} +5 -5
  95. package/dist/{usePagination-DtNK7W0U.js → usePagination-CMQVYF13.js} +1 -1
  96. package/dist/{user-CVapqHfr.js → user-DaUp8rok.js} +1 -1
  97. package/dist/{vue-i18n-tpDAnnmD.js → vue-i18n-gi9JUtvo.js} +157 -157
  98. package/dist/{xlsx-EewcN2uY.js → xlsx-BNx9zr-c.js} +1 -1
  99. package/dist/{zod-D-wiCQRJ.js → zod-_ZFtblDD.js} +1 -1
  100. package/package.json +1 -1
  101. package/dist/Broadcast-6VXz4-IG.js +0 -233
  102. package/dist/Credit-BUqGOyp_.js +0 -226
  103. package/dist/Experience-BxiFH_uV.js +0 -225
  104. package/dist/Game-BzYW0LfY.js +0 -300
  105. package/dist/Mission-Q5_sGgrm.js +0 -304
  106. package/dist/Point-BGYFMvev.js +0 -228
  107. package/dist/Promotion-0acd63nA.js +0 -364
@@ -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-DhptoQqr.js";
5
+ import { u as ce } from "./loading-BsFOHhQ7.js";
6
+ import { u as me } from "./business-BtKxs_y6.js";
7
+ import { u as ue } from "./campaign-Dp6iTHEz.js";
8
+ import { u as de } from "./vue-i18n-gi9JUtvo.js";
9
+ import { g as q, a as pe, b as K } from "./campaign-rXQhZIDH.js";
10
+ import { c as fe, p as ye } from "./duplicateCampaign-5fhHX37P.js";
11
+ import { e as U } from "./effect-CFMQ5REv.js";
12
+ import { _ as ge } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-n8_AVbJA.js";
13
+ import { c as y } from "./index-ZDRZDJJ-.js";
14
+ import { u as he } from "./template-CFKkBFuQ.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,18 +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-DtNK7W0U.js";
2
+ import { u as G, _ as L } from "./usePagination-CMQVYF13.js";
3
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-P-V4XWmW.js";
4
+ import { c as u, a as Y } from "./plugins-DhptoQqr.js";
5
5
  import { useDialog as j, components as y } from "@feedmepos/ui-library";
6
- import "./index-DdZdHioZ.js";
7
- import { J as c, c as d } from "./index-B-AMMFfT.js";
8
- import "./index-Bflu4Rft.js";
9
- import "./index-CR3f3BXQ.js";
10
- import "./index-CZPcwcUo.js";
6
+ import "./index-DgbKnxUQ.js";
7
+ import { J as c, c as d } from "./index-De8KJ5ee.js";
8
+ import "./index-CfdrsgL1.js";
9
+ import "./index-B5ZaTTfd.js";
10
+ import "./index-FB5JDcqo.js";
11
11
  import { h as b } from "./moment-D7p2TMB-.js";
12
- import { u as W } from "./vue-i18n-tpDAnnmD.js";
13
- import { u as H, v as J, w as K } from "./index.esm2017-CUnjzfU-.js";
12
+ import { u as W } from "./vue-i18n-gi9JUtvo.js";
13
+ import { u as H, v as J, w as K } from "./index.esm2017-DWyiVIYc.js";
14
14
  import { useRoute as Q } from "vue-router";
15
- import { g as $, S as Z, u as X } from "./index-CppLPpqB.js";
15
+ import { g as $, S as Z, u as X } from "./index-B7JPvTGD.js";
16
16
  import { o as ee } from "./objectId-dwaoBfJX.js";
17
17
  const te = () => {
18
18
  if (!Z.getBusinessId()) throw new Error("Invalid business ID");
@@ -2,18 +2,18 @@ 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-DtNK7W0U.js";
6
- import { g as A } from "./user-CVapqHfr.js";
5
+ import { u as oe, _ as ae } from "./usePagination-CMQVYF13.js";
6
+ import { g as A } from "./user-DaUp8rok.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-CR3f3BXQ.js";
9
- import { u as j } from "./vue-i18n-tpDAnnmD.js";
10
- import { u as L } from "./loading-CivgDw5C.js";
8
+ import "./index-B5ZaTTfd.js";
9
+ import { u as j } from "./vue-i18n-gi9JUtvo.js";
10
+ import { u as L } from "./loading-BsFOHhQ7.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-DDYH-IEX.js";
12
+ import { r as v } from "./index-DQBsBSAl.js";
13
13
  import { c as ie, a as ne } from "./object-qECH92oz.js";
14
- import { u as ce } from "./membership-j2w1YUO-.js";
15
- import { a as le, c as de } from "./plugins-P-V4XWmW.js";
16
- import { u as V, w as me } from "./xlsx-EewcN2uY.js";
14
+ import { u as ce } from "./membership-UU6e1zGd.js";
15
+ import { a as le, c as de } from "./plugins-DhptoQqr.js";
16
+ import { u as V, w as me } from "./xlsx-BNx9zr-c.js";
17
17
  import { e as f } from "./index-vh86FiIQ.js";
18
18
  import { h as ue } from "./moment-D7p2TMB-.js";
19
19
  import { o as pe } from "./objectId-dwaoBfJX.js";
@@ -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-CivgDw5C.js";
5
- import { u as J, C as ee } from "./membership-j2w1YUO-.js";
6
- import { f as j, p as te } from "./plugins-P-V4XWmW.js";
7
- import { u as oe } from "./vue-i18n-tpDAnnmD.js";
4
+ import { u as G } from "./loading-BsFOHhQ7.js";
5
+ import { u as J, C as ee } from "./membership-UU6e1zGd.js";
6
+ import { f as j, p as te } from "./plugins-DhptoQqr.js";
7
+ import { u as oe } from "./vue-i18n-gi9JUtvo.js";
8
8
  import { c as ae } from "./object-qECH92oz.js";
9
- import { Z as _ } from "./zod-D-wiCQRJ.js";
10
- import "./index-Bflu4Rft.js";
11
- import { F as N } from "./index-CZPcwcUo.js";
9
+ import { Z as _ } from "./zod-_ZFtblDD.js";
10
+ import "./index-CfdrsgL1.js";
11
+ import { F as N } from "./index-FB5JDcqo.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-DvFy9Z6X.js";
14
- import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js";
13
+ import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-gM2Q2SZj.js";
14
+ import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-DnAOFGed.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-CU_Sx2PM.js";
17
- import { i as de } from "./helper-CCfb24PO.js";
18
- import { u as pe, r as P } from "./reward-BqMlBQRu.js";
19
- import "./index-BZEM0T2A.js";
20
- import { C as ce } from "./campaign.fn-B_P1MkRV.js";
21
- import { e as me } from "./effect--0g8PNyt.js";
16
+ import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang--cPeKAQK.js";
17
+ import { i as de } from "./helper-NA1sBf5O.js";
18
+ import { u as pe, r as P } from "./reward-CawSKEN7.js";
19
+ import "./index-DoQbrp4H.js";
20
+ import { C as ce } from "./campaign.fn-At50e4px.js";
21
+ import { e as me } from "./effect-CFMQ5REv.js";
22
22
  import { useRouter as ue } from "vue-router";
23
- import { R as ye } from "./app-IvbII0ql.js";
23
+ import { R as ye } from "./app-rrEjDuDH.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,18 +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-CivgDw5C.js";
2
+ import { u as B } from "./loading-BsFOHhQ7.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-CU_Sx2PM.js";
5
- import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js";
6
- import { Z as L } from "./zod-D-wiCQRJ.js";
4
+ import { _ as D } from "./ZodTextField.vue_vue_type_script_setup_true_lang--cPeKAQK.js";
5
+ import { _ as I } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-BOlKr1u5.js";
6
+ import { Z as L } from "./zod-_ZFtblDD.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-DDYH-IEX.js";
10
- import { c as E } from "./index-DdZdHioZ.js";
11
- import "./index-B-AMMFfT.js";
12
- import "./index-Bflu4Rft.js";
13
- import "./index-CR3f3BXQ.js";
14
- import "./index-CZPcwcUo.js";
15
- import { u as J } from "./vue-i18n-tpDAnnmD.js";
9
+ import { r as k } from "./index-DQBsBSAl.js";
10
+ import { c as E } from "./index-DgbKnxUQ.js";
11
+ import "./index-De8KJ5ee.js";
12
+ import "./index-CfdrsgL1.js";
13
+ import "./index-B5ZaTTfd.js";
14
+ import "./index-FB5JDcqo.js";
15
+ import { u as J } from "./vue-i18n-gi9JUtvo.js";
16
16
  import { c as C } from "./object-qECH92oz.js";
17
17
  import { useDialog as Z } from "@feedmepos/ui-library";
18
18
  const A = N("mf-connect-referral", () => {
@@ -1,22 +1,22 @@
1
1
  import { defineComponent as A, computed as B, resolveComponent as k, openBlock as n, createElementBlock as T, createElementVNode as C, createVNode as b, unref as e, createTextVNode as te, toDisplayString as $, withCtx as q, onMounted as z, createBlock as g, createCommentVNode as M, ref as L, Fragment as h, renderList as N, normalizeClass as W, watch as pe, resolveDynamicComponent as ae, onBeforeMount as ue, isRef as ye, createSlots as se } from "vue";
2
- import { m as ce, C as ve, n as be, a as fe, o as ge } from "./index-Bflu4Rft.js";
3
- import { R as D, a as ke } from "./rule-builder-DANv7Rmz.js";
2
+ import { m as ce, C as ve, n as be, a as fe, o as ge } from "./index-CfdrsgL1.js";
3
+ import { R as D, a as ke } from "./rule-builder-TeN72YwV.js";
4
4
  import { useDialog as le, useDialogChild as ie, useSnackbar as Ve } from "@feedmepos/ui-library";
5
- import { u as me } from "./vue-i18n-tpDAnnmD.js";
6
- import { a as Ee, R, S as Te, C as H, W as Se, T as re, O as ne } from "./rule-CztsLdki.js";
7
- import { p as Fe } from "./plugins-P-V4XWmW.js";
5
+ import { u as me } from "./vue-i18n-gi9JUtvo.js";
6
+ import { a as Ee, R, S as Te, C as H, W as Se, T as re, O as ne } from "./rule-DfoqRN4t.js";
7
+ import { p as Fe } from "./plugins-DhptoQqr.js";
8
8
  import { h as J } from "./moment-D7p2TMB-.js";
9
- import { z as Ue } from "./app-IvbII0ql.js";
10
- import { u as Q } from "./membership-j2w1YUO-.js";
11
- import { u as X } from "./business-BFIwFfkq.js";
12
- import "./index-CR3f3BXQ.js";
9
+ import { z as Ue } from "./app-rrEjDuDH.js";
10
+ import { u as Q } from "./membership-UU6e1zGd.js";
11
+ import { u as X } from "./business-BtKxs_y6.js";
12
+ import "./index-B5ZaTTfd.js";
13
13
  import { _ as O } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
14
14
  import { c as de } from "./object-qECH92oz.js";
15
- import { Z } from "./zod-D-wiCQRJ.js";
16
- import { _ as xe } from "./SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js";
17
- import "./index-DdZdHioZ.js";
18
- import "./index-B-AMMFfT.js";
19
- import "./index-CZPcwcUo.js";
15
+ import { Z } from "./zod-_ZFtblDD.js";
16
+ import { _ as xe } from "./SelectItems.vue_vue_type_script_setup_true_lang-Bur2bSCd.js";
17
+ import "./index-DgbKnxUQ.js";
18
+ import "./index-De8KJ5ee.js";
19
+ import "./index-FB5JDcqo.js";
20
20
  const Re = { class: "flex items-center justify-between" }, Ye = { class: "flex items-center gap-8 xs:flex-wrap" }, Ce = { class: "text-fm-color-primary line-clamp-1 text-ellipsis" }, De = /* @__PURE__ */ A({
21
21
  __name: "RuleEntry",
22
22
  props: {
@@ -1,34 +1,34 @@
1
1
  import { defineComponent as ee, ref as z, resolveComponent as S, openBlock as p, createElementBlock as k, createElementVNode as l, createVNode as r, unref as t, createCommentVNode as le, withCtx as E, Fragment as O, renderList as ie, createBlock as J, toDisplayString as R, normalizeClass as re, onMounted as Se, computed as ce, isRef as Ie, createSlots as Me, h as Y, onBeforeMount as Te } from "vue";
2
2
  import { _ as Ee } from "./campaign-CpzFl8Vr.js";
3
- import { n as Ae, p as De } from "./plugins-P-V4XWmW.js";
4
- import { u as $e } from "./loading-CivgDw5C.js";
3
+ import { n as Ae, p as De } from "./plugins-DhptoQqr.js";
4
+ import { u as $e } from "./loading-BsFOHhQ7.js";
5
5
  import { FmButtonVariant as ae, useSnackbar as Re, components as X } from "@feedmepos/ui-library";
6
- import { u as we, _ as Fe } from "./usePagination-DtNK7W0U.js";
7
- import { u as be } from "./vue-i18n-tpDAnnmD.js";
8
- import "./index-DdZdHioZ.js";
9
- import { i as Pe, j as $, c as fe } from "./index-B-AMMFfT.js";
10
- import "./index-Bflu4Rft.js";
11
- import { F as ye, z as Be } from "./index-CR3f3BXQ.js";
12
- import "./index-CZPcwcUo.js";
13
- import { u as ne, w as he } from "./xlsx-EewcN2uY.js";
14
- import { e as Ne, M as Ve } from "./email-addresses-HtsxvXw9.js";
15
- import { Z as Ye } from "./zod-D-wiCQRJ.js";
6
+ import { u as we, _ as Fe } from "./usePagination-CMQVYF13.js";
7
+ import { u as be } from "./vue-i18n-gi9JUtvo.js";
8
+ import "./index-DgbKnxUQ.js";
9
+ import { i as Pe, j as $, c as fe } from "./index-De8KJ5ee.js";
10
+ import "./index-CfdrsgL1.js";
11
+ import { F as ye, z as Be } from "./index-B5ZaTTfd.js";
12
+ import "./index-FB5JDcqo.js";
13
+ import { u as ne, w as he } from "./xlsx-BNx9zr-c.js";
14
+ import { e as Ne, M as Ve } from "./email-addresses-RpPqY7Ns.js";
15
+ import { Z as Ye } from "./zod-_ZFtblDD.js";
16
16
  import { u as Ue } from "./app-wDQR6dpb.js";
17
- import { R as ge } from "./rule-builder-DANv7Rmz.js";
18
- import { _ as Le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js";
19
- import { _ as ze } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js";
20
- import { u as Oe, v as je, w as qe } from "./index.esm2017-CUnjzfU-.js";
21
- import { F as Ge } from "./FileSaver.min-lgg_oBvT.js";
17
+ import { R as ge } from "./rule-builder-TeN72YwV.js";
18
+ import { _ as Le } from "./ZodTextField.vue_vue_type_script_setup_true_lang--cPeKAQK.js";
19
+ import { _ as ze } from "./RuleGroup.vue_vue_type_script_setup_true_lang-C5BATPr7.js";
20
+ import { u as Oe, v as je, w as qe } from "./index.esm2017-DWyiVIYc.js";
21
+ import { F as Ge } from "./FileSaver.min-o8dgYPp0.js";
22
22
  import { h as H } from "./moment-D7p2TMB-.js";
23
- import { s as B, u as He } from "./membership-j2w1YUO-.js";
23
+ import { s as B, u as He } from "./membership-UU6e1zGd.js";
24
24
  import { o as Je } from "./objectId-dwaoBfJX.js";
25
- import { u as Ce } from "./business-BFIwFfkq.js";
26
- import { f as Qe } from "./number-D1yoFGEr.js";
27
- import { t as We } from "./money-DL-x8hiT.js";
28
- import "./index-BZEM0T2A.js";
25
+ import { u as Ce } from "./business-BtKxs_y6.js";
26
+ import { f as Qe } from "./number-CVU6hHec.js";
27
+ import { t as We } from "./money-CreQ4gmS.js";
28
+ import "./index-DoQbrp4H.js";
29
29
  import { useRouter as Ze } from "vue-router";
30
- import { m as ve } from "./index-CkuPY85X.js";
31
- import { R as _e } from "./app-IvbII0ql.js";
30
+ import { m as ve } from "./index-CA1VTtfl.js";
31
+ import { R as _e } from "./app-rrEjDuDH.js";
32
32
  const Ke = Pe.extend({
33
33
  _id: ye.optional(),
34
34
  business: ye.optional(),
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as N, computed as f, ref as V, onMounted as H, resolveComponent as _, openBlock as c, createElementBlock as u, createVNode as i, withCtx as S, createElementVNode as p, toDisplayString as q, normalizeClass as A, Fragment as x, renderList as j, createCommentVNode as B } from "vue";
2
- import { U as D } from "./app-IvbII0ql.js";
3
- import "./index-CR3f3BXQ.js";
2
+ import { U as D } from "./app-rrEjDuDH.js";
3
+ import "./index-B5ZaTTfd.js";
4
4
  import { c as E } from "./object-qECH92oz.js";
5
5
  const M = { class: "flex flex-col flex-nowrap" }, T = { class: "flex gap-16 items-center w-full" }, $ = { class: "flex grow items-center" }, z = { class: "grow text-fm-color-typo-secondary" }, K = { key: 0 }, J = { class: "px-16" }, X = /* @__PURE__ */ N({
6
6
  __name: "SelectItems",