@feedmepos/mf-connect 0.1.3-prod → 0.1.4-prod

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 (87) hide show
  1. package/dist/Analytic-07T9poLx.js +423 -0
  2. package/dist/{App-DvtYt9h5.js → App-C6MukSCT.js} +276 -275
  3. package/dist/Broadcast-CzsgeZNO.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DoH4RX_Y.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BirunpzI.js} +8 -8
  5. package/dist/Card-DQnyWZZf.js +824 -0
  6. package/dist/{Collections-C5-k8WkG.js → Collections-BV7CSqRw.js} +4 -4
  7. package/dist/Credit-CxsbYGLZ.js +220 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCbvlp5V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKSZYxvb.js} +918 -901
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DpsrI-Z3.js +345 -0
  10. package/dist/Experience-eMUbhq7h.js +221 -0
  11. package/dist/Game-CxAG2ViS.js +255 -0
  12. package/dist/Marketing-CozMj2Y5.js +316 -0
  13. package/dist/Member-DM1dj3F5.js +69 -0
  14. package/dist/{MemberList-CMefeirT.js → MemberList-DNjK9BbG.js} +14 -14
  15. package/dist/{MemberTransactions-B9oYdzjR.js → MemberTransactions-CsjN3LZA.js} +1 -1
  16. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B0T7ze7r.js → MessageInput.vue_vue_type_script_setup_true_lang-DVQE9v2R.js} +2 -2
  17. package/dist/Mission-BugvTPPH.js +261 -0
  18. package/dist/Point-D8BjGtqT.js +222 -0
  19. package/dist/Promotion-mc9KBzoJ.js +253 -0
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BGM1doWM.js → RuleGroup.vue_vue_type_script_setup_true_lang-B2H3D_kZ.js} +15 -15
  21. package/dist/Segment-DZRFA-Pb.js +565 -0
  22. package/dist/Setting-DxNhR44e.js +1871 -0
  23. package/dist/Store-CdkJWpjV.js +1530 -0
  24. package/dist/StoreRewards-Cdturia8.js +400 -0
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-JumDBZLs.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D7GcOiUM.js} +10 -10
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BtBCggcN.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-nuCOrrLE.js} +1 -1
  27. package/dist/{Tier-ms8r2E7c.js → Tier-I_MMd39Y.js} +470 -445
  28. package/dist/{Title-BBKoBs46.js → Title-DK5gmUvo.js} +298 -282
  29. package/dist/Transaction-BXpTIMS_.js +39 -0
  30. package/dist/Voucher-BQ5h2G0I.js +490 -0
  31. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-eAP99wyg.js +141 -0
  32. package/dist/app-CL2Wxzv5.js +5639 -0
  33. package/dist/{app-CGgrMOc_.js → app-DTAyCT-G.js} +1 -1
  34. package/dist/app.js +4 -3
  35. package/dist/{business-DeMUnCNX.js → business-B9OUlaFZ.js} +1 -1
  36. package/dist/{campaign-CBszI6An.js → campaign-CNbUA51l.js} +2 -2
  37. package/dist/{collection.fn-D4Qgx1aW.js → collection.fn-D_i45T4Q.js} +2 -2
  38. package/dist/dto-B4208_es.js +2770 -0
  39. package/dist/{effect-2p4_SGbQ.js → effect-Ye_yr8et.js} +1 -1
  40. package/dist/{email-addresses-Bc9od2gA.js → email-addresses-Gm7Dyaxy.js} +1 -1
  41. package/dist/{export-BK6FgeQO.js → export-Buee5oUV.js} +3 -3
  42. package/dist/{helper-DUkKW7uc.js → helper-BBlHhMFc.js} +1 -1
  43. package/dist/{index-BWWnWRpt.js → index-BxJgFvym.js} +2 -2
  44. package/dist/{index-g4L04WYz.js → index-ByaM-yoc.js} +91 -86
  45. package/dist/{index-B9f-K1No.js → index-C0QHb5SL.js} +2 -2
  46. package/dist/{index-M1SmasnI.js → index-C363BG5A.js} +3 -3
  47. package/dist/{index-Ci8tkzSn.js → index-CLL3no-v.js} +1 -1
  48. package/dist/{index-Cvbyv9Hx.js → index-ChSVaFk3.js} +1 -1
  49. package/dist/{index-D4HYMbSu.js → index-Co9n8I_5.js} +3 -3
  50. package/dist/index-CoGNKU8v.js +3 -0
  51. package/dist/{index-BFcrfL4W.js → index-DHGcUMVN.js} +1 -1
  52. package/dist/{index-CTmiZrHu.js → index-DWWtZSrm.js} +1 -1
  53. package/dist/{index-DRaETKbn.js → index-DdVZgYE4.js} +258 -256
  54. package/dist/{index-AZ8cKg9n.js → index-Dx3HwWcb.js} +1 -1
  55. package/dist/{index.esm2017-kvuav0Sd.js → index.esm2017-Dd02dg_O.js} +38 -38
  56. package/dist/{loading-MNCADfHc.js → loading-Or1ZDzDS.js} +11 -11
  57. package/dist/{membership-CsbTF-DX.js → membership-B8h5ku-v.js} +3 -3
  58. package/dist/{money-Lo7kavmu.js → money-CmsKAJBT.js} +1 -1
  59. package/dist/{number-BviV2K5O.js → number-iEhp7Uai.js} +1 -1
  60. package/dist/{rule-DKrUrnrM.js → rule-BORkgSMK.js} +3 -3
  61. package/dist/{rule-builder-DjPniLk6.js → rule-builder-DEfkSr68.js} +1 -1
  62. package/dist/{template-DteMEC9C.js → template-C_Y7bhlI.js} +4 -4
  63. package/dist/{usePagination-BKTq-UbV.js → usePagination-Ci8-uZvb.js} +1 -1
  64. package/dist/vue-i18n-BXzrZRP6.js +2365 -0
  65. package/package.json +7 -4
  66. package/dist/Analytic-DiPWt78u.js +0 -423
  67. package/dist/Broadcast-Dv4XcvBh.js +0 -216
  68. package/dist/Card-DDvwlZF0.js +0 -823
  69. package/dist/Credit-BDQIr_FJ.js +0 -214
  70. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BQzgcn4V.js +0 -344
  71. package/dist/Experience-B9H3tOF0.js +0 -211
  72. package/dist/Game-cy3_ppLO.js +0 -250
  73. package/dist/Marketing-CWXV2n5F.js +0 -309
  74. package/dist/Member-DyTX22Zk.js +0 -92
  75. package/dist/Mission-DxSO3iES.js +0 -248
  76. package/dist/Point-C5UtlqkX.js +0 -220
  77. package/dist/Promotion-DhSGTj-R.js +0 -244
  78. package/dist/Segment-BzI6Ykxp.js +0 -564
  79. package/dist/Setting-SRUWwF9w.js +0 -1870
  80. package/dist/Store-CIrn_7Mh.js +0 -1533
  81. package/dist/StoreRewards-BYc0vgnr.js +0 -429
  82. package/dist/Transaction-IZL9-6fe.js +0 -36
  83. package/dist/Voucher-CIWulmcc.js +0 -485
  84. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  85. package/dist/app-BQvluJk_.js +0 -2974
  86. package/dist/dto-Dtvg93Bz.js +0 -1145
  87. package/dist/index-UR1Lxi0C.js +0 -11
@@ -1,823 +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 N, unref as n, isRef as J, withCtx as T, createElementVNode as m, createVNode as l, createElementBlock as x, Fragment as B, renderList as Q, createCommentVNode as I, normalizeClass as ve, createSlots as Ee, withModifiers as Se, h as W } 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 Re } from "@feedmepos/ui-library";
5
- import { p as ye, u as ne, f as ie } from "./loading-MNCADfHc.js";
6
- import { u as Ae } from "./app-wDQR6dpb.js";
7
- import { u as te } from "./membership-CsbTF-DX.js";
8
- import { _ as le } from "./index-DRaETKbn.js";
9
- import { m as oe } from "./index-BFcrfL4W.js";
10
- import { _ as de } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
11
- import "./index-BWWnWRpt.js";
12
- import "./index-Cvbyv9Hx.js";
13
- import { l as Ce } from "./index-g4L04WYz.js";
14
- import "./index-M1SmasnI.js";
15
- import "./index-B9f-K1No.js";
16
- import "./index-Ci8tkzSn.js";
17
- import { g as Oe } from "./_commonjsHelpers-BkfeUUK-.js";
18
- import { a as Ie } from "./object-qECH92oz.js";
19
- import { u as Ne } from "./business-DeMUnCNX.js";
20
- import { a as xe, _ as De, w as we } from "./usePagination-BKTq-UbV.js";
21
- import { e as Ue, C as He } from "./export-BK6FgeQO.js";
22
- import { o as Fe } from "./objectId-dwaoBfJX.js";
23
- 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 = {
24
- key: 0,
25
- class: "flex flex-col gap-[16px] w-full"
26
- }, $e = { class: "flex flex-col gap-[8px]" }, Ke = /* @__PURE__ */ m("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1), Ye = ["src"], Xe = { class: "flex pt-[24px] gap-[24px]" }, We = ["src", "onClick", "alt"], qe = { class: "flex items-center gap-8" }, ze = /* @__PURE__ */ Z({
27
- __name: "CreateCardSheet",
28
- emits: ["success", "export"],
29
- setup(e, { expose: i, emit: D }) {
30
- const { minor: w } = ne, v = te(), y = g(), b = g(!1), A = D, h = g(!1);
31
- function E(p) {
32
- h.value = p, p && (a.value = {
33
- quantity: 1,
34
- code: "",
35
- codeConfig: {
36
- length: 12,
37
- charset: "1234567890",
38
- prefix: "",
39
- suffix: "",
40
- pattern: "####-####-####-####"
41
- }
42
- });
43
- }
44
- const a = g({
45
- quantity: 1,
46
- code: "",
47
- codeConfig: {
48
- length: 12,
49
- charset: "1234567890",
50
- prefix: "",
51
- suffix: "",
52
- pattern: "####-####-####-####"
53
- },
54
- setCardOnBind: !1,
55
- bundle: void 0
56
- }), C = [
57
- {
58
- label: "Bulk number",
59
- value: "bulk",
60
- sublabel: "Bulk generate unique number"
61
- },
62
- {
63
- label: "Custom number",
64
- value: "single",
65
- sublabel: "Enter your own custom number"
66
- }
67
- ], H = [
68
- {
69
- label: "Alphanumeric",
70
- value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
71
- },
72
- {
73
- label: "Alphabetic",
74
- value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
75
- },
76
- { label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
77
- { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
78
- { label: "Numbers", value: "0123456789" },
79
- { label: "Custom", value: "" }
80
- ], F = g(H[0].value), S = g("bulk"), U = g(0), P = V(
81
- () => {
82
- var p;
83
- return (p = v.membership.design) == null ? void 0 : p[U.value];
84
- }
85
- ), r = g(!1), o = V(
86
- () => v.sortedStoreCategories.flatMap((p) => p.bundles)
87
- );
88
- async function u(p) {
89
- var R, M;
90
- if (await ((R = y.value) == null ? void 0 : R.validateInputs()), !b.value) return;
91
- p.design = (M = P.value) == null ? void 0 : M.image;
92
- const t = await ye.confirm(
93
- "",
94
- "Do you want to export generated card(s)?",
95
- "Export",
96
- "Generate and without export"
97
- );
98
- console.log(t), await w(
99
- async () => {
100
- const c = await oe.createCards(p);
101
- console.log(c), await A("success"), t && await A("export", c);
102
- },
103
- {
104
- message: "Creating card(s)",
105
- successMessage: "Card(s) created"
106
- }
107
- );
108
- }
109
- return i({
110
- showSheet: E
111
- }), he(
112
- () => a.value.codeConfig.length,
113
- (p, t) => {
114
- p != t && (a.value.codeConfig.pattern = "#".repeat(Number(p)));
115
- }
116
- ), ee(async () => {
117
- await v.readMemberStore();
118
- }), (p, t) => {
119
- const R = f("FmRadio"), M = f("FmRadioGroup"), c = f("FmSwitch"), j = f("FmStepperField"), $ = f("FmSelect"), G = f("FmTextField"), fe = f("FmTextarea"), K = f("FmButton"), ge = f("FmForm"), be = f("FmSideSheet");
120
- return _(), N(be, {
121
- "max-width": 560,
122
- "dismiss-away": !0,
123
- header: "Create collection",
124
- modelValue: n(h),
125
- "onUpdate:modelValue": [
126
- t[19] || (t[19] = (O) => J(h) ? h.value = O : null),
127
- t[20] || (t[20] = (O) => h.value = O)
128
- ]
129
- }, {
130
- "side-sheet-footer": T(() => [
131
- m("div", qe, [
132
- l(K, {
133
- label: "Save",
134
- onClick: t[17] || (t[17] = (O) => u(n(a))),
135
- loading: n(Ae)().isLoading
136
- }, null, 8, ["loading"]),
137
- l(K, {
138
- label: "Cancel",
139
- type: "button",
140
- variant: "tertiary",
141
- onClick: t[18] || (t[18] = (O) => h.value = !1)
142
- })
143
- ])
144
- ]),
145
- default: T(() => [
146
- l(ge, {
147
- ref_key: "form",
148
- ref: y,
149
- class: "space-y-40",
150
- onValidationSuccess: t[15] || (t[15] = (O) => b.value = !0),
151
- onValidationFailed: t[16] || (t[16] = (O) => b.value = !1)
152
- }, {
153
- default: T(() => {
154
- var O, se, ae;
155
- return [
156
- m("div", null, [
157
- Pe,
158
- l(M, {
159
- modelValue: n(S),
160
- "onUpdate:modelValue": t[0] || (t[0] = (s) => J(S) ? S.value = s : null),
161
- inline: !1
162
- }, {
163
- default: T(() => [
164
- (_(), x(B, null, Q(C, (s) => l(R, {
165
- key: s.value,
166
- value: s.value,
167
- label: s.label,
168
- sublabel: s.sublabel
169
- }, null, 8, ["value", "label", "sublabel"])), 64))
170
- ]),
171
- _: 1
172
- }, 8, ["modelValue"])
173
- ]),
174
- m("div", Be, [
175
- Me,
176
- n(S) === "bulk" ? (_(), x(B, { key: 0 }, [
177
- l(c, {
178
- "model-value": n(r),
179
- "label-placement": "right",
180
- value: "true",
181
- label: "Advance number setting",
182
- required: !0,
183
- "onUpdate:modelValue": t[1] || (t[1] = () => r.value = !n(r))
184
- }, null, 8, ["model-value"]),
185
- n(r) ? (_(), x(B, { key: 0 }, [
186
- l(j, {
187
- "model-value": n(a).codeConfig.length || null,
188
- "onUpdate:modelValue": t[2] || (t[2] = (s) => n(a).codeConfig.length = s),
189
- label: "Code length",
190
- rules: [(s) => Number(s) >= 1 || "Code length must at least 1"],
191
- required: !0
192
- }, null, 8, ["model-value", "rules"]),
193
- l($, {
194
- label: "Charset",
195
- "model-value": n(F),
196
- items: H,
197
- "helper-text": n(a).codeConfig.charset.length > 62 ? `${n(a).codeConfig.charset.substring(0, 62)}...` : n(a).codeConfig.charset,
198
- "onUpdate:modelValue": t[3] || (t[3] = (s) => {
199
- F.value = s, n(a).codeConfig.charset = s;
200
- })
201
- }, null, 8, ["model-value", "helper-text"]),
202
- n(F) === "" ? (_(), N(G, {
203
- key: 0,
204
- modelValue: n(a).codeConfig.charset,
205
- "onUpdate:modelValue": t[4] || (t[4] = (s) => n(a).codeConfig.charset = s),
206
- label: "Custom Charset",
207
- required: ""
208
- }, null, 8, ["modelValue"])) : I("", !0),
209
- m("div", Ve, [
210
- l(G, {
211
- modelValue: n(a).codeConfig.prefix,
212
- "onUpdate:modelValue": t[5] || (t[5] = (s) => n(a).codeConfig.prefix = s),
213
- label: "Prefix (Optional)"
214
- }, null, 8, ["modelValue"]),
215
- l(G, {
216
- modelValue: n(a).codeConfig.suffix,
217
- "onUpdate:modelValue": t[6] || (t[6] = (s) => n(a).codeConfig.suffix = s),
218
- label: "Suffix (Optional)"
219
- }, null, 8, ["modelValue"])
220
- ]),
221
- l(G, {
222
- modelValue: n(a).codeConfig.pattern,
223
- "onUpdate:modelValue": t[7] || (t[7] = (s) => n(a).codeConfig.pattern = s),
224
- label: "Pattern",
225
- required: !0
226
- }, null, 8, ["modelValue"])
227
- ], 64)) : I("", !0),
228
- l(G, {
229
- modelValue: n(a).quantity,
230
- "onUpdate:modelValue": t[8] || (t[8] = (s) => n(a).quantity = s),
231
- label: "Number of code",
232
- rules: [
233
- (s) => s >= 1 || "Quantity cannot be less than 1",
234
- (s) => s <= 1e4 || "Quantity cannot more than 10,000"
235
- ],
236
- required: !0,
237
- "helper-text": `${n(a).quantity} card will be created`
238
- }, null, 8, ["modelValue", "rules", "helper-text"])
239
- ], 64)) : I("", !0),
240
- n(S) !== "bulk" ? (_(), N(fe, {
241
- key: 1,
242
- modelValue: n(a).code,
243
- "onUpdate:modelValue": t[9] || (t[9] = (s) => n(a).code = s),
244
- label: "Custom Card Number",
245
- rules: [(s) => n(S) != "single" || !!s || "Custom code is required"],
246
- placeholder: "(For multiple numbers, please enter in the new row.)"
247
- }, null, 8, ["modelValue", "rules"])) : I("", !0)
248
- ]),
249
- m("div", Ge, [
250
- Le,
251
- l(c, {
252
- "label-placement": "right",
253
- label: "Set card number on bind",
254
- "model-value": n(a).setCardOnBind || !1,
255
- "onUpdate:modelValue": t[10] || (t[10] = (s) => n(a).setCardOnBind = s)
256
- }, null, 8, ["model-value"]),
257
- l(le, {
258
- label: "Activate bundle on bind",
259
- placeholder: "Select bundle",
260
- items: n(o).filter((s) => !s.stripePriceId).map((s) => ({ label: s.name, value: s._id })),
261
- modelValue: n(a).bundle,
262
- "onUpdate:modelValue": t[12] || (t[12] = (s) => n(a).bundle = s)
263
- }, {
264
- append: T(() => [
265
- n(a).bundle ? (_(), N(K, {
266
- key: 0,
267
- icon: "link_off",
268
- variant: "plain",
269
- onClick: t[11] || (t[11] = (s) => n(a).bundle = void 0)
270
- })) : I("", !0)
271
- ]),
272
- _: 1
273
- }, 8, ["items", "modelValue"]),
274
- (se = (O = n(v).store) == null ? void 0 : O.stripe) != null && se.apiKey ? (_(), N(le, {
275
- key: 0,
276
- label: "Linked subscription bundle",
277
- placeholder: "Select bundle",
278
- items: n(o).filter((s) => s.stripePriceId).map((s) => ({ label: s.name, value: s._id })),
279
- modelValue: n(a).subscriptionBundle,
280
- "onUpdate:modelValue": t[14] || (t[14] = (s) => n(a).subscriptionBundle = s)
281
- }, {
282
- append: T(() => [
283
- n(a).subscriptionBundle ? (_(), N(K, {
284
- key: 0,
285
- icon: "link_off",
286
- variant: "plain",
287
- onClick: t[13] || (t[13] = (s) => n(a).subscriptionBundle = void 0)
288
- })) : I("", !0)
289
- ]),
290
- _: 1
291
- }, 8, ["items", "modelValue"])) : I("", !0)
292
- ]),
293
- n(v).membership.design ? (_(), x("div", je, [
294
- m("div", $e, [
295
- Ke,
296
- m("img", {
297
- src: (ae = n(P)) == null ? void 0 : ae.image,
298
- class: "aspect-[16/9]"
299
- }, null, 8, Ye),
300
- m("div", Xe, [
301
- (_(!0), x(B, null, Q(n(v).membership.design, (s, Y) => (_(), x("img", {
302
- src: s.image,
303
- key: `image_${Y}`,
304
- class: ve(["w-[112px] h-[63px] cursor-pointer", `${n(U) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
305
- onClick: (fn) => U.value = Y,
306
- alt: `ai_image_predict_${Y}`,
307
- style: { objectFit: "cover" }
308
- }, null, 10, We))), 128))
309
- ])
310
- ])
311
- ])) : I("", !0)
312
- ];
313
- }),
314
- _: 1
315
- }, 512)
316
- ]),
317
- _: 1
318
- }, 8, ["modelValue"]);
319
- };
320
- }
321
- });
322
- var q = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_184a8501-10f4-4d63-9ae2-71aaf234c956", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", 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.9 npm/? node/v20.19.0 linux x64", CI: "true", npm_package_dependencies_vue: "^3.4.33", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_184a8501-10f4-4d63-9ae2-71aaf234c956", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.19.0/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.13", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/28.0.13004108", 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: "710", npm_package_dependencies__feedmepos_ui_library: "1.3.5", npm_package_dependencies_dayjs: "^1.11.12", 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.6", npm_package_devDependencies_typescript: "^5.5.3", 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.26", 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: "20250316.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.8", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/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.7/x64", JOURNAL_STREAM: "8:6217", GITHUB_WORKFLOW: "Publish mf-connect - production", _: "/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.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "14010213392", STATS_VMFE: "true", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "8d42de2a48f7aed5667f30cb4c8f929f5164bebf", 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/[PROD] publish-mf-connect.yml@refs/heads/main", 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.9/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.9/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.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.0/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_ec81444f-c03d-45de-9829-a02a7970e169", INVOCATION_ID: "262ab31c70e34599a40590d4f943cc0f", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.19.0/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: "43", 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.18", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 84", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "main", 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.14.6", npm_lifecycle_script: "vite build --mode fmmf:prod", 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.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.3-prod", npm_lifecycle_event: "build:mf:prod", 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: "8d42de2a48f7aed5667f30cb4c8f929f5164bebf", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.4.0", GITHUB_REF: "refs/heads/main", 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.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_184a8501-10f4-4d63-9ae2-71aaf234c956", 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.9/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_184a8501-10f4-4d63-9ae2-71aaf234c956", 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.39", 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_184a8501-10f4-4d63-9ae2-71aaf234c956", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "prod", FIREBASE_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", FIREBASE_AUTH_DOMAIN: "feedme-253402.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-253402.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-253402", FIREBASE_STORAGE_BUCKET: "image.feedme.cc", FIREBASE_MESSAGING_SENDER_ID: "128512026847", FIREBASE_APP_ID: "1:128512026847:web:7c5c8ab7e8b90502dc616a", FIREBASE_MEASUREMENT_ID: "G-LTKS7N2HQS", ASSET_STORAGE_BUCKET: "static.feedme.cc", AUTH_URL: "https://portal-v2.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "member.feedme.cc", CRM_APP_URL: "crm.feedme.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedme.cc", CLIENT_ID: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", PAYMENT_PORTAL_URL: "https://portal.feedme.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, ue = (() => {
323
- try {
324
- return _Buffer;
325
- } catch {
326
- try {
327
- return Buffer;
328
- } catch {
329
- return null;
330
- }
331
- }
332
- })(), X = function(e) {
333
- return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
334
- }, _e = [];
335
- for (var k = 0; k < 256; k++)
336
- _e[k] = (k <= 15 ? "0" : "") + k.toString(16);
337
- var ce = new RegExp("^[0-9a-fA-F]{24}$"), L = [];
338
- k = 0;
339
- for (; k < 10; ) L[48 + k] = k++;
340
- for (; k < 16; ) L[55 + k] = L[87 + k] = k++;
341
- function d(e) {
342
- if (!(this instanceof d)) return new d(e);
343
- if (e && (e instanceof d || e._bsontype === "ObjectID"))
344
- return e;
345
- if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
346
- this.id = this.generate(e);
347
- return;
348
- }
349
- var i = d.isValid(e);
350
- if (!i && e != null)
351
- throw new Error(
352
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
353
- );
354
- if (i && typeof e == "string" && e.length === 24)
355
- return d.createFromHexString(e);
356
- if (e != null && e.length === 12)
357
- this.id = e;
358
- else {
359
- if (e != null && typeof e.toHexString == "function")
360
- return e;
361
- throw new Error(
362
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
363
- );
364
- }
365
- }
366
- var Je = d;
367
- d.default = d;
368
- d.createFromTime = function(e) {
369
- return e = parseInt(e, 10) % 4294967295, new d(Ze(8, e) + "0000000000000000");
370
- };
371
- d.createFromHexString = function(e) {
372
- if (typeof e > "u" || e != null && e.length !== 24)
373
- throw new Error(
374
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
375
- );
376
- for (var i = "", D = 0; D < 24; )
377
- i += String.fromCharCode(L[e.charCodeAt(D++)] << 4 | L[e.charCodeAt(D++)]);
378
- return new d(i);
379
- };
380
- d.isValid = function(e) {
381
- return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && ce.test(e) : e instanceof d ? !0 : X(e) ? d.isValid(e.toString("hex")) : typeof e.toHexString == "function" && ue && (e.id instanceof ue || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && ce.test(e.id) : !1;
382
- };
383
- d.prototype = {
384
- constructor: d,
385
- /**
386
- * Return the ObjectID id as a 24 byte hex string representation
387
- *
388
- * @return {String} return the 24 byte hex string representation.
389
- * @api public
390
- */
391
- toHexString: function() {
392
- if (!this.id || !this.id.length)
393
- throw new Error(
394
- "invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
395
- );
396
- if (this.id.length === 24)
397
- return this.id;
398
- if (X(this.id))
399
- return this.id.toString("hex");
400
- for (var e = "", i = 0; i < this.id.length; i++)
401
- e += _e[this.id.charCodeAt(i)];
402
- return e;
403
- },
404
- /**
405
- * Compares the equality of this ObjectID with `otherID`.
406
- *
407
- * @param {Object} otherId ObjectID instance to compare against.
408
- * @return {Boolean} the result of comparing two ObjectID's
409
- * @api public
410
- */
411
- equals: function(e) {
412
- return e instanceof d ? this.toString() === e.toString() : typeof e == "string" && d.isValid(e) && e.length === 12 && X(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;
413
- },
414
- /**
415
- * Returns the generation date (accurate up to the second) that this ID was generated.
416
- *
417
- * @return {Date} the generation date
418
- * @api public
419
- */
420
- getTimestamp: function() {
421
- var e = /* @__PURE__ */ new Date(), i;
422
- return X(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;
423
- },
424
- /**
425
- * Generate a 12 byte id buffer used in ObjectID's
426
- *
427
- * @method
428
- * @param {number} [time] optional parameter allowing to pass in a second based timestamp.
429
- * @return {string} return the 12 byte id buffer string.
430
- */
431
- generate: function(e) {
432
- typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
433
- var i = Qe();
434
- return String.fromCharCode(
435
- e >> 24 & 255,
436
- e >> 16 & 255,
437
- e >> 8 & 255,
438
- e & 255,
439
- z >> 16 & 255,
440
- z >> 8 & 255,
441
- z & 255,
442
- me >> 8 & 255,
443
- me & 255,
444
- i >> 16 & 255,
445
- i >> 8 & 255,
446
- i & 255
447
- );
448
- }
449
- };
450
- function Qe() {
451
- return pe = (pe + 1) % 16777215;
452
- }
453
- function Ze(e, i) {
454
- return i = i.toString(16), i.length === e ? i : "00000000".substring(i.length, e) + i;
455
- }
456
- var en = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
457
- d.prototype[en] = function() {
458
- return "ObjectID(" + this + ")";
459
- };
460
- d.prototype.toJSON = d.prototype.toHexString;
461
- d.prototype.toString = d.prototype.toHexString;
462
- const nn = /* @__PURE__ */ Oe(Je), tn = {
463
- key: 0,
464
- class: "grid grid-cols-1 gap-8"
465
- }, on = { class: "flex items-center gap-8" }, sn = { class: "flex items-center gap-8" }, an = 5, rn = /* @__PURE__ */ Z({
466
- __name: "CardDesignSheet",
467
- emits: ["success"],
468
- setup(e, { expose: i, emit: D }) {
469
- const { minor: w } = ne, v = te(), y = Te(), b = g(!1);
470
- g(), g(!1);
471
- const A = g(), h = g(null);
472
- V(() => {
473
- var r, o;
474
- return Math.min((((o = (r = A.value) == null ? void 0 : r.design) == null ? void 0 : o.length) ?? 0) + 1, an);
475
- });
476
- const E = D, a = V(() => {
477
- var r, o;
478
- return ((o = (r = v.membership) == null ? void 0 : r.design) == null ? void 0 : o.filter((u) => u.image)) || [];
479
- }), C = g(!1);
480
- function H(r) {
481
- C.value = r;
482
- }
483
- function F() {
484
- b.value = !0;
485
- }
486
- async function S() {
487
- await w(
488
- async () => {
489
- var u;
490
- const r = Ie(A.value), o = Ce.parse(r);
491
- if (o.design = (o == null ? void 0 : o.design) || [], h.value) {
492
- const p = nn().toHexString(), t = await ie.update(
493
- ie.designPath(p, h.value),
494
- h.value
495
- );
496
- (u = o.design) == null || u.push({
497
- _id: p,
498
- image: t
499
- });
500
- }
501
- await oe.update(o), await P(), await E("success"), h.value = null, b.value = !1;
502
- },
503
- {
504
- message: "Saving card design",
505
- successMessage: "Card design saved"
506
- }
507
- );
508
- }
509
- async function U(r, o) {
510
- r ? h.value = r : o && y.open({
511
- title: "Delete Design",
512
- message: "Are you sure you want to delete this design?",
513
- primaryActions: { text: "Delete", close: !0 },
514
- secondaryActions: { text: "Cancel", close: !1 }
515
- }).onPrimary(async () => {
516
- var p, t;
517
- const u = (p = A.value.design) == null ? void 0 : p.findIndex((R) => R._id == o);
518
- console.log(u), u !== -1 && ((t = A.value.design) == null || t.splice(u, 1)), await S();
519
- }).onSecondary(() => {
520
- y.close();
521
- });
522
- }
523
- async function P() {
524
- await v.readMembership(), A.value = v.membership;
525
- }
526
- return i({
527
- showSheet: H
528
- }), ee(async () => {
529
- await P(), a.value.length || (b.value = !0);
530
- }), (r, o) => {
531
- const u = f("FmButton"), p = f("FmSideSheet");
532
- return _(), N(p, {
533
- "max-width": 560,
534
- "dismiss-away": !0,
535
- header: "Manage Design",
536
- modelValue: n(C),
537
- "onUpdate:modelValue": [
538
- o[2] || (o[2] = (t) => J(C) ? C.value = t : null),
539
- o[3] || (o[3] = (t) => C.value = t)
540
- ]
541
- }, Ee({
542
- default: T(() => [
543
- n(b) ? I("", !0) : (_(), x("div", tn, [
544
- (_(!0), x(B, null, Q(n(a), (t) => (_(), N(de, {
545
- key: String(t._id),
546
- "image-fit": "cover",
547
- label: "",
548
- "aspect-ratio": "16/9",
549
- thumbnail: t.image,
550
- accept: ".png, .jpg, .jpeg, .gif",
551
- "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
552
- file: void 0,
553
- "delete-button": !1
554
- }, {
555
- "delete-button": T(() => [
556
- l(u, {
557
- class: "!text-neutral-50 !bg-neutral-700",
558
- icon: "delete",
559
- variant: "tertiary",
560
- onClick: (R) => U(null, t._id)
561
- }, null, 8, ["onClick"])
562
- ]),
563
- _: 2
564
- }, 1032, ["thumbnail"]))), 128))
565
- ])),
566
- n(b) ? (_(), N(de, {
567
- key: 1,
568
- "image-fit": "cover",
569
- label: "",
570
- "aspect-ratio": "16/9",
571
- accept: ".png, .jpg, .jpeg, .gif",
572
- "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
573
- "onUpdate:file": U
574
- })) : I("", !0)
575
- ]),
576
- _: 2
577
- }, [
578
- n(b) ? {
579
- name: "side-sheet-footer",
580
- fn: T(() => [
581
- m("div", sn, [
582
- l(u, {
583
- label: "Save",
584
- onClick: S,
585
- disabled: !n(h)
586
- }, null, 8, ["disabled"]),
587
- l(u, {
588
- label: "Cancel",
589
- type: "button",
590
- variant: "tertiary",
591
- onClick: o[1] || (o[1] = (t) => b.value = !1)
592
- })
593
- ])
594
- ]),
595
- key: "1"
596
- } : {
597
- name: "side-sheet-footer",
598
- fn: T(() => [
599
- m("div", on, [
600
- l(u, {
601
- label: "Add Design",
602
- onClick: F
603
- }),
604
- l(u, {
605
- label: "Cancel",
606
- type: "button",
607
- variant: "tertiary",
608
- onClick: o[0] || (o[0] = (t) => C.value = !1)
609
- })
610
- ])
611
- ]),
612
- key: "0"
613
- }
614
- ]), 1032, ["modelValue"]);
615
- };
616
- }
617
- }), 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" }, un = /* @__PURE__ */ m("img", {
618
- src: ke,
619
- class: "aspect-square w-[150px]"
620
- }, null, -1), cn = /* @__PURE__ */ m("div", { class: "flex flex-col gap-16 text-center" }, [
621
- /* @__PURE__ */ m("div", { class: "fm-typo-en-title-sm-800" }, "Create member card"),
622
- /* @__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. ")
623
- ], -1), _n = { class: "flex gap-x-8" }, Bn = /* @__PURE__ */ Z({
624
- __name: "Card",
625
- setup(e) {
626
- const { minor: i, global: D } = ne, w = g(), v = g(), y = Ne(), b = te(), A = V(
627
- () => b.sortedStoreCategories.flatMap((r) => r.bundles)
628
- ), h = [
629
- {
630
- header: "Card Number",
631
- accessorFn: (r) => r.serialNumber
632
- },
633
- {
634
- header: "Redeemed by",
635
- accessorKey: "user",
636
- enableSorting: !1,
637
- cell(r) {
638
- const o = r.row.original.pf_member;
639
- return W(
640
- "div",
641
- {
642
- class: "flex items-center gap-x-8"
643
- },
644
- [
645
- W(Re.FmAvatar, {
646
- name: o != null && o.photoUrl || o == null ? void 0 : o.name,
647
- src: (o == null ? void 0 : o.photoUrl) ?? void 0,
648
- size: "sm"
649
- }),
650
- W("span", { class: "fm-typo-en-body-sm-400" }, o == null ? void 0 : o.name)
651
- ]
652
- );
653
- }
654
- },
655
- {
656
- header: "Phone",
657
- accessorFn: (r) => {
658
- var o;
659
- return ((o = r.pf_member) == null ? void 0 : o.phoneNumber) || "-";
660
- },
661
- accessorKey: "pf_member.phoneNumber"
662
- },
663
- {
664
- header: "Created at",
665
- accessorKey: "_id",
666
- accessorFn: (r) => re(Fe(r._id.toString())).format("DD MMM YYYY hh:mmA")
667
- },
668
- {
669
- header: "Bundle",
670
- accessorFn: (r) => {
671
- var o;
672
- return ((o = A.value.find((u) => u._id === r.bundle)) == null ? void 0 : o.name) || "-";
673
- }
674
- },
675
- {
676
- header: "Redeemed at",
677
- accessorKey: "redeemedAt",
678
- accessorFn: (r) => r.redeemedAt ? re(r.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
679
- }
680
- ], { tableMeta: E, rowData: a, onSort: C, debouncedFetchData: H, onSearch: F } = xe(oe.readCards);
681
- async function S() {
682
- var r;
683
- await H(), (r = w.value) == null || r.showSheet(!1);
684
- }
685
- const U = V(() => y.isPremium ? [
686
- {
687
- label: "Create cards",
688
- value: "create",
689
- isPrimary: !0
690
- },
691
- {
692
- label: "Manage Design",
693
- value: "design",
694
- isPrimary: !0
695
- }
696
- ] : []);
697
- async function P(r) {
698
- const o = new He(), u = r.map((p) => ({
699
- CardNumber: p
700
- }));
701
- o.addRecords(u), await we(
702
- o.buildExcel(),
703
- `cards-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
704
- {
705
- bookType: "xlsx",
706
- bookSST: !1,
707
- type: "array"
708
- }
709
- );
710
- }
711
- return ee(async () => {
712
- await D(async () => {
713
- await y.readPremium(), await b.readMemberStore(), await b.readMembership(), await S();
714
- });
715
- }), (r, o) => {
716
- const u = f("FmPill"), p = f("FmPageHead"), t = f("FmSearch"), R = f("FmButton"), M = f("FmCard");
717
- return _(), x(B, null, [
718
- l(p, {
719
- title: "Card",
720
- actions: n(U),
721
- "onClick:action": o[0] || (o[0] = (c) => {
722
- var j, $;
723
- console.log(c), c === "design" && ((j = n(v)) == null || j.showSheet(!0)), c === "create" && (($ = n(w)) == null || $.showSheet(!0));
724
- })
725
- }, {
726
- title: T(() => [
727
- m("div", ln, [
728
- dn,
729
- l(u, {
730
- class: "ml-8",
731
- variant: "premium"
732
- })
733
- ])
734
- ]),
735
- _: 1
736
- }, 8, ["actions"]),
737
- m("div", pn, [
738
- n(a).length > 0 || n(a).length <= 0 && n(E).searchValue || n(E).pageCount > 0 ? (_(), x(B, { key: 0 }, [
739
- m("div", mn, [
740
- l(t, {
741
- class: "mt-4",
742
- modelValue: n(E).searchValue,
743
- "onUpdate:modelValue": [
744
- o[1] || (o[1] = (c) => n(E).searchValue = c),
745
- n(F)
746
- ],
747
- placeholder: "Search",
748
- collapsible: ""
749
- }, null, 8, ["modelValue", "onUpdate:modelValue"]),
750
- l(R, {
751
- icon: "ios_share",
752
- variant: "tertiary",
753
- onClick: Se(n(Ue), ["prevent"])
754
- }, null, 8, ["onClick"])
755
- ]),
756
- l(De, {
757
- loading: n(E).isLoading,
758
- "row-data": n(a),
759
- "row-count": n(E).totalRows,
760
- "column-defs": h,
761
- "shrink-at": !1,
762
- "page-count": n(E).pageCount,
763
- "page-index": n(E).pageIndex,
764
- "page-size": n(E).pageSize,
765
- onSortChange: n(C),
766
- onPageChange: o[2] || (o[2] = (c) => {
767
- n(H)({
768
- pageSize: c.pageSize,
769
- pageIndex: c.pageIndex
770
- });
771
- })
772
- }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
773
- ], 64)) : (_(), N(M, {
774
- key: 1,
775
- variant: "outlined",
776
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
777
- }, {
778
- default: T(() => [
779
- un,
780
- cn,
781
- m("div", _n, [
782
- l(R, {
783
- variant: "primary",
784
- label: "Add Card",
785
- icon: "add",
786
- disabled: !n(y).isPremium,
787
- onClick: o[3] || (o[3] = () => {
788
- var c;
789
- return (c = n(w)) == null ? void 0 : c.showSheet(!0);
790
- })
791
- }, null, 8, ["disabled"]),
792
- l(R, {
793
- variant: "secondary",
794
- label: "Manage Design",
795
- disabled: !n(y).isPremium,
796
- onClick: o[4] || (o[4] = () => {
797
- var c;
798
- return (c = n(v)) == null ? void 0 : c.showSheet(!0);
799
- })
800
- }, null, 8, ["disabled"])
801
- ])
802
- ]),
803
- _: 1
804
- })),
805
- l(ze, {
806
- ref_key: "sheetRef",
807
- ref: w,
808
- onSuccess: S,
809
- onExport: P
810
- }, null, 512),
811
- l(rn, {
812
- ref_key: "designSheetRef",
813
- ref: v,
814
- onSuccess: S
815
- }, null, 512)
816
- ])
817
- ], 64);
818
- };
819
- }
820
- });
821
- export {
822
- Bn as default
823
- };