@feedmepos/mf-connect 0.1.47-prod → 0.1.49-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/{Analytic-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
  2. package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
  3. package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
  4. package/dist/Broadcast-CbF3d_N7.js +233 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
  6. package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
  7. package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
  8. package/dist/Credit-DiTnwnFe.js +228 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
  11. package/dist/Experience-CjMVeGsX.js +229 -0
  12. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  13. package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
  14. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  15. package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
  16. package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
  17. package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
  18. package/dist/MemberList-CZtriA_Q.js +1606 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
  22. package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
  23. package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
  24. package/dist/Point-51MD49EM.js +232 -0
  25. package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
  26. package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
  27. package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
  28. package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
  31. package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
  35. package/dist/Setting-DGDgmP84.js +1936 -0
  36. package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
  37. package/dist/StoreRewards-DFF_0g59.js +423 -0
  38. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
  40. package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
  41. package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
  42. package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
  43. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
  44. package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
  47. package/dist/app-DaFoFS2V.js +57962 -0
  48. package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
  49. package/dist/app.js +1 -1
  50. package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
  51. package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
  52. package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
  53. package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
  54. package/dist/campaign.fn-B-xvcbEb.js +758 -0
  55. package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
  56. package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
  57. package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
  58. package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
  59. package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
  60. package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
  61. package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
  62. package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
  63. package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
  64. package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
  65. package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
  66. package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
  67. package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
  68. package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
  69. package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
  70. package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
  71. package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
  72. package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
  73. package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
  74. package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
  75. package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
  76. package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
  77. package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
  78. package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
  79. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  80. package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
  81. package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
  82. package/dist/objectid-BQJRv_jX.js +145 -0
  83. package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
  84. package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
  85. package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
  86. package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
  87. package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
  88. package/dist/timezone-B64-HrWi.js +1150 -0
  89. package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
  90. package/dist/usePagination-Ds-cuHop.js +223 -0
  91. package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
  92. package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
  93. package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
  94. package/package.json +5 -4
  95. package/dist/Broadcast-T2a5tN8R.js +0 -227
  96. package/dist/Credit-DQQCXqS0.js +0 -222
  97. package/dist/Experience-DzTV21vX.js +0 -223
  98. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/MemberList-DLSLGQ02.js +0 -1606
  101. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  102. package/dist/Point-BeBYi1BT.js +0 -226
  103. package/dist/Setting-Dt0sG_hk.js +0 -1936
  104. package/dist/StoreRewards-DuSsWnTE.js +0 -423
  105. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
  106. package/dist/app-jRT7vsk_.js +0 -33357
  107. package/dist/campaign.fn-C-UojhHv.js +0 -758
  108. package/dist/objectid-CVDLTdni.js +0 -145
  109. package/dist/usePagination-JoYaROkV.js +0 -223
@@ -0,0 +1,232 @@
1
+ import { defineComponent as j, ref as P, computed as E, h as M, onMounted as H, resolveComponent as l, openBlock as u, createElementBlock as w, Fragment as b, createVNode as r, unref as o, withCtx as g, createElementVNode as a, toDisplayString as d, renderList as q, createBlock as C, resolveDynamicComponent as z } from "vue";
2
+ import { _ as G } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as J, components as Q } from "@feedmepos/ui-library";
4
+ import { p as W } from "./plugins-Z2YcDTj8.js";
5
+ import { u as X } from "./loading-CZH88Duq.js";
6
+ import { u as Y } from "./business-BSP_3iNl.js";
7
+ import { u as Z } from "./campaign-C1hWNRWr.js";
8
+ import { g as ee, a as V, b as B } from "./campaign-DMZnXtyb.js";
9
+ import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
10
+ import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js";
11
+ import { u as ne } from "./template-BnyUm8is.js";
12
+ import { u as ae } from "./vue-i18n-2D47GxQX.js";
13
+ import { c as _ } from "./index-Ba5-z1MU.js";
14
+ const se = { class: "flex items-center" }, re = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ie = { class: "px-24 flex flex-col gap-y-16" }, le = { class: "flex items-center justify-between w-full" }, ce = { class: "flex gap-8 overflow-x-auto" }, me = { class: "space-y-8" }, de = { class: "flex w-full gap-4 items-center" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "space-y-4" }, fe = { class: "fm-typo-en-body-lg-600" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "flex flex-col gap-16 text-center" }, he = { class: "fm-typo-en-title-sm-800" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ j({
15
+ __name: "Point",
16
+ setup(be) {
17
+ const { t: s } = ae(), I = {
18
+ label: s("connect.program.common.actions.create", {
19
+ type: s("connect.program.point.title").toLowerCase()
20
+ }),
21
+ value: "create",
22
+ isPrimary: !0,
23
+ prependIcon: "add"
24
+ }, $ = ne("COIN", J()), h = Y(), p = Z(), { global: K, minor: x } = X, i = P({
25
+ searchKey: "",
26
+ location: []
27
+ });
28
+ function N(e) {
29
+ const t = i.value.location;
30
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((c) => {
31
+ var m;
32
+ return (m = e == null ? void 0 : e.targetLocation) == null ? void 0 : m.includes(c);
33
+ }) : e.targetLocation.includes(t);
34
+ }
35
+ const f = E(
36
+ () => p.campaigns.point.filter((e) => N(e))
37
+ ), R = [
38
+ {
39
+ header: s("connect.program.common.table.title"),
40
+ accessorFn: (e) => e.name
41
+ },
42
+ {
43
+ header: s("connect.program.common.table.status"),
44
+ accessorFn: (e) => ee(e),
45
+ cell(e) {
46
+ return V(e.row.original);
47
+ }
48
+ },
49
+ {
50
+ header: s("connect.program.common.table.summary"),
51
+ accessorFn: (e) => B(e)
52
+ },
53
+ {
54
+ header: s("connect.program.common.table.actions"),
55
+ cell(e) {
56
+ return M(Q.FmButton, {
57
+ variant: "tertiary",
58
+ icon: "delete",
59
+ iconColor: "neutral-gray-400",
60
+ onClick: (t) => {
61
+ t.stopPropagation(), F(e.row.original);
62
+ }
63
+ });
64
+ }
65
+ }
66
+ ], v = P();
67
+ async function F(e) {
68
+ await W.remove(`Are you sure you want to remove ${e.name}?`) && await x(
69
+ async () => {
70
+ await _.delete(e._id), await p.read("COIN");
71
+ },
72
+ {
73
+ message: `Removing ${e.name}`,
74
+ successMessage: `Removed ${e.name} successfully`
75
+ }
76
+ );
77
+ }
78
+ async function y(e) {
79
+ e ? await t() : $.open(async (c) => {
80
+ await t(c);
81
+ });
82
+ async function t(c) {
83
+ var m;
84
+ (m = v.value) == null || m.showSheet(
85
+ !0,
86
+ "COIN",
87
+ e ? await _.readById(e._id) : void 0,
88
+ c
89
+ );
90
+ }
91
+ }
92
+ async function O(e) {
93
+ await x(
94
+ async () => {
95
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await p.read("COIN");
96
+ },
97
+ {
98
+ message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
99
+ successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
100
+ }
101
+ );
102
+ }
103
+ return H(async () => {
104
+ await K(async () => {
105
+ await p.read("COIN");
106
+ });
107
+ }), (e, t) => {
108
+ const c = l("FmPill"), m = l("FmPageHead"), k = l("FmSearch"), A = l("FmTable"), L = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
109
+ return u(), w(b, null, [
110
+ r(m, {
111
+ title: o(s)("connect.program.point.title"),
112
+ actions: o(f).length > 0 && o(h).isPremium ? [I] : [],
113
+ "onClick:action": t[0] || (t[0] = () => y())
114
+ }, {
115
+ title: g(() => [
116
+ a("div", se, [
117
+ a("span", re, d(o(s)("connect.program.point.title")), 1),
118
+ r(c, { variant: "premium" })
119
+ ])
120
+ ]),
121
+ _: 1
122
+ }, 8, ["title", "actions"]),
123
+ a("div", ie, [
124
+ r(k, {
125
+ modelValue: o(i).searchKey,
126
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => o(i).searchKey = n),
127
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
128
+ placeholder: "search",
129
+ collapsible: ""
130
+ }, null, 8, ["modelValue"]),
131
+ o(p).campaigns.point && o(p).campaigns.point.length > 0 ? (u(), w(b, { key: 0 }, [
132
+ a("div", le, [
133
+ a("div", ce, [
134
+ r(te, {
135
+ label: `${o(s)("connect.common.location")}: `,
136
+ "right-icon": "keyboard_arrow_down",
137
+ modelValue: o(i).location,
138
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => o(i).location = n),
139
+ icon: "storefront",
140
+ "show-item-label": !0,
141
+ items: o(h).locationOptions
142
+ }, null, 8, ["label", "modelValue", "items"])
143
+ ]),
144
+ r(k, {
145
+ modelValue: o(i).searchKey,
146
+ "onUpdate:modelValue": t[3] || (t[3] = (n) => o(i).searchKey = n),
147
+ class: "xs:hidden",
148
+ placeholder: "search",
149
+ collapsible: ""
150
+ }, null, 8, ["modelValue"])
151
+ ]),
152
+ r(A, {
153
+ class: "xs:hidden",
154
+ "row-data": o(f),
155
+ "column-defs": R,
156
+ "search-value": o(i).searchKey,
157
+ "column-filter": [],
158
+ onRowClick: t[4] || (t[4] = (n) => y(n.original)),
159
+ "hide-footer": o(f).length < 10
160
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
161
+ r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
162
+ default: g(() => [
163
+ (u(!0), w(b, null, q(o(f).filter(
164
+ (n) => n.name.toLowerCase().includes(o(i).searchKey.toLowerCase())
165
+ ), (n) => (u(), C(U, {
166
+ key: n._id.toString(),
167
+ onClick: (S) => y(n),
168
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
169
+ }, {
170
+ default: g(() => [
171
+ a("div", me, [
172
+ a("div", de, [
173
+ (u(), C(z(o(V)(n)))),
174
+ a("div", pe, d(o(s)("connect.program.point.used", {
175
+ count: n.currentReceive ?? 0
176
+ })), 1)
177
+ ]),
178
+ a("div", ue, [
179
+ a("div", fe, d(n.name), 1),
180
+ a("div", ye, d(o(B)(n)), 1)
181
+ ]),
182
+ a("div", ge, " Point received: " + d(n.currentReceive ?? 0), 1)
183
+ ]),
184
+ r(L, {
185
+ icon: "delete",
186
+ "icon-color": "neutral-gray-400",
187
+ variant: "tertiary",
188
+ onClick: (S) => (S.stopPropagation(), F(n))
189
+ }, null, 8, ["onClick"])
190
+ ]),
191
+ _: 2
192
+ }, 1032, ["onClick"]))), 128))
193
+ ]),
194
+ _: 1
195
+ })
196
+ ], 64)) : (u(), C(T, {
197
+ key: 1,
198
+ variant: "outlined",
199
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
200
+ }, {
201
+ default: g(() => [
202
+ t[6] || (t[6] = a("img", {
203
+ src: G,
204
+ class: "aspect-square w-[150px]"
205
+ }, null, -1)),
206
+ a("div", _e, [
207
+ a("div", he, d(o(s)("connect.program.point.empty_state.title")), 1),
208
+ a("div", we, d(o(s)("connect.program.point.empty_state.description")), 1)
209
+ ]),
210
+ r(L, {
211
+ variant: "primary",
212
+ label: "Create point program",
213
+ disabled: !o(h).isPremium,
214
+ icon: "add",
215
+ onClick: t[5] || (t[5] = (n) => y())
216
+ }, null, 8, ["disabled"])
217
+ ]),
218
+ _: 1
219
+ })),
220
+ r(oe, {
221
+ ref_key: "sheetRef",
222
+ ref: v,
223
+ "onSubmit:modelValue": O
224
+ }, null, 512)
225
+ ])
226
+ ], 64);
227
+ };
228
+ }
229
+ });
230
+ export {
231
+ Ne as default
232
+ };
@@ -1,23 +1,20 @@
1
- import { defineComponent as J, ref as S, computed as Q, h as W, onMounted as X, resolveComponent as m, openBlock as u, createElementBlock as w, Fragment as v, createVNode as c, unref as a, createElementVNode as r, withCtx as b, renderList as Y, createBlock as x, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
1
+ import { defineComponent as J, ref as S, computed as Q, h as W, onMounted as X, resolveComponent as m, openBlock as u, createElementBlock as w, Fragment as v, createVNode as l, unref as a, createElementVNode as r, withCtx as b, renderList as Y, createBlock as x, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
2
2
  import { _ as ee } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as oe, components as te } from "@feedmepos/ui-library";
4
- import { c as O, p as L } from "./plugins-Dn7JDHi7.js";
5
- import { u as ne } from "./loading-c4b7n9Xp.js";
6
- import { u as ae } from "./business-DVlHPzaL.js";
7
- import { u as se } from "./campaign-D9KeUWA7.js";
8
- import { u as re } from "./vue-i18n--_Wu1nMj.js";
9
- import { g as ie, a as V } from "./campaign-l-u9A514.js";
10
- import { e as I } from "./effect-B5-eXNEr.js";
11
- import { _ as ce } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js";
12
- import { u as le } from "./template-BSQLFHf4.js";
13
- import { _ as B } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
14
- import { c as d } from "./index-1BGPM6Uy.js";
15
- const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-center justify-between w-full" }, ue = { class: "flex gap-8 overflow-x-auto" }, de = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ye = { class: "space-y-4" }, ge = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = /* @__PURE__ */ r("img", {
16
- src: ee,
17
- class: "aspect-square w-[150px]"
18
- }, null, -1), we = { class: "flex flex-col gap-16 text-center" }, ve = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ J({
4
+ import { c as O, p as L } from "./plugins-Z2YcDTj8.js";
5
+ import { u as ne } from "./loading-CZH88Duq.js";
6
+ import { u as ae } from "./business-BSP_3iNl.js";
7
+ import { u as se } from "./campaign-C1hWNRWr.js";
8
+ import { u as re } from "./vue-i18n-2D47GxQX.js";
9
+ import { g as ie, a as V } from "./campaign-DMZnXtyb.js";
10
+ import { e as I } from "./effect-BW1-I1J4.js";
11
+ import { _ as le } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js";
12
+ import { u as ce } from "./template-BnyUm8is.js";
13
+ import { _ as B } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
14
+ import { c as d } from "./index-Ba5-z1MU.js";
15
+ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-center justify-between w-full" }, ue = { class: "flex gap-8 overflow-x-auto" }, de = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ye = { class: "space-y-4" }, ge = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "flex flex-col gap-16 text-center" }, we = { class: "fm-typo-en-title-sm-800" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ J({
19
16
  __name: "Promotion",
20
- setup(xe) {
17
+ setup(be) {
21
18
  const { t: n } = re(), M = {
22
19
  label: n("connect.promotion.createCampaign"),
23
20
  value: "create",
@@ -28,7 +25,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
28
25
  value: "sync",
29
26
  isPrimary: !1,
30
27
  prependIcon: "refresh"
31
- }, A = le("PROMOTION", oe()), C = ae(), f = se(), { global: K, minor: h } = ne, N = [
28
+ }, A = ce("PROMOTION", oe()), C = ae(), f = se(), { global: K, minor: h } = ne, N = [
32
29
  {
33
30
  label: "Bill promotion",
34
31
  value: "BILL"
@@ -44,17 +41,17 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
44
41
  });
45
42
  function $(e) {
46
43
  const o = s.value.location;
47
- return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((l) => {
44
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((c) => {
48
45
  var i;
49
- return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
46
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(c);
50
47
  }) : e.targetLocation.includes(o);
51
48
  }
52
49
  function U(e) {
53
50
  var i, g;
54
51
  const o = s.value.effectType;
55
52
  if (!o || o.length === 0) return !0;
56
- const l = (g = (i = e.effect) == null ? void 0 : i.options) == null ? void 0 : g.target;
57
- return o.includes(l);
53
+ const c = (g = (i = e.effect) == null ? void 0 : i.options) == null ? void 0 : g.target;
54
+ return o.includes(c);
58
55
  }
59
56
  const p = Q(
60
57
  () => f.campaigns.promotion.filter(
@@ -110,16 +107,16 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
110
107
  );
111
108
  }
112
109
  async function y(e) {
113
- e ? await o() : A.open(async (l) => {
114
- await o(l);
110
+ e ? await o() : A.open(async (c) => {
111
+ await o(c);
115
112
  });
116
- async function o(l) {
113
+ async function o(c) {
117
114
  var i;
118
115
  (i = F.value) == null || i.showSheet(
119
116
  !0,
120
117
  "PROMOTION",
121
118
  e ? await d.readById(e._id) : void 0,
122
- l
119
+ c
123
120
  );
124
121
  }
125
122
  }
@@ -164,15 +161,15 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
164
161
  await C.readLocations(), await f.read("PROMOTION");
165
162
  });
166
163
  }), (e, o) => {
167
- const l = m("FmPageHead"), i = m("FmSearch"), g = m("FmTable"), H = m("FmChip"), T = m("FmButton"), q = m("FmListItem"), z = m("FmList"), G = m("FmCard");
164
+ const c = m("FmPageHead"), i = m("FmSearch"), g = m("FmTable"), H = m("FmChip"), T = m("FmButton"), q = m("FmListItem"), z = m("FmList"), G = m("FmCard");
168
165
  return u(), w(v, null, [
169
- c(l, {
166
+ l(c, {
170
167
  title: a(n)("connect.promotion.title"),
171
168
  actions: a(p).length > 0 ? [M, R] : [],
172
169
  "onClick:action": j
173
170
  }, null, 8, ["title", "actions"]),
174
171
  r("div", me, [
175
- c(i, {
172
+ l(i, {
176
173
  modelValue: s.value.searchKey,
177
174
  "onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.searchKey = t),
178
175
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
@@ -182,7 +179,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
182
179
  a(p) && a(p).length > 0 ? (u(), w(v, { key: 0 }, [
183
180
  r("div", pe, [
184
181
  r("div", ue, [
185
- c(B, {
182
+ l(B, {
186
183
  label: `${a(n)("connect.common.location")}: `,
187
184
  "right-icon": "keyboard_arrow_down",
188
185
  modelValue: s.value.location,
@@ -191,7 +188,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
191
188
  "show-item-label": !0,
192
189
  items: a(C).locationOptions
193
190
  }, null, 8, ["label", "modelValue", "items"]),
194
- c(B, {
191
+ l(B, {
195
192
  label: "Type:",
196
193
  "right-icon": "keyboard_arrow_down",
197
194
  modelValue: s.value.effectType,
@@ -201,7 +198,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
201
198
  items: N
202
199
  }, null, 8, ["modelValue"])
203
200
  ]),
204
- c(i, {
201
+ l(i, {
205
202
  modelValue: s.value.searchKey,
206
203
  "onUpdate:modelValue": o[3] || (o[3] = (t) => s.value.searchKey = t),
207
204
  class: "xs:hidden",
@@ -209,7 +206,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
209
206
  collapsible: ""
210
207
  }, null, 8, ["modelValue"])
211
208
  ]),
212
- c(g, {
209
+ l(g, {
213
210
  class: "xs:hidden",
214
211
  "row-data": a(p),
215
212
  "column-defs": D,
@@ -218,7 +215,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
218
215
  onRowClick: o[4] || (o[4] = (t) => y(t.original)),
219
216
  "hide-footer": a(p).length < 10
220
217
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
221
- c(z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
218
+ l(z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
222
219
  default: b(() => [
223
220
  (u(!0), w(v, null, Y(a(p).filter(
224
221
  (t) => t.name.toLowerCase().includes(s.value.searchKey.toLowerCase())
@@ -231,7 +228,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
231
228
  r("div", de, [
232
229
  r("div", fe, [
233
230
  (u(), x(Z(a(V)(t)))),
234
- c(H, {
231
+ l(H, {
235
232
  class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
236
233
  compact: !0,
237
234
  label: `${a(O).title(t.effect.options.target)} promotion`
@@ -242,7 +239,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
242
239
  r("div", _e, _(a(I)(t.effect)), 1)
243
240
  ])
244
241
  ]),
245
- c(T, {
242
+ l(T, {
246
243
  icon: "delete",
247
244
  "icon-color": "neutral-gray-400",
248
245
  variant: "tertiary",
@@ -260,12 +257,15 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
260
257
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
261
258
  }, {
262
259
  default: b(() => [
263
- he,
264
- r("div", we, [
265
- r("div", ve, _(a(n)("connect.promotion.createPromotionCampaign")), 1),
266
- r("div", be, _(a(n)("connect.promotion.description")), 1)
260
+ o[6] || (o[6] = r("img", {
261
+ src: ee,
262
+ class: "aspect-square w-[150px]"
263
+ }, null, -1)),
264
+ r("div", he, [
265
+ r("div", we, _(a(n)("connect.promotion.createPromotionCampaign")), 1),
266
+ r("div", ve, _(a(n)("connect.promotion.description")), 1)
267
267
  ]),
268
- c(T, {
268
+ l(T, {
269
269
  variant: "primary",
270
270
  label: a(n)("connect.promotion.createPromotionCampaign"),
271
271
  icon: "add",
@@ -275,7 +275,7 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
275
275
  _: 1
276
276
  }))
277
277
  ]),
278
- c(ce, {
278
+ l(le, {
279
279
  ref_key: "sheetRef",
280
280
  ref: F,
281
281
  "onSubmit:modelValue": E
@@ -285,5 +285,5 @@ const me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-
285
285
  }
286
286
  });
287
287
  export {
288
- Ke as default
288
+ Ae as default
289
289
  };
@@ -1,19 +1,19 @@
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 f } from "vue";
2
- import { u as L, _ as Y } from "./usePagination-JoYaROkV.js";
3
- import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
4
- import { c as u, a as G } from "./plugins-Dn7JDHi7.js";
2
+ import { u as L, _ as Y } from "./usePagination-Ds-cuHop.js";
3
+ import { _ as S } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
4
+ import { c as u, a as G } from "./plugins-Z2YcDTj8.js";
5
5
  import { useDialog as K, components as b } from "@feedmepos/ui-library";
6
- import { D as c, c as d } from "./index-knuJv0ti.js";
7
- import "./index-DNTd-FNx.js";
8
- import "./index-Cx8-ipee.js";
9
- import "./index-ng2IXlL1.js";
10
- import "./index-DlFVLRKG.js";
11
- import "./index-D5KIp8ZB.js";
12
- import { h as y } from "./moment-BWErdI6_.js";
13
- import { u as j } from "./vue-i18n--_Wu1nMj.js";
14
- import { u as H, v as W, w as $ } from "./index.esm2017-D8stWFci.js";
6
+ import { D as c, c as d } from "./index-COoQSeE7.js";
7
+ import "./index-zyVYgteg.js";
8
+ import "./index-BJl_HxaB.js";
9
+ import "./index-P6ISAxfQ.js";
10
+ import "./index-BBi9jDD1.js";
11
+ import "./index-sFyvCun2.js";
12
+ import { h as y } from "./moment-D7p2TMB-.js";
13
+ import { u as j } from "./vue-i18n-2D47GxQX.js";
14
+ import { u as H, v as W, w as $ } from "./index.esm2017-DT0awUwa.js";
15
15
  import { useRoute as Q } from "vue-router";
16
- import { g as J, S as X, u as Z } from "./index-BLdVWQId.js";
16
+ import { g as J, S as X, u as Z } from "./index-DWBeauin.js";
17
17
  import { o as ee } from "./objectId-dwaoBfJX.js";
18
18
  const te = () => {
19
19
  if (!X.getBusinessId()) throw new Error("Invalid business ID");
@@ -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-JoYaROkV.js";
6
- import { g as A } from "./user-CCVOptFD.js";
5
+ import { u as oe, _ as ae } from "./usePagination-Ds-cuHop.js";
6
+ import { g as A } from "./user-BZc_OAUj.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-D5KIp8ZB.js";
9
- import { u as j } from "./vue-i18n--_Wu1nMj.js";
10
- import { u as L } from "./loading-c4b7n9Xp.js";
8
+ import "./index-sFyvCun2.js";
9
+ import { u as j } from "./vue-i18n-2D47GxQX.js";
10
+ import { u as L } from "./loading-CZH88Duq.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-CB8iWT_p.js";
12
+ import { r as v } from "./index-Dve1-uYX.js";
13
13
  import { c as ie, a as ne } from "./object-qECH92oz.js";
14
- import { u as ce } from "./membership-oBIs4sbL.js";
15
- import { a as le, c as de } from "./plugins-Dn7JDHi7.js";
16
- import { u as V, w as me } from "./xlsx-BVMaOi8M.js";
14
+ import { u as ce } from "./membership-GNRX1fEK.js";
15
+ import { a as le, c as de } from "./plugins-Z2YcDTj8.js";
16
+ import { u as V, w as me } from "./xlsx-BEk5qawh.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,