@feedmepos/mf-connect 0.1.37-prod → 0.1.38-beta.1
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-O-qZWrFp.js +761 -0
- package/dist/{App-Bpo0XZSs.js → App-BWZ2EE71.js} +364 -352
- package/dist/AuditLogs-DlmcFEta.js +1887 -0
- package/dist/{Bin-ohZ2CZZR.js → Bin-C-Ha-4yF.js} +8 -8
- package/dist/{Broadcast-D5x0_-zC.js → Broadcast-Bo3QS8lS.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-4vUMzH-l.js} +18 -18
- package/dist/{Card-BM-Lrm5y.js → Card-Bs1TDE0e.js} +159 -159
- package/dist/{Collections-Cr4aoJer.js → Collections-Dy5RN7Js.js} +103 -91
- package/dist/{Credit-DzDVFv4H.js → Credit-Bqc4dw1s.js} +74 -74
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js} +490 -488
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-BzwADnKp.js} +91 -89
- package/dist/{Experience-CjaDdbvZ.js → Experience-C2e2T7B-.js} +41 -41
- package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
- package/dist/{Game-BuiTygow.js → Game-C86eEhcx.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/{Index-CQGzUU-w.js → Index-BRGweFco.js} +10 -10
- package/dist/Marketing-CnnrnXbS.js +20073 -0
- package/dist/{Member-B4S0UNGq.js → Member-B3o0Zhcw.js} +76 -76
- package/dist/MemberList-BpE1IjED.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-C4hao-d9.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js → MessageInput.vue_vue_type_script_setup_true_lang-D9zfmqLs.js} +36 -36
- package/dist/{Mission-BtypT2uF.js → Mission-BURXfzjd.js} +21 -21
- package/dist/{Overview-Be7bUtRO.js → Overview-D_hrrM4O.js} +335 -335
- package/dist/{Point-Bw4lnLqp.js → Point-CJXkJY5Q.js} +41 -41
- package/dist/Promotion-CunJrh42.js +289 -0
- package/dist/{Queue-CpPEVgn8.js → Queue-v5Itg9J4.js} +52 -52
- package/dist/{Record-DQq4P69i.js → Record-DJe4tg9R.js} +9 -9
- package/dist/{Reward-DJH0eM8u.js → Reward-Y9aHpny5.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-1KAjCblO.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js} +635 -548
- package/dist/Segment-DVT8uDn8.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-BhJ-oVMb.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-b5bjfBvc.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js} +3 -3
- package/dist/{Setting-GRIUo7vg.js → Setting-BU5778gG.js} +432 -432
- package/dist/{Store-H0UDQpln.js → Store-IWg0POAU.js} +211 -211
- package/dist/StoreRewards-CIjHcVoh.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BcOvr526.js} +1 -1
- package/dist/{Tier-CJufQcIz.js → Tier-iN30KD7g.js} +106 -106
- package/dist/{Title-BBMgGUld.js → Title-Duh_Srek.js} +133 -131
- package/dist/{Transaction-DsucPnfp.js → Transaction-DLBA7Svl.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DLD5d43d.js} +6 -6
- package/dist/{Voucher-BPvxKO_w.js → Voucher-cTvlMN0Y.js} +153 -123
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DkjojUvD.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js} +1 -1
- package/dist/{app-Bo0JpadQ.js → app-A3oEKLq5.js} +1 -1
- package/dist/{app-D3MT1deX.js → app-De-yQ1CJ.js} +164 -125
- package/dist/app.js +4 -3
- package/dist/business-B2JBpm4y.js +79 -0
- package/dist/{campaign-Z3l7BoMg.js → campaign-Bhur0NJx.js} +9 -9
- package/dist/{campaign-j1c3ou7l.js → campaign-vkzui6F2.js} +5 -3
- package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-DCYkKGhd.js} +1 -1
- package/dist/{campaign.fn-rsRhHYZP.js → campaign.fn--affTEi5.js} +75 -75
- package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-CLBCnfev.js} +1 -1
- package/dist/{collection.fn-Bz38mGMa.js → collection.fn-bA8q0KYy.js} +2 -2
- package/dist/{dto-D648NN4s.js → dto-RCcWeYE0.js} +4 -4
- package/dist/{effect-DbMAmVSR.js → effect-D7qRfPe_.js} +1 -1
- package/dist/{email-addresses-KOVDrRiK.js → email-addresses-a8PqViID.js} +1 -1
- package/dist/{export-cTZf8Avd.js → export-BneqNRn4.js} +3 -3
- package/dist/{helper-BYyfcLqw.js → helper-DfvvxOyO.js} +1 -1
- package/dist/{index-E-0tTd0_.js → index-2LpkG8Ye.js} +1 -1
- package/dist/{index-BMl2KZts.js → index-4kMeSNTr.js} +11447 -10969
- package/dist/{index-BrKXRxe_.js → index-B0T9GDIZ.js} +1 -1
- package/dist/{index-B3p0hmIV.js → index-BWTvsoH0.js} +1 -1
- package/dist/index-CMBPIb8x.js +32260 -0
- package/dist/{index-DPBHiqsJ.js → index-CTKMdxSm.js} +1 -1
- package/dist/index-CVAWGMus.js +56 -0
- package/dist/index-CbsJ6vMJ.js +31 -0
- package/dist/{index-BTb8I_eB.js → index-CrFUhsZO.js} +1 -1
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-CvoShC5J.js → index-CtDqXnOp.js} +535 -460
- package/dist/{index-BIaCtk8e.js → index-D0GnMoag.js} +181 -79
- package/dist/{index-nF9iYTlh.js → index-DMrIQqFt.js} +1 -1
- package/dist/{index-B4MqsaBz.js → index-DeXvASjP.js} +3 -3
- package/dist/{index-CTPMbFf5.js → index-y-7yUm2e.js} +10 -9
- package/dist/{index.esm2017-DFYwde30.js → index.esm2017-JtyypweZ.js} +127 -127
- package/dist/{loading-vUArhX_O.js → loading-a-FqrwqI.js} +1 -1
- package/dist/{membership-BHKv29yt.js → membership-CGVtil5J.js} +3 -3
- package/dist/{money-Bl3_QRkE.js → money-CTc1l_Cq.js} +1 -1
- package/dist/{number-hh_S9w7k.js → number-W3R-0nYP.js} +1 -1
- package/dist/objectid-BU0Y8iAN.js +145 -0
- package/dist/{plugins-CVes2wzE.js → plugins-D2sSgTSl.js} +2 -2
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/{reward-ANZOdWzf.js → reward-atP8vnNn.js} +1 -1
- package/dist/{rule-builder-BSN777PN.js → rule-builder-BB29ZJ_C.js} +17 -17
- package/dist/{rule-BvFk5bQg.js → rule-eA5IvnjB.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{template-Dh9lDLs_.js → template-DhBeDaAm.js} +64 -64
- package/dist/{trigger-C7THbt7R.js → trigger-Bq_pZj1J.js} +7 -7
- package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
- package/dist/{user-DtNR9JY2.js → user-B-bhVFIG.js} +1 -1
- package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-D-h8VDSx.js} +310 -310
- package/dist/{xlsx-7u9SB0oa.js → xlsx-DsByAcZl.js} +226 -226
- package/package.json +5 -3
- package/dist/Analytic-CavR2bzs.js +0 -427
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/Marketing-BSspYuhg.js +0 -319
- package/dist/MemberList-CfnUJ3mh.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Promotion-Bg6x0rAh.js +0 -255
- package/dist/Segment-BLB4VWNJ.js +0 -882
- package/dist/StoreRewards--TNIFaCo.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
- package/dist/business-DMALI7ZO.js +0 -78
- package/dist/index-BsCGyJMY.js +0 -29566
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DFKmjCG1.js +0 -44
- package/dist/index-Dbd4WA4r.js +0 -61
- package/dist/objectid-CEyMlMge.js +0 -145
|
@@ -1,38 +1,38 @@
|
|
|
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
|
|
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 _, 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
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-
|
|
3
|
+
import { h as ne } from "./moment-BWErdI6_.js";
|
|
4
|
+
import { useDialog as ye, components as oe } from "@feedmepos/ui-library";
|
|
5
|
+
import "./index-CMBPIb8x.js";
|
|
6
|
+
import { u as J } from "./loading-a-FqrwqI.js";
|
|
7
7
|
import { u as me } from "./app-wDQR6dpb.js";
|
|
8
|
-
import { u as W } from "./membership-
|
|
8
|
+
import { u as W } from "./membership-CGVtil5J.js";
|
|
9
9
|
import { _ as Q } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
|
|
10
|
-
import { p as ce, f as se, n as
|
|
11
|
-
import { m as L } from "./index-
|
|
12
|
-
import { z as ie } from "./app-
|
|
10
|
+
import { p as ce, f as se, n as xe } from "./plugins-D2sSgTSl.js";
|
|
11
|
+
import { m as L } from "./index-CTKMdxSm.js";
|
|
12
|
+
import { z as ie } from "./app-De-yQ1CJ.js";
|
|
13
13
|
import { Z as re } from "./zod-Bg2FbC-D.js";
|
|
14
|
-
import { _ as de } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import
|
|
16
|
-
import "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { O as
|
|
21
|
-
import { a as
|
|
22
|
-
import { u as we } from "./business-
|
|
23
|
-
import { w as ke } from "./xlsx-
|
|
24
|
-
import { a as Fe, C as Ve } from "./export-
|
|
25
|
-
import { u as $e, _ as Me } from "./usePagination-
|
|
26
|
-
import { u as Be } from "./vue-i18n-
|
|
14
|
+
import { _ as de } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
15
|
+
import "./index-D0GnMoag.js";
|
|
16
|
+
import { k as Ce } from "./index-CtDqXnOp.js";
|
|
17
|
+
import "./index-y-7yUm2e.js";
|
|
18
|
+
import "./index-B0T9GDIZ.js";
|
|
19
|
+
import "./index-DeXvASjP.js";
|
|
20
|
+
import { O as Se } from "./objectid-BU0Y8iAN.js";
|
|
21
|
+
import { a as _e, c as he } from "./object-qECH92oz.js";
|
|
22
|
+
import { u as we } from "./business-B2JBpm4y.js";
|
|
23
|
+
import { w as ke } from "./xlsx-DsByAcZl.js";
|
|
24
|
+
import { a as Fe, C as Ve } from "./export-BneqNRn4.js";
|
|
25
|
+
import { u as $e, _ as Me } from "./usePagination-BeF5K3M7.js";
|
|
26
|
+
import { u as Be } from "./vue-i18n-D-h8VDSx.js";
|
|
27
27
|
import { o as Ue } from "./objectId-dwaoBfJX.js";
|
|
28
|
-
const De =
|
|
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"], Ee = { class: "flex items-center gap-8" }, je = /* @__PURE__ */ Z({
|
|
32
32
|
__name: "CreateCardSheet",
|
|
33
33
|
emits: ["success", "export"],
|
|
34
34
|
setup(ee, { expose: j, emit: T }) {
|
|
35
|
-
const { minor: A } = J, g = W(), M = y(),
|
|
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,
|
|
@@ -82,17 +82,17 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
82
82
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
83
83
|
{ label: "Numbers", value: "0123456789" },
|
|
84
84
|
{ label: "Custom", value: "" }
|
|
85
|
-
], I = y(D[0].value),
|
|
85
|
+
], I = y(D[0].value), h = y("bulk"), C = y(0), n = E(
|
|
86
86
|
() => {
|
|
87
87
|
var c;
|
|
88
|
-
return (c = g.membership.design) == null ? void 0 : c[
|
|
88
|
+
return (c = g.membership.design) == null ? void 0 : c[C.value];
|
|
89
89
|
}
|
|
90
90
|
), u = y(!1), r = E(
|
|
91
91
|
() => g.sortedStoreCategories.flatMap((c) => c.bundles)
|
|
92
92
|
);
|
|
93
93
|
async function b(c) {
|
|
94
94
|
var l, V;
|
|
95
|
-
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !
|
|
95
|
+
if (await ((l = M.value) == null ? void 0 : l.validateInputs()), !x.value) return;
|
|
96
96
|
c.design = (V = n.value) == null ? void 0 : V.image;
|
|
97
97
|
const t = await ce.confirm(
|
|
98
98
|
"",
|
|
@@ -121,7 +121,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
121
121
|
), X(async () => {
|
|
122
122
|
await g.readMemberStore();
|
|
123
123
|
}), (c, t) => {
|
|
124
|
-
const l = v("FmRadio"), V = v("FmRadioGroup"), U = v("FmSwitch"), f = v("FmStepperField"), N = v("FmSelect"), q = v("FmTextField"),
|
|
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
125
|
return m(), F(pe, {
|
|
126
126
|
"max-width": 560,
|
|
127
127
|
"dismiss-away": !0,
|
|
@@ -132,8 +132,8 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
132
132
|
t[20] || (t[20] = (R) => o.value = R)
|
|
133
133
|
]
|
|
134
134
|
}, {
|
|
135
|
-
"side-sheet-footer":
|
|
136
|
-
d("div",
|
|
135
|
+
"side-sheet-footer": _(() => [
|
|
136
|
+
d("div", Ee, [
|
|
137
137
|
i(P, {
|
|
138
138
|
label: "Save",
|
|
139
139
|
onClick: t[17] || (t[17] = (R) => b(e(s))),
|
|
@@ -147,25 +147,25 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
147
147
|
})
|
|
148
148
|
])
|
|
149
149
|
]),
|
|
150
|
-
default:
|
|
150
|
+
default: _(() => [
|
|
151
151
|
i(O, {
|
|
152
152
|
ref_key: "form",
|
|
153
153
|
ref: M,
|
|
154
154
|
class: "space-y-40",
|
|
155
|
-
onValidationSuccess: t[15] || (t[15] = (R) =>
|
|
156
|
-
onValidationFailed: t[16] || (t[16] = (R) =>
|
|
155
|
+
onValidationSuccess: t[15] || (t[15] = (R) => x.value = !0),
|
|
156
|
+
onValidationFailed: t[16] || (t[16] = (R) => x.value = !1)
|
|
157
157
|
}, {
|
|
158
|
-
default:
|
|
158
|
+
default: _(() => {
|
|
159
159
|
var R, le, ae;
|
|
160
160
|
return [
|
|
161
161
|
d("div", null, [
|
|
162
|
-
|
|
162
|
+
t[21] || (t[21] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1)),
|
|
163
163
|
i(V, {
|
|
164
|
-
modelValue: e(
|
|
165
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(
|
|
164
|
+
modelValue: e(h),
|
|
165
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(h) ? h.value = a : null),
|
|
166
166
|
inline: !1
|
|
167
167
|
}, {
|
|
168
|
-
default:
|
|
168
|
+
default: _(() => [
|
|
169
169
|
(m(), $(z, null, H(p, (a) => i(l, {
|
|
170
170
|
key: a.value,
|
|
171
171
|
value: a.value,
|
|
@@ -176,9 +176,9 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
176
176
|
_: 1
|
|
177
177
|
}, 8, ["modelValue"])
|
|
178
178
|
]),
|
|
179
|
-
d("div",
|
|
180
|
-
|
|
181
|
-
e(
|
|
179
|
+
d("div", De, [
|
|
180
|
+
t[22] || (t[22] = d("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1)),
|
|
181
|
+
e(h) === "bulk" ? (m(), $(z, { key: 0 }, [
|
|
182
182
|
i(U, {
|
|
183
183
|
"model-value": e(u),
|
|
184
184
|
"label-placement": "right",
|
|
@@ -211,7 +211,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
211
211
|
label: "Custom Charset",
|
|
212
212
|
required: ""
|
|
213
213
|
}, null, 8, ["modelValue"])) : k("", !0),
|
|
214
|
-
d("div",
|
|
214
|
+
d("div", Ae, [
|
|
215
215
|
i(q, {
|
|
216
216
|
modelValue: e(s).codeConfig.prefix,
|
|
217
217
|
"onUpdate:modelValue": t[5] || (t[5] = (a) => e(s).codeConfig.prefix = a),
|
|
@@ -242,17 +242,17 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
242
242
|
"helper-text": `${e(s).quantity} card will be created`
|
|
243
243
|
}, null, 8, ["modelValue", "rules", "helper-text"])
|
|
244
244
|
], 64)) : k("", !0),
|
|
245
|
-
e(
|
|
245
|
+
e(h) !== "bulk" ? (m(), F(S, {
|
|
246
246
|
key: 1,
|
|
247
247
|
modelValue: e(s).code,
|
|
248
248
|
"onUpdate:modelValue": t[9] || (t[9] = (a) => e(s).code = a),
|
|
249
249
|
label: "Custom Card Number",
|
|
250
|
-
rules: [(a) => e(
|
|
250
|
+
rules: [(a) => e(h) != "single" || !!a || "Custom code is required"],
|
|
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",
|
|
255
|
-
|
|
254
|
+
d("div", Ie, [
|
|
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",
|
|
258
258
|
label: "Set card number on bind",
|
|
@@ -266,7 +266,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
266
266
|
modelValue: e(s).bundle,
|
|
267
267
|
"onUpdate:modelValue": t[12] || (t[12] = (a) => e(s).bundle = a)
|
|
268
268
|
}, {
|
|
269
|
-
append:
|
|
269
|
+
append: _(() => [
|
|
270
270
|
e(s).bundle ? (m(), F(P, {
|
|
271
271
|
key: 0,
|
|
272
272
|
icon: "link_off",
|
|
@@ -284,7 +284,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
284
284
|
modelValue: e(s).subscriptionBundle,
|
|
285
285
|
"onUpdate:modelValue": t[14] || (t[14] = (a) => e(s).subscriptionBundle = a)
|
|
286
286
|
}, {
|
|
287
|
-
append:
|
|
287
|
+
append: _(() => [
|
|
288
288
|
e(s).subscriptionBundle ? (m(), F(P, {
|
|
289
289
|
key: 0,
|
|
290
290
|
icon: "link_off",
|
|
@@ -295,22 +295,22 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
295
295
|
_: 1
|
|
296
296
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
297
297
|
]),
|
|
298
|
-
e(g).membership.design ? (m(), $("div",
|
|
299
|
-
d("div",
|
|
300
|
-
|
|
298
|
+
e(g).membership.design ? (m(), $("div", Ne, [
|
|
299
|
+
d("div", Pe, [
|
|
300
|
+
t[24] || (t[24] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
301
301
|
d("img", {
|
|
302
302
|
src: (ae = e(n)) == null ? void 0 : ae.image,
|
|
303
303
|
class: "aspect-[16/9]"
|
|
304
|
-
}, null, 8,
|
|
305
|
-
d("div",
|
|
304
|
+
}, null, 8, Re),
|
|
305
|
+
d("div", qe, [
|
|
306
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: ue(["w-[112px] h-[63px] cursor-pointer", `${e(
|
|
310
|
-
onClick: (
|
|
309
|
+
class: ue(["w-[112px] h-[63px] cursor-pointer", `${e(C) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
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)
|
|
@@ -323,39 +323,39 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
323
323
|
}, 8, ["modelValue"]);
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
326
|
+
}), Te = { class: "space-y-16" }, Le = {
|
|
327
327
|
key: 0,
|
|
328
328
|
class: "flex flex-col gap-[16px] w-full"
|
|
329
|
-
},
|
|
329
|
+
}, Oe = { class: "flex flex-col gap-[8px]" }, Ye = ["src"], Ke = { class: "flex pt-[24px] gap-[24px]" }, Ge = ["src", "onClick", "alt"], He = { class: "flex items-center gap-8" }, Qe = /* @__PURE__ */ Z({
|
|
330
330
|
__name: "EditCardSheet",
|
|
331
331
|
emits: ["success"],
|
|
332
332
|
setup(ee, { expose: j, emit: T }) {
|
|
333
|
-
const { minor: A } = J, g = W(), M = y(),
|
|
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(
|
|
338
|
+
function s(C, n) {
|
|
339
339
|
var u;
|
|
340
|
-
B.value =
|
|
340
|
+
B.value = C, C && n && (o.value = n, p.value = (u = g.membership.design) == null ? void 0 : u.findIndex(
|
|
341
341
|
(r) => r.image === n.design
|
|
342
342
|
));
|
|
343
343
|
}
|
|
344
344
|
const p = y(0), D = E(
|
|
345
345
|
() => {
|
|
346
|
-
var
|
|
347
|
-
return (
|
|
346
|
+
var C;
|
|
347
|
+
return (C = g.membership.design) == null ? void 0 : C[p.value];
|
|
348
348
|
}
|
|
349
349
|
), I = E(
|
|
350
350
|
() => g.sortedStoreCategories.flatMap(
|
|
351
|
-
(
|
|
351
|
+
(C) => C.bundles
|
|
352
352
|
)
|
|
353
353
|
);
|
|
354
|
-
async function
|
|
354
|
+
async function h(C) {
|
|
355
355
|
var n, u;
|
|
356
|
-
await ((n = M.value) == null ? void 0 : n.validateInputs()),
|
|
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
|
-
await L.updateCard(
|
|
358
|
+
await L.updateCard(C), await w("success");
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
message: "Updating card",
|
|
@@ -367,7 +367,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
367
367
|
showSheet: s
|
|
368
368
|
}), X(async () => {
|
|
369
369
|
await g.readMemberStore();
|
|
370
|
-
}), (
|
|
370
|
+
}), (C, n) => {
|
|
371
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,
|
|
@@ -379,12 +379,12 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
379
379
|
n[11] || (n[11] = (l) => B.value = l)
|
|
380
380
|
]
|
|
381
381
|
}, {
|
|
382
|
-
"side-sheet-footer":
|
|
383
|
-
d("div",
|
|
382
|
+
"side-sheet-footer": _(() => [
|
|
383
|
+
d("div", He, [
|
|
384
384
|
i(b, {
|
|
385
385
|
label: "Save",
|
|
386
386
|
disabled: !!e(o).redeemedAt,
|
|
387
|
-
onClick: n[8] || (n[8] = (l) =>
|
|
387
|
+
onClick: n[8] || (n[8] = (l) => h(e(o))),
|
|
388
388
|
loading: e(me)().isLoading
|
|
389
389
|
}, null, 8, ["disabled", "loading"]),
|
|
390
390
|
i(b, {
|
|
@@ -395,18 +395,18 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
395
395
|
})
|
|
396
396
|
])
|
|
397
397
|
]),
|
|
398
|
-
default:
|
|
398
|
+
default: _(() => [
|
|
399
399
|
i(c, {
|
|
400
400
|
ref_key: "form",
|
|
401
401
|
ref: M,
|
|
402
402
|
class: "space-y-40",
|
|
403
|
-
onValidationSuccess: n[6] || (n[6] = (l) =>
|
|
404
|
-
onValidationFailed: n[7] || (n[7] = (l) =>
|
|
403
|
+
onValidationSuccess: n[6] || (n[6] = (l) => x.value = !0),
|
|
404
|
+
onValidationFailed: n[7] || (n[7] = (l) => x.value = !1)
|
|
405
405
|
}, {
|
|
406
|
-
default:
|
|
406
|
+
default: _(() => {
|
|
407
407
|
var l, V, U;
|
|
408
408
|
return [
|
|
409
|
-
d("div",
|
|
409
|
+
d("div", Te, [
|
|
410
410
|
i(u, {
|
|
411
411
|
modelValue: e(o).serialNumber,
|
|
412
412
|
"onUpdate:modelValue": n[0] || (n[0] = (f) => e(o).serialNumber = f),
|
|
@@ -419,7 +419,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
419
419
|
],
|
|
420
420
|
required: !0
|
|
421
421
|
}, null, 8, ["modelValue", "rules"]),
|
|
422
|
-
|
|
422
|
+
n[12] || (n[12] = d("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1)),
|
|
423
423
|
i(r, {
|
|
424
424
|
"label-placement": "right",
|
|
425
425
|
label: "Set card number on bind",
|
|
@@ -433,7 +433,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
433
433
|
modelValue: e(o).bundle,
|
|
434
434
|
"onUpdate:modelValue": n[3] || (n[3] = (f) => e(o).bundle = f)
|
|
435
435
|
}, {
|
|
436
|
-
append:
|
|
436
|
+
append: _(() => [
|
|
437
437
|
e(o).bundle ? (m(), F(b, {
|
|
438
438
|
key: 0,
|
|
439
439
|
icon: "link_off",
|
|
@@ -451,7 +451,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
451
451
|
modelValue: e(o).subscriptionBundle,
|
|
452
452
|
"onUpdate:modelValue": n[5] || (n[5] = (f) => e(o).subscriptionBundle = f)
|
|
453
453
|
}, {
|
|
454
|
-
append:
|
|
454
|
+
append: _(() => [
|
|
455
455
|
e(o).subscriptionBundle ? (m(), F(b, {
|
|
456
456
|
key: 0,
|
|
457
457
|
icon: "link_off",
|
|
@@ -462,14 +462,14 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
462
462
|
_: 1
|
|
463
463
|
}, 8, ["items", "modelValue"])) : k("", !0)
|
|
464
464
|
]),
|
|
465
|
-
e(g).membership.design ? (m(), $("div",
|
|
466
|
-
d("div",
|
|
467
|
-
|
|
465
|
+
e(g).membership.design ? (m(), $("div", Le, [
|
|
466
|
+
d("div", Oe, [
|
|
467
|
+
n[13] || (n[13] = d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
468
468
|
d("img", {
|
|
469
469
|
src: (U = e(D)) == null ? void 0 : U.image,
|
|
470
470
|
class: "aspect-[16/9]"
|
|
471
|
-
}, null, 8,
|
|
472
|
-
d("div",
|
|
471
|
+
}, null, 8, Ye),
|
|
472
|
+
d("div", Ke, [
|
|
473
473
|
(m(!0), $(z, null, H(e(g).membership.design, (f, N) => (m(), $("img", {
|
|
474
474
|
src: f.image,
|
|
475
475
|
key: `image_${N}`,
|
|
@@ -477,7 +477,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
477
477
|
onClick: (q) => p.value = N,
|
|
478
478
|
alt: `ai_image_predict_${N}`,
|
|
479
479
|
style: { objectFit: "cover" }
|
|
480
|
-
}, null, 10,
|
|
480
|
+
}, null, 10, Ge))), 128))
|
|
481
481
|
])
|
|
482
482
|
])
|
|
483
483
|
])) : k("", !0)
|
|
@@ -490,19 +490,19 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
490
490
|
}, 8, ["modelValue"]);
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
}),
|
|
493
|
+
}), Ze = {
|
|
494
494
|
key: 0,
|
|
495
495
|
class: "grid grid-cols-1 gap-8"
|
|
496
|
-
},
|
|
496
|
+
}, Xe = { class: "flex items-center gap-8" }, Je = { class: "flex items-center gap-8" }, We = 5, et = /* @__PURE__ */ Z({
|
|
497
497
|
__name: "CardDesignSheet",
|
|
498
498
|
emits: ["success"],
|
|
499
499
|
setup(ee, { expose: j, emit: T }) {
|
|
500
|
-
const { minor: A } = J, g = W(), M = ye(),
|
|
500
|
+
const { minor: A } = J, g = W(), M = ye(), x = y(!1);
|
|
501
501
|
y(), y(!1);
|
|
502
502
|
const w = y(), o = y(null);
|
|
503
503
|
E(() => {
|
|
504
504
|
var u, r;
|
|
505
|
-
return Math.min((((r = (u = w.value) == null ? void 0 : u.design) == null ? void 0 : r.length) ?? 0) + 1,
|
|
505
|
+
return Math.min((((r = (u = w.value) == null ? void 0 : u.design) == null ? void 0 : r.length) ?? 0) + 1, We);
|
|
506
506
|
});
|
|
507
507
|
const B = T, s = E(() => {
|
|
508
508
|
var u, r;
|
|
@@ -512,15 +512,15 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
512
512
|
p.value = u;
|
|
513
513
|
}
|
|
514
514
|
function I() {
|
|
515
|
-
|
|
515
|
+
x.value = !0;
|
|
516
516
|
}
|
|
517
|
-
async function
|
|
517
|
+
async function h() {
|
|
518
518
|
await A(
|
|
519
519
|
async () => {
|
|
520
520
|
var b;
|
|
521
|
-
const u =
|
|
521
|
+
const u = _e(w.value), r = Ce.parse(u);
|
|
522
522
|
if (r.design = (r == null ? void 0 : r.design) || [], o.value) {
|
|
523
|
-
const c =
|
|
523
|
+
const c = Se().toHexString(), t = await se.update(
|
|
524
524
|
se.designPath(c, o.value),
|
|
525
525
|
o.value
|
|
526
526
|
);
|
|
@@ -529,7 +529,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
529
529
|
image: t
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
await L.update(r), await n(), await B("success"), o.value = null,
|
|
532
|
+
await L.update(r), await n(), await B("success"), o.value = null, x.value = !1;
|
|
533
533
|
},
|
|
534
534
|
{
|
|
535
535
|
message: "Saving card design",
|
|
@@ -537,7 +537,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
537
537
|
}
|
|
538
538
|
);
|
|
539
539
|
}
|
|
540
|
-
async function
|
|
540
|
+
async function C(u, r) {
|
|
541
541
|
u ? o.value = u : r && M.open({
|
|
542
542
|
title: "Delete Design",
|
|
543
543
|
message: "Are you sure you want to delete this design?",
|
|
@@ -546,7 +546,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
546
546
|
}).onPrimary(async () => {
|
|
547
547
|
var c, t;
|
|
548
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
|
|
549
|
+
console.log(b), b !== -1 && ((t = w.value.design) == null || t.splice(b, 1)), await h();
|
|
550
550
|
}).onSecondary(() => {
|
|
551
551
|
M.close();
|
|
552
552
|
});
|
|
@@ -557,7 +557,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
557
557
|
return j({
|
|
558
558
|
showSheet: D
|
|
559
559
|
}), X(async () => {
|
|
560
|
-
await n(), s.value.length || (
|
|
560
|
+
await n(), s.value.length || (x.value = !0);
|
|
561
561
|
}), (u, r) => {
|
|
562
562
|
const b = v("FmButton"), c = v("FmSideSheet");
|
|
563
563
|
return m(), F(c, {
|
|
@@ -570,8 +570,8 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
570
570
|
r[3] || (r[3] = (t) => p.value = t)
|
|
571
571
|
]
|
|
572
572
|
}, ge({
|
|
573
|
-
default:
|
|
574
|
-
e(
|
|
573
|
+
default: _(() => [
|
|
574
|
+
e(x) ? k("", !0) : (m(), $("div", Ze, [
|
|
575
575
|
(m(!0), $(z, null, H(e(s), (t) => (m(), F(de, {
|
|
576
576
|
key: String(t._id),
|
|
577
577
|
"image-fit": "cover",
|
|
@@ -583,51 +583,51 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
583
583
|
file: void 0,
|
|
584
584
|
"delete-button": !1
|
|
585
585
|
}, {
|
|
586
|
-
"delete-button":
|
|
586
|
+
"delete-button": _(() => [
|
|
587
587
|
i(b, {
|
|
588
588
|
class: "!text-neutral-50 !bg-neutral-700",
|
|
589
589
|
icon: "delete",
|
|
590
590
|
variant: "tertiary",
|
|
591
|
-
onClick: (l) =>
|
|
591
|
+
onClick: (l) => C(null, t._id)
|
|
592
592
|
}, null, 8, ["onClick"])
|
|
593
593
|
]),
|
|
594
594
|
_: 2
|
|
595
595
|
}, 1032, ["thumbnail"]))), 128))
|
|
596
596
|
])),
|
|
597
|
-
e(
|
|
597
|
+
e(x) ? (m(), F(de, {
|
|
598
598
|
key: 1,
|
|
599
599
|
"image-fit": "cover",
|
|
600
600
|
label: "",
|
|
601
601
|
"aspect-ratio": "16/9",
|
|
602
602
|
accept: ".png, .jpg, .jpeg, .gif",
|
|
603
603
|
"recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
|
|
604
|
-
"onUpdate:file":
|
|
604
|
+
"onUpdate:file": C
|
|
605
605
|
})) : k("", !0)
|
|
606
606
|
]),
|
|
607
607
|
_: 2
|
|
608
608
|
}, [
|
|
609
|
-
e(
|
|
609
|
+
e(x) ? {
|
|
610
610
|
name: "side-sheet-footer",
|
|
611
|
-
fn:
|
|
612
|
-
d("div",
|
|
611
|
+
fn: _(() => [
|
|
612
|
+
d("div", Je, [
|
|
613
613
|
i(b, {
|
|
614
614
|
label: "Save",
|
|
615
|
-
onClick:
|
|
615
|
+
onClick: h,
|
|
616
616
|
disabled: !e(o)
|
|
617
617
|
}, null, 8, ["disabled"]),
|
|
618
618
|
i(b, {
|
|
619
619
|
label: "Cancel",
|
|
620
620
|
type: "button",
|
|
621
621
|
variant: "tertiary",
|
|
622
|
-
onClick: r[1] || (r[1] = (t) =>
|
|
622
|
+
onClick: r[1] || (r[1] = (t) => x.value = !1)
|
|
623
623
|
})
|
|
624
624
|
])
|
|
625
625
|
]),
|
|
626
626
|
key: "1"
|
|
627
627
|
} : {
|
|
628
628
|
name: "side-sheet-footer",
|
|
629
|
-
fn:
|
|
630
|
-
d("div",
|
|
629
|
+
fn: _(() => [
|
|
630
|
+
d("div", Xe, [
|
|
631
631
|
i(b, {
|
|
632
632
|
label: "Add Design",
|
|
633
633
|
onClick: I
|
|
@@ -645,13 +645,10 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
645
645
|
]), 1032, ["modelValue"]);
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
-
}),
|
|
649
|
-
src: ve,
|
|
650
|
-
class: "aspect-square w-[150px]"
|
|
651
|
-
}, null, -1), ct = { class: "flex flex-col gap-16 text-center" }, pt = { class: "fm-typo-en-title-sm-800" }, ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "flex gap-x-8" }, Ot = /* @__PURE__ */ Z({
|
|
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({
|
|
652
649
|
__name: "Card",
|
|
653
650
|
setup(ee) {
|
|
654
|
-
const { minor: j, global: T } = J, A = y(), g = y(), M = y(),
|
|
651
|
+
const { minor: j, global: T } = J, A = y(), g = y(), M = y(), x = we(), w = W(), { t: o } = Be(), B = E(
|
|
655
652
|
() => w.sortedStoreCategories.flatMap((t) => t.bundles)
|
|
656
653
|
), s = [
|
|
657
654
|
{
|
|
@@ -670,7 +667,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
670
667
|
class: "flex items-center gap-x-8"
|
|
671
668
|
},
|
|
672
669
|
[
|
|
673
|
-
K(
|
|
670
|
+
K(oe.FmAvatar, {
|
|
674
671
|
name: l != null && l.photoUrl || l == null ? void 0 : l.name,
|
|
675
672
|
src: (l == null ? void 0 : l.photoUrl) ?? void 0,
|
|
676
673
|
size: "sm"
|
|
@@ -691,7 +688,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
691
688
|
{
|
|
692
689
|
header: o("connect.loyalty.card.table.created_at"),
|
|
693
690
|
accessorKey: "_id",
|
|
694
|
-
accessorFn: (t) =>
|
|
691
|
+
accessorFn: (t) => ne(Ue(t._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
695
692
|
},
|
|
696
693
|
{
|
|
697
694
|
header: o("connect.loyalty.card.table.bundle"),
|
|
@@ -703,12 +700,12 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
703
700
|
{
|
|
704
701
|
header: o("connect.loyalty.card.table.redeemed_at"),
|
|
705
702
|
accessorKey: "redeemedAt",
|
|
706
|
-
accessorFn: (t) => t.redeemedAt ?
|
|
703
|
+
accessorFn: (t) => t.redeemedAt ? ne(t.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
707
704
|
},
|
|
708
705
|
{
|
|
709
706
|
header: o("connect.loyalty.card.table.actions"),
|
|
710
707
|
cell(t) {
|
|
711
|
-
return K(
|
|
708
|
+
return K(oe.FmButton, {
|
|
712
709
|
variant: "tertiary",
|
|
713
710
|
icon: "delete",
|
|
714
711
|
iconColor: "neutral-gray-400",
|
|
@@ -719,12 +716,12 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
719
716
|
});
|
|
720
717
|
}
|
|
721
718
|
}
|
|
722
|
-
], { tableMeta: p, rowData: D, onSort: I, debouncedFetchData:
|
|
719
|
+
], { tableMeta: p, rowData: D, onSort: I, debouncedFetchData: h, onSearch: C } = $e(L.readCards);
|
|
723
720
|
async function n(t) {
|
|
724
721
|
var l;
|
|
725
|
-
await
|
|
722
|
+
await h(t), (l = A.value) == null || l.showSheet(!1);
|
|
726
723
|
}
|
|
727
|
-
const u = E(() =>
|
|
724
|
+
const u = E(() => x.isPremium ? [
|
|
728
725
|
{
|
|
729
726
|
label: o("connect.loyalty.card.actions.create"),
|
|
730
727
|
value: "create",
|
|
@@ -741,7 +738,7 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
741
738
|
`Are you sure you want to remove card ${t.serialNumber}?`
|
|
742
739
|
) && await j(
|
|
743
740
|
async () => {
|
|
744
|
-
await L.deleteCard(t._id.toString()), await
|
|
741
|
+
await L.deleteCard(t._id.toString()), await h({ pageSize: 10, pageIndex: 0 });
|
|
745
742
|
},
|
|
746
743
|
{
|
|
747
744
|
message: `Removing card ${t.serialNumber}`,
|
|
@@ -768,14 +765,14 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
768
765
|
const c = (t) => {
|
|
769
766
|
var l;
|
|
770
767
|
if (t.redeemedAt) {
|
|
771
|
-
|
|
768
|
+
xe.error("Update not permitted", 2e3);
|
|
772
769
|
return;
|
|
773
770
|
}
|
|
774
771
|
(l = g == null ? void 0 : g.value) == null || l.showSheet(!0, t);
|
|
775
772
|
};
|
|
776
773
|
return X(async () => {
|
|
777
774
|
await T(async () => {
|
|
778
|
-
await
|
|
775
|
+
await x.readPremium(), await w.readMemberStore(), await w.readMembership(), await n();
|
|
779
776
|
});
|
|
780
777
|
}), (t, l) => {
|
|
781
778
|
const V = v("FmPill"), U = v("FmPageHead"), f = v("FmSearch"), N = v("FmButton"), q = v("FmCard");
|
|
@@ -783,14 +780,14 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
783
780
|
i(U, {
|
|
784
781
|
title: e(o)("connect.loyalty.card.title"),
|
|
785
782
|
actions: e(u),
|
|
786
|
-
"onClick:action": l[0] || (l[0] = (
|
|
783
|
+
"onClick:action": l[0] || (l[0] = (S) => {
|
|
787
784
|
var P, O;
|
|
788
|
-
console.log(
|
|
785
|
+
console.log(S), S === "design" && ((P = e(M)) == null || P.showSheet(!0)), S === "create" && ((O = e(A)) == null || O.showSheet(!0));
|
|
789
786
|
})
|
|
790
787
|
}, {
|
|
791
|
-
title:
|
|
792
|
-
d("div",
|
|
793
|
-
d("span",
|
|
788
|
+
title: _(() => [
|
|
789
|
+
d("div", tt, [
|
|
790
|
+
d("span", lt, te(e(o)("connect.loyalty.card.title")), 1),
|
|
794
791
|
i(V, {
|
|
795
792
|
class: "ml-8",
|
|
796
793
|
variant: "premium"
|
|
@@ -799,15 +796,15 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
799
796
|
]),
|
|
800
797
|
_: 1
|
|
801
798
|
}, 8, ["title", "actions"]),
|
|
802
|
-
d("div",
|
|
799
|
+
d("div", at, [
|
|
803
800
|
e(D).length > 0 || e(D).length <= 0 && e(p).searchValue || e(p).pageCount > 0 ? (m(), $(z, { key: 0 }, [
|
|
804
|
-
d("div",
|
|
801
|
+
d("div", nt, [
|
|
805
802
|
i(f, {
|
|
806
803
|
class: "mt-4",
|
|
807
804
|
modelValue: e(p).searchValue,
|
|
808
805
|
"onUpdate:modelValue": [
|
|
809
|
-
l[1] || (l[1] = (
|
|
810
|
-
e(
|
|
806
|
+
l[1] || (l[1] = (S) => e(p).searchValue = S),
|
|
807
|
+
e(C)
|
|
811
808
|
],
|
|
812
809
|
placeholder: "Search",
|
|
813
810
|
collapsible: ""
|
|
@@ -828,14 +825,14 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
828
825
|
"page-index": e(p).pageIndex,
|
|
829
826
|
"page-size": e(p).pageSize,
|
|
830
827
|
onSortChange: e(I),
|
|
831
|
-
onPageChange: l[2] || (l[2] = (
|
|
832
|
-
e(
|
|
833
|
-
pageSize:
|
|
834
|
-
pageIndex:
|
|
828
|
+
onPageChange: l[2] || (l[2] = (S) => {
|
|
829
|
+
e(h)({
|
|
830
|
+
pageSize: S.pageSize,
|
|
831
|
+
pageIndex: S.pageIndex
|
|
835
832
|
});
|
|
836
833
|
}),
|
|
837
|
-
onRowClick: l[3] || (l[3] = (
|
|
838
|
-
c(e(
|
|
834
|
+
onRowClick: l[3] || (l[3] = (S) => {
|
|
835
|
+
c(e(he)(S.original));
|
|
839
836
|
})
|
|
840
837
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
|
|
841
838
|
], 64)) : (m(), F(q, {
|
|
@@ -843,51 +840,54 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
843
840
|
variant: "outlined",
|
|
844
841
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
845
842
|
}, {
|
|
846
|
-
default:
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
843
|
+
default: _(() => [
|
|
844
|
+
l[8] || (l[8] = d("img", {
|
|
845
|
+
src: ve,
|
|
846
|
+
class: "aspect-square w-[150px]"
|
|
847
|
+
}, null, -1)),
|
|
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)
|
|
851
851
|
]),
|
|
852
|
-
d("div",
|
|
852
|
+
d("div", rt, [
|
|
853
853
|
i(N, {
|
|
854
854
|
variant: "primary",
|
|
855
855
|
label: e(o)("connect.loyalty.card.actions.add"),
|
|
856
856
|
icon: "add",
|
|
857
|
-
disabled: !e(
|
|
857
|
+
disabled: !e(x).isPremium,
|
|
858
858
|
onClick: l[4] || (l[4] = () => {
|
|
859
|
-
var
|
|
860
|
-
return (
|
|
859
|
+
var S;
|
|
860
|
+
return (S = e(A)) == null ? void 0 : S.showSheet(!0);
|
|
861
861
|
})
|
|
862
862
|
}, null, 8, ["label", "disabled"]),
|
|
863
863
|
i(N, {
|
|
864
864
|
variant: "secondary",
|
|
865
865
|
label: e(o)("connect.loyalty.card.actions.manage_design"),
|
|
866
|
-
disabled: !e(
|
|
866
|
+
disabled: !e(x).isPremium,
|
|
867
867
|
onClick: l[5] || (l[5] = () => {
|
|
868
|
-
var
|
|
869
|
-
return (
|
|
868
|
+
var S;
|
|
869
|
+
return (S = e(M)) == null ? void 0 : S.showSheet(!0);
|
|
870
870
|
})
|
|
871
871
|
}, null, 8, ["label", "disabled"])
|
|
872
872
|
])
|
|
873
873
|
]),
|
|
874
874
|
_: 1
|
|
875
875
|
})),
|
|
876
|
-
i(
|
|
876
|
+
i(je, {
|
|
877
877
|
ref_key: "sheetRef",
|
|
878
878
|
ref: A,
|
|
879
|
-
onSuccess: l[6] || (l[6] = (
|
|
879
|
+
onSuccess: l[6] || (l[6] = (S) => n()),
|
|
880
880
|
onExport: b
|
|
881
881
|
}, null, 512),
|
|
882
|
-
i(
|
|
882
|
+
i(et, {
|
|
883
883
|
ref_key: "designSheetRef",
|
|
884
884
|
ref: M,
|
|
885
885
|
onSuccess: n
|
|
886
886
|
}, null, 512),
|
|
887
|
-
i(
|
|
887
|
+
i(Qe, {
|
|
888
888
|
ref_key: "editSheetRef",
|
|
889
889
|
ref: g,
|
|
890
|
-
onSuccess: l[7] || (l[7] = (
|
|
890
|
+
onSuccess: l[7] || (l[7] = (S) => {
|
|
891
891
|
var P;
|
|
892
892
|
n({
|
|
893
893
|
pageSize: e(p).pageSize,
|
|
@@ -901,5 +901,5 @@ const De = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Number
|
|
|
901
901
|
}
|
|
902
902
|
});
|
|
903
903
|
export {
|
|
904
|
-
|
|
904
|
+
Rt as default
|
|
905
905
|
};
|