@feedmepos/mf-connect 0.1.98-beta.47 → 0.1.98-beta.49
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/{App-JFPlzU0L.js → App-DpEetYST.js} +8 -8
- package/dist/{AuditLogs-Bk6QCZgp.js → AuditLogs-Cmo803hX.js} +10 -10
- package/dist/{Bin-CHi79olc.js → Bin-DJfXzuaK.js} +8 -8
- package/dist/{Broadcast-DSicPemE.js → Broadcast-CNgV44yY.js} +11 -11
- package/dist/{CampaignAnalytic-B3czdnvb.js → CampaignAnalytic-B2Rn2EJg.js} +6 -6
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CkC0A-ix.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bns7bxjM.js} +7 -7
- package/dist/{Card-Begf7uD_.js → Card-B2VUzTu-.js} +20 -20
- package/dist/{Collections-BSmTzG4a.js → Collections-CND1NP87.js} +8 -8
- package/dist/{Credit-BqZ9lr6S.js → Credit-DVwWQVhX.js} +12 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-qMqks3fR.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BAkLmXrV.js} +34 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Ck2PxSye.js → EffectSheet.vue_vue_type_style_index_0_lang-C_iJZVqp.js} +16 -16
- package/dist/{Experience-i0bu7uAI.js → Experience-byIWULhh.js} +12 -12
- package/dist/{FileSaver.min-Ck6lXfKM.js → FileSaver.min-CaXtjHRv.js} +1 -1
- package/dist/{Game-Be02GnjR.js → Game-tzliFFnf.js} +13 -13
- package/dist/{GiftCardSetup-DPN3NhND.js → GiftCardSetup-CUZn8cQ_.js} +9 -9
- package/dist/{Grab-BKIYI2d-.js → Grab-Bj955oc2.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BqylTCHX.js → ImageInput.vue_vue_type_script_setup_true_lang-DM6s0VaT.js} +1 -1
- package/dist/{Index-BD_l8T_M.js → Index-qie7NJrQ.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cch5RizQ.js → LocationPicker.vue_vue_type_script_setup_true_lang-DN_0AboA.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D3psJutm.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CrDegDYa.js} +1 -1
- package/dist/LoyaltyDashboard-D_SjNwRv.js +2218 -0
- package/dist/{MainLayout-C96xSNND.js → MainLayout-B4LQ7fj3.js} +3 -3
- package/dist/{Marketing-Bg6DFKg5.js → Marketing-BP2jjkGw.js} +4 -4
- package/dist/{MarketingMaterialEdit-BYbWgB2R.js → MarketingMaterialEdit-BDP-tlCV.js} +6 -6
- package/dist/Member-BIT0lu05.js +642 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-CmR5L_FZ.js +1287 -0
- package/dist/{MemberImportHistory-Bw-M3Zx-.js → MemberImportHistory-CXq5k3za.js} +26 -24
- package/dist/MemberList-DgQrAUhF.js +336 -0
- package/dist/{MemberTransactions-DEzFrc9e.js → MemberTransactions-SD0EK9MQ.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CFpMazFG.js → MessageInput.vue_vue_type_script_setup_true_lang-B_P--gRo.js} +10 -10
- package/dist/{Mission-CWeWfTdC.js → Mission-Dcc8TywU.js} +13 -13
- package/dist/{Overview-CPMN5kuM.js → Overview-2n-3zYgT.js} +3 -3
- package/dist/{Overview-De06lJt0.js → Overview-ClsCoDwC.js} +19 -19
- package/dist/{Point-XfVYDIbj.js → Point-yoPNIfen.js} +12 -12
- package/dist/{Promotion-Q646p6RE.js → Promotion-Bo8fwRxo.js} +13 -13
- package/dist/{Queue-BNfc0ySV.js → Queue-DOMCJIfy.js} +11 -11
- package/dist/{Record-Dx5pZmpm.js → Record-B_GFsmRS.js} +9 -9
- package/dist/{Review-BX5Z5ivr.js → Review-D-UnLgKx.js} +2 -2
- package/dist/{ReviewFacebookCallback-B6GFP04-.js → ReviewFacebookCallback-CSkzBR52.js} +5 -5
- package/dist/{ReviewGoogleCallback-BWgxTbuf.js → ReviewGoogleCallback-DXW6TAxP.js} +5 -5
- package/dist/{Reward-DOImZVUL.js → Reward-CqNDQ5fM.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-8fuZmrBK.js → RewardGroup.vue_vue_type_script_setup_true_lang-CZPtIroB.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-C9kWB5Zw.js → RuleGroup.vue_vue_type_script_setup_true_lang-xzJ738TT.js} +15 -15
- package/dist/{Segment-BndDCfLd.js → Segment-B3keIMfg.js} +33 -34
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DV1X7e-_.js → SelectItems.vue_vue_type_script_setup_true_lang-B1IbP3lO.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-O9ohGQxg.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BvrNFNDo.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2knZbHq.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BtJyfV2S.js} +4 -4
- package/dist/{Setting-DPm0lJmq.js → Setting-CUf7r25C.js} +14 -14
- package/dist/{SettingAdvertisements-DdPGyRNI.js → SettingAdvertisements-BnfH2GWe.js} +12 -12
- package/dist/{Settings-BQPDUWyz.js → Settings-CVyEvBdL.js} +5 -5
- package/dist/{Store-Cw-c2Wgl.js → Store-yJsGBJjp.js} +24 -24
- package/dist/{StoreRewards-CYkHL-h6.js → StoreRewards-E009h_Ki.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DClGeare.js → StoreTransactions.vue_vue_type_script_setup_true_lang-dFIK3_9i.js} +22 -22
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DekQ8_F8.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BWytuBNh.js} +2 -2
- package/dist/{Tier-B7QmbFn8.js → Tier-D6l8QcgM.js} +25 -25
- package/dist/{Title-CRM_l4YE.js → Title-CKdZ_ulb.js} +22 -22
- package/dist/{Transaction-C1jXS8Le.js → Transaction-CHzWDrMp.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-yPF04Hth.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-D5-CNeZh.js} +6 -6
- package/dist/{Voucher-Cfh_Wudx.js → Voucher-g84i_O99.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BkiXzbFh.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HofDeLRx.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BEFynSZm.js → ZodTextField.vue_vue_type_script_setup_true_lang-B2QIFX1P.js} +2 -2
- package/dist/{app-CEWVaJEZ.js → app-CVfoAVMp.js} +238 -238
- package/dist/app.js +1 -1
- package/dist/{business-DWLMb2lG.js → business-DZUUnIjL.js} +1 -1
- package/dist/{campaign-DwYJGuSz.js → campaign-BIbDOJuM.js} +8 -8
- package/dist/{campaign-DRJO5ydK.js → campaign-CI_rZpSy.js} +2 -2
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BBJZPv79.js} +1 -1
- package/dist/{campaign.fn-CPfN51jT.js → campaign.fn-BSKTKKn_.js} +57 -57
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-Bpd7su_n.js} +1 -1
- package/dist/{collection.fn-j4_hDjjy.js → collection.fn-CGLzb4iJ.js} +2 -2
- package/dist/{duplicateCampaign-CQ-yfh9b.js → duplicateCampaign-DvYTuIU-.js} +2 -2
- package/dist/{effect-DU8lcl8m.js → effect-DeuwDSDb.js} +1 -1
- package/dist/{email-addresses-DUpMDrGS.js → email-addresses-CXSJ6d0R.js} +2 -2
- package/dist/{export-BFMh5l4w.js → export-DMrK_zVs.js} +3 -3
- package/dist/{helper-DSvUKuiG.js → helper-CuwR4Iok.js} +1 -1
- package/dist/{index-JlyOHqyG.js → index-BGM2LdBN.js} +3 -3
- package/dist/{index-CWbvBvE3.js → index-BIE7IDVs.js} +2 -2
- package/dist/{index-DD3Jlx01.js → index-BnF40VHU.js} +1 -1
- package/dist/{index-rZdY3BW8.js → index-Br-IwWs2.js} +7 -7
- package/dist/{index-C69TnizM.js → index-BsGpbfSM.js} +1 -1
- package/dist/{index-CDyGueuB.js → index-BsL2fRDR.js} +82 -83
- package/dist/{index-D8_jwrSU.js → index-BtCff_X4.js} +1 -1
- package/dist/{index--mkEqsYz.js → index-CVshuS9x.js} +2 -2
- package/dist/{index-CrKfbYDf.js → index-CmXN0dX2.js} +281 -283
- package/dist/{index-CvVrgPmm.js → index-CsKzQMVH.js} +10766 -8027
- package/dist/{index-CuyxKvmh.js → index-D0RwTeSK.js} +7 -8
- package/dist/{index-CvaF2wtX.js → index-Di34zXvz.js} +1 -1
- package/dist/{index-DCbCuJXP.js → index-DtlEsLvC.js} +1 -1
- package/dist/{index-B-tBxRw2.js → index-KJ9fWfKI.js} +2 -2
- package/dist/{index-DLZ_cPwd.js → index-Z1kANjy2.js} +1 -1
- package/dist/{index-D-swy6qD.js → index-mkULcMHp.js} +1 -1
- package/dist/{index-CWEtTfxy.js → index-ux77Q19k.js} +24 -25
- package/dist/{index-BVWwOMHO.js → index-v0Wp7wZh.js} +11 -12
- package/dist/{index.esm2017-B2wpsz6n.js → index.esm2017-7ccdC84w.js} +132 -132
- package/dist/{loading-BHHf9MeD.js → loading-CRmkbq3n.js} +1 -1
- package/dist/{lodash-zHycpMIs.js → lodash-Bc-ryXNQ.js} +1 -1
- package/dist/{member-import-MTwvl8TG.js → member-import-DlkhFBuH.js} +8 -8
- package/dist/{membership-Ctqa96gd.js → membership-B26RzkXD.js} +3 -3
- package/dist/{money-C9m7TfMA.js → money-DQctndhn.js} +1 -1
- package/dist/{number-ng88zCwj.js → number-Bf6ikkos.js} +1 -1
- package/dist/objectid-rBYoX-d0.js +145 -0
- package/dist/{plugins-MY2whJpz.js → plugins-C67nSbj6.js} +3 -3
- package/dist/{reward-DiiV8MQE.js → reward-C43tP4ms.js} +1 -1
- package/dist/{rule-builder-BVEerrEc.js → rule-builder-C8VKx9qo.js} +1 -1
- package/dist/{rule-C31n55fZ.js → rule-ferkW3Tn.js} +3 -3
- package/dist/{template-CtcRYRZb.js → template-6TQsSBnV.js} +6 -6
- package/dist/{timezone-Ck4iMIrt.js → timezone-CHLqfxGX.js} +1 -1
- package/dist/{transaction.fn-BI0-LgQG.js → transaction.fn-Ck4GNkX8.js} +1 -1
- package/dist/{trigger-_5hAtyky.js → trigger-DW-HI3-m.js} +5 -5
- package/dist/{useMarketingMaterialActions-CX9qJp_O.js → useMarketingMaterialActions-DgjXENGq.js} +3 -3
- package/dist/{usePagination-DZKDMzEh.js → usePagination-DK5YxY0V.js} +1 -1
- package/dist/{user-C-Db5JiY.js → user-CEgC8bHe.js} +1 -1
- package/dist/{vue-i18n-BbF7bmsx.js → vue-i18n-CVwaGWN7.js} +237 -237
- package/dist/{xlsx-CzpvTfCU.js → xlsx-BjSGml1D.js} +440 -440
- package/dist/{zod-HtL78lno.js → zod-CIM7JLfN.js} +1 -1
- package/package.json +3 -1
- package/dist/LoyaltyDashboard-D0eq0Gaw.js +0 -1345
- package/dist/Member-B4NAFx8G.js +0 -573
- package/dist/MemberList-DXpa6_Rb.js +0 -1603
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/objectid-BTsufz4u.js +0 -145
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
import { defineComponent as J, resolveComponent as f, unref as t, openBlock as n, createElementBlock as d, normalizeClass as z, renderSlot as ae, createElementVNode as s, createVNode as u, ref as h, computed as P, onMounted as Ce, onBeforeUnmount as Ie, Fragment as B, createStaticVNode as Te, withCtx as S, renderList as q, createBlock as w, toDisplayString as r, createCommentVNode as c, createTextVNode as oe, isRef as xe, watch as Re, createSlots as Le } from "vue";
|
|
2
|
+
import "./index-BnF40VHU.js";
|
|
3
|
+
import { useDialog as ne } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as le } from "./vue-i18n-CVwaGWN7.js";
|
|
5
|
+
import { useCoreStore as Se } from "@feedmepos/mf-common";
|
|
6
|
+
import { F as se } from "./FileSaver.min-CaXtjHRv.js";
|
|
7
|
+
import { u as j, w as Ne } from "./xlsx-BjSGml1D.js";
|
|
8
|
+
import { m as L } from "./index-BIE7IDVs.js";
|
|
9
|
+
import { useRouter as Ae } from "vue-router";
|
|
10
|
+
import { R as k } from "./app-CVfoAVMp.js";
|
|
11
|
+
const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full" }, Pe = /* @__PURE__ */ J({
|
|
12
|
+
__name: "FmAdminBadge",
|
|
13
|
+
props: {
|
|
14
|
+
class: { default: void 0 },
|
|
15
|
+
selectable: { type: Boolean, default: !1 }
|
|
16
|
+
},
|
|
17
|
+
setup(H) {
|
|
18
|
+
const m = H, N = Se();
|
|
19
|
+
return (b, e) => {
|
|
20
|
+
var v;
|
|
21
|
+
const i = f("FmIcon");
|
|
22
|
+
return (v = t(N).sessionUser.value) != null && v.role.isAdmin ? (n(), d("div", {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: z([
|
|
25
|
+
"group gap-8 inline-flex items-center relative border-1 border-dashed rounded-md border-red-500 hover:border-opacity-30 transition-opacity",
|
|
26
|
+
{ "select-none": !m.selectable }
|
|
27
|
+
])
|
|
28
|
+
}, [
|
|
29
|
+
ae(b.$slots, "default"),
|
|
30
|
+
s("div", {
|
|
31
|
+
class: z([
|
|
32
|
+
"pointer-events-none opacity-90 flex items-center justify-center rounded-xxxl bg-red-500 text-white group-hover:opacity-20",
|
|
33
|
+
m.class,
|
|
34
|
+
{
|
|
35
|
+
absolute: !0,
|
|
36
|
+
"bottom-[-5px] right-[-8px] px-4 h-[25px] w-[25px] border-2 border-red-800": !0
|
|
37
|
+
}
|
|
38
|
+
])
|
|
39
|
+
}, [
|
|
40
|
+
s("span", Fe, [
|
|
41
|
+
u(i, {
|
|
42
|
+
name: "support_agent",
|
|
43
|
+
size: "sm",
|
|
44
|
+
outline: ""
|
|
45
|
+
})
|
|
46
|
+
])
|
|
47
|
+
], 2)
|
|
48
|
+
], 2)) : ae(b.$slots, "non-admin", { key: 1 });
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}), De = { class: "w-[760px] max-w-full space-y-24 pb-16" }, Be = {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
54
|
+
}, Me = { class: "flex justify-end" }, Ve = {
|
|
55
|
+
key: 1,
|
|
56
|
+
class: "flex items-center rounded-md border border-fm-color-neutral-gray-300 p-16"
|
|
57
|
+
}, Oe = { class: "fm-typo-en-body-lg-400 min-w-0 flex-1 truncate px-8" }, Ye = { for: "member-import-file" }, $e = { class: "flex items-center justify-between" }, Ue = { class: "fm-typo-en-title-sm-800" }, He = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ge = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "rounded-md bg-fm-color-system-error-100 p-16 fm-typo-en-body-sm-400"
|
|
60
|
+
}, qe = {
|
|
61
|
+
key: 1,
|
|
62
|
+
class: "rounded-md bg-fm-color-system-info-100 p-16 fm-typo-en-body-md-400"
|
|
63
|
+
}, je = {
|
|
64
|
+
key: 2,
|
|
65
|
+
class: "space-y-16"
|
|
66
|
+
}, ze = { class: "grid grid-cols-2 gap-8 md:grid-cols-4" }, Je = { class: "fm-typo-en-title-sm-800" }, Qe = { class: "fm-typo-en-title-sm-800" }, We = { class: "fm-typo-en-title-sm-800" }, Ke = { class: "fm-typo-en-title-sm-800" }, Xe = {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: "rounded-md bg-fm-color-system-warning-100 p-16 fm-typo-en-body-sm-400"
|
|
69
|
+
}, Ze = {
|
|
70
|
+
key: 1,
|
|
71
|
+
class: "rounded-md bg-fm-color-system-warning-100 p-16 fm-typo-en-body-sm-400"
|
|
72
|
+
}, et = { class: "fm-typo-en-body-md-400" }, tt = { class: "fm-typo-en-body-md-600" }, at = { class: "rounded-md bg-fm-color-neutral-gray-100 p-12 fm-typo-en-body-sm-400" }, ot = {
|
|
73
|
+
key: 3,
|
|
74
|
+
class: "space-y-12"
|
|
75
|
+
}, st = { class: "rounded-md bg-fm-color-system-error-100 p-16" }, nt = { class: "fm-typo-en-body-sm-400" }, lt = {
|
|
76
|
+
key: 4,
|
|
77
|
+
class: "rounded-md bg-fm-color-system-error-100 p-16"
|
|
78
|
+
}, rt = { class: "fm-typo-en-body-sm-400" }, it = { class: "fm-typo-en-body-sm-400" }, dt = {
|
|
79
|
+
key: 5,
|
|
80
|
+
class: "rounded-md bg-fm-color-system-success-100 p-16"
|
|
81
|
+
}, ut = { class: "fm-typo-en-body-sm-400" }, ct = {
|
|
82
|
+
key: 6,
|
|
83
|
+
class: "rounded-md bg-fm-color-system-info-100 p-16"
|
|
84
|
+
}, mt = { class: "fm-typo-en-body-sm-400" }, pt = { class: "flex items-center justify-end gap-8" }, ft = /* @__PURE__ */ J({
|
|
85
|
+
__name: "ImportMemberDialog",
|
|
86
|
+
setup(H) {
|
|
87
|
+
const { t: m } = le(), N = ne(), b = h(null), e = h(null), i = h(""), v = h(""), C = h(!1), I = h(!1), T = h(!1), y = h(!1), O = h(!0);
|
|
88
|
+
let A, x = 0;
|
|
89
|
+
const _ = h({
|
|
90
|
+
mode: "UPSERT"
|
|
91
|
+
}), R = [
|
|
92
|
+
{ label: "Create missing members only", value: "CREATE" },
|
|
93
|
+
{ label: "Update existing members only", value: "UPDATE" },
|
|
94
|
+
{ label: "Create and update members", value: "UPSERT" }
|
|
95
|
+
], E = [
|
|
96
|
+
"Name",
|
|
97
|
+
"Phone",
|
|
98
|
+
"Email",
|
|
99
|
+
"Gender",
|
|
100
|
+
"CardNo",
|
|
101
|
+
"Birthday",
|
|
102
|
+
"Credit",
|
|
103
|
+
"CreditExpiryDate",
|
|
104
|
+
"Experience",
|
|
105
|
+
"Point",
|
|
106
|
+
"Tier",
|
|
107
|
+
"Titles",
|
|
108
|
+
"TitleExpiryDate",
|
|
109
|
+
"AvgSpent",
|
|
110
|
+
"LastVisit",
|
|
111
|
+
"Feedback",
|
|
112
|
+
"LastSeasonTierEarned",
|
|
113
|
+
"LastSeasonPointEarned",
|
|
114
|
+
"JoinedAt",
|
|
115
|
+
"JoinedAtLocation",
|
|
116
|
+
"VisitFrequency"
|
|
117
|
+
], D = [
|
|
118
|
+
{
|
|
119
|
+
label: "CSV",
|
|
120
|
+
icon: "csv",
|
|
121
|
+
value: "csv"
|
|
122
|
+
/* csv */
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: "Excel",
|
|
126
|
+
icon: "description",
|
|
127
|
+
value: "xlsx"
|
|
128
|
+
/* xlsx */
|
|
129
|
+
}
|
|
130
|
+
], M = P(
|
|
131
|
+
() => {
|
|
132
|
+
var a;
|
|
133
|
+
return ["UPLOADED", "VALIDATING", "QUEUED", "RUNNING", "CANCELLING"].includes(
|
|
134
|
+
((a = e.value) == null ? void 0 : a.status) ?? ""
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
), Y = P(() => {
|
|
138
|
+
var a;
|
|
139
|
+
return !(((a = e.value) == null ? void 0 : a.status) !== "READY" || !e.value.file || v.value !== e.value.businessName || e.value.summary.sharedProfiles > 0 && !I.value || e.value.summary.balanceRows > 0 && !T.value);
|
|
140
|
+
}), re = P(() => {
|
|
141
|
+
const a = e.value, o = a == null ? void 0 : a.summary, p = !!a && v.value === a.businessName;
|
|
142
|
+
return [
|
|
143
|
+
{
|
|
144
|
+
label: "Status is READY",
|
|
145
|
+
passed: (a == null ? void 0 : a.status) === "READY",
|
|
146
|
+
value: (a == null ? void 0 : a.status) ?? "missing"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: "Uploaded file exists",
|
|
150
|
+
passed: !!(a != null && a.file),
|
|
151
|
+
value: a != null && a.file ? "yes" : "no"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label: "Business name matches exactly",
|
|
155
|
+
passed: p,
|
|
156
|
+
value: `entered "${v.value}" / expected "${(a == null ? void 0 : a.businessName) ?? ""}"`
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: "Shared-profile acknowledgement",
|
|
160
|
+
passed: !(o != null && o.sharedProfiles) || I.value,
|
|
161
|
+
value: o != null && o.sharedProfiles ? `${I.value ? "checked" : "required"} (${o.sharedProfiles} rows)` : "not required"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
label: "Balance-replacement acknowledgement",
|
|
165
|
+
passed: !(o != null && o.balanceRows) || T.value,
|
|
166
|
+
value: o != null && o.balanceRows ? `${T.value ? "checked" : "required"} (${o.balanceRows} rows)` : "not required"
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
});
|
|
170
|
+
function ie(a) {
|
|
171
|
+
var o, p;
|
|
172
|
+
b.value = ((p = (o = a.target) == null ? void 0 : o.files) == null ? void 0 : p[0]) ?? null;
|
|
173
|
+
}
|
|
174
|
+
function de(a) {
|
|
175
|
+
if (a === "csv") {
|
|
176
|
+
se.saveAs(
|
|
177
|
+
new Blob([E.join(",")], {
|
|
178
|
+
type: "text/csv;charset=utf-8;"
|
|
179
|
+
}),
|
|
180
|
+
"ImportMemberTemplate.csv"
|
|
181
|
+
);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const o = j.aoa_to_sheet([E]), p = j.book_new();
|
|
185
|
+
j.book_append_sheet(p, o, "Members"), Ne(p, "ImportMemberTemplate.xlsx");
|
|
186
|
+
}
|
|
187
|
+
async function ue() {
|
|
188
|
+
if (!b.value) {
|
|
189
|
+
i.value = "Please upload a file.";
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (!C.value) {
|
|
193
|
+
i.value = "Please read and acknowledge the import warnings.";
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
y.value = !0, i.value = "";
|
|
197
|
+
try {
|
|
198
|
+
const a = new FormData();
|
|
199
|
+
a.append("file", b.value), a.append("config", JSON.stringify(_.value)), e.value = await L.import(a), await F();
|
|
200
|
+
} catch (a) {
|
|
201
|
+
i.value = a instanceof Error ? a.message : String(a);
|
|
202
|
+
} finally {
|
|
203
|
+
y.value = !1;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
async function ce(a) {
|
|
207
|
+
var p, g;
|
|
208
|
+
if (!e.value) return !1;
|
|
209
|
+
const o = e.value._id.toString();
|
|
210
|
+
try {
|
|
211
|
+
const V = await L.readImport(o);
|
|
212
|
+
return a !== x || ((p = e.value) == null ? void 0 : p._id.toString()) !== o ? !1 : (e.value = V, !0);
|
|
213
|
+
} catch (V) {
|
|
214
|
+
if (a !== x || ((g = e.value) == null ? void 0 : g._id.toString()) !== o)
|
|
215
|
+
return !1;
|
|
216
|
+
throw V;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
async function F() {
|
|
220
|
+
var o;
|
|
221
|
+
$();
|
|
222
|
+
const a = x;
|
|
223
|
+
try {
|
|
224
|
+
if (!await ce(a)) return;
|
|
225
|
+
} catch (p) {
|
|
226
|
+
if (a !== x) return;
|
|
227
|
+
i.value = p instanceof Error ? p.message : String(p), M.value && (A = setTimeout(F, 5e3));
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
a === x && M.value && (A = setTimeout(F, ((o = e.value) == null ? void 0 : o.status) === "RUNNING" ? 5e3 : 1500));
|
|
231
|
+
}
|
|
232
|
+
async function me() {
|
|
233
|
+
try {
|
|
234
|
+
e.value = await L.resumableImport(), e.value && await F();
|
|
235
|
+
} catch (a) {
|
|
236
|
+
i.value = a instanceof Error ? a.message : String(a);
|
|
237
|
+
} finally {
|
|
238
|
+
O.value = !1;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function $() {
|
|
242
|
+
x += 1, A && clearTimeout(A), A = void 0;
|
|
243
|
+
}
|
|
244
|
+
function pe() {
|
|
245
|
+
$(), e.value = null, b.value = null, i.value = "";
|
|
246
|
+
}
|
|
247
|
+
async function fe() {
|
|
248
|
+
if (!(!e.value || !Y.value)) {
|
|
249
|
+
y.value = !0, i.value = "";
|
|
250
|
+
try {
|
|
251
|
+
e.value = await L.confirmImport(e.value._id.toString(), {
|
|
252
|
+
businessName: v.value,
|
|
253
|
+
fileHash: e.value.fileHash,
|
|
254
|
+
previewVersion: e.value.previewVersion,
|
|
255
|
+
acknowledgeSharedProfiles: I.value,
|
|
256
|
+
acknowledgeBalanceReplacement: T.value
|
|
257
|
+
}), await F();
|
|
258
|
+
} catch (a) {
|
|
259
|
+
i.value = a instanceof Error ? a.message : String(a);
|
|
260
|
+
} finally {
|
|
261
|
+
y.value = !1;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
async function ve() {
|
|
266
|
+
if (e.value) {
|
|
267
|
+
y.value = !0, i.value = "";
|
|
268
|
+
try {
|
|
269
|
+
e.value = await L.retryImport(e.value._id.toString()), await F();
|
|
270
|
+
} catch (a) {
|
|
271
|
+
i.value = a instanceof Error ? a.message : String(a);
|
|
272
|
+
} finally {
|
|
273
|
+
y.value = !1;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
async function ye() {
|
|
278
|
+
if (!e.value || ["COMPLETED", "CANCELLED", "INVALID"].includes(e.value.status)) {
|
|
279
|
+
N.close();
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (e.value.status !== "CANCELLING") {
|
|
283
|
+
y.value = !0, i.value = "";
|
|
284
|
+
try {
|
|
285
|
+
const a = await L.cancelImport(e.value._id.toString());
|
|
286
|
+
$(), e.value = a, e.value.status === "CANCELLING" && await F();
|
|
287
|
+
} catch (a) {
|
|
288
|
+
i.value = a instanceof Error ? a.message : String(a);
|
|
289
|
+
} finally {
|
|
290
|
+
y.value = !1;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
async function be() {
|
|
295
|
+
if (!e.value) return;
|
|
296
|
+
const a = await L.downloadImportResult(e.value._id.toString());
|
|
297
|
+
se.saveAs(a, `member-import-${e.value._id}.csv`);
|
|
298
|
+
}
|
|
299
|
+
return Ce(me), Ie($), (a, o) => {
|
|
300
|
+
var Q, W, K, X, Z, ee, te;
|
|
301
|
+
const p = f("FmSelect"), g = f("FmButton"), V = f("FmMenuItem"), _e = f("FmMenu"), ge = f("FmDropField"), G = f("FmCheckbox"), he = f("FmChip"), U = f("FmCard"), we = f("FmTextField"), Ee = f("FmHelperText"), ke = f("FmSpacer");
|
|
302
|
+
return n(), d("div", De, [
|
|
303
|
+
t(O) ? (n(), d("div", Be, " Checking for an unfinished import… ")) : t(e) ? (n(), d(B, { key: 2 }, [
|
|
304
|
+
s("div", $e, [
|
|
305
|
+
s("div", null, [
|
|
306
|
+
s("div", Ue, r(((Q = t(e).file) == null ? void 0 : Q.originalName) ?? "Unknown file"), 1),
|
|
307
|
+
s("div", He, " Import " + r(t(e)._id) + " · " + r(t(e).status), 1)
|
|
308
|
+
]),
|
|
309
|
+
u(he, {
|
|
310
|
+
label: t(e).status,
|
|
311
|
+
compact: ""
|
|
312
|
+
}, null, 8, ["label"])
|
|
313
|
+
]),
|
|
314
|
+
t(e).file ? c("", !0) : (n(), d("div", Ge, " The saved import is missing its uploaded file. Cancel it and upload the file again. ")),
|
|
315
|
+
t(M) ? (n(), d("div", qe, r(t(e).status === "RUNNING" ? "Importing members…" : t(e).status === "CANCELLING" ? "Cancelling import…" : "Preparing import preview…"), 1)) : c("", !0),
|
|
316
|
+
t(e).status === "READY" ? (n(), d("div", je, [
|
|
317
|
+
s("div", ze, [
|
|
318
|
+
u(U, {
|
|
319
|
+
variant: "outlined",
|
|
320
|
+
class: "p-12"
|
|
321
|
+
}, {
|
|
322
|
+
default: S(() => [
|
|
323
|
+
s("div", Je, r(t(e).summary.total), 1),
|
|
324
|
+
o[7] || (o[7] = s("div", { class: "fm-typo-en-body-sm-400" }, "Rows", -1))
|
|
325
|
+
]),
|
|
326
|
+
_: 1
|
|
327
|
+
}),
|
|
328
|
+
u(U, {
|
|
329
|
+
variant: "outlined",
|
|
330
|
+
class: "p-12"
|
|
331
|
+
}, {
|
|
332
|
+
default: S(() => [
|
|
333
|
+
s("div", Qe, r(t(e).summary.create), 1),
|
|
334
|
+
o[8] || (o[8] = s("div", { class: "fm-typo-en-body-sm-400" }, "Create", -1))
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
337
|
+
}),
|
|
338
|
+
u(U, {
|
|
339
|
+
variant: "outlined",
|
|
340
|
+
class: "p-12"
|
|
341
|
+
}, {
|
|
342
|
+
default: S(() => [
|
|
343
|
+
s("div", We, r(t(e).summary.update), 1),
|
|
344
|
+
o[9] || (o[9] = s("div", { class: "fm-typo-en-body-sm-400" }, "Update", -1))
|
|
345
|
+
]),
|
|
346
|
+
_: 1
|
|
347
|
+
}),
|
|
348
|
+
u(U, {
|
|
349
|
+
variant: "outlined",
|
|
350
|
+
class: "p-12"
|
|
351
|
+
}, {
|
|
352
|
+
default: S(() => [
|
|
353
|
+
s("div", Ke, r(t(e).summary.balanceRows), 1),
|
|
354
|
+
o[10] || (o[10] = s("div", { class: "fm-typo-en-body-sm-400" }, "Balance rows", -1))
|
|
355
|
+
]),
|
|
356
|
+
_: 1
|
|
357
|
+
})
|
|
358
|
+
]),
|
|
359
|
+
t(e).summary.balanceRows ? (n(), d("div", Xe, " Final target totals — Credit: " + r(t(e).summary.creditTargetTotal) + ", Experience: " + r(t(e).summary.experienceTargetTotal) + ", Points: " + r(t(e).summary.pointTargetTotal) + ". Tier changes: " + r(t(e).summary.tierRows) + ". ", 1)) : c("", !0),
|
|
360
|
+
t(e).summary.sharedProfiles ? (n(), d("div", Ze, r(t(e).summary.sharedProfiles) + " rows can update a shared profile used by another business. ", 1)) : c("", !0),
|
|
361
|
+
s("div", et, [
|
|
362
|
+
o[11] || (o[11] = oe(" To confirm your action, type ", -1)),
|
|
363
|
+
s("span", tt, r(t(e).businessName), 1),
|
|
364
|
+
o[12] || (o[12] = oe(" in the text field ", -1))
|
|
365
|
+
]),
|
|
366
|
+
u(we, {
|
|
367
|
+
modelValue: t(v),
|
|
368
|
+
"onUpdate:modelValue": o[3] || (o[3] = (l) => xe(v) ? v.value = l : null)
|
|
369
|
+
}, null, 8, ["modelValue"]),
|
|
370
|
+
t(e).summary.sharedProfiles ? (n(), w(G, {
|
|
371
|
+
key: 2,
|
|
372
|
+
"model-value": t(I),
|
|
373
|
+
value: "shared-profile",
|
|
374
|
+
label: "I understand that shared profile fields can affect other businesses.",
|
|
375
|
+
"onUpdate:modelValue": o[4] || (o[4] = (l) => I.value = l)
|
|
376
|
+
}, null, 8, ["model-value"])) : c("", !0),
|
|
377
|
+
t(e).summary.balanceRows ? (n(), w(G, {
|
|
378
|
+
key: 3,
|
|
379
|
+
"model-value": t(T),
|
|
380
|
+
value: "balance-replacement",
|
|
381
|
+
label: "I understand that populated balance cells replace final balances.",
|
|
382
|
+
"onUpdate:modelValue": o[5] || (o[5] = (l) => T.value = l)
|
|
383
|
+
}, null, 8, ["model-value"])) : c("", !0),
|
|
384
|
+
s("div", at, [
|
|
385
|
+
o[13] || (o[13] = s("div", { class: "fm-typo-en-body-sm-600" }, "Start import checks", -1)),
|
|
386
|
+
(n(!0), d(B, null, q(t(re), (l) => (n(), d("div", {
|
|
387
|
+
key: l.label,
|
|
388
|
+
class: "flex gap-8"
|
|
389
|
+
}, [
|
|
390
|
+
s("span", {
|
|
391
|
+
class: z(l.passed ? "text-green-600" : "text-red-600")
|
|
392
|
+
}, r(l.passed ? "✓" : "✗"), 3),
|
|
393
|
+
s("span", null, r(l.label) + ": " + r(l.value), 1)
|
|
394
|
+
]))), 128))
|
|
395
|
+
])
|
|
396
|
+
])) : c("", !0),
|
|
397
|
+
t(e).status === "INVALID" ? (n(), d("div", ot, [
|
|
398
|
+
s("div", st, [
|
|
399
|
+
o[14] || (o[14] = s("div", { class: "fm-typo-en-body-md-600" }, "The file is not importable", -1)),
|
|
400
|
+
s("div", nt, r(t(e).error), 1)
|
|
401
|
+
]),
|
|
402
|
+
(n(!0), d(B, null, q((W = t(e).rowErrors) == null ? void 0 : W.slice(0, 10), (l) => (n(), d("div", {
|
|
403
|
+
key: l.rowNumber,
|
|
404
|
+
class: "fm-typo-en-body-sm-400"
|
|
405
|
+
}, " Row " + r(l.rowNumber) + ": " + r(l.errors.join("; ")), 1))), 128))
|
|
406
|
+
])) : c("", !0),
|
|
407
|
+
t(e).status === "STOPPED" ? (n(), d("div", lt, [
|
|
408
|
+
o[15] || (o[15] = s("div", { class: "fm-typo-en-body-md-600" }, "Import stopped", -1)),
|
|
409
|
+
s("div", rt, r(t(e).summary.completed) + " rows completed before the first runtime error. Fix the cause, then retry this same import safely. ", 1),
|
|
410
|
+
s("div", it, r(t(e).error), 1)
|
|
411
|
+
])) : c("", !0),
|
|
412
|
+
t(e).status === "COMPLETED" ? (n(), d("div", dt, [
|
|
413
|
+
o[16] || (o[16] = s("div", { class: "fm-typo-en-body-md-600" }, "Import completed", -1)),
|
|
414
|
+
s("div", ut, r(t(e).summary.completed) + " members were processed. ", 1)
|
|
415
|
+
])) : c("", !0),
|
|
416
|
+
t(e).status === "CANCELLED" ? (n(), d("div", ct, [
|
|
417
|
+
o[17] || (o[17] = s("div", { class: "fm-typo-en-body-md-600" }, "Import cancelled", -1)),
|
|
418
|
+
s("div", mt, r(t(e).summary.completed) + " rows were completed before cancellation. ", 1)
|
|
419
|
+
])) : c("", !0)
|
|
420
|
+
], 64)) : (n(), d(B, { key: 1 }, [
|
|
421
|
+
o[6] || (o[6] = Te('<div class="rounded-md bg-fm-color-system-warning-100 p-16"><div class="fm-typo-en-title-sm-800">Import changes production data</div><div class="fm-typo-en-body-md-400 text-fm-color-typo-secondary"><div class="grid grid-cols-[auto_1fr] gap-x-8 gap-y-8"><span aria-hidden="true">•</span><span>The file is fully validated before any member is changed.</span><span aria-hidden="true">•</span><span>Blank cells keep existing values.</span><span aria-hidden="true">•</span><span>Use <code>__CLEAR__</code> to clear supported fields.</span><span aria-hidden="true">•</span><span>Credit without CreditExpiryDate remains normal and non-expiring.</span><span aria-hidden="true">•</span><span> Each title requires one matching positional expiry. Quote both comma-separated fields in CSV, for example <code>"VIP,VVIP,SVIP"</code> and <code>"05/09/2026,06/09/2026,07/09/2026"</code>. </span></div></div></div>', 1)),
|
|
422
|
+
u(p, {
|
|
423
|
+
modelValue: t(_).mode,
|
|
424
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => t(_).mode = l),
|
|
425
|
+
label: "Import mode",
|
|
426
|
+
items: R
|
|
427
|
+
}, null, 8, ["modelValue"]),
|
|
428
|
+
s("div", Me, [
|
|
429
|
+
u(_e, null, {
|
|
430
|
+
"menu-button": S(() => [
|
|
431
|
+
u(g, {
|
|
432
|
+
variant: "tertiary",
|
|
433
|
+
icon: "download",
|
|
434
|
+
label: "Download template"
|
|
435
|
+
})
|
|
436
|
+
]),
|
|
437
|
+
default: S(() => [
|
|
438
|
+
(n(), d(B, null, q(D, (l) => u(V, {
|
|
439
|
+
key: l.value,
|
|
440
|
+
icon: l.icon,
|
|
441
|
+
label: l.label,
|
|
442
|
+
selectable: "",
|
|
443
|
+
onClick: (yt) => de(l.value)
|
|
444
|
+
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
445
|
+
]),
|
|
446
|
+
_: 1
|
|
447
|
+
})
|
|
448
|
+
]),
|
|
449
|
+
t(b) ? (n(), d("div", Ve, [
|
|
450
|
+
u(g, {
|
|
451
|
+
variant: "tertiary",
|
|
452
|
+
"prepend-icon": "attach_file"
|
|
453
|
+
}),
|
|
454
|
+
s("p", Oe, r(t(b).name), 1),
|
|
455
|
+
s("label", Ye, [
|
|
456
|
+
u(g, {
|
|
457
|
+
variant: "plain",
|
|
458
|
+
label: t(m)("Replace File")
|
|
459
|
+
}, null, 8, ["label"]),
|
|
460
|
+
s("input", {
|
|
461
|
+
id: "member-import-file",
|
|
462
|
+
accept: ".csv, .xlsx",
|
|
463
|
+
class: "hidden",
|
|
464
|
+
type: "file",
|
|
465
|
+
onChange: ie
|
|
466
|
+
}, null, 32)
|
|
467
|
+
])
|
|
468
|
+
])) : (n(), w(ge, {
|
|
469
|
+
key: 0,
|
|
470
|
+
accept: ".csv, .xlsx",
|
|
471
|
+
"max-file-size": 5e6,
|
|
472
|
+
onFileUpload: o[1] || (o[1] = (l) => b.value = l)
|
|
473
|
+
})),
|
|
474
|
+
u(G, {
|
|
475
|
+
"model-value": t(C),
|
|
476
|
+
value: "import-warnings",
|
|
477
|
+
label: "I have read and understand these import rules.",
|
|
478
|
+
"onUpdate:modelValue": o[2] || (o[2] = (l) => C.value = l)
|
|
479
|
+
}, null, 8, ["model-value"])
|
|
480
|
+
], 64)),
|
|
481
|
+
t(i) ? (n(), w(Ee, {
|
|
482
|
+
key: 3,
|
|
483
|
+
state: "error",
|
|
484
|
+
text: t(i)
|
|
485
|
+
}, null, 8, ["text"])) : c("", !0),
|
|
486
|
+
s("div", pt, [
|
|
487
|
+
t(e) && ["INVALID", "STOPPED", "COMPLETED", "CANCELLED"].includes(t(e).status) ? (n(), w(g, {
|
|
488
|
+
key: 0,
|
|
489
|
+
variant: "tertiary",
|
|
490
|
+
icon: "download",
|
|
491
|
+
label: "Download result",
|
|
492
|
+
disabled: t(e).summary.total === 0,
|
|
493
|
+
onClick: be
|
|
494
|
+
}, null, 8, ["disabled"])) : c("", !0),
|
|
495
|
+
((K = t(e)) == null ? void 0 : K.status) === "INVALID" ? (n(), w(g, {
|
|
496
|
+
key: 1,
|
|
497
|
+
variant: "tertiary",
|
|
498
|
+
label: "Choose another file",
|
|
499
|
+
onClick: pe
|
|
500
|
+
})) : c("", !0),
|
|
501
|
+
u(ke),
|
|
502
|
+
u(g, {
|
|
503
|
+
variant: "secondary",
|
|
504
|
+
label: ((X = t(e)) == null ? void 0 : X.status) === "CANCELLING" ? "Cancelling…" : t(e) && ["COMPLETED", "CANCELLED", "INVALID"].includes(t(e).status) ? "Close" : "Cancel",
|
|
505
|
+
disabled: t(y) || ((Z = t(e)) == null ? void 0 : Z.status) === "CANCELLING",
|
|
506
|
+
onClick: ye
|
|
507
|
+
}, null, 8, ["label", "disabled"]),
|
|
508
|
+
t(e) ? c("", !0) : (n(), w(g, {
|
|
509
|
+
key: 2,
|
|
510
|
+
label: "Validate file",
|
|
511
|
+
disabled: !t(b) || !t(C) || t(y),
|
|
512
|
+
onClick: ue
|
|
513
|
+
}, null, 8, ["disabled"])),
|
|
514
|
+
((ee = t(e)) == null ? void 0 : ee.status) === "READY" ? (n(), w(g, {
|
|
515
|
+
key: 3,
|
|
516
|
+
label: "Start import",
|
|
517
|
+
disabled: !t(Y) || t(y),
|
|
518
|
+
onClick: fe
|
|
519
|
+
}, null, 8, ["disabled"])) : c("", !0),
|
|
520
|
+
((te = t(e)) == null ? void 0 : te.status) === "STOPPED" ? (n(), w(g, {
|
|
521
|
+
key: 4,
|
|
522
|
+
label: "Retry import",
|
|
523
|
+
disabled: t(y) || !t(e).file,
|
|
524
|
+
onClick: ve
|
|
525
|
+
}, null, 8, ["disabled"])) : c("", !0)
|
|
526
|
+
])
|
|
527
|
+
]);
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
}), vt = { class: "px-24 flex flex-col gap-y-16 pb-24" }, xt = /* @__PURE__ */ J({
|
|
531
|
+
__name: "Member",
|
|
532
|
+
setup(H) {
|
|
533
|
+
const m = Ae(), { t: N } = le(), b = ne(), e = [
|
|
534
|
+
{
|
|
535
|
+
label: N("connect.loyalty.member.tabs.member_list"),
|
|
536
|
+
value: k["$connect-LOYALTY_MEMBER_LIST"]
|
|
537
|
+
}
|
|
538
|
+
], i = P(() => {
|
|
539
|
+
var R, E, D;
|
|
540
|
+
const _ = m.currentRoute.value.name;
|
|
541
|
+
return _ == k["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"] ? {
|
|
542
|
+
title: "Import history",
|
|
543
|
+
description: void 0,
|
|
544
|
+
backButton: !0,
|
|
545
|
+
onBackButton: async () => {
|
|
546
|
+
await m.push({
|
|
547
|
+
name: k["$connect-LOYALTY_MEMBER_LIST"]
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
} : _ != k["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
551
|
+
title: v.value.label,
|
|
552
|
+
description: void 0
|
|
553
|
+
} : (v.value = e[1], {
|
|
554
|
+
backButton: !0,
|
|
555
|
+
title: N("connect.loyalty.member.title"),
|
|
556
|
+
description: `${(R = C.value) == null ? void 0 : R.name} (${(E = C.value) == null ? void 0 : E._id}) (${(D = C.value) == null ? void 0 : D.phoneNumber})`,
|
|
557
|
+
onBackButton: async () => {
|
|
558
|
+
await m.push({ name: k["$connect-LOYALTY_MEMBER_LIST"] });
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}), v = h(
|
|
562
|
+
e.find((_) => _.value === m.currentRoute.value.name) ?? e[0]
|
|
563
|
+
), C = h(), I = P(
|
|
564
|
+
() => m.currentRoute.value.name === k["$connect-LOYALTY_MEMBER_TRANSACTIONS"] || m.currentRoute.value.name === k["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
565
|
+
), T = P(
|
|
566
|
+
() => m.currentRoute.value.name !== k["$connect-LOYALTY_MEMBER_TRANSACTIONS"]
|
|
567
|
+
), y = P(
|
|
568
|
+
() => m.currentRoute.value.name !== k["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
569
|
+
);
|
|
570
|
+
async function O(_) {
|
|
571
|
+
await m.push({ name: _ });
|
|
572
|
+
}
|
|
573
|
+
async function A() {
|
|
574
|
+
b.open({
|
|
575
|
+
title: "Import members",
|
|
576
|
+
closeButton: !1,
|
|
577
|
+
dismissAway: !1,
|
|
578
|
+
contentComponent: ft
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
async function x() {
|
|
582
|
+
await m.push({
|
|
583
|
+
name: k["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
return Re(
|
|
587
|
+
() => m.currentRoute.value.name,
|
|
588
|
+
async (_) => {
|
|
589
|
+
v.value = e.find((E) => E.value === _) ?? e[0];
|
|
590
|
+
const R = m.currentRoute.value.params.id;
|
|
591
|
+
R && (C.value = await L.readById(R));
|
|
592
|
+
},
|
|
593
|
+
{ immediate: !0 }
|
|
594
|
+
), (_, R) => {
|
|
595
|
+
const E = f("FmButton"), D = f("FmPageHead"), M = f("FmTabs"), Y = f("RouterView");
|
|
596
|
+
return n(), d(B, null, [
|
|
597
|
+
u(D, {
|
|
598
|
+
title: t(i).title,
|
|
599
|
+
description: t(i).description,
|
|
600
|
+
"back-button": t(i).backButton,
|
|
601
|
+
"onClick:back": t(i).onBackButton
|
|
602
|
+
}, Le({ _: 2 }, [
|
|
603
|
+
t(T) ? {
|
|
604
|
+
name: "append",
|
|
605
|
+
fn: S(() => [
|
|
606
|
+
u(Pe, null, {
|
|
607
|
+
default: S(() => [
|
|
608
|
+
t(y) ? (n(), w(E, {
|
|
609
|
+
key: 0,
|
|
610
|
+
label: "Import history",
|
|
611
|
+
"prepend-icon": "work_history",
|
|
612
|
+
variant: "tertiary",
|
|
613
|
+
onClick: x
|
|
614
|
+
})) : c("", !0),
|
|
615
|
+
u(E, {
|
|
616
|
+
label: t(N)("connect.loyalty.member.import"),
|
|
617
|
+
"prepend-icon": "download",
|
|
618
|
+
onClick: A
|
|
619
|
+
}, null, 8, ["label"])
|
|
620
|
+
]),
|
|
621
|
+
_: 1
|
|
622
|
+
})
|
|
623
|
+
]),
|
|
624
|
+
key: "0"
|
|
625
|
+
} : void 0
|
|
626
|
+
]), 1032, ["title", "description", "back-button", "onClick:back"]),
|
|
627
|
+
s("div", vt, [
|
|
628
|
+
t(I) ? c("", !0) : (n(), w(M, {
|
|
629
|
+
key: 0,
|
|
630
|
+
"model-value": t(v).value,
|
|
631
|
+
items: e,
|
|
632
|
+
"onUpdate:modelValue": O
|
|
633
|
+
}, null, 8, ["model-value"])),
|
|
634
|
+
u(Y)
|
|
635
|
+
])
|
|
636
|
+
], 64);
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
export {
|
|
641
|
+
xt as default
|
|
642
|
+
};
|