@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11

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 (95) hide show
  1. package/dist/{Analytic-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
  2. package/dist/App-Cikl5jnp.js +177 -0
  3. package/dist/Broadcast-DU3JnBwZ.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
  5. package/dist/Card-hIeQ5XUH.js +825 -0
  6. package/dist/Collections-B1SC1rr7.js +453 -0
  7. package/dist/Credit-BgwI8DR3.js +216 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
  10. package/dist/Experience-C2Q-zqV6.js +221 -0
  11. package/dist/Game-DU2pZDGk.js +255 -0
  12. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  13. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  14. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
  15. package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
  16. package/dist/Marketing-DWiTQp9I.js +316 -0
  17. package/dist/Member-BEXKBFry.js +69 -0
  18. package/dist/MemberList-DzMdajIf.js +1733 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
  22. package/dist/Mission-KzwRlaA5.js +259 -0
  23. package/dist/Point-CSKvZXHc.js +222 -0
  24. package/dist/Promotion-IiwPhx8p.js +221 -0
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
  26. package/dist/Segment-2Q0PonBb.js +447 -0
  27. package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
  28. package/dist/Store-C0WXCKs6.js +1503 -0
  29. package/dist/StoreRewards-eSSIO0nk.js +401 -0
  30. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
  31. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
  32. package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
  33. package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
  34. package/dist/Transaction-0OouN_6s.js +39 -0
  35. package/dist/Voucher-CL0cgogx.js +488 -0
  36. package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
  37. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  38. package/dist/app-Bd19eW7X.js +5381 -0
  39. package/dist/app-CfS25Z66.js +34797 -0
  40. package/dist/app-wDQR6dpb.js +39 -0
  41. package/dist/app.js +5 -3
  42. package/dist/business-dQh3AEot.js +78 -0
  43. package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
  44. package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
  45. package/dist/dto-B8NfyVPG.js +1169 -0
  46. package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
  47. package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
  48. package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
  49. package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
  50. package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
  51. package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
  52. package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
  53. package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
  54. package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
  55. package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
  56. package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
  57. package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
  58. package/dist/index-DwKqFNF6.js +3 -0
  59. package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
  60. package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
  61. package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
  62. package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
  63. package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
  64. package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
  65. package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
  66. package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
  67. package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/template-clxvNnbF.js +190 -0
  70. package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
  71. package/dist/vue-i18n-BxwiXSkp.js +2365 -0
  72. package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
  73. package/package.json +9 -5
  74. package/dist/Broadcast-X69Mtv3b.js +0 -216
  75. package/dist/Card-D0X3v1UF.js +0 -822
  76. package/dist/Collections-umR6Ehqf.js +0 -452
  77. package/dist/Credit-C1EWF7R0.js +0 -214
  78. package/dist/Experience-CqL8wyPm.js +0 -211
  79. package/dist/Game--kYe64EV.js +0 -250
  80. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
  81. package/dist/Marketing-CTCQ5ZmZ.js +0 -308
  82. package/dist/Member-DCduX7zP.js +0 -91
  83. package/dist/MemberList-B0EkXZJu.js +0 -1729
  84. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  85. package/dist/Mission-CVr9rS_D.js +0 -248
  86. package/dist/Point-BnZ6M74y.js +0 -220
  87. package/dist/Promotion-B0PUve5S.js +0 -218
  88. package/dist/Segment-B-XpkyM5.js +0 -445
  89. package/dist/Store-B2gywCt2.js +0 -1503
  90. package/dist/StoreRewards-D8410Q_-.js +0 -434
  91. package/dist/Transaction-CZBO4v4d.js +0 -36
  92. package/dist/Voucher-se-4JF9B.js +0 -481
  93. package/dist/app-B2ImSO3V.js +0 -53382
  94. package/dist/dto-BWpvRpK2.js +0 -1151
  95. package/dist/template-Dwp7heBA.js +0 -190
@@ -1,822 +0,0 @@
1
- import { defineComponent as Z, ref as g, computed as V, watch as he, onMounted as ee, resolveComponent as f, openBlock as _, createBlock as x, unref as n, isRef as J, withCtx as T, createElementVNode as m, createVNode as l, createElementBlock as N, Fragment as B, renderList as Q, createCommentVNode as I, normalizeClass as ve, createSlots as Ee, withModifiers as Se, h as X } from "vue";
2
- import { _ as ke } from "./campaign-CpzFl8Vr.js";
3
- import { h as re } from "./moment-BWErdI6_.js";
4
- import { useDialog as Te, components as ye } from "@feedmepos/ui-library";
5
- import { p as Re, u as ne, f as ie } from "./loading-BzV5acUX.js";
6
- import { u as Ae, g as Ce, a as Oe } from "./app-DkI7dYRN.js";
7
- import { u as te } from "./membership-CqbsLHqx.js";
8
- import { _ as le } from "./index-yxJMhfxj.js";
9
- import { m as oe } from "./index-Bu4_26qI.js";
10
- import { _ as de } from "./ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js";
11
- import "./index-CuL5-ORK.js";
12
- import "./index-CWf0mh3a.js";
13
- import { l as Ie } from "./index-BryrRq8O.js";
14
- import "./index-boor8e80.js";
15
- import "./index-BobRgQrE.js";
16
- import "./index-CkiYkbXb.js";
17
- import { a as xe } from "./object-qECH92oz.js";
18
- import { w as Ne } from "./xlsx-BRdh9e2p.js";
19
- import { e as De, C as we } from "./export-Dm6LYnWo.js";
20
- import { u as Ue, _ as He } from "./usePagination-o5fgsZwU.js";
21
- import { o as Fe } from "./objectId-dwaoBfJX.js";
22
- const Pe = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1), Be = { class: "space-y-16" }, Me = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1), Ve = { class: "gap-16 grid grid-cols-2" }, Ge = { class: "space-y-16" }, Le = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1), je = {
23
- key: 0,
24
- class: "flex flex-col gap-[16px] w-full"
25
- }, $e = { class: "flex flex-col gap-[8px]" }, Ke = /* @__PURE__ */ m("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1), Ye = ["src"], We = { class: "flex pt-[24px] gap-[24px]" }, Xe = ["src", "onClick", "alt"], qe = { class: "flex items-center gap-8" }, ze = /* @__PURE__ */ Z({
26
- __name: "CreateCardSheet",
27
- emits: ["success", "export"],
28
- setup(e, { expose: i, emit: D }) {
29
- const { minor: w } = ne, v = te(), R = g(), b = g(!1), A = D, h = g(!1);
30
- function E(p) {
31
- h.value = p, p && (a.value = {
32
- quantity: 1,
33
- code: "",
34
- codeConfig: {
35
- length: 12,
36
- charset: "1234567890",
37
- prefix: "",
38
- suffix: "",
39
- pattern: "####-####-####-####"
40
- }
41
- });
42
- }
43
- const a = g({
44
- quantity: 1,
45
- code: "",
46
- codeConfig: {
47
- length: 12,
48
- charset: "1234567890",
49
- prefix: "",
50
- suffix: "",
51
- pattern: "####-####-####-####"
52
- },
53
- setCardOnBind: !1,
54
- bundle: void 0
55
- }), C = [
56
- {
57
- label: "Bulk number",
58
- value: "bulk",
59
- sublabel: "Bulk generate unique number"
60
- },
61
- {
62
- label: "Custom number",
63
- value: "single",
64
- sublabel: "Enter your own custom number"
65
- }
66
- ], H = [
67
- {
68
- label: "Alphanumeric",
69
- value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
70
- },
71
- {
72
- label: "Alphabetic",
73
- value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
74
- },
75
- { label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
76
- { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
77
- { label: "Numbers", value: "0123456789" },
78
- { label: "Custom", value: "" }
79
- ], F = g(H[0].value), S = g("bulk"), U = g(0), P = V(
80
- () => {
81
- var p;
82
- return (p = v.membership.design) == null ? void 0 : p[U.value];
83
- }
84
- ), r = g(!1), o = V(
85
- () => v.sortedStoreCategories.flatMap((p) => p.bundles)
86
- );
87
- async function c(p) {
88
- var y, M;
89
- if (await ((y = R.value) == null ? void 0 : y.validateInputs()), !b.value) return;
90
- p.design = (M = P.value) == null ? void 0 : M.image;
91
- const t = await Re.confirm(
92
- "",
93
- "Do you want to export generated card(s)?",
94
- "Export",
95
- "Generate and without export"
96
- );
97
- console.log(t), await w(
98
- async () => {
99
- const u = await oe.createCards(p);
100
- console.log(u), await A("success"), t && await A("export", u);
101
- },
102
- {
103
- message: "Creating card(s)",
104
- successMessage: "Card(s) created"
105
- }
106
- );
107
- }
108
- return i({
109
- showSheet: E
110
- }), he(
111
- () => a.value.codeConfig.length,
112
- (p, t) => {
113
- p != t && (a.value.codeConfig.pattern = "#".repeat(Number(p)));
114
- }
115
- ), ee(async () => {
116
- await v.readMemberStore();
117
- }), (p, t) => {
118
- const y = f("FmRadio"), M = f("FmRadioGroup"), u = f("FmSwitch"), j = f("FmStepperField"), $ = f("FmSelect"), G = f("FmTextField"), fe = f("FmTextarea"), K = f("FmButton"), ge = f("FmForm"), be = f("FmSideSheet");
119
- return _(), x(be, {
120
- "max-width": 560,
121
- "dismiss-away": !0,
122
- header: "Create collection",
123
- modelValue: n(h),
124
- "onUpdate:modelValue": [
125
- t[19] || (t[19] = (O) => J(h) ? h.value = O : null),
126
- t[20] || (t[20] = (O) => h.value = O)
127
- ]
128
- }, {
129
- "side-sheet-footer": T(() => [
130
- m("div", qe, [
131
- l(K, {
132
- label: "Save",
133
- onClick: t[17] || (t[17] = (O) => c(n(a))),
134
- loading: n(Ae)().isLoading
135
- }, null, 8, ["loading"]),
136
- l(K, {
137
- label: "Cancel",
138
- type: "button",
139
- variant: "tertiary",
140
- onClick: t[18] || (t[18] = (O) => h.value = !1)
141
- })
142
- ])
143
- ]),
144
- default: T(() => [
145
- l(ge, {
146
- ref_key: "form",
147
- ref: R,
148
- class: "space-y-40",
149
- onValidationSuccess: t[15] || (t[15] = (O) => b.value = !0),
150
- onValidationFailed: t[16] || (t[16] = (O) => b.value = !1)
151
- }, {
152
- default: T(() => {
153
- var O, se, ae;
154
- return [
155
- m("div", null, [
156
- Pe,
157
- l(M, {
158
- modelValue: n(S),
159
- "onUpdate:modelValue": t[0] || (t[0] = (s) => J(S) ? S.value = s : null),
160
- inline: !1
161
- }, {
162
- default: T(() => [
163
- (_(), N(B, null, Q(C, (s) => l(y, {
164
- key: s.value,
165
- value: s.value,
166
- label: s.label,
167
- sublabel: s.sublabel
168
- }, null, 8, ["value", "label", "sublabel"])), 64))
169
- ]),
170
- _: 1
171
- }, 8, ["modelValue"])
172
- ]),
173
- m("div", Be, [
174
- Me,
175
- n(S) === "bulk" ? (_(), N(B, { key: 0 }, [
176
- l(u, {
177
- "model-value": n(r),
178
- "label-placement": "right",
179
- value: "true",
180
- label: "Advance number setting",
181
- required: !0,
182
- "onUpdate:modelValue": t[1] || (t[1] = () => r.value = !n(r))
183
- }, null, 8, ["model-value"]),
184
- n(r) ? (_(), N(B, { key: 0 }, [
185
- l(j, {
186
- "model-value": n(a).codeConfig.length || null,
187
- "onUpdate:modelValue": t[2] || (t[2] = (s) => n(a).codeConfig.length = s),
188
- label: "Code length",
189
- rules: [(s) => Number(s) >= 1 || "Code length must at least 1"],
190
- required: !0
191
- }, null, 8, ["model-value", "rules"]),
192
- l($, {
193
- label: "Charset",
194
- "model-value": n(F),
195
- items: H,
196
- "helper-text": n(a).codeConfig.charset.length > 62 ? `${n(a).codeConfig.charset.substring(0, 62)}...` : n(a).codeConfig.charset,
197
- "onUpdate:modelValue": t[3] || (t[3] = (s) => {
198
- F.value = s, n(a).codeConfig.charset = s;
199
- })
200
- }, null, 8, ["model-value", "helper-text"]),
201
- n(F) === "" ? (_(), x(G, {
202
- key: 0,
203
- modelValue: n(a).codeConfig.charset,
204
- "onUpdate:modelValue": t[4] || (t[4] = (s) => n(a).codeConfig.charset = s),
205
- label: "Custom Charset",
206
- required: ""
207
- }, null, 8, ["modelValue"])) : I("", !0),
208
- m("div", Ve, [
209
- l(G, {
210
- modelValue: n(a).codeConfig.prefix,
211
- "onUpdate:modelValue": t[5] || (t[5] = (s) => n(a).codeConfig.prefix = s),
212
- label: "Prefix (Optional)"
213
- }, null, 8, ["modelValue"]),
214
- l(G, {
215
- modelValue: n(a).codeConfig.suffix,
216
- "onUpdate:modelValue": t[6] || (t[6] = (s) => n(a).codeConfig.suffix = s),
217
- label: "Suffix (Optional)"
218
- }, null, 8, ["modelValue"])
219
- ]),
220
- l(G, {
221
- modelValue: n(a).codeConfig.pattern,
222
- "onUpdate:modelValue": t[7] || (t[7] = (s) => n(a).codeConfig.pattern = s),
223
- label: "Pattern",
224
- required: !0
225
- }, null, 8, ["modelValue"])
226
- ], 64)) : I("", !0),
227
- l(G, {
228
- modelValue: n(a).quantity,
229
- "onUpdate:modelValue": t[8] || (t[8] = (s) => n(a).quantity = s),
230
- label: "Number of code",
231
- rules: [
232
- (s) => s >= 1 || "Quantity cannot be less than 1",
233
- (s) => s <= 1e4 || "Quantity cannot more than 10,000"
234
- ],
235
- required: !0,
236
- "helper-text": `${n(a).quantity} card will be created`
237
- }, null, 8, ["modelValue", "rules", "helper-text"])
238
- ], 64)) : I("", !0),
239
- n(S) !== "bulk" ? (_(), x(fe, {
240
- key: 1,
241
- modelValue: n(a).code,
242
- "onUpdate:modelValue": t[9] || (t[9] = (s) => n(a).code = s),
243
- label: "Custom Card Number",
244
- rules: [(s) => n(S) != "single" || !!s || "Custom code is required"],
245
- placeholder: "(For multiple numbers, please enter in the new row.)"
246
- }, null, 8, ["modelValue", "rules"])) : I("", !0)
247
- ]),
248
- m("div", Ge, [
249
- Le,
250
- l(u, {
251
- "label-placement": "right",
252
- label: "Set card number on bind",
253
- "model-value": n(a).setCardOnBind || !1,
254
- "onUpdate:modelValue": t[10] || (t[10] = (s) => n(a).setCardOnBind = s)
255
- }, null, 8, ["model-value"]),
256
- l(le, {
257
- label: "Activate bundle on bind",
258
- placeholder: "Select bundle",
259
- items: n(o).filter((s) => !s.stripePriceId).map((s) => ({ label: s.name, value: s._id })),
260
- modelValue: n(a).bundle,
261
- "onUpdate:modelValue": t[12] || (t[12] = (s) => n(a).bundle = s)
262
- }, {
263
- append: T(() => [
264
- n(a).bundle ? (_(), x(K, {
265
- key: 0,
266
- icon: "link_off",
267
- variant: "plain",
268
- onClick: t[11] || (t[11] = (s) => n(a).bundle = void 0)
269
- })) : I("", !0)
270
- ]),
271
- _: 1
272
- }, 8, ["items", "modelValue"]),
273
- (se = (O = n(v).store) == null ? void 0 : O.stripe) != null && se.apiKey ? (_(), x(le, {
274
- key: 0,
275
- label: "Linked subscription bundle",
276
- placeholder: "Select bundle",
277
- items: n(o).filter((s) => s.stripePriceId).map((s) => ({ label: s.name, value: s._id })),
278
- modelValue: n(a).subscriptionBundle,
279
- "onUpdate:modelValue": t[14] || (t[14] = (s) => n(a).subscriptionBundle = s)
280
- }, {
281
- append: T(() => [
282
- n(a).subscriptionBundle ? (_(), x(K, {
283
- key: 0,
284
- icon: "link_off",
285
- variant: "plain",
286
- onClick: t[13] || (t[13] = (s) => n(a).subscriptionBundle = void 0)
287
- })) : I("", !0)
288
- ]),
289
- _: 1
290
- }, 8, ["items", "modelValue"])) : I("", !0)
291
- ]),
292
- n(v).membership.design ? (_(), N("div", je, [
293
- m("div", $e, [
294
- Ke,
295
- m("img", {
296
- src: (ae = n(P)) == null ? void 0 : ae.image,
297
- class: "aspect-[16/9]"
298
- }, null, 8, Ye),
299
- m("div", We, [
300
- (_(!0), N(B, null, Q(n(v).membership.design, (s, Y) => (_(), N("img", {
301
- src: s.image,
302
- key: `image_${Y}`,
303
- class: ve(["w-[112px] h-[63px] cursor-pointer", `${n(U) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
304
- onClick: (fn) => U.value = Y,
305
- alt: `ai_image_predict_${Y}`,
306
- style: { objectFit: "cover" }
307
- }, null, 10, Xe))), 128))
308
- ])
309
- ])
310
- ])) : I("", !0)
311
- ];
312
- }),
313
- _: 1
314
- }, 512)
315
- ]),
316
- _: 1
317
- }, 8, ["modelValue"]);
318
- };
319
- }
320
- });
321
- var q = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_e9d5c06f-33a5-4f7e-adc7-61788ac9afb2", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.36", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", USER: "runner", npm_config_user_agent: "pnpm/9.15.3 npm/? node/v20.18.1 linux x64", CI: "true", npm_package_dependencies_vue: "^3.4.29", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_e9d5c06f-33a5-4f7e-adc7-61788ac9afb2", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.1", npm_node_execpath: "/opt/hostedtoolcache/node/20.18.1/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-8.12", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.8.37", npm_package_dependencies_fabric: "^6.4.2", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", SYSTEMD_EXEC_PID: "706", npm_package_dependencies__feedmepos_ui_library: "1.3.5", npm_package_dependencies_dayjs: "^1.11.11", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_devDependencies_tailwindcss: "^3.4.4", npm_package_devDependencies_typescript: "^5.4.5", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.21", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.13/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20250105.1.0", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies_unplugin_auto_import: "^0.17.6", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.10/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.4/x64", JOURNAL_STREAM: "8:5817", GITHUB_WORKFLOW: "Publish mf-connect - dev", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.111.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "12707661607", STATS_VMFE: "true", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.5", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "25ac73cbaa8408078fe034534fbef41d86ae447f", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[DEV] publish-mf-connect.yml@refs/heads/dev", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.18.1/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_156fdbce-9917-4da5-95d8-597c055178a7", INVOCATION_ID: "f3112bd4766a410ab5c55d9092994c82", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.18.1/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "37", GITHUB_TRIGGERING_ACTOR: "qaijunse", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.13", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 262", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/marketing-services", STATS_D_D: "false", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "^2.10.4", npm_lifecycle_script: "vite build --mode fmmf", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", STATS_PIP: "false", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.0.16-beta.1", npm_lifecycle_event: "build:mf:dev", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "25ac73cbaa8408078fe034534fbef41d86ae447f", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.3.3", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "qaijunse", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_dependencies_firebase: "^10.12.2", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_e9d5c06f-33a5-4f7e-adc7-61788ac9afb2", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "39590157", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.3/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_e9d5c06f-33a5-4f7e-adc7-61788ac9afb2", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.38", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_e9d5c06f-33a5-4f7e-adc7-61788ac9afb2", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "dev", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", AUTH_URL: "https://portal-v2-dev.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "member.feedmedev.cc", CRM_APP_URL: "crm.feedmedev.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedmedev.cc", CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", PAYMENT_PORTAL_URL: "https://portal.feedmedev.cc/payment/payout-account" } }, z = Math.floor(Math.random() * 16777215), pe = d.index = parseInt(Math.random() * 16777215, 10), me = (typeof q > "u" || typeof q.pid != "number" ? Math.floor(Math.random() * 1e5) : q.pid) % 65535, ce = (() => {
322
- try {
323
- return _Buffer;
324
- } catch {
325
- try {
326
- return Buffer;
327
- } catch {
328
- return null;
329
- }
330
- }
331
- })(), W = function(e) {
332
- return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
333
- }, _e = [];
334
- for (var k = 0; k < 256; k++)
335
- _e[k] = (k <= 15 ? "0" : "") + k.toString(16);
336
- var ue = new RegExp("^[0-9a-fA-F]{24}$"), L = [];
337
- k = 0;
338
- for (; k < 10; ) L[48 + k] = k++;
339
- for (; k < 16; ) L[55 + k] = L[87 + k] = k++;
340
- function d(e) {
341
- if (!(this instanceof d)) return new d(e);
342
- if (e && (e instanceof d || e._bsontype === "ObjectID"))
343
- return e;
344
- if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
345
- this.id = this.generate(e);
346
- return;
347
- }
348
- var i = d.isValid(e);
349
- if (!i && e != null)
350
- throw new Error(
351
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
352
- );
353
- if (i && typeof e == "string" && e.length === 24)
354
- return d.createFromHexString(e);
355
- if (e != null && e.length === 12)
356
- this.id = e;
357
- else {
358
- if (e != null && typeof e.toHexString == "function")
359
- return e;
360
- throw new Error(
361
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
362
- );
363
- }
364
- }
365
- var Je = d;
366
- d.default = d;
367
- d.createFromTime = function(e) {
368
- return e = parseInt(e, 10) % 4294967295, new d(Ze(8, e) + "0000000000000000");
369
- };
370
- d.createFromHexString = function(e) {
371
- if (typeof e > "u" || e != null && e.length !== 24)
372
- throw new Error(
373
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
374
- );
375
- for (var i = "", D = 0; D < 24; )
376
- i += String.fromCharCode(L[e.charCodeAt(D++)] << 4 | L[e.charCodeAt(D++)]);
377
- return new d(i);
378
- };
379
- d.isValid = function(e) {
380
- return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && ue.test(e) : e instanceof d ? !0 : W(e) ? d.isValid(e.toString("hex")) : typeof e.toHexString == "function" && ce && (e.id instanceof ce || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && ue.test(e.id) : !1;
381
- };
382
- d.prototype = {
383
- constructor: d,
384
- /**
385
- * Return the ObjectID id as a 24 byte hex string representation
386
- *
387
- * @return {String} return the 24 byte hex string representation.
388
- * @api public
389
- */
390
- toHexString: function() {
391
- if (!this.id || !this.id.length)
392
- throw new Error(
393
- "invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
394
- );
395
- if (this.id.length === 24)
396
- return this.id;
397
- if (W(this.id))
398
- return this.id.toString("hex");
399
- for (var e = "", i = 0; i < this.id.length; i++)
400
- e += _e[this.id.charCodeAt(i)];
401
- return e;
402
- },
403
- /**
404
- * Compares the equality of this ObjectID with `otherID`.
405
- *
406
- * @param {Object} otherId ObjectID instance to compare against.
407
- * @return {Boolean} the result of comparing two ObjectID's
408
- * @api public
409
- */
410
- equals: function(e) {
411
- return e instanceof d ? this.toString() === e.toString() : typeof e == "string" && d.isValid(e) && e.length === 12 && W(this.id) ? e === this.id.toString("binary") : typeof e == "string" && d.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && d.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof d || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
412
- },
413
- /**
414
- * Returns the generation date (accurate up to the second) that this ID was generated.
415
- *
416
- * @return {Date} the generation date
417
- * @api public
418
- */
419
- getTimestamp: function() {
420
- var e = /* @__PURE__ */ new Date(), i;
421
- return W(this.id) ? i = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : i = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(i) * 1e3), e;
422
- },
423
- /**
424
- * Generate a 12 byte id buffer used in ObjectID's
425
- *
426
- * @method
427
- * @param {number} [time] optional parameter allowing to pass in a second based timestamp.
428
- * @return {string} return the 12 byte id buffer string.
429
- */
430
- generate: function(e) {
431
- typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
432
- var i = Qe();
433
- return String.fromCharCode(
434
- e >> 24 & 255,
435
- e >> 16 & 255,
436
- e >> 8 & 255,
437
- e & 255,
438
- z >> 16 & 255,
439
- z >> 8 & 255,
440
- z & 255,
441
- me >> 8 & 255,
442
- me & 255,
443
- i >> 16 & 255,
444
- i >> 8 & 255,
445
- i & 255
446
- );
447
- }
448
- };
449
- function Qe() {
450
- return pe = (pe + 1) % 16777215;
451
- }
452
- function Ze(e, i) {
453
- return i = i.toString(16), i.length === e ? i : "00000000".substring(i.length, e) + i;
454
- }
455
- var en = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
456
- d.prototype[en] = function() {
457
- return "ObjectID(" + this + ")";
458
- };
459
- d.prototype.toJSON = d.prototype.toHexString;
460
- d.prototype.toString = d.prototype.toHexString;
461
- const nn = /* @__PURE__ */ Ce(Je), tn = {
462
- key: 0,
463
- class: "grid grid-cols-1 gap-8"
464
- }, on = { class: "flex items-center gap-8" }, sn = { class: "flex items-center gap-8" }, an = 5, rn = /* @__PURE__ */ Z({
465
- __name: "CardDesignSheet",
466
- emits: ["success"],
467
- setup(e, { expose: i, emit: D }) {
468
- const { minor: w } = ne, v = te(), R = Te(), b = g(!1);
469
- g(), g(!1);
470
- const A = g(), h = g(null);
471
- V(() => {
472
- var r, o;
473
- return Math.min((((o = (r = A.value) == null ? void 0 : r.design) == null ? void 0 : o.length) ?? 0) + 1, an);
474
- });
475
- const E = D, a = V(() => {
476
- var r, o;
477
- return ((o = (r = v.membership) == null ? void 0 : r.design) == null ? void 0 : o.filter((c) => c.image)) || [];
478
- }), C = g(!1);
479
- function H(r) {
480
- C.value = r;
481
- }
482
- function F() {
483
- b.value = !0;
484
- }
485
- async function S() {
486
- await w(
487
- async () => {
488
- var c;
489
- const r = xe(A.value), o = Ie.parse(r);
490
- if (o.design = (o == null ? void 0 : o.design) || [], h.value) {
491
- const p = nn().toHexString(), t = await ie.update(
492
- ie.designPath(p, h.value),
493
- h.value
494
- );
495
- (c = o.design) == null || c.push({
496
- _id: p,
497
- image: t
498
- });
499
- }
500
- await oe.update(o), await P(), await E("success"), h.value = null, b.value = !1;
501
- },
502
- {
503
- message: "Saving card design",
504
- successMessage: "Card design saved"
505
- }
506
- );
507
- }
508
- async function U(r, o) {
509
- r ? h.value = r : o && R.open({
510
- title: "Delete Design",
511
- message: "Are you sure you want to delete this design?",
512
- primaryActions: { text: "Delete", close: !0 },
513
- secondaryActions: { text: "Cancel", close: !1 }
514
- }).onPrimary(async () => {
515
- var p, t;
516
- const c = (p = A.value.design) == null ? void 0 : p.findIndex((y) => y._id == o);
517
- console.log(c), c !== -1 && ((t = A.value.design) == null || t.splice(c, 1)), await S();
518
- }).onSecondary(() => {
519
- R.close();
520
- });
521
- }
522
- async function P() {
523
- await v.readMembership(), A.value = v.membership;
524
- }
525
- return i({
526
- showSheet: H
527
- }), ee(async () => {
528
- await P(), a.value.length || (b.value = !0);
529
- }), (r, o) => {
530
- const c = f("FmButton"), p = f("FmSideSheet");
531
- return _(), x(p, {
532
- "max-width": 560,
533
- "dismiss-away": !0,
534
- header: "Manage Design",
535
- modelValue: n(C),
536
- "onUpdate:modelValue": [
537
- o[2] || (o[2] = (t) => J(C) ? C.value = t : null),
538
- o[3] || (o[3] = (t) => C.value = t)
539
- ]
540
- }, Ee({
541
- default: T(() => [
542
- n(b) ? I("", !0) : (_(), N("div", tn, [
543
- (_(!0), N(B, null, Q(n(a), (t) => (_(), x(de, {
544
- key: String(t._id),
545
- "image-fit": "cover",
546
- label: "",
547
- "aspect-ratio": "16/9",
548
- thumbnail: t.image,
549
- accept: ".png, .jpg, .jpeg, .gif",
550
- "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
551
- file: void 0,
552
- "delete-button": !1
553
- }, {
554
- "delete-button": T(() => [
555
- l(c, {
556
- class: "!text-neutral-50 !bg-neutral-700",
557
- icon: "delete",
558
- variant: "tertiary",
559
- onClick: (y) => U(null, t._id)
560
- }, null, 8, ["onClick"])
561
- ]),
562
- _: 2
563
- }, 1032, ["thumbnail"]))), 128))
564
- ])),
565
- n(b) ? (_(), x(de, {
566
- key: 1,
567
- "image-fit": "cover",
568
- label: "",
569
- "aspect-ratio": "16/9",
570
- accept: ".png, .jpg, .jpeg, .gif",
571
- "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
572
- "onUpdate:file": U
573
- })) : I("", !0)
574
- ]),
575
- _: 2
576
- }, [
577
- n(b) ? {
578
- name: "side-sheet-footer",
579
- fn: T(() => [
580
- m("div", sn, [
581
- l(c, {
582
- label: "Save",
583
- onClick: S,
584
- disabled: !n(h)
585
- }, null, 8, ["disabled"]),
586
- l(c, {
587
- label: "Cancel",
588
- type: "button",
589
- variant: "tertiary",
590
- onClick: o[1] || (o[1] = (t) => b.value = !1)
591
- })
592
- ])
593
- ]),
594
- key: "1"
595
- } : {
596
- name: "side-sheet-footer",
597
- fn: T(() => [
598
- m("div", on, [
599
- l(c, {
600
- label: "Add Design",
601
- onClick: F
602
- }),
603
- l(c, {
604
- label: "Cancel",
605
- type: "button",
606
- variant: "tertiary",
607
- onClick: o[0] || (o[0] = (t) => C.value = !1)
608
- })
609
- ])
610
- ]),
611
- key: "0"
612
- }
613
- ]), 1032, ["modelValue"]);
614
- };
615
- }
616
- }), ln = { class: "flex items-center" }, dn = /* @__PURE__ */ m("span", { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, " Card ", -1), pn = { class: "px-24 flex flex-col pb-24 gap-y-16" }, mn = { class: "flex items-center justify-end" }, cn = /* @__PURE__ */ m("img", {
617
- src: ke,
618
- class: "aspect-square w-[150px]"
619
- }, null, -1), un = /* @__PURE__ */ m("div", { class: "flex flex-col gap-16 text-center" }, [
620
- /* @__PURE__ */ m("div", { class: "fm-typo-en-title-sm-800" }, "Create member card"),
621
- /* @__PURE__ */ m("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Track and manage member card to keep customers engaged with your business. ")
622
- ], -1), _n = { class: "flex gap-x-8" }, Pn = /* @__PURE__ */ Z({
623
- __name: "Card",
624
- setup(e) {
625
- const { minor: i, global: D } = ne, w = g(), v = g(), R = Oe(), b = te(), A = V(
626
- () => b.sortedStoreCategories.flatMap((r) => r.bundles)
627
- ), h = [
628
- {
629
- header: "Card Number",
630
- accessorFn: (r) => r.serialNumber
631
- },
632
- {
633
- header: "Redeemed by",
634
- accessorKey: "user",
635
- enableSorting: !1,
636
- cell(r) {
637
- const o = r.row.original.pf_member;
638
- return X(
639
- "div",
640
- {
641
- class: "flex items-center gap-x-8"
642
- },
643
- [
644
- X(ye.FmAvatar, {
645
- name: o != null && o.photoUrl || o == null ? void 0 : o.name,
646
- src: (o == null ? void 0 : o.photoUrl) ?? void 0,
647
- size: "sm"
648
- }),
649
- X("span", { class: "fm-typo-en-body-sm-400" }, o == null ? void 0 : o.name)
650
- ]
651
- );
652
- }
653
- },
654
- {
655
- header: "Phone",
656
- accessorFn: (r) => {
657
- var o;
658
- return ((o = r.pf_member) == null ? void 0 : o.phoneNumber) || "-";
659
- },
660
- accessorKey: "pf_member.phoneNumber"
661
- },
662
- {
663
- header: "Created at",
664
- accessorKey: "_id",
665
- accessorFn: (r) => re(Fe(r._id.toString())).format("DD MMM YYYY hh:mmA")
666
- },
667
- {
668
- header: "Bundle",
669
- accessorFn: (r) => {
670
- var o;
671
- return ((o = A.value.find((c) => c._id === r.bundle)) == null ? void 0 : o.name) || "-";
672
- }
673
- },
674
- {
675
- header: "Redeemed at",
676
- accessorKey: "redeemedAt",
677
- accessorFn: (r) => r.redeemedAt ? re(r.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
678
- }
679
- ], { tableMeta: E, rowData: a, onSort: C, debouncedFetchData: H, onSearch: F } = Ue(oe.readCards);
680
- async function S() {
681
- var r;
682
- await H(), (r = w.value) == null || r.showSheet(!1);
683
- }
684
- const U = V(() => R.isPremium ? [
685
- {
686
- label: "Create cards",
687
- value: "create",
688
- isPrimary: !0
689
- },
690
- {
691
- label: "Manage Design",
692
- value: "design",
693
- isPrimary: !0
694
- }
695
- ] : []);
696
- async function P(r) {
697
- const o = new we(), c = r.map((p) => ({
698
- CardNumber: p
699
- }));
700
- o.addRecords(c), await Ne(
701
- o.buildExcel(),
702
- `cards-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
703
- {
704
- bookType: "xlsx",
705
- bookSST: !1,
706
- type: "array"
707
- }
708
- );
709
- }
710
- return ee(async () => {
711
- await D(async () => {
712
- await R.readPremium(), await b.readMemberStore(), await b.readMembership(), await S();
713
- });
714
- }), (r, o) => {
715
- const c = f("FmPill"), p = f("FmPageHead"), t = f("FmSearch"), y = f("FmButton"), M = f("FmCard");
716
- return _(), N(B, null, [
717
- l(p, {
718
- title: "Card",
719
- actions: n(U),
720
- "onClick:action": o[0] || (o[0] = (u) => {
721
- var j, $;
722
- console.log(u), u === "design" && ((j = n(v)) == null || j.showSheet(!0)), u === "create" && (($ = n(w)) == null || $.showSheet(!0));
723
- })
724
- }, {
725
- title: T(() => [
726
- m("div", ln, [
727
- dn,
728
- l(c, {
729
- class: "ml-8",
730
- variant: "premium"
731
- })
732
- ])
733
- ]),
734
- _: 1
735
- }, 8, ["actions"]),
736
- m("div", pn, [
737
- n(a).length > 0 || n(a).length <= 0 && n(E).searchValue || n(E).pageCount > 0 ? (_(), N(B, { key: 0 }, [
738
- m("div", mn, [
739
- l(t, {
740
- class: "mt-4",
741
- modelValue: n(E).searchValue,
742
- "onUpdate:modelValue": [
743
- o[1] || (o[1] = (u) => n(E).searchValue = u),
744
- n(F)
745
- ],
746
- placeholder: "Search",
747
- collapsible: ""
748
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
749
- l(y, {
750
- icon: "ios_share",
751
- variant: "tertiary",
752
- onClick: Se(n(De), ["prevent"])
753
- }, null, 8, ["onClick"])
754
- ]),
755
- l(He, {
756
- loading: n(E).isLoading,
757
- "row-data": n(a),
758
- "row-count": n(E).totalRows,
759
- "column-defs": h,
760
- "shrink-at": !1,
761
- "page-count": n(E).pageCount,
762
- "page-index": n(E).pageIndex,
763
- "page-size": n(E).pageSize,
764
- onSortChange: n(C),
765
- onPageChange: o[2] || (o[2] = (u) => {
766
- n(H)({
767
- pageSize: u.pageSize,
768
- pageIndex: u.pageIndex
769
- });
770
- })
771
- }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
772
- ], 64)) : (_(), x(M, {
773
- key: 1,
774
- variant: "outlined",
775
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
776
- }, {
777
- default: T(() => [
778
- cn,
779
- un,
780
- m("div", _n, [
781
- l(y, {
782
- variant: "primary",
783
- label: "Add Card",
784
- icon: "add",
785
- disabled: !n(R).isPremium,
786
- onClick: o[3] || (o[3] = () => {
787
- var u;
788
- return (u = n(w)) == null ? void 0 : u.showSheet(!0);
789
- })
790
- }, null, 8, ["disabled"]),
791
- l(y, {
792
- variant: "secondary",
793
- label: "Manage Design",
794
- disabled: !n(R).isPremium,
795
- onClick: o[4] || (o[4] = () => {
796
- var u;
797
- return (u = n(v)) == null ? void 0 : u.showSheet(!0);
798
- })
799
- }, null, 8, ["disabled"])
800
- ])
801
- ]),
802
- _: 1
803
- })),
804
- l(ze, {
805
- ref_key: "sheetRef",
806
- ref: w,
807
- onSuccess: S,
808
- onExport: P
809
- }, null, 512),
810
- l(rn, {
811
- ref_key: "designSheetRef",
812
- ref: v,
813
- onSuccess: S
814
- }, null, 512)
815
- ])
816
- ], 64);
817
- };
818
- }
819
- });
820
- export {
821
- Pn as default
822
- };