@feedmepos/mf-connect 0.1.28-prod → 0.1.29-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-2fPCInDE.js → Analytic-CkA1O1Uh.js} +11 -11
- package/dist/{App-BJlRD4KH.js → App-BHlf_GQm.js} +6 -6
- package/dist/{Bin-DWd2_II3.js → Bin-Dr987NJ0.js} +8 -8
- package/dist/{Broadcast-DTbF5YQn.js → Broadcast-TftnQM_h.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-TIRZoc43.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DXHb61OC.js} +6 -6
- package/dist/{Card-BUGQEdCK.js → Card-BLs3SRFv.js} +207 -199
- package/dist/{Collections-BjomDHYg.js → Collections-9JzsFEP7.js} +6 -6
- package/dist/{Credit-BUK4Aw0m.js → Credit-DIZjbSeY.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-gWvjwFiR.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxlXDzRw.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DvTrxSnL.js → EffectSheet.vue_vue_type_style_index_0_lang-CwXOV6Vf.js} +6 -6
- package/dist/{Experience-DsQIdK9t.js → Experience-CIwm4Fre.js} +9 -9
- package/dist/{Game-BLbN3Z6v.js → Game-PduMdYBR.js} +10 -10
- package/dist/{Index-CzIILYvi.js → Index-BImFPZXf.js} +10 -10
- package/dist/{Marketing-xoRpWZfv.js → Marketing-ydMa5_On.js} +6 -6
- package/dist/{Member-DInHHwad.js → Member-CNYJE941.js} +5 -5
- package/dist/{MemberList-DF8tkFDT.js → MemberList-DjoN-U-S.js} +28 -25
- package/dist/{MemberTransactions-C-pbBsve.js → MemberTransactions-C_YetdLU.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CHq9xXiP.js → MessageInput.vue_vue_type_script_setup_true_lang-Bh72C8N2.js} +3 -3
- package/dist/{Mission-BAxHgOAl.js → Mission-DXcdYhfu.js} +10 -10
- package/dist/{Overview-BWyUMlCT.js → Overview-BcPXiS1g.js} +17 -17
- package/dist/{Point-CGzCftO5.js → Point-BDM_5PIq.js} +9 -9
- package/dist/{Promotion-BHB6CTXq.js → Promotion-DKRKTgxZ.js} +10 -10
- package/dist/{Queue-BMqt4siy.js → Queue-Bjd6wjUV.js} +9 -9
- package/dist/{Record-DisW68Yh.js → Record-COHOI_f_.js} +7 -7
- package/dist/{Reward-C7XavzIk.js → Reward-D7iUw3Gs.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BYknroSK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DNKpfEiJ.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D_-qtGyk.js → RuleGroup.vue_vue_type_script_setup_true_lang-DkK1pH01.js} +12 -12
- package/dist/{Segment-Cam05pCr.js → Segment-C1rHkihX.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-b4AoknE_.js → SelectItems.vue_vue_type_script_setup_true_lang-CkBwv7xG.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BqssLYLl.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DN9cCPNd.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Evq0vBoE.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CTFH-nGD.js} +3 -3
- package/dist/{Setting-DliMpeMz.js → Setting-Cf5gvAjJ.js} +10 -10
- package/dist/{Store-Cgkw-xg6.js → Store-DwkQY-jX.js} +18 -18
- package/dist/{StoreRewards-Dfo00Fc6.js → StoreRewards-B_AGKuru.js} +14 -14
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DK4q2v-U.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BQ0QBfdl.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CiApy4Rx.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-bA8FwalI.js} +1 -1
- package/dist/{Tier-CkZhMC3f.js → Tier-BuGHUUYf.js} +19 -19
- package/dist/{Title-DXtRRsGh.js → Title-Cny4NFqu.js} +19 -19
- package/dist/{Transaction-BALNjNz6.js → Transaction-CDT4mXJR.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DhTilYic.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DSRS-tL8.js} +6 -6
- package/dist/{Voucher-C4AN27lq.js → Voucher-DY117z6T.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DT-iQjFb.js → VoucherEditor.vue_vue_type_script_setup_true_lang-P-0nP6eb.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BmtZwFSs.js → ZodTextField.vue_vue_type_script_setup_true_lang-BVQF2noO.js} +1 -1
- package/dist/{app-Cex8lJkz.js → app-CJF5Y3Dr.js} +30 -30
- package/dist/{app-CrWyzn6D.js → app-DTXf3Mm_.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-B41gNDWn.js → business-BHnteTXy.js} +1 -1
- package/dist/{campaign-DyRorn8y.js → campaign-CwGSvZYW.js} +9 -9
- package/dist/{campaign-D8Jb8Mcs.js → campaign-DoxVD2uO.js} +2 -2
- package/dist/{campaign.enum-D1WvicXa.js → campaign.enum-DLHB7cAH.js} +1 -1
- package/dist/{campaign.fn-WZL8m77q.js → campaign.fn-Di02vBKd.js} +22 -22
- package/dist/{collectible.enum-2SqtWORg.js → collectible.enum-C9ghJIA4.js} +1 -1
- package/dist/{collection.fn-BGBiIa3-.js → collection.fn-b0xmTJ4W.js} +2 -2
- package/dist/{dto-CziQ3YR8.js → dto-Cg9me1XW.js} +4 -4
- package/dist/{effect-DOhxTMbD.js → effect-Bso4BkMG.js} +1 -1
- package/dist/{email-addresses-B2-IyW9d.js → email-addresses-DqHCKfGA.js} +1 -1
- package/dist/{export-DijV-thU.js → export-CB9mh5Cw.js} +3 -3
- package/dist/{helper-DZ475418.js → helper-D2GxvAMc.js} +1 -1
- package/dist/{index-BjzAAlhX.js → index-3dKoixuN.js} +3 -3
- package/dist/{index-vThFTWos.js → index-BldljofW.js} +1 -1
- package/dist/{index-DqsQDq21.js → index-C6vrlTRO.js} +6 -6
- package/dist/{index-vy13Kvq1.js → index-CHquWWSh.js} +1 -1
- package/dist/{index-gfPyiFc5.js → index-CJziM0aw.js} +3 -3
- package/dist/{index-CDc5NEE9.js → index-CU5llufZ.js} +1 -1
- package/dist/{index-BHnFFWRj.js → index-Cknfb8EN.js} +1 -1
- package/dist/{index-DgyH5BiA.js → index-DJ3wfAH1.js} +1 -1
- package/dist/{index-D2q6nQsP.js → index-DKyPYryu.js} +5 -5
- package/dist/{index-BhF5Q6I1.js → index-DyYLFAHN.js} +1 -1
- package/dist/{index-JaOBn64e.js → index-WfBtvzb0.js} +1 -1
- package/dist/{index-mHvARg87.js → index-o-NzB9Ix.js} +2 -2
- package/dist/{index.esm2017-DrOnmEcN.js → index.esm2017-BWvG9_DK.js} +1 -1
- package/dist/{loading-B090b_ce.js → loading-C7ixfrJi.js} +1 -1
- package/dist/{membership-BnjHoHZJ.js → membership-kUqTSnXW.js} +3 -3
- package/dist/{money-D-ZRd8_2.js → money-T7HsQBdt.js} +1 -1
- package/dist/{number-cKAn8ky6.js → number-BcSuRBND.js} +1 -1
- package/dist/{objectid-C5bLDGr_.js → objectid-1d04GOL9.js} +5 -5
- package/dist/{plugins-CyX08GLM.js → plugins-C8JkzTl1.js} +4 -4
- package/dist/{reward-Dg-9sn2_.js → reward-WdE3Zf7M.js} +1 -1
- package/dist/{rule-Bnl3DQZ7.js → rule-D26tPptJ.js} +3 -3
- package/dist/{rule-builder-B75aU3HN.js → rule-builder-DvrSDJI2.js} +1 -1
- package/dist/{template-CMSQsYm3.js → template-yfjP4Jle.js} +4 -4
- package/dist/{trigger-BkZU9Cr9.js → trigger-DA4XTGeL.js} +4 -4
- package/dist/{user-DR35Lmlo.js → user-BtDL5G9i.js} +1 -1
- package/dist/{vue-i18n-B4XGvfnw.js → vue-i18n-ifcVQ_Hg.js} +287 -287
- package/dist/{xlsx-C15yLkMd.js → xlsx-JaUdcjvV.js} +1 -1
- package/package.json +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as y, computed as E, watch as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { h as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import { p as
|
|
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 E, watch as fe, onMounted as X, resolveComponent as v, openBlock as m, createBlock as F, unref as e, isRef as G, withCtx as C, 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 { p as me, f as se, n as _e } from "./plugins-C8JkzTl1.js";
|
|
6
|
+
import { u as J } from "./loading-C7ixfrJi.js";
|
|
7
|
+
import { u as ce } from "./app-wDQR6dpb.js";
|
|
8
|
+
import { u as W } from "./membership-kUqTSnXW.js";
|
|
9
9
|
import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
|
|
10
|
-
import { m as L } from "./index-
|
|
11
|
-
import { z as
|
|
12
|
-
import { Z as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { i as xe } from "./index-
|
|
15
|
-
import "./index-
|
|
16
|
-
import "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import { O as he } from "./objectid-
|
|
10
|
+
import { m as L } from "./index-Cknfb8EN.js";
|
|
11
|
+
import { z as ie } from "./app-CJF5Y3Dr.js";
|
|
12
|
+
import { Z as re } from "./zod-Bg2FbC-D.js";
|
|
13
|
+
import { _ as de } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
|
|
14
|
+
import { i as xe } from "./index-DKyPYryu.js";
|
|
15
|
+
import "./index-o-NzB9Ix.js";
|
|
16
|
+
import "./index-C6vrlTRO.js";
|
|
17
|
+
import "./index-CHquWWSh.js";
|
|
18
|
+
import "./index-3dKoixuN.js";
|
|
19
|
+
import { O as he } from "./objectid-1d04GOL9.js";
|
|
20
20
|
import { a as Ce, c as Se } from "./object-qECH92oz.js";
|
|
21
|
-
import { u as we } from "./business-
|
|
22
|
-
import { w as ke } from "./xlsx-
|
|
23
|
-
import { a as Fe, C as Ve } from "./export-
|
|
21
|
+
import { u as we } from "./business-BHnteTXy.js";
|
|
22
|
+
import { w as ke } from "./xlsx-JaUdcjvV.js";
|
|
23
|
+
import { a as Fe, C as Ve } from "./export-CB9mh5Cw.js";
|
|
24
24
|
import { u as $e, _ as Me } from "./usePagination-JoYaROkV.js";
|
|
25
|
-
import { u as Be } from "./vue-i18n-
|
|
25
|
+
import { u as Be } from "./vue-i18n-ifcVQ_Hg.js";
|
|
26
26
|
import { o as Ue } from "./objectId-dwaoBfJX.js";
|
|
27
|
-
const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1), Ae = { class: "space-y-16" },
|
|
27
|
+
const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1), Ae = { class: "space-y-16" }, Ie = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1), Ne = { class: "gap-16 grid grid-cols-2" }, Pe = { class: "space-y-16" }, Re = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1), qe = {
|
|
28
28
|
key: 0,
|
|
29
29
|
class: "flex flex-col gap-[16px] w-full"
|
|
30
30
|
}, ze = { class: "flex flex-col gap-[8px]" }, Ee = /* @__PURE__ */ d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1), je = ["src"], Te = { class: "flex pt-[24px] gap-[24px]" }, Le = ["src", "onClick", "alt"], Oe = { class: "flex items-center gap-8" }, Ye = /* @__PURE__ */ Z({
|
|
31
31
|
__name: "CreateCardSheet",
|
|
32
32
|
emits: ["success", "export"],
|
|
33
33
|
setup(ee, { expose: j, emit: T }) {
|
|
34
|
-
const { minor: A } = J,
|
|
34
|
+
const { minor: A } = J, g = W(), M = y(), _ = y(!1), w = T, n = y(!1);
|
|
35
35
|
function B(c) {
|
|
36
|
-
|
|
36
|
+
n.value = c, c && (s.value = {
|
|
37
37
|
quantity: 1,
|
|
38
38
|
code: "",
|
|
39
39
|
codeConfig: {
|
|
@@ -57,7 +57,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
57
57
|
},
|
|
58
58
|
setCardOnBind: !1,
|
|
59
59
|
bundle: void 0
|
|
60
|
-
}),
|
|
60
|
+
}), p = [
|
|
61
61
|
{
|
|
62
62
|
label: "Bulk number",
|
|
63
63
|
value: "bulk",
|
|
@@ -81,19 +81,19 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
81
81
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
82
82
|
{ label: "Numbers", value: "0123456789" },
|
|
83
83
|
{ label: "Custom", value: "" }
|
|
84
|
-
],
|
|
84
|
+
], I = y(D[0].value), S = y("bulk"), x = y(0), o = E(
|
|
85
85
|
() => {
|
|
86
86
|
var c;
|
|
87
|
-
return (c =
|
|
87
|
+
return (c = g.membership.design) == null ? void 0 : c[x.value];
|
|
88
88
|
}
|
|
89
89
|
), u = y(!1), r = E(
|
|
90
|
-
() =>
|
|
90
|
+
() => g.sortedStoreCategories.flatMap((c) => c.bundles)
|
|
91
91
|
);
|
|
92
|
-
async function
|
|
92
|
+
async function b(c) {
|
|
93
93
|
var l, V;
|
|
94
94
|
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !_.value) return;
|
|
95
|
-
c.design = (V =
|
|
96
|
-
const t = await
|
|
95
|
+
c.design = (V = o.value) == null ? void 0 : V.image;
|
|
96
|
+
const t = await me.confirm(
|
|
97
97
|
"",
|
|
98
98
|
"Do you want to export generated card(s)?",
|
|
99
99
|
"Export",
|
|
@@ -112,37 +112,37 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
112
112
|
}
|
|
113
113
|
return j({
|
|
114
114
|
showSheet: B
|
|
115
|
-
}),
|
|
115
|
+
}), fe(
|
|
116
116
|
() => s.value.codeConfig.length,
|
|
117
117
|
(c, t) => {
|
|
118
118
|
c != t && (s.value.codeConfig.pattern = "#".repeat(Number(c)));
|
|
119
119
|
}
|
|
120
120
|
), X(async () => {
|
|
121
|
-
await
|
|
121
|
+
await g.readMemberStore();
|
|
122
122
|
}), (c, t) => {
|
|
123
|
-
const l = v("FmRadio"), V = v("FmRadioGroup"), U = v("FmSwitch"),
|
|
124
|
-
return m(), F(
|
|
123
|
+
const l = v("FmRadio"), V = v("FmRadioGroup"), U = v("FmSwitch"), f = v("FmStepperField"), N = v("FmSelect"), q = v("FmTextField"), h = v("FmTextarea"), P = v("FmButton"), O = v("FmForm"), pe = v("FmSideSheet");
|
|
124
|
+
return m(), F(pe, {
|
|
125
125
|
"max-width": 560,
|
|
126
126
|
"dismiss-away": !0,
|
|
127
127
|
header: "Create collection",
|
|
128
|
-
modelValue: e(
|
|
128
|
+
modelValue: e(n),
|
|
129
129
|
"onUpdate:modelValue": [
|
|
130
|
-
t[19] || (t[19] = (R) => G(
|
|
131
|
-
t[20] || (t[20] = (R) =>
|
|
130
|
+
t[19] || (t[19] = (R) => G(n) ? n.value = R : null),
|
|
131
|
+
t[20] || (t[20] = (R) => n.value = R)
|
|
132
132
|
]
|
|
133
133
|
}, {
|
|
134
134
|
"side-sheet-footer": C(() => [
|
|
135
135
|
d("div", Oe, [
|
|
136
|
-
i(
|
|
136
|
+
i(P, {
|
|
137
137
|
label: "Save",
|
|
138
|
-
onClick: t[17] || (t[17] = (R) =>
|
|
139
|
-
loading: e(
|
|
138
|
+
onClick: t[17] || (t[17] = (R) => b(e(s))),
|
|
139
|
+
loading: e(ce)().isLoading
|
|
140
140
|
}, null, 8, ["loading"]),
|
|
141
|
-
i(
|
|
141
|
+
i(P, {
|
|
142
142
|
label: "Cancel",
|
|
143
143
|
type: "button",
|
|
144
144
|
variant: "tertiary",
|
|
145
|
-
onClick: t[18] || (t[18] = (R) =>
|
|
145
|
+
onClick: t[18] || (t[18] = (R) => n.value = !1)
|
|
146
146
|
})
|
|
147
147
|
])
|
|
148
148
|
]),
|
|
@@ -165,7 +165,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
165
165
|
inline: !1
|
|
166
166
|
}, {
|
|
167
167
|
default: C(() => [
|
|
168
|
-
(m(), $(z, null, H(
|
|
168
|
+
(m(), $(z, null, H(p, (a) => i(l, {
|
|
169
169
|
key: a.value,
|
|
170
170
|
value: a.value,
|
|
171
171
|
label: a.label,
|
|
@@ -176,7 +176,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
176
176
|
}, 8, ["modelValue"])
|
|
177
177
|
]),
|
|
178
178
|
d("div", Ae, [
|
|
179
|
-
|
|
179
|
+
Ie,
|
|
180
180
|
e(S) === "bulk" ? (m(), $(z, { key: 0 }, [
|
|
181
181
|
i(U, {
|
|
182
182
|
"model-value": e(u),
|
|
@@ -187,30 +187,30 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
187
187
|
"onUpdate:modelValue": t[1] || (t[1] = () => u.value = !e(u))
|
|
188
188
|
}, null, 8, ["model-value"]),
|
|
189
189
|
e(u) ? (m(), $(z, { key: 0 }, [
|
|
190
|
-
i(
|
|
190
|
+
i(f, {
|
|
191
191
|
"model-value": e(s).codeConfig.length || null,
|
|
192
192
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => e(s).codeConfig.length = a),
|
|
193
193
|
label: "Code length",
|
|
194
194
|
rules: [(a) => Number(a) >= 1 || "Code length must at least 1"],
|
|
195
195
|
required: !0
|
|
196
196
|
}, null, 8, ["model-value", "rules"]),
|
|
197
|
-
i(
|
|
197
|
+
i(N, {
|
|
198
198
|
label: "Charset",
|
|
199
|
-
"model-value": e(
|
|
199
|
+
"model-value": e(I),
|
|
200
200
|
items: D,
|
|
201
201
|
"helper-text": e(s).codeConfig.charset.length > 62 ? `${e(s).codeConfig.charset.substring(0, 62)}...` : e(s).codeConfig.charset,
|
|
202
202
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => {
|
|
203
|
-
|
|
203
|
+
I.value = a, e(s).codeConfig.charset = a;
|
|
204
204
|
})
|
|
205
205
|
}, null, 8, ["model-value", "helper-text"]),
|
|
206
|
-
e(
|
|
206
|
+
e(I) === "" ? (m(), F(q, {
|
|
207
207
|
key: 0,
|
|
208
208
|
modelValue: e(s).codeConfig.charset,
|
|
209
209
|
"onUpdate:modelValue": t[4] || (t[4] = (a) => e(s).codeConfig.charset = a),
|
|
210
210
|
label: "Custom Charset",
|
|
211
211
|
required: ""
|
|
212
212
|
}, null, 8, ["modelValue"])) : k("", !0),
|
|
213
|
-
d("div",
|
|
213
|
+
d("div", Ne, [
|
|
214
214
|
i(q, {
|
|
215
215
|
modelValue: e(s).codeConfig.prefix,
|
|
216
216
|
"onUpdate:modelValue": t[5] || (t[5] = (a) => e(s).codeConfig.prefix = a),
|
|
@@ -250,7 +250,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
250
250
|
placeholder: "(For multiple numbers, please enter in the new row.)"
|
|
251
251
|
}, null, 8, ["modelValue", "rules"])) : k("", !0)
|
|
252
252
|
]),
|
|
253
|
-
d("div",
|
|
253
|
+
d("div", Pe, [
|
|
254
254
|
Re,
|
|
255
255
|
i(U, {
|
|
256
256
|
"label-placement": "right",
|
|
@@ -266,7 +266,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
266
266
|
"onUpdate:modelValue": t[12] || (t[12] = (a) => e(s).bundle = a)
|
|
267
267
|
}, {
|
|
268
268
|
append: C(() => [
|
|
269
|
-
e(s).bundle ? (m(), F(
|
|
269
|
+
e(s).bundle ? (m(), F(P, {
|
|
270
270
|
key: 0,
|
|
271
271
|
icon: "link_off",
|
|
272
272
|
variant: "plain",
|
|
@@ -275,7 +275,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
275
275
|
]),
|
|
276
276
|
_: 1
|
|
277
277
|
}, 8, ["items", "modelValue"]),
|
|
278
|
-
(le = (R = e(
|
|
278
|
+
(le = (R = e(g).store) == null ? void 0 : R.stripe) != null && le.apiKey ? (m(), F(Q, {
|
|
279
279
|
key: 0,
|
|
280
280
|
label: "Linked subscription bundle",
|
|
281
281
|
placeholder: "Select bundle",
|
|
@@ -284,7 +284,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
284
284
|
"onUpdate:modelValue": t[14] || (t[14] = (a) => e(s).subscriptionBundle = a)
|
|
285
285
|
}, {
|
|
286
286
|
append: C(() => [
|
|
287
|
-
e(s).subscriptionBundle ? (m(), F(
|
|
287
|
+
e(s).subscriptionBundle ? (m(), F(P, {
|
|
288
288
|
key: 0,
|
|
289
289
|
icon: "link_off",
|
|
290
290
|
variant: "plain",
|
|
@@ -294,19 +294,19 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
294
294
|
_: 1
|
|
295
295
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
296
296
|
]),
|
|
297
|
-
e(
|
|
297
|
+
e(g).membership.design ? (m(), $("div", qe, [
|
|
298
298
|
d("div", ze, [
|
|
299
299
|
Ee,
|
|
300
300
|
d("img", {
|
|
301
|
-
src: (ae = e(
|
|
301
|
+
src: (ae = e(o)) == null ? void 0 : ae.image,
|
|
302
302
|
class: "aspect-[16/9]"
|
|
303
303
|
}, null, 8, je),
|
|
304
304
|
d("div", Te, [
|
|
305
|
-
(m(!0), $(z, null, H(e(
|
|
305
|
+
(m(!0), $(z, null, H(e(g).membership.design, (a, Y) => (m(), $("img", {
|
|
306
306
|
src: a.image,
|
|
307
307
|
key: `image_${Y}`,
|
|
308
|
-
class:
|
|
309
|
-
onClick: (
|
|
308
|
+
class: ue(["w-[112px] h-[63px] cursor-pointer", `${e(x) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
309
|
+
onClick: (bt) => x.value = Y,
|
|
310
310
|
alt: `ai_image_predict_${Y}`,
|
|
311
311
|
style: { objectFit: "cover" }
|
|
312
312
|
}, null, 10, Le))), 128))
|
|
@@ -329,30 +329,30 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
329
329
|
__name: "EditCardSheet",
|
|
330
330
|
emits: ["success"],
|
|
331
331
|
setup(ee, { expose: j, emit: T }) {
|
|
332
|
-
const { minor: A } = J,
|
|
332
|
+
const { minor: A } = J, g = W(), M = y(), _ = y(!1), w = T, n = y({
|
|
333
333
|
_id: "",
|
|
334
334
|
business: "",
|
|
335
335
|
serialNumber: ""
|
|
336
336
|
}), B = y(!1);
|
|
337
|
-
function s(x,
|
|
337
|
+
function s(x, o) {
|
|
338
338
|
var u;
|
|
339
|
-
B.value = x, x &&
|
|
340
|
-
(r) => r.image ===
|
|
339
|
+
B.value = x, x && o && (n.value = o, p.value = (u = g.membership.design) == null ? void 0 : u.findIndex(
|
|
340
|
+
(r) => r.image === o.design
|
|
341
341
|
));
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const p = y(0), D = E(
|
|
344
344
|
() => {
|
|
345
345
|
var x;
|
|
346
|
-
return (x =
|
|
346
|
+
return (x = g.membership.design) == null ? void 0 : x[p.value];
|
|
347
347
|
}
|
|
348
|
-
),
|
|
349
|
-
() =>
|
|
348
|
+
), I = E(
|
|
349
|
+
() => g.sortedStoreCategories.flatMap(
|
|
350
350
|
(x) => x.bundles
|
|
351
351
|
)
|
|
352
352
|
);
|
|
353
353
|
async function S(x) {
|
|
354
|
-
var
|
|
355
|
-
await ((
|
|
354
|
+
var o, u;
|
|
355
|
+
await ((o = M.value) == null ? void 0 : o.validateInputs()), _.value && (x.design = (u = D.value) == null ? void 0 : u.image, await A(
|
|
356
356
|
async () => {
|
|
357
357
|
await L.updateCard(x), await w("success");
|
|
358
358
|
},
|
|
@@ -365,32 +365,32 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
365
365
|
return j({
|
|
366
366
|
showSheet: s
|
|
367
367
|
}), X(async () => {
|
|
368
|
-
await
|
|
369
|
-
}), (x,
|
|
370
|
-
const u = v("FmTextField"), r = v("FmSwitch"),
|
|
368
|
+
await g.readMemberStore();
|
|
369
|
+
}), (x, o) => {
|
|
370
|
+
const u = v("FmTextField"), r = v("FmSwitch"), b = v("FmButton"), c = v("FmForm"), t = v("FmSideSheet");
|
|
371
371
|
return m(), F(t, {
|
|
372
372
|
"max-width": 560,
|
|
373
373
|
"dismiss-away": !0,
|
|
374
374
|
header: "Edit card",
|
|
375
375
|
modelValue: e(B),
|
|
376
376
|
"onUpdate:modelValue": [
|
|
377
|
-
|
|
378
|
-
|
|
377
|
+
o[10] || (o[10] = (l) => G(B) ? B.value = l : null),
|
|
378
|
+
o[11] || (o[11] = (l) => B.value = l)
|
|
379
379
|
]
|
|
380
380
|
}, {
|
|
381
381
|
"side-sheet-footer": C(() => [
|
|
382
382
|
d("div", et, [
|
|
383
|
-
i(
|
|
383
|
+
i(b, {
|
|
384
384
|
label: "Save",
|
|
385
|
-
disabled: !!e(
|
|
386
|
-
onClick:
|
|
387
|
-
loading: e(
|
|
385
|
+
disabled: !!e(n).redeemedAt,
|
|
386
|
+
onClick: o[8] || (o[8] = (l) => S(e(n))),
|
|
387
|
+
loading: e(ce)().isLoading
|
|
388
388
|
}, null, 8, ["disabled", "loading"]),
|
|
389
|
-
i(
|
|
389
|
+
i(b, {
|
|
390
390
|
label: "Cancel",
|
|
391
391
|
type: "button",
|
|
392
392
|
variant: "tertiary",
|
|
393
|
-
onClick:
|
|
393
|
+
onClick: o[9] || (o[9] = (l) => B.value = !1)
|
|
394
394
|
})
|
|
395
395
|
])
|
|
396
396
|
]),
|
|
@@ -399,19 +399,22 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
399
399
|
ref_key: "form",
|
|
400
400
|
ref: M,
|
|
401
401
|
class: "space-y-40",
|
|
402
|
-
onValidationSuccess:
|
|
403
|
-
onValidationFailed:
|
|
402
|
+
onValidationSuccess: o[6] || (o[6] = (l) => _.value = !0),
|
|
403
|
+
onValidationFailed: o[7] || (o[7] = (l) => _.value = !1)
|
|
404
404
|
}, {
|
|
405
405
|
default: C(() => {
|
|
406
406
|
var l, V, U;
|
|
407
407
|
return [
|
|
408
408
|
d("div", Ke, [
|
|
409
409
|
i(u, {
|
|
410
|
-
modelValue: e(
|
|
411
|
-
"onUpdate:modelValue":
|
|
410
|
+
modelValue: e(n).serialNumber,
|
|
411
|
+
"onUpdate:modelValue": o[0] || (o[0] = (f) => e(n).serialNumber = f),
|
|
412
412
|
label: "Card Number",
|
|
413
413
|
rules: [
|
|
414
|
-
e(
|
|
414
|
+
e(re).toRule(e(ie).string().min(1, "Card number is required")),
|
|
415
|
+
e(re).toRule(
|
|
416
|
+
e(ie).string().max(50, "Card number must be less than 50 characters")
|
|
417
|
+
)
|
|
415
418
|
],
|
|
416
419
|
required: !0
|
|
417
420
|
}, null, 8, ["modelValue", "rules"]),
|
|
@@ -419,46 +422,46 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
419
422
|
i(r, {
|
|
420
423
|
"label-placement": "right",
|
|
421
424
|
label: "Set card number on bind",
|
|
422
|
-
"model-value": e(
|
|
423
|
-
"onUpdate:modelValue":
|
|
425
|
+
"model-value": e(n).setCardOnBind || !1,
|
|
426
|
+
"onUpdate:modelValue": o[1] || (o[1] = (f) => e(n).setCardOnBind = f)
|
|
424
427
|
}, null, 8, ["model-value"]),
|
|
425
428
|
i(Q, {
|
|
426
429
|
label: "Activate bundle on bind",
|
|
427
430
|
placeholder: "Select bundle",
|
|
428
|
-
items: e(
|
|
429
|
-
modelValue: e(
|
|
430
|
-
"onUpdate:modelValue":
|
|
431
|
+
items: e(I).filter((f) => !f.stripePriceId).map((f) => ({ label: f.name, value: f._id })),
|
|
432
|
+
modelValue: e(n).bundle,
|
|
433
|
+
"onUpdate:modelValue": o[3] || (o[3] = (f) => e(n).bundle = f)
|
|
431
434
|
}, {
|
|
432
435
|
append: C(() => [
|
|
433
|
-
e(
|
|
436
|
+
e(n).bundle ? (m(), F(b, {
|
|
434
437
|
key: 0,
|
|
435
438
|
icon: "link_off",
|
|
436
439
|
variant: "plain",
|
|
437
|
-
onClick:
|
|
440
|
+
onClick: o[2] || (o[2] = (f) => e(n).bundle = null)
|
|
438
441
|
})) : k("", !0)
|
|
439
442
|
]),
|
|
440
443
|
_: 1
|
|
441
444
|
}, 8, ["items", "modelValue"]),
|
|
442
|
-
(V = (l = e(
|
|
445
|
+
(V = (l = e(g).store) == null ? void 0 : l.stripe) != null && V.apiKey ? (m(), F(Q, {
|
|
443
446
|
key: 0,
|
|
444
447
|
label: "Linked subscription bundle",
|
|
445
448
|
placeholder: "Select bundle",
|
|
446
|
-
items: e(
|
|
447
|
-
modelValue: e(
|
|
448
|
-
"onUpdate:modelValue":
|
|
449
|
+
items: e(I).filter((f) => f.stripePriceId).map((f) => ({ label: f.name, value: f._id })),
|
|
450
|
+
modelValue: e(n).subscriptionBundle,
|
|
451
|
+
"onUpdate:modelValue": o[5] || (o[5] = (f) => e(n).subscriptionBundle = f)
|
|
449
452
|
}, {
|
|
450
453
|
append: C(() => [
|
|
451
|
-
e(
|
|
454
|
+
e(n).subscriptionBundle ? (m(), F(b, {
|
|
452
455
|
key: 0,
|
|
453
456
|
icon: "link_off",
|
|
454
457
|
variant: "plain",
|
|
455
|
-
onClick:
|
|
458
|
+
onClick: o[4] || (o[4] = (f) => e(n).subscriptionBundle = null)
|
|
456
459
|
})) : k("", !0)
|
|
457
460
|
]),
|
|
458
461
|
_: 1
|
|
459
462
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
460
463
|
]),
|
|
461
|
-
e(
|
|
464
|
+
e(g).membership.design ? (m(), $("div", He, [
|
|
462
465
|
d("div", Qe, [
|
|
463
466
|
Ze,
|
|
464
467
|
d("img", {
|
|
@@ -466,12 +469,12 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
466
469
|
class: "aspect-[16/9]"
|
|
467
470
|
}, null, 8, Xe),
|
|
468
471
|
d("div", Je, [
|
|
469
|
-
(m(!0), $(z, null, H(e(
|
|
470
|
-
src:
|
|
471
|
-
key: `image_${
|
|
472
|
-
class:
|
|
473
|
-
onClick: (q) =>
|
|
474
|
-
alt: `ai_image_predict_${
|
|
472
|
+
(m(!0), $(z, null, H(e(g).membership.design, (f, N) => (m(), $("img", {
|
|
473
|
+
src: f.image,
|
|
474
|
+
key: `image_${N}`,
|
|
475
|
+
class: ue(["w-[112px] h-[63px] cursor-pointer", `${e(p) === N ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
476
|
+
onClick: (q) => p.value = N,
|
|
477
|
+
alt: `ai_image_predict_${N}`,
|
|
475
478
|
style: { objectFit: "cover" }
|
|
476
479
|
}, null, 10, We))), 128))
|
|
477
480
|
])
|
|
@@ -489,43 +492,43 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
489
492
|
}), lt = {
|
|
490
493
|
key: 0,
|
|
491
494
|
class: "grid grid-cols-1 gap-8"
|
|
492
|
-
}, at = { class: "flex items-center gap-8" },
|
|
495
|
+
}, at = { class: "flex items-center gap-8" }, nt = { class: "flex items-center gap-8" }, ot = 5, st = /* @__PURE__ */ Z({
|
|
493
496
|
__name: "CardDesignSheet",
|
|
494
497
|
emits: ["success"],
|
|
495
498
|
setup(ee, { expose: j, emit: T }) {
|
|
496
|
-
const { minor: A } = J,
|
|
499
|
+
const { minor: A } = J, g = W(), M = ye(), _ = y(!1);
|
|
497
500
|
y(), y(!1);
|
|
498
|
-
const w = y(),
|
|
501
|
+
const w = y(), n = y(null);
|
|
499
502
|
E(() => {
|
|
500
503
|
var u, r;
|
|
501
|
-
return Math.min((((r = (u = w.value) == null ? void 0 : u.design) == null ? void 0 : r.length) ?? 0) + 1,
|
|
504
|
+
return Math.min((((r = (u = w.value) == null ? void 0 : u.design) == null ? void 0 : r.length) ?? 0) + 1, ot);
|
|
502
505
|
});
|
|
503
506
|
const B = T, s = E(() => {
|
|
504
507
|
var u, r;
|
|
505
|
-
return ((r = (u =
|
|
506
|
-
}),
|
|
508
|
+
return ((r = (u = g.membership) == null ? void 0 : u.design) == null ? void 0 : r.filter((b) => b.image)) || [];
|
|
509
|
+
}), p = y(!1);
|
|
507
510
|
function D(u) {
|
|
508
|
-
|
|
511
|
+
p.value = u;
|
|
509
512
|
}
|
|
510
|
-
function
|
|
513
|
+
function I() {
|
|
511
514
|
_.value = !0;
|
|
512
515
|
}
|
|
513
516
|
async function S() {
|
|
514
517
|
await A(
|
|
515
518
|
async () => {
|
|
516
|
-
var
|
|
519
|
+
var b;
|
|
517
520
|
const u = Ce(w.value), r = xe.parse(u);
|
|
518
|
-
if (r.design = (r == null ? void 0 : r.design) || [],
|
|
521
|
+
if (r.design = (r == null ? void 0 : r.design) || [], n.value) {
|
|
519
522
|
const c = he().toHexString(), t = await se.update(
|
|
520
|
-
se.designPath(c,
|
|
521
|
-
|
|
523
|
+
se.designPath(c, n.value),
|
|
524
|
+
n.value
|
|
522
525
|
);
|
|
523
|
-
(
|
|
526
|
+
(b = r.design) == null || b.push({
|
|
524
527
|
_id: c,
|
|
525
528
|
image: t
|
|
526
529
|
});
|
|
527
530
|
}
|
|
528
|
-
await L.update(r), await
|
|
531
|
+
await L.update(r), await o(), await B("success"), n.value = null, _.value = !1;
|
|
529
532
|
},
|
|
530
533
|
{
|
|
531
534
|
message: "Saving card design",
|
|
@@ -534,41 +537,41 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
534
537
|
);
|
|
535
538
|
}
|
|
536
539
|
async function x(u, r) {
|
|
537
|
-
u ?
|
|
540
|
+
u ? n.value = u : r && M.open({
|
|
538
541
|
title: "Delete Design",
|
|
539
542
|
message: "Are you sure you want to delete this design?",
|
|
540
543
|
primaryActions: { text: "Delete", close: !0 },
|
|
541
544
|
secondaryActions: { text: "Cancel", close: !1 }
|
|
542
545
|
}).onPrimary(async () => {
|
|
543
546
|
var c, t;
|
|
544
|
-
const
|
|
545
|
-
console.log(
|
|
547
|
+
const b = (c = w.value.design) == null ? void 0 : c.findIndex((l) => l._id == r);
|
|
548
|
+
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await S();
|
|
546
549
|
}).onSecondary(() => {
|
|
547
550
|
M.close();
|
|
548
551
|
});
|
|
549
552
|
}
|
|
550
|
-
async function
|
|
551
|
-
await
|
|
553
|
+
async function o() {
|
|
554
|
+
await g.readMembership(), w.value = g.membership;
|
|
552
555
|
}
|
|
553
556
|
return j({
|
|
554
557
|
showSheet: D
|
|
555
558
|
}), X(async () => {
|
|
556
|
-
await
|
|
559
|
+
await o(), s.value.length || (_.value = !0);
|
|
557
560
|
}), (u, r) => {
|
|
558
|
-
const
|
|
561
|
+
const b = v("FmButton"), c = v("FmSideSheet");
|
|
559
562
|
return m(), F(c, {
|
|
560
563
|
"max-width": 560,
|
|
561
564
|
"dismiss-away": !0,
|
|
562
565
|
header: "Manage Design",
|
|
563
|
-
modelValue: e(
|
|
566
|
+
modelValue: e(p),
|
|
564
567
|
"onUpdate:modelValue": [
|
|
565
|
-
r[2] || (r[2] = (t) => G(
|
|
566
|
-
r[3] || (r[3] = (t) =>
|
|
568
|
+
r[2] || (r[2] = (t) => G(p) ? p.value = t : null),
|
|
569
|
+
r[3] || (r[3] = (t) => p.value = t)
|
|
567
570
|
]
|
|
568
|
-
},
|
|
571
|
+
}, ge({
|
|
569
572
|
default: C(() => [
|
|
570
573
|
e(_) ? k("", !0) : (m(), $("div", lt, [
|
|
571
|
-
(m(!0), $(z, null, H(e(s), (t) => (m(), F(
|
|
574
|
+
(m(!0), $(z, null, H(e(s), (t) => (m(), F(de, {
|
|
572
575
|
key: String(t._id),
|
|
573
576
|
"image-fit": "cover",
|
|
574
577
|
label: "",
|
|
@@ -580,7 +583,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
580
583
|
"delete-button": !1
|
|
581
584
|
}, {
|
|
582
585
|
"delete-button": C(() => [
|
|
583
|
-
i(
|
|
586
|
+
i(b, {
|
|
584
587
|
class: "!text-neutral-50 !bg-neutral-700",
|
|
585
588
|
icon: "delete",
|
|
586
589
|
variant: "tertiary",
|
|
@@ -590,7 +593,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
590
593
|
_: 2
|
|
591
594
|
}, 1032, ["thumbnail"]))), 128))
|
|
592
595
|
])),
|
|
593
|
-
e(_) ? (m(), F(
|
|
596
|
+
e(_) ? (m(), F(de, {
|
|
594
597
|
key: 1,
|
|
595
598
|
"image-fit": "cover",
|
|
596
599
|
label: "",
|
|
@@ -605,13 +608,13 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
605
608
|
e(_) ? {
|
|
606
609
|
name: "side-sheet-footer",
|
|
607
610
|
fn: C(() => [
|
|
608
|
-
d("div",
|
|
609
|
-
i(
|
|
611
|
+
d("div", nt, [
|
|
612
|
+
i(b, {
|
|
610
613
|
label: "Save",
|
|
611
614
|
onClick: S,
|
|
612
|
-
disabled: !e(
|
|
615
|
+
disabled: !e(n)
|
|
613
616
|
}, null, 8, ["disabled"]),
|
|
614
|
-
i(
|
|
617
|
+
i(b, {
|
|
615
618
|
label: "Cancel",
|
|
616
619
|
type: "button",
|
|
617
620
|
variant: "tertiary",
|
|
@@ -624,15 +627,15 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
624
627
|
name: "side-sheet-footer",
|
|
625
628
|
fn: C(() => [
|
|
626
629
|
d("div", at, [
|
|
627
|
-
i(
|
|
630
|
+
i(b, {
|
|
628
631
|
label: "Add Design",
|
|
629
|
-
onClick:
|
|
632
|
+
onClick: I
|
|
630
633
|
}),
|
|
631
|
-
i(
|
|
634
|
+
i(b, {
|
|
632
635
|
label: "Cancel",
|
|
633
636
|
type: "button",
|
|
634
637
|
variant: "tertiary",
|
|
635
|
-
onClick: r[0] || (r[0] = (t) =>
|
|
638
|
+
onClick: r[0] || (r[0] = (t) => p.value = !1)
|
|
636
639
|
})
|
|
637
640
|
])
|
|
638
641
|
]),
|
|
@@ -642,20 +645,20 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
642
645
|
};
|
|
643
646
|
}
|
|
644
647
|
}), it = { class: "flex items-center" }, rt = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, dt = { class: "px-24 flex flex-col pb-24 gap-y-16" }, ut = { class: "flex items-center justify-end" }, mt = /* @__PURE__ */ d("img", {
|
|
645
|
-
src:
|
|
648
|
+
src: ve,
|
|
646
649
|
class: "aspect-square w-[150px]"
|
|
647
|
-
}, 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" },
|
|
650
|
+
}, 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" }, Lt = /* @__PURE__ */ Z({
|
|
648
651
|
__name: "Card",
|
|
649
652
|
setup(ee) {
|
|
650
|
-
const { minor: j, global: T } = J, A = y(),
|
|
653
|
+
const { minor: j, global: T } = J, A = y(), g = y(), M = y(), _ = we(), w = W(), { t: n } = Be(), B = E(
|
|
651
654
|
() => w.sortedStoreCategories.flatMap((t) => t.bundles)
|
|
652
655
|
), s = [
|
|
653
656
|
{
|
|
654
|
-
header:
|
|
657
|
+
header: n("connect.loyalty.card.table.card_number"),
|
|
655
658
|
accessorFn: (t) => t.serialNumber
|
|
656
659
|
},
|
|
657
660
|
{
|
|
658
|
-
header:
|
|
661
|
+
header: n("connect.loyalty.card.table.redeemed_by"),
|
|
659
662
|
accessorKey: "user",
|
|
660
663
|
enableSorting: !1,
|
|
661
664
|
cell(t) {
|
|
@@ -666,7 +669,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
666
669
|
class: "flex items-center gap-x-8"
|
|
667
670
|
},
|
|
668
671
|
[
|
|
669
|
-
K(
|
|
672
|
+
K(oe.FmAvatar, {
|
|
670
673
|
name: l != null && l.photoUrl || l == null ? void 0 : l.name,
|
|
671
674
|
src: (l == null ? void 0 : l.photoUrl) ?? void 0,
|
|
672
675
|
size: "sm"
|
|
@@ -677,7 +680,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
677
680
|
}
|
|
678
681
|
},
|
|
679
682
|
{
|
|
680
|
-
header:
|
|
683
|
+
header: n("connect.loyalty.card.table.phone"),
|
|
681
684
|
accessorFn: (t) => {
|
|
682
685
|
var l;
|
|
683
686
|
return ((l = t.pf_member) == null ? void 0 : l.phoneNumber) || "-";
|
|
@@ -685,26 +688,26 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
685
688
|
accessorKey: "pf_member.phoneNumber"
|
|
686
689
|
},
|
|
687
690
|
{
|
|
688
|
-
header:
|
|
691
|
+
header: n("connect.loyalty.card.table.created_at"),
|
|
689
692
|
accessorKey: "_id",
|
|
690
|
-
accessorFn: (t) =>
|
|
693
|
+
accessorFn: (t) => ne(Ue(t._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
691
694
|
},
|
|
692
695
|
{
|
|
693
|
-
header:
|
|
696
|
+
header: n("connect.loyalty.card.table.bundle"),
|
|
694
697
|
accessorFn: (t) => {
|
|
695
698
|
var l;
|
|
696
699
|
return ((l = B.value.find((V) => V._id === t.bundle)) == null ? void 0 : l.name) || "-";
|
|
697
700
|
}
|
|
698
701
|
},
|
|
699
702
|
{
|
|
700
|
-
header:
|
|
703
|
+
header: n("connect.loyalty.card.table.redeemed_at"),
|
|
701
704
|
accessorKey: "redeemedAt",
|
|
702
|
-
accessorFn: (t) => t.redeemedAt ?
|
|
705
|
+
accessorFn: (t) => t.redeemedAt ? ne(t.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
703
706
|
},
|
|
704
707
|
{
|
|
705
|
-
header:
|
|
708
|
+
header: n("connect.loyalty.card.table.actions"),
|
|
706
709
|
cell(t) {
|
|
707
|
-
return K(
|
|
710
|
+
return K(oe.FmButton, {
|
|
708
711
|
variant: "tertiary",
|
|
709
712
|
icon: "delete",
|
|
710
713
|
iconColor: "neutral-gray-400",
|
|
@@ -715,25 +718,25 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
715
718
|
});
|
|
716
719
|
}
|
|
717
720
|
}
|
|
718
|
-
], { tableMeta:
|
|
719
|
-
async function
|
|
720
|
-
var
|
|
721
|
-
await S(), (
|
|
721
|
+
], { tableMeta: p, rowData: D, onSort: I, debouncedFetchData: S, onSearch: x } = $e(L.readCards);
|
|
722
|
+
async function o(t) {
|
|
723
|
+
var l;
|
|
724
|
+
await S(t), (l = A.value) == null || l.showSheet(!1);
|
|
722
725
|
}
|
|
723
726
|
const u = E(() => _.isPremium ? [
|
|
724
727
|
{
|
|
725
|
-
label:
|
|
728
|
+
label: n("connect.loyalty.card.actions.create"),
|
|
726
729
|
value: "create",
|
|
727
730
|
isPrimary: !0
|
|
728
731
|
},
|
|
729
732
|
{
|
|
730
|
-
label:
|
|
733
|
+
label: n("connect.loyalty.card.actions.manage_design"),
|
|
731
734
|
value: "design",
|
|
732
735
|
isPrimary: !0
|
|
733
736
|
}
|
|
734
737
|
] : []);
|
|
735
738
|
async function r(t) {
|
|
736
|
-
await
|
|
739
|
+
await me.remove(
|
|
737
740
|
`Are you sure you want to remove card ${t.serialNumber}?`
|
|
738
741
|
) && await j(
|
|
739
742
|
async () => {
|
|
@@ -745,7 +748,9 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
745
748
|
}
|
|
746
749
|
);
|
|
747
750
|
}
|
|
748
|
-
async function
|
|
751
|
+
async function b(t) {
|
|
752
|
+
if (!t || t.length === 0)
|
|
753
|
+
return;
|
|
749
754
|
const l = new Ve(), V = t.map((U) => ({
|
|
750
755
|
CardNumber: U
|
|
751
756
|
}));
|
|
@@ -762,29 +767,29 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
762
767
|
const c = (t) => {
|
|
763
768
|
var l;
|
|
764
769
|
if (t.redeemedAt) {
|
|
765
|
-
|
|
770
|
+
_e.error("Update not permitted", 2e3);
|
|
766
771
|
return;
|
|
767
772
|
}
|
|
768
|
-
(l =
|
|
773
|
+
(l = g == null ? void 0 : g.value) == null || l.showSheet(!0, t);
|
|
769
774
|
};
|
|
770
775
|
return X(async () => {
|
|
771
776
|
await T(async () => {
|
|
772
|
-
await _.readPremium(), await w.readMemberStore(), await w.readMembership(), await
|
|
777
|
+
await _.readPremium(), await w.readMemberStore(), await w.readMembership(), await o();
|
|
773
778
|
});
|
|
774
779
|
}), (t, l) => {
|
|
775
|
-
const V = v("FmPill"), U = v("FmPageHead"),
|
|
780
|
+
const V = v("FmPill"), U = v("FmPageHead"), f = v("FmSearch"), N = v("FmButton"), q = v("FmCard");
|
|
776
781
|
return m(), $(z, null, [
|
|
777
782
|
i(U, {
|
|
778
|
-
title: e(
|
|
783
|
+
title: e(n)("connect.loyalty.card.title"),
|
|
779
784
|
actions: e(u),
|
|
780
785
|
"onClick:action": l[0] || (l[0] = (h) => {
|
|
781
|
-
var
|
|
782
|
-
console.log(h), h === "design" && ((
|
|
786
|
+
var P, O;
|
|
787
|
+
console.log(h), h === "design" && ((P = e(M)) == null || P.showSheet(!0)), h === "create" && ((O = e(A)) == null || O.showSheet(!0));
|
|
783
788
|
})
|
|
784
789
|
}, {
|
|
785
790
|
title: C(() => [
|
|
786
791
|
d("div", it, [
|
|
787
|
-
d("span", rt, te(e(
|
|
792
|
+
d("span", rt, te(e(n)("connect.loyalty.card.title")), 1),
|
|
788
793
|
i(V, {
|
|
789
794
|
class: "ml-8",
|
|
790
795
|
variant: "premium"
|
|
@@ -794,34 +799,34 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
794
799
|
_: 1
|
|
795
800
|
}, 8, ["title", "actions"]),
|
|
796
801
|
d("div", dt, [
|
|
797
|
-
e(D).length > 0 || e(D).length <= 0 && e(
|
|
802
|
+
e(D).length > 0 || e(D).length <= 0 && e(p).searchValue || e(p).pageCount > 0 ? (m(), $(z, { key: 0 }, [
|
|
798
803
|
d("div", ut, [
|
|
799
|
-
i(
|
|
804
|
+
i(f, {
|
|
800
805
|
class: "mt-4",
|
|
801
|
-
modelValue: e(
|
|
806
|
+
modelValue: e(p).searchValue,
|
|
802
807
|
"onUpdate:modelValue": [
|
|
803
|
-
l[1] || (l[1] = (h) => e(
|
|
808
|
+
l[1] || (l[1] = (h) => e(p).searchValue = h),
|
|
804
809
|
e(x)
|
|
805
810
|
],
|
|
806
811
|
placeholder: "Search",
|
|
807
812
|
collapsible: ""
|
|
808
813
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
809
|
-
i(
|
|
814
|
+
i(N, {
|
|
810
815
|
icon: "ios_share",
|
|
811
816
|
variant: "tertiary",
|
|
812
|
-
onClick:
|
|
817
|
+
onClick: be(e(Fe), ["prevent"])
|
|
813
818
|
}, null, 8, ["onClick"])
|
|
814
819
|
]),
|
|
815
820
|
i(Me, {
|
|
816
|
-
loading: e(
|
|
821
|
+
loading: e(p).isLoading,
|
|
817
822
|
"row-data": e(D),
|
|
818
|
-
"row-count": e(
|
|
823
|
+
"row-count": e(p).totalRows,
|
|
819
824
|
"column-defs": s,
|
|
820
825
|
"shrink-at": !1,
|
|
821
|
-
"page-count": e(
|
|
822
|
-
"page-index": e(
|
|
823
|
-
"page-size": e(
|
|
824
|
-
onSortChange: e(
|
|
826
|
+
"page-count": e(p).pageCount,
|
|
827
|
+
"page-index": e(p).pageIndex,
|
|
828
|
+
"page-size": e(p).pageSize,
|
|
829
|
+
onSortChange: e(I),
|
|
825
830
|
onPageChange: l[2] || (l[2] = (h) => {
|
|
826
831
|
e(S)({
|
|
827
832
|
pageSize: h.pageSize,
|
|
@@ -840,13 +845,13 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
840
845
|
default: C(() => [
|
|
841
846
|
mt,
|
|
842
847
|
d("div", ct, [
|
|
843
|
-
d("div", pt, te(e(
|
|
844
|
-
d("div", ft, te(e(
|
|
848
|
+
d("div", pt, te(e(n)("connect.loyalty.card.empty_state.title")), 1),
|
|
849
|
+
d("div", ft, te(e(n)("connect.loyalty.card.empty_state.description")), 1)
|
|
845
850
|
]),
|
|
846
|
-
d("div",
|
|
847
|
-
i(
|
|
851
|
+
d("div", gt, [
|
|
852
|
+
i(N, {
|
|
848
853
|
variant: "primary",
|
|
849
|
-
label: e(
|
|
854
|
+
label: e(n)("connect.loyalty.card.actions.add"),
|
|
850
855
|
icon: "add",
|
|
851
856
|
disabled: !e(_).isPremium,
|
|
852
857
|
onClick: l[4] || (l[4] = () => {
|
|
@@ -854,9 +859,9 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
854
859
|
return (h = e(A)) == null ? void 0 : h.showSheet(!0);
|
|
855
860
|
})
|
|
856
861
|
}, null, 8, ["label", "disabled"]),
|
|
857
|
-
i(
|
|
862
|
+
i(N, {
|
|
858
863
|
variant: "secondary",
|
|
859
|
-
label: e(
|
|
864
|
+
label: e(n)("connect.loyalty.card.actions.manage_design"),
|
|
860
865
|
disabled: !e(_).isPremium,
|
|
861
866
|
onClick: l[5] || (l[5] = () => {
|
|
862
867
|
var h;
|
|
@@ -870,20 +875,23 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
870
875
|
i(Ye, {
|
|
871
876
|
ref_key: "sheetRef",
|
|
872
877
|
ref: A,
|
|
873
|
-
onSuccess:
|
|
874
|
-
onExport:
|
|
878
|
+
onSuccess: l[6] || (l[6] = (h) => o()),
|
|
879
|
+
onExport: b
|
|
875
880
|
}, null, 512),
|
|
876
881
|
i(st, {
|
|
877
882
|
ref_key: "designSheetRef",
|
|
878
883
|
ref: M,
|
|
879
|
-
onSuccess:
|
|
884
|
+
onSuccess: o
|
|
880
885
|
}, null, 512),
|
|
881
886
|
i(tt, {
|
|
882
887
|
ref_key: "editSheetRef",
|
|
883
|
-
ref:
|
|
884
|
-
onSuccess: l[
|
|
885
|
-
var
|
|
886
|
-
|
|
888
|
+
ref: g,
|
|
889
|
+
onSuccess: l[7] || (l[7] = (h) => {
|
|
890
|
+
var P;
|
|
891
|
+
o({
|
|
892
|
+
pageSize: e(p).pageSize,
|
|
893
|
+
pageIndex: e(p).pageIndex
|
|
894
|
+
}), (P = e(g)) == null || P.showSheet(!1);
|
|
887
895
|
})
|
|
888
896
|
}, null, 512)
|
|
889
897
|
])
|