@feedmepos/mf-connect 0.1.0-beta.64 → 0.1.0-beta.65

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 (89) hide show
  1. package/dist/{Analytic-B325EvdK.js → Analytic-BykZRzDs.js} +11 -11
  2. package/dist/{App-Cm-p4GBZ.js → App-DlJhQ-d7.js} +6 -6
  3. package/dist/{AuditLogs-Da6jqw_l.js → AuditLogs-D_Tj-hN5.js} +8 -8
  4. package/dist/{Bin-Cgxr39me.js → Bin-B9DIsHlV.js} +8 -8
  5. package/dist/{Broadcast-CR3YdMim.js → Broadcast-HujD0CH6.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJDw0QLZ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B9KbyT0Z.js} +6 -6
  7. package/dist/{Card-CIlXJesR.js → Card-dEGuVh8Y.js} +15 -15
  8. package/dist/{Collections-Dkp13T6I.js → Collections-DLU_r242.js} +5 -5
  9. package/dist/{Credit-BL7s3TmG.js → Credit-DPxRywNS.js} +9 -9
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgKNPE7p.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BO7Zjzjn.js} +28 -28
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BTXLeEQV.js → EffectSheet.vue_vue_type_style_index_0_lang-CDCnlwRw.js} +6 -6
  12. package/dist/{Experience-Cr7c9Dmr.js → Experience-DbeeaSny.js} +9 -9
  13. package/dist/Game-DF-tRQmA.js +278 -0
  14. package/dist/{Index-D1DjHCn6.js → Index-D-Gl4vEU.js} +10 -10
  15. package/dist/{Marketing-RKv-hDji.js → Marketing-BVUn9m1D.js} +6 -6
  16. package/dist/{Member-BpE1hEHn.js → Member-DeAQPJ5c.js} +5 -5
  17. package/dist/{MemberList-D7LB9fXz.js → MemberList-CK3ItLYd.js} +24 -24
  18. package/dist/{MemberTransactions-BWHZqhcv.js → MemberTransactions-ChvkxttB.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DPnmbxWD.js → MessageInput.vue_vue_type_script_setup_true_lang-DJjiapX-.js} +8 -8
  20. package/dist/{Mission-CPNWKX0I.js → Mission-af0CLDdi.js} +117 -96
  21. package/dist/{Overview-DJels2bf.js → Overview-bE-CxDyW.js} +52 -52
  22. package/dist/{Point-PXjurF_w.js → Point-DMUJXRIW.js} +9 -9
  23. package/dist/{Promotion-CFFuDmX9.js → Promotion-C72ZIHQC.js} +10 -10
  24. package/dist/{Queue-C-0R9noT.js → Queue-BxVMOXfX.js} +19 -19
  25. package/dist/{Record-Cg3Uk_e0.js → Record-BTXkLR-X.js} +7 -7
  26. package/dist/{Reward-q3OH71kA.js → Reward-UtZnwyhC.js} +15 -15
  27. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CTDa510y.js → RewardGroup.vue_vue_type_script_setup_true_lang-BBSqJfeS.js} +11 -11
  28. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D6y3fXbd.js → RuleGroup.vue_vue_type_script_setup_true_lang-u9z-Uco-.js} +244 -241
  29. package/dist/{Segment-BUxi24U7.js → Segment-CsCYYgLL.js} +14 -14
  30. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-xA3_GoYK.js → SelectItems.vue_vue_type_script_setup_true_lang-B7jbLxek.js} +2 -2
  31. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-kBXjyEyt.js +186 -0
  32. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKPEsDLl.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BVE_boAC.js} +3 -3
  33. package/dist/{Setting-Y3cUXNMQ.js → Setting-B1W1sMAI.js} +10 -10
  34. package/dist/{Store-DhwEmp-R.js → Store-DC3YkCuT.js} +18 -18
  35. package/dist/{StoreRewards-BWOMVEzb.js → StoreRewards-BLSf4yL5.js} +13 -13
  36. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-B7BAEEiB.js → StoreTransactions.vue_vue_type_script_setup_true_lang-7JAwsa6H.js} +17 -17
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C3K5UV1O.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bj7An5CY.js} +1 -1
  38. package/dist/{Tier-5sRNLSO1.js → Tier-DoGYPOK2.js} +19 -19
  39. package/dist/{Title-BwGfSgM4.js → Title-Dcg5_aiJ.js} +19 -19
  40. package/dist/{Transaction-BbIdqQsD.js → Transaction-DjzGqSTu.js} +2 -2
  41. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-qNeUH0Gf.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CWv6o4xN.js} +6 -6
  42. package/dist/{Voucher-BvOxoMrH.js → Voucher-COtfsGvM.js} +12 -12
  43. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BtazBTn_.js → VoucherEditor.vue_vue_type_script_setup_true_lang-tl9RMCof.js} +10 -10
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BWcX9cJf.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6abwK-T.js} +1 -1
  45. package/dist/{app-33F7lJW2.js → app-CTeqEkoa.js} +1 -1
  46. package/dist/{app-CoVaAkSk.js → app-SUKcprMq.js} +463 -453
  47. package/dist/app.js +1 -1
  48. package/dist/{business-BtgsuI9Z.js → business-DcFWQWQ_.js} +1 -1
  49. package/dist/{campaign-D6PH5eQ_.js → campaign-9l1-4E18.js} +9 -9
  50. package/dist/{campaign-GRjeK1WI.js → campaign-B1xMjgeN.js} +2 -2
  51. package/dist/{campaign.enum-KcUV41Ki.js → campaign.enum-BoBKGas3.js} +1 -1
  52. package/dist/{campaign.fn-DlaQfCnQ.js → campaign.fn-BuJQp7OR.js} +41 -41
  53. package/dist/{collectible.enum-D8QbCobD.js → collectible.enum-CBU_rAz2.js} +1 -1
  54. package/dist/{collection.fn-By3YQRv8.js → collection.fn-BzmzHuiA.js} +2 -2
  55. package/dist/{dto-CuPBd2H3.js → dto-BIamKujn.js} +4 -4
  56. package/dist/{effect-BokWNg14.js → effect-B-4TI9VM.js} +1 -1
  57. package/dist/{email-addresses-DE4qV3Eh.js → email-addresses-DEv8LE3V.js} +1 -1
  58. package/dist/{export-B8kx1Nmt.js → export-FypV374Y.js} +3 -3
  59. package/dist/{helper-COmipb68.js → helper-ByX6M5s_.js} +1 -1
  60. package/dist/{index-DKqP75Bm.js → index--ljh_arC.js} +1 -1
  61. package/dist/{index-DiTg_x8h.js → index-B0wqzS6z.js} +1 -1
  62. package/dist/{index-BNKBRRdT.js → index-BsGmEByl.js} +1 -1
  63. package/dist/{index-BtjSlXEc.js → index-C3R1PpLs.js} +1 -1
  64. package/dist/{index-BtzXDz7E.js → index-COs3r3yx.js} +1 -1
  65. package/dist/{index-Bk9xhO-D.js → index-CcJqawSD.js} +1 -1
  66. package/dist/{index-DHw_2WuP.js → index-CdMXuKzu.js} +3 -3
  67. package/dist/{index-SzOkDo2y.js → index-DHt_xUTS.js} +3 -3
  68. package/dist/index-DgkJMGFX.js +73912 -0
  69. package/dist/{index-8CMfJmg3.js → index-YmukhZFD.js} +82 -76
  70. package/dist/{index-CQct2DL8.js → index-uf-Xzbbb.js} +1 -1
  71. package/dist/{index-esK00bm6.js → index-wKj9Jq_Y.js} +2 -2
  72. package/dist/{index.esm2017-IwuN8acP.js → index.esm2017-D2ty8PoZ.js} +1 -1
  73. package/dist/{loading-BWW2Z1X0.js → loading-BkexxRvP.js} +1 -1
  74. package/dist/{membership-CJK6mxff.js → membership-DSvm3lCf.js} +3 -3
  75. package/dist/{money-DDs_MtN7.js → money-BWtCy3GX.js} +1 -1
  76. package/dist/{number-pF7bUUUj.js → number-DeIIxnKB.js} +1 -1
  77. package/dist/{objectid-Bjt4ojTL.js → objectid-5Cs5ddrm.js} +1 -1
  78. package/dist/{plugins-BsO39OJE.js → plugins-BovoaCMv.js} +6 -4
  79. package/dist/{reward-2pJnAigN.js → reward-C3FKPfvO.js} +1 -1
  80. package/dist/{rule-builder-DlCdj9oR.js → rule-builder-_n-2bDtG.js} +1 -1
  81. package/dist/{rule-DxWfHg0z.js → rule-bx6kGPEY.js} +8 -4
  82. package/dist/{template-DDGHUxfa.js → template-DCacwacU.js} +4 -4
  83. package/dist/{trigger-DQxt8ZNb.js → trigger-DkTKCHNq.js} +11 -11
  84. package/dist/{user-C0hkkvCd.js → user-yXVKLZVM.js} +1 -1
  85. package/dist/{vue-i18n-BrZbqfu6.js → vue-i18n-bpwKTYQc.js} +248 -248
  86. package/dist/{xlsx-CzvLdaX-.js → xlsx-CyCSR0F9.js} +1 -1
  87. package/package.json +1 -1
  88. package/dist/Game-qBiDfoX8.js +0 -257
  89. package/dist/index-DBqFcTrv.js +0 -2179
@@ -1,52 +1,53 @@
1
- import { defineComponent as E, ref as M, computed as $, h as d, onMounted as H, resolveComponent as l, openBlock as p, createElementBlock as h, Fragment as w, createVNode as c, unref as t, createElementVNode as s, withCtx as x, renderList as q, createBlock as b, resolveDynamicComponent as z, toDisplayString as u } from "vue";
2
- import { _ as W } from "./campaign-CpzFl8Vr.js";
3
- import { u as G } from "./loading-BWW2Z1X0.js";
4
- import { g as J, a as L, b as B } from "./campaign-D6PH5eQ_.js";
5
- import { a as Q, p as X } from "./plugins-BsO39OJE.js";
6
- import { u as Y } from "./business-BtgsuI9Z.js";
7
- import { u as Z } from "./campaign-GRjeK1WI.js";
8
- import { useDialog as ee, components as v } from "@feedmepos/ui-library";
9
- import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { u as te } from "./template-DDGHUxfa.js";
11
- import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgKNPE7p.js";
12
- import { s as ae } from "./index-CsaQJMAR.js";
13
- import { u as se } from "./vue-i18n-BrZbqfu6.js";
14
- import { c as _ } from "./index-BNKBRRdT.js";
15
- const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ E({
1
+ import { defineComponent as H, ref as w, computed as q, h as l, onMounted as z, resolveComponent as m, openBlock as p, createElementBlock as x, Fragment as v, createVNode as c, unref as t, createElementVNode as s, withCtx as C, renderList as W, createBlock as b, resolveDynamicComponent as G, toDisplayString as u } from "vue";
2
+ import { _ as J } from "./campaign-CpzFl8Vr.js";
3
+ import { u as Q } from "./loading-BkexxRvP.js";
4
+ import { g as X, a as B, b as P } from "./campaign-9l1-4E18.js";
5
+ import { a as Y, p as Z } from "./plugins-BovoaCMv.js";
6
+ import { u as ee } from "./business-DcFWQWQ_.js";
7
+ import { u as oe } from "./campaign-B1xMjgeN.js";
8
+ import { useDialog as te, components as _ } from "@feedmepos/ui-library";
9
+ import { _ as ne } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
+ import { u as ae } from "./template-DCacwacU.js";
11
+ import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BO7Zjzjn.js";
12
+ import { s as ie } from "./index-CsaQJMAR.js";
13
+ import { u as ce } from "./vue-i18n-bpwKTYQc.js";
14
+ import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-kBXjyEyt.js";
15
+ import { c as h } from "./index-BsGmEByl.js";
16
+ const le = { class: "px-24 flex flex-col gap-y-16" }, me = { class: "flex items-center justify-between w-full" }, de = { class: "flex gap-8 overflow-x-auto" }, pe = { class: "space-y-8" }, ue = { class: "flex w-full gap-4 items-center" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, 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: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "flex flex-col gap-16 text-center" }, xe = { class: "fm-typo-en-title-sm-800" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ H({
16
17
  __name: "Mission",
17
- setup(we) {
18
- const { t: n } = se(), P = {
18
+ setup(Ce) {
19
+ const { t: n } = ce(), R = {
19
20
  label: n("connect.program.common.actions.create", {
20
21
  type: n("connect.program.mission.title").toLowerCase()
21
22
  }),
22
23
  value: "create",
23
24
  isPrimary: !0,
24
25
  prependIcon: "add"
25
- }, C = ee(), K = te("MISSION", C), N = Y(), m = Z(), { global: R, minor: S } = G, i = M({
26
+ }, S = te(), K = ae("MISSION", S), N = ee(), d = oe(), { global: T, minor: F } = Q, i = w({
26
27
  searchKey: "",
27
28
  location: null
28
- }), g = $(
29
- () => m.campaigns.mission.filter(
29
+ }), f = q(
30
+ () => d.campaigns.mission.filter(
30
31
  (e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
31
32
  )
32
- ), T = [
33
+ ), U = [
33
34
  {
34
35
  header: n("connect.program.common.table.title"),
35
36
  accessorKey: "name",
36
37
  // accessorFn: (v) => v.name,
37
38
  cell(e) {
38
- return d("div", { class: "flex items-center justify-between gap-4" }, [
39
- d("div", { class: "flex items-center" }, [
40
- d(
41
- v.FmTooltip,
39
+ return l("div", { class: "flex items-center justify-between gap-4" }, [
40
+ l("div", { class: "flex items-center" }, [
41
+ l(
42
+ _.FmTooltip,
42
43
  {
43
44
  content: e.row.original._id,
44
45
  onClick: (o) => {
45
- o.stopPropagation(), Q(e.row.original._id);
46
+ o.stopPropagation(), Y(e.row.original._id);
46
47
  }
47
48
  },
48
49
  [
49
- d(v.FmIcon, {
50
+ l(_.FmIcon, {
50
51
  name: "info",
51
52
  outline: !0,
52
53
  size: "sm"
@@ -54,25 +55,25 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
54
55
  ]
55
56
  )
56
57
  ]),
57
- d("div", { class: "flex-1" }, e.row.original.name)
58
+ l("div", { class: "flex-1" }, e.row.original.name)
58
59
  ]);
59
60
  }
60
61
  },
61
62
  {
62
63
  header: n("connect.campaign.mission.type"),
63
- accessorFn: (e) => ae(e.mission.type)
64
+ accessorFn: (e) => ie(e.mission.type)
64
65
  //v.effect,
65
66
  },
66
67
  {
67
68
  header: n("connect.program.common.table.status"),
68
- accessorFn: (e) => J(e),
69
+ accessorFn: (e) => X(e),
69
70
  cell(e) {
70
- return L(e.row.original);
71
+ return B(e.row.original);
71
72
  }
72
73
  },
73
74
  {
74
75
  header: n("connect.program.common.table.summary"),
75
- accessorFn: (e) => B(e)
76
+ accessorFn: (e) => P(e)
76
77
  //v.effect,
77
78
  },
78
79
  {
@@ -85,23 +86,33 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
85
86
  {
86
87
  header: n("connect.program.common.table.actions"),
87
88
  cell(e) {
88
- return d(v.FmButton, {
89
- variant: "tertiary",
90
- icon: "delete",
91
- iconColor: "neutral-gray-400",
92
- onClick: (o) => {
93
- o.stopPropagation(), k(e.row.original);
94
- }
95
- });
89
+ return l("div", { class: "flex items-center gap-8" }, [
90
+ l(_.FmButton, {
91
+ variant: "tertiary",
92
+ icon: "send",
93
+ iconColor: "neutral-gray-400",
94
+ onClick: (o) => {
95
+ o.stopPropagation(), A(e.row.original);
96
+ }
97
+ }),
98
+ l(_.FmButton, {
99
+ variant: "tertiary",
100
+ icon: "delete",
101
+ iconColor: "neutral-gray-400",
102
+ onClick: (o) => {
103
+ o.stopPropagation(), V(e.row.original);
104
+ }
105
+ })
106
+ ]);
96
107
  }
97
108
  }
98
- ], F = M();
99
- async function k(e) {
100
- await X.remove(
109
+ ], k = w(), I = w();
110
+ async function V(e) {
111
+ await Z.remove(
101
112
  n("connect.program.common.remove.confirm", { name: e.name })
102
- ) && await S(
113
+ ) && await F(
103
114
  async () => {
104
- await _.delete(e._id), await m.read("MISSION");
115
+ await h.delete(e._id), await d.read("MISSION");
105
116
  },
106
117
  {
107
118
  message: n("connect.program.common.remove.removing", { name: e.name }),
@@ -116,18 +127,18 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
116
127
  await o(r);
117
128
  });
118
129
  async function o(r) {
119
- var f;
120
- (f = F.value) == null || f.showSheet(
130
+ var g;
131
+ (g = k.value) == null || g.showSheet(
121
132
  !0,
122
133
  "MISSION",
123
- e ? await _.readById(e._id) : void 0,
134
+ e ? await h.readById(e._id) : void 0,
124
135
  r
125
136
  );
126
137
  }
127
138
  }
128
- async function U(e) {
139
+ async function O(e) {
129
140
  e.campaign._id && e.campaign.rewards.some((o) => o.type === "VOUCHER") && await new Promise((o) => {
130
- C.open({
141
+ S.open({
131
142
  title: "Confirmation",
132
143
  message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
133
144
  primaryActions: { text: "Update all", close: !0 },
@@ -138,9 +149,9 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
138
149
  }).onSecondary(async () => {
139
150
  o();
140
151
  });
141
- }), await S(
152
+ }), await F(
142
153
  async () => {
143
- e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("MISSION");
154
+ e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await d.read("MISSION");
144
155
  },
145
156
  {
146
157
  message: n(
@@ -154,30 +165,36 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
154
165
  }
155
166
  );
156
167
  }
157
- return H(async () => {
158
- await R(async () => {
159
- await m.read("MISSION"), console.log(g);
168
+ function A(e) {
169
+ var o;
170
+ (o = I.value) == null || o.showSheet({
171
+ campaign: e
172
+ });
173
+ }
174
+ return z(async () => {
175
+ await T(async () => {
176
+ await d.read("MISSION"), console.log(f);
160
177
  });
161
178
  }), (e, o) => {
162
- const r = l("FmPageHead"), f = l("FmSearch"), O = l("FmTable"), I = l("FmButton"), A = l("FmListItem"), D = l("FmList"), j = l("FmCard");
163
- return p(), h(w, null, [
179
+ const r = m("FmPageHead"), g = m("FmSearch"), D = m("FmTable"), M = m("FmButton"), $ = m("FmListItem"), j = m("FmList"), E = m("FmCard");
180
+ return p(), x(v, null, [
164
181
  c(r, {
165
182
  title: t(n)("connect.campaign.mission.title"),
166
- actions: t(g).length > 0 ? [P] : [],
183
+ actions: t(f).length > 0 ? [R] : [],
167
184
  "onClick:action": o[0] || (o[0] = () => y())
168
185
  }, null, 8, ["title", "actions"]),
169
- s("div", ie, [
170
- c(f, {
186
+ s("div", le, [
187
+ c(g, {
171
188
  modelValue: t(i).searchKey,
172
189
  "onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
173
190
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
174
191
  placeholder: t(n)("connect.program.common.search"),
175
192
  collapsible: ""
176
193
  }, null, 8, ["modelValue", "placeholder"]),
177
- t(m).campaigns.mission && t(m).campaigns.mission.length > 0 ? (p(), h(w, { key: 0 }, [
178
- s("div", ce, [
179
- s("div", re, [
180
- c(oe, {
194
+ t(d).campaigns.mission && t(d).campaigns.mission.length > 0 ? (p(), x(v, { key: 0 }, [
195
+ s("div", me, [
196
+ s("div", de, [
197
+ c(ne, {
181
198
  modelValue: t(i).location,
182
199
  "onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
183
200
  label: t(n)("connect.program.common.location"),
@@ -187,7 +204,7 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
187
204
  items: t(N).locationItems
188
205
  }, null, 8, ["modelValue", "label", "items"])
189
206
  ]),
190
- c(f, {
207
+ c(g, {
191
208
  modelValue: t(i).searchKey,
192
209
  "onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
193
210
  class: "xs:hidden",
@@ -195,41 +212,41 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
195
212
  collapsible: ""
196
213
  }, null, 8, ["modelValue"])
197
214
  ]),
198
- c(O, {
215
+ c(D, {
199
216
  class: "xs:hidden",
200
- "row-data": t(g),
201
- "column-defs": T,
217
+ "row-data": t(f),
218
+ "column-defs": U,
202
219
  "search-value": t(i).searchKey,
203
220
  "column-filter": [],
204
221
  onRowClick: o[4] || (o[4] = (a) => y(a.original)),
205
- "hide-footer": t(g).length < 10
222
+ "hide-footer": t(f).length < 10
206
223
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
207
- c(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
208
- default: x(() => [
209
- (p(!0), h(w, null, q(t(g).filter(
224
+ c(j, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
225
+ default: C(() => [
226
+ (p(!0), x(v, null, W(t(f).filter(
210
227
  (a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
211
- ), (a) => (p(), b(A, {
228
+ ), (a) => (p(), b($, {
212
229
  key: a._id.toString(),
213
- onClick: (V) => y(a),
230
+ onClick: (L) => y(a),
214
231
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
215
232
  }, {
216
- default: x(() => [
217
- s("div", le, [
218
- s("div", me, [
219
- (p(), b(z(t(L)(a)))),
220
- s("div", de, u(a.currentReceive ?? 0) + " used ", 1)
233
+ default: C(() => [
234
+ s("div", pe, [
235
+ s("div", ue, [
236
+ (p(), b(G(t(B)(a)))),
237
+ s("div", fe, u(a.currentReceive ?? 0) + " used ", 1)
221
238
  ]),
222
- s("div", pe, [
223
- s("div", ue, u(a.name), 1),
224
- s("div", ge, u(t(B)(a)), 1)
239
+ s("div", ge, [
240
+ s("div", ye, u(a.name), 1),
241
+ s("div", _e, u(t(P)(a)), 1)
225
242
  ]),
226
- s("div", fe, " Token received: " + u(a.currentReceive ?? 0), 1)
243
+ s("div", he, " Token received: " + u(a.currentReceive ?? 0), 1)
227
244
  ]),
228
- c(I, {
245
+ c(M, {
229
246
  icon: "delete",
230
247
  "icon-color": "neutral-gray-400",
231
248
  variant: "tertiary",
232
- onClick: (V) => (V.stopPropagation(), k(a))
249
+ onClick: (L) => (L.stopPropagation(), V(a))
233
250
  }, null, 8, ["onClick"])
234
251
  ]),
235
252
  _: 2
@@ -237,21 +254,21 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
237
254
  ]),
238
255
  _: 1
239
256
  })
240
- ], 64)) : (p(), b(j, {
257
+ ], 64)) : (p(), b(E, {
241
258
  key: 1,
242
259
  variant: "outlined",
243
260
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
244
261
  }, {
245
- default: x(() => [
262
+ default: C(() => [
246
263
  o[6] || (o[6] = s("img", {
247
- src: W,
264
+ src: J,
248
265
  class: "aspect-square w-[150px]"
249
266
  }, null, -1)),
250
- s("div", ye, [
251
- s("div", _e, u(t(n)("connect.campaign.mission.createProgram")), 1),
252
- s("div", he, u(t(n)("connect.campaign.mission.description")), 1)
267
+ s("div", we, [
268
+ s("div", xe, u(t(n)("connect.campaign.mission.createProgram")), 1),
269
+ s("div", ve, u(t(n)("connect.campaign.mission.description")), 1)
253
270
  ]),
254
- c(I, {
271
+ c(M, {
255
272
  variant: "primary",
256
273
  label: t(n)("connect.campaign.mission.create"),
257
274
  icon: "add",
@@ -260,10 +277,14 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
260
277
  ]),
261
278
  _: 1
262
279
  })),
263
- c(ne, {
280
+ c(se, {
264
281
  ref_key: "sheetRef",
265
- ref: F,
266
- "onSubmit:modelValue": U
282
+ ref: k,
283
+ "onSubmit:modelValue": O
284
+ }, null, 512),
285
+ c(re, {
286
+ ref_key: "sendCollectionSheetRef",
287
+ ref: I
267
288
  }, null, 512)
268
289
  ])
269
290
  ], 64);
@@ -271,5 +292,5 @@ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-
271
292
  }
272
293
  });
273
294
  export {
274
- Ne as default
295
+ Oe as default
275
296
  };
@@ -1,27 +1,27 @@
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";
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 k, 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-BrZbqfu6.js";
4
- import { u as ue } from "./loading-BWW2Z1X0.js";
5
- import { c as we, p as K } from "./plugins-BsO39OJE.js";
3
+ import { u as Z } from "./vue-i18n-bpwKTYQc.js";
4
+ import { u as ue } from "./loading-BkexxRvP.js";
5
+ import { c as we, p as K } from "./plugins-BovoaCMv.js";
6
6
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
7
7
  import { Z as N } from "./zod-Bg2FbC-D.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-CTDa510y.js";
10
- import { u as me } from "./reward-2pJnAigN.js";
11
- import { a as be, b as xe } from "./index-DBqFcTrv.js";
12
- import { i as le, j as se } from "./index-8CMfJmg3.js";
13
- import "./index-esK00bm6.js";
14
- import "./index-Bk9xhO-D.js";
15
- import "./index-DHw_2WuP.js";
16
- import { C as fe } from "./membership-CJK6mxff.js";
17
- import { t as ee } from "./helper-COmipb68.js";
9
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-BBSqJfeS.js";
10
+ import { u as me } from "./reward-C3FKPfvO.js";
11
+ import { a as be, b as xe } from "./index-DgkJMGFX.js";
12
+ import { j as le, k as se } from "./index-YmukhZFD.js";
13
+ import "./index-wKj9Jq_Y.js";
14
+ import "./index-CcJqawSD.js";
15
+ import "./index-CdMXuKzu.js";
16
+ import { C as fe } from "./membership-DSvm3lCf.js";
17
+ import { t as ee } from "./helper-ByX6M5s_.js";
18
18
  import { c as H } from "./object-qECH92oz.js";
19
19
  import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
20
- import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BWcX9cJf.js";
21
- import { T as Se, _ as Fe, a as ke } from "./trigger-DQxt8ZNb.js";
22
- import { O as $e } from "./objectid-Bjt4ojTL.js";
23
- import { r as pe } from "./index-DKqP75Bm.js";
24
- import { u as Pe } from "./business-BtgsuI9Z.js";
20
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B6abwK-T.js";
21
+ import { T as Se, _ as ke, a as Fe } from "./trigger-DkTKCHNq.js";
22
+ import { O as $e } from "./objectid-5Cs5ddrm.js";
23
+ import { r as pe } from "./index--ljh_arC.js";
24
+ import { u as Pe } from "./business-DcFWQWQ_.js";
25
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({
26
26
  __name: "ReferralRewadGroupCard",
27
27
  props: {
@@ -35,13 +35,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
35
35
  }
36
36
  },
37
37
  emits: ["edit", "addCount", "remove"],
38
- setup(k, { emit: l }) {
38
+ setup(F, { emit: l }) {
39
39
  const { t: I } = Z(), p = l;
40
40
  return (g, f) => {
41
41
  const s = w("FmButton"), u = w("FmListItem");
42
42
  return C(), B(Y, null, [
43
43
  c(u, {
44
- onClick: f[4] || (f[4] = (m) => p("edit", k.level)),
44
+ onClick: f[4] || (f[4] = (m) => p("edit", F.level)),
45
45
  class: "!p-0"
46
46
  }, {
47
47
  default: V(() => [
@@ -49,7 +49,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
49
49
  a("div", Ie, [
50
50
  a("div", Te, [
51
51
  a("div", Ue, [
52
- a("div", Ae, O(k.rewardGroup.name), 1)
52
+ a("div", Ae, O(F.rewardGroup.name), 1)
53
53
  ])
54
54
  ])
55
55
  ]),
@@ -59,13 +59,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
59
59
  label: r(I)("connect.referral.reward.add_count"),
60
60
  icon: "add",
61
61
  onClick: f[0] || (f[0] = (m) => {
62
- m.stopPropagation(), p("addCount", k.level);
62
+ m.stopPropagation(), p("addCount", F.level);
63
63
  })
64
64
  }, null, 8, ["label"]),
65
65
  c(s, {
66
66
  icon: "delete",
67
67
  onClick: f[1] || (f[1] = (m) => {
68
- m.stopPropagation(), p("remove", k.level);
68
+ m.stopPropagation(), p("remove", F.level);
69
69
  }),
70
70
  variant: "tertiary"
71
71
  })
@@ -76,14 +76,14 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
76
76
  a("div", Oe, [
77
77
  a("div", je, [
78
78
  a("div", null, [
79
- a("div", De, O(k.rewardGroup.name), 1)
79
+ a("div", De, O(F.rewardGroup.name), 1)
80
80
  ])
81
81
  ])
82
82
  ]),
83
83
  c(s, {
84
84
  variant: "tertiary",
85
85
  icon: "delete",
86
- onClick: f[2] || (f[2] = (m) => (m.stopPropagation(), p("remove", k.level)))
86
+ onClick: f[2] || (f[2] = (m) => (m.stopPropagation(), p("remove", F.level)))
87
87
  })
88
88
  ]),
89
89
  c(s, {
@@ -92,7 +92,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
92
92
  label: "Add count",
93
93
  disabled: !0,
94
94
  icon: "add",
95
- onClick: f[3] || (f[3] = (m) => (m.stopPropagation(), p("addCount", k.level)))
95
+ onClick: f[3] || (f[3] = (m) => (m.stopPropagation(), p("addCount", F.level)))
96
96
  })
97
97
  ])
98
98
  ]),
@@ -105,8 +105,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
105
105
  }), Me = { class: "flex flex-col space-y-16 pr-12" }, Ne = { class: "flex gap-16 items-center" }, He = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ze = { class: "fm-typo-en-title-sm-800" }, Ye = { class: "flex items-center gap-8" }, qe = /* @__PURE__ */ q({
106
106
  __name: "EditReferralCountSheet",
107
107
  emits: ["update"],
108
- setup(k, { expose: l, emit: I }) {
109
- const { t: p } = Z(), g = I, f = F(!1), s = F({}), u = F(-1), m = F(-1), R = Q(), A = be.superRefine((e, t) => {
108
+ setup(F, { expose: l, emit: I }) {
109
+ const { t: p } = Z(), g = I, f = k(!1), s = k({}), u = k(-1), m = k(-1), R = Q(), A = be.superRefine((e, t) => {
110
110
  var $, U, P, x, v, E, ae;
111
111
  const d = m.value == -1 ? ((P = (U = ($ = R.referralProgram) == null ? void 0 : $.reward[u.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : m.value, _ = (v = (x = R.referralProgram) == null ? void 0 : x.reward[u.value]) == null ? void 0 : v.rewards[d - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[u.value]) == null ? void 0 : ae.rewards[d + 1];
112
112
  _ && e.threshold.from < _.threshold.from + 1 && t.addIssue({
@@ -176,7 +176,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
176
176
  return t.description;
177
177
  }
178
178
  }
179
- ], n = me(), o = F([]), i = G(() => n.rewards.map((e) => {
179
+ ], n = me(), o = k([]), i = G(() => n.rewards.map((e) => {
180
180
  let t = "No expiry";
181
181
  switch (e.option.type) {
182
182
  case "VOUCHER":
@@ -204,7 +204,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
204
204
  ));
205
205
  }
206
206
  }
207
- const h = F({});
207
+ const h = k({});
208
208
  return ie(h, S, { deep: !0 }), l({
209
209
  showSheet: D,
210
210
  hideSheet: L,
@@ -311,8 +311,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
311
311
  }
312
312
  },
313
313
  emits: ["update:model-value"],
314
- setup(k, { emit: l }) {
315
- const I = k, p = l, g = G(() => [
314
+ setup(F, { emit: l }) {
315
+ const I = F, p = l, g = G(() => [
316
316
  le.enum.BILL_COMPLETED,
317
317
  le.enum.FEEDBACK
318
318
  ].map((f) => Se[f]));
@@ -327,8 +327,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
327
327
  disabled: I.disabled,
328
328
  class: de(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
329
329
  "col-span-3": r(g).length == 1,
330
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": k.modelValue == m.value,
331
- "hover:bg-fm-color-opacity-sm": k.modelValue != m.value
330
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": F.modelValue == m.value,
331
+ "hover:bg-fm-color-opacity-sm": F.modelValue != m.value
332
332
  }]),
333
333
  onClick: () => {
334
334
  I.modelValue != m.value && !I.disabled && p("update:model-value", m.value);
@@ -353,8 +353,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
353
353
  }, or = { class: "flex items-center gap-8" }, ar = /* @__PURE__ */ q({
354
354
  __name: "EditCriteriaSheet",
355
355
  emits: ["update"],
356
- setup(k, { expose: l, emit: I }) {
357
- const { t: p } = Z(), g = I, f = F(!1), s = F(-1), u = F({}), m = Q(), R = xe.superRefine((y, n) => {
356
+ setup(F, { expose: l, emit: I }) {
357
+ const { t: p } = Z(), g = I, f = k(!1), s = k(-1), u = k({}), m = Q(), R = xe.superRefine((y, n) => {
358
358
  y.name.length >= 50 && n.addIssue({
359
359
  code: "custom",
360
360
  message: "Name must be less than 50 characters"
@@ -462,14 +462,14 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
462
462
  }, null, 8, ["model-value"]),
463
463
  r(u).event.type == r(se).enum.BILL_COMPLETED ? (C(), B("div", rr, [
464
464
  n[8] || (n[8] = a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1)),
465
- c(Fe, {
465
+ c(ke, {
466
466
  "model-value": r(u).event.rule,
467
467
  "onUpdate:modelValue": n[3] || (n[3] = (e) => r(u).event.rule = e)
468
468
  }, null, 8, ["model-value"])
469
469
  ])) : z("", !0),
470
470
  r(u).event.type == r(se).enum.FEEDBACK ? (C(), B("div", tr, [
471
471
  n[9] || (n[9] = a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1)),
472
- c(ke, {
472
+ c(Fe, {
473
473
  "model-value": r(u).event.rule,
474
474
  "onUpdate:modelValue": n[4] || (n[4] = (e) => r(u).event.rule = e)
475
475
  }, null, 8, ["model-value"])
@@ -483,7 +483,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
483
483
  }
484
484
  });
485
485
  function he() {
486
- const k = F(!1), l = Ce();
486
+ const F = k(!1), l = Ce();
487
487
  return {
488
488
  confirmUpdateReferralRecord: async () => {
489
489
  await new Promise((p) => {
@@ -493,19 +493,19 @@ function he() {
493
493
  primaryActions: { text: "Update all", close: !0 },
494
494
  secondaryActions: { text: "Update future only", close: !0 }
495
495
  }).onPrimary(async () => {
496
- k.value = !0, p();
496
+ F.value = !0, p();
497
497
  }).onSecondary(async () => {
498
- k.value = !1, p();
498
+ F.value = !1, p();
499
499
  });
500
500
  });
501
501
  },
502
- updateReferralRecord: k
502
+ updateReferralRecord: F
503
503
  };
504
504
  }
505
505
  const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex justify-between items-center" }, sr = /* @__PURE__ */ q({
506
506
  __name: "ManageCriteriaSheet",
507
- setup(k, { expose: l }) {
508
- const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: f } = he(), s = F(!1), u = F({}), m = Q(), R = F(
507
+ setup(F, { expose: l }) {
508
+ const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: f } = he(), s = k(!1), u = k({}), m = Q(), R = k(
509
509
  null
510
510
  ), A = G(() => {
511
511
  var o;
@@ -628,8 +628,8 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
628
628
  }), ir = { class: "flex flex-col space-y-16 pr-12" }, dr = { class: "fm-typo-en-title-sm-800" }, cr = { class: "flex items-center gap-8" }, ur = /* @__PURE__ */ q({
629
629
  __name: "EditRefereeRewardSheet",
630
630
  emits: ["update"],
631
- setup(k, { expose: l, emit: I }) {
632
- const { t: p } = Z(), g = I, f = F(!1), s = F([]), u = Q();
631
+ setup(F, { expose: l, emit: I }) {
632
+ const { t: p } = Z(), g = I, f = k(!1), s = k([]), u = Q();
633
633
  function m() {
634
634
  g("update", s.value);
635
635
  }
@@ -662,7 +662,7 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
662
662
  return i.description;
663
663
  }
664
664
  }
665
- ], M = me(), D = F([]), L = G(() => M.rewards.map((o) => {
665
+ ], M = me(), D = k([]), L = G(() => M.rewards.map((o) => {
666
666
  let i = "No expiry";
667
667
  switch (o.option.type) {
668
668
  case "VOUCHER":
@@ -688,7 +688,7 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
688
688
  h && !s.value.includes(S.id) && s.value.push(S.id), !h && s.value.includes(S.id) && (s.value = s.value.filter((e) => e != S.id));
689
689
  }
690
690
  }
691
- const n = F({});
691
+ const n = k({});
692
692
  return ie(n, y, { deep: !0 }), l({
693
693
  showSheet: R,
694
694
  hideSheet: A,
@@ -740,13 +740,13 @@ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex just
740
740
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
741
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({
742
742
  __name: "Overview",
743
- setup(k) {
743
+ setup(F) {
744
744
  const { t: l } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: s } = he(), u = G(() => {
745
745
  var e;
746
746
  return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
747
- }), m = F(null);
748
- F(null);
749
- const R = F(null), A = F(null), T = F(null), M = G(() => {
747
+ }), m = k(null);
748
+ k(null);
749
+ const R = k(null), A = k(null), T = k(null), M = G(() => {
750
750
  var e, t, d, _;
751
751
  return [
752
752
  {