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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/{Analytic-NNi-22sK.js → Analytic-qVhEo_im.js} +16 -16
  2. package/dist/{App-Bu14Mro_.js → App-Ixv1jrHc.js} +625 -619
  3. package/dist/AuditLogs-B2D62tMF.js +1991 -0
  4. package/dist/{Bin-CnAQA85j.js → Bin-Lj7jtS9m.js} +10 -10
  5. package/dist/Broadcast-BpP9VJsx.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DC_fReu7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BB43gKXv.js} +6 -6
  7. package/dist/{Card-DqAGiETA.js → Card-CjArjpou.js} +144 -140
  8. package/dist/Collections-CFzUAHxz.js +540 -0
  9. package/dist/Credit-D43x-T3d.js +261 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js +3167 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-9UhSzClJ.js +351 -0
  14. package/dist/Experience-BaUbRoHV.js +260 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-BO_rbswB.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-DaVqgPWQ.js +331 -0
  18. package/dist/GenerateMaterial-DJM8fZyl.js +589 -0
  19. package/dist/Grab-CykZDrWI.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-C51yGAp9.js} +49 -48
  21. package/dist/{Index-loHkiwyo.js → Index-Do3WIIfM.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BjdBaj4c.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DD-OlYxZ.js} +1 -1
  24. package/dist/Marketing-C9bsnUaQ.js +145 -0
  25. package/dist/MarketingMaterialEdit-CbSh8dpn.js +746 -0
  26. package/dist/{Member-BQjQQdoA.js → Member-IcVRwAAS.js} +38 -37
  27. package/dist/{MemberList-WPsEUKf_.js → MemberList-C_A4PrQN.js} +158 -159
  28. package/dist/{MemberTransactions-BtM7dugy.js → MemberTransactions-CBoaY-gv.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bl9sFIwG.js → MessageInput.vue_vue_type_script_setup_true_lang-Dx28XNPi.js} +13463 -10597
  30. package/dist/Mission-COY_uhwz.js +335 -0
  31. package/dist/{Overview-Bsf5IPOg.js → Overview-DDSz2R4K.js} +24 -25
  32. package/dist/Point-C-KEwgx4.js +263 -0
  33. package/dist/Promotion-BpW9qWzf.js +397 -0
  34. package/dist/{Queue-XFVbSuDw.js → Queue-CO32O8i6.js} +14 -15
  35. package/dist/{Record-CQzujESE.js → Record-BrT5DR9L.js} +10 -10
  36. package/dist/{Reward-Dj_h_May.js → Reward-CbrEw-If.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Clxk-oYM.js → RewardGroup.vue_vue_type_script_setup_true_lang-CpNjlbjZ.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BS5jsRiN.js +1912 -0
  39. package/dist/{Segment-D_DUu_Sp.js → Segment-Cu9_qwXc.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3C2mVlv.js → SelectItems.vue_vue_type_script_setup_true_lang-BH-hzxSs.js} +23 -23
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0vsl8oV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-5HkJROSb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DcUb8X-q.js} +4 -4
  43. package/dist/Setting-CQKfb5b_.js +1999 -0
  44. package/dist/SettingAdvertisements-BxR6Gl-5.js +263 -0
  45. package/dist/Store-6TUpmqAr.js +1995 -0
  46. package/dist/StoreRewards-BOThAOWU.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BYD229dz.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CAamZtdf.js +7005 -0
  49. package/dist/{Tier-YQsLRt06.js → Tier-MF-ad-xm.js} +561 -480
  50. package/dist/{Title-C5gxYNvh.js → Title-MkjTHBzb.js} +149 -147
  51. package/dist/{Transaction-CZ_QdIii.js → Transaction-trYJwTrc.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DwlNK1TC.js} +7 -7
  53. package/dist/Voucher-BD5dTdht.js +422 -0
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BhR_s48Q.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcTe5TJL.js} +2 -2
  56. package/dist/app-CybjF-6Q.js +59071 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-DZYFoAKz.js → business-2hCbD0JX.js} +11 -8
  59. package/dist/{campaign-Ca4l6UUg.js → campaign-Bv-8uM2S.js} +29 -25
  60. package/dist/campaign-h1J8NTAo.js +253 -0
  61. package/dist/campaign.enum-Dea0E4o1.js +26 -0
  62. package/dist/campaign.fn-DqxZMyu0.js +776 -0
  63. package/dist/{collectible.enum-DnIeDAB-.js → collectible.enum-DOyAoz4F.js} +1 -1
  64. package/dist/{collection.fn-mQfXEwJv.js → collection.fn-DU2HuZod.js} +2 -2
  65. package/dist/dto-CT65-FHY.js +222 -0
  66. package/dist/duplicateCampaign-YJGHvOqb.js +51 -0
  67. package/dist/effect-XZ767UQ4.js +89 -0
  68. package/dist/{email-addresses-CQYqi2rN.js → email-addresses-DSgkxSnV.js} +2 -2
  69. package/dist/{export-BsikVZw2.js → export-4gx5C9s9.js} +9 -10
  70. package/dist/{helper-n74IteBU.js → helper-HOLsJca3.js} +22 -7
  71. package/dist/index-BO7N-s4K.js +8912 -0
  72. package/dist/{index-Dt6wui_L.js → index-BfRa1sI3.js} +3 -3
  73. package/dist/index-BnCtmlvU.js +28897 -0
  74. package/dist/{index-Bg3fAg5z.js → index-C5VvGYtP.js} +1 -1
  75. package/dist/index-CSzvYzf4.js +3419 -0
  76. package/dist/{index-Do7TcKmg.js → index-CrdkPXsx.js} +4 -1
  77. package/dist/index-CuvNtC_M.js +61 -0
  78. package/dist/{index-DTErPYrT.js → index-CxE-VVlL.js} +1 -1
  79. package/dist/{index-DRrSsoqp.js → index-Djenbz3F.js} +1 -1
  80. package/dist/{index-BJ-IAF-1.js → index-IHteBJ_D.js} +1 -1
  81. package/dist/{index-BpjT8Rx0.js → index-dUhOAfj9.js} +455 -245
  82. package/dist/index-wm4nGBB_.js +30289 -0
  83. package/dist/{index-CrHCbDIs.js → index-xTrAj026.js} +3 -3
  84. package/dist/index-yViT18i_.js +36 -0
  85. package/dist/{index.esm2017-T7F54Aqa.js → index.esm2017-Wq4FUMEv.js} +185 -185
  86. package/dist/loading-D22xapd8.js +215 -0
  87. package/dist/{lodash-B5I3zXaY.js → lodash-HM6bxuWV.js} +1 -1
  88. package/dist/{membership-BRy4jMt2.js → membership-CX464ZBI.js} +3 -3
  89. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  90. package/dist/{money-B9Auav5u.js → money-B3cPZAZu.js} +1 -1
  91. package/dist/{number-BdhIBsUp.js → number-DT65dEZt.js} +1 -1
  92. package/dist/objectid-DZWw4iLL.js +145 -0
  93. package/dist/{campaign-162kZMje.js → plugins-D-4BlIGs.js} +784 -777
  94. package/dist/remy-D_Deb3ue.js +13 -0
  95. package/dist/{reward-UuqZUHsq.js → reward-C6B-kn0X.js} +1 -1
  96. package/dist/{rule-D158NIpm.js → rule-B94SrDX1.js} +505 -487
  97. package/dist/rule-builder-CQ3uHeX4.js +102 -0
  98. package/dist/style.css +11 -2
  99. package/dist/template-CXB2Ez2S.js +188 -0
  100. package/dist/timezone-D3NuV-rx.js +1154 -0
  101. package/dist/trigger-BsCVC_nU.js +213 -0
  102. package/dist/usePagination-BOZ0-D67.js +223 -0
  103. package/dist/user-Dxp7kluY.js +55 -0
  104. package/dist/vue-i18n-DpCWu1gI.js +2365 -0
  105. package/dist/{xlsx-Ddqi5i8p.js → xlsx-Cc2a2IL9.js} +1 -1
  106. package/dist/{zod-Bg2FbC-D.js → zod-BCSHGdXs.js} +32 -31
  107. package/package.json +14 -6
  108. package/dist/AuditLogs-Cai9CVBl.js +0 -1887
  109. package/dist/Broadcast-DskXjXn4.js +0 -227
  110. package/dist/Collections-DuaIQAk7.js +0 -465
  111. package/dist/Credit-D40Vzu2g.js +0 -222
  112. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  113. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsQ4iAsV.js +0 -2185
  114. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js +0 -347
  115. package/dist/Experience-B9yHQPuj.js +0 -223
  116. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  117. package/dist/Game-e9-Q3qmO.js +0 -278
  118. package/dist/Marketing-CipbukIV.js +0 -20073
  119. package/dist/Mission-B_DJ3Yu_.js +0 -296
  120. package/dist/Point-DMphcWjy.js +0 -226
  121. package/dist/Promotion-B33A-Jwe.js +0 -289
  122. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CGAXTOLN.js +0 -1751
  123. package/dist/Setting-CtdC4G3W.js +0 -1936
  124. package/dist/Store-DCksWACh.js +0 -1842
  125. package/dist/StoreRewards-CHWKYKet.js +0 -423
  126. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D1TDyD6N.js +0 -1029
  127. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D59sGO3F.js +0 -139
  128. package/dist/Voucher-BzV8yZ3o.js +0 -384
  129. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js +0 -419
  130. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  131. package/dist/app-FFOpPHwj.js +0 -33357
  132. package/dist/app-az9e8Yfl.js +0 -7086
  133. package/dist/campaign.enum-DWjyDV2D.js +0 -20
  134. package/dist/campaign.fn-DWWJ74z-.js +0 -758
  135. package/dist/dto-mKZIPV4o.js +0 -214
  136. package/dist/effect-B8UexeyG.js +0 -78
  137. package/dist/index-5ShiAY8U.js +0 -8861
  138. package/dist/index-Bf6AmJwX.js +0 -32260
  139. package/dist/index-C5gjIb5d.js +0 -146
  140. package/dist/index-C9YrDtDN.js +0 -38
  141. package/dist/index-CK-MAqWE.js +0 -3120
  142. package/dist/index-CsaQJMAR.js +0 -66
  143. package/dist/index-f4MzX8IY.js +0 -30038
  144. package/dist/loading-BEAayQS-.js +0 -71
  145. package/dist/objectid-K-JVTsfA.js +0 -145
  146. package/dist/plugins-CWlRYif_.js +0 -208
  147. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  148. package/dist/rule-builder-DNeViq0I.js +0 -89
  149. package/dist/template-B02wYF7G.js +0 -190
  150. package/dist/trigger-BDjnKHLI.js +0 -144
  151. package/dist/usePagination-BeF5K3M7.js +0 -223
  152. package/dist/user-DbP37Ohh.js +0 -54
  153. package/dist/vue-i18n-BbhkYWlk.js +0 -2365
@@ -0,0 +1,335 @@
1
+ import { defineComponent as W, ref as v, computed as G, h as m, onMounted as J, resolveComponent as d, openBlock as u, createElementBlock as S, Fragment as k, createVNode as c, unref as t, createElementVNode as i, withCtx as F, renderList as Q, createBlock as I, resolveDynamicComponent as X, toDisplayString as g } from "vue";
2
+ import { _ as Y } from "./campaign-CpzFl8Vr.js";
3
+ import { u as Z } from "./loading-D22xapd8.js";
4
+ import { a as ee, b as D, c as K } from "./campaign-h1J8NTAo.js";
5
+ import { c as oe, p as te } from "./duplicateCampaign-YJGHvOqb.js";
6
+ import { a as ne, p as ae } from "./plugins-D-4BlIGs.js";
7
+ import { u as ie } from "./business-2hCbD0JX.js";
8
+ import { u as se } from "./campaign-Bv-8uM2S.js";
9
+ import { useDialog as re, components as y } from "@feedmepos/ui-library";
10
+ import { _ as ce } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { u as le } from "./template-CXB2Ez2S.js";
12
+ import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js";
13
+ import { s as de } from "./index-CuvNtC_M.js";
14
+ import { u as pe } from "./vue-i18n-DpCWu1gI.js";
15
+ import { _ as ue } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js";
16
+ import { c as _ } from "./index-CrdkPXsx.js";
17
+ const ge = { class: "px-24 flex flex-col gap-y-16" }, fe = { class: "flex items-center justify-between w-full" }, ye = { class: "flex gap-8 overflow-x-auto" }, _e = { class: "space-y-8" }, he = { class: "flex w-full gap-4 items-center" }, we = { class: "space-y-4" }, Ce = { class: "fm-typo-en-body-lg-600" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ve = { class: "flex items-center gap-8" }, Se = { class: "flex flex-col gap-16 text-center" }, ke = { class: "fm-typo-en-title-sm-800" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, He = /* @__PURE__ */ W({
18
+ __name: "Mission",
19
+ setup(Ie) {
20
+ const { t: a } = pe(), N = {
21
+ label: a("connect.program.common.actions.create", {
22
+ type: a("connect.program.mission.title").toLowerCase()
23
+ }),
24
+ value: "create",
25
+ isPrimary: !0,
26
+ prependIcon: "add"
27
+ }, L = re(), O = le("MISSION", L), R = ie(), p = se(), { global: A, minor: V } = Z, l = v({
28
+ searchKey: "",
29
+ location: []
30
+ });
31
+ function U(e) {
32
+ const o = l.value.location;
33
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some((s) => {
34
+ var r;
35
+ return (r = e == null ? void 0 : e.targetLocation) == null ? void 0 : r.includes(s);
36
+ }) : e.targetLocation.includes(o);
37
+ }
38
+ const f = G(
39
+ () => p.campaigns.mission.filter((e) => U(e))
40
+ ), T = [
41
+ {
42
+ header: a("connect.program.common.table.title"),
43
+ accessorKey: "name",
44
+ // accessorFn: (v) => v.name,
45
+ cell(e) {
46
+ return m("div", { class: "flex items-center justify-between gap-4" }, [
47
+ m("div", { class: "flex items-center" }, [
48
+ m(
49
+ y.FmTooltip,
50
+ {
51
+ content: e.row.original._id,
52
+ onClick: (o) => {
53
+ o.stopPropagation(), ne(e.row.original._id);
54
+ }
55
+ },
56
+ [
57
+ m(y.FmIcon, {
58
+ name: "info",
59
+ outline: !0,
60
+ size: "sm"
61
+ })
62
+ ]
63
+ )
64
+ ]),
65
+ m("div", { class: "flex-1" }, e.row.original.name)
66
+ ]);
67
+ }
68
+ },
69
+ {
70
+ header: a("connect.campaign.mission.type"),
71
+ accessorFn: (e) => de(e.mission.type)
72
+ //v.effect,
73
+ },
74
+ {
75
+ header: a("connect.program.common.table.status"),
76
+ accessorFn: (e) => ee(e),
77
+ cell(e) {
78
+ return D(e.row.original);
79
+ }
80
+ },
81
+ {
82
+ header: a("connect.program.common.table.summary"),
83
+ accessorFn: (e) => K(e)
84
+ //v.effect,
85
+ },
86
+ {
87
+ header: a("connect.campaign.mission.received"),
88
+ accessorFn: (e) => {
89
+ var o;
90
+ return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
91
+ }
92
+ },
93
+ {
94
+ header: a("connect.program.common.table.actions"),
95
+ cell(e) {
96
+ return m("div", { class: "flex items-center gap-8" }, [
97
+ m(y.FmButton, {
98
+ variant: "tertiary",
99
+ icon: "content_copy",
100
+ iconColor: "neutral-gray-400",
101
+ onClick: async (o) => {
102
+ o.stopPropagation(), await P(e.row.original);
103
+ }
104
+ }),
105
+ m(y.FmButton, {
106
+ variant: "tertiary",
107
+ icon: "send",
108
+ iconColor: "neutral-gray-400",
109
+ onClick: (o) => {
110
+ o.stopPropagation(), j(e.row.original);
111
+ }
112
+ }),
113
+ m(y.FmButton, {
114
+ variant: "tertiary",
115
+ icon: "delete",
116
+ iconColor: "neutral-gray-400",
117
+ onClick: (o) => {
118
+ o.stopPropagation(), M(e.row.original);
119
+ }
120
+ })
121
+ ]);
122
+ }
123
+ }
124
+ ], w = v(), B = v();
125
+ async function M(e) {
126
+ await ae.remove(
127
+ a("connect.program.common.remove.confirm", { name: e.name })
128
+ ) && await V(
129
+ async () => {
130
+ await _.delete(e._id), await p.read("MISSION");
131
+ },
132
+ {
133
+ message: a("connect.program.common.remove.removing", { name: e.name }),
134
+ successMessage: a("connect.program.common.remove.removed", {
135
+ name: e.name
136
+ })
137
+ }
138
+ );
139
+ }
140
+ async function h(e) {
141
+ e ? await o() : O.open(async (s) => {
142
+ await o(s);
143
+ });
144
+ async function o(s) {
145
+ var r;
146
+ (r = w.value) == null || r.showSheet(
147
+ !0,
148
+ "MISSION",
149
+ e ? await _.readById(e._id) : void 0,
150
+ s
151
+ );
152
+ }
153
+ }
154
+ async function P(e) {
155
+ var r;
156
+ if (!await oe(e.name))
157
+ return;
158
+ const o = await _.readById(e._id), s = te(o);
159
+ (r = w.value) == null || r.showSheet(
160
+ !0,
161
+ "MISSION",
162
+ s,
163
+ o.template
164
+ );
165
+ }
166
+ async function $(e) {
167
+ e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
168
+ L.open({
169
+ title: "Confirmation",
170
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
171
+ primaryActions: { text: "Update all", close: !0 },
172
+ secondaryActions: { text: "Update future only", close: !0 }
173
+ }).onPrimary(async () => {
174
+ var s;
175
+ e.updateCollections = !0, (s = window.top) == null || s.postMessage("updateAllVoucher", "*"), o();
176
+ }).onSecondary(async () => {
177
+ o();
178
+ });
179
+ }), await V(
180
+ async () => {
181
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await p.read("MISSION");
182
+ },
183
+ {
184
+ message: a(
185
+ e.campaign._id ? "connect.program.common.update.updating" : "connect.program.common.update.creating",
186
+ { type: "Mission" }
187
+ ),
188
+ successMessage: a("connect.program.common.update.success", {
189
+ type: "Mission",
190
+ action: e.campaign._id ? "updated" : "created"
191
+ })
192
+ }
193
+ );
194
+ }
195
+ function j(e) {
196
+ var o;
197
+ (o = B.value) == null || o.showSheet({
198
+ campaign: e
199
+ });
200
+ }
201
+ return J(async () => {
202
+ await A(async () => {
203
+ await p.read("MISSION"), console.log(f);
204
+ });
205
+ }), (e, o) => {
206
+ const s = d("FmPageHead"), r = d("FmSearch"), E = d("FmTable"), C = d("FmButton"), H = d("FmListItem"), q = d("FmList"), z = d("FmCard");
207
+ return u(), S(k, null, [
208
+ c(s, {
209
+ title: t(a)("connect.campaign.mission.title"),
210
+ actions: t(f).length > 0 ? [N] : [],
211
+ "onClick:action": o[0] || (o[0] = () => h())
212
+ }, null, 8, ["title", "actions"]),
213
+ i("div", ge, [
214
+ c(r, {
215
+ modelValue: t(l).searchKey,
216
+ "onUpdate:modelValue": o[1] || (o[1] = (n) => t(l).searchKey = n),
217
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
218
+ placeholder: t(a)("connect.program.common.search"),
219
+ collapsible: ""
220
+ }, null, 8, ["modelValue", "placeholder"]),
221
+ t(p).campaigns.mission && t(p).campaigns.mission.length > 0 ? (u(), S(k, { key: 0 }, [
222
+ i("div", fe, [
223
+ i("div", ye, [
224
+ c(ce, {
225
+ label: `${t(a)("connect.program.common.location")}: `,
226
+ "right-icon": "keyboard_arrow_down",
227
+ modelValue: t(l).location,
228
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => t(l).location = n),
229
+ icon: "storefront",
230
+ "show-item-label": !0,
231
+ items: t(R).locationOptions
232
+ }, null, 8, ["label", "modelValue", "items"])
233
+ ]),
234
+ c(r, {
235
+ modelValue: t(l).searchKey,
236
+ "onUpdate:modelValue": o[3] || (o[3] = (n) => t(l).searchKey = n),
237
+ class: "xs:hidden sm:hidden",
238
+ placeholder: "search",
239
+ collapsible: ""
240
+ }, null, 8, ["modelValue"])
241
+ ]),
242
+ c(E, {
243
+ class: "xs:hidden sm:hidden",
244
+ "row-data": t(f),
245
+ "column-defs": T,
246
+ "search-value": t(l).searchKey,
247
+ "column-filter": [],
248
+ onRowClick: o[4] || (o[4] = (n) => h(n.original)),
249
+ "hide-footer": t(f).length < 10
250
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
251
+ c(q, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
252
+ default: F(() => [
253
+ (u(!0), S(k, null, Q(t(f).filter(
254
+ (n) => n.name.toLowerCase().includes(t(l).searchKey.toLowerCase())
255
+ ), (n) => (u(), I(H, {
256
+ key: n._id.toString(),
257
+ onClick: (x) => h(n),
258
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
259
+ }, {
260
+ default: F(() => {
261
+ var x;
262
+ return [
263
+ i("div", _e, [
264
+ i("div", he, [
265
+ (u(), I(X(t(D)(n))))
266
+ ]),
267
+ i("div", we, [
268
+ i("div", Ce, g(n.name), 1),
269
+ i("div", xe, g(t(K)(n)), 1)
270
+ ]),
271
+ i("div", be, g(t(a)("connect.campaign.mission.received")) + " : " + g(((x = n == null ? void 0 : n.pf_collectible) == null ? void 0 : x.currentReceive) ?? 0), 1)
272
+ ]),
273
+ i("div", ve, [
274
+ c(C, {
275
+ icon: "content_copy",
276
+ "icon-color": "neutral-gray-400",
277
+ variant: "tertiary",
278
+ onClick: async (b) => {
279
+ b.stopPropagation(), await P(n);
280
+ }
281
+ }, null, 8, ["onClick"]),
282
+ c(C, {
283
+ icon: "delete",
284
+ "icon-color": "neutral-gray-400",
285
+ variant: "tertiary",
286
+ onClick: (b) => (b.stopPropagation(), M(n))
287
+ }, null, 8, ["onClick"])
288
+ ])
289
+ ];
290
+ }),
291
+ _: 2
292
+ }, 1032, ["onClick"]))), 128))
293
+ ]),
294
+ _: 1
295
+ })
296
+ ], 64)) : (u(), I(z, {
297
+ key: 1,
298
+ variant: "outlined",
299
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
300
+ }, {
301
+ default: F(() => [
302
+ o[6] || (o[6] = i("img", {
303
+ src: Y,
304
+ class: "aspect-square w-[150px]"
305
+ }, null, -1)),
306
+ i("div", Se, [
307
+ i("div", ke, g(t(a)("connect.campaign.mission.createProgram")), 1),
308
+ i("div", Fe, g(t(a)("connect.campaign.mission.description")), 1)
309
+ ]),
310
+ c(C, {
311
+ variant: "primary",
312
+ label: t(a)("connect.campaign.mission.create"),
313
+ icon: "add",
314
+ onClick: o[5] || (o[5] = (n) => h())
315
+ }, null, 8, ["label"])
316
+ ]),
317
+ _: 1
318
+ })),
319
+ c(me, {
320
+ ref_key: "sheetRef",
321
+ ref: w,
322
+ "onSubmit:modelValue": $
323
+ }, null, 512),
324
+ c(ue, {
325
+ ref_key: "sendCollectionSheetRef",
326
+ ref: B
327
+ }, null, 512)
328
+ ])
329
+ ], 64);
330
+ };
331
+ }
332
+ });
333
+ export {
334
+ He as default
335
+ };
@@ -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-BbhkYWlk.js";
4
- import { u as ue } from "./loading-BEAayQS-.js";
5
- import { c as we, p as K } from "./plugins-CWlRYif_.js";
3
+ import { u as Z } from "./vue-i18n-DpCWu1gI.js";
4
+ import { u as ue } from "./loading-D22xapd8.js";
5
+ import { c as we, p as K } from "./plugins-D-4BlIGs.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-BCSHGdXs.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-Clxk-oYM.js";
10
- import { u as me } from "./reward-UuqZUHsq.js";
11
- import { a as be, b as xe } from "./index-BpjT8Rx0.js";
12
- import { l as le, c as se } from "./index-CK-MAqWE.js";
13
- import "./index-5ShiAY8U.js";
14
- import "./index-C9YrDtDN.js";
15
- import "./index-Dt6wui_L.js";
16
- import "./index-Bf6AmJwX.js";
17
- import { C as fe } from "./membership-BRy4jMt2.js";
18
- import { t as ee } from "./helper-n74IteBU.js";
9
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CpNjlbjZ.js";
10
+ import { u as me } from "./reward-C6B-kn0X.js";
11
+ import { a as be, b as xe } from "./index-dUhOAfj9.js";
12
+ import { l as le, c as se } from "./index-CSzvYzf4.js";
13
+ import "./index-BO7N-s4K.js";
14
+ import "./index-wm4nGBB_.js";
15
+ import "./index-BfRa1sI3.js";
16
+ import { C as fe } from "./membership-CX464ZBI.js";
17
+ import { t as ee } from "./helper-HOLsJca3.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-DCtdp-LK.js";
22
- import { a as Se, _ as Fe, b as ke } from "./trigger-BDjnKHLI.js";
23
- import { O as $e } from "./objectid-K-JVTsfA.js";
24
- import { r as pe } from "./index-BJ-IAF-1.js";
25
- import { u as Pe } from "./business-DZYFoAKz.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-CcTe5TJL.js";
21
+ import { a as Se, _ as Fe, b as ke } from "./trigger-BsCVC_nU.js";
22
+ import { O as $e } from "./objectid-DZWw4iLL.js";
23
+ import { r as pe } from "./index-IHteBJ_D.js";
24
+ import { u as Pe } from "./business-2hCbD0JX.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,263 @@
1
+ import { defineComponent as H, ref as I, computed as q, h as x, onMounted as z, resolveComponent as m, openBlock as d, createElementBlock as v, Fragment as k, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as u, renderList as G, createBlock as F, resolveDynamicComponent as J } from "vue";
2
+ import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as W, components as V } from "@feedmepos/ui-library";
4
+ import { p as X } from "./plugins-D-4BlIGs.js";
5
+ import { u as Y } from "./loading-D22xapd8.js";
6
+ import { u as Z } from "./business-2hCbD0JX.js";
7
+ import { u as ee } from "./campaign-Bv-8uM2S.js";
8
+ import { a as te, b as $, c as N } from "./campaign-h1J8NTAo.js";
9
+ import { c as oe, p as ae } from "./duplicateCampaign-YJGHvOqb.js";
10
+ import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as ie } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js";
12
+ import { u as se } from "./template-CXB2Ez2S.js";
13
+ import { u as re } from "./vue-i18n-DpCWu1gI.js";
14
+ import { c as f } from "./index-CrdkPXsx.js";
15
+ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, pe = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = { class: "flex items-center gap-8" }, Ce = { class: "flex flex-col gap-16 text-center" }, we = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ H({
16
+ __name: "Point",
17
+ setup(xe) {
18
+ const { t: i } = re(), D = {
19
+ label: i("connect.program.common.actions.create", {
20
+ type: i("connect.program.point.title").toLowerCase()
21
+ }),
22
+ value: "create",
23
+ isPrimary: !0,
24
+ prependIcon: "add"
25
+ }, K = se("COIN", W()), C = Z(), p = ee(), { global: O, minor: S } = Y, l = I({
26
+ searchKey: "",
27
+ location: []
28
+ });
29
+ function A(e) {
30
+ const t = l.value.location;
31
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((c) => {
32
+ var r;
33
+ return (r = e == null ? void 0 : e.targetLocation) == null ? void 0 : r.includes(c);
34
+ }) : e.targetLocation.includes(t);
35
+ }
36
+ const g = q(
37
+ () => p.campaigns.point.filter((e) => A(e))
38
+ ), R = [
39
+ {
40
+ header: i("connect.program.common.table.title"),
41
+ accessorFn: (e) => e.name
42
+ },
43
+ {
44
+ header: i("connect.program.common.table.status"),
45
+ accessorFn: (e) => te(e),
46
+ cell(e) {
47
+ return $(e.row.original);
48
+ }
49
+ },
50
+ {
51
+ header: i("connect.program.common.table.summary"),
52
+ accessorFn: (e) => N(e)
53
+ },
54
+ {
55
+ header: i("connect.program.common.table.actions"),
56
+ cell(e) {
57
+ return x("div", { class: "flex items-center gap-8 justify-end" }, [
58
+ x(V.FmButton, {
59
+ variant: "tertiary",
60
+ icon: "content_copy",
61
+ iconColor: "neutral-gray-400",
62
+ onClick: async (t) => {
63
+ t.stopPropagation(), await P(e.row.original);
64
+ }
65
+ }),
66
+ x(V.FmButton, {
67
+ variant: "tertiary",
68
+ icon: "delete",
69
+ iconColor: "neutral-gray-400",
70
+ onClick: (t) => {
71
+ t.stopPropagation(), L(e.row.original);
72
+ }
73
+ })
74
+ ]);
75
+ }
76
+ }
77
+ ], w = I();
78
+ async function L(e) {
79
+ await X.remove(`Are you sure you want to remove ${e.name}?`) && await S(
80
+ async () => {
81
+ await f.delete(e._id), await p.read("COIN");
82
+ },
83
+ {
84
+ message: `Removing ${e.name}`,
85
+ successMessage: `Removed ${e.name} successfully`
86
+ }
87
+ );
88
+ }
89
+ async function y(e) {
90
+ e ? await t() : K.open(async (c) => {
91
+ await t(c);
92
+ });
93
+ async function t(c) {
94
+ var r;
95
+ (r = w.value) == null || r.showSheet(
96
+ !0,
97
+ "COIN",
98
+ e ? await f.readById(e._id) : void 0,
99
+ c
100
+ );
101
+ }
102
+ }
103
+ async function P(e) {
104
+ var r;
105
+ if (!await oe(e.name))
106
+ return;
107
+ const t = await f.readById(e._id), c = ae(t, {
108
+ keepCollectible: !0
109
+ });
110
+ (r = w.value) == null || r.showSheet(
111
+ !0,
112
+ "COIN",
113
+ c,
114
+ t.template
115
+ );
116
+ }
117
+ async function U(e) {
118
+ await S(
119
+ async () => {
120
+ e.campaign._id ? await f.update(e.campaign._id, e) : await f.create(e), await p.read("COIN");
121
+ },
122
+ {
123
+ message: `${e.campaign._id ? "Updating" : "Creating"} point program`,
124
+ successMessage: `Point program ${e.campaign._id ? "updated" : "created"} successfully`
125
+ }
126
+ );
127
+ }
128
+ return z(async () => {
129
+ await O(async () => {
130
+ await p.read("COIN");
131
+ });
132
+ }), (e, t) => {
133
+ const c = m("FmPill"), r = m("FmPageHead"), B = m("FmSearch"), j = m("FmTable"), b = m("FmButton"), T = m("FmListItem"), E = m("FmList"), M = m("FmCard");
134
+ return d(), v(k, null, [
135
+ s(r, {
136
+ title: o(i)("connect.program.point.title"),
137
+ actions: o(g).length > 0 && o(C).isPremium ? [D] : [],
138
+ "onClick:action": t[0] || (t[0] = () => y())
139
+ }, {
140
+ title: h(() => [
141
+ n("div", le, [
142
+ n("span", ce, u(o(i)("connect.program.point.title")), 1),
143
+ s(c, { variant: "premium" })
144
+ ])
145
+ ]),
146
+ _: 1
147
+ }, 8, ["title", "actions"]),
148
+ n("div", me, [
149
+ s(B, {
150
+ modelValue: o(l).searchKey,
151
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
152
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
153
+ placeholder: "search",
154
+ collapsible: ""
155
+ }, null, 8, ["modelValue"]),
156
+ o(p).campaigns.point && o(p).campaigns.point.length > 0 ? (d(), v(k, { key: 0 }, [
157
+ n("div", pe, [
158
+ n("div", de, [
159
+ s(ne, {
160
+ label: `${o(i)("connect.common.location")}: `,
161
+ "right-icon": "keyboard_arrow_down",
162
+ modelValue: o(l).location,
163
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
164
+ icon: "storefront",
165
+ "show-item-label": !0,
166
+ items: o(C).locationOptions
167
+ }, null, 8, ["label", "modelValue", "items"])
168
+ ]),
169
+ s(B, {
170
+ modelValue: o(l).searchKey,
171
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
172
+ class: "xs:hidden sm:hidden",
173
+ placeholder: "search",
174
+ collapsible: ""
175
+ }, null, 8, ["modelValue"])
176
+ ]),
177
+ s(j, {
178
+ class: "xs:hidden sm:hidden",
179
+ "row-data": o(g),
180
+ "column-defs": R,
181
+ "search-value": o(l).searchKey,
182
+ "column-filter": [],
183
+ onRowClick: t[4] || (t[4] = (a) => y(a.original)),
184
+ "hide-footer": o(g).length < 10
185
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
186
+ s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
187
+ default: h(() => [
188
+ (d(!0), v(k, null, G(o(g).filter(
189
+ (a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
190
+ ), (a) => (d(), F(T, {
191
+ key: a._id.toString(),
192
+ onClick: (_) => y(a),
193
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
194
+ }, {
195
+ default: h(() => [
196
+ n("div", ue, [
197
+ n("div", fe, [
198
+ (d(), F(J(o($)(a))))
199
+ ]),
200
+ n("div", ge, [
201
+ n("div", ye, u(a.name), 1),
202
+ n("div", _e, u(o(N)(a)), 1)
203
+ ])
204
+ ]),
205
+ n("div", he, [
206
+ s(b, {
207
+ icon: "content_copy",
208
+ "icon-color": "neutral-gray-400",
209
+ variant: "tertiary",
210
+ onClick: async (_) => {
211
+ _.stopPropagation(), await P(a);
212
+ }
213
+ }, null, 8, ["onClick"]),
214
+ s(b, {
215
+ icon: "delete",
216
+ "icon-color": "neutral-gray-400",
217
+ variant: "tertiary",
218
+ onClick: (_) => (_.stopPropagation(), L(a))
219
+ }, null, 8, ["onClick"])
220
+ ])
221
+ ]),
222
+ _: 2
223
+ }, 1032, ["onClick"]))), 128))
224
+ ]),
225
+ _: 1
226
+ })
227
+ ], 64)) : (d(), F(M, {
228
+ key: 1,
229
+ variant: "outlined",
230
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
231
+ }, {
232
+ default: h(() => [
233
+ t[6] || (t[6] = n("img", {
234
+ src: Q,
235
+ class: "aspect-square w-[150px]"
236
+ }, null, -1)),
237
+ n("div", Ce, [
238
+ n("div", we, u(o(i)("connect.program.point.empty_state.title")), 1),
239
+ n("div", be, u(o(i)("connect.program.point.empty_state.description")), 1)
240
+ ]),
241
+ s(b, {
242
+ variant: "primary",
243
+ label: "Create point program",
244
+ disabled: !o(C).isPremium,
245
+ icon: "add",
246
+ onClick: t[5] || (t[5] = (a) => y())
247
+ }, null, 8, ["disabled"])
248
+ ]),
249
+ _: 1
250
+ })),
251
+ s(ie, {
252
+ ref_key: "sheetRef",
253
+ ref: w,
254
+ "onSubmit:modelValue": U
255
+ }, null, 512)
256
+ ])
257
+ ], 64);
258
+ };
259
+ }
260
+ });
261
+ export {
262
+ Ae as default
263
+ };