@feedmepos/mf-connect 0.0.39-prod → 0.1.0-beta.2

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 (101) hide show
  1. package/dist/Analytic-DSD9TsKr.js +622 -0
  2. package/dist/{App-X3fNEBF3.js → App-D8a5eW51.js} +250 -249
  3. package/dist/Broadcast-C8jgMe6g.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CRYS_tzZ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-pG8WvV4I.js} +20 -20
  5. package/dist/Card-C1K7ULPo.js +825 -0
  6. package/dist/Collections-lMrdPUuM.js +453 -0
  7. package/dist/Credit-CJfU5tP4.js +220 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DoZyevfa.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYoaa_-x.js} +1042 -1011
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CzEtOmp0.js +345 -0
  10. package/dist/Experience-Bp2ki8gU.js +221 -0
  11. package/dist/Game-BpTf6ebE.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/{MainLayout-DpZC6o3R.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +19 -53
  14. package/dist/MainLayout-B1aJoR95.js +41 -0
  15. package/dist/Marketing-BiKE2gxA.js +316 -0
  16. package/dist/Member-BSWyy32a.js +69 -0
  17. package/dist/MemberList-CHlGREyR.js +1733 -0
  18. package/dist/MemberOverview-wL_ailso.js +58 -0
  19. package/dist/{MemberTransactions-DueaXBCy.js → MemberTransactions-BzHiXCnp.js} +1 -1
  20. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-e-zWg08J.js +432 -0
  21. package/dist/Mission-8IGT3T2C.js +261 -0
  22. package/dist/Point-CbbJ6ohd.js +222 -0
  23. package/dist/Promotion-BYXCJa_S.js +247 -0
  24. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-_RX1J0Br.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bruh-umZ.js} +557 -557
  25. package/dist/Segment-DXDNM0yd.js +437 -0
  26. package/dist/Setting-CLpvvZTv.js +1901 -0
  27. package/dist/Store-C6-P6bwc.js +1511 -0
  28. package/dist/StoreRewards-CUM2irXK.js +401 -0
  29. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CLFiuO5k.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JaRdmqif.js} +10 -10
  30. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CoMQBL4P.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DEb4OBcX.js} +1 -1
  31. package/dist/{Tier-CftEoP_R.js → Tier-DZTDxWBo.js} +481 -453
  32. package/dist/{Title-BsavXbYh.js → Title-C2Dr5ceK.js} +314 -295
  33. package/dist/Transaction-BL4mS29d.js +39 -0
  34. package/dist/Voucher-Cx0r2-df.js +490 -0
  35. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-DWuAODUF.js +56 -0
  36. package/dist/{app-BNmAx3zq.js → app-B_xuZ5HB.js} +1 -1
  37. package/dist/app-wE5HTF_Y.js +5762 -0
  38. package/dist/app.js +5 -3
  39. package/dist/{business-DGL4Ayx0.js → business-DSv8zM8C.js} +1 -1
  40. package/dist/{campaign-D94sS1kM.js → campaign-7y5qquHZ.js} +5 -3
  41. package/dist/{collection.fn-BHJ1ISqO.js → collection.fn-BxVZQAx0.js} +2 -2
  42. package/dist/dto-Ew1QwLci.js +2778 -0
  43. package/dist/{effect-CFRICzlM.js → effect-BzPh8fRI.js} +9 -9
  44. package/dist/{export-w2o9NYcy.js → export-C9tDplkA.js} +3 -3
  45. package/dist/{helper-CUDWQ8vq.js → helper-Sz7oQ0F4.js} +1 -1
  46. package/dist/{index-BGuLhEym.js → index-BQm0C3Jm.js} +3 -3
  47. package/dist/{index-BjwyxNSp.js → index-C-SOz7jt.js} +1 -1
  48. package/dist/{index-BcWJcD9f.js → index-C0lpADCo.js} +1 -1
  49. package/dist/{index-DIq2KVis.js → index-C3_4GUiI.js} +1 -1
  50. package/dist/{index-BPEV5Tzg.js → index-D-2nFLsg.js} +59 -47
  51. package/dist/{index-CFMBSL24.js → index-DBMaUGYI.js} +2 -2
  52. package/dist/{index-CpwFQFTV.js → index-DH_1nOJ_.js} +3 -3
  53. package/dist/index-Dy4pmQpt.js +29193 -0
  54. package/dist/{index-BQ6isIeo.js → index-_3qBsogG.js} +1 -1
  55. package/dist/index-gIRszcHf.js +3 -0
  56. package/dist/{index-VjUw31dN.js → index-tv4t0Pnh.js} +1 -1
  57. package/dist/{index-tZ1aqhks.js → index-z0IfdrZk.js} +319 -281
  58. package/dist/{index.esm2017-zciuPty-.js → index.esm2017-BnKJDxUo.js} +55 -55
  59. package/dist/{loading-GuXe5bYG.js → loading-Ds-yFYhc.js} +469 -460
  60. package/dist/{membership-BHWJVI3e.js → membership-DaiVw9qF.js} +3 -3
  61. package/dist/money-BHtBdZoz.js +15 -0
  62. package/dist/number-CZhcB8ef.js +12 -0
  63. package/dist/{rule-MgNa_8FF.js → rule-Cd2M6Ri2.js} +2 -2
  64. package/dist/{rule-builder-BsBCWzq_.js → rule-builder-B6og27Q1.js} +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/{template-D6k3lusq.js → template-DouRWBpv.js} +63 -63
  67. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  68. package/dist/vue-i18n-BTlOChXs.js +2365 -0
  69. package/dist/{xlsx-ClrA4KOh.js → xlsx-SahfXQ70.js} +517 -517
  70. package/dist/zod-Bg2FbC-D.js +90 -0
  71. package/package.json +7 -4
  72. package/dist/Analytic-DMFueUju.js +0 -620
  73. package/dist/Broadcast-YIfWIXeA.js +0 -216
  74. package/dist/Card-BIxlgQm7.js +0 -824
  75. package/dist/Collections-M6DaHM2W.js +0 -441
  76. package/dist/Credit-BtRy-xoY.js +0 -214
  77. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D5DNTBSQ.js +0 -344
  78. package/dist/Experience-DGm1lnqj.js +0 -211
  79. package/dist/Game-B8-lG7qq.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  81. package/dist/Marketing-DtG3AIWr.js +0 -309
  82. package/dist/Member-K443-9Vy.js +0 -92
  83. package/dist/MemberList-CYXHXFTL.js +0 -1735
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bk2HLVmt.js +0 -203
  86. package/dist/Mission-CN5umXXA.js +0 -248
  87. package/dist/Point-XAm6H2p_.js +0 -220
  88. package/dist/Promotion-DsrA4KiE.js +0 -244
  89. package/dist/Segment-CZGGHoAu.js +0 -435
  90. package/dist/Setting-BjfxLKyp.js +0 -1870
  91. package/dist/Store-D_B-vhh3.js +0 -1513
  92. package/dist/StoreRewards-BjHffUKj.js +0 -429
  93. package/dist/Transaction-CdxzoKDG.js +0 -36
  94. package/dist/Voucher-B_9Nv1Mr.js +0 -485
  95. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  96. package/dist/app--1Ks5Hms.js +0 -2974
  97. package/dist/dto-X0Eeujxx.js +0 -1151
  98. package/dist/index-BPNG8N-w.js +0 -11
  99. package/dist/index-DWM9MWGj.js +0 -28058
  100. package/dist/money-CrttVpCp.js +0 -15
  101. package/dist/number-CIndGU4O.js +0 -12
@@ -1,220 +0,0 @@
1
- import { defineComponent as D, ref as S, computed as T, onMounted as j, resolveComponent as l, openBlock as c, createElementBlock as g, Fragment as h, createVNode as i, unref as o, withCtx as f, createElementVNode as n, renderList as E, createBlock as C, resolveDynamicComponent as M, toDisplayString as y, h as H } from "vue";
2
- import { _ as q } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as z, components as G } from "@feedmepos/ui-library";
4
- import { u as J, p as Q } from "./loading-GuXe5bYG.js";
5
- import { u as W } from "./business-DGL4Ayx0.js";
6
- import { u as X } from "./campaign-D94sS1kM.js";
7
- import { g as V, b as L } from "./dto-X0Eeujxx.js";
8
- import { _ as Y } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { _ as Z } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DoZyevfa.js";
10
- import { u as ee } from "./template-D6k3lusq.js";
11
- import { c as _ } from "./index-BjwyxNSp.js";
12
- const te = { class: "flex items-center" }, oe = /* @__PURE__ */ n("span", { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, "Point", -1), ae = { class: "px-24 flex flex-col gap-y-16" }, ne = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ce = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = /* @__PURE__ */ n("img", {
13
- src: q,
14
- class: "aspect-square w-[150px]"
15
- }, null, -1), fe = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
16
- /* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your point program"),
17
- /* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Points are virtual point that customers can earn and use to purchase bundle items. ")
18
- ], -1), Se = /* @__PURE__ */ D({
19
- __name: "Point",
20
- setup(ye) {
21
- const I = {
22
- label: "Create campaign",
23
- value: "create",
24
- isPrimary: !0,
25
- prependIcon: "add"
26
- }, B = ee("COIN", z()), v = W(), r = X(), { global: $, minor: w } = J, s = S({
27
- searchKey: "",
28
- location: null
29
- }), d = T(
30
- () => r.campaigns.point.filter(
31
- (e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
32
- )
33
- ), K = [
34
- {
35
- header: "Program title",
36
- accessorFn: (e) => e.name
37
- },
38
- {
39
- header: "Status",
40
- cell(e) {
41
- return V(e.row.original);
42
- }
43
- },
44
- {
45
- header: "Summary",
46
- accessorFn: (e) => L(e)
47
- //v.effect,
48
- },
49
- {
50
- header: "Actions",
51
- cell(e) {
52
- return H(G.FmButton, {
53
- variant: "tertiary",
54
- icon: "delete",
55
- iconColor: "neutral-gray-400",
56
- onClick: (a) => {
57
- a.stopPropagation(), b(e.row.original);
58
- }
59
- });
60
- }
61
- }
62
- ], x = S();
63
- async function b(e) {
64
- await Q.remove(`Are you sure you want to remove ${e.name}?`) && await w(
65
- async () => {
66
- await _.delete(e._id), await r.read("COIN");
67
- },
68
- {
69
- message: `Removing ${e.name}`,
70
- successMessage: `Removed ${e.name} successfully`
71
- }
72
- );
73
- }
74
- async function p(e) {
75
- e ? await a() : B.open(async (m) => {
76
- await a(m);
77
- });
78
- async function a(m) {
79
- var u;
80
- (u = x.value) == null || u.showSheet(
81
- !0,
82
- "COIN",
83
- e ? await _.readById(e._id) : void 0,
84
- m
85
- );
86
- }
87
- }
88
- async function N(e) {
89
- await w(
90
- async () => {
91
- e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await r.read("COIN");
92
- },
93
- {
94
- message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
95
- successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
96
- }
97
- );
98
- }
99
- return j(async () => {
100
- await $(async () => {
101
- await r.read("COIN");
102
- });
103
- }), (e, a) => {
104
- const m = l("FmPill"), u = l("FmPageHead"), F = l("FmSearch"), R = l("FmTable"), k = l("FmButton"), O = l("FmListItem"), U = l("FmList"), A = l("FmCard");
105
- return c(), g(h, null, [
106
- i(u, {
107
- title: "Point",
108
- actions: o(d).length > 0 ? [I] : [],
109
- "onClick:action": a[0] || (a[0] = () => p())
110
- }, {
111
- title: f(() => [
112
- n("div", te, [
113
- oe,
114
- i(m, { variant: "premium" })
115
- ])
116
- ]),
117
- _: 1
118
- }, 8, ["actions"]),
119
- n("div", ae, [
120
- i(F, {
121
- modelValue: o(s).searchKey,
122
- "onUpdate:modelValue": a[1] || (a[1] = (t) => o(s).searchKey = t),
123
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
124
- placeholder: "search",
125
- collapsible: ""
126
- }, null, 8, ["modelValue"]),
127
- o(r).campaigns.point && o(r).campaigns.point.length > 0 ? (c(), g(h, { key: 0 }, [
128
- n("div", ne, [
129
- n("div", se, [
130
- i(Y, {
131
- modelValue: o(s).location,
132
- "onUpdate:modelValue": a[2] || (a[2] = (t) => o(s).location = t),
133
- label: "Location: ",
134
- "show-item-label": !0,
135
- icon: "storefront",
136
- placement: "bottom-start",
137
- items: o(v).locationItems
138
- }, null, 8, ["modelValue", "items"])
139
- ]),
140
- i(F, {
141
- modelValue: o(s).searchKey,
142
- "onUpdate:modelValue": a[3] || (a[3] = (t) => o(s).searchKey = t),
143
- class: "xs:hidden",
144
- placeholder: "search",
145
- collapsible: ""
146
- }, null, 8, ["modelValue"])
147
- ]),
148
- i(R, {
149
- class: "xs:hidden",
150
- "row-data": o(d),
151
- "column-defs": K,
152
- "search-value": o(s).searchKey,
153
- "column-filter": [],
154
- onRowClick: a[4] || (a[4] = (t) => p(t.original)),
155
- "hide-footer": o(d).length < 10
156
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
157
- i(U, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
158
- default: f(() => [
159
- (c(!0), g(h, null, E(o(d).filter(
160
- (t) => t.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
161
- ), (t) => (c(), C(O, {
162
- key: t._id.toString(),
163
- onClick: (P) => p(t),
164
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
165
- }, {
166
- default: f(() => [
167
- n("div", ie, [
168
- n("div", le, [
169
- (c(), C(M(o(V)(t)))),
170
- n("div", re, y(t.currentReceive ?? 0) + " used ", 1)
171
- ]),
172
- n("div", ce, [
173
- n("div", me, y(t.name), 1),
174
- n("div", de, y(o(L)(t)), 1)
175
- ]),
176
- n("div", pe, " Point received: " + y(t.currentReceive ?? 0), 1)
177
- ]),
178
- i(k, {
179
- icon: "delete",
180
- "icon-color": "neutral-gray-400",
181
- variant: "tertiary",
182
- onClick: (P) => (P.stopPropagation(), b(t))
183
- }, null, 8, ["onClick"])
184
- ]),
185
- _: 2
186
- }, 1032, ["onClick"]))), 128))
187
- ]),
188
- _: 1
189
- })
190
- ], 64)) : (c(), C(A, {
191
- key: 1,
192
- variant: "outlined",
193
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
194
- }, {
195
- default: f(() => [
196
- ue,
197
- fe,
198
- i(k, {
199
- variant: "primary",
200
- label: "Create point program",
201
- disabled: !o(v).isPremium,
202
- icon: "add",
203
- onClick: a[5] || (a[5] = (t) => p())
204
- }, null, 8, ["disabled"])
205
- ]),
206
- _: 1
207
- })),
208
- i(Z, {
209
- ref_key: "sheetRef",
210
- ref: x,
211
- "onSubmit:modelValue": N
212
- }, null, 512)
213
- ])
214
- ], 64);
215
- };
216
- }
217
- });
218
- export {
219
- Se as default
220
- };
@@ -1,244 +0,0 @@
1
- import { defineComponent as E, ref as P, computed as H, onMounted as q, resolveComponent as i, openBlock as c, createElementBlock as g, Fragment as _, createVNode as s, unref as l, createElementVNode as a, withCtx as h, renderList as z, createBlock as w, resolveDynamicComponent as G, toDisplayString as k, h as J } from "vue";
2
- import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
- import { useDialog as W, components as X } from "@feedmepos/ui-library";
4
- import { c as S, u as Y, p as O } from "./loading-GuXe5bYG.js";
5
- import { u as Z } from "./business-DGL4Ayx0.js";
6
- import { u as ee } from "./campaign-D94sS1kM.js";
7
- import { g as L } from "./dto-X0Eeujxx.js";
8
- import { e as V } from "./effect-CFRICzlM.js";
9
- import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DoZyevfa.js";
11
- import { u as ae } from "./template-D6k3lusq.js";
12
- import { c as u } from "./index-BjwyxNSp.js";
13
- const ne = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, ce = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = /* @__PURE__ */ a("img", {
14
- src: Q,
15
- class: "aspect-square w-[150px]"
16
- }, null, -1), pe = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
17
- /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Create promotion campaign"),
18
- /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Special offers or deals made available for a limited time to encourage user engagement and purchases. Promotions are generally available to all eligible users without the need for a specific code and are applied by merchant during the promotional period. ")
19
- ], -1), Se = /* @__PURE__ */ E({
20
- __name: "Promotion",
21
- setup(fe) {
22
- const I = {
23
- label: "Create campaign",
24
- value: "create",
25
- isPrimary: !0,
26
- prependIcon: "add"
27
- }, T = {
28
- label: "Force sync",
29
- value: "sync",
30
- isPrimary: !1,
31
- prependIcon: "refresh"
32
- }, $ = ae("PROMOTION", W()), v = Z(), p = ee(), { global: R, minor: y } = Y, n = P({
33
- searchKey: "",
34
- location: null
35
- }), r = H(
36
- () => p.campaigns.promotion.filter(
37
- (e) => !n.value.location || !e.targetLocation || e.targetLocation.includes(n.value.location)
38
- )
39
- ), B = [
40
- {
41
- header: "Promotion title",
42
- accessorFn: (e) => e.name
43
- },
44
- {
45
- header: "Status",
46
- cell(e) {
47
- return L(e.row.original);
48
- }
49
- },
50
- {
51
- header: "Type",
52
- accessorFn: (e) => `${S.title(e.effect.options.target)} promotion`
53
- },
54
- {
55
- header: "Summary",
56
- accessorFn: (e) => V(e.effect)
57
- },
58
- {
59
- header: "Actions",
60
- cell(e) {
61
- return J(X.FmButton, {
62
- variant: "tertiary",
63
- icon: "delete",
64
- iconColor: "neutral-gray-400",
65
- onClick: (t) => {
66
- t.stopPropagation(), x(e.row.original);
67
- }
68
- });
69
- }
70
- }
71
- ], b = P();
72
- async function x(e) {
73
- await O.remove(`Are you sure you want to remove ${e.name}?`) && await y(
74
- async () => {
75
- await u.delete(e._id), await p.read("PROMOTION");
76
- },
77
- {
78
- message: `Removing ${e.name}`,
79
- successMessage: `Removed ${e.name} successfully`
80
- }
81
- );
82
- }
83
- async function f(e) {
84
- e ? await t() : $.open(async (m) => {
85
- await t(m);
86
- });
87
- async function t(m) {
88
- var d;
89
- (d = b.value) == null || d.showSheet(
90
- !0,
91
- "PROMOTION",
92
- e ? await u.readById(e._id) : void 0,
93
- m
94
- );
95
- }
96
- }
97
- async function M(e) {
98
- await y(
99
- async () => {
100
- e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await p.read("PROMOTION");
101
- },
102
- {
103
- message: `${e.campaign._id ? "Updating" : "Creating"} promotion`,
104
- successMessage: `Promotion ${e.campaign._id ? "updated" : "created"} successfully`
105
- }
106
- );
107
- }
108
- async function A(e) {
109
- switch (e) {
110
- case "create":
111
- f();
112
- break;
113
- case "sync":
114
- await O.confirm(
115
- "Are you sure you want to synchronize all promotions to POS?",
116
- "Force sync"
117
- ) && y(
118
- async () => {
119
- await u.syncAllPromotion();
120
- },
121
- {
122
- message: "Syncing promotions...",
123
- successMessage: "All promotions synced"
124
- }
125
- );
126
- break;
127
- }
128
- }
129
- return q(async () => {
130
- await R(async () => {
131
- await v.readLocations(), await p.read("PROMOTION");
132
- });
133
- }), (e, t) => {
134
- const m = i("FmPageHead"), d = i("FmSearch"), K = i("FmTable"), N = i("FmChip"), C = i("FmButton"), U = i("FmListItem"), D = i("FmList"), j = i("FmCard");
135
- return c(), g(_, null, [
136
- s(m, {
137
- title: "Promotion",
138
- actions: l(r).length > 0 ? [I, T] : [],
139
- "onClick:action": A
140
- }, null, 8, ["actions"]),
141
- a("div", ne, [
142
- s(d, {
143
- modelValue: n.value.searchKey,
144
- "onUpdate:modelValue": t[0] || (t[0] = (o) => n.value.searchKey = o),
145
- class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
146
- placeholder: "search",
147
- collapsible: ""
148
- }, null, 8, ["modelValue"]),
149
- l(r) && l(r).length > 0 ? (c(), g(_, { key: 0 }, [
150
- a("div", se, [
151
- a("div", le, [
152
- s(oe, {
153
- modelValue: n.value.location,
154
- "onUpdate:modelValue": t[1] || (t[1] = (o) => n.value.location = o),
155
- label: "Location: ",
156
- "show-item-label": !0,
157
- icon: "storefront",
158
- placement: "bottom-start",
159
- items: l(v).locationItems
160
- }, null, 8, ["modelValue", "items"])
161
- ]),
162
- s(d, {
163
- modelValue: n.value.searchKey,
164
- "onUpdate:modelValue": t[2] || (t[2] = (o) => n.value.searchKey = o),
165
- class: "xs:hidden",
166
- placeholder: "search",
167
- collapsible: ""
168
- }, null, 8, ["modelValue"])
169
- ]),
170
- s(K, {
171
- class: "xs:hidden",
172
- "row-data": l(r),
173
- "column-defs": B,
174
- "search-value": n.value.searchKey,
175
- "column-filter": [],
176
- onRowClick: t[3] || (t[3] = (o) => f(o.original)),
177
- "hide-footer": l(r).length < 10
178
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
179
- s(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
180
- default: h(() => [
181
- (c(!0), g(_, null, z(l(r).filter(
182
- (o) => o.name.toLowerCase().includes(n.value.searchKey.toLowerCase())
183
- ), (o) => (c(), w(U, {
184
- key: o._id.toString(),
185
- onClick: (F) => f(o),
186
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
187
- }, {
188
- default: h(() => [
189
- a("div", ie, [
190
- a("div", re, [
191
- (c(), w(G(l(L)(o)))),
192
- s(N, {
193
- class: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
194
- compact: !0,
195
- label: `${l(S).title(o.effect.options.target)} promotion`
196
- }, null, 8, ["label"])
197
- ]),
198
- a("div", ce, [
199
- a("div", me, k(o.name), 1),
200
- a("div", de, k(l(V)(o.effect)), 1)
201
- ])
202
- ]),
203
- s(C, {
204
- icon: "delete",
205
- "icon-color": "neutral-gray-400",
206
- variant: "tertiary",
207
- onClick: (F) => (F.stopPropagation(), x(o))
208
- }, null, 8, ["onClick"])
209
- ]),
210
- _: 2
211
- }, 1032, ["onClick"]))), 128))
212
- ]),
213
- _: 1
214
- })
215
- ], 64)) : (c(), w(j, {
216
- key: 1,
217
- variant: "outlined",
218
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
219
- }, {
220
- default: h(() => [
221
- ue,
222
- pe,
223
- s(C, {
224
- variant: "primary",
225
- label: "Create promotion campaign",
226
- icon: "add",
227
- onClick: t[4] || (t[4] = (o) => f())
228
- })
229
- ]),
230
- _: 1
231
- }))
232
- ]),
233
- s(te, {
234
- ref_key: "sheetRef",
235
- ref: b,
236
- "onSubmit:modelValue": M
237
- }, null, 512)
238
- ], 64);
239
- };
240
- }
241
- });
242
- export {
243
- Se as default
244
- };