@feedmepos/mf-connect 0.1.38-beta.7 → 0.1.38-beta.71
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-NNi-22sK.js → Analytic-BY0xqCru.js} +16 -16
- package/dist/{App-Bu14Mro_.js → App-n6-XqhU7.js} +625 -619
- package/dist/AuditLogs-Dml3WjdH.js +1991 -0
- package/dist/{Bin-CnAQA85j.js → Bin-DaPZyWm-.js} +10 -10
- package/dist/Broadcast-hLmkBNne.js +267 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DC_fReu7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BahnNhzD.js} +6 -6
- package/dist/{Card-DqAGiETA.js → Card-C_Fm3E0s.js} +144 -140
- package/dist/Collections-DAUsUa0c.js +540 -0
- package/dist/Credit-DklbckuQ.js +261 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- 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-vpnaCdLI.js +3167 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js +351 -0
- package/dist/Experience-D3Ve8dCI.js +260 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-Bg15HHd0.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-BJzRdZNg.js +331 -0
- package/dist/GenerateMaterial-pDWgptXt.js +589 -0
- package/dist/Grab-B0D8SpcD.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js} +49 -48
- package/dist/{Index-loHkiwyo.js → Index-ysSM8-pd.js} +54 -54
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C7bEzQ4b.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-Kt1Wiz87.js} +1 -1
- package/dist/Marketing-CFS6ff03.js +145 -0
- package/dist/MarketingMaterialEdit-BDYr5Rlw.js +746 -0
- package/dist/{Member-BQjQQdoA.js → Member-Dgb3QBKF.js} +38 -37
- package/dist/{MemberList-WPsEUKf_.js → MemberList-CfcQUvN8.js} +158 -159
- package/dist/{MemberTransactions-BtM7dugy.js → MemberTransactions-BVwGdpXo.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bl9sFIwG.js → MessageInput.vue_vue_type_script_setup_true_lang-Dj3h51yH.js} +13463 -10597
- package/dist/Mission-B9K8-Wrt.js +335 -0
- package/dist/{Overview-Bsf5IPOg.js → Overview-DJgKxAvU.js} +24 -25
- package/dist/Point-lev1_Nit.js +263 -0
- package/dist/Promotion-De9e8yPj.js +397 -0
- package/dist/{Queue-XFVbSuDw.js → Queue-DH_F0Ekd.js} +14 -15
- package/dist/{Record-CQzujESE.js → Record-CH2AZqzF.js} +10 -10
- package/dist/{Reward-Dj_h_May.js → Reward-BUgOAjd4.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Clxk-oYM.js → RewardGroup.vue_vue_type_script_setup_true_lang-KTaTLjjw.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-rs5kKp_v.js +1912 -0
- package/dist/{Segment-D_DUu_Sp.js → Segment-DL6O--Aw.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3C2mVlv.js → SelectItems.vue_vue_type_script_setup_true_lang-ZUGDMD5J.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0vsl8oV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIeyrheH.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-5HkJROSb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BAtXxIjO.js} +4 -4
- package/dist/Setting-DOA80XlJ.js +1999 -0
- package/dist/SettingAdvertisements-Dl0eisXq.js +263 -0
- package/dist/Store-fni1Xblz.js +1995 -0
- package/dist/StoreRewards-CLMO-kNi.js +534 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BlBovyiT.js +1034 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jYcuAa.js +7005 -0
- package/dist/{Tier-YQsLRt06.js → Tier-B0_DiVNv.js} +561 -480
- package/dist/{Title-C5gxYNvh.js → Title-twptCzpk.js} +149 -147
- package/dist/{Transaction-CZ_QdIii.js → Transaction-CTX5I6gO.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bp-rIgz4.js} +7 -7
- package/dist/Voucher-C7Kxmzjr.js +422 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-lZQTZUUU.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js → ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js} +2 -2
- package/dist/app-D5GVWKxc.js +59071 -0
- package/dist/app.js +1 -1
- package/dist/{business-DZYFoAKz.js → business-BvNsRlY4.js} +11 -8
- package/dist/{campaign-Ca4l6UUg.js → campaign-DRErhSfb.js} +29 -25
- package/dist/campaign-MN_o01w6.js +253 -0
- package/dist/campaign.enum-BtfwwLCf.js +26 -0
- package/dist/campaign.fn-BgSGxLPo.js +776 -0
- package/dist/{collectible.enum-DnIeDAB-.js → collectible.enum-CV2tpD2C.js} +1 -1
- package/dist/{collection.fn-mQfXEwJv.js → collection.fn-BYjqObg7.js} +2 -2
- package/dist/dto-CyhnIGn-.js +222 -0
- package/dist/duplicateCampaign-jOZ1UznM.js +51 -0
- package/dist/effect-NKfquhhR.js +89 -0
- package/dist/{email-addresses-CQYqi2rN.js → email-addresses-EmFJeFmB.js} +2 -2
- package/dist/{export-BsikVZw2.js → export-B70Bp6s8.js} +9 -10
- package/dist/{helper-n74IteBU.js → helper-DiSstsUa.js} +22 -7
- package/dist/index-5FmmWAib.js +30289 -0
- package/dist/index-B09KKPb4.js +3419 -0
- package/dist/{index-CrHCbDIs.js → index-BgP5ZHK6.js} +3 -3
- package/dist/{index-DRrSsoqp.js → index-C46EHygk.js} +1 -1
- package/dist/{index-Bg3fAg5z.js → index-CD7Ji4Nw.js} +1 -1
- package/dist/{index-BJ-IAF-1.js → index-CHXlBh7-.js} +1 -1
- package/dist/{index-BpjT8Rx0.js → index-Cr2243n7.js} +455 -245
- package/dist/index-CrDg9PFk.js +8912 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-Dt6wui_L.js → index-DK45XoFG.js} +3 -3
- package/dist/{index-DTErPYrT.js → index-Qg_bzaF2.js} +1 -1
- package/dist/{index-Do7TcKmg.js → index-bAmlAkpk.js} +4 -1
- package/dist/index-nTpkh7pU.js +28897 -0
- package/dist/index-tvZKdKVU.js +36 -0
- package/dist/{index.esm2017-T7F54Aqa.js → index.esm2017-B8fYlj6l.js} +185 -185
- package/dist/loading-DVr3dbZ1.js +215 -0
- package/dist/{lodash-B5I3zXaY.js → lodash-BNr1VEn2.js} +1 -1
- package/dist/{membership-BRy4jMt2.js → membership-LEuPDIbe.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-B9Auav5u.js → money-CogUwiv6.js} +1 -1
- package/dist/{number-BdhIBsUp.js → number-C5wGUTN5.js} +1 -1
- package/dist/objectid-DbUENFHd.js +145 -0
- package/dist/{campaign-162kZMje.js → plugins-BxKrsjEx.js} +784 -777
- package/dist/remy-D_Deb3ue.js +13 -0
- package/dist/{reward-UuqZUHsq.js → reward-CM4Wx2zA.js} +1 -1
- package/dist/{rule-D158NIpm.js → rule-CMMr2GMg.js} +505 -487
- package/dist/rule-builder-D5QsmOxi.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-BDKqBasy.js +188 -0
- package/dist/timezone-DuaWQsQ2.js +1154 -0
- package/dist/trigger-IcyZcRow.js +213 -0
- package/dist/usePagination-D8OEDsCt.js +223 -0
- package/dist/user-u3blYzG2.js +55 -0
- package/dist/vue-i18n-DfD8ZY6j.js +2365 -0
- package/dist/{xlsx-Ddqi5i8p.js → xlsx-Bgf4_JHr.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-9J33xiFS.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-Cai9CVBl.js +0 -1887
- package/dist/Broadcast-DskXjXn4.js +0 -227
- package/dist/Collections-DuaIQAk7.js +0 -465
- package/dist/Credit-D40Vzu2g.js +0 -222
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsQ4iAsV.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js +0 -347
- package/dist/Experience-B9yHQPuj.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-e9-Q3qmO.js +0 -278
- package/dist/Marketing-CipbukIV.js +0 -20073
- package/dist/Mission-B_DJ3Yu_.js +0 -296
- package/dist/Point-DMphcWjy.js +0 -226
- package/dist/Promotion-B33A-Jwe.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CGAXTOLN.js +0 -1751
- package/dist/Setting-CtdC4G3W.js +0 -1936
- package/dist/Store-DCksWACh.js +0 -1842
- package/dist/StoreRewards-CHWKYKet.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D1TDyD6N.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D59sGO3F.js +0 -139
- package/dist/Voucher-BzV8yZ3o.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-FFOpPHwj.js +0 -33357
- package/dist/app-az9e8Yfl.js +0 -7086
- package/dist/campaign.enum-DWjyDV2D.js +0 -20
- package/dist/campaign.fn-DWWJ74z-.js +0 -758
- package/dist/dto-mKZIPV4o.js +0 -214
- package/dist/effect-B8UexeyG.js +0 -78
- package/dist/index-5ShiAY8U.js +0 -8861
- package/dist/index-Bf6AmJwX.js +0 -32260
- package/dist/index-C5gjIb5d.js +0 -146
- package/dist/index-C9YrDtDN.js +0 -38
- package/dist/index-CK-MAqWE.js +0 -3120
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-f4MzX8IY.js +0 -30038
- package/dist/loading-BEAayQS-.js +0 -71
- package/dist/objectid-K-JVTsfA.js +0 -145
- package/dist/plugins-CWlRYif_.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-DNeViq0I.js +0 -89
- package/dist/template-B02wYF7G.js +0 -190
- package/dist/trigger-BDjnKHLI.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-DbP37Ohh.js +0 -54
- package/dist/vue-i18n-BbhkYWlk.js +0 -2365
|
@@ -1,44 +1,42 @@
|
|
|
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-
|
|
9
|
-
import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { p as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import "./index-
|
|
16
|
-
import
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { u as $e, _ as Me } from "./usePagination-BeF5K3M7.js";
|
|
26
|
-
import { u as Be } from "./vue-i18n-BbhkYWlk.js";
|
|
3
|
+
import { h as oe } from "./moment-D7p2TMB-.js";
|
|
4
|
+
import { useDialog as ye, components as se } from "@feedmepos/ui-library";
|
|
5
|
+
import "./index-5FmmWAib.js";
|
|
6
|
+
import { m as L, u as J } from "./loading-DVr3dbZ1.js";
|
|
7
|
+
import { u as ce } from "./app-wDQR6dpb.js";
|
|
8
|
+
import { u as W } from "./membership-LEuPDIbe.js";
|
|
9
|
+
import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
|
|
10
|
+
import { p as pe, f as ie, n as xe } from "./plugins-BxKrsjEx.js";
|
|
11
|
+
import { z as re } from "./app-D5GVWKxc.js";
|
|
12
|
+
import { Z as de } from "./zod-9J33xiFS.js";
|
|
13
|
+
import { _ as ue } from "./ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js";
|
|
14
|
+
import "./index-Cr2243n7.js";
|
|
15
|
+
import { k as Ce } from "./index-B09KKPb4.js";
|
|
16
|
+
import "./index-CrDg9PFk.js";
|
|
17
|
+
import "./index-DK45XoFG.js";
|
|
18
|
+
import { O as Se } from "./objectid-DbUENFHd.js";
|
|
19
|
+
import { a as he, c as _e } from "./object-qECH92oz.js";
|
|
20
|
+
import { u as we } from "./business-BvNsRlY4.js";
|
|
21
|
+
import { w as ke } from "./xlsx-Bgf4_JHr.js";
|
|
22
|
+
import { a as Fe, C as Ve } from "./export-B70Bp6s8.js";
|
|
23
|
+
import { u as $e, _ as Me } from "./usePagination-D8OEDsCt.js";
|
|
24
|
+
import { u as Be } from "./vue-i18n-DfD8ZY6j.js";
|
|
27
25
|
import { o as Ue } from "./objectId-dwaoBfJX.js";
|
|
28
|
-
const
|
|
26
|
+
const Ae = { class: "space-y-16" }, De = { class: "gap-16 grid grid-cols-2" }, Ie = { class: "space-y-16" }, Ne = {
|
|
29
27
|
key: 0,
|
|
30
28
|
class: "flex flex-col gap-[16px] w-full"
|
|
31
29
|
}, 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
30
|
__name: "CreateCardSheet",
|
|
33
31
|
emits: ["success", "export"],
|
|
34
32
|
setup(ee, { expose: j, emit: T }) {
|
|
35
|
-
const { minor:
|
|
36
|
-
function B(
|
|
37
|
-
o.value =
|
|
33
|
+
const { minor: D } = J, g = W(), M = y(), x = y(!1), w = T, o = y(!1);
|
|
34
|
+
function B(m) {
|
|
35
|
+
o.value = m, m && (s.value = {
|
|
38
36
|
quantity: 1,
|
|
39
37
|
code: "",
|
|
40
38
|
codeConfig: {
|
|
41
|
-
length:
|
|
39
|
+
length: 16,
|
|
42
40
|
charset: "1234567890",
|
|
43
41
|
prefix: "",
|
|
44
42
|
suffix: "",
|
|
@@ -50,7 +48,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
50
48
|
quantity: 1,
|
|
51
49
|
code: "",
|
|
52
50
|
codeConfig: {
|
|
53
|
-
length:
|
|
51
|
+
length: 16,
|
|
54
52
|
charset: "1234567890",
|
|
55
53
|
prefix: "",
|
|
56
54
|
suffix: "",
|
|
@@ -69,7 +67,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
69
67
|
value: "single",
|
|
70
68
|
sublabel: "Enter your own custom number"
|
|
71
69
|
}
|
|
72
|
-
],
|
|
70
|
+
], A = [
|
|
73
71
|
{
|
|
74
72
|
label: "Alphanumeric",
|
|
75
73
|
value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
@@ -82,27 +80,27 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
82
80
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
83
81
|
{ label: "Numbers", value: "0123456789" },
|
|
84
82
|
{ label: "Custom", value: "" }
|
|
85
|
-
], I = y(
|
|
83
|
+
], I = y(A[0].value), _ = y("bulk"), C = y(0), n = E(
|
|
86
84
|
() => {
|
|
87
|
-
var
|
|
88
|
-
return (
|
|
85
|
+
var m;
|
|
86
|
+
return (m = g.membership.design) == null ? void 0 : m[C.value];
|
|
89
87
|
}
|
|
90
88
|
), u = y(!1), r = E(
|
|
91
|
-
() => g.sortedStoreCategories.flatMap((
|
|
89
|
+
() => g.sortedStoreCategories.flatMap((m) => m.bundles)
|
|
92
90
|
);
|
|
93
|
-
async function b(
|
|
91
|
+
async function b(m) {
|
|
94
92
|
var l, V;
|
|
95
93
|
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !x.value) return;
|
|
96
|
-
|
|
97
|
-
const t = await
|
|
94
|
+
m.design = (V = n.value) == null ? void 0 : V.image;
|
|
95
|
+
const t = await pe.confirm(
|
|
98
96
|
"",
|
|
99
97
|
"Do you want to export generated card(s)?",
|
|
100
98
|
"Export",
|
|
101
99
|
"Generate and without export"
|
|
102
100
|
);
|
|
103
|
-
console.log(t), await
|
|
101
|
+
console.log(t), await D(
|
|
104
102
|
async () => {
|
|
105
|
-
const U = await L.createCards(
|
|
103
|
+
const U = await L.createCards(m);
|
|
106
104
|
console.log(U), await w("success"), t && await w("export", U);
|
|
107
105
|
},
|
|
108
106
|
{
|
|
@@ -113,16 +111,21 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
113
111
|
}
|
|
114
112
|
return j({
|
|
115
113
|
showSheet: B
|
|
116
|
-
}),
|
|
114
|
+
}), ne(
|
|
117
115
|
() => s.value.codeConfig.length,
|
|
118
|
-
(
|
|
119
|
-
|
|
116
|
+
(m, t) => {
|
|
117
|
+
m != t && (s.value.codeConfig.pattern = "#".repeat(Number(m)));
|
|
118
|
+
}
|
|
119
|
+
), ne(
|
|
120
|
+
() => s.value.codeConfig.pattern,
|
|
121
|
+
(m, t) => {
|
|
122
|
+
m != t && (s.value.codeConfig.length = (s.value.codeConfig.pattern.match(/#/g) || []).length);
|
|
120
123
|
}
|
|
121
124
|
), X(async () => {
|
|
122
125
|
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
|
|
126
|
+
}), (m, t) => {
|
|
127
|
+
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");
|
|
128
|
+
return c(), F(fe, {
|
|
126
129
|
"max-width": 560,
|
|
127
130
|
"dismiss-away": !0,
|
|
128
131
|
header: "Create collection",
|
|
@@ -132,12 +135,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
132
135
|
t[20] || (t[20] = (R) => o.value = R)
|
|
133
136
|
]
|
|
134
137
|
}, {
|
|
135
|
-
"side-sheet-footer":
|
|
138
|
+
"side-sheet-footer": h(() => [
|
|
136
139
|
d("div", Ee, [
|
|
137
140
|
i(P, {
|
|
138
141
|
label: "Save",
|
|
139
142
|
onClick: t[17] || (t[17] = (R) => b(e(s))),
|
|
140
|
-
loading: e(
|
|
143
|
+
loading: e(ce)().isLoading
|
|
141
144
|
}, null, 8, ["loading"]),
|
|
142
145
|
i(P, {
|
|
143
146
|
label: "Cancel",
|
|
@@ -147,7 +150,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
147
150
|
})
|
|
148
151
|
])
|
|
149
152
|
]),
|
|
150
|
-
default:
|
|
153
|
+
default: h(() => [
|
|
151
154
|
i(O, {
|
|
152
155
|
ref_key: "form",
|
|
153
156
|
ref: M,
|
|
@@ -155,18 +158,18 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
155
158
|
onValidationSuccess: t[15] || (t[15] = (R) => x.value = !0),
|
|
156
159
|
onValidationFailed: t[16] || (t[16] = (R) => x.value = !1)
|
|
157
160
|
}, {
|
|
158
|
-
default:
|
|
161
|
+
default: h(() => {
|
|
159
162
|
var R, le, ae;
|
|
160
163
|
return [
|
|
161
164
|
d("div", null, [
|
|
162
165
|
t[21] || (t[21] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1)),
|
|
163
166
|
i(V, {
|
|
164
|
-
modelValue: e(
|
|
165
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(
|
|
167
|
+
modelValue: e(_),
|
|
168
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(_) ? _.value = a : null),
|
|
166
169
|
inline: !1
|
|
167
170
|
}, {
|
|
168
|
-
default:
|
|
169
|
-
(
|
|
171
|
+
default: h(() => [
|
|
172
|
+
(c(), $(z, null, H(p, (a) => i(l, {
|
|
170
173
|
key: a.value,
|
|
171
174
|
value: a.value,
|
|
172
175
|
label: a.label,
|
|
@@ -176,9 +179,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
176
179
|
_: 1
|
|
177
180
|
}, 8, ["modelValue"])
|
|
178
181
|
]),
|
|
179
|
-
d("div",
|
|
182
|
+
d("div", Ae, [
|
|
180
183
|
t[22] || (t[22] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1)),
|
|
181
|
-
e(
|
|
184
|
+
e(_) === "bulk" ? (c(), $(z, { key: 0 }, [
|
|
182
185
|
i(U, {
|
|
183
186
|
"model-value": e(u),
|
|
184
187
|
"label-placement": "right",
|
|
@@ -187,7 +190,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
187
190
|
required: !0,
|
|
188
191
|
"onUpdate:modelValue": t[1] || (t[1] = () => u.value = !e(u))
|
|
189
192
|
}, null, 8, ["model-value"]),
|
|
190
|
-
e(u) ? (
|
|
193
|
+
e(u) ? (c(), $(z, { key: 0 }, [
|
|
191
194
|
i(f, {
|
|
192
195
|
"model-value": e(s).codeConfig.length || null,
|
|
193
196
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => e(s).codeConfig.length = a),
|
|
@@ -198,20 +201,20 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
198
201
|
i(N, {
|
|
199
202
|
label: "Charset",
|
|
200
203
|
"model-value": e(I),
|
|
201
|
-
items:
|
|
204
|
+
items: A,
|
|
202
205
|
"helper-text": e(s).codeConfig.charset.length > 62 ? `${e(s).codeConfig.charset.substring(0, 62)}...` : e(s).codeConfig.charset,
|
|
203
206
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => {
|
|
204
207
|
I.value = a, e(s).codeConfig.charset = a;
|
|
205
208
|
})
|
|
206
209
|
}, null, 8, ["model-value", "helper-text"]),
|
|
207
|
-
e(I) === "" ? (
|
|
210
|
+
e(I) === "" ? (c(), F(q, {
|
|
208
211
|
key: 0,
|
|
209
212
|
modelValue: e(s).codeConfig.charset,
|
|
210
213
|
"onUpdate:modelValue": t[4] || (t[4] = (a) => e(s).codeConfig.charset = a),
|
|
211
214
|
label: "Custom Charset",
|
|
212
215
|
required: ""
|
|
213
216
|
}, null, 8, ["modelValue"])) : k("", !0),
|
|
214
|
-
d("div",
|
|
217
|
+
d("div", De, [
|
|
215
218
|
i(q, {
|
|
216
219
|
modelValue: e(s).codeConfig.prefix,
|
|
217
220
|
"onUpdate:modelValue": t[5] || (t[5] = (a) => e(s).codeConfig.prefix = a),
|
|
@@ -242,12 +245,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
242
245
|
"helper-text": `${e(s).quantity} card will be created`
|
|
243
246
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
244
247
|
], 64)) : k("", !0),
|
|
245
|
-
e(
|
|
248
|
+
e(_) !== "bulk" ? (c(), F(S, {
|
|
246
249
|
key: 1,
|
|
247
250
|
modelValue: e(s).code,
|
|
248
251
|
"onUpdate:modelValue": t[9] || (t[9] = (a) => e(s).code = a),
|
|
249
252
|
label: "Custom Card Number",
|
|
250
|
-
rules: [(a) => e(
|
|
253
|
+
rules: [(a) => e(_) != "single" || !!a || "Custom code is required"],
|
|
251
254
|
placeholder: "(For multiple numbers, please enter in the new row.)"
|
|
252
255
|
}, null, 8, ["modelValue", "rules"])) : k("", !0)
|
|
253
256
|
]),
|
|
@@ -256,6 +259,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
256
259
|
i(U, {
|
|
257
260
|
"label-placement": "right",
|
|
258
261
|
label: "Set card number on bind",
|
|
262
|
+
sublabel: "Automatically set the card number when the user binds the card",
|
|
259
263
|
"model-value": e(s).setCardOnBind || !1,
|
|
260
264
|
"onUpdate:modelValue": t[10] || (t[10] = (a) => e(s).setCardOnBind = a)
|
|
261
265
|
}, null, 8, ["model-value"]),
|
|
@@ -266,8 +270,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
266
270
|
modelValue: e(s).bundle,
|
|
267
271
|
"onUpdate:modelValue": t[12] || (t[12] = (a) => e(s).bundle = a)
|
|
268
272
|
}, {
|
|
269
|
-
append:
|
|
270
|
-
e(s).bundle ? (
|
|
273
|
+
append: h(() => [
|
|
274
|
+
e(s).bundle ? (c(), F(P, {
|
|
271
275
|
key: 0,
|
|
272
276
|
icon: "link_off",
|
|
273
277
|
variant: "plain",
|
|
@@ -276,7 +280,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
276
280
|
]),
|
|
277
281
|
_: 1
|
|
278
282
|
}, 8, ["items", "modelValue"]),
|
|
279
|
-
(le = (R = e(g).store) == null ? void 0 : R.stripe) != null && le.apiKey ? (
|
|
283
|
+
(le = (R = e(g).store) == null ? void 0 : R.stripe) != null && le.apiKey ? (c(), F(Q, {
|
|
280
284
|
key: 0,
|
|
281
285
|
label: "Linked subscription bundle",
|
|
282
286
|
placeholder: "Select bundle",
|
|
@@ -284,8 +288,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
284
288
|
modelValue: e(s).subscriptionBundle,
|
|
285
289
|
"onUpdate:modelValue": t[14] || (t[14] = (a) => e(s).subscriptionBundle = a)
|
|
286
290
|
}, {
|
|
287
|
-
append:
|
|
288
|
-
e(s).subscriptionBundle ? (
|
|
291
|
+
append: h(() => [
|
|
292
|
+
e(s).subscriptionBundle ? (c(), F(P, {
|
|
289
293
|
key: 0,
|
|
290
294
|
icon: "link_off",
|
|
291
295
|
variant: "plain",
|
|
@@ -295,7 +299,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
295
299
|
_: 1
|
|
296
300
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
297
301
|
]),
|
|
298
|
-
e(g).membership.design ? (
|
|
302
|
+
e(g).membership.design ? (c(), $("div", Ne, [
|
|
299
303
|
d("div", Pe, [
|
|
300
304
|
t[24] || (t[24] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
301
305
|
d("img", {
|
|
@@ -303,10 +307,10 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
303
307
|
class: "aspect-[16/9]"
|
|
304
308
|
}, null, 8, Re),
|
|
305
309
|
d("div", qe, [
|
|
306
|
-
(
|
|
310
|
+
(c(!0), $(z, null, H(e(g).membership.design, (a, Y) => (c(), $("img", {
|
|
307
311
|
src: a.image,
|
|
308
312
|
key: `image_${Y}`,
|
|
309
|
-
class:
|
|
313
|
+
class: me(["w-[112px] h-[63px] cursor-pointer", `${e(C) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
310
314
|
onClick: (dt) => C.value = Y,
|
|
311
315
|
alt: `ai_image_predict_${Y}`,
|
|
312
316
|
style: { objectFit: "cover" }
|
|
@@ -330,7 +334,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
330
334
|
__name: "EditCardSheet",
|
|
331
335
|
emits: ["success"],
|
|
332
336
|
setup(ee, { expose: j, emit: T }) {
|
|
333
|
-
const { minor:
|
|
337
|
+
const { minor: D } = J, g = W(), M = y(), x = y(!1), w = T, o = y({
|
|
334
338
|
_id: "",
|
|
335
339
|
business: "",
|
|
336
340
|
serialNumber: ""
|
|
@@ -341,7 +345,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
341
345
|
(r) => r.image === n.design
|
|
342
346
|
));
|
|
343
347
|
}
|
|
344
|
-
const p = y(0),
|
|
348
|
+
const p = y(0), A = E(
|
|
345
349
|
() => {
|
|
346
350
|
var C;
|
|
347
351
|
return (C = g.membership.design) == null ? void 0 : C[p.value];
|
|
@@ -351,9 +355,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
351
355
|
(C) => C.bundles
|
|
352
356
|
)
|
|
353
357
|
);
|
|
354
|
-
async function
|
|
358
|
+
async function _(C) {
|
|
355
359
|
var n, u;
|
|
356
|
-
await ((n = M.value) == null ? void 0 : n.validateInputs()), x.value && (C.design = (u =
|
|
360
|
+
await ((n = M.value) == null ? void 0 : n.validateInputs()), x.value && (C.design = (u = A.value) == null ? void 0 : u.image, await D(
|
|
357
361
|
async () => {
|
|
358
362
|
await L.updateCard(C), await w("success");
|
|
359
363
|
},
|
|
@@ -368,8 +372,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
368
372
|
}), X(async () => {
|
|
369
373
|
await g.readMemberStore();
|
|
370
374
|
}), (C, n) => {
|
|
371
|
-
const u = v("FmTextField"), r = v("FmSwitch"), b = v("FmButton"),
|
|
372
|
-
return
|
|
375
|
+
const u = v("FmTextField"), r = v("FmSwitch"), b = v("FmButton"), m = v("FmForm"), t = v("FmSideSheet");
|
|
376
|
+
return c(), F(t, {
|
|
373
377
|
"max-width": 560,
|
|
374
378
|
"dismiss-away": !0,
|
|
375
379
|
header: "Edit card",
|
|
@@ -379,13 +383,13 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
379
383
|
n[11] || (n[11] = (l) => B.value = l)
|
|
380
384
|
]
|
|
381
385
|
}, {
|
|
382
|
-
"side-sheet-footer":
|
|
386
|
+
"side-sheet-footer": h(() => [
|
|
383
387
|
d("div", He, [
|
|
384
388
|
i(b, {
|
|
385
389
|
label: "Save",
|
|
386
390
|
disabled: !!e(o).redeemedAt,
|
|
387
|
-
onClick: n[8] || (n[8] = (l) =>
|
|
388
|
-
loading: e(
|
|
391
|
+
onClick: n[8] || (n[8] = (l) => _(e(o))),
|
|
392
|
+
loading: e(ce)().isLoading
|
|
389
393
|
}, null, 8, ["disabled", "loading"]),
|
|
390
394
|
i(b, {
|
|
391
395
|
label: "Cancel",
|
|
@@ -395,15 +399,15 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
395
399
|
})
|
|
396
400
|
])
|
|
397
401
|
]),
|
|
398
|
-
default:
|
|
399
|
-
i(
|
|
402
|
+
default: h(() => [
|
|
403
|
+
i(m, {
|
|
400
404
|
ref_key: "form",
|
|
401
405
|
ref: M,
|
|
402
406
|
class: "space-y-40",
|
|
403
407
|
onValidationSuccess: n[6] || (n[6] = (l) => x.value = !0),
|
|
404
408
|
onValidationFailed: n[7] || (n[7] = (l) => x.value = !1)
|
|
405
409
|
}, {
|
|
406
|
-
default:
|
|
410
|
+
default: h(() => {
|
|
407
411
|
var l, V, U;
|
|
408
412
|
return [
|
|
409
413
|
d("div", Te, [
|
|
@@ -412,9 +416,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
412
416
|
"onUpdate:modelValue": n[0] || (n[0] = (f) => e(o).serialNumber = f),
|
|
413
417
|
label: "Card Number",
|
|
414
418
|
rules: [
|
|
415
|
-
e(
|
|
416
|
-
e(
|
|
417
|
-
e(
|
|
419
|
+
e(de).toRule(e(re).string().min(1, "Card number is required")),
|
|
420
|
+
e(de).toRule(
|
|
421
|
+
e(re).string().max(50, "Card number must be less than 50 characters")
|
|
418
422
|
)
|
|
419
423
|
],
|
|
420
424
|
required: !0
|
|
@@ -433,8 +437,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
433
437
|
modelValue: e(o).bundle,
|
|
434
438
|
"onUpdate:modelValue": n[3] || (n[3] = (f) => e(o).bundle = f)
|
|
435
439
|
}, {
|
|
436
|
-
append:
|
|
437
|
-
e(o).bundle ? (
|
|
440
|
+
append: h(() => [
|
|
441
|
+
e(o).bundle ? (c(), F(b, {
|
|
438
442
|
key: 0,
|
|
439
443
|
icon: "link_off",
|
|
440
444
|
variant: "plain",
|
|
@@ -443,7 +447,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
443
447
|
]),
|
|
444
448
|
_: 1
|
|
445
449
|
}, 8, ["items", "modelValue"]),
|
|
446
|
-
(V = (l = e(g).store) == null ? void 0 : l.stripe) != null && V.apiKey ? (
|
|
450
|
+
(V = (l = e(g).store) == null ? void 0 : l.stripe) != null && V.apiKey ? (c(), F(Q, {
|
|
447
451
|
key: 0,
|
|
448
452
|
label: "Linked subscription bundle",
|
|
449
453
|
placeholder: "Select bundle",
|
|
@@ -451,8 +455,8 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
451
455
|
modelValue: e(o).subscriptionBundle,
|
|
452
456
|
"onUpdate:modelValue": n[5] || (n[5] = (f) => e(o).subscriptionBundle = f)
|
|
453
457
|
}, {
|
|
454
|
-
append:
|
|
455
|
-
e(o).subscriptionBundle ? (
|
|
458
|
+
append: h(() => [
|
|
459
|
+
e(o).subscriptionBundle ? (c(), F(b, {
|
|
456
460
|
key: 0,
|
|
457
461
|
icon: "link_off",
|
|
458
462
|
variant: "plain",
|
|
@@ -462,18 +466,18 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
462
466
|
_: 1
|
|
463
467
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
464
468
|
]),
|
|
465
|
-
e(g).membership.design ? (
|
|
469
|
+
e(g).membership.design ? (c(), $("div", Le, [
|
|
466
470
|
d("div", Oe, [
|
|
467
471
|
n[13] || (n[13] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
468
472
|
d("img", {
|
|
469
|
-
src: (U = e(
|
|
473
|
+
src: (U = e(A)) == null ? void 0 : U.image,
|
|
470
474
|
class: "aspect-[16/9]"
|
|
471
475
|
}, null, 8, Ye),
|
|
472
476
|
d("div", Ke, [
|
|
473
|
-
(
|
|
477
|
+
(c(!0), $(z, null, H(e(g).membership.design, (f, N) => (c(), $("img", {
|
|
474
478
|
src: f.image,
|
|
475
479
|
key: `image_${N}`,
|
|
476
|
-
class:
|
|
480
|
+
class: me(["w-[112px] h-[63px] cursor-pointer", `${e(p) === N ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
477
481
|
onClick: (q) => p.value = N,
|
|
478
482
|
alt: `ai_image_predict_${N}`,
|
|
479
483
|
style: { objectFit: "cover" }
|
|
@@ -497,7 +501,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
497
501
|
__name: "CardDesignSheet",
|
|
498
502
|
emits: ["success"],
|
|
499
503
|
setup(ee, { expose: j, emit: T }) {
|
|
500
|
-
const { minor:
|
|
504
|
+
const { minor: D } = J, g = W(), M = ye(), x = y(!1);
|
|
501
505
|
y(), y(!1);
|
|
502
506
|
const w = y(), o = y(null);
|
|
503
507
|
E(() => {
|
|
@@ -508,24 +512,24 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
508
512
|
var u, r;
|
|
509
513
|
return ((r = (u = g.membership) == null ? void 0 : u.design) == null ? void 0 : r.filter((b) => b.image)) || [];
|
|
510
514
|
}), p = y(!1);
|
|
511
|
-
function
|
|
515
|
+
function A(u) {
|
|
512
516
|
p.value = u;
|
|
513
517
|
}
|
|
514
518
|
function I() {
|
|
515
519
|
x.value = !0;
|
|
516
520
|
}
|
|
517
|
-
async function
|
|
518
|
-
await
|
|
521
|
+
async function _() {
|
|
522
|
+
await D(
|
|
519
523
|
async () => {
|
|
520
524
|
var b;
|
|
521
|
-
const u =
|
|
525
|
+
const u = he(w.value), r = Ce.parse(u);
|
|
522
526
|
if (r.design = (r == null ? void 0 : r.design) || [], o.value) {
|
|
523
|
-
const
|
|
524
|
-
|
|
527
|
+
const m = Se().toHexString(), t = await ie.update(
|
|
528
|
+
ie.designPath(m, o.value),
|
|
525
529
|
o.value
|
|
526
530
|
);
|
|
527
531
|
(b = r.design) == null || b.push({
|
|
528
|
-
_id:
|
|
532
|
+
_id: m,
|
|
529
533
|
image: t
|
|
530
534
|
});
|
|
531
535
|
}
|
|
@@ -544,9 +548,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
544
548
|
primaryActions: { text: "Delete", close: !0 },
|
|
545
549
|
secondaryActions: { text: "Cancel", close: !1 }
|
|
546
550
|
}).onPrimary(async () => {
|
|
547
|
-
var
|
|
548
|
-
const b = (
|
|
549
|
-
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await
|
|
551
|
+
var m, t;
|
|
552
|
+
const b = (m = w.value.design) == null ? void 0 : m.findIndex((l) => l._id == r);
|
|
553
|
+
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await _();
|
|
550
554
|
}).onSecondary(() => {
|
|
551
555
|
M.close();
|
|
552
556
|
});
|
|
@@ -555,12 +559,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
555
559
|
await g.readMembership(), w.value = g.membership;
|
|
556
560
|
}
|
|
557
561
|
return j({
|
|
558
|
-
showSheet:
|
|
562
|
+
showSheet: A
|
|
559
563
|
}), X(async () => {
|
|
560
564
|
await n(), s.value.length || (x.value = !0);
|
|
561
565
|
}), (u, r) => {
|
|
562
|
-
const b = v("FmButton"),
|
|
563
|
-
return
|
|
566
|
+
const b = v("FmButton"), m = v("FmSideSheet");
|
|
567
|
+
return c(), F(m, {
|
|
564
568
|
"max-width": 560,
|
|
565
569
|
"dismiss-away": !0,
|
|
566
570
|
header: "Manage Design",
|
|
@@ -570,9 +574,9 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
570
574
|
r[3] || (r[3] = (t) => p.value = t)
|
|
571
575
|
]
|
|
572
576
|
}, ge({
|
|
573
|
-
default:
|
|
574
|
-
e(x) ? k("", !0) : (
|
|
575
|
-
(
|
|
577
|
+
default: h(() => [
|
|
578
|
+
e(x) ? k("", !0) : (c(), $("div", Ze, [
|
|
579
|
+
(c(!0), $(z, null, H(e(s), (t) => (c(), F(ue, {
|
|
576
580
|
key: String(t._id),
|
|
577
581
|
"image-fit": "cover",
|
|
578
582
|
label: "",
|
|
@@ -583,7 +587,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
583
587
|
file: void 0,
|
|
584
588
|
"delete-button": !1
|
|
585
589
|
}, {
|
|
586
|
-
"delete-button":
|
|
590
|
+
"delete-button": h(() => [
|
|
587
591
|
i(b, {
|
|
588
592
|
class: "!text-neutral-50 !bg-neutral-700",
|
|
589
593
|
icon: "delete",
|
|
@@ -594,7 +598,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
594
598
|
_: 2
|
|
595
599
|
}, 1032, ["thumbnail"]))), 128))
|
|
596
600
|
])),
|
|
597
|
-
e(x) ? (
|
|
601
|
+
e(x) ? (c(), F(ue, {
|
|
598
602
|
key: 1,
|
|
599
603
|
"image-fit": "cover",
|
|
600
604
|
label: "",
|
|
@@ -608,11 +612,11 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
608
612
|
}, [
|
|
609
613
|
e(x) ? {
|
|
610
614
|
name: "side-sheet-footer",
|
|
611
|
-
fn:
|
|
615
|
+
fn: h(() => [
|
|
612
616
|
d("div", Je, [
|
|
613
617
|
i(b, {
|
|
614
618
|
label: "Save",
|
|
615
|
-
onClick:
|
|
619
|
+
onClick: _,
|
|
616
620
|
disabled: !e(o)
|
|
617
621
|
}, null, 8, ["disabled"]),
|
|
618
622
|
i(b, {
|
|
@@ -626,7 +630,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
626
630
|
key: "1"
|
|
627
631
|
} : {
|
|
628
632
|
name: "side-sheet-footer",
|
|
629
|
-
fn:
|
|
633
|
+
fn: h(() => [
|
|
630
634
|
d("div", Xe, [
|
|
631
635
|
i(b, {
|
|
632
636
|
label: "Add Design",
|
|
@@ -645,10 +649,10 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
645
649
|
]), 1032, ["modelValue"]);
|
|
646
650
|
};
|
|
647
651
|
}
|
|
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" },
|
|
652
|
+
}), 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" }, Nt = /* @__PURE__ */ Z({
|
|
649
653
|
__name: "Card",
|
|
650
654
|
setup(ee) {
|
|
651
|
-
const { minor: j, global: T } = J,
|
|
655
|
+
const { minor: j, global: T } = J, D = y(), g = y(), M = y(), x = we(), w = W(), { t: o } = Be(), B = E(
|
|
652
656
|
() => w.sortedStoreCategories.flatMap((t) => t.bundles)
|
|
653
657
|
), s = [
|
|
654
658
|
{
|
|
@@ -667,7 +671,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
667
671
|
class: "flex items-center gap-x-8"
|
|
668
672
|
},
|
|
669
673
|
[
|
|
670
|
-
K(
|
|
674
|
+
K(se.FmAvatar, {
|
|
671
675
|
name: l != null && l.photoUrl || l == null ? void 0 : l.name,
|
|
672
676
|
src: (l == null ? void 0 : l.photoUrl) ?? void 0,
|
|
673
677
|
size: "sm"
|
|
@@ -688,7 +692,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
688
692
|
{
|
|
689
693
|
header: o("connect.loyalty.card.table.created_at"),
|
|
690
694
|
accessorKey: "_id",
|
|
691
|
-
accessorFn: (t) =>
|
|
695
|
+
accessorFn: (t) => oe(Ue(t._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
692
696
|
},
|
|
693
697
|
{
|
|
694
698
|
header: o("connect.loyalty.card.table.bundle"),
|
|
@@ -700,12 +704,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
700
704
|
{
|
|
701
705
|
header: o("connect.loyalty.card.table.redeemed_at"),
|
|
702
706
|
accessorKey: "redeemedAt",
|
|
703
|
-
accessorFn: (t) => t.redeemedAt ?
|
|
707
|
+
accessorFn: (t) => t.redeemedAt ? oe(t.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
704
708
|
},
|
|
705
709
|
{
|
|
706
710
|
header: o("connect.loyalty.card.table.actions"),
|
|
707
711
|
cell(t) {
|
|
708
|
-
return K(
|
|
712
|
+
return K(se.FmButton, {
|
|
709
713
|
variant: "tertiary",
|
|
710
714
|
icon: "delete",
|
|
711
715
|
iconColor: "neutral-gray-400",
|
|
@@ -716,10 +720,10 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
716
720
|
});
|
|
717
721
|
}
|
|
718
722
|
}
|
|
719
|
-
], { tableMeta: p, rowData:
|
|
723
|
+
], { tableMeta: p, rowData: A, onSort: I, debouncedFetchData: _, onSearch: C } = $e(L.readCards);
|
|
720
724
|
async function n(t) {
|
|
721
725
|
var l;
|
|
722
|
-
await
|
|
726
|
+
await _(t), (l = D.value) == null || l.showSheet(!1);
|
|
723
727
|
}
|
|
724
728
|
const u = E(() => x.isPremium ? [
|
|
725
729
|
{
|
|
@@ -734,11 +738,11 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
734
738
|
}
|
|
735
739
|
] : []);
|
|
736
740
|
async function r(t) {
|
|
737
|
-
await
|
|
741
|
+
await pe.remove(
|
|
738
742
|
`Are you sure you want to remove card ${t.serialNumber}?`
|
|
739
743
|
) && await j(
|
|
740
744
|
async () => {
|
|
741
|
-
await L.deleteCard(t._id.toString()), await
|
|
745
|
+
await L.deleteCard(t._id.toString()), await _({ pageSize: 10, pageIndex: 0 });
|
|
742
746
|
},
|
|
743
747
|
{
|
|
744
748
|
message: `Removing card ${t.serialNumber}`,
|
|
@@ -762,7 +766,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
762
766
|
}
|
|
763
767
|
);
|
|
764
768
|
}
|
|
765
|
-
const
|
|
769
|
+
const m = (t) => {
|
|
766
770
|
var l;
|
|
767
771
|
if (t.redeemedAt) {
|
|
768
772
|
xe.error("Update not permitted", 2e3);
|
|
@@ -776,16 +780,16 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
776
780
|
});
|
|
777
781
|
}), (t, l) => {
|
|
778
782
|
const V = v("FmPill"), U = v("FmPageHead"), f = v("FmSearch"), N = v("FmButton"), q = v("FmCard");
|
|
779
|
-
return
|
|
783
|
+
return c(), $(z, null, [
|
|
780
784
|
i(U, {
|
|
781
785
|
title: e(o)("connect.loyalty.card.title"),
|
|
782
786
|
actions: e(u),
|
|
783
787
|
"onClick:action": l[0] || (l[0] = (S) => {
|
|
784
788
|
var P, O;
|
|
785
|
-
console.log(S), S === "design" && ((P = e(M)) == null || P.showSheet(!0)), S === "create" && ((O = e(
|
|
789
|
+
console.log(S), S === "design" && ((P = e(M)) == null || P.showSheet(!0)), S === "create" && ((O = e(D)) == null || O.showSheet(!0));
|
|
786
790
|
})
|
|
787
791
|
}, {
|
|
788
|
-
title:
|
|
792
|
+
title: h(() => [
|
|
789
793
|
d("div", tt, [
|
|
790
794
|
d("span", lt, te(e(o)("connect.loyalty.card.title")), 1),
|
|
791
795
|
i(V, {
|
|
@@ -797,7 +801,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
797
801
|
_: 1
|
|
798
802
|
}, 8, ["title", "actions"]),
|
|
799
803
|
d("div", at, [
|
|
800
|
-
e(
|
|
804
|
+
e(A).length > 0 || e(A).length <= 0 && e(p).searchValue || e(p).pageCount > 0 ? (c(), $(z, { key: 0 }, [
|
|
801
805
|
d("div", nt, [
|
|
802
806
|
i(f, {
|
|
803
807
|
class: "mt-4",
|
|
@@ -817,7 +821,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
817
821
|
]),
|
|
818
822
|
i(Me, {
|
|
819
823
|
loading: e(p).isLoading,
|
|
820
|
-
"row-data": e(
|
|
824
|
+
"row-data": e(A),
|
|
821
825
|
"row-count": e(p).totalRows,
|
|
822
826
|
"column-defs": s,
|
|
823
827
|
"shrink-at": !1,
|
|
@@ -826,21 +830,21 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
826
830
|
"page-size": e(p).pageSize,
|
|
827
831
|
onSortChange: e(I),
|
|
828
832
|
onPageChange: l[2] || (l[2] = (S) => {
|
|
829
|
-
e(
|
|
833
|
+
e(_)({
|
|
830
834
|
pageSize: S.pageSize,
|
|
831
835
|
pageIndex: S.pageIndex
|
|
832
836
|
});
|
|
833
837
|
}),
|
|
834
838
|
onRowClick: l[3] || (l[3] = (S) => {
|
|
835
|
-
|
|
839
|
+
m(e(_e)(S.original));
|
|
836
840
|
})
|
|
837
841
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
|
|
838
|
-
], 64)) : (
|
|
842
|
+
], 64)) : (c(), F(q, {
|
|
839
843
|
key: 1,
|
|
840
844
|
variant: "outlined",
|
|
841
845
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
842
846
|
}, {
|
|
843
|
-
default:
|
|
847
|
+
default: h(() => [
|
|
844
848
|
l[8] || (l[8] = d("img", {
|
|
845
849
|
src: ve,
|
|
846
850
|
class: "aspect-square w-[150px]"
|
|
@@ -857,7 +861,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
857
861
|
disabled: !e(x).isPremium,
|
|
858
862
|
onClick: l[4] || (l[4] = () => {
|
|
859
863
|
var S;
|
|
860
|
-
return (S = e(
|
|
864
|
+
return (S = e(D)) == null ? void 0 : S.showSheet(!0);
|
|
861
865
|
})
|
|
862
866
|
}, null, 8, ["label", "disabled"]),
|
|
863
867
|
i(N, {
|
|
@@ -875,7 +879,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
875
879
|
})),
|
|
876
880
|
i(je, {
|
|
877
881
|
ref_key: "sheetRef",
|
|
878
|
-
ref:
|
|
882
|
+
ref: D,
|
|
879
883
|
onSuccess: l[6] || (l[6] = (S) => n()),
|
|
880
884
|
onExport: b
|
|
881
885
|
}, null, 512),
|
|
@@ -901,5 +905,5 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
901
905
|
}
|
|
902
906
|
});
|
|
903
907
|
export {
|
|
904
|
-
|
|
908
|
+
Nt as default
|
|
905
909
|
};
|