@feedmepos/mf-connect 0.1.0-beta.73 → 0.1.0-beta.74
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-DuF55WBS.js → Analytic-CmX1CjHI.js} +11 -11
- package/dist/{App-CeGsq1NM.js → App-T0HK84dx.js} +6 -6
- package/dist/{AuditLogs-B34wZMVU.js → AuditLogs-0ERaLqfa.js} +9 -9
- package/dist/{Bin-DLoneNTA.js → Bin-C7utgPUn.js} +8 -8
- package/dist/{Broadcast-CoOqhL7m.js → Broadcast-e2sHc8rv.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CE20HRMJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-mlnLZOdy.js} +6 -6
- package/dist/{Card-BpvNfVGg.js → Card-Bi1q3NGE.js} +217 -209
- package/dist/{Collections-CQHKFHzT.js → Collections-CJYy94Sc.js} +6 -6
- package/dist/{Credit-CU9Rq52D.js → Credit-Mbgev3fe.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-thu_Lazd.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CCIj2_sx.js} +29 -29
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BV3itQrT.js → EffectSheet.vue_vue_type_style_index_0_lang-CGiI-3HJ.js} +6 -6
- package/dist/{Experience-ClcvzpZh.js → Experience-BE9onJDQ.js} +9 -9
- package/dist/{Game-B-3gd3F2.js → Game-CxVwNVRg.js} +10 -10
- package/dist/{Index-BUgF1mCN.js → Index-NdgHNGa3.js} +10 -10
- package/dist/{Marketing-BmaJH7Sb.js → Marketing-Deds20Ye.js} +6 -6
- package/dist/{Member-Bx61ZEO0.js → Member-BiwCcUbl.js} +10 -10
- package/dist/{MemberList-BzKysKUq.js → MemberList-DCR44Sk4.js} +30 -25
- package/dist/{MemberTransactions-CXGW_Cb5.js → MemberTransactions-CYPPTT9t.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cz8rnRI5.js → MessageInput.vue_vue_type_script_setup_true_lang-j3cmjEyQ.js} +3 -3
- package/dist/{Mission-DjJFBLUZ.js → Mission-DYk_Vv35.js} +10 -10
- package/dist/{Overview-DY0s8qOT.js → Overview-CsRent_o.js} +18 -18
- package/dist/{Point-Ci76W501.js → Point-BV5qm3r7.js} +9 -9
- package/dist/{Promotion-_GsyimeM.js → Promotion-ieE1dY52.js} +10 -10
- package/dist/{Queue-yUE7VTjr.js → Queue-DkIuyH5Y.js} +10 -10
- package/dist/{Record-BWE8pJwB.js → Record-BO4eYofF.js} +8 -8
- package/dist/{Reward-CLjRxvkB.js → Reward-DcoWW28K.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-NhHHUjBT.js → RewardGroup.vue_vue_type_script_setup_true_lang-6s4ElOcQ.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-mHzVjK4_.js → RuleGroup.vue_vue_type_script_setup_true_lang-l-qayOI8.js} +13 -13
- package/dist/{Segment-B5X395PR.js → Segment-dTpsHadj.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Et0B0kkB.js → SelectItems.vue_vue_type_script_setup_true_lang-Dei-K3cP.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CTuiaF91.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-B0fwBafY.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-h0OGy6PZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Dl30f-41.js} +3 -3
- package/dist/{Setting-DKNukqej.js → Setting-Cnv36Pu0.js} +11 -11
- package/dist/{Store-pVnRDIWv.js → Store-CTK5EtS1.js} +19 -19
- package/dist/{StoreRewards-Dta8iaG3.js → StoreRewards-CnHiDS7A.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C4FK2Hhc.js → StoreTransactions.vue_vue_type_script_setup_true_lang-o8BduJhH.js} +19 -19
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D5tEPJlH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CDCQIDZh.js} +1 -1
- package/dist/{Tier-b3qzb85f.js → Tier-CcN8habX.js} +20 -20
- package/dist/{Title-BEPkkALw.js → Title-DtsvtR89.js} +19 -19
- package/dist/{Transaction-CX5bz-8R.js → Transaction-NylYY_6m.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-J7JgL3ZE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Book86tM.js} +6 -6
- package/dist/{Voucher-B9WhyNoJ.js → Voucher-z6XGrJrc.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CpdJV-JH.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C0TGO7Cl.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Byy8iIcw.js → ZodTextField.vue_vue_type_script_setup_true_lang-Du4wOEBs.js} +1 -1
- package/dist/{app-BwuFlP4U.js → app-Dew6WljN.js} +1 -1
- package/dist/{app-spXNxwIy.js → app-nEHwJezD.js} +34 -34
- package/dist/app.js +1 -1
- package/dist/{business-DL7Au5Jd.js → business-CXTuYix4.js} +1 -1
- package/dist/{campaign-BNZ7-HOT.js → campaign-BZs7RPUJ.js} +9 -9
- package/dist/{campaign-CdAByh1F.js → campaign-C18IUOcO.js} +2 -2
- package/dist/{campaign.enum-BUoLAvv9.js → campaign.enum-C7o8B5Cf.js} +1 -1
- package/dist/{campaign.fn-Vhk4colm.js → campaign.fn-CP0x2e6M.js} +18 -18
- package/dist/{collectible.enum-Bj9M_woV.js → collectible.enum-QJSyw8dX.js} +1 -1
- package/dist/{collection.fn-Cd5Ot0j-.js → collection.fn-_9GY8WUr.js} +2 -2
- package/dist/{dto-ClbqdGxX.js → dto-Cwr4tMef.js} +4 -4
- package/dist/{effect-DIJB9gNc.js → effect-C3dyQmVR.js} +1 -1
- package/dist/{email-addresses-Ct53VAK9.js → email-addresses-DNwlAZV3.js} +1 -1
- package/dist/{export-CoufQpmw.js → export-C11NCFgO.js} +3 -3
- package/dist/{helper-BiWgv5uK.js → helper-HHvZd4M_.js} +1 -1
- package/dist/{index-DovTEaDP.js → index-8MnjnTtN.js} +1 -1
- package/dist/{index-LFo6ZYQL.js → index-B0zezW3E.js} +1 -1
- package/dist/{index-qjlKvnh6.js → index-BzIzz7cS.js} +3 -3
- package/dist/{index-1xiBe8hf.js → index-CCTd1lLH.js} +4 -4
- package/dist/{index-CGC8OuAU.js → index-CIKyf9ft.js} +1 -1
- package/dist/{index-CyLEADUO.js → index-CL0DvpMU.js} +1 -1
- package/dist/{index-D7FRiYhm.js → index-CT4Hyf4w.js} +6 -6
- package/dist/{index-bJ5pwQkB.js → index-CyXkN89w.js} +2 -2
- package/dist/{index-CC4x--Wj.js → index-DJ-RhIDQ.js} +1 -1
- package/dist/{index-DmakIEWL.js → index-DM6Zvwcl.js} +1 -1
- package/dist/{index-DVH42wjJ.js → index-DyfTL0NG.js} +1 -1
- package/dist/{index-DfRmJZgk.js → index-jdsxOVkp.js} +3 -3
- package/dist/{index-Ccxk7UeG.js → index-yrwLRgg0.js} +3 -3
- package/dist/{index.esm2017-CRGDx_au.js → index.esm2017-BMFlbxdx.js} +59 -59
- package/dist/{loading-YDhYfc7H.js → loading-ClVTDQc6.js} +1 -1
- package/dist/{membership-BGin-J4X.js → membership-DqMQPgdF.js} +3 -3
- package/dist/{money-Dy3hgkcf.js → money-COS1BMzW.js} +1 -1
- package/dist/{number-BAIUanJl.js → number-BuP5vRmO.js} +1 -1
- package/dist/{objectid-Cw3dF6mj.js → objectid-B3LrrWLD.js} +5 -5
- package/dist/{plugins-D9TQFKpf.js → plugins-DWMQmNXZ.js} +2 -2
- package/dist/{reward-DB1n0glJ.js → reward-Dh8eazpS.js} +1 -1
- package/dist/{rule-BrRyZfJJ.js → rule-CaiZcfw4.js} +3 -3
- package/dist/{rule-builder-CC08hDgq.js → rule-builder-DOHyUDI2.js} +1 -1
- package/dist/{template-DJlxZIjZ.js → template-BZCh-lEH.js} +4 -4
- package/dist/{trigger-Dz5Fd0Hc.js → trigger-CUY_7-so.js} +4 -4
- package/dist/{user-BAE-TiCB.js → user-DWsuhUnL.js} +1 -1
- package/dist/{vue-i18n-DpoLveH2.js → vue-i18n-BXjn2dYe.js} +52 -52
- package/dist/{xlsx-3tdJPiTp.js → xlsx-BGsRNT8x.js} +1 -1
- package/package.json +1 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as y, computed as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { h as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import "./index-
|
|
6
|
-
import { u as J } from "./loading-
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as W } from "./membership-
|
|
1
|
+
import { defineComponent as Z, ref as y, computed as j, watch as fe, onMounted as X, resolveComponent as v, openBlock as m, createBlock as F, unref as e, isRef as G, withCtx as _, createElementVNode as d, createVNode as i, createElementBlock as $, Fragment as z, renderList as H, createCommentVNode as k, normalizeClass as ue, createSlots as ge, h as K, toDisplayString as te, withModifiers as be } from "vue";
|
|
2
|
+
import { _ as ve } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { h as ne } from "./moment-BWErdI6_.js";
|
|
4
|
+
import { useDialog as ye, components as oe } from "@feedmepos/ui-library";
|
|
5
|
+
import "./index-jdsxOVkp.js";
|
|
6
|
+
import { u as J } from "./loading-ClVTDQc6.js";
|
|
7
|
+
import { u as me } from "./app-wDQR6dpb.js";
|
|
8
|
+
import { u as W } from "./membership-DqMQPgdF.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 { j as Ce } from "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { O as Se } from "./objectid-
|
|
10
|
+
import { p as ce, f as se, n as xe } from "./plugins-DWMQmNXZ.js";
|
|
11
|
+
import { m as L } from "./index-CIKyf9ft.js";
|
|
12
|
+
import { z as ie } from "./app-nEHwJezD.js";
|
|
13
|
+
import { Z as re } from "./zod-Bg2FbC-D.js";
|
|
14
|
+
import { _ as de } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
15
|
+
import "./index-CT4Hyf4w.js";
|
|
16
|
+
import { j as Ce } from "./index-CCTd1lLH.js";
|
|
17
|
+
import "./index-CyXkN89w.js";
|
|
18
|
+
import "./index-CL0DvpMU.js";
|
|
19
|
+
import "./index-yrwLRgg0.js";
|
|
20
|
+
import { O as Se } from "./objectid-B3LrrWLD.js";
|
|
21
21
|
import { a as _e, c as he } from "./object-qECH92oz.js";
|
|
22
|
-
import { u as we } from "./business-
|
|
23
|
-
import { w as ke } from "./xlsx-
|
|
24
|
-
import { a as Fe, C as Ve } from "./export-
|
|
22
|
+
import { u as we } from "./business-CXTuYix4.js";
|
|
23
|
+
import { w as ke } from "./xlsx-BGsRNT8x.js";
|
|
24
|
+
import { a as Fe, C as Ve } from "./export-C11NCFgO.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-BXjn2dYe.js";
|
|
27
27
|
import { o as Ue } from "./objectId-dwaoBfJX.js";
|
|
28
|
-
const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" },
|
|
28
|
+
const De = { class: "space-y-16" }, Ae = { 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"], je = { class: "flex items-center gap-8" }, Ee = /* @__PURE__ */ Z({
|
|
32
32
|
__name: "CreateCardSheet",
|
|
33
33
|
emits: ["success", "export"],
|
|
34
34
|
setup(ee, { expose: E, emit: T }) {
|
|
35
|
-
const { minor: A } = J,
|
|
35
|
+
const { minor: A } = J, g = W(), M = y(), x = y(!1), w = T, o = y(!1);
|
|
36
36
|
function B(c) {
|
|
37
|
-
|
|
37
|
+
o.value = c, c && (s.value = {
|
|
38
38
|
quantity: 1,
|
|
39
39
|
code: "",
|
|
40
40
|
codeConfig: {
|
|
@@ -58,7 +58,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
58
58
|
},
|
|
59
59
|
setCardOnBind: !1,
|
|
60
60
|
bundle: void 0
|
|
61
|
-
}),
|
|
61
|
+
}), p = [
|
|
62
62
|
{
|
|
63
63
|
label: "Bulk number",
|
|
64
64
|
value: "bulk",
|
|
@@ -82,19 +82,19 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
82
82
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
83
83
|
{ label: "Numbers", value: "0123456789" },
|
|
84
84
|
{ label: "Custom", value: "" }
|
|
85
|
-
],
|
|
85
|
+
], I = y(D[0].value), h = y("bulk"), C = y(0), n = j(
|
|
86
86
|
() => {
|
|
87
87
|
var c;
|
|
88
|
-
return (c =
|
|
88
|
+
return (c = g.membership.design) == null ? void 0 : c[C.value];
|
|
89
89
|
}
|
|
90
|
-
), u = y(!1), r =
|
|
91
|
-
() =>
|
|
90
|
+
), u = y(!1), r = j(
|
|
91
|
+
() => g.sortedStoreCategories.flatMap((c) => c.bundles)
|
|
92
92
|
);
|
|
93
|
-
async function
|
|
93
|
+
async function b(c) {
|
|
94
94
|
var l, V;
|
|
95
95
|
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !x.value) return;
|
|
96
|
-
c.design = (V =
|
|
97
|
-
const t = await
|
|
96
|
+
c.design = (V = n.value) == null ? void 0 : V.image;
|
|
97
|
+
const t = await ce.confirm(
|
|
98
98
|
"",
|
|
99
99
|
"Do you want to export generated card(s)?",
|
|
100
100
|
"Export",
|
|
@@ -113,37 +113,37 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
113
113
|
}
|
|
114
114
|
return E({
|
|
115
115
|
showSheet: B
|
|
116
|
-
}),
|
|
116
|
+
}), fe(
|
|
117
117
|
() => s.value.codeConfig.length,
|
|
118
118
|
(c, t) => {
|
|
119
119
|
c != t && (s.value.codeConfig.pattern = "#".repeat(Number(c)));
|
|
120
120
|
}
|
|
121
121
|
), X(async () => {
|
|
122
|
-
await
|
|
122
|
+
await g.readMemberStore();
|
|
123
123
|
}), (c, t) => {
|
|
124
|
-
const l = v("FmRadio"), V = v("FmRadioGroup"), U = v("FmSwitch"),
|
|
125
|
-
return m(), F(
|
|
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"), pe = v("FmSideSheet");
|
|
125
|
+
return m(), F(pe, {
|
|
126
126
|
"max-width": 560,
|
|
127
127
|
"dismiss-away": !0,
|
|
128
128
|
header: "Create collection",
|
|
129
|
-
modelValue: e(
|
|
129
|
+
modelValue: e(o),
|
|
130
130
|
"onUpdate:modelValue": [
|
|
131
|
-
t[19] || (t[19] = (R) => G(
|
|
132
|
-
t[20] || (t[20] = (R) =>
|
|
131
|
+
t[19] || (t[19] = (R) => G(o) ? o.value = R : null),
|
|
132
|
+
t[20] || (t[20] = (R) => o.value = R)
|
|
133
133
|
]
|
|
134
134
|
}, {
|
|
135
135
|
"side-sheet-footer": _(() => [
|
|
136
|
-
d("div",
|
|
137
|
-
i(
|
|
136
|
+
d("div", je, [
|
|
137
|
+
i(P, {
|
|
138
138
|
label: "Save",
|
|
139
|
-
onClick: t[17] || (t[17] = (R) =>
|
|
140
|
-
loading: e(
|
|
139
|
+
onClick: t[17] || (t[17] = (R) => b(e(s))),
|
|
140
|
+
loading: e(me)().isLoading
|
|
141
141
|
}, null, 8, ["loading"]),
|
|
142
|
-
i(
|
|
142
|
+
i(P, {
|
|
143
143
|
label: "Cancel",
|
|
144
144
|
type: "button",
|
|
145
145
|
variant: "tertiary",
|
|
146
|
-
onClick: t[18] || (t[18] = (R) =>
|
|
146
|
+
onClick: t[18] || (t[18] = (R) => o.value = !1)
|
|
147
147
|
})
|
|
148
148
|
])
|
|
149
149
|
]),
|
|
@@ -166,7 +166,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
166
166
|
inline: !1
|
|
167
167
|
}, {
|
|
168
168
|
default: _(() => [
|
|
169
|
-
(m(), $(
|
|
169
|
+
(m(), $(z, null, H(p, (a) => i(l, {
|
|
170
170
|
key: a.value,
|
|
171
171
|
value: a.value,
|
|
172
172
|
label: a.label,
|
|
@@ -178,7 +178,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
178
178
|
]),
|
|
179
179
|
d("div", De, [
|
|
180
180
|
t[22] || (t[22] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1)),
|
|
181
|
-
e(h) === "bulk" ? (m(), $(
|
|
181
|
+
e(h) === "bulk" ? (m(), $(z, { key: 0 }, [
|
|
182
182
|
i(U, {
|
|
183
183
|
"model-value": e(u),
|
|
184
184
|
"label-placement": "right",
|
|
@@ -187,24 +187,24 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
187
187
|
required: !0,
|
|
188
188
|
"onUpdate:modelValue": t[1] || (t[1] = () => u.value = !e(u))
|
|
189
189
|
}, null, 8, ["model-value"]),
|
|
190
|
-
e(u) ? (m(), $(
|
|
191
|
-
i(
|
|
190
|
+
e(u) ? (m(), $(z, { key: 0 }, [
|
|
191
|
+
i(f, {
|
|
192
192
|
"model-value": e(s).codeConfig.length || null,
|
|
193
193
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => e(s).codeConfig.length = a),
|
|
194
194
|
label: "Code length",
|
|
195
195
|
rules: [(a) => Number(a) >= 1 || "Code length must at least 1"],
|
|
196
196
|
required: !0
|
|
197
197
|
}, null, 8, ["model-value", "rules"]),
|
|
198
|
-
i(
|
|
198
|
+
i(N, {
|
|
199
199
|
label: "Charset",
|
|
200
|
-
"model-value": e(
|
|
200
|
+
"model-value": e(I),
|
|
201
201
|
items: D,
|
|
202
202
|
"helper-text": e(s).codeConfig.charset.length > 62 ? `${e(s).codeConfig.charset.substring(0, 62)}...` : e(s).codeConfig.charset,
|
|
203
203
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => {
|
|
204
|
-
|
|
204
|
+
I.value = a, e(s).codeConfig.charset = a;
|
|
205
205
|
})
|
|
206
206
|
}, null, 8, ["model-value", "helper-text"]),
|
|
207
|
-
e(
|
|
207
|
+
e(I) === "" ? (m(), F(q, {
|
|
208
208
|
key: 0,
|
|
209
209
|
modelValue: e(s).codeConfig.charset,
|
|
210
210
|
"onUpdate:modelValue": t[4] || (t[4] = (a) => e(s).codeConfig.charset = a),
|
|
@@ -251,7 +251,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
251
251
|
placeholder: "(For multiple numbers, please enter in the new row.)"
|
|
252
252
|
}, null, 8, ["modelValue", "rules"])) : k("", !0)
|
|
253
253
|
]),
|
|
254
|
-
d("div",
|
|
254
|
+
d("div", Ie, [
|
|
255
255
|
t[23] || (t[23] = d("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1)),
|
|
256
256
|
i(U, {
|
|
257
257
|
"label-placement": "right",
|
|
@@ -267,7 +267,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
267
267
|
"onUpdate:modelValue": t[12] || (t[12] = (a) => e(s).bundle = a)
|
|
268
268
|
}, {
|
|
269
269
|
append: _(() => [
|
|
270
|
-
e(s).bundle ? (m(), F(
|
|
270
|
+
e(s).bundle ? (m(), F(P, {
|
|
271
271
|
key: 0,
|
|
272
272
|
icon: "link_off",
|
|
273
273
|
variant: "plain",
|
|
@@ -276,7 +276,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
278
278
|
}, 8, ["items", "modelValue"]),
|
|
279
|
-
(le = (R = e(
|
|
279
|
+
(le = (R = e(g).store) == null ? void 0 : R.stripe) != null && le.apiKey ? (m(), F(Q, {
|
|
280
280
|
key: 0,
|
|
281
281
|
label: "Linked subscription bundle",
|
|
282
282
|
placeholder: "Select bundle",
|
|
@@ -285,7 +285,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
285
285
|
"onUpdate:modelValue": t[14] || (t[14] = (a) => e(s).subscriptionBundle = a)
|
|
286
286
|
}, {
|
|
287
287
|
append: _(() => [
|
|
288
|
-
e(s).subscriptionBundle ? (m(), F(
|
|
288
|
+
e(s).subscriptionBundle ? (m(), F(P, {
|
|
289
289
|
key: 0,
|
|
290
290
|
icon: "link_off",
|
|
291
291
|
variant: "plain",
|
|
@@ -295,22 +295,22 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
295
295
|
_: 1
|
|
296
296
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
297
297
|
]),
|
|
298
|
-
e(
|
|
299
|
-
d("div",
|
|
298
|
+
e(g).membership.design ? (m(), $("div", Ne, [
|
|
299
|
+
d("div", Pe, [
|
|
300
300
|
t[24] || (t[24] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
301
301
|
d("img", {
|
|
302
|
-
src: (ae = e(
|
|
302
|
+
src: (ae = e(n)) == null ? void 0 : ae.image,
|
|
303
303
|
class: "aspect-[16/9]"
|
|
304
304
|
}, null, 8, Re),
|
|
305
305
|
d("div", qe, [
|
|
306
|
-
(m(!0), $(
|
|
306
|
+
(m(!0), $(z, null, H(e(g).membership.design, (a, Y) => (m(), $("img", {
|
|
307
307
|
src: a.image,
|
|
308
308
|
key: `image_${Y}`,
|
|
309
|
-
class:
|
|
309
|
+
class: ue(["w-[112px] h-[63px] cursor-pointer", `${e(C) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
310
310
|
onClick: (dt) => C.value = Y,
|
|
311
311
|
alt: `ai_image_predict_${Y}`,
|
|
312
312
|
style: { objectFit: "cover" }
|
|
313
|
-
}, null, 10,
|
|
313
|
+
}, null, 10, ze))), 128))
|
|
314
314
|
])
|
|
315
315
|
])
|
|
316
316
|
])) : k("", !0)
|
|
@@ -330,30 +330,30 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
330
330
|
__name: "EditCardSheet",
|
|
331
331
|
emits: ["success"],
|
|
332
332
|
setup(ee, { expose: E, emit: T }) {
|
|
333
|
-
const { minor: A } = J,
|
|
333
|
+
const { minor: A } = J, g = W(), M = y(), x = y(!1), w = T, o = y({
|
|
334
334
|
_id: "",
|
|
335
335
|
business: "",
|
|
336
336
|
serialNumber: ""
|
|
337
337
|
}), B = y(!1);
|
|
338
|
-
function s(C,
|
|
338
|
+
function s(C, n) {
|
|
339
339
|
var u;
|
|
340
|
-
B.value = C, C &&
|
|
341
|
-
(r) => r.image ===
|
|
340
|
+
B.value = C, C && n && (o.value = n, p.value = (u = g.membership.design) == null ? void 0 : u.findIndex(
|
|
341
|
+
(r) => r.image === n.design
|
|
342
342
|
));
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const p = y(0), D = j(
|
|
345
345
|
() => {
|
|
346
346
|
var C;
|
|
347
|
-
return (C =
|
|
347
|
+
return (C = g.membership.design) == null ? void 0 : C[p.value];
|
|
348
348
|
}
|
|
349
|
-
),
|
|
350
|
-
() =>
|
|
349
|
+
), I = j(
|
|
350
|
+
() => g.sortedStoreCategories.flatMap(
|
|
351
351
|
(C) => C.bundles
|
|
352
352
|
)
|
|
353
353
|
);
|
|
354
354
|
async function h(C) {
|
|
355
|
-
var
|
|
356
|
-
await ((
|
|
355
|
+
var n, u;
|
|
356
|
+
await ((n = M.value) == null ? void 0 : n.validateInputs()), x.value && (C.design = (u = D.value) == null ? void 0 : u.image, await A(
|
|
357
357
|
async () => {
|
|
358
358
|
await L.updateCard(C), await w("success");
|
|
359
359
|
},
|
|
@@ -366,32 +366,32 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
366
366
|
return E({
|
|
367
367
|
showSheet: s
|
|
368
368
|
}), X(async () => {
|
|
369
|
-
await
|
|
370
|
-
}), (C,
|
|
371
|
-
const u = v("FmTextField"), r = v("FmSwitch"),
|
|
369
|
+
await g.readMemberStore();
|
|
370
|
+
}), (C, n) => {
|
|
371
|
+
const u = v("FmTextField"), r = v("FmSwitch"), b = v("FmButton"), c = v("FmForm"), t = v("FmSideSheet");
|
|
372
372
|
return m(), F(t, {
|
|
373
373
|
"max-width": 560,
|
|
374
374
|
"dismiss-away": !0,
|
|
375
375
|
header: "Edit card",
|
|
376
376
|
modelValue: e(B),
|
|
377
377
|
"onUpdate:modelValue": [
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
n[10] || (n[10] = (l) => G(B) ? B.value = l : null),
|
|
379
|
+
n[11] || (n[11] = (l) => B.value = l)
|
|
380
380
|
]
|
|
381
381
|
}, {
|
|
382
382
|
"side-sheet-footer": _(() => [
|
|
383
383
|
d("div", He, [
|
|
384
|
-
i(
|
|
384
|
+
i(b, {
|
|
385
385
|
label: "Save",
|
|
386
|
-
disabled: !!e(
|
|
387
|
-
onClick:
|
|
388
|
-
loading: e(
|
|
386
|
+
disabled: !!e(o).redeemedAt,
|
|
387
|
+
onClick: n[8] || (n[8] = (l) => h(e(o))),
|
|
388
|
+
loading: e(me)().isLoading
|
|
389
389
|
}, null, 8, ["disabled", "loading"]),
|
|
390
|
-
i(
|
|
390
|
+
i(b, {
|
|
391
391
|
label: "Cancel",
|
|
392
392
|
type: "button",
|
|
393
393
|
variant: "tertiary",
|
|
394
|
-
onClick:
|
|
394
|
+
onClick: n[9] || (n[9] = (l) => B.value = !1)
|
|
395
395
|
})
|
|
396
396
|
])
|
|
397
397
|
]),
|
|
@@ -400,79 +400,82 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
400
400
|
ref_key: "form",
|
|
401
401
|
ref: M,
|
|
402
402
|
class: "space-y-40",
|
|
403
|
-
onValidationSuccess:
|
|
404
|
-
onValidationFailed:
|
|
403
|
+
onValidationSuccess: n[6] || (n[6] = (l) => x.value = !0),
|
|
404
|
+
onValidationFailed: n[7] || (n[7] = (l) => x.value = !1)
|
|
405
405
|
}, {
|
|
406
406
|
default: _(() => {
|
|
407
407
|
var l, V, U;
|
|
408
408
|
return [
|
|
409
409
|
d("div", Te, [
|
|
410
410
|
i(u, {
|
|
411
|
-
modelValue: e(
|
|
412
|
-
"onUpdate:modelValue":
|
|
411
|
+
modelValue: e(o).serialNumber,
|
|
412
|
+
"onUpdate:modelValue": n[0] || (n[0] = (f) => e(o).serialNumber = f),
|
|
413
413
|
label: "Card Number",
|
|
414
414
|
rules: [
|
|
415
|
-
e(
|
|
415
|
+
e(re).toRule(e(ie).string().min(1, "Card number is required")),
|
|
416
|
+
e(re).toRule(
|
|
417
|
+
e(ie).string().max(50, "Card number must be less than 50 characters")
|
|
418
|
+
)
|
|
416
419
|
],
|
|
417
420
|
required: !0
|
|
418
421
|
}, null, 8, ["modelValue", "rules"]),
|
|
419
|
-
|
|
422
|
+
n[12] || (n[12] = d("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1)),
|
|
420
423
|
i(r, {
|
|
421
424
|
"label-placement": "right",
|
|
422
425
|
label: "Set card number on bind",
|
|
423
|
-
"model-value": e(
|
|
424
|
-
"onUpdate:modelValue":
|
|
426
|
+
"model-value": e(o).setCardOnBind || !1,
|
|
427
|
+
"onUpdate:modelValue": n[1] || (n[1] = (f) => e(o).setCardOnBind = f)
|
|
425
428
|
}, null, 8, ["model-value"]),
|
|
426
429
|
i(Q, {
|
|
427
430
|
label: "Activate bundle on bind",
|
|
428
431
|
placeholder: "Select bundle",
|
|
429
|
-
items: e(
|
|
430
|
-
modelValue: e(
|
|
431
|
-
"onUpdate:modelValue":
|
|
432
|
+
items: e(I).filter((f) => !f.stripePriceId).map((f) => ({ label: f.name, value: f._id })),
|
|
433
|
+
modelValue: e(o).bundle,
|
|
434
|
+
"onUpdate:modelValue": n[3] || (n[3] = (f) => e(o).bundle = f)
|
|
432
435
|
}, {
|
|
433
436
|
append: _(() => [
|
|
434
|
-
e(
|
|
437
|
+
e(o).bundle ? (m(), F(b, {
|
|
435
438
|
key: 0,
|
|
436
439
|
icon: "link_off",
|
|
437
440
|
variant: "plain",
|
|
438
|
-
onClick:
|
|
441
|
+
onClick: n[2] || (n[2] = (f) => e(o).bundle = null)
|
|
439
442
|
})) : k("", !0)
|
|
440
443
|
]),
|
|
441
444
|
_: 1
|
|
442
445
|
}, 8, ["items", "modelValue"]),
|
|
443
|
-
(V = (l = e(
|
|
446
|
+
(V = (l = e(g).store) == null ? void 0 : l.stripe) != null && V.apiKey ? (m(), F(Q, {
|
|
444
447
|
key: 0,
|
|
445
448
|
label: "Linked subscription bundle",
|
|
446
449
|
placeholder: "Select bundle",
|
|
447
|
-
items: e(
|
|
448
|
-
modelValue: e(
|
|
449
|
-
"onUpdate:modelValue":
|
|
450
|
+
items: e(I).filter((f) => f.stripePriceId).map((f) => ({ label: f.name, value: f._id })),
|
|
451
|
+
modelValue: e(o).subscriptionBundle,
|
|
452
|
+
"onUpdate:modelValue": n[5] || (n[5] = (f) => e(o).subscriptionBundle = f)
|
|
450
453
|
}, {
|
|
451
454
|
append: _(() => [
|
|
452
|
-
e(
|
|
455
|
+
e(o).subscriptionBundle ? (m(), F(b, {
|
|
453
456
|
key: 0,
|
|
454
457
|
icon: "link_off",
|
|
455
458
|
variant: "plain",
|
|
456
|
-
onClick:
|
|
459
|
+
onClick: n[4] || (n[4] = (f) => e(o).subscriptionBundle = null)
|
|
457
460
|
})) : k("", !0)
|
|
458
461
|
]),
|
|
459
462
|
_: 1
|
|
460
463
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
461
464
|
]),
|
|
462
|
-
e(
|
|
465
|
+
e(g).membership.design ? (m(), $("div", Le, [
|
|
463
466
|
d("div", Oe, [
|
|
464
|
-
|
|
467
|
+
n[13] || (n[13] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
465
468
|
d("img", {
|
|
466
469
|
src: (U = e(D)) == null ? void 0 : U.image,
|
|
467
470
|
class: "aspect-[16/9]"
|
|
468
471
|
}, null, 8, Ye),
|
|
469
472
|
d("div", Ke, [
|
|
470
|
-
(m(!0), $(
|
|
471
|
-
src:
|
|
472
|
-
key: `image_${
|
|
473
|
-
class:
|
|
474
|
-
onClick: (q) =>
|
|
475
|
-
alt: `ai_image_predict_${
|
|
473
|
+
(m(!0), $(z, null, H(e(g).membership.design, (f, N) => (m(), $("img", {
|
|
474
|
+
src: f.image,
|
|
475
|
+
key: `image_${N}`,
|
|
476
|
+
class: ue(["w-[112px] h-[63px] cursor-pointer", `${e(p) === N ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
477
|
+
onClick: (q) => p.value = N,
|
|
478
|
+
alt: `ai_image_predict_${N}`,
|
|
476
479
|
style: { objectFit: "cover" }
|
|
477
480
|
}, null, 10, Ge))), 128))
|
|
478
481
|
])
|
|
@@ -494,39 +497,39 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
494
497
|
__name: "CardDesignSheet",
|
|
495
498
|
emits: ["success"],
|
|
496
499
|
setup(ee, { expose: E, emit: T }) {
|
|
497
|
-
const { minor: A } = J,
|
|
500
|
+
const { minor: A } = J, g = W(), M = ye(), x = y(!1);
|
|
498
501
|
y(), y(!1);
|
|
499
|
-
const w = y(),
|
|
500
|
-
|
|
502
|
+
const w = y(), o = y(null);
|
|
503
|
+
j(() => {
|
|
501
504
|
var u, r;
|
|
502
505
|
return Math.min((((r = (u = w.value) == null ? void 0 : u.design) == null ? void 0 : r.length) ?? 0) + 1, We);
|
|
503
506
|
});
|
|
504
|
-
const B = T, s =
|
|
507
|
+
const B = T, s = j(() => {
|
|
505
508
|
var u, r;
|
|
506
|
-
return ((r = (u =
|
|
507
|
-
}),
|
|
509
|
+
return ((r = (u = g.membership) == null ? void 0 : u.design) == null ? void 0 : r.filter((b) => b.image)) || [];
|
|
510
|
+
}), p = y(!1);
|
|
508
511
|
function D(u) {
|
|
509
|
-
|
|
512
|
+
p.value = u;
|
|
510
513
|
}
|
|
511
|
-
function
|
|
514
|
+
function I() {
|
|
512
515
|
x.value = !0;
|
|
513
516
|
}
|
|
514
517
|
async function h() {
|
|
515
518
|
await A(
|
|
516
519
|
async () => {
|
|
517
|
-
var
|
|
520
|
+
var b;
|
|
518
521
|
const u = _e(w.value), r = Ce.parse(u);
|
|
519
|
-
if (r.design = (r == null ? void 0 : r.design) || [],
|
|
522
|
+
if (r.design = (r == null ? void 0 : r.design) || [], o.value) {
|
|
520
523
|
const c = Se().toHexString(), t = await se.update(
|
|
521
|
-
se.designPath(c,
|
|
522
|
-
|
|
524
|
+
se.designPath(c, o.value),
|
|
525
|
+
o.value
|
|
523
526
|
);
|
|
524
|
-
(
|
|
527
|
+
(b = r.design) == null || b.push({
|
|
525
528
|
_id: c,
|
|
526
529
|
image: t
|
|
527
530
|
});
|
|
528
531
|
}
|
|
529
|
-
await L.update(r), await
|
|
532
|
+
await L.update(r), await n(), await B("success"), o.value = null, x.value = !1;
|
|
530
533
|
},
|
|
531
534
|
{
|
|
532
535
|
message: "Saving card design",
|
|
@@ -535,41 +538,41 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
535
538
|
);
|
|
536
539
|
}
|
|
537
540
|
async function C(u, r) {
|
|
538
|
-
u ?
|
|
541
|
+
u ? o.value = u : r && M.open({
|
|
539
542
|
title: "Delete Design",
|
|
540
543
|
message: "Are you sure you want to delete this design?",
|
|
541
544
|
primaryActions: { text: "Delete", close: !0 },
|
|
542
545
|
secondaryActions: { text: "Cancel", close: !1 }
|
|
543
546
|
}).onPrimary(async () => {
|
|
544
547
|
var c, t;
|
|
545
|
-
const
|
|
546
|
-
console.log(
|
|
548
|
+
const b = (c = w.value.design) == null ? void 0 : c.findIndex((l) => l._id == r);
|
|
549
|
+
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await h();
|
|
547
550
|
}).onSecondary(() => {
|
|
548
551
|
M.close();
|
|
549
552
|
});
|
|
550
553
|
}
|
|
551
|
-
async function
|
|
552
|
-
await
|
|
554
|
+
async function n() {
|
|
555
|
+
await g.readMembership(), w.value = g.membership;
|
|
553
556
|
}
|
|
554
557
|
return E({
|
|
555
558
|
showSheet: D
|
|
556
559
|
}), X(async () => {
|
|
557
|
-
await
|
|
560
|
+
await n(), s.value.length || (x.value = !0);
|
|
558
561
|
}), (u, r) => {
|
|
559
|
-
const
|
|
562
|
+
const b = v("FmButton"), c = v("FmSideSheet");
|
|
560
563
|
return m(), F(c, {
|
|
561
564
|
"max-width": 560,
|
|
562
565
|
"dismiss-away": !0,
|
|
563
566
|
header: "Manage Design",
|
|
564
|
-
modelValue: e(
|
|
567
|
+
modelValue: e(p),
|
|
565
568
|
"onUpdate:modelValue": [
|
|
566
|
-
r[2] || (r[2] = (t) => G(
|
|
567
|
-
r[3] || (r[3] = (t) =>
|
|
569
|
+
r[2] || (r[2] = (t) => G(p) ? p.value = t : null),
|
|
570
|
+
r[3] || (r[3] = (t) => p.value = t)
|
|
568
571
|
]
|
|
569
|
-
},
|
|
572
|
+
}, ge({
|
|
570
573
|
default: _(() => [
|
|
571
574
|
e(x) ? k("", !0) : (m(), $("div", Ze, [
|
|
572
|
-
(m(!0), $(
|
|
575
|
+
(m(!0), $(z, null, H(e(s), (t) => (m(), F(de, {
|
|
573
576
|
key: String(t._id),
|
|
574
577
|
"image-fit": "cover",
|
|
575
578
|
label: "",
|
|
@@ -581,7 +584,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
581
584
|
"delete-button": !1
|
|
582
585
|
}, {
|
|
583
586
|
"delete-button": _(() => [
|
|
584
|
-
i(
|
|
587
|
+
i(b, {
|
|
585
588
|
class: "!text-neutral-50 !bg-neutral-700",
|
|
586
589
|
icon: "delete",
|
|
587
590
|
variant: "tertiary",
|
|
@@ -591,7 +594,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
591
594
|
_: 2
|
|
592
595
|
}, 1032, ["thumbnail"]))), 128))
|
|
593
596
|
])),
|
|
594
|
-
e(x) ? (m(), F(
|
|
597
|
+
e(x) ? (m(), F(de, {
|
|
595
598
|
key: 1,
|
|
596
599
|
"image-fit": "cover",
|
|
597
600
|
label: "",
|
|
@@ -607,12 +610,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
607
610
|
name: "side-sheet-footer",
|
|
608
611
|
fn: _(() => [
|
|
609
612
|
d("div", Je, [
|
|
610
|
-
i(
|
|
613
|
+
i(b, {
|
|
611
614
|
label: "Save",
|
|
612
615
|
onClick: h,
|
|
613
|
-
disabled: !e(
|
|
616
|
+
disabled: !e(o)
|
|
614
617
|
}, null, 8, ["disabled"]),
|
|
615
|
-
i(
|
|
618
|
+
i(b, {
|
|
616
619
|
label: "Cancel",
|
|
617
620
|
type: "button",
|
|
618
621
|
variant: "tertiary",
|
|
@@ -625,15 +628,15 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
625
628
|
name: "side-sheet-footer",
|
|
626
629
|
fn: _(() => [
|
|
627
630
|
d("div", Xe, [
|
|
628
|
-
i(
|
|
631
|
+
i(b, {
|
|
629
632
|
label: "Add Design",
|
|
630
|
-
onClick:
|
|
633
|
+
onClick: I
|
|
631
634
|
}),
|
|
632
|
-
i(
|
|
635
|
+
i(b, {
|
|
633
636
|
label: "Cancel",
|
|
634
637
|
type: "button",
|
|
635
638
|
variant: "tertiary",
|
|
636
|
-
onClick: r[0] || (r[0] = (t) =>
|
|
639
|
+
onClick: r[0] || (r[0] = (t) => p.value = !1)
|
|
637
640
|
})
|
|
638
641
|
])
|
|
639
642
|
]),
|
|
@@ -642,18 +645,18 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
642
645
|
]), 1032, ["modelValue"]);
|
|
643
646
|
};
|
|
644
647
|
}
|
|
645
|
-
}), 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" },
|
|
648
|
+
}), 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({
|
|
646
649
|
__name: "Card",
|
|
647
650
|
setup(ee) {
|
|
648
|
-
const { minor: E, global: T } = J, A = y(),
|
|
651
|
+
const { minor: E, global: T } = J, A = y(), g = y(), M = y(), x = we(), w = W(), { t: o } = Be(), B = j(
|
|
649
652
|
() => w.sortedStoreCategories.flatMap((t) => t.bundles)
|
|
650
653
|
), s = [
|
|
651
654
|
{
|
|
652
|
-
header:
|
|
655
|
+
header: o("connect.loyalty.card.table.card_number"),
|
|
653
656
|
accessorFn: (t) => t.serialNumber
|
|
654
657
|
},
|
|
655
658
|
{
|
|
656
|
-
header:
|
|
659
|
+
header: o("connect.loyalty.card.table.redeemed_by"),
|
|
657
660
|
accessorKey: "user",
|
|
658
661
|
enableSorting: !1,
|
|
659
662
|
cell(t) {
|
|
@@ -664,7 +667,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
664
667
|
class: "flex items-center gap-x-8"
|
|
665
668
|
},
|
|
666
669
|
[
|
|
667
|
-
K(
|
|
670
|
+
K(oe.FmAvatar, {
|
|
668
671
|
name: l != null && l.photoUrl || l == null ? void 0 : l.name,
|
|
669
672
|
src: (l == null ? void 0 : l.photoUrl) ?? void 0,
|
|
670
673
|
size: "sm"
|
|
@@ -675,7 +678,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
675
678
|
}
|
|
676
679
|
},
|
|
677
680
|
{
|
|
678
|
-
header:
|
|
681
|
+
header: o("connect.loyalty.card.table.phone"),
|
|
679
682
|
accessorFn: (t) => {
|
|
680
683
|
var l;
|
|
681
684
|
return ((l = t.pf_member) == null ? void 0 : l.phoneNumber) || "-";
|
|
@@ -683,26 +686,26 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
683
686
|
accessorKey: "pf_member.phoneNumber"
|
|
684
687
|
},
|
|
685
688
|
{
|
|
686
|
-
header:
|
|
689
|
+
header: o("connect.loyalty.card.table.created_at"),
|
|
687
690
|
accessorKey: "_id",
|
|
688
|
-
accessorFn: (t) =>
|
|
691
|
+
accessorFn: (t) => ne(Ue(t._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
689
692
|
},
|
|
690
693
|
{
|
|
691
|
-
header:
|
|
694
|
+
header: o("connect.loyalty.card.table.bundle"),
|
|
692
695
|
accessorFn: (t) => {
|
|
693
696
|
var l;
|
|
694
697
|
return ((l = B.value.find((V) => V._id === t.bundle)) == null ? void 0 : l.name) || "-";
|
|
695
698
|
}
|
|
696
699
|
},
|
|
697
700
|
{
|
|
698
|
-
header:
|
|
701
|
+
header: o("connect.loyalty.card.table.redeemed_at"),
|
|
699
702
|
accessorKey: "redeemedAt",
|
|
700
|
-
accessorFn: (t) => t.redeemedAt ?
|
|
703
|
+
accessorFn: (t) => t.redeemedAt ? ne(t.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
701
704
|
},
|
|
702
705
|
{
|
|
703
|
-
header:
|
|
706
|
+
header: o("connect.loyalty.card.table.actions"),
|
|
704
707
|
cell(t) {
|
|
705
|
-
return K(
|
|
708
|
+
return K(oe.FmButton, {
|
|
706
709
|
variant: "tertiary",
|
|
707
710
|
icon: "delete",
|
|
708
711
|
iconColor: "neutral-gray-400",
|
|
@@ -713,25 +716,25 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
713
716
|
});
|
|
714
717
|
}
|
|
715
718
|
}
|
|
716
|
-
], { tableMeta:
|
|
717
|
-
async function
|
|
718
|
-
var
|
|
719
|
-
await h(), (
|
|
719
|
+
], { tableMeta: p, rowData: D, onSort: I, debouncedFetchData: h, onSearch: C } = $e(L.readCards);
|
|
720
|
+
async function n(t) {
|
|
721
|
+
var l;
|
|
722
|
+
await h(t), (l = A.value) == null || l.showSheet(!1);
|
|
720
723
|
}
|
|
721
|
-
const u =
|
|
724
|
+
const u = j(() => x.isPremium ? [
|
|
722
725
|
{
|
|
723
|
-
label:
|
|
726
|
+
label: o("connect.loyalty.card.actions.create"),
|
|
724
727
|
value: "create",
|
|
725
728
|
isPrimary: !0
|
|
726
729
|
},
|
|
727
730
|
{
|
|
728
|
-
label:
|
|
731
|
+
label: o("connect.loyalty.card.actions.manage_design"),
|
|
729
732
|
value: "design",
|
|
730
733
|
isPrimary: !0
|
|
731
734
|
}
|
|
732
735
|
] : []);
|
|
733
736
|
async function r(t) {
|
|
734
|
-
await
|
|
737
|
+
await ce.remove(
|
|
735
738
|
`Are you sure you want to remove card ${t.serialNumber}?`
|
|
736
739
|
) && await E(
|
|
737
740
|
async () => {
|
|
@@ -743,7 +746,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
743
746
|
}
|
|
744
747
|
);
|
|
745
748
|
}
|
|
746
|
-
async function
|
|
749
|
+
async function b(t) {
|
|
750
|
+
if (!t || t.length === 0)
|
|
751
|
+
return;
|
|
747
752
|
const l = new Ve(), V = t.map((U) => ({
|
|
748
753
|
CardNumber: U
|
|
749
754
|
}));
|
|
@@ -760,29 +765,29 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
760
765
|
const c = (t) => {
|
|
761
766
|
var l;
|
|
762
767
|
if (t.redeemedAt) {
|
|
763
|
-
|
|
768
|
+
xe.error("Update not permitted", 2e3);
|
|
764
769
|
return;
|
|
765
770
|
}
|
|
766
|
-
(l =
|
|
771
|
+
(l = g == null ? void 0 : g.value) == null || l.showSheet(!0, t);
|
|
767
772
|
};
|
|
768
773
|
return X(async () => {
|
|
769
774
|
await T(async () => {
|
|
770
|
-
await x.readPremium(), await w.readMemberStore(), await w.readMembership(), await
|
|
775
|
+
await x.readPremium(), await w.readMemberStore(), await w.readMembership(), await n();
|
|
771
776
|
});
|
|
772
777
|
}), (t, l) => {
|
|
773
|
-
const V = v("FmPill"), U = v("FmPageHead"),
|
|
774
|
-
return m(), $(
|
|
778
|
+
const V = v("FmPill"), U = v("FmPageHead"), f = v("FmSearch"), N = v("FmButton"), q = v("FmCard");
|
|
779
|
+
return m(), $(z, null, [
|
|
775
780
|
i(U, {
|
|
776
|
-
title: e(
|
|
781
|
+
title: e(o)("connect.loyalty.card.title"),
|
|
777
782
|
actions: e(u),
|
|
778
783
|
"onClick:action": l[0] || (l[0] = (S) => {
|
|
779
|
-
var
|
|
780
|
-
console.log(S), S === "design" && ((
|
|
784
|
+
var P, O;
|
|
785
|
+
console.log(S), S === "design" && ((P = e(M)) == null || P.showSheet(!0)), S === "create" && ((O = e(A)) == null || O.showSheet(!0));
|
|
781
786
|
})
|
|
782
787
|
}, {
|
|
783
788
|
title: _(() => [
|
|
784
789
|
d("div", tt, [
|
|
785
|
-
d("span", lt, te(e(
|
|
790
|
+
d("span", lt, te(e(o)("connect.loyalty.card.title")), 1),
|
|
786
791
|
i(V, {
|
|
787
792
|
class: "ml-8",
|
|
788
793
|
variant: "premium"
|
|
@@ -792,34 +797,34 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
792
797
|
_: 1
|
|
793
798
|
}, 8, ["title", "actions"]),
|
|
794
799
|
d("div", at, [
|
|
795
|
-
e(D).length > 0 || e(D).length <= 0 && e(
|
|
796
|
-
d("div",
|
|
797
|
-
i(
|
|
800
|
+
e(D).length > 0 || e(D).length <= 0 && e(p).searchValue || e(p).pageCount > 0 ? (m(), $(z, { key: 0 }, [
|
|
801
|
+
d("div", nt, [
|
|
802
|
+
i(f, {
|
|
798
803
|
class: "mt-4",
|
|
799
|
-
modelValue: e(
|
|
804
|
+
modelValue: e(p).searchValue,
|
|
800
805
|
"onUpdate:modelValue": [
|
|
801
|
-
l[1] || (l[1] = (S) => e(
|
|
806
|
+
l[1] || (l[1] = (S) => e(p).searchValue = S),
|
|
802
807
|
e(C)
|
|
803
808
|
],
|
|
804
809
|
placeholder: "Search",
|
|
805
810
|
collapsible: ""
|
|
806
811
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
807
|
-
i(
|
|
812
|
+
i(N, {
|
|
808
813
|
icon: "ios_share",
|
|
809
814
|
variant: "tertiary",
|
|
810
|
-
onClick:
|
|
815
|
+
onClick: be(e(Fe), ["prevent"])
|
|
811
816
|
}, null, 8, ["onClick"])
|
|
812
817
|
]),
|
|
813
818
|
i(Me, {
|
|
814
|
-
loading: e(
|
|
819
|
+
loading: e(p).isLoading,
|
|
815
820
|
"row-data": e(D),
|
|
816
|
-
"row-count": e(
|
|
821
|
+
"row-count": e(p).totalRows,
|
|
817
822
|
"column-defs": s,
|
|
818
823
|
"shrink-at": !1,
|
|
819
|
-
"page-count": e(
|
|
820
|
-
"page-index": e(
|
|
821
|
-
"page-size": e(
|
|
822
|
-
onSortChange: e(
|
|
824
|
+
"page-count": e(p).pageCount,
|
|
825
|
+
"page-index": e(p).pageIndex,
|
|
826
|
+
"page-size": e(p).pageSize,
|
|
827
|
+
onSortChange: e(I),
|
|
823
828
|
onPageChange: l[2] || (l[2] = (S) => {
|
|
824
829
|
e(h)({
|
|
825
830
|
pageSize: S.pageSize,
|
|
@@ -836,18 +841,18 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
836
841
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
837
842
|
}, {
|
|
838
843
|
default: _(() => [
|
|
839
|
-
l[
|
|
840
|
-
src:
|
|
844
|
+
l[8] || (l[8] = d("img", {
|
|
845
|
+
src: ve,
|
|
841
846
|
class: "aspect-square w-[150px]"
|
|
842
847
|
}, null, -1)),
|
|
843
|
-
d("div",
|
|
844
|
-
d("div", st, te(e(
|
|
845
|
-
d("div", it, te(e(
|
|
848
|
+
d("div", ot, [
|
|
849
|
+
d("div", st, te(e(o)("connect.loyalty.card.empty_state.title")), 1),
|
|
850
|
+
d("div", it, te(e(o)("connect.loyalty.card.empty_state.description")), 1)
|
|
846
851
|
]),
|
|
847
852
|
d("div", rt, [
|
|
848
|
-
i(
|
|
853
|
+
i(N, {
|
|
849
854
|
variant: "primary",
|
|
850
|
-
label: e(
|
|
855
|
+
label: e(o)("connect.loyalty.card.actions.add"),
|
|
851
856
|
icon: "add",
|
|
852
857
|
disabled: !e(x).isPremium,
|
|
853
858
|
onClick: l[4] || (l[4] = () => {
|
|
@@ -855,9 +860,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
855
860
|
return (S = e(A)) == null ? void 0 : S.showSheet(!0);
|
|
856
861
|
})
|
|
857
862
|
}, null, 8, ["label", "disabled"]),
|
|
858
|
-
i(
|
|
863
|
+
i(N, {
|
|
859
864
|
variant: "secondary",
|
|
860
|
-
label: e(
|
|
865
|
+
label: e(o)("connect.loyalty.card.actions.manage_design"),
|
|
861
866
|
disabled: !e(x).isPremium,
|
|
862
867
|
onClick: l[5] || (l[5] = () => {
|
|
863
868
|
var S;
|
|
@@ -871,20 +876,23 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, N
|
|
|
871
876
|
i(Ee, {
|
|
872
877
|
ref_key: "sheetRef",
|
|
873
878
|
ref: A,
|
|
874
|
-
onSuccess:
|
|
875
|
-
onExport:
|
|
879
|
+
onSuccess: l[6] || (l[6] = (S) => n()),
|
|
880
|
+
onExport: b
|
|
876
881
|
}, null, 512),
|
|
877
882
|
i(et, {
|
|
878
883
|
ref_key: "designSheetRef",
|
|
879
884
|
ref: M,
|
|
880
|
-
onSuccess:
|
|
885
|
+
onSuccess: n
|
|
881
886
|
}, null, 512),
|
|
882
887
|
i(Qe, {
|
|
883
888
|
ref_key: "editSheetRef",
|
|
884
|
-
ref:
|
|
885
|
-
onSuccess: l[
|
|
886
|
-
var
|
|
887
|
-
|
|
889
|
+
ref: g,
|
|
890
|
+
onSuccess: l[7] || (l[7] = (S) => {
|
|
891
|
+
var P;
|
|
892
|
+
n({
|
|
893
|
+
pageSize: e(p).pageSize,
|
|
894
|
+
pageIndex: e(p).pageIndex
|
|
895
|
+
}), (P = e(g)) == null || P.showSheet(!1);
|
|
888
896
|
})
|
|
889
897
|
}, null, 512)
|
|
890
898
|
])
|