@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.38-beta.21
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-BjSfI2Ff.js → Analytic-CEd_WApy.js} +14 -14
- package/dist/{App-D11A2JY1.js → App-ulCtuU5o.js} +671 -661
- package/dist/{AuditLogs-DWCFYoRg.js → AuditLogs-BM1Np61K.js} +11 -11
- package/dist/{Bin-9wV4Ah3M.js → Bin-icbjnKXw.js} +9 -9
- package/dist/{Broadcast-I3BtSk8V.js → Broadcast-COQ3E8vI.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BbXEYOFK.js} +6 -6
- package/dist/{Card-CqALG5RM.js → Card-Cwh3GXi0.js} +142 -136
- package/dist/{Collections-rg3SzoUb.js → Collections-EuOjzpkL.js} +81 -75
- package/dist/{Credit-BNn1sYZv.js → Credit-BY2Fpdhh.js} +9 -9
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BbsLgUMQ.js} +678 -675
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-BLw3-hI1.js} +6 -6
- package/dist/{Experience-D_Qm8SUj.js → Experience-rAH7zk71.js} +9 -9
- package/dist/{Game-CKXgXm6Q.js → Game-DlI0yNF0.js} +10 -10
- package/dist/{Index-D4DGfUHd.js → Index-DemXFS3d.js} +10 -10
- package/dist/{Marketing-Dn9A1vgH.js → Marketing-shNBO9Rc.js} +7 -7
- package/dist/{Member-B55vWHDd.js → Member-C19ZgpaL.js} +10 -10
- package/dist/{MemberList-BWTG9Ohy.js → MemberList-B2tNB4yg.js} +27 -27
- package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-BN3qaTVY.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js → MessageInput.vue_vue_type_script_setup_true_lang-BY3j1h72.js} +5621 -5418
- package/dist/{Mission-CFvhROuB.js → Mission-j1KI0-hJ.js} +10 -10
- package/dist/{Overview-4273yNwL.js → Overview-BN2Vdu8Q.js} +18 -18
- package/dist/{Point-B_-_C919.js → Point-8zy7QcTk.js} +9 -9
- package/dist/{Promotion-D2S3COxk.js → Promotion-mcUcylXB.js} +10 -10
- package/dist/{Queue-BmS1Oi-C.js → Queue-BsNv4P8u.js} +11 -11
- package/dist/{Record-DRBl0M8g.js → Record-VA6Bdlnz.js} +9 -9
- package/dist/{Reward-8056NmfK.js → Reward-CVyO3Ga1.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-BR9_a9bJ.js} +11 -11
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dhs2whAH.js +1763 -0
- package/dist/{Segment-Bzq-pyhc.js → Segment-BMgcdIIS.js} +209 -209
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-CKRpWcn_.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DZCNcdVW.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BESF672g.js} +3 -3
- package/dist/{Setting-BrJfYoru.js → Setting-BMKKkZTD.js} +457 -442
- package/dist/{Store-Bpl_4yZW.js → Store-DdxMDtfL.js} +466 -459
- package/dist/{StoreRewards-Cu7n7Pjz.js → StoreRewards-CRyeHEMF.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DS6-9WP9.js} +207 -221
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BTKpclKX.js} +1 -1
- package/dist/{Tier-_LnXg3n6.js → Tier-D5Xmp5vV.js} +229 -226
- package/dist/{Title-B7AGStvx.js → Title-CsK2crqD.js} +141 -138
- package/dist/{Transaction-Chxv6V7u.js → Transaction-Dvfc9x4f.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CqCxWltm.js} +6 -6
- package/dist/{Voucher-C5z2kOq9.js → Voucher-CPN7TMho.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DMye9MS3.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CnaQAEKo.js} +1 -1
- package/dist/{app-BVojNX0w.js → app-DRBevJsF.js} +1 -1
- package/dist/{app-7cvPyHJ7.js → app-DteFjR9L.js} +459 -449
- package/dist/app.js +1 -1
- package/dist/{business-CmxV69wT.js → business-BqV9jK-p.js} +1 -1
- package/dist/{campaign-CT_cNJEL.js → campaign-BHDq-yx-.js} +10 -10
- package/dist/{campaign-Dq5C_no-.js → campaign-CsWoG6e_.js} +2 -2
- package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-Dfa96W5V.js} +1 -1
- package/dist/{campaign.fn-BYZgKDN7.js → campaign.fn-pLrwyHA_.js} +37 -37
- package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-BYTYWPsR.js} +1 -1
- package/dist/{collection.fn-CNZRdUgy.js → collection.fn-CYLIQJig.js} +2 -2
- package/dist/{dto-CT9zZbv9.js → dto-DBfDbpyb.js} +4 -4
- package/dist/{effect-FIlOEC4H.js → effect-D9pD5RCk.js} +1 -1
- package/dist/{email-addresses-Ba7xImfX.js → email-addresses-BApvdLkQ.js} +1 -1
- package/dist/{export-uzjZFNF9.js → export--EfmCiw0.js} +4 -4
- package/dist/{helper-D4sAZde0.js → helper-BHiK3pLT.js} +1 -1
- package/dist/{index-B9pl4zRZ.js → index-2dknXEFJ.js} +19 -9
- package/dist/{index-CNJLP3D5.js → index-B9_Tn8si.js} +1 -1
- package/dist/{index-BjU8LVUC.js → index-BSQXDDQY.js} +6347 -6305
- package/dist/{index-CwsMG2cV.js → index-Bqc7PV3K.js} +1 -1
- package/dist/{index-CONvJfKv.js → index-C1Vrltkc.js} +1 -1
- package/dist/{index-D5rvMvzx.js → index-CD2bkLo_.js} +1 -1
- package/dist/{index-DNxa8Rqx.js → index-CDLBLuYq.js} +69 -68
- package/dist/{index-BXz54M1s.js → index-COiVJ9pA.js} +1 -1
- package/dist/{index-CH3z92VV.js → index-CVxruvVB.js} +1 -1
- package/dist/{index-CS3Jmojj.js → index-Cc80pBYX.js} +573 -573
- package/dist/{index-l2F5MnLF.js → index-DXM3o6kl.js} +11 -4
- package/dist/{index-BI3m1Ehv.js → index-DYgdunxw.js} +3 -3
- package/dist/{index-CvBcve-r.js → index-Pd9RCQxn.js} +1 -1
- package/dist/{index-CUfS9Kp1.js → index-qd_dvZcw.js} +2 -2
- package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DAWS_ALH.js} +34 -34
- package/dist/{loading-BWGQSrCB.js → loading-BVUeda4s.js} +1 -1
- package/dist/{membership-Cc4OZ8-U.js → membership-BL_43RJR.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-D7p8nfun.js → money-Cd8hLiNc.js} +1 -1
- package/dist/{number-CMJjC4qz.js → number-DVb8PSrj.js} +1 -1
- package/dist/objectid-D33s3gxp.js +145 -0
- package/dist/{plugins-eQis66QR.js → plugins-BKtBkC9Q.js} +2 -2
- package/dist/{reward-DrnzbG20.js → reward-f41dJcaL.js} +1 -1
- package/dist/{rule-CtRxkYXB.js → rule-Cbux1-fC.js} +4 -4
- package/dist/rule-builder-BrZeF45Z.js +91 -0
- package/dist/style.css +4 -1
- package/dist/{template-C3UfY0v5.js → template-tqhgmIdT.js} +4 -4
- package/dist/timezone-DaTVH4y0.js +1150 -0
- package/dist/{trigger-C9U7Zgad.js → trigger-C34RfwrT.js} +4 -4
- package/dist/{user-D7n9yYmO.js → user-DgKhDLYr.js} +1 -1
- package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-xo56wiwi.js} +410 -410
- package/dist/{xlsx-D4S4qbcZ.js → xlsx-D8ZZRjtf.js} +1 -1
- package/package.json +3 -2
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js +0 -1728
- package/dist/objectid-D5T27iny.js +0 -145
- package/dist/rule-builder-Di9RIYHF.js +0 -89
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as y, computed as E, watch 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
|
|
4
|
-
import { useDialog as ye, components as
|
|
5
|
-
import "./index-
|
|
6
|
-
import { u as J } from "./loading-
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as W } from "./membership-
|
|
3
|
+
import { h as oe } from "./moment-D7p2TMB-.js";
|
|
4
|
+
import { useDialog as ye, components as se } from "@feedmepos/ui-library";
|
|
5
|
+
import "./index-Cc80pBYX.js";
|
|
6
|
+
import { u as J } from "./loading-BVUeda4s.js";
|
|
7
|
+
import { u as ce } from "./app-wDQR6dpb.js";
|
|
8
|
+
import { u as W } from "./membership-BL_43RJR.js";
|
|
9
9
|
import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
|
|
10
|
-
import { p as
|
|
11
|
-
import { m as L } from "./index-
|
|
12
|
-
import { z as
|
|
13
|
-
import { Z as
|
|
14
|
-
import { _ as
|
|
15
|
-
import "./index-
|
|
16
|
-
import { k as Ce } from "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { O as Se } from "./objectid-
|
|
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
|
|
10
|
+
import { p as pe, f as ie, n as xe } from "./plugins-BKtBkC9Q.js";
|
|
11
|
+
import { m as L } from "./index-DXM3o6kl.js";
|
|
12
|
+
import { z as re } from "./app-DteFjR9L.js";
|
|
13
|
+
import { Z as de } from "./zod-Bg2FbC-D.js";
|
|
14
|
+
import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
15
|
+
import "./index-2dknXEFJ.js";
|
|
16
|
+
import { k as Ce } from "./index-CDLBLuYq.js";
|
|
17
|
+
import "./index-qd_dvZcw.js";
|
|
18
|
+
import "./index-C1Vrltkc.js";
|
|
19
|
+
import "./index-DYgdunxw.js";
|
|
20
|
+
import { O as Se } from "./objectid-D33s3gxp.js";
|
|
21
|
+
import { a as he, c as _e } from "./object-qECH92oz.js";
|
|
22
|
+
import { u as we } from "./business-BqV9jK-p.js";
|
|
23
|
+
import { w as ke } from "./xlsx-D8ZZRjtf.js";
|
|
24
|
+
import { a as Fe, C as Ve } from "./export--EfmCiw0.js";
|
|
25
25
|
import { u as $e, _ as Me } from "./usePagination-BeF5K3M7.js";
|
|
26
|
-
import { u as Be } from "./vue-i18n-
|
|
26
|
+
import { u as Be } from "./vue-i18n-xo56wiwi.js";
|
|
27
27
|
import { o as Ue } from "./objectId-dwaoBfJX.js";
|
|
28
|
-
const
|
|
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:
|
|
36
|
-
function B(
|
|
37
|
-
o.value =
|
|
35
|
+
const { minor: D } = J, g = W(), M = y(), x = y(!1), w = T, o = y(!1);
|
|
36
|
+
function B(m) {
|
|
37
|
+
o.value = m, m && (s.value = {
|
|
38
38
|
quantity: 1,
|
|
39
39
|
code: "",
|
|
40
40
|
codeConfig: {
|
|
41
|
-
length:
|
|
41
|
+
length: 16,
|
|
42
42
|
charset: "1234567890",
|
|
43
43
|
prefix: "",
|
|
44
44
|
suffix: "",
|
|
@@ -50,7 +50,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
50
50
|
quantity: 1,
|
|
51
51
|
code: "",
|
|
52
52
|
codeConfig: {
|
|
53
|
-
length:
|
|
53
|
+
length: 16,
|
|
54
54
|
charset: "1234567890",
|
|
55
55
|
prefix: "",
|
|
56
56
|
suffix: "",
|
|
@@ -69,7 +69,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
69
69
|
value: "single",
|
|
70
70
|
sublabel: "Enter your own custom number"
|
|
71
71
|
}
|
|
72
|
-
],
|
|
72
|
+
], A = [
|
|
73
73
|
{
|
|
74
74
|
label: "Alphanumeric",
|
|
75
75
|
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
@@ -82,27 +82,27 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
82
82
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
83
83
|
{ label: "Numbers", value: "0123456789" },
|
|
84
84
|
{ label: "Custom", value: "" }
|
|
85
|
-
], I = y(
|
|
85
|
+
], I = y(A[0].value), _ = y("bulk"), C = y(0), n = E(
|
|
86
86
|
() => {
|
|
87
|
-
var
|
|
88
|
-
return (
|
|
87
|
+
var m;
|
|
88
|
+
return (m = g.membership.design) == null ? void 0 : m[C.value];
|
|
89
89
|
}
|
|
90
90
|
), u = y(!1), r = E(
|
|
91
|
-
() => g.sortedStoreCategories.flatMap((
|
|
91
|
+
() => g.sortedStoreCategories.flatMap((m) => m.bundles)
|
|
92
92
|
);
|
|
93
|
-
async function b(
|
|
93
|
+
async function b(m) {
|
|
94
94
|
var l, V;
|
|
95
95
|
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !x.value) return;
|
|
96
|
-
|
|
97
|
-
const t = await
|
|
96
|
+
m.design = (V = n.value) == null ? void 0 : V.image;
|
|
97
|
+
const t = await pe.confirm(
|
|
98
98
|
"",
|
|
99
99
|
"Do you want to export generated card(s)?",
|
|
100
100
|
"Export",
|
|
101
101
|
"Generate and without export"
|
|
102
102
|
);
|
|
103
|
-
console.log(t), await
|
|
103
|
+
console.log(t), await D(
|
|
104
104
|
async () => {
|
|
105
|
-
const U = await L.createCards(
|
|
105
|
+
const U = await L.createCards(m);
|
|
106
106
|
console.log(U), await w("success"), t && await w("export", U);
|
|
107
107
|
},
|
|
108
108
|
{
|
|
@@ -113,16 +113,21 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
113
113
|
}
|
|
114
114
|
return j({
|
|
115
115
|
showSheet: B
|
|
116
|
-
}),
|
|
116
|
+
}), ne(
|
|
117
117
|
() => s.value.codeConfig.length,
|
|
118
|
-
(
|
|
119
|
-
|
|
118
|
+
(m, t) => {
|
|
119
|
+
m != t && (s.value.codeConfig.pattern = "#".repeat(Number(m)));
|
|
120
|
+
}
|
|
121
|
+
), ne(
|
|
122
|
+
() => s.value.codeConfig.pattern,
|
|
123
|
+
(m, t) => {
|
|
124
|
+
m != t && (s.value.codeConfig.length = (s.value.codeConfig.pattern.match(/#/g) || []).length);
|
|
120
125
|
}
|
|
121
126
|
), X(async () => {
|
|
122
127
|
await g.readMemberStore();
|
|
123
|
-
}), (
|
|
124
|
-
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"),
|
|
125
|
-
return
|
|
128
|
+
}), (m, t) => {
|
|
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
|
+
return c(), F(fe, {
|
|
126
131
|
"max-width": 560,
|
|
127
132
|
"dismiss-away": !0,
|
|
128
133
|
header: "Create collection",
|
|
@@ -132,12 +137,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
132
137
|
t[20] || (t[20] = (R) => o.value = R)
|
|
133
138
|
]
|
|
134
139
|
}, {
|
|
135
|
-
"side-sheet-footer":
|
|
140
|
+
"side-sheet-footer": h(() => [
|
|
136
141
|
d("div", Ee, [
|
|
137
142
|
i(P, {
|
|
138
143
|
label: "Save",
|
|
139
144
|
onClick: t[17] || (t[17] = (R) => b(e(s))),
|
|
140
|
-
loading: e(
|
|
145
|
+
loading: e(ce)().isLoading
|
|
141
146
|
}, null, 8, ["loading"]),
|
|
142
147
|
i(P, {
|
|
143
148
|
label: "Cancel",
|
|
@@ -147,7 +152,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
147
152
|
})
|
|
148
153
|
])
|
|
149
154
|
]),
|
|
150
|
-
default:
|
|
155
|
+
default: h(() => [
|
|
151
156
|
i(O, {
|
|
152
157
|
ref_key: "form",
|
|
153
158
|
ref: M,
|
|
@@ -155,18 +160,18 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
155
160
|
onValidationSuccess: t[15] || (t[15] = (R) => x.value = !0),
|
|
156
161
|
onValidationFailed: t[16] || (t[16] = (R) => x.value = !1)
|
|
157
162
|
}, {
|
|
158
|
-
default:
|
|
163
|
+
default: h(() => {
|
|
159
164
|
var R, le, ae;
|
|
160
165
|
return [
|
|
161
166
|
d("div", null, [
|
|
162
167
|
t[21] || (t[21] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1)),
|
|
163
168
|
i(V, {
|
|
164
|
-
modelValue: e(
|
|
165
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(
|
|
169
|
+
modelValue: e(_),
|
|
170
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(_) ? _.value = a : null),
|
|
166
171
|
inline: !1
|
|
167
172
|
}, {
|
|
168
|
-
default:
|
|
169
|
-
(
|
|
173
|
+
default: h(() => [
|
|
174
|
+
(c(), $(z, null, H(p, (a) => i(l, {
|
|
170
175
|
key: a.value,
|
|
171
176
|
value: a.value,
|
|
172
177
|
label: a.label,
|
|
@@ -176,9 +181,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
176
181
|
_: 1
|
|
177
182
|
}, 8, ["modelValue"])
|
|
178
183
|
]),
|
|
179
|
-
d("div",
|
|
184
|
+
d("div", Ae, [
|
|
180
185
|
t[22] || (t[22] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1)),
|
|
181
|
-
e(
|
|
186
|
+
e(_) === "bulk" ? (c(), $(z, { key: 0 }, [
|
|
182
187
|
i(U, {
|
|
183
188
|
"model-value": e(u),
|
|
184
189
|
"label-placement": "right",
|
|
@@ -187,7 +192,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
187
192
|
required: !0,
|
|
188
193
|
"onUpdate:modelValue": t[1] || (t[1] = () => u.value = !e(u))
|
|
189
194
|
}, null, 8, ["model-value"]),
|
|
190
|
-
e(u) ? (
|
|
195
|
+
e(u) ? (c(), $(z, { key: 0 }, [
|
|
191
196
|
i(f, {
|
|
192
197
|
"model-value": e(s).codeConfig.length || null,
|
|
193
198
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => e(s).codeConfig.length = a),
|
|
@@ -198,20 +203,20 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
198
203
|
i(N, {
|
|
199
204
|
label: "Charset",
|
|
200
205
|
"model-value": e(I),
|
|
201
|
-
items:
|
|
206
|
+
items: A,
|
|
202
207
|
"helper-text": e(s).codeConfig.charset.length > 62 ? `${e(s).codeConfig.charset.substring(0, 62)}...` : e(s).codeConfig.charset,
|
|
203
208
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => {
|
|
204
209
|
I.value = a, e(s).codeConfig.charset = a;
|
|
205
210
|
})
|
|
206
211
|
}, null, 8, ["model-value", "helper-text"]),
|
|
207
|
-
e(I) === "" ? (
|
|
212
|
+
e(I) === "" ? (c(), F(q, {
|
|
208
213
|
key: 0,
|
|
209
214
|
modelValue: e(s).codeConfig.charset,
|
|
210
215
|
"onUpdate:modelValue": t[4] || (t[4] = (a) => e(s).codeConfig.charset = a),
|
|
211
216
|
label: "Custom Charset",
|
|
212
217
|
required: ""
|
|
213
218
|
}, null, 8, ["modelValue"])) : k("", !0),
|
|
214
|
-
d("div",
|
|
219
|
+
d("div", De, [
|
|
215
220
|
i(q, {
|
|
216
221
|
modelValue: e(s).codeConfig.prefix,
|
|
217
222
|
"onUpdate:modelValue": t[5] || (t[5] = (a) => e(s).codeConfig.prefix = a),
|
|
@@ -242,12 +247,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
242
247
|
"helper-text": `${e(s).quantity} card will be created`
|
|
243
248
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
244
249
|
], 64)) : k("", !0),
|
|
245
|
-
e(
|
|
250
|
+
e(_) !== "bulk" ? (c(), F(S, {
|
|
246
251
|
key: 1,
|
|
247
252
|
modelValue: e(s).code,
|
|
248
253
|
"onUpdate:modelValue": t[9] || (t[9] = (a) => e(s).code = a),
|
|
249
254
|
label: "Custom Card Number",
|
|
250
|
-
rules: [(a) => e(
|
|
255
|
+
rules: [(a) => e(_) != "single" || !!a || "Custom code is required"],
|
|
251
256
|
placeholder: "(For multiple numbers, please enter in the new row.)"
|
|
252
257
|
}, null, 8, ["modelValue", "rules"])) : k("", !0)
|
|
253
258
|
]),
|
|
@@ -256,6 +261,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
256
261
|
i(U, {
|
|
257
262
|
"label-placement": "right",
|
|
258
263
|
label: "Set card number on bind",
|
|
264
|
+
sublabel: "Automatically set the card number when the user binds the card",
|
|
259
265
|
"model-value": e(s).setCardOnBind || !1,
|
|
260
266
|
"onUpdate:modelValue": t[10] || (t[10] = (a) => e(s).setCardOnBind = a)
|
|
261
267
|
}, null, 8, ["model-value"]),
|
|
@@ -266,8 +272,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
266
272
|
modelValue: e(s).bundle,
|
|
267
273
|
"onUpdate:modelValue": t[12] || (t[12] = (a) => e(s).bundle = a)
|
|
268
274
|
}, {
|
|
269
|
-
append:
|
|
270
|
-
e(s).bundle ? (
|
|
275
|
+
append: h(() => [
|
|
276
|
+
e(s).bundle ? (c(), F(P, {
|
|
271
277
|
key: 0,
|
|
272
278
|
icon: "link_off",
|
|
273
279
|
variant: "plain",
|
|
@@ -276,7 +282,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
276
282
|
]),
|
|
277
283
|
_: 1
|
|
278
284
|
}, 8, ["items", "modelValue"]),
|
|
279
|
-
(le = (R = e(g).store) == null ? void 0 : R.stripe) != null && le.apiKey ? (
|
|
285
|
+
(le = (R = e(g).store) == null ? void 0 : R.stripe) != null && le.apiKey ? (c(), F(Q, {
|
|
280
286
|
key: 0,
|
|
281
287
|
label: "Linked subscription bundle",
|
|
282
288
|
placeholder: "Select bundle",
|
|
@@ -284,8 +290,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
284
290
|
modelValue: e(s).subscriptionBundle,
|
|
285
291
|
"onUpdate:modelValue": t[14] || (t[14] = (a) => e(s).subscriptionBundle = a)
|
|
286
292
|
}, {
|
|
287
|
-
append:
|
|
288
|
-
e(s).subscriptionBundle ? (
|
|
293
|
+
append: h(() => [
|
|
294
|
+
e(s).subscriptionBundle ? (c(), F(P, {
|
|
289
295
|
key: 0,
|
|
290
296
|
icon: "link_off",
|
|
291
297
|
variant: "plain",
|
|
@@ -295,7 +301,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
295
301
|
_: 1
|
|
296
302
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
297
303
|
]),
|
|
298
|
-
e(g).membership.design ? (
|
|
304
|
+
e(g).membership.design ? (c(), $("div", Ne, [
|
|
299
305
|
d("div", Pe, [
|
|
300
306
|
t[24] || (t[24] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
301
307
|
d("img", {
|
|
@@ -303,10 +309,10 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
303
309
|
class: "aspect-[16/9]"
|
|
304
310
|
}, null, 8, Re),
|
|
305
311
|
d("div", qe, [
|
|
306
|
-
(
|
|
312
|
+
(c(!0), $(z, null, H(e(g).membership.design, (a, Y) => (c(), $("img", {
|
|
307
313
|
src: a.image,
|
|
308
314
|
key: `image_${Y}`,
|
|
309
|
-
class:
|
|
315
|
+
class: me(["w-[112px] h-[63px] cursor-pointer", `${e(C) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
310
316
|
onClick: (dt) => C.value = Y,
|
|
311
317
|
alt: `ai_image_predict_${Y}`,
|
|
312
318
|
style: { objectFit: "cover" }
|
|
@@ -330,7 +336,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
330
336
|
__name: "EditCardSheet",
|
|
331
337
|
emits: ["success"],
|
|
332
338
|
setup(ee, { expose: j, emit: T }) {
|
|
333
|
-
const { minor:
|
|
339
|
+
const { minor: D } = J, g = W(), M = y(), x = y(!1), w = T, o = y({
|
|
334
340
|
_id: "",
|
|
335
341
|
business: "",
|
|
336
342
|
serialNumber: ""
|
|
@@ -341,7 +347,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
341
347
|
(r) => r.image === n.design
|
|
342
348
|
));
|
|
343
349
|
}
|
|
344
|
-
const p = y(0),
|
|
350
|
+
const p = y(0), A = E(
|
|
345
351
|
() => {
|
|
346
352
|
var C;
|
|
347
353
|
return (C = g.membership.design) == null ? void 0 : C[p.value];
|
|
@@ -351,9 +357,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
351
357
|
(C) => C.bundles
|
|
352
358
|
)
|
|
353
359
|
);
|
|
354
|
-
async function
|
|
360
|
+
async function _(C) {
|
|
355
361
|
var n, u;
|
|
356
|
-
await ((n = M.value) == null ? void 0 : n.validateInputs()), x.value && (C.design = (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(
|
|
357
363
|
async () => {
|
|
358
364
|
await L.updateCard(C), await w("success");
|
|
359
365
|
},
|
|
@@ -368,8 +374,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
368
374
|
}), X(async () => {
|
|
369
375
|
await g.readMemberStore();
|
|
370
376
|
}), (C, n) => {
|
|
371
|
-
const u = v("FmTextField"), r = v("FmSwitch"), b = v("FmButton"),
|
|
372
|
-
return
|
|
377
|
+
const u = v("FmTextField"), r = v("FmSwitch"), b = v("FmButton"), m = v("FmForm"), t = v("FmSideSheet");
|
|
378
|
+
return c(), F(t, {
|
|
373
379
|
"max-width": 560,
|
|
374
380
|
"dismiss-away": !0,
|
|
375
381
|
header: "Edit card",
|
|
@@ -379,13 +385,13 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
379
385
|
n[11] || (n[11] = (l) => B.value = l)
|
|
380
386
|
]
|
|
381
387
|
}, {
|
|
382
|
-
"side-sheet-footer":
|
|
388
|
+
"side-sheet-footer": h(() => [
|
|
383
389
|
d("div", He, [
|
|
384
390
|
i(b, {
|
|
385
391
|
label: "Save",
|
|
386
392
|
disabled: !!e(o).redeemedAt,
|
|
387
|
-
onClick: n[8] || (n[8] = (l) =>
|
|
388
|
-
loading: e(
|
|
393
|
+
onClick: n[8] || (n[8] = (l) => _(e(o))),
|
|
394
|
+
loading: e(ce)().isLoading
|
|
389
395
|
}, null, 8, ["disabled", "loading"]),
|
|
390
396
|
i(b, {
|
|
391
397
|
label: "Cancel",
|
|
@@ -395,15 +401,15 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
395
401
|
})
|
|
396
402
|
])
|
|
397
403
|
]),
|
|
398
|
-
default:
|
|
399
|
-
i(
|
|
404
|
+
default: h(() => [
|
|
405
|
+
i(m, {
|
|
400
406
|
ref_key: "form",
|
|
401
407
|
ref: M,
|
|
402
408
|
class: "space-y-40",
|
|
403
409
|
onValidationSuccess: n[6] || (n[6] = (l) => x.value = !0),
|
|
404
410
|
onValidationFailed: n[7] || (n[7] = (l) => x.value = !1)
|
|
405
411
|
}, {
|
|
406
|
-
default:
|
|
412
|
+
default: h(() => {
|
|
407
413
|
var l, V, U;
|
|
408
414
|
return [
|
|
409
415
|
d("div", Te, [
|
|
@@ -412,9 +418,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
412
418
|
"onUpdate:modelValue": n[0] || (n[0] = (f) => e(o).serialNumber = f),
|
|
413
419
|
label: "Card Number",
|
|
414
420
|
rules: [
|
|
415
|
-
e(
|
|
416
|
-
e(
|
|
417
|
-
e(
|
|
421
|
+
e(de).toRule(e(re).string().min(1, "Card number is required")),
|
|
422
|
+
e(de).toRule(
|
|
423
|
+
e(re).string().max(50, "Card number must be less than 50 characters")
|
|
418
424
|
)
|
|
419
425
|
],
|
|
420
426
|
required: !0
|
|
@@ -433,8 +439,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
433
439
|
modelValue: e(o).bundle,
|
|
434
440
|
"onUpdate:modelValue": n[3] || (n[3] = (f) => e(o).bundle = f)
|
|
435
441
|
}, {
|
|
436
|
-
append:
|
|
437
|
-
e(o).bundle ? (
|
|
442
|
+
append: h(() => [
|
|
443
|
+
e(o).bundle ? (c(), F(b, {
|
|
438
444
|
key: 0,
|
|
439
445
|
icon: "link_off",
|
|
440
446
|
variant: "plain",
|
|
@@ -443,7 +449,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
443
449
|
]),
|
|
444
450
|
_: 1
|
|
445
451
|
}, 8, ["items", "modelValue"]),
|
|
446
|
-
(V = (l = e(g).store) == null ? void 0 : l.stripe) != null && V.apiKey ? (
|
|
452
|
+
(V = (l = e(g).store) == null ? void 0 : l.stripe) != null && V.apiKey ? (c(), F(Q, {
|
|
447
453
|
key: 0,
|
|
448
454
|
label: "Linked subscription bundle",
|
|
449
455
|
placeholder: "Select bundle",
|
|
@@ -451,8 +457,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
451
457
|
modelValue: e(o).subscriptionBundle,
|
|
452
458
|
"onUpdate:modelValue": n[5] || (n[5] = (f) => e(o).subscriptionBundle = f)
|
|
453
459
|
}, {
|
|
454
|
-
append:
|
|
455
|
-
e(o).subscriptionBundle ? (
|
|
460
|
+
append: h(() => [
|
|
461
|
+
e(o).subscriptionBundle ? (c(), F(b, {
|
|
456
462
|
key: 0,
|
|
457
463
|
icon: "link_off",
|
|
458
464
|
variant: "plain",
|
|
@@ -462,18 +468,18 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
462
468
|
_: 1
|
|
463
469
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
464
470
|
]),
|
|
465
|
-
e(g).membership.design ? (
|
|
471
|
+
e(g).membership.design ? (c(), $("div", Le, [
|
|
466
472
|
d("div", Oe, [
|
|
467
473
|
n[13] || (n[13] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
468
474
|
d("img", {
|
|
469
|
-
src: (U = e(
|
|
475
|
+
src: (U = e(A)) == null ? void 0 : U.image,
|
|
470
476
|
class: "aspect-[16/9]"
|
|
471
477
|
}, null, 8, Ye),
|
|
472
478
|
d("div", Ke, [
|
|
473
|
-
(
|
|
479
|
+
(c(!0), $(z, null, H(e(g).membership.design, (f, N) => (c(), $("img", {
|
|
474
480
|
src: f.image,
|
|
475
481
|
key: `image_${N}`,
|
|
476
|
-
class:
|
|
482
|
+
class: me(["w-[112px] h-[63px] cursor-pointer", `${e(p) === N ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
477
483
|
onClick: (q) => p.value = N,
|
|
478
484
|
alt: `ai_image_predict_${N}`,
|
|
479
485
|
style: { objectFit: "cover" }
|
|
@@ -497,7 +503,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
497
503
|
__name: "CardDesignSheet",
|
|
498
504
|
emits: ["success"],
|
|
499
505
|
setup(ee, { expose: j, emit: T }) {
|
|
500
|
-
const { minor:
|
|
506
|
+
const { minor: D } = J, g = W(), M = ye(), x = y(!1);
|
|
501
507
|
y(), y(!1);
|
|
502
508
|
const w = y(), o = y(null);
|
|
503
509
|
E(() => {
|
|
@@ -508,24 +514,24 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
508
514
|
var u, r;
|
|
509
515
|
return ((r = (u = g.membership) == null ? void 0 : u.design) == null ? void 0 : r.filter((b) => b.image)) || [];
|
|
510
516
|
}), p = y(!1);
|
|
511
|
-
function
|
|
517
|
+
function A(u) {
|
|
512
518
|
p.value = u;
|
|
513
519
|
}
|
|
514
520
|
function I() {
|
|
515
521
|
x.value = !0;
|
|
516
522
|
}
|
|
517
|
-
async function
|
|
518
|
-
await
|
|
523
|
+
async function _() {
|
|
524
|
+
await D(
|
|
519
525
|
async () => {
|
|
520
526
|
var b;
|
|
521
|
-
const u =
|
|
527
|
+
const u = he(w.value), r = Ce.parse(u);
|
|
522
528
|
if (r.design = (r == null ? void 0 : r.design) || [], o.value) {
|
|
523
|
-
const
|
|
524
|
-
|
|
529
|
+
const m = Se().toHexString(), t = await ie.update(
|
|
530
|
+
ie.designPath(m, o.value),
|
|
525
531
|
o.value
|
|
526
532
|
);
|
|
527
533
|
(b = r.design) == null || b.push({
|
|
528
|
-
_id:
|
|
534
|
+
_id: m,
|
|
529
535
|
image: t
|
|
530
536
|
});
|
|
531
537
|
}
|
|
@@ -544,9 +550,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
544
550
|
primaryActions: { text: "Delete", close: !0 },
|
|
545
551
|
secondaryActions: { text: "Cancel", close: !1 }
|
|
546
552
|
}).onPrimary(async () => {
|
|
547
|
-
var
|
|
548
|
-
const b = (
|
|
549
|
-
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await
|
|
553
|
+
var m, t;
|
|
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 _();
|
|
550
556
|
}).onSecondary(() => {
|
|
551
557
|
M.close();
|
|
552
558
|
});
|
|
@@ -555,12 +561,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
555
561
|
await g.readMembership(), w.value = g.membership;
|
|
556
562
|
}
|
|
557
563
|
return j({
|
|
558
|
-
showSheet:
|
|
564
|
+
showSheet: A
|
|
559
565
|
}), X(async () => {
|
|
560
566
|
await n(), s.value.length || (x.value = !0);
|
|
561
567
|
}), (u, r) => {
|
|
562
|
-
const b = v("FmButton"),
|
|
563
|
-
return
|
|
568
|
+
const b = v("FmButton"), m = v("FmSideSheet");
|
|
569
|
+
return c(), F(m, {
|
|
564
570
|
"max-width": 560,
|
|
565
571
|
"dismiss-away": !0,
|
|
566
572
|
header: "Manage Design",
|
|
@@ -570,9 +576,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
570
576
|
r[3] || (r[3] = (t) => p.value = t)
|
|
571
577
|
]
|
|
572
578
|
}, ge({
|
|
573
|
-
default:
|
|
574
|
-
e(x) ? k("", !0) : (
|
|
575
|
-
(
|
|
579
|
+
default: h(() => [
|
|
580
|
+
e(x) ? k("", !0) : (c(), $("div", Ze, [
|
|
581
|
+
(c(!0), $(z, null, H(e(s), (t) => (c(), F(ue, {
|
|
576
582
|
key: String(t._id),
|
|
577
583
|
"image-fit": "cover",
|
|
578
584
|
label: "",
|
|
@@ -583,7 +589,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
583
589
|
file: void 0,
|
|
584
590
|
"delete-button": !1
|
|
585
591
|
}, {
|
|
586
|
-
"delete-button":
|
|
592
|
+
"delete-button": h(() => [
|
|
587
593
|
i(b, {
|
|
588
594
|
class: "!text-neutral-50 !bg-neutral-700",
|
|
589
595
|
icon: "delete",
|
|
@@ -594,7 +600,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
594
600
|
_: 2
|
|
595
601
|
}, 1032, ["thumbnail"]))), 128))
|
|
596
602
|
])),
|
|
597
|
-
e(x) ? (
|
|
603
|
+
e(x) ? (c(), F(ue, {
|
|
598
604
|
key: 1,
|
|
599
605
|
"image-fit": "cover",
|
|
600
606
|
label: "",
|
|
@@ -608,11 +614,11 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
608
614
|
}, [
|
|
609
615
|
e(x) ? {
|
|
610
616
|
name: "side-sheet-footer",
|
|
611
|
-
fn:
|
|
617
|
+
fn: h(() => [
|
|
612
618
|
d("div", Je, [
|
|
613
619
|
i(b, {
|
|
614
620
|
label: "Save",
|
|
615
|
-
onClick:
|
|
621
|
+
onClick: _,
|
|
616
622
|
disabled: !e(o)
|
|
617
623
|
}, null, 8, ["disabled"]),
|
|
618
624
|
i(b, {
|
|
@@ -626,7 +632,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
626
632
|
key: "1"
|
|
627
633
|
} : {
|
|
628
634
|
name: "side-sheet-footer",
|
|
629
|
-
fn:
|
|
635
|
+
fn: h(() => [
|
|
630
636
|
d("div", Xe, [
|
|
631
637
|
i(b, {
|
|
632
638
|
label: "Add Design",
|
|
@@ -648,7 +654,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
648
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({
|
|
649
655
|
__name: "Card",
|
|
650
656
|
setup(ee) {
|
|
651
|
-
const { minor: j, global: T } = J,
|
|
657
|
+
const { minor: j, global: T } = J, D = y(), g = y(), M = y(), x = we(), w = W(), { t: o } = Be(), B = E(
|
|
652
658
|
() => w.sortedStoreCategories.flatMap((t) => t.bundles)
|
|
653
659
|
), s = [
|
|
654
660
|
{
|
|
@@ -667,7 +673,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
667
673
|
class: "flex items-center gap-x-8"
|
|
668
674
|
},
|
|
669
675
|
[
|
|
670
|
-
K(
|
|
676
|
+
K(se.FmAvatar, {
|
|
671
677
|
name: l != null && l.photoUrl || l == null ? void 0 : l.name,
|
|
672
678
|
src: (l == null ? void 0 : l.photoUrl) ?? void 0,
|
|
673
679
|
size: "sm"
|
|
@@ -688,7 +694,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
688
694
|
{
|
|
689
695
|
header: o("connect.loyalty.card.table.created_at"),
|
|
690
696
|
accessorKey: "_id",
|
|
691
|
-
accessorFn: (t) =>
|
|
697
|
+
accessorFn: (t) => oe(Ue(t._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
692
698
|
},
|
|
693
699
|
{
|
|
694
700
|
header: o("connect.loyalty.card.table.bundle"),
|
|
@@ -700,12 +706,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
700
706
|
{
|
|
701
707
|
header: o("connect.loyalty.card.table.redeemed_at"),
|
|
702
708
|
accessorKey: "redeemedAt",
|
|
703
|
-
accessorFn: (t) => t.redeemedAt ?
|
|
709
|
+
accessorFn: (t) => t.redeemedAt ? oe(t.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
704
710
|
},
|
|
705
711
|
{
|
|
706
712
|
header: o("connect.loyalty.card.table.actions"),
|
|
707
713
|
cell(t) {
|
|
708
|
-
return K(
|
|
714
|
+
return K(se.FmButton, {
|
|
709
715
|
variant: "tertiary",
|
|
710
716
|
icon: "delete",
|
|
711
717
|
iconColor: "neutral-gray-400",
|
|
@@ -716,10 +722,10 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
716
722
|
});
|
|
717
723
|
}
|
|
718
724
|
}
|
|
719
|
-
], { tableMeta: p, rowData:
|
|
725
|
+
], { tableMeta: p, rowData: A, onSort: I, debouncedFetchData: _, onSearch: C } = $e(L.readCards);
|
|
720
726
|
async function n(t) {
|
|
721
727
|
var l;
|
|
722
|
-
await
|
|
728
|
+
await _(t), (l = D.value) == null || l.showSheet(!1);
|
|
723
729
|
}
|
|
724
730
|
const u = E(() => x.isPremium ? [
|
|
725
731
|
{
|
|
@@ -734,11 +740,11 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
734
740
|
}
|
|
735
741
|
] : []);
|
|
736
742
|
async function r(t) {
|
|
737
|
-
await
|
|
743
|
+
await pe.remove(
|
|
738
744
|
`Are you sure you want to remove card ${t.serialNumber}?`
|
|
739
745
|
) && await j(
|
|
740
746
|
async () => {
|
|
741
|
-
await L.deleteCard(t._id.toString()), await
|
|
747
|
+
await L.deleteCard(t._id.toString()), await _({ pageSize: 10, pageIndex: 0 });
|
|
742
748
|
},
|
|
743
749
|
{
|
|
744
750
|
message: `Removing card ${t.serialNumber}`,
|
|
@@ -762,7 +768,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
762
768
|
}
|
|
763
769
|
);
|
|
764
770
|
}
|
|
765
|
-
const
|
|
771
|
+
const m = (t) => {
|
|
766
772
|
var l;
|
|
767
773
|
if (t.redeemedAt) {
|
|
768
774
|
xe.error("Update not permitted", 2e3);
|
|
@@ -776,16 +782,16 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
776
782
|
});
|
|
777
783
|
}), (t, l) => {
|
|
778
784
|
const V = v("FmPill"), U = v("FmPageHead"), f = v("FmSearch"), N = v("FmButton"), q = v("FmCard");
|
|
779
|
-
return
|
|
785
|
+
return c(), $(z, null, [
|
|
780
786
|
i(U, {
|
|
781
787
|
title: e(o)("connect.loyalty.card.title"),
|
|
782
788
|
actions: e(u),
|
|
783
789
|
"onClick:action": l[0] || (l[0] = (S) => {
|
|
784
790
|
var P, O;
|
|
785
|
-
console.log(S), S === "design" && ((P = e(M)) == null || P.showSheet(!0)), S === "create" && ((O = e(
|
|
791
|
+
console.log(S), S === "design" && ((P = e(M)) == null || P.showSheet(!0)), S === "create" && ((O = e(D)) == null || O.showSheet(!0));
|
|
786
792
|
})
|
|
787
793
|
}, {
|
|
788
|
-
title:
|
|
794
|
+
title: h(() => [
|
|
789
795
|
d("div", tt, [
|
|
790
796
|
d("span", lt, te(e(o)("connect.loyalty.card.title")), 1),
|
|
791
797
|
i(V, {
|
|
@@ -797,7 +803,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
797
803
|
_: 1
|
|
798
804
|
}, 8, ["title", "actions"]),
|
|
799
805
|
d("div", at, [
|
|
800
|
-
e(
|
|
806
|
+
e(A).length > 0 || e(A).length <= 0 && e(p).searchValue || e(p).pageCount > 0 ? (c(), $(z, { key: 0 }, [
|
|
801
807
|
d("div", nt, [
|
|
802
808
|
i(f, {
|
|
803
809
|
class: "mt-4",
|
|
@@ -817,7 +823,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
817
823
|
]),
|
|
818
824
|
i(Me, {
|
|
819
825
|
loading: e(p).isLoading,
|
|
820
|
-
"row-data": e(
|
|
826
|
+
"row-data": e(A),
|
|
821
827
|
"row-count": e(p).totalRows,
|
|
822
828
|
"column-defs": s,
|
|
823
829
|
"shrink-at": !1,
|
|
@@ -826,21 +832,21 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
826
832
|
"page-size": e(p).pageSize,
|
|
827
833
|
onSortChange: e(I),
|
|
828
834
|
onPageChange: l[2] || (l[2] = (S) => {
|
|
829
|
-
e(
|
|
835
|
+
e(_)({
|
|
830
836
|
pageSize: S.pageSize,
|
|
831
837
|
pageIndex: S.pageIndex
|
|
832
838
|
});
|
|
833
839
|
}),
|
|
834
840
|
onRowClick: l[3] || (l[3] = (S) => {
|
|
835
|
-
|
|
841
|
+
m(e(_e)(S.original));
|
|
836
842
|
})
|
|
837
843
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
|
|
838
|
-
], 64)) : (
|
|
844
|
+
], 64)) : (c(), F(q, {
|
|
839
845
|
key: 1,
|
|
840
846
|
variant: "outlined",
|
|
841
847
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
842
848
|
}, {
|
|
843
|
-
default:
|
|
849
|
+
default: h(() => [
|
|
844
850
|
l[8] || (l[8] = d("img", {
|
|
845
851
|
src: ve,
|
|
846
852
|
class: "aspect-square w-[150px]"
|
|
@@ -857,7 +863,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
857
863
|
disabled: !e(x).isPremium,
|
|
858
864
|
onClick: l[4] || (l[4] = () => {
|
|
859
865
|
var S;
|
|
860
|
-
return (S = e(
|
|
866
|
+
return (S = e(D)) == null ? void 0 : S.showSheet(!0);
|
|
861
867
|
})
|
|
862
868
|
}, null, 8, ["label", "disabled"]),
|
|
863
869
|
i(N, {
|
|
@@ -875,7 +881,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
875
881
|
})),
|
|
876
882
|
i(je, {
|
|
877
883
|
ref_key: "sheetRef",
|
|
878
|
-
ref:
|
|
884
|
+
ref: D,
|
|
879
885
|
onSuccess: l[6] || (l[6] = (S) => n()),
|
|
880
886
|
onExport: b
|
|
881
887
|
}, null, 512),
|