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

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 (148) hide show
  1. package/dist/{Analytic-NBx32reB.js → Analytic-CM7mh-iO.js} +16 -16
  2. package/dist/{App-CaK9PvMd.js → App-CeCzzsDu.js} +625 -619
  3. package/dist/AuditLogs-VWx8DFKA.js +1991 -0
  4. package/dist/{Bin-CL6o1JSs.js → Bin-vUuol_I9.js} +10 -10
  5. package/dist/Broadcast-6VXz4-IG.js +233 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js} +6 -6
  7. package/dist/{Card-DNdEjt6s.js → Card-CeIeGET1.js} +144 -140
  8. package/dist/Collections-CF_OcAL3.js +540 -0
  9. package/dist/Credit-BUqGOyp_.js +226 -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-0DMFuBoG.js +3150 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js +347 -0
  14. package/dist/Experience-BxiFH_uV.js +225 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-lgg_oBvT.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-BzYW0LfY.js +300 -0
  18. package/dist/GenerateMaterial-B5A7mx2y.js +589 -0
  19. package/dist/Grab-BgiMqwvj.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js} +49 -48
  21. package/dist/{Index-2wokhhFB.js → Index-B85ops8K.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-CXGVkD-W.js} +1 -1
  24. package/dist/Marketing-Bnijl7lA.js +145 -0
  25. package/dist/MarketingMaterialEdit-BlUKwSoP.js +746 -0
  26. package/dist/{Member-2xV4Izwa.js → Member-sT853g51.js} +38 -37
  27. package/dist/{MemberList-CYgBdyJt.js → MemberList-DYT5_fSP.js} +158 -159
  28. package/dist/{MemberTransactions-DWDV01N4.js → MemberTransactions-Cqce5ebe.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js → MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js} +5940 -5668
  30. package/dist/Mission-Q5_sGgrm.js +304 -0
  31. package/dist/{Overview-BZjto86d.js → Overview-B0rwrHR1.js} +24 -25
  32. package/dist/Point-BGYFMvev.js +228 -0
  33. package/dist/Promotion-0acd63nA.js +364 -0
  34. package/dist/{Queue-D62r2qjy.js → Queue-SVqRUlD_.js} +14 -15
  35. package/dist/{Record-0iF3dG7y.js → Record-BTjg4ihy.js} +10 -10
  36. package/dist/{Reward-C5IEJYu6.js → Reward-DW58VMRO.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js → RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js +1766 -0
  39. package/dist/{Segment-BknjBrUP.js → Segment-Dny8pxP1.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js → SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js} +12 -12
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js} +4 -4
  43. package/dist/Setting-CjcnxK34.js +1992 -0
  44. package/dist/SettingAdvertisements-CIyDF4C8.js +263 -0
  45. package/dist/Store-B8k5YVqU.js +1934 -0
  46. package/dist/StoreRewards-BW08rwpL.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js +8093 -0
  49. package/dist/{Tier-B168DtFj.js → Tier-DKzu4tYw.js} +561 -480
  50. package/dist/{Title-uH0RI1N3.js → Title-BK-TXatJ.js} +149 -147
  51. package/dist/{Transaction-Bx-pmLrJ.js → Transaction-Duayg1jd.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js} +7 -7
  53. package/dist/{Voucher-Dzpz2AEB.js → Voucher-BEVAkNeJ.js} +140 -124
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js → ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js} +2 -2
  56. package/dist/app-IvbII0ql.js +45026 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-B65OtB5B.js → business-BFIwFfkq.js} +11 -8
  59. package/dist/campaign-RuIwxc4y.js +253 -0
  60. package/dist/{campaign-qGy6uzrC.js → campaign-w9j4I4jn.js} +29 -25
  61. package/dist/{campaign.enum-CZp2DmXI.js → campaign.enum-IHLsfdik.js} +3 -2
  62. package/dist/campaign.fn-B_P1MkRV.js +776 -0
  63. package/dist/{collectible.enum-CN-lnG1m.js → collectible.enum-CUgSjO08.js} +1 -1
  64. package/dist/{collection.fn-mMwGQWce.js → collection.fn-CrfnNb41.js} +2 -2
  65. package/dist/dto-jwO_sX9I.js +222 -0
  66. package/dist/{effect-Bg3yb9T6.js → effect--0g8PNyt.js} +1 -1
  67. package/dist/{email-addresses-CQsN724N.js → email-addresses-HtsxvXw9.js} +2 -2
  68. package/dist/{export-BLf2dhFd.js → export-CFEwMRmd.js} +9 -10
  69. package/dist/{helper-CFaph16Q.js → helper-CCfb24PO.js} +22 -7
  70. package/dist/index-B-AMMFfT.js +3419 -0
  71. package/dist/{index-BPyac0fq.js → index-BR3UbZ0F.js} +1 -1
  72. package/dist/{index-Dy5p_b1S.js → index-BZEM0T2A.js} +1 -1
  73. package/dist/index-Bflu4Rft.js +8884 -0
  74. package/dist/{index-Dkmn0jmX.js → index-CR3f3BXQ.js} +2552 -2356
  75. package/dist/{index-BkySejFg.js → index-CZPcwcUo.js} +3 -3
  76. package/dist/{index-BPZtjcTm.js → index-CkuPY85X.js} +1 -1
  77. package/dist/index-CppLPpqB.js +30933 -0
  78. package/dist/index-CuvNtC_M.js +61 -0
  79. package/dist/{index-BKOgzVx6.js → index-DDYH-IEX.js} +1 -1
  80. package/dist/{index-DaEQgaiW.js → index-DdZdHioZ.js} +455 -245
  81. package/dist/{index-BBPIZjw6.js → index-Dic_WcAL.js} +3 -3
  82. package/dist/{index-CH2d_B8c.js → index-DpjYgKTN.js} +4 -1
  83. package/dist/index-wzSeRJAd.js +36 -0
  84. package/dist/{index.esm2017-B9vJTKYg.js → index.esm2017-CUnjzfU-.js} +89 -89
  85. package/dist/loading-CivgDw5C.js +215 -0
  86. package/dist/{lodash-B5I3zXaY.js → lodash-BSbv_9TG.js} +1 -1
  87. package/dist/{membership-Du79A0Pl.js → membership-j2w1YUO-.js} +3 -3
  88. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  89. package/dist/{money-DXgYs2-R.js → money-DL-x8hiT.js} +1 -1
  90. package/dist/{number-CBMkNZvH.js → number-D1yoFGEr.js} +1 -1
  91. package/dist/objectid-CHab6j3r.js +145 -0
  92. package/dist/{campaign-iKI-L84v.js → plugins-P-V4XWmW.js} +784 -777
  93. package/dist/remy-D_Deb3ue.js +13 -0
  94. package/dist/{reward-ClX_lWcQ.js → reward-BqMlBQRu.js} +1 -1
  95. package/dist/{rule-BfidJ75Y.js → rule-CztsLdki.js} +4 -4
  96. package/dist/rule-builder-DANv7Rmz.js +102 -0
  97. package/dist/style.css +11 -2
  98. package/dist/template-Dbz3FhHK.js +188 -0
  99. package/dist/timezone-BgVqObBq.js +1151 -0
  100. package/dist/trigger-CbriUibd.js +213 -0
  101. package/dist/usePagination-DtNK7W0U.js +223 -0
  102. package/dist/user-CVapqHfr.js +55 -0
  103. package/dist/vue-i18n-tpDAnnmD.js +2365 -0
  104. package/dist/{xlsx-Be4bARvl.js → xlsx-EewcN2uY.js} +1 -1
  105. package/dist/{zod-Bg2FbC-D.js → zod-D-wiCQRJ.js} +32 -31
  106. package/package.json +13 -5
  107. package/dist/AuditLogs-C-gCCPvF.js +0 -1887
  108. package/dist/Broadcast-B2-itjvZ.js +0 -227
  109. package/dist/Collections-DepGq6WJ.js +0 -465
  110. package/dist/Credit-D7K0gFwc.js +0 -222
  111. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  112. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
  113. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
  114. package/dist/Experience-FlBX3eyN.js +0 -223
  115. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  116. package/dist/Game-Cc3D7lKV.js +0 -278
  117. package/dist/Marketing-D7PXYloN.js +0 -20073
  118. package/dist/Mission-BSGc9822.js +0 -296
  119. package/dist/Point-0U4TTdPW.js +0 -226
  120. package/dist/Promotion-DiUa0GcV.js +0 -289
  121. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
  122. package/dist/Setting-RLI7RgmN.js +0 -1936
  123. package/dist/Store-gxmv8hWJ.js +0 -1842
  124. package/dist/StoreRewards-C_6gY_Nk.js +0 -423
  125. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
  126. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
  127. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
  128. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  129. package/dist/app-B90wINOO.js +0 -33357
  130. package/dist/app-DuUxQ1ZP.js +0 -7086
  131. package/dist/campaign.fn-DKScnmjX.js +0 -758
  132. package/dist/dto-C5ri8Nws.js +0 -214
  133. package/dist/index-BCGDOgxb.js +0 -38
  134. package/dist/index-BCPBmANe.js +0 -3120
  135. package/dist/index-BN2Uyvj4.js +0 -30038
  136. package/dist/index-CrbnfAk8.js +0 -8861
  137. package/dist/index-CsaQJMAR.js +0 -66
  138. package/dist/index-DJwQICyC.js +0 -146
  139. package/dist/loading-MEQuW9Xa.js +0 -71
  140. package/dist/objectid-BeZTZYqi.js +0 -145
  141. package/dist/plugins-KiMuDTPp.js +0 -208
  142. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  143. package/dist/rule-builder-BTcZx77a.js +0 -89
  144. package/dist/template-DPpMK30W.js +0 -190
  145. package/dist/trigger-DLp1bkZP.js +0 -144
  146. package/dist/usePagination-BeF5K3M7.js +0 -223
  147. package/dist/user-Cq9CGBHZ.js +0 -54
  148. package/dist/vue-i18n-COzqUgQy.js +0 -2365
@@ -0,0 +1,304 @@
1
+ import { defineComponent as z, ref as x, computed as W, h as m, onMounted as G, resolveComponent as d, openBlock as u, createElementBlock as b, Fragment as C, createVNode as r, unref as t, createElementVNode as s, withCtx as v, renderList as J, createBlock as S, resolveDynamicComponent as Q, toDisplayString as f } from "vue";
2
+ import { _ as X } from "./campaign-CpzFl8Vr.js";
3
+ import { u as Y } from "./loading-CivgDw5C.js";
4
+ import { a as Z, b as B, c as P } from "./campaign-RuIwxc4y.js";
5
+ import { a as ee, p as oe } from "./plugins-P-V4XWmW.js";
6
+ import { u as te } from "./business-BFIwFfkq.js";
7
+ import { u as ne } from "./campaign-w9j4I4jn.js";
8
+ import { useDialog as ae, components as _ } from "@feedmepos/ui-library";
9
+ import { _ as se } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
10
+ import { u as ie } from "./template-Dbz3FhHK.js";
11
+ import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
12
+ import { s as ce } from "./index-CuvNtC_M.js";
13
+ import { u as le } from "./vue-i18n-tpDAnnmD.js";
14
+ import { _ as me } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js";
15
+ import { c as h } from "./index-DpjYgKTN.js";
16
+ const de = { 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" }, fe = { class: "space-y-8" }, ge = { class: "flex w-full gap-4 items-center" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "flex flex-col gap-16 text-center" }, be = { class: "fm-typo-en-title-sm-800" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ z({
17
+ __name: "Mission",
18
+ setup(ve) {
19
+ const { t: n } = le(), K = {
20
+ label: n("connect.program.common.actions.create", {
21
+ type: n("connect.program.mission.title").toLowerCase()
22
+ }),
23
+ value: "create",
24
+ isPrimary: !0,
25
+ prependIcon: "add"
26
+ }, F = ae(), R = ie("MISSION", F), A = te(), p = ne(), { global: N, minor: k } = Y, c = x({
27
+ searchKey: "",
28
+ location: []
29
+ });
30
+ function O(e) {
31
+ const o = c.value.location;
32
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((i) => {
33
+ var l;
34
+ return (l = e == null ? void 0 : e.targetLocation) == null ? void 0 : l.includes(i);
35
+ }) : e.targetLocation.includes(o);
36
+ }
37
+ const g = W(
38
+ () => p.campaigns.mission.filter((e) => O(e))
39
+ ), U = [
40
+ {
41
+ header: n("connect.program.common.table.title"),
42
+ accessorKey: "name",
43
+ // accessorFn: (v) => v.name,
44
+ cell(e) {
45
+ return m("div", { class: "flex items-center justify-between gap-4" }, [
46
+ m("div", { class: "flex items-center" }, [
47
+ m(
48
+ _.FmTooltip,
49
+ {
50
+ content: e.row.original._id,
51
+ onClick: (o) => {
52
+ o.stopPropagation(), ee(e.row.original._id);
53
+ }
54
+ },
55
+ [
56
+ m(_.FmIcon, {
57
+ name: "info",
58
+ outline: !0,
59
+ size: "sm"
60
+ })
61
+ ]
62
+ )
63
+ ]),
64
+ m("div", { class: "flex-1" }, e.row.original.name)
65
+ ]);
66
+ }
67
+ },
68
+ {
69
+ header: n("connect.campaign.mission.type"),
70
+ accessorFn: (e) => ce(e.mission.type)
71
+ //v.effect,
72
+ },
73
+ {
74
+ header: n("connect.program.common.table.status"),
75
+ accessorFn: (e) => Z(e),
76
+ cell(e) {
77
+ return B(e.row.original);
78
+ }
79
+ },
80
+ {
81
+ header: n("connect.program.common.table.summary"),
82
+ accessorFn: (e) => P(e)
83
+ //v.effect,
84
+ },
85
+ {
86
+ header: n("connect.campaign.mission.received"),
87
+ accessorFn: (e) => {
88
+ var o;
89
+ return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
90
+ }
91
+ },
92
+ {
93
+ header: n("connect.program.common.table.actions"),
94
+ cell(e) {
95
+ return m("div", { class: "flex items-center gap-8" }, [
96
+ m(_.FmButton, {
97
+ variant: "tertiary",
98
+ icon: "send",
99
+ iconColor: "neutral-gray-400",
100
+ onClick: (o) => {
101
+ o.stopPropagation(), $(e.row.original);
102
+ }
103
+ }),
104
+ m(_.FmButton, {
105
+ variant: "tertiary",
106
+ icon: "delete",
107
+ iconColor: "neutral-gray-400",
108
+ onClick: (o) => {
109
+ o.stopPropagation(), V(e.row.original);
110
+ }
111
+ })
112
+ ]);
113
+ }
114
+ }
115
+ ], I = x(), L = x();
116
+ async function V(e) {
117
+ await oe.remove(
118
+ n("connect.program.common.remove.confirm", { name: e.name })
119
+ ) && await k(
120
+ async () => {
121
+ await h.delete(e._id), await p.read("MISSION");
122
+ },
123
+ {
124
+ message: n("connect.program.common.remove.removing", { name: e.name }),
125
+ successMessage: n("connect.program.common.remove.removed", {
126
+ name: e.name
127
+ })
128
+ }
129
+ );
130
+ }
131
+ async function y(e) {
132
+ e ? await o() : R.open(async (i) => {
133
+ await o(i);
134
+ });
135
+ async function o(i) {
136
+ var l;
137
+ (l = I.value) == null || l.showSheet(
138
+ !0,
139
+ "MISSION",
140
+ e ? await h.readById(e._id) : void 0,
141
+ i
142
+ );
143
+ }
144
+ }
145
+ async function T(e) {
146
+ e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
147
+ F.open({
148
+ title: "Confirmation",
149
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
150
+ primaryActions: { text: "Update all", close: !0 },
151
+ secondaryActions: { text: "Update future only", close: !0 }
152
+ }).onPrimary(async () => {
153
+ var i;
154
+ e.updateCollections = !0, (i = window.top) == null || i.postMessage("updateAllVoucher", "*"), o();
155
+ }).onSecondary(async () => {
156
+ o();
157
+ });
158
+ }), await k(
159
+ async () => {
160
+ e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await p.read("MISSION");
161
+ },
162
+ {
163
+ message: n(
164
+ e.campaign._id ? "connect.program.common.update.updating" : "connect.program.common.update.creating",
165
+ { type: "Mission" }
166
+ ),
167
+ successMessage: n("connect.program.common.update.success", {
168
+ type: "Mission",
169
+ action: e.campaign._id ? "updated" : "created"
170
+ })
171
+ }
172
+ );
173
+ }
174
+ function $(e) {
175
+ var o;
176
+ (o = L.value) == null || o.showSheet({
177
+ campaign: e
178
+ });
179
+ }
180
+ return G(async () => {
181
+ await N(async () => {
182
+ await p.read("MISSION"), console.log(g);
183
+ });
184
+ }), (e, o) => {
185
+ const i = d("FmPageHead"), l = d("FmSearch"), D = d("FmTable"), M = d("FmButton"), j = d("FmListItem"), E = d("FmList"), H = d("FmCard");
186
+ return u(), b(C, null, [
187
+ r(i, {
188
+ title: t(n)("connect.campaign.mission.title"),
189
+ actions: t(g).length > 0 ? [K] : [],
190
+ "onClick:action": o[0] || (o[0] = () => y())
191
+ }, null, 8, ["title", "actions"]),
192
+ s("div", de, [
193
+ r(l, {
194
+ modelValue: t(c).searchKey,
195
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => t(c).searchKey = a),
196
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
197
+ placeholder: t(n)("connect.program.common.search"),
198
+ collapsible: ""
199
+ }, null, 8, ["modelValue", "placeholder"]),
200
+ t(p).campaigns.mission && t(p).campaigns.mission.length > 0 ? (u(), b(C, { key: 0 }, [
201
+ s("div", pe, [
202
+ s("div", ue, [
203
+ r(se, {
204
+ label: `${t(n)("connect.program.common.location")}: `,
205
+ "right-icon": "keyboard_arrow_down",
206
+ modelValue: t(c).location,
207
+ "onUpdate:modelValue": o[2] || (o[2] = (a) => t(c).location = a),
208
+ icon: "storefront",
209
+ "show-item-label": !0,
210
+ items: t(A).locationOptions
211
+ }, null, 8, ["label", "modelValue", "items"])
212
+ ]),
213
+ r(l, {
214
+ modelValue: t(c).searchKey,
215
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => t(c).searchKey = a),
216
+ class: "xs:hidden sm:hidden",
217
+ placeholder: "search",
218
+ collapsible: ""
219
+ }, null, 8, ["modelValue"])
220
+ ]),
221
+ r(D, {
222
+ class: "xs:hidden sm:hidden",
223
+ "row-data": t(g),
224
+ "column-defs": U,
225
+ "search-value": t(c).searchKey,
226
+ "column-filter": [],
227
+ onRowClick: o[4] || (o[4] = (a) => y(a.original)),
228
+ "hide-footer": t(g).length < 10
229
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
230
+ r(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
231
+ default: v(() => [
232
+ (u(!0), b(C, null, J(t(g).filter(
233
+ (a) => a.name.toLowerCase().includes(t(c).searchKey.toLowerCase())
234
+ ), (a) => (u(), S(j, {
235
+ key: a._id.toString(),
236
+ onClick: (w) => y(a),
237
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
238
+ }, {
239
+ default: v(() => {
240
+ var w;
241
+ return [
242
+ s("div", fe, [
243
+ s("div", ge, [
244
+ (u(), S(Q(t(B)(a))))
245
+ ]),
246
+ s("div", ye, [
247
+ s("div", _e, f(a.name), 1),
248
+ s("div", he, f(t(P)(a)), 1)
249
+ ]),
250
+ s("div", we, f(t(n)("connect.campaign.mission.received")) + " : " + f(((w = a == null ? void 0 : a.pf_collectible) == null ? void 0 : w.currentReceive) ?? 0), 1)
251
+ ]),
252
+ r(M, {
253
+ icon: "delete",
254
+ "icon-color": "neutral-gray-400",
255
+ variant: "tertiary",
256
+ onClick: (q) => (q.stopPropagation(), V(a))
257
+ }, null, 8, ["onClick"])
258
+ ];
259
+ }),
260
+ _: 2
261
+ }, 1032, ["onClick"]))), 128))
262
+ ]),
263
+ _: 1
264
+ })
265
+ ], 64)) : (u(), S(H, {
266
+ key: 1,
267
+ variant: "outlined",
268
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
269
+ }, {
270
+ default: v(() => [
271
+ o[6] || (o[6] = s("img", {
272
+ src: X,
273
+ class: "aspect-square w-[150px]"
274
+ }, null, -1)),
275
+ s("div", xe, [
276
+ s("div", be, f(t(n)("connect.campaign.mission.createProgram")), 1),
277
+ s("div", Ce, f(t(n)("connect.campaign.mission.description")), 1)
278
+ ]),
279
+ r(M, {
280
+ variant: "primary",
281
+ label: t(n)("connect.campaign.mission.create"),
282
+ icon: "add",
283
+ onClick: o[5] || (o[5] = (a) => y())
284
+ }, null, 8, ["label"])
285
+ ]),
286
+ _: 1
287
+ })),
288
+ r(re, {
289
+ ref_key: "sheetRef",
290
+ ref: I,
291
+ "onSubmit:modelValue": T
292
+ }, null, 512),
293
+ r(me, {
294
+ ref_key: "sendCollectionSheetRef",
295
+ ref: L
296
+ }, null, 512)
297
+ ])
298
+ ], 64);
299
+ };
300
+ }
301
+ });
302
+ export {
303
+ Te as default
304
+ };
@@ -1,29 +1,28 @@
1
1
  import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as ve, ref as F, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as de, createTextVNode as ce, createCommentVNode as z, h as te, onMounted as _e } from "vue";
2
2
  import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
- import { u as Z } from "./vue-i18n-COzqUgQy.js";
4
- import { u as ue } from "./loading-MEQuW9Xa.js";
5
- import { c as we, p as K } from "./plugins-KiMuDTPp.js";
3
+ import { u as Z } from "./vue-i18n-tpDAnnmD.js";
4
+ import { u as ue } from "./loading-CivgDw5C.js";
5
+ import { c as we, p as K } from "./plugins-P-V4XWmW.js";
6
6
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
7
- import { Z as N } from "./zod-Bg2FbC-D.js";
7
+ import { Z as N } from "./zod-D-wiCQRJ.js";
8
8
  import { u as W } from "./app-wDQR6dpb.js";
9
- import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js";
10
- import { u as me } from "./reward-ClX_lWcQ.js";
11
- import { a as be, b as xe } from "./index-DaEQgaiW.js";
12
- import { l as le, c as se } from "./index-BCPBmANe.js";
13
- import "./index-CrbnfAk8.js";
14
- import "./index-BCGDOgxb.js";
15
- import "./index-BkySejFg.js";
16
- import "./index-Dkmn0jmX.js";
17
- import { C as fe } from "./membership-Du79A0Pl.js";
18
- import { t as ee } from "./helper-CFaph16Q.js";
9
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js";
10
+ import { u as me } from "./reward-BqMlBQRu.js";
11
+ import { a as be, b as xe } from "./index-DdZdHioZ.js";
12
+ import { l as le, c as se } from "./index-B-AMMFfT.js";
13
+ import "./index-Bflu4Rft.js";
14
+ import "./index-CR3f3BXQ.js";
15
+ import "./index-CZPcwcUo.js";
16
+ import { C as fe } from "./membership-j2w1YUO-.js";
17
+ import { t as ee } from "./helper-CCfb24PO.js";
19
18
  import { c as H } from "./object-qECH92oz.js";
20
19
  import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
21
- import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js";
22
- import { a as Se, _ as Fe, b as ke } from "./trigger-DLp1bkZP.js";
23
- import { O as $e } from "./objectid-BeZTZYqi.js";
24
- import { r as pe } from "./index-BKOgzVx6.js";
25
- import { u as Pe } from "./business-B65OtB5B.js";
26
- const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, je = { class: "flex-1 space-y-4" }, De = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
20
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js";
21
+ import { a as Se, _ as Fe, b as ke } from "./trigger-CbriUibd.js";
22
+ import { O as $e } from "./objectid-CHab6j3r.js";
23
+ import { r as pe } from "./index-DDYH-IEX.js";
24
+ import { u as Pe } from "./business-BFIwFfkq.js";
25
+ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { class: "space-y-4 hidden xs:!block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, je = { class: "flex-1 space-y-4" }, De = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
27
26
  __name: "ReferralRewadGroupCard",
28
27
  props: {
29
28
  rewardGroup: {
@@ -406,7 +405,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
406
405
  variant: "tertiary",
407
406
  onClick: n[0] || (n[0] = (e) => T(!1))
408
407
  }),
409
- n[7] || (n[7] = ce("Add Criteria "))
408
+ n[7] || (n[7] = ce("Add Criteria ", -1))
410
409
  ])
411
410
  ]),
412
411
  "side-sheet-footer": V(() => [
@@ -739,7 +738,7 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
739
738
  }), mr = { class: "fm-typo-en-title-sm-600" }, fr = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, pr = { class: "flex gap-x-8" }, hr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _r = { class: "mb-40" }, gr = {
740
739
  key: 0,
741
740
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
742
- }, wr = { class: "flex flex-col gap-16 text-center" }, yr = { class: "fm-typo-en-title-sm-800" }, br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qr = /* @__PURE__ */ q({
741
+ }, wr = { class: "flex flex-col gap-16 text-center" }, yr = { class: "fm-typo-en-title-sm-800" }, br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yr = /* @__PURE__ */ q({
743
742
  __name: "Overview",
744
743
  setup(k) {
745
744
  const { t: l } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: s } = he(), u = G(() => {
@@ -961,8 +960,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
961
960
  outline: !0
962
961
  })
963
962
  ]),
964
- _: 2
965
- }, 1032, ["content"])) : z("", !0)
963
+ _: 1
964
+ }, 8, ["content"])) : z("", !0)
966
965
  ]),
967
966
  a("div", vr, O(x.sublabel), 1),
968
967
  x.action ? (C(), j($, {
@@ -1075,5 +1074,5 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
1075
1074
  }
1076
1075
  });
1077
1076
  export {
1078
- qr as default
1077
+ Yr as default
1079
1078
  };
@@ -0,0 +1,228 @@
1
+ import { defineComponent as j, ref as V, computed as E, h as M, onMounted as H, resolveComponent as l, openBlock as p, createElementBlock as w, Fragment as b, createVNode as i, unref as o, withCtx as y, createElementVNode as n, toDisplayString as u, 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-P-V4XWmW.js";
5
+ import { u as X } from "./loading-CivgDw5C.js";
6
+ import { u as Y } from "./business-BFIwFfkq.js";
7
+ import { u as Z } from "./campaign-w9j4I4jn.js";
8
+ import { a as ee, b as P, c as B } from "./campaign-RuIwxc4y.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-0DMFuBoG.js";
11
+ import { u as ae } from "./template-Dbz3FhHK.js";
12
+ import { u as ne } from "./vue-i18n-tpDAnnmD.js";
13
+ import { c as _ } from "./index-DpjYgKTN.js";
14
+ const se = { class: "flex items-center" }, ie = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, re = { 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: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $e = /* @__PURE__ */ j({
15
+ __name: "Point",
16
+ setup(he) {
17
+ const { t: s } = ne(), 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
+ }, $ = ae("COIN", J()), h = Y(), d = Z(), { global: K, minor: x } = X, r = V({
25
+ searchKey: "",
26
+ location: []
27
+ });
28
+ function N(e) {
29
+ const t = r.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
+ () => d.campaigns.point.filter((e) => N(e))
37
+ ), O = [
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 P(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 = V();
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 d.read("COIN");
71
+ },
72
+ {
73
+ message: `Removing ${e.name}`,
74
+ successMessage: `Removed ${e.name} successfully`
75
+ }
76
+ );
77
+ }
78
+ async function g(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 A(e) {
93
+ await x(
94
+ async () => {
95
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await d.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 d.read("COIN");
106
+ });
107
+ }), (e, t) => {
108
+ const c = l("FmPill"), m = l("FmPageHead"), k = l("FmSearch"), R = l("FmTable"), L = l("FmButton"), U = l("FmListItem"), D = l("FmList"), T = l("FmCard");
109
+ return p(), w(b, null, [
110
+ i(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] = () => g())
114
+ }, {
115
+ title: y(() => [
116
+ n("div", se, [
117
+ n("span", ie, u(o(s)("connect.program.point.title")), 1),
118
+ i(c, { variant: "premium" })
119
+ ])
120
+ ]),
121
+ _: 1
122
+ }, 8, ["title", "actions"]),
123
+ n("div", re, [
124
+ i(k, {
125
+ modelValue: o(r).searchKey,
126
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(r).searchKey = a),
127
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
128
+ placeholder: "search",
129
+ collapsible: ""
130
+ }, null, 8, ["modelValue"]),
131
+ o(d).campaigns.point && o(d).campaigns.point.length > 0 ? (p(), w(b, { key: 0 }, [
132
+ n("div", le, [
133
+ n("div", ce, [
134
+ i(te, {
135
+ label: `${o(s)("connect.common.location")}: `,
136
+ "right-icon": "keyboard_arrow_down",
137
+ modelValue: o(r).location,
138
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(r).location = a),
139
+ icon: "storefront",
140
+ "show-item-label": !0,
141
+ items: o(h).locationOptions
142
+ }, null, 8, ["label", "modelValue", "items"])
143
+ ]),
144
+ i(k, {
145
+ modelValue: o(r).searchKey,
146
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(r).searchKey = a),
147
+ class: "xs:hidden sm:hidden",
148
+ placeholder: "search",
149
+ collapsible: ""
150
+ }, null, 8, ["modelValue"])
151
+ ]),
152
+ i(R, {
153
+ class: "xs:hidden sm:hidden",
154
+ "row-data": o(f),
155
+ "column-defs": O,
156
+ "search-value": o(r).searchKey,
157
+ "column-filter": [],
158
+ onRowClick: t[4] || (t[4] = (a) => g(a.original)),
159
+ "hide-footer": o(f).length < 10
160
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
161
+ i(D, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
162
+ default: y(() => [
163
+ (p(!0), w(b, null, q(o(f).filter(
164
+ (a) => a.name.toLowerCase().includes(o(r).searchKey.toLowerCase())
165
+ ), (a) => (p(), C(U, {
166
+ key: a._id.toString(),
167
+ onClick: (S) => g(a),
168
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
169
+ }, {
170
+ default: y(() => [
171
+ n("div", me, [
172
+ n("div", de, [
173
+ (p(), C(z(o(P)(a))))
174
+ ]),
175
+ n("div", pe, [
176
+ n("div", ue, u(a.name), 1),
177
+ n("div", fe, u(o(B)(a)), 1)
178
+ ])
179
+ ]),
180
+ i(L, {
181
+ icon: "delete",
182
+ "icon-color": "neutral-gray-400",
183
+ variant: "tertiary",
184
+ onClick: (S) => (S.stopPropagation(), F(a))
185
+ }, null, 8, ["onClick"])
186
+ ]),
187
+ _: 2
188
+ }, 1032, ["onClick"]))), 128))
189
+ ]),
190
+ _: 1
191
+ })
192
+ ], 64)) : (p(), C(T, {
193
+ key: 1,
194
+ variant: "outlined",
195
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
196
+ }, {
197
+ default: y(() => [
198
+ t[6] || (t[6] = n("img", {
199
+ src: G,
200
+ class: "aspect-square w-[150px]"
201
+ }, null, -1)),
202
+ n("div", ge, [
203
+ n("div", ye, u(o(s)("connect.program.point.empty_state.title")), 1),
204
+ n("div", _e, u(o(s)("connect.program.point.empty_state.description")), 1)
205
+ ]),
206
+ i(L, {
207
+ variant: "primary",
208
+ label: "Create point program",
209
+ disabled: !o(h).isPremium,
210
+ icon: "add",
211
+ onClick: t[5] || (t[5] = (a) => g())
212
+ }, null, 8, ["disabled"])
213
+ ]),
214
+ _: 1
215
+ })),
216
+ i(oe, {
217
+ ref_key: "sheetRef",
218
+ ref: v,
219
+ "onSubmit:modelValue": A
220
+ }, null, 512)
221
+ ])
222
+ ], 64);
223
+ };
224
+ }
225
+ });
226
+ export {
227
+ $e as default
228
+ };