@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-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-D8WCDkga.js +427 -0
- package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
- package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
- package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
- package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
- package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
- package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
- package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
- package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
- package/dist/Marketing-C7F4abzg.js +319 -0
- package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
- package/dist/MemberList-DFW2bMbr.js +1606 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
- package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
- package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
- package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
- package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
- package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
- package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
- package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
- package/dist/Segment-DDQIzsrk.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
- package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
- package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
- package/dist/StoreRewards-D5zlE6cE.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
- package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
- package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
- package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
- package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
- package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
- package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
- package/dist/app.js +3 -4
- package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
- package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
- package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
- package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
- package/dist/campaign.fn-DJ6J98jS.js +758 -0
- package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
- package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
- package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
- package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
- package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
- package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
- package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
- package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
- package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
- package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
- package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
- package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
- package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
- package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
- package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
- package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
- package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-D2uZzjpn.js +44 -0
- package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
- package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
- package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
- package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
- package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
- package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
- package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
- package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
- package/dist/objectid-Cr99eTPd.js +145 -0
- package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
- package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
- package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
- package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
- package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
- package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
- package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
- package/package.json +3 -9
- package/dist/Analytic-BjSfI2Ff.js +0 -761
- package/dist/AuditLogs-DWCFYoRg.js +0 -1887
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/Marketing-Dn9A1vgH.js +0 -20073
- package/dist/MemberList-BWTG9Ohy.js +0 -1606
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
- package/dist/Segment-Bzq-pyhc.js +0 -882
- package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
- package/dist/campaign.fn-BYZgKDN7.js +0 -758
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-CwsMG2cV.js +0 -56
- package/dist/objectid-D5T27iny.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -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 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
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 oe } from "./moment-BWErdI6_.js";
|
|
4
|
+
import { useDialog as ye, components as ne } from "@feedmepos/ui-library";
|
|
5
|
+
import "./index-CIztuDE4.js";
|
|
6
|
+
import { u as J } from "./loading-BFkEqWR6.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-D0eN3i_T.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 _e } from "./plugins-DK_ue6Xa.js";
|
|
11
|
+
import { m as L } from "./index-2OAcPmuQ.js";
|
|
12
|
+
import { z as ie } from "./app-DuIzRGvb.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 "./index-
|
|
16
|
-
import
|
|
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-ByhTB9Ie.js";
|
|
15
|
+
import { k as xe } from "./index-C7rl1eHp.js";
|
|
16
|
+
import "./index-DWdAUovq.js";
|
|
17
|
+
import "./index-B_893fH7.js";
|
|
18
|
+
import "./index-DkWcEDHA.js";
|
|
19
|
+
import "./index-B0YZKHyu.js";
|
|
20
|
+
import { O as he } from "./objectid-Cr99eTPd.js";
|
|
21
|
+
import { a as Ce, c as Se } from "./object-qECH92oz.js";
|
|
22
|
+
import { u as we } from "./business-TTvv3aTz.js";
|
|
23
|
+
import { w as ke } from "./xlsx-WnLDq4qn.js";
|
|
24
|
+
import { a as Fe, C as Ve } from "./export-DtarK6IJ.js";
|
|
25
|
+
import { u as $e, _ as Me } from "./usePagination-JoYaROkV.js";
|
|
26
|
+
import { u as Be } from "./vue-i18n-BtvUK9hI.js";
|
|
27
27
|
import { o as Ue } from "./objectId-dwaoBfJX.js";
|
|
28
|
-
const De = { class: "space-y-16" },
|
|
28
|
+
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 = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "flex flex-col gap-[16px] w-full"
|
|
31
|
-
},
|
|
31
|
+
}, 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({
|
|
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(), _ = 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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
82
82
|
{ label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
|
|
83
83
|
{ label: "Numbers", value: "0123456789" },
|
|
84
84
|
{ label: "Custom", value: "" }
|
|
85
|
-
], I = y(D[0].value),
|
|
85
|
+
], I = y(D[0].value), S = y("bulk"), x = 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[x.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()), !_.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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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"), h = 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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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": C(() => [
|
|
136
|
+
d("div", Oe, [
|
|
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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
147
147
|
})
|
|
148
148
|
])
|
|
149
149
|
]),
|
|
150
|
-
default:
|
|
150
|
+
default: C(() => [
|
|
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) => _.value = !0),
|
|
156
|
+
onValidationFailed: t[16] || (t[16] = (R) => _.value = !1)
|
|
157
157
|
}, {
|
|
158
|
-
default:
|
|
158
|
+
default: C(() => {
|
|
159
159
|
var R, le, ae;
|
|
160
160
|
return [
|
|
161
161
|
d("div", null, [
|
|
162
|
-
|
|
162
|
+
De,
|
|
163
163
|
i(V, {
|
|
164
|
-
modelValue: e(
|
|
165
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(
|
|
164
|
+
modelValue: e(S),
|
|
165
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => G(S) ? S.value = a : null),
|
|
166
166
|
inline: !1
|
|
167
167
|
}, {
|
|
168
|
-
default:
|
|
168
|
+
default: C(() => [
|
|
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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
176
176
|
_: 1
|
|
177
177
|
}, 8, ["modelValue"])
|
|
178
178
|
]),
|
|
179
|
-
d("div",
|
|
180
|
-
|
|
181
|
-
e(
|
|
179
|
+
d("div", Ae, [
|
|
180
|
+
Ie,
|
|
181
|
+
e(S) === "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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
211
211
|
label: "Custom Charset",
|
|
212
212
|
required: ""
|
|
213
213
|
}, null, 8, ["modelValue"])) : k("", !0),
|
|
214
|
-
d("div",
|
|
214
|
+
d("div", Ne, [
|
|
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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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(S) !== "bulk" ? (m(), F(h, {
|
|
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(S) != "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", Pe, [
|
|
255
|
+
Re,
|
|
256
256
|
i(U, {
|
|
257
257
|
"label-placement": "right",
|
|
258
258
|
label: "Set card number on bind",
|
|
@@ -266,7 +266,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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: C(() => [
|
|
270
270
|
e(s).bundle ? (m(), F(P, {
|
|
271
271
|
key: 0,
|
|
272
272
|
icon: "link_off",
|
|
@@ -284,7 +284,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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: C(() => [
|
|
288
288
|
e(s).subscriptionBundle ? (m(), F(P, {
|
|
289
289
|
key: 0,
|
|
290
290
|
icon: "link_off",
|
|
@@ -295,22 +295,22 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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", qe, [
|
|
299
|
+
d("div", ze, [
|
|
300
|
+
Ee,
|
|
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, je),
|
|
305
|
+
d("div", Te, [
|
|
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(x) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
|
|
310
|
+
onClick: (bt) => x.value = Y,
|
|
311
311
|
alt: `ai_image_predict_${Y}`,
|
|
312
312
|
style: { objectFit: "cover" }
|
|
313
|
-
}, null, 10,
|
|
313
|
+
}, null, 10, Le))), 128))
|
|
314
314
|
])
|
|
315
315
|
])
|
|
316
316
|
])) : k("", !0)
|
|
@@ -323,39 +323,39 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
323
323
|
}, 8, ["modelValue"]);
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
326
|
+
}), Ke = { class: "space-y-16" }, Ge = /* @__PURE__ */ d("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1), He = {
|
|
327
327
|
key: 0,
|
|
328
328
|
class: "flex flex-col gap-[16px] w-full"
|
|
329
|
-
},
|
|
329
|
+
}, Qe = { class: "flex flex-col gap-[8px]" }, Ze = /* @__PURE__ */ d("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1), Xe = ["src"], Je = { class: "flex pt-[24px] gap-[24px]" }, We = ["src", "onClick", "alt"], et = { class: "flex items-center gap-8" }, tt = /* @__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(), _ = 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(x, n) {
|
|
339
339
|
var u;
|
|
340
|
-
B.value =
|
|
340
|
+
B.value = x, x && 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 x;
|
|
347
|
+
return (x = g.membership.design) == null ? void 0 : x[p.value];
|
|
348
348
|
}
|
|
349
349
|
), I = E(
|
|
350
350
|
() => g.sortedStoreCategories.flatMap(
|
|
351
|
-
(
|
|
351
|
+
(x) => x.bundles
|
|
352
352
|
)
|
|
353
353
|
);
|
|
354
|
-
async function
|
|
354
|
+
async function S(x) {
|
|
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()), _.value && (x.design = (u = D.value) == null ? void 0 : u.image, await A(
|
|
357
357
|
async () => {
|
|
358
|
-
await L.updateCard(
|
|
358
|
+
await L.updateCard(x), await w("success");
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
message: "Updating card",
|
|
@@ -367,7 +367,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
367
367
|
showSheet: s
|
|
368
368
|
}), X(async () => {
|
|
369
369
|
await g.readMemberStore();
|
|
370
|
-
}), (
|
|
370
|
+
}), (x, 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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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": C(() => [
|
|
383
|
+
d("div", et, [
|
|
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) => S(e(o))),
|
|
388
388
|
loading: e(me)().isLoading
|
|
389
389
|
}, null, 8, ["disabled", "loading"]),
|
|
390
390
|
i(b, {
|
|
@@ -395,18 +395,18 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
395
395
|
})
|
|
396
396
|
])
|
|
397
397
|
]),
|
|
398
|
-
default:
|
|
398
|
+
default: C(() => [
|
|
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) => _.value = !0),
|
|
404
|
+
onValidationFailed: n[7] || (n[7] = (l) => _.value = !1)
|
|
405
405
|
}, {
|
|
406
|
-
default:
|
|
406
|
+
default: C(() => {
|
|
407
407
|
var l, V, U;
|
|
408
408
|
return [
|
|
409
|
-
d("div",
|
|
409
|
+
d("div", Ke, [
|
|
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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
419
419
|
],
|
|
420
420
|
required: !0
|
|
421
421
|
}, null, 8, ["modelValue", "rules"]),
|
|
422
|
-
|
|
422
|
+
Ge,
|
|
423
423
|
i(r, {
|
|
424
424
|
"label-placement": "right",
|
|
425
425
|
label: "Set card number on bind",
|
|
@@ -433,7 +433,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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: C(() => [
|
|
437
437
|
e(o).bundle ? (m(), F(b, {
|
|
438
438
|
key: 0,
|
|
439
439
|
icon: "link_off",
|
|
@@ -451,7 +451,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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: C(() => [
|
|
455
455
|
e(o).subscriptionBundle ? (m(), F(b, {
|
|
456
456
|
key: 0,
|
|
457
457
|
icon: "link_off",
|
|
@@ -462,14 +462,14 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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", He, [
|
|
466
|
+
d("div", Qe, [
|
|
467
|
+
Ze,
|
|
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, Xe),
|
|
472
|
+
d("div", Je, [
|
|
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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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, We))), 128))
|
|
481
481
|
])
|
|
482
482
|
])
|
|
483
483
|
])) : k("", !0)
|
|
@@ -490,19 +490,19 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
490
490
|
}, 8, ["modelValue"]);
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
}),
|
|
493
|
+
}), lt = {
|
|
494
494
|
key: 0,
|
|
495
495
|
class: "grid grid-cols-1 gap-8"
|
|
496
|
-
},
|
|
496
|
+
}, at = { class: "flex items-center gap-8" }, ot = { class: "flex items-center gap-8" }, nt = 5, st = /* @__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(), _ = 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, nt);
|
|
506
506
|
});
|
|
507
507
|
const B = T, s = E(() => {
|
|
508
508
|
var u, r;
|
|
@@ -512,15 +512,15 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
512
512
|
p.value = u;
|
|
513
513
|
}
|
|
514
514
|
function I() {
|
|
515
|
-
|
|
515
|
+
_.value = !0;
|
|
516
516
|
}
|
|
517
|
-
async function
|
|
517
|
+
async function S() {
|
|
518
518
|
await A(
|
|
519
519
|
async () => {
|
|
520
520
|
var b;
|
|
521
|
-
const u =
|
|
521
|
+
const u = Ce(w.value), r = xe.parse(u);
|
|
522
522
|
if (r.design = (r == null ? void 0 : r.design) || [], o.value) {
|
|
523
|
-
const c =
|
|
523
|
+
const c = he().toHexString(), t = await se.update(
|
|
524
524
|
se.designPath(c, o.value),
|
|
525
525
|
o.value
|
|
526
526
|
);
|
|
@@ -529,7 +529,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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, _.value = !1;
|
|
533
533
|
},
|
|
534
534
|
{
|
|
535
535
|
message: "Saving card design",
|
|
@@ -537,7 +537,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
537
537
|
}
|
|
538
538
|
);
|
|
539
539
|
}
|
|
540
|
-
async function
|
|
540
|
+
async function x(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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
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 S();
|
|
550
550
|
}).onSecondary(() => {
|
|
551
551
|
M.close();
|
|
552
552
|
});
|
|
@@ -557,7 +557,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
557
557
|
return j({
|
|
558
558
|
showSheet: D
|
|
559
559
|
}), X(async () => {
|
|
560
|
-
await n(), s.value.length || (
|
|
560
|
+
await n(), s.value.length || (_.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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
570
570
|
r[3] || (r[3] = (t) => p.value = t)
|
|
571
571
|
]
|
|
572
572
|
}, ge({
|
|
573
|
-
default:
|
|
574
|
-
e(
|
|
573
|
+
default: C(() => [
|
|
574
|
+
e(_) ? k("", !0) : (m(), $("div", lt, [
|
|
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 = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
583
583
|
file: void 0,
|
|
584
584
|
"delete-button": !1
|
|
585
585
|
}, {
|
|
586
|
-
"delete-button":
|
|
586
|
+
"delete-button": C(() => [
|
|
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) => x(null, t._id)
|
|
592
592
|
}, null, 8, ["onClick"])
|
|
593
593
|
]),
|
|
594
594
|
_: 2
|
|
595
595
|
}, 1032, ["thumbnail"]))), 128))
|
|
596
596
|
])),
|
|
597
|
-
e(
|
|
597
|
+
e(_) ? (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": x
|
|
605
605
|
})) : k("", !0)
|
|
606
606
|
]),
|
|
607
607
|
_: 2
|
|
608
608
|
}, [
|
|
609
|
-
e(
|
|
609
|
+
e(_) ? {
|
|
610
610
|
name: "side-sheet-footer",
|
|
611
|
-
fn:
|
|
612
|
-
d("div",
|
|
611
|
+
fn: C(() => [
|
|
612
|
+
d("div", ot, [
|
|
613
613
|
i(b, {
|
|
614
614
|
label: "Save",
|
|
615
|
-
onClick:
|
|
615
|
+
onClick: S,
|
|
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) => _.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: C(() => [
|
|
630
|
+
d("div", at, [
|
|
631
631
|
i(b, {
|
|
632
632
|
label: "Add Design",
|
|
633
633
|
onClick: I
|
|
@@ -645,10 +645,13 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
645
645
|
]), 1032, ["modelValue"]);
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
-
}),
|
|
648
|
+
}), 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", {
|
|
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({
|
|
649
652
|
__name: "Card",
|
|
650
653
|
setup(ee) {
|
|
651
|
-
const { minor: j, global: T } = J, A = y(), g = y(), M = y(),
|
|
654
|
+
const { minor: j, global: T } = J, A = y(), g = y(), M = y(), _ = we(), w = W(), { t: o } = Be(), B = E(
|
|
652
655
|
() => w.sortedStoreCategories.flatMap((t) => t.bundles)
|
|
653
656
|
), s = [
|
|
654
657
|
{
|
|
@@ -667,7 +670,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
667
670
|
class: "flex items-center gap-x-8"
|
|
668
671
|
},
|
|
669
672
|
[
|
|
670
|
-
K(
|
|
673
|
+
K(ne.FmAvatar, {
|
|
671
674
|
name: l != null && l.photoUrl || l == null ? void 0 : l.name,
|
|
672
675
|
src: (l == null ? void 0 : l.photoUrl) ?? void 0,
|
|
673
676
|
size: "sm"
|
|
@@ -688,7 +691,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
688
691
|
{
|
|
689
692
|
header: o("connect.loyalty.card.table.created_at"),
|
|
690
693
|
accessorKey: "_id",
|
|
691
|
-
accessorFn: (t) =>
|
|
694
|
+
accessorFn: (t) => oe(Ue(t._id.toString())).format("DD MMM YYYY hh:mmA")
|
|
692
695
|
},
|
|
693
696
|
{
|
|
694
697
|
header: o("connect.loyalty.card.table.bundle"),
|
|
@@ -700,12 +703,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
700
703
|
{
|
|
701
704
|
header: o("connect.loyalty.card.table.redeemed_at"),
|
|
702
705
|
accessorKey: "redeemedAt",
|
|
703
|
-
accessorFn: (t) => t.redeemedAt ?
|
|
706
|
+
accessorFn: (t) => t.redeemedAt ? oe(t.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
|
|
704
707
|
},
|
|
705
708
|
{
|
|
706
709
|
header: o("connect.loyalty.card.table.actions"),
|
|
707
710
|
cell(t) {
|
|
708
|
-
return K(
|
|
711
|
+
return K(ne.FmButton, {
|
|
709
712
|
variant: "tertiary",
|
|
710
713
|
icon: "delete",
|
|
711
714
|
iconColor: "neutral-gray-400",
|
|
@@ -716,12 +719,12 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
716
719
|
});
|
|
717
720
|
}
|
|
718
721
|
}
|
|
719
|
-
], { tableMeta: p, rowData: D, onSort: I, debouncedFetchData:
|
|
722
|
+
], { tableMeta: p, rowData: D, onSort: I, debouncedFetchData: S, onSearch: x } = $e(L.readCards);
|
|
720
723
|
async function n(t) {
|
|
721
724
|
var l;
|
|
722
|
-
await
|
|
725
|
+
await S(t), (l = A.value) == null || l.showSheet(!1);
|
|
723
726
|
}
|
|
724
|
-
const u = E(() =>
|
|
727
|
+
const u = E(() => _.isPremium ? [
|
|
725
728
|
{
|
|
726
729
|
label: o("connect.loyalty.card.actions.create"),
|
|
727
730
|
value: "create",
|
|
@@ -738,7 +741,7 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
738
741
|
`Are you sure you want to remove card ${t.serialNumber}?`
|
|
739
742
|
) && await j(
|
|
740
743
|
async () => {
|
|
741
|
-
await L.deleteCard(t._id.toString()), await
|
|
744
|
+
await L.deleteCard(t._id.toString()), await S({ pageSize: 10, pageIndex: 0 });
|
|
742
745
|
},
|
|
743
746
|
{
|
|
744
747
|
message: `Removing card ${t.serialNumber}`,
|
|
@@ -765,14 +768,14 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
765
768
|
const c = (t) => {
|
|
766
769
|
var l;
|
|
767
770
|
if (t.redeemedAt) {
|
|
768
|
-
|
|
771
|
+
_e.error("Update not permitted", 2e3);
|
|
769
772
|
return;
|
|
770
773
|
}
|
|
771
774
|
(l = g == null ? void 0 : g.value) == null || l.showSheet(!0, t);
|
|
772
775
|
};
|
|
773
776
|
return X(async () => {
|
|
774
777
|
await T(async () => {
|
|
775
|
-
await
|
|
778
|
+
await _.readPremium(), await w.readMemberStore(), await w.readMembership(), await n();
|
|
776
779
|
});
|
|
777
780
|
}), (t, l) => {
|
|
778
781
|
const V = v("FmPill"), U = v("FmPageHead"), f = v("FmSearch"), N = v("FmButton"), q = v("FmCard");
|
|
@@ -780,14 +783,14 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
780
783
|
i(U, {
|
|
781
784
|
title: e(o)("connect.loyalty.card.title"),
|
|
782
785
|
actions: e(u),
|
|
783
|
-
"onClick:action": l[0] || (l[0] = (
|
|
786
|
+
"onClick:action": l[0] || (l[0] = (h) => {
|
|
784
787
|
var P, O;
|
|
785
|
-
console.log(
|
|
788
|
+
console.log(h), h === "design" && ((P = e(M)) == null || P.showSheet(!0)), h === "create" && ((O = e(A)) == null || O.showSheet(!0));
|
|
786
789
|
})
|
|
787
790
|
}, {
|
|
788
|
-
title:
|
|
789
|
-
d("div",
|
|
790
|
-
d("span",
|
|
791
|
+
title: C(() => [
|
|
792
|
+
d("div", it, [
|
|
793
|
+
d("span", rt, te(e(o)("connect.loyalty.card.title")), 1),
|
|
791
794
|
i(V, {
|
|
792
795
|
class: "ml-8",
|
|
793
796
|
variant: "premium"
|
|
@@ -796,15 +799,15 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
796
799
|
]),
|
|
797
800
|
_: 1
|
|
798
801
|
}, 8, ["title", "actions"]),
|
|
799
|
-
d("div",
|
|
802
|
+
d("div", dt, [
|
|
800
803
|
e(D).length > 0 || e(D).length <= 0 && e(p).searchValue || e(p).pageCount > 0 ? (m(), $(z, { key: 0 }, [
|
|
801
|
-
d("div",
|
|
804
|
+
d("div", ut, [
|
|
802
805
|
i(f, {
|
|
803
806
|
class: "mt-4",
|
|
804
807
|
modelValue: e(p).searchValue,
|
|
805
808
|
"onUpdate:modelValue": [
|
|
806
|
-
l[1] || (l[1] = (
|
|
807
|
-
e(
|
|
809
|
+
l[1] || (l[1] = (h) => e(p).searchValue = h),
|
|
810
|
+
e(x)
|
|
808
811
|
],
|
|
809
812
|
placeholder: "Search",
|
|
810
813
|
collapsible: ""
|
|
@@ -825,14 +828,14 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
825
828
|
"page-index": e(p).pageIndex,
|
|
826
829
|
"page-size": e(p).pageSize,
|
|
827
830
|
onSortChange: e(I),
|
|
828
|
-
onPageChange: l[2] || (l[2] = (
|
|
829
|
-
e(
|
|
830
|
-
pageSize:
|
|
831
|
-
pageIndex:
|
|
831
|
+
onPageChange: l[2] || (l[2] = (h) => {
|
|
832
|
+
e(S)({
|
|
833
|
+
pageSize: h.pageSize,
|
|
834
|
+
pageIndex: h.pageIndex
|
|
832
835
|
});
|
|
833
836
|
}),
|
|
834
|
-
onRowClick: l[3] || (l[3] = (
|
|
835
|
-
c(e(
|
|
837
|
+
onRowClick: l[3] || (l[3] = (h) => {
|
|
838
|
+
c(e(Se)(h.original));
|
|
836
839
|
})
|
|
837
840
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
|
|
838
841
|
], 64)) : (m(), F(q, {
|
|
@@ -840,54 +843,51 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
840
843
|
variant: "outlined",
|
|
841
844
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
842
845
|
}, {
|
|
843
|
-
default:
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
d("div", ot, [
|
|
849
|
-
d("div", st, te(e(o)("connect.loyalty.card.empty_state.title")), 1),
|
|
850
|
-
d("div", it, te(e(o)("connect.loyalty.card.empty_state.description")), 1)
|
|
846
|
+
default: C(() => [
|
|
847
|
+
mt,
|
|
848
|
+
d("div", ct, [
|
|
849
|
+
d("div", pt, te(e(o)("connect.loyalty.card.empty_state.title")), 1),
|
|
850
|
+
d("div", ft, te(e(o)("connect.loyalty.card.empty_state.description")), 1)
|
|
851
851
|
]),
|
|
852
|
-
d("div",
|
|
852
|
+
d("div", gt, [
|
|
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(_).isPremium,
|
|
858
858
|
onClick: l[4] || (l[4] = () => {
|
|
859
|
-
var
|
|
860
|
-
return (
|
|
859
|
+
var h;
|
|
860
|
+
return (h = e(A)) == null ? void 0 : h.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(_).isPremium,
|
|
867
867
|
onClick: l[5] || (l[5] = () => {
|
|
868
|
-
var
|
|
869
|
-
return (
|
|
868
|
+
var h;
|
|
869
|
+
return (h = e(M)) == null ? void 0 : h.showSheet(!0);
|
|
870
870
|
})
|
|
871
871
|
}, null, 8, ["label", "disabled"])
|
|
872
872
|
])
|
|
873
873
|
]),
|
|
874
874
|
_: 1
|
|
875
875
|
})),
|
|
876
|
-
i(
|
|
876
|
+
i(Ye, {
|
|
877
877
|
ref_key: "sheetRef",
|
|
878
878
|
ref: A,
|
|
879
|
-
onSuccess: l[6] || (l[6] = (
|
|
879
|
+
onSuccess: l[6] || (l[6] = (h) => n()),
|
|
880
880
|
onExport: b
|
|
881
881
|
}, null, 512),
|
|
882
|
-
i(
|
|
882
|
+
i(st, {
|
|
883
883
|
ref_key: "designSheetRef",
|
|
884
884
|
ref: M,
|
|
885
885
|
onSuccess: n
|
|
886
886
|
}, null, 512),
|
|
887
|
-
i(
|
|
887
|
+
i(tt, {
|
|
888
888
|
ref_key: "editSheetRef",
|
|
889
889
|
ref: g,
|
|
890
|
-
onSuccess: l[7] || (l[7] = (
|
|
890
|
+
onSuccess: l[7] || (l[7] = (h) => {
|
|
891
891
|
var P;
|
|
892
892
|
n({
|
|
893
893
|
pageSize: e(p).pageSize,
|
|
@@ -901,5 +901,5 @@ const De = { class: "space-y-16" }, Ae = { class: "gap-16 grid grid-cols-2" }, I
|
|
|
901
901
|
}
|
|
902
902
|
});
|
|
903
903
|
export {
|
|
904
|
-
|
|
904
|
+
Ot as default
|
|
905
905
|
};
|