@feedmepos/mf-connect 0.1.47-prod → 0.1.48-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.
- package/dist/{Analytic-AnuRQDA4.js → Analytic-DrjBaKmx.js} +113 -113
- package/dist/{App-DP_jCyej.js → App-eIaytGsZ.js} +632 -622
- package/dist/{Bin-tL4lF6PB.js → Bin-CVp0eFwl.js} +9 -9
- package/dist/{Broadcast-T2a5tN8R.js → Broadcast-DBgBT6yz.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CugJWeBo.js} +18 -18
- package/dist/{Card-Bi-ODgCc.js → Card-DkP6oJVn.js} +239 -239
- package/dist/{Collections-JHWotZ1I.js → Collections-DYb_aeTW.js} +31 -31
- package/dist/{Credit-DQQCXqS0.js → Credit-WVv_PL5D.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dt9c2kvf.js} +756 -753
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-DT3y4k1C.js} +96 -96
- package/dist/{Experience-DzTV21vX.js → Experience-BdH44wBG.js} +41 -41
- package/dist/{Game-DUCx2Dl9.js → Game-C7jxRESY.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/{Index-zynxjOOr.js → Index-DYr1p4sh.js} +54 -54
- package/dist/{Marketing-BBHDVRkR.js → Marketing-Djl27fez.js} +24 -24
- package/dist/{Member-B09bj6C3.js → Member-CWXedfTG.js} +63 -63
- package/dist/MemberList-C2TvGi22.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BSUocGg9.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-D8xPA6jM.js} +2286 -2220
- package/dist/{Mission-DAv0e_ZH.js → Mission-BVx9Cqi5.js} +20 -20
- package/dist/{Overview-D0rBTEtP.js → Overview-DyXF9zfB.js} +337 -337
- package/dist/{Point-BeBYi1BT.js → Point-ovkgTwZO.js} +41 -41
- package/dist/{Promotion-BSPU5hP9.js → Promotion-B0Q6GItP.js} +42 -42
- package/dist/{Queue-C5IFJ3iE.js → Queue-BAWG1Hh-.js} +12 -12
- package/dist/{Record-CoFSrv7j.js → Record-CTp80g4A.js} +10 -10
- package/dist/{Reward-COIOBOl-.js → Reward-_Jow1lJ7.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-BV8xCejA.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-DkDAuGY0.js} +381 -381
- package/dist/{Segment-DF5SrucQ.js → Segment-CsdJ1SjK.js} +327 -327
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-DH3oIm2t.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DvVrjpxR.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D5gV89Xk.js} +3 -3
- package/dist/Setting-BZRA50LO.js +1936 -0
- package/dist/{Store-E2_0EIy8.js → Store-CFnCN_7-.js} +238 -238
- package/dist/StoreRewards-B_McpBz-.js +423 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-vL0vr-Xn.js} +185 -185
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C1ZlLdme.js} +1 -1
- package/dist/{Tier-CEEHsXkC.js → Tier-CCYFu6kJ.js} +106 -106
- package/dist/{Title-BMAWlGeW.js → Title-7Mg-Ml4z.js} +95 -95
- package/dist/{Transaction-CLsceq-O.js → Transaction-BqZrbpZi.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C6ZwPUD4.js} +6 -6
- package/dist/{Voucher-Cd293WYY.js → Voucher-Yty_7SuS.js} +36 -36
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bt12t3gB.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-C3NHrEIl.js} +1 -1
- package/dist/{app-aVXsWATU.js → app-2EJP4psh.js} +31 -31
- package/dist/app-Dzon--6x.js +57962 -0
- package/dist/app.js +1 -1
- package/dist/{business-DVlHPzaL.js → business-BehG4fR2.js} +1 -1
- package/dist/{campaign-l-u9A514.js → campaign-BpaiTG4f.js} +10 -10
- package/dist/{campaign-D9KeUWA7.js → campaign-CAcP56Sz.js} +2 -2
- package/dist/{campaign.enum-Cud82tES.js → campaign.enum-BWjI8Hop.js} +1 -1
- package/dist/{campaign.fn-C-UojhHv.js → campaign.fn-PVdB1-V1.js} +166 -166
- package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BYmuqayi.js} +1 -1
- package/dist/{collection.fn-yR-xnV4g.js → collection.fn-CbH8hbWW.js} +2 -2
- package/dist/{dto-Cua1OHMY.js → dto-Dd3Oc4QO.js} +4 -4
- package/dist/{effect-B5-eXNEr.js → effect-DvEQNEl0.js} +1 -1
- package/dist/{email-addresses-BeYh5fr5.js → email-addresses-C-9JrAi8.js} +1 -1
- package/dist/{export-BUF4_DUz.js → export-RWE9Cn-d.js} +4 -4
- package/dist/{helper-CGwOThAl.js → helper-Bl6LdWED.js} +1 -1
- package/dist/{index-Cl2iYM2F.js → index-1bU9cLqV.js} +1 -1
- package/dist/{index-1BGPM6Uy.js → index-BCQMVr1J.js} +1 -1
- package/dist/{index-BmL_b0IR.js → index-Bgnrbk5x.js} +1 -1
- package/dist/{index-knuJv0ti.js → index-Bjf5Z2QE.js} +4 -4
- package/dist/{index-ng2IXlL1.js → index-CFW9ogow.js} +1 -1
- package/dist/{index-DNTd-FNx.js → index-CfgczUMX.js} +2 -2
- package/dist/{index-C-d_4n-1.js → index-CzCqc7ph.js} +1 -1
- package/dist/{index-aMDi62-C.js → index-DX1X6Owa.js} +1 -1
- package/dist/{index-DlFVLRKG.js → index-DZN5WWgq.js} +3 -3
- package/dist/{index-D5KIp8ZB.js → index-DhUvELhc.js} +3 -3
- package/dist/{index-Cx8-ipee.js → index-DpoNuVc-.js} +6 -6
- package/dist/{index-BLdVWQId.js → index-G_XSbrXB.js} +3 -3
- package/dist/{index-hX2mE0gQ.js → index-VVy4GPzJ.js} +1 -1
- package/dist/{index-CB8iWT_p.js → index-wOExBjGo.js} +1 -1
- package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DfgZFSqe.js} +1 -1
- package/dist/{loading-c4b7n9Xp.js → loading-qlqqYGF3.js} +1 -1
- package/dist/{membership-oBIs4sbL.js → membership-Bh_1iu5v.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-AP24H0gk.js → money-DvTB_Fek.js} +1 -1
- package/dist/{number-CwsAYC_2.js → number-DJQ3gi1P.js} +1 -1
- package/dist/objectid-BKU0cEuv.js +145 -0
- package/dist/{plugins-Dn7JDHi7.js → plugins-DJpBrPbQ.js} +2 -2
- package/dist/{reward-4wdoZeXw.js → reward-DZ4KlN9B.js} +1 -1
- package/dist/{rule-_OJza6tn.js → rule-DV0yCGlq.js} +4 -4
- package/dist/{rule-builder-DmlhHAED.js → rule-builder-D6ihVPNO.js} +1 -1
- package/dist/{template-BSQLFHf4.js → template-ElP-JIFL.js} +63 -63
- package/dist/timezone-FaHjut_D.js +1150 -0
- package/dist/{trigger-DC9tDnI2.js → trigger-D8wnJVTA.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-CCVOptFD.js → user-NWV9KppR.js} +1 -1
- package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-CkbS-IDD.js} +112 -112
- package/dist/{xlsx-BVMaOi8M.js → xlsx-CdQE5RZi.js} +226 -226
- package/package.json +5 -4
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/MemberList-DLSLGQ02.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Setting-Dt0sG_hk.js +0 -1936
- package/dist/StoreRewards-DuSsWnTE.js +0 -423
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
- package/dist/app-jRT7vsk_.js +0 -33357
- package/dist/objectid-CVDLTdni.js +0 -145
- package/dist/usePagination-JoYaROkV.js +0 -223
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as y, computed as E, watch as ne, onMounted as X, resolveComponent as v, openBlock as c, createBlock as F, unref as e, isRef as G, withCtx as
|
|
1
|
+
import { defineComponent as Z, ref as y, computed as E, watch as ne, onMounted as X, resolveComponent as v, openBlock as c, createBlock as F, unref as e, isRef as G, withCtx as h, createElementVNode as d, createVNode as i, createElementBlock as $, Fragment as z, renderList as H, createCommentVNode as k, normalizeClass as me, createSlots as ge, h as K, toDisplayString as te, withModifiers as be } from "vue";
|
|
2
2
|
import { _ as ve } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { h as oe } from "./moment-
|
|
3
|
+
import { h as oe } from "./moment-D7p2TMB-.js";
|
|
4
4
|
import { useDialog as ye, components as se } from "@feedmepos/ui-library";
|
|
5
|
-
import "./index-
|
|
6
|
-
import { u as J } from "./loading-
|
|
5
|
+
import "./index-DhUvELhc.js";
|
|
6
|
+
import { u as J } from "./loading-qlqqYGF3.js";
|
|
7
7
|
import { u as ce } from "./app-wDQR6dpb.js";
|
|
8
|
-
import { u as W } from "./membership-
|
|
8
|
+
import { u as W } from "./membership-Bh_1iu5v.js";
|
|
9
9
|
import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
|
|
10
|
-
import { p as pe, f as ie, n as
|
|
11
|
-
import { m as L } from "./index-
|
|
12
|
-
import { z as re } from "./app-
|
|
10
|
+
import { p as pe, f as ie, n as xe } from "./plugins-DJpBrPbQ.js";
|
|
11
|
+
import { m as L } from "./index-DX1X6Owa.js";
|
|
12
|
+
import { z as re } from "./app-2EJP4psh.js";
|
|
13
13
|
import { Z as de } from "./zod-Bg2FbC-D.js";
|
|
14
|
-
import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { k as
|
|
16
|
-
import "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { O as
|
|
21
|
-
import { a as
|
|
22
|
-
import { u as we } from "./business-
|
|
23
|
-
import { w as ke } from "./xlsx-
|
|
24
|
-
import { a as Fe, C as Ve } from "./export-
|
|
25
|
-
import { u as $e, _ as Me } from "./usePagination-
|
|
26
|
-
import { u as Be } from "./vue-i18n
|
|
14
|
+
import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
|
|
15
|
+
import { k as Ce } from "./index-Bjf5Z2QE.js";
|
|
16
|
+
import "./index-CfgczUMX.js";
|
|
17
|
+
import "./index-DpoNuVc-.js";
|
|
18
|
+
import "./index-CFW9ogow.js";
|
|
19
|
+
import "./index-DZN5WWgq.js";
|
|
20
|
+
import { O as Se } from "./objectid-BKU0cEuv.js";
|
|
21
|
+
import { a as he, c as _e } from "./object-qECH92oz.js";
|
|
22
|
+
import { u as we } from "./business-BehG4fR2.js";
|
|
23
|
+
import { w as ke } from "./xlsx-CdQE5RZi.js";
|
|
24
|
+
import { a as Fe, C as Ve } from "./export-RWE9Cn-d.js";
|
|
25
|
+
import { u as $e, _ as Me } from "./usePagination-Ds-cuHop.js";
|
|
26
|
+
import { u as Be } from "./vue-i18n-CkbS-IDD.js";
|
|
27
27
|
import { o as Ue } from "./objectId-dwaoBfJX.js";
|
|
28
|
-
const Ae =
|
|
28
|
+
const Ae = { class: "space-y-16" }, De = { class: "gap-16 grid grid-cols-2" }, Ie = { class: "space-y-16" }, Ne = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "flex flex-col gap-[16px] w-full"
|
|
31
|
-
},
|
|
31
|
+
}, Pe = { class: "flex flex-col gap-[8px]" }, Re = ["src"], qe = { class: "flex pt-[24px] gap-[24px]" }, ze = ["src", "onClick", "alt"], Ee = { class: "flex items-center gap-8" }, je = /* @__PURE__ */ Z({
|
|
32
32
|
__name: "CreateCardSheet",
|
|
33
33
|
emits: ["success", "export"],
|
|
34
34
|
setup(ee, { expose: j, emit: T }) {
|
|
35
|
-
const { minor: D } = J, g = W(), M = y(),
|
|
35
|
+
const { minor: D } = J, g = W(), M = y(), x = y(!1), w = T, o = y(!1);
|
|
36
36
|
function B(m) {
|
|
37
|
-
|
|
37
|
+
o.value = m, m && (s.value = {
|
|
38
38
|
quantity: 1,
|
|
39
39
|
code: "",
|
|
40
40
|
codeConfig: {
|
|
@@ -46,7 +46,7 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const s = y({
|
|
50
50
|
quantity: 1,
|
|
51
51
|
code: "",
|
|
52
52
|
codeConfig: {
|
|
@@ -82,18 +82,18 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
82
82
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
83
83
|
{ label: "Numbers", value: "0123456789" },
|
|
84
84
|
{ label: "Custom", value: "" }
|
|
85
|
-
], I = y(A[0].value),
|
|
85
|
+
], I = y(A[0].value), _ = y("bulk"), C = y(0), n = E(
|
|
86
86
|
() => {
|
|
87
87
|
var m;
|
|
88
|
-
return (m = g.membership.design) == null ? void 0 : m[
|
|
88
|
+
return (m = g.membership.design) == null ? void 0 : m[C.value];
|
|
89
89
|
}
|
|
90
90
|
), u = y(!1), r = E(
|
|
91
91
|
() => g.sortedStoreCategories.flatMap((m) => m.bundles)
|
|
92
92
|
);
|
|
93
93
|
async function b(m) {
|
|
94
94
|
var l, V;
|
|
95
|
-
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !
|
|
96
|
-
m.design = (V =
|
|
95
|
+
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !x.value) return;
|
|
96
|
+
m.design = (V = n.value) == null ? void 0 : V.image;
|
|
97
97
|
const t = await pe.confirm(
|
|
98
98
|
"",
|
|
99
99
|
"Do you want to export generated card(s)?",
|
|
@@ -114,63 +114,63 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
114
114
|
return j({
|
|
115
115
|
showSheet: B
|
|
116
116
|
}), ne(
|
|
117
|
-
() =>
|
|
117
|
+
() => s.value.codeConfig.length,
|
|
118
118
|
(m, t) => {
|
|
119
|
-
m != t && (
|
|
119
|
+
m != t && (s.value.codeConfig.pattern = "#".repeat(Number(m)));
|
|
120
120
|
}
|
|
121
121
|
), ne(
|
|
122
|
-
() =>
|
|
122
|
+
() => s.value.codeConfig.pattern,
|
|
123
123
|
(m, t) => {
|
|
124
|
-
m != t && (
|
|
124
|
+
m != t && (s.value.codeConfig.length = (s.value.codeConfig.pattern.match(/#/g) || []).length);
|
|
125
125
|
}
|
|
126
126
|
), X(async () => {
|
|
127
127
|
await g.readMemberStore();
|
|
128
128
|
}), (m, t) => {
|
|
129
|
-
const l = v("FmRadio"), V = v("FmRadioGroup"), U = v("FmSwitch"), f = v("FmStepperField"), N = v("FmSelect"), q = v("FmTextField"),
|
|
129
|
+
const l = v("FmRadio"), V = v("FmRadioGroup"), U = v("FmSwitch"), f = v("FmStepperField"), N = v("FmSelect"), q = v("FmTextField"), S = v("FmTextarea"), P = v("FmButton"), O = v("FmForm"), fe = v("FmSideSheet");
|
|
130
130
|
return c(), F(fe, {
|
|
131
131
|
"max-width": 560,
|
|
132
132
|
"dismiss-away": !0,
|
|
133
133
|
header: "Create collection",
|
|
134
|
-
modelValue: e(
|
|
134
|
+
modelValue: e(o),
|
|
135
135
|
"onUpdate:modelValue": [
|
|
136
|
-
t[19] || (t[19] = (R) => G(
|
|
137
|
-
t[20] || (t[20] = (R) =>
|
|
136
|
+
t[19] || (t[19] = (R) => G(o) ? o.value = R : null),
|
|
137
|
+
t[20] || (t[20] = (R) => o.value = R)
|
|
138
138
|
]
|
|
139
139
|
}, {
|
|
140
|
-
"side-sheet-footer":
|
|
141
|
-
d("div",
|
|
140
|
+
"side-sheet-footer": h(() => [
|
|
141
|
+
d("div", Ee, [
|
|
142
142
|
i(P, {
|
|
143
143
|
label: "Save",
|
|
144
|
-
onClick: t[17] || (t[17] = (R) => b(e(
|
|
144
|
+
onClick: t[17] || (t[17] = (R) => b(e(s))),
|
|
145
145
|
loading: e(ce)().isLoading
|
|
146
146
|
}, null, 8, ["loading"]),
|
|
147
147
|
i(P, {
|
|
148
148
|
label: "Cancel",
|
|
149
149
|
type: "button",
|
|
150
150
|
variant: "tertiary",
|
|
151
|
-
onClick: t[18] || (t[18] = (R) =>
|
|
151
|
+
onClick: t[18] || (t[18] = (R) => o.value = !1)
|
|
152
152
|
})
|
|
153
153
|
])
|
|
154
154
|
]),
|
|
155
|
-
default:
|
|
155
|
+
default: h(() => [
|
|
156
156
|
i(O, {
|
|
157
157
|
ref_key: "form",
|
|
158
158
|
ref: M,
|
|
159
159
|
class: "space-y-40",
|
|
160
|
-
onValidationSuccess: t[15] || (t[15] = (R) =>
|
|
161
|
-
onValidationFailed: t[16] || (t[16] = (R) =>
|
|
160
|
+
onValidationSuccess: t[15] || (t[15] = (R) => x.value = !0),
|
|
161
|
+
onValidationFailed: t[16] || (t[16] = (R) => x.value = !1)
|
|
162
162
|
}, {
|
|
163
|
-
default:
|
|
163
|
+
default: h(() => {
|
|
164
164
|
var R, le, ae;
|
|
165
165
|
return [
|
|
166
166
|
d("div", null, [
|
|
167
|
-
|
|
167
|
+
t[21] || (t[21] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1)),
|
|
168
168
|
i(V, {
|
|
169
|
-
modelValue: e(
|
|
170
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(
|
|
169
|
+
modelValue: e(_),
|
|
170
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(_) ? _.value = a : null),
|
|
171
171
|
inline: !1
|
|
172
172
|
}, {
|
|
173
|
-
default:
|
|
173
|
+
default: h(() => [
|
|
174
174
|
(c(), $(z, null, H(p, (a) => i(l, {
|
|
175
175
|
key: a.value,
|
|
176
176
|
value: a.value,
|
|
@@ -181,9 +181,9 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
181
181
|
_: 1
|
|
182
182
|
}, 8, ["modelValue"])
|
|
183
183
|
]),
|
|
184
|
-
d("div",
|
|
185
|
-
|
|
186
|
-
e(
|
|
184
|
+
d("div", Ae, [
|
|
185
|
+
t[22] || (t[22] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1)),
|
|
186
|
+
e(_) === "bulk" ? (c(), $(z, { key: 0 }, [
|
|
187
187
|
i(U, {
|
|
188
188
|
"model-value": e(u),
|
|
189
189
|
"label-placement": "right",
|
|
@@ -194,8 +194,8 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
194
194
|
}, null, 8, ["model-value"]),
|
|
195
195
|
e(u) ? (c(), $(z, { key: 0 }, [
|
|
196
196
|
i(f, {
|
|
197
|
-
"model-value": e(
|
|
198
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) => e(
|
|
197
|
+
"model-value": e(s).codeConfig.length || null,
|
|
198
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => e(s).codeConfig.length = a),
|
|
199
199
|
label: "Code length",
|
|
200
200
|
rules: [(a) => Number(a) >= 1 || "Code length must at least 1"],
|
|
201
201
|
required: !0
|
|
@@ -204,80 +204,80 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
204
204
|
label: "Charset",
|
|
205
205
|
"model-value": e(I),
|
|
206
206
|
items: A,
|
|
207
|
-
"helper-text": e(
|
|
207
|
+
"helper-text": e(s).codeConfig.charset.length > 62 ? `${e(s).codeConfig.charset.substring(0, 62)}...` : e(s).codeConfig.charset,
|
|
208
208
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => {
|
|
209
|
-
I.value = a, e(
|
|
209
|
+
I.value = a, e(s).codeConfig.charset = a;
|
|
210
210
|
})
|
|
211
211
|
}, null, 8, ["model-value", "helper-text"]),
|
|
212
212
|
e(I) === "" ? (c(), F(q, {
|
|
213
213
|
key: 0,
|
|
214
|
-
modelValue: e(
|
|
215
|
-
"onUpdate:modelValue": t[4] || (t[4] = (a) => e(
|
|
214
|
+
modelValue: e(s).codeConfig.charset,
|
|
215
|
+
"onUpdate:modelValue": t[4] || (t[4] = (a) => e(s).codeConfig.charset = a),
|
|
216
216
|
label: "Custom Charset",
|
|
217
217
|
required: ""
|
|
218
218
|
}, null, 8, ["modelValue"])) : k("", !0),
|
|
219
|
-
d("div",
|
|
219
|
+
d("div", De, [
|
|
220
220
|
i(q, {
|
|
221
|
-
modelValue: e(
|
|
222
|
-
"onUpdate:modelValue": t[5] || (t[5] = (a) => e(
|
|
221
|
+
modelValue: e(s).codeConfig.prefix,
|
|
222
|
+
"onUpdate:modelValue": t[5] || (t[5] = (a) => e(s).codeConfig.prefix = a),
|
|
223
223
|
label: "Prefix (Optional)"
|
|
224
224
|
}, null, 8, ["modelValue"]),
|
|
225
225
|
i(q, {
|
|
226
|
-
modelValue: e(
|
|
227
|
-
"onUpdate:modelValue": t[6] || (t[6] = (a) => e(
|
|
226
|
+
modelValue: e(s).codeConfig.suffix,
|
|
227
|
+
"onUpdate:modelValue": t[6] || (t[6] = (a) => e(s).codeConfig.suffix = a),
|
|
228
228
|
label: "Suffix (Optional)"
|
|
229
229
|
}, null, 8, ["modelValue"])
|
|
230
230
|
]),
|
|
231
231
|
i(q, {
|
|
232
|
-
modelValue: e(
|
|
233
|
-
"onUpdate:modelValue": t[7] || (t[7] = (a) => e(
|
|
232
|
+
modelValue: e(s).codeConfig.pattern,
|
|
233
|
+
"onUpdate:modelValue": t[7] || (t[7] = (a) => e(s).codeConfig.pattern = a),
|
|
234
234
|
label: "Pattern",
|
|
235
235
|
required: !0
|
|
236
236
|
}, null, 8, ["modelValue"])
|
|
237
237
|
], 64)) : k("", !0),
|
|
238
238
|
i(q, {
|
|
239
|
-
modelValue: e(
|
|
240
|
-
"onUpdate:modelValue": t[8] || (t[8] = (a) => e(
|
|
239
|
+
modelValue: e(s).quantity,
|
|
240
|
+
"onUpdate:modelValue": t[8] || (t[8] = (a) => e(s).quantity = a),
|
|
241
241
|
label: "Number of code",
|
|
242
242
|
rules: [
|
|
243
243
|
(a) => a >= 1 || "Quantity cannot be less than 1",
|
|
244
244
|
(a) => a <= 1e4 || "Quantity cannot more than 10,000"
|
|
245
245
|
],
|
|
246
246
|
required: !0,
|
|
247
|
-
"helper-text": `${e(
|
|
247
|
+
"helper-text": `${e(s).quantity} card will be created`
|
|
248
248
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
249
249
|
], 64)) : k("", !0),
|
|
250
|
-
e(
|
|
250
|
+
e(_) !== "bulk" ? (c(), F(S, {
|
|
251
251
|
key: 1,
|
|
252
|
-
modelValue: e(
|
|
253
|
-
"onUpdate:modelValue": t[9] || (t[9] = (a) => e(
|
|
252
|
+
modelValue: e(s).code,
|
|
253
|
+
"onUpdate:modelValue": t[9] || (t[9] = (a) => e(s).code = a),
|
|
254
254
|
label: "Custom Card Number",
|
|
255
|
-
rules: [(a) => e(
|
|
255
|
+
rules: [(a) => e(_) != "single" || !!a || "Custom code is required"],
|
|
256
256
|
placeholder: "(For multiple numbers, please enter in the new row.)"
|
|
257
257
|
}, null, 8, ["modelValue", "rules"])) : k("", !0)
|
|
258
258
|
]),
|
|
259
|
-
d("div",
|
|
260
|
-
|
|
259
|
+
d("div", Ie, [
|
|
260
|
+
t[23] || (t[23] = d("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1)),
|
|
261
261
|
i(U, {
|
|
262
262
|
"label-placement": "right",
|
|
263
263
|
label: "Set card number on bind",
|
|
264
264
|
sublabel: "Automatically set the card number when the user binds the card",
|
|
265
|
-
"model-value": e(
|
|
266
|
-
"onUpdate:modelValue": t[10] || (t[10] = (a) => e(
|
|
265
|
+
"model-value": e(s).setCardOnBind || !1,
|
|
266
|
+
"onUpdate:modelValue": t[10] || (t[10] = (a) => e(s).setCardOnBind = a)
|
|
267
267
|
}, null, 8, ["model-value"]),
|
|
268
268
|
i(Q, {
|
|
269
269
|
label: "Activate bundle on bind",
|
|
270
270
|
placeholder: "Select bundle",
|
|
271
271
|
items: e(r).filter((a) => !a.stripePriceId).map((a) => ({ label: a.name, value: a._id })),
|
|
272
|
-
modelValue: e(
|
|
273
|
-
"onUpdate:modelValue": t[12] || (t[12] = (a) => e(
|
|
272
|
+
modelValue: e(s).bundle,
|
|
273
|
+
"onUpdate:modelValue": t[12] || (t[12] = (a) => e(s).bundle = a)
|
|
274
274
|
}, {
|
|
275
|
-
append:
|
|
276
|
-
e(
|
|
275
|
+
append: h(() => [
|
|
276
|
+
e(s).bundle ? (c(), F(P, {
|
|
277
277
|
key: 0,
|
|
278
278
|
icon: "link_off",
|
|
279
279
|
variant: "plain",
|
|
280
|
-
onClick: t[11] || (t[11] = (a) => e(
|
|
280
|
+
onClick: t[11] || (t[11] = (a) => e(s).bundle = void 0)
|
|
281
281
|
})) : k("", !0)
|
|
282
282
|
]),
|
|
283
283
|
_: 1
|
|
@@ -287,36 +287,36 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
287
287
|
label: "Linked subscription bundle",
|
|
288
288
|
placeholder: "Select bundle",
|
|
289
289
|
items: e(r).filter((a) => a.stripePriceId).map((a) => ({ label: a.name, value: a._id })),
|
|
290
|
-
modelValue: e(
|
|
291
|
-
"onUpdate:modelValue": t[14] || (t[14] = (a) => e(
|
|
290
|
+
modelValue: e(s).subscriptionBundle,
|
|
291
|
+
"onUpdate:modelValue": t[14] || (t[14] = (a) => e(s).subscriptionBundle = a)
|
|
292
292
|
}, {
|
|
293
|
-
append:
|
|
294
|
-
e(
|
|
293
|
+
append: h(() => [
|
|
294
|
+
e(s).subscriptionBundle ? (c(), F(P, {
|
|
295
295
|
key: 0,
|
|
296
296
|
icon: "link_off",
|
|
297
297
|
variant: "plain",
|
|
298
|
-
onClick: t[13] || (t[13] = (a) => e(
|
|
298
|
+
onClick: t[13] || (t[13] = (a) => e(s).subscriptionBundle = void 0)
|
|
299
299
|
})) : k("", !0)
|
|
300
300
|
]),
|
|
301
301
|
_: 1
|
|
302
302
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
303
303
|
]),
|
|
304
|
-
e(g).membership.design ? (c(), $("div",
|
|
305
|
-
d("div",
|
|
306
|
-
|
|
304
|
+
e(g).membership.design ? (c(), $("div", Ne, [
|
|
305
|
+
d("div", Pe, [
|
|
306
|
+
t[24] || (t[24] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
307
307
|
d("img", {
|
|
308
|
-
src: (ae = e(
|
|
308
|
+
src: (ae = e(n)) == null ? void 0 : ae.image,
|
|
309
309
|
class: "aspect-[16/9]"
|
|
310
|
-
}, null, 8,
|
|
311
|
-
d("div",
|
|
310
|
+
}, null, 8, Re),
|
|
311
|
+
d("div", qe, [
|
|
312
312
|
(c(!0), $(z, null, H(e(g).membership.design, (a, Y) => (c(), $("img", {
|
|
313
313
|
src: a.image,
|
|
314
314
|
key: `image_${Y}`,
|
|
315
|
-
class: me(["w-[112px] h-[63px] cursor-pointer", `${e(
|
|
316
|
-
onClick: (
|
|
315
|
+
class: me(["w-[112px] h-[63px] cursor-pointer", `${e(C) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
316
|
+
onClick: (dt) => C.value = Y,
|
|
317
317
|
alt: `ai_image_predict_${Y}`,
|
|
318
318
|
style: { objectFit: "cover" }
|
|
319
|
-
}, null, 10,
|
|
319
|
+
}, null, 10, ze))), 128))
|
|
320
320
|
])
|
|
321
321
|
])
|
|
322
322
|
])) : k("", !0)
|
|
@@ -329,39 +329,39 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
329
329
|
}, 8, ["modelValue"]);
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
}),
|
|
332
|
+
}), Te = { class: "space-y-16" }, Le = {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "flex flex-col gap-[16px] w-full"
|
|
335
|
-
},
|
|
335
|
+
}, Oe = { class: "flex flex-col gap-[8px]" }, Ye = ["src"], Ke = { class: "flex pt-[24px] gap-[24px]" }, Ge = ["src", "onClick", "alt"], He = { class: "flex items-center gap-8" }, Qe = /* @__PURE__ */ Z({
|
|
336
336
|
__name: "EditCardSheet",
|
|
337
337
|
emits: ["success"],
|
|
338
338
|
setup(ee, { expose: j, emit: T }) {
|
|
339
|
-
const { minor: D } = J, g = W(), M = y(),
|
|
339
|
+
const { minor: D } = J, g = W(), M = y(), x = y(!1), w = T, o = y({
|
|
340
340
|
_id: "",
|
|
341
341
|
business: "",
|
|
342
342
|
serialNumber: ""
|
|
343
343
|
}), B = y(!1);
|
|
344
|
-
function
|
|
344
|
+
function s(C, n) {
|
|
345
345
|
var u;
|
|
346
|
-
B.value =
|
|
347
|
-
(r) => r.image ===
|
|
346
|
+
B.value = C, C && n && (o.value = n, p.value = (u = g.membership.design) == null ? void 0 : u.findIndex(
|
|
347
|
+
(r) => r.image === n.design
|
|
348
348
|
));
|
|
349
349
|
}
|
|
350
350
|
const p = y(0), A = E(
|
|
351
351
|
() => {
|
|
352
|
-
var
|
|
353
|
-
return (
|
|
352
|
+
var C;
|
|
353
|
+
return (C = g.membership.design) == null ? void 0 : C[p.value];
|
|
354
354
|
}
|
|
355
355
|
), I = E(
|
|
356
356
|
() => g.sortedStoreCategories.flatMap(
|
|
357
|
-
(
|
|
357
|
+
(C) => C.bundles
|
|
358
358
|
)
|
|
359
359
|
);
|
|
360
|
-
async function
|
|
361
|
-
var
|
|
362
|
-
await ((
|
|
360
|
+
async function _(C) {
|
|
361
|
+
var n, u;
|
|
362
|
+
await ((n = M.value) == null ? void 0 : n.validateInputs()), x.value && (C.design = (u = A.value) == null ? void 0 : u.image, await D(
|
|
363
363
|
async () => {
|
|
364
|
-
await L.updateCard(
|
|
364
|
+
await L.updateCard(C), await w("success");
|
|
365
365
|
},
|
|
366
366
|
{
|
|
367
367
|
message: "Updating card",
|
|
@@ -370,10 +370,10 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
370
370
|
));
|
|
371
371
|
}
|
|
372
372
|
return j({
|
|
373
|
-
showSheet:
|
|
373
|
+
showSheet: s
|
|
374
374
|
}), X(async () => {
|
|
375
375
|
await g.readMemberStore();
|
|
376
|
-
}), (
|
|
376
|
+
}), (C, n) => {
|
|
377
377
|
const u = v("FmTextField"), r = v("FmSwitch"), b = v("FmButton"), m = v("FmForm"), t = v("FmSideSheet");
|
|
378
378
|
return c(), F(t, {
|
|
379
379
|
"max-width": 560,
|
|
@@ -381,41 +381,41 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
381
381
|
header: "Edit card",
|
|
382
382
|
modelValue: e(B),
|
|
383
383
|
"onUpdate:modelValue": [
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
n[10] || (n[10] = (l) => G(B) ? B.value = l : null),
|
|
385
|
+
n[11] || (n[11] = (l) => B.value = l)
|
|
386
386
|
]
|
|
387
387
|
}, {
|
|
388
|
-
"side-sheet-footer":
|
|
389
|
-
d("div",
|
|
388
|
+
"side-sheet-footer": h(() => [
|
|
389
|
+
d("div", He, [
|
|
390
390
|
i(b, {
|
|
391
391
|
label: "Save",
|
|
392
|
-
disabled: !!e(
|
|
393
|
-
onClick:
|
|
392
|
+
disabled: !!e(o).redeemedAt,
|
|
393
|
+
onClick: n[8] || (n[8] = (l) => _(e(o))),
|
|
394
394
|
loading: e(ce)().isLoading
|
|
395
395
|
}, null, 8, ["disabled", "loading"]),
|
|
396
396
|
i(b, {
|
|
397
397
|
label: "Cancel",
|
|
398
398
|
type: "button",
|
|
399
399
|
variant: "tertiary",
|
|
400
|
-
onClick:
|
|
400
|
+
onClick: n[9] || (n[9] = (l) => B.value = !1)
|
|
401
401
|
})
|
|
402
402
|
])
|
|
403
403
|
]),
|
|
404
|
-
default:
|
|
404
|
+
default: h(() => [
|
|
405
405
|
i(m, {
|
|
406
406
|
ref_key: "form",
|
|
407
407
|
ref: M,
|
|
408
408
|
class: "space-y-40",
|
|
409
|
-
onValidationSuccess:
|
|
410
|
-
onValidationFailed:
|
|
409
|
+
onValidationSuccess: n[6] || (n[6] = (l) => x.value = !0),
|
|
410
|
+
onValidationFailed: n[7] || (n[7] = (l) => x.value = !1)
|
|
411
411
|
}, {
|
|
412
|
-
default:
|
|
412
|
+
default: h(() => {
|
|
413
413
|
var l, V, U;
|
|
414
414
|
return [
|
|
415
|
-
d("div",
|
|
415
|
+
d("div", Te, [
|
|
416
416
|
i(u, {
|
|
417
|
-
modelValue: e(
|
|
418
|
-
"onUpdate:modelValue":
|
|
417
|
+
modelValue: e(o).serialNumber,
|
|
418
|
+
"onUpdate:modelValue": n[0] || (n[0] = (f) => e(o).serialNumber = f),
|
|
419
419
|
label: "Card Number",
|
|
420
420
|
rules: [
|
|
421
421
|
e(de).toRule(e(re).string().min(1, "Card number is required")),
|
|
@@ -425,26 +425,26 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
425
425
|
],
|
|
426
426
|
required: !0
|
|
427
427
|
}, null, 8, ["modelValue", "rules"]),
|
|
428
|
-
|
|
428
|
+
n[12] || (n[12] = d("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1)),
|
|
429
429
|
i(r, {
|
|
430
430
|
"label-placement": "right",
|
|
431
431
|
label: "Set card number on bind",
|
|
432
|
-
"model-value": e(
|
|
433
|
-
"onUpdate:modelValue":
|
|
432
|
+
"model-value": e(o).setCardOnBind || !1,
|
|
433
|
+
"onUpdate:modelValue": n[1] || (n[1] = (f) => e(o).setCardOnBind = f)
|
|
434
434
|
}, null, 8, ["model-value"]),
|
|
435
435
|
i(Q, {
|
|
436
436
|
label: "Activate bundle on bind",
|
|
437
437
|
placeholder: "Select bundle",
|
|
438
438
|
items: e(I).filter((f) => !f.stripePriceId).map((f) => ({ label: f.name, value: f._id })),
|
|
439
|
-
modelValue: e(
|
|
440
|
-
"onUpdate:modelValue":
|
|
439
|
+
modelValue: e(o).bundle,
|
|
440
|
+
"onUpdate:modelValue": n[3] || (n[3] = (f) => e(o).bundle = f)
|
|
441
441
|
}, {
|
|
442
|
-
append:
|
|
443
|
-
e(
|
|
442
|
+
append: h(() => [
|
|
443
|
+
e(o).bundle ? (c(), F(b, {
|
|
444
444
|
key: 0,
|
|
445
445
|
icon: "link_off",
|
|
446
446
|
variant: "plain",
|
|
447
|
-
onClick:
|
|
447
|
+
onClick: n[2] || (n[2] = (f) => e(o).bundle = null)
|
|
448
448
|
})) : k("", !0)
|
|
449
449
|
]),
|
|
450
450
|
_: 1
|
|
@@ -454,28 +454,28 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
454
454
|
label: "Linked subscription bundle",
|
|
455
455
|
placeholder: "Select bundle",
|
|
456
456
|
items: e(I).filter((f) => f.stripePriceId).map((f) => ({ label: f.name, value: f._id })),
|
|
457
|
-
modelValue: e(
|
|
458
|
-
"onUpdate:modelValue":
|
|
457
|
+
modelValue: e(o).subscriptionBundle,
|
|
458
|
+
"onUpdate:modelValue": n[5] || (n[5] = (f) => e(o).subscriptionBundle = f)
|
|
459
459
|
}, {
|
|
460
|
-
append:
|
|
461
|
-
e(
|
|
460
|
+
append: h(() => [
|
|
461
|
+
e(o).subscriptionBundle ? (c(), F(b, {
|
|
462
462
|
key: 0,
|
|
463
463
|
icon: "link_off",
|
|
464
464
|
variant: "plain",
|
|
465
|
-
onClick:
|
|
465
|
+
onClick: n[4] || (n[4] = (f) => e(o).subscriptionBundle = null)
|
|
466
466
|
})) : k("", !0)
|
|
467
467
|
]),
|
|
468
468
|
_: 1
|
|
469
469
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
470
470
|
]),
|
|
471
|
-
e(g).membership.design ? (c(), $("div",
|
|
472
|
-
d("div",
|
|
473
|
-
|
|
471
|
+
e(g).membership.design ? (c(), $("div", Le, [
|
|
472
|
+
d("div", Oe, [
|
|
473
|
+
n[13] || (n[13] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
474
474
|
d("img", {
|
|
475
475
|
src: (U = e(A)) == null ? void 0 : U.image,
|
|
476
476
|
class: "aspect-[16/9]"
|
|
477
|
-
}, null, 8,
|
|
478
|
-
d("div",
|
|
477
|
+
}, null, 8, Ye),
|
|
478
|
+
d("div", Ke, [
|
|
479
479
|
(c(!0), $(z, null, H(e(g).membership.design, (f, N) => (c(), $("img", {
|
|
480
480
|
src: f.image,
|
|
481
481
|
key: `image_${N}`,
|
|
@@ -483,7 +483,7 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
483
483
|
onClick: (q) => p.value = N,
|
|
484
484
|
alt: `ai_image_predict_${N}`,
|
|
485
485
|
style: { objectFit: "cover" }
|
|
486
|
-
}, null, 10,
|
|
486
|
+
}, null, 10, Ge))), 128))
|
|
487
487
|
])
|
|
488
488
|
])
|
|
489
489
|
])) : k("", !0)
|
|
@@ -496,21 +496,21 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
496
496
|
}, 8, ["modelValue"]);
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
}),
|
|
499
|
+
}), Ze = {
|
|
500
500
|
key: 0,
|
|
501
501
|
class: "grid grid-cols-1 gap-8"
|
|
502
|
-
},
|
|
502
|
+
}, Xe = { class: "flex items-center gap-8" }, Je = { class: "flex items-center gap-8" }, We = 5, et = /* @__PURE__ */ Z({
|
|
503
503
|
__name: "CardDesignSheet",
|
|
504
504
|
emits: ["success"],
|
|
505
505
|
setup(ee, { expose: j, emit: T }) {
|
|
506
|
-
const { minor: D } = J, g = W(), M = ye(),
|
|
506
|
+
const { minor: D } = J, g = W(), M = ye(), x = y(!1);
|
|
507
507
|
y(), y(!1);
|
|
508
|
-
const w = y(),
|
|
508
|
+
const w = y(), o = y(null);
|
|
509
509
|
E(() => {
|
|
510
510
|
var u, r;
|
|
511
|
-
return Math.min((((r = (u = w.value) == null ? void 0 : u.design) == null ? void 0 : r.length) ?? 0) + 1,
|
|
511
|
+
return Math.min((((r = (u = w.value) == null ? void 0 : u.design) == null ? void 0 : r.length) ?? 0) + 1, We);
|
|
512
512
|
});
|
|
513
|
-
const B = T,
|
|
513
|
+
const B = T, s = E(() => {
|
|
514
514
|
var u, r;
|
|
515
515
|
return ((r = (u = g.membership) == null ? void 0 : u.design) == null ? void 0 : r.filter((b) => b.image)) || [];
|
|
516
516
|
}), p = y(!1);
|
|
@@ -518,24 +518,24 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
518
518
|
p.value = u;
|
|
519
519
|
}
|
|
520
520
|
function I() {
|
|
521
|
-
|
|
521
|
+
x.value = !0;
|
|
522
522
|
}
|
|
523
|
-
async function
|
|
523
|
+
async function _() {
|
|
524
524
|
await D(
|
|
525
525
|
async () => {
|
|
526
526
|
var b;
|
|
527
|
-
const u =
|
|
528
|
-
if (r.design = (r == null ? void 0 : r.design) || [],
|
|
529
|
-
const m =
|
|
530
|
-
ie.designPath(m,
|
|
531
|
-
|
|
527
|
+
const u = he(w.value), r = Ce.parse(u);
|
|
528
|
+
if (r.design = (r == null ? void 0 : r.design) || [], o.value) {
|
|
529
|
+
const m = Se().toHexString(), t = await ie.update(
|
|
530
|
+
ie.designPath(m, o.value),
|
|
531
|
+
o.value
|
|
532
532
|
);
|
|
533
533
|
(b = r.design) == null || b.push({
|
|
534
534
|
_id: m,
|
|
535
535
|
image: t
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
|
-
await L.update(r), await
|
|
538
|
+
await L.update(r), await n(), await B("success"), o.value = null, x.value = !1;
|
|
539
539
|
},
|
|
540
540
|
{
|
|
541
541
|
message: "Saving card design",
|
|
@@ -543,8 +543,8 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
543
543
|
}
|
|
544
544
|
);
|
|
545
545
|
}
|
|
546
|
-
async function
|
|
547
|
-
u ?
|
|
546
|
+
async function C(u, r) {
|
|
547
|
+
u ? o.value = u : r && M.open({
|
|
548
548
|
title: "Delete Design",
|
|
549
549
|
message: "Are you sure you want to delete this design?",
|
|
550
550
|
primaryActions: { text: "Delete", close: !0 },
|
|
@@ -552,18 +552,18 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
552
552
|
}).onPrimary(async () => {
|
|
553
553
|
var m, t;
|
|
554
554
|
const b = (m = w.value.design) == null ? void 0 : m.findIndex((l) => l._id == r);
|
|
555
|
-
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await
|
|
555
|
+
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await _();
|
|
556
556
|
}).onSecondary(() => {
|
|
557
557
|
M.close();
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
async function
|
|
560
|
+
async function n() {
|
|
561
561
|
await g.readMembership(), w.value = g.membership;
|
|
562
562
|
}
|
|
563
563
|
return j({
|
|
564
564
|
showSheet: A
|
|
565
565
|
}), X(async () => {
|
|
566
|
-
await
|
|
566
|
+
await n(), s.value.length || (x.value = !0);
|
|
567
567
|
}), (u, r) => {
|
|
568
568
|
const b = v("FmButton"), m = v("FmSideSheet");
|
|
569
569
|
return c(), F(m, {
|
|
@@ -576,9 +576,9 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
576
576
|
r[3] || (r[3] = (t) => p.value = t)
|
|
577
577
|
]
|
|
578
578
|
}, ge({
|
|
579
|
-
default:
|
|
580
|
-
e(
|
|
581
|
-
(c(!0), $(z, null, H(e(
|
|
579
|
+
default: h(() => [
|
|
580
|
+
e(x) ? k("", !0) : (c(), $("div", Ze, [
|
|
581
|
+
(c(!0), $(z, null, H(e(s), (t) => (c(), F(ue, {
|
|
582
582
|
key: String(t._id),
|
|
583
583
|
"image-fit": "cover",
|
|
584
584
|
label: "",
|
|
@@ -589,51 +589,51 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
589
589
|
file: void 0,
|
|
590
590
|
"delete-button": !1
|
|
591
591
|
}, {
|
|
592
|
-
"delete-button":
|
|
592
|
+
"delete-button": h(() => [
|
|
593
593
|
i(b, {
|
|
594
594
|
class: "!text-neutral-50 !bg-neutral-700",
|
|
595
595
|
icon: "delete",
|
|
596
596
|
variant: "tertiary",
|
|
597
|
-
onClick: (l) =>
|
|
597
|
+
onClick: (l) => C(null, t._id)
|
|
598
598
|
}, null, 8, ["onClick"])
|
|
599
599
|
]),
|
|
600
600
|
_: 2
|
|
601
601
|
}, 1032, ["thumbnail"]))), 128))
|
|
602
602
|
])),
|
|
603
|
-
e(
|
|
603
|
+
e(x) ? (c(), F(ue, {
|
|
604
604
|
key: 1,
|
|
605
605
|
"image-fit": "cover",
|
|
606
606
|
label: "",
|
|
607
607
|
"aspect-ratio": "16/9",
|
|
608
608
|
accept: ".png, .jpg, .jpeg, .gif",
|
|
609
609
|
"recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
|
|
610
|
-
"onUpdate:file":
|
|
610
|
+
"onUpdate:file": C
|
|
611
611
|
})) : k("", !0)
|
|
612
612
|
]),
|
|
613
613
|
_: 2
|
|
614
614
|
}, [
|
|
615
|
-
e(
|
|
615
|
+
e(x) ? {
|
|
616
616
|
name: "side-sheet-footer",
|
|
617
|
-
fn:
|
|
618
|
-
d("div",
|
|
617
|
+
fn: h(() => [
|
|
618
|
+
d("div", Je, [
|
|
619
619
|
i(b, {
|
|
620
620
|
label: "Save",
|
|
621
|
-
onClick:
|
|
622
|
-
disabled: !e(
|
|
621
|
+
onClick: _,
|
|
622
|
+
disabled: !e(o)
|
|
623
623
|
}, null, 8, ["disabled"]),
|
|
624
624
|
i(b, {
|
|
625
625
|
label: "Cancel",
|
|
626
626
|
type: "button",
|
|
627
627
|
variant: "tertiary",
|
|
628
|
-
onClick: r[1] || (r[1] = (t) =>
|
|
628
|
+
onClick: r[1] || (r[1] = (t) => x.value = !1)
|
|
629
629
|
})
|
|
630
630
|
])
|
|
631
631
|
]),
|
|
632
632
|
key: "1"
|
|
633
633
|
} : {
|
|
634
634
|
name: "side-sheet-footer",
|
|
635
|
-
fn:
|
|
636
|
-
d("div",
|
|
635
|
+
fn: h(() => [
|
|
636
|
+
d("div", Xe, [
|
|
637
637
|
i(b, {
|
|
638
638
|
label: "Add Design",
|
|
639
639
|
onClick: I
|
|
@@ -651,21 +651,18 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
651
651
|
]), 1032, ["modelValue"]);
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
-
}),
|
|
655
|
-
src: ve,
|
|
656
|
-
class: "aspect-square w-[150px]"
|
|
657
|
-
}, null, -1), ct = { class: "flex flex-col gap-16 text-center" }, pt = { class: "fm-typo-en-title-sm-800" }, ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "flex gap-x-8" }, Ot = /* @__PURE__ */ Z({
|
|
654
|
+
}), tt = { class: "flex items-center" }, lt = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, at = { class: "px-24 flex flex-col pb-24 gap-y-16" }, nt = { class: "flex items-center justify-end" }, ot = { class: "flex flex-col gap-16 text-center" }, st = { class: "fm-typo-en-title-sm-800" }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = { class: "flex gap-x-8" }, Rt = /* @__PURE__ */ Z({
|
|
658
655
|
__name: "Card",
|
|
659
656
|
setup(ee) {
|
|
660
|
-
const { minor: j, global: T } = J, D = y(), g = y(), M = y(),
|
|
657
|
+
const { minor: j, global: T } = J, D = y(), g = y(), M = y(), x = we(), w = W(), { t: o } = Be(), B = E(
|
|
661
658
|
() => w.sortedStoreCategories.flatMap((t) => t.bundles)
|
|
662
|
-
),
|
|
659
|
+
), s = [
|
|
663
660
|
{
|
|
664
|
-
header:
|
|
661
|
+
header: o("connect.loyalty.card.table.card_number"),
|
|
665
662
|
accessorFn: (t) => t.serialNumber
|
|
666
663
|
},
|
|
667
664
|
{
|
|
668
|
-
header:
|
|
665
|
+
header: o("connect.loyalty.card.table.redeemed_by"),
|
|
669
666
|
accessorKey: "user",
|
|
670
667
|
enableSorting: !1,
|
|
671
668
|
cell(t) {
|
|
@@ -687,7 +684,7 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
687
684
|
}
|
|
688
685
|
},
|
|
689
686
|
{
|
|
690
|
-
header:
|
|
687
|
+
header: o("connect.loyalty.card.table.phone"),
|
|
691
688
|
accessorFn: (t) => {
|
|
692
689
|
var l;
|
|
693
690
|
return ((l = t.pf_member) == null ? void 0 : l.phoneNumber) || "-";
|
|
@@ -695,24 +692,24 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
695
692
|
accessorKey: "pf_member.phoneNumber"
|
|
696
693
|
},
|
|
697
694
|
{
|
|
698
|
-
header:
|
|
695
|
+
header: o("connect.loyalty.card.table.created_at"),
|
|
699
696
|
accessorKey: "_id",
|
|
700
697
|
accessorFn: (t) => oe(Ue(t._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
701
698
|
},
|
|
702
699
|
{
|
|
703
|
-
header:
|
|
700
|
+
header: o("connect.loyalty.card.table.bundle"),
|
|
704
701
|
accessorFn: (t) => {
|
|
705
702
|
var l;
|
|
706
703
|
return ((l = B.value.find((V) => V._id === t.bundle)) == null ? void 0 : l.name) || "-";
|
|
707
704
|
}
|
|
708
705
|
},
|
|
709
706
|
{
|
|
710
|
-
header:
|
|
707
|
+
header: o("connect.loyalty.card.table.redeemed_at"),
|
|
711
708
|
accessorKey: "redeemedAt",
|
|
712
709
|
accessorFn: (t) => t.redeemedAt ? oe(t.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
713
710
|
},
|
|
714
711
|
{
|
|
715
|
-
header:
|
|
712
|
+
header: o("connect.loyalty.card.table.actions"),
|
|
716
713
|
cell(t) {
|
|
717
714
|
return K(se.FmButton, {
|
|
718
715
|
variant: "tertiary",
|
|
@@ -725,19 +722,19 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
725
722
|
});
|
|
726
723
|
}
|
|
727
724
|
}
|
|
728
|
-
], { tableMeta: p, rowData: A, onSort: I, debouncedFetchData:
|
|
729
|
-
async function
|
|
725
|
+
], { tableMeta: p, rowData: A, onSort: I, debouncedFetchData: _, onSearch: C } = $e(L.readCards);
|
|
726
|
+
async function n(t) {
|
|
730
727
|
var l;
|
|
731
|
-
await
|
|
728
|
+
await _(t), (l = D.value) == null || l.showSheet(!1);
|
|
732
729
|
}
|
|
733
|
-
const u = E(() =>
|
|
730
|
+
const u = E(() => x.isPremium ? [
|
|
734
731
|
{
|
|
735
|
-
label:
|
|
732
|
+
label: o("connect.loyalty.card.actions.create"),
|
|
736
733
|
value: "create",
|
|
737
734
|
isPrimary: !0
|
|
738
735
|
},
|
|
739
736
|
{
|
|
740
|
-
label:
|
|
737
|
+
label: o("connect.loyalty.card.actions.manage_design"),
|
|
741
738
|
value: "design",
|
|
742
739
|
isPrimary: !0
|
|
743
740
|
}
|
|
@@ -747,7 +744,7 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
747
744
|
`Are you sure you want to remove card ${t.serialNumber}?`
|
|
748
745
|
) && await j(
|
|
749
746
|
async () => {
|
|
750
|
-
await L.deleteCard(t._id.toString()), await
|
|
747
|
+
await L.deleteCard(t._id.toString()), await _({ pageSize: 10, pageIndex: 0 });
|
|
751
748
|
},
|
|
752
749
|
{
|
|
753
750
|
message: `Removing card ${t.serialNumber}`,
|
|
@@ -774,29 +771,29 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
774
771
|
const m = (t) => {
|
|
775
772
|
var l;
|
|
776
773
|
if (t.redeemedAt) {
|
|
777
|
-
|
|
774
|
+
xe.error("Update not permitted", 2e3);
|
|
778
775
|
return;
|
|
779
776
|
}
|
|
780
777
|
(l = g == null ? void 0 : g.value) == null || l.showSheet(!0, t);
|
|
781
778
|
};
|
|
782
779
|
return X(async () => {
|
|
783
780
|
await T(async () => {
|
|
784
|
-
await
|
|
781
|
+
await x.readPremium(), await w.readMemberStore(), await w.readMembership(), await n();
|
|
785
782
|
});
|
|
786
783
|
}), (t, l) => {
|
|
787
784
|
const V = v("FmPill"), U = v("FmPageHead"), f = v("FmSearch"), N = v("FmButton"), q = v("FmCard");
|
|
788
785
|
return c(), $(z, null, [
|
|
789
786
|
i(U, {
|
|
790
|
-
title: e(
|
|
787
|
+
title: e(o)("connect.loyalty.card.title"),
|
|
791
788
|
actions: e(u),
|
|
792
|
-
"onClick:action": l[0] || (l[0] = (
|
|
789
|
+
"onClick:action": l[0] || (l[0] = (S) => {
|
|
793
790
|
var P, O;
|
|
794
|
-
console.log(
|
|
791
|
+
console.log(S), S === "design" && ((P = e(M)) == null || P.showSheet(!0)), S === "create" && ((O = e(D)) == null || O.showSheet(!0));
|
|
795
792
|
})
|
|
796
793
|
}, {
|
|
797
|
-
title:
|
|
798
|
-
d("div",
|
|
799
|
-
d("span",
|
|
794
|
+
title: h(() => [
|
|
795
|
+
d("div", tt, [
|
|
796
|
+
d("span", lt, te(e(o)("connect.loyalty.card.title")), 1),
|
|
800
797
|
i(V, {
|
|
801
798
|
class: "ml-8",
|
|
802
799
|
variant: "premium"
|
|
@@ -805,15 +802,15 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
805
802
|
]),
|
|
806
803
|
_: 1
|
|
807
804
|
}, 8, ["title", "actions"]),
|
|
808
|
-
d("div",
|
|
805
|
+
d("div", at, [
|
|
809
806
|
e(A).length > 0 || e(A).length <= 0 && e(p).searchValue || e(p).pageCount > 0 ? (c(), $(z, { key: 0 }, [
|
|
810
|
-
d("div",
|
|
807
|
+
d("div", nt, [
|
|
811
808
|
i(f, {
|
|
812
809
|
class: "mt-4",
|
|
813
810
|
modelValue: e(p).searchValue,
|
|
814
811
|
"onUpdate:modelValue": [
|
|
815
|
-
l[1] || (l[1] = (
|
|
816
|
-
e(
|
|
812
|
+
l[1] || (l[1] = (S) => e(p).searchValue = S),
|
|
813
|
+
e(C)
|
|
817
814
|
],
|
|
818
815
|
placeholder: "Search",
|
|
819
816
|
collapsible: ""
|
|
@@ -828,20 +825,20 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
828
825
|
loading: e(p).isLoading,
|
|
829
826
|
"row-data": e(A),
|
|
830
827
|
"row-count": e(p).totalRows,
|
|
831
|
-
"column-defs":
|
|
828
|
+
"column-defs": s,
|
|
832
829
|
"shrink-at": !1,
|
|
833
830
|
"page-count": e(p).pageCount,
|
|
834
831
|
"page-index": e(p).pageIndex,
|
|
835
832
|
"page-size": e(p).pageSize,
|
|
836
833
|
onSortChange: e(I),
|
|
837
|
-
onPageChange: l[2] || (l[2] = (
|
|
838
|
-
e(
|
|
839
|
-
pageSize:
|
|
840
|
-
pageIndex:
|
|
834
|
+
onPageChange: l[2] || (l[2] = (S) => {
|
|
835
|
+
e(_)({
|
|
836
|
+
pageSize: S.pageSize,
|
|
837
|
+
pageIndex: S.pageIndex
|
|
841
838
|
});
|
|
842
839
|
}),
|
|
843
|
-
onRowClick: l[3] || (l[3] = (
|
|
844
|
-
m(e(
|
|
840
|
+
onRowClick: l[3] || (l[3] = (S) => {
|
|
841
|
+
m(e(_e)(S.original));
|
|
845
842
|
})
|
|
846
843
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
|
|
847
844
|
], 64)) : (c(), F(q, {
|
|
@@ -849,53 +846,56 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
849
846
|
variant: "outlined",
|
|
850
847
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
851
848
|
}, {
|
|
852
|
-
default:
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
849
|
+
default: h(() => [
|
|
850
|
+
l[8] || (l[8] = d("img", {
|
|
851
|
+
src: ve,
|
|
852
|
+
class: "aspect-square w-[150px]"
|
|
853
|
+
}, null, -1)),
|
|
854
|
+
d("div", ot, [
|
|
855
|
+
d("div", st, te(e(o)("connect.loyalty.card.empty_state.title")), 1),
|
|
856
|
+
d("div", it, te(e(o)("connect.loyalty.card.empty_state.description")), 1)
|
|
857
857
|
]),
|
|
858
|
-
d("div",
|
|
858
|
+
d("div", rt, [
|
|
859
859
|
i(N, {
|
|
860
860
|
variant: "primary",
|
|
861
|
-
label: e(
|
|
861
|
+
label: e(o)("connect.loyalty.card.actions.add"),
|
|
862
862
|
icon: "add",
|
|
863
|
-
disabled: !e(
|
|
863
|
+
disabled: !e(x).isPremium,
|
|
864
864
|
onClick: l[4] || (l[4] = () => {
|
|
865
|
-
var
|
|
866
|
-
return (
|
|
865
|
+
var S;
|
|
866
|
+
return (S = e(D)) == null ? void 0 : S.showSheet(!0);
|
|
867
867
|
})
|
|
868
868
|
}, null, 8, ["label", "disabled"]),
|
|
869
869
|
i(N, {
|
|
870
870
|
variant: "secondary",
|
|
871
|
-
label: e(
|
|
872
|
-
disabled: !e(
|
|
871
|
+
label: e(o)("connect.loyalty.card.actions.manage_design"),
|
|
872
|
+
disabled: !e(x).isPremium,
|
|
873
873
|
onClick: l[5] || (l[5] = () => {
|
|
874
|
-
var
|
|
875
|
-
return (
|
|
874
|
+
var S;
|
|
875
|
+
return (S = e(M)) == null ? void 0 : S.showSheet(!0);
|
|
876
876
|
})
|
|
877
877
|
}, null, 8, ["label", "disabled"])
|
|
878
878
|
])
|
|
879
879
|
]),
|
|
880
880
|
_: 1
|
|
881
881
|
})),
|
|
882
|
-
i(
|
|
882
|
+
i(je, {
|
|
883
883
|
ref_key: "sheetRef",
|
|
884
884
|
ref: D,
|
|
885
|
-
onSuccess: l[6] || (l[6] = (
|
|
885
|
+
onSuccess: l[6] || (l[6] = (S) => n()),
|
|
886
886
|
onExport: b
|
|
887
887
|
}, null, 512),
|
|
888
|
-
i(
|
|
888
|
+
i(et, {
|
|
889
889
|
ref_key: "designSheetRef",
|
|
890
890
|
ref: M,
|
|
891
|
-
onSuccess:
|
|
891
|
+
onSuccess: n
|
|
892
892
|
}, null, 512),
|
|
893
|
-
i(
|
|
893
|
+
i(Qe, {
|
|
894
894
|
ref_key: "editSheetRef",
|
|
895
895
|
ref: g,
|
|
896
|
-
onSuccess: l[7] || (l[7] = (
|
|
896
|
+
onSuccess: l[7] || (l[7] = (S) => {
|
|
897
897
|
var P;
|
|
898
|
-
|
|
898
|
+
n({
|
|
899
899
|
pageSize: e(p).pageSize,
|
|
900
900
|
pageIndex: e(p).pageIndex
|
|
901
901
|
}), (P = e(g)) == null || P.showSheet(!1);
|
|
@@ -907,5 +907,5 @@ const Ae = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
907
907
|
}
|
|
908
908
|
});
|
|
909
909
|
export {
|
|
910
|
-
|
|
910
|
+
Rt as default
|
|
911
911
|
};
|