@feedmepos/mf-connect 0.1.98-beta.53 → 0.1.98-beta.55
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-GVbZXaOb.js → App-Cw_SF7wy.js} +8 -8
- package/dist/{AuditLogs-COC3VF6K.js → AuditLogs-Cw-iziOh.js} +10 -10
- package/dist/{Bin-BqN1F26B.js → Bin-B3IwyAnR.js} +8 -8
- package/dist/{Broadcast-BXP5eA1_.js → Broadcast-DrxqOsXe.js} +11 -11
- package/dist/{CampaignAnalytic-B3Vm1qDu.js → CampaignAnalytic-CIPWAZeN.js} +6 -6
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CkX0_HxH.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-fcuFjICN.js} +6 -7
- package/dist/{Card-UnclF25U.js → Card-UQwdG0vG.js} +21 -21
- package/dist/{Collections-DjrrHxTV.js → Collections-C4YnGhND.js} +8 -8
- package/dist/{Credit-DoDJIxEC.js → Credit-DCk2y4Tm.js} +12 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BM_btYhW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DqHOH-gI.js} +33 -34
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ftrIH_p9.js → EffectSheet.vue_vue_type_style_index_0_lang-_B8KkV6r.js} +6 -6
- package/dist/{Experience-Dr2Arehy.js → Experience-Db78ZHrz.js} +12 -12
- package/dist/{FileSaver.min-D9YchN9l.js → FileSaver.min-DfiXN-cw.js} +1 -1
- package/dist/{Game-3dq-RL7M.js → Game-dZl0xglE.js} +13 -13
- package/dist/{GiftCardSetup-DD1r4qll.js → GiftCardSetup-C0bikX4h.js} +9 -9
- package/dist/{Grab-Ca0WiQpm.js → Grab-DgLocdm2.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-D66OFyD2.js → ImageInput.vue_vue_type_script_setup_true_lang-CxvT0OKP.js} +1 -1
- package/dist/{Index-8kZCkUM2.js → Index-CdpEW-Cz.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CUCAO-YP.js → LocationPicker.vue_vue_type_script_setup_true_lang-BSFgJ_eG.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Cggoq2NY.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DqnHquHg.js} +1 -1
- package/dist/{LoyaltyDashboard-DT-hdzf3.js → LoyaltyDashboard-C-grmjut.js} +10 -10
- package/dist/{MainLayout-7w0y1egK.js → MainLayout-D6B6xRwy.js} +3 -3
- package/dist/{Marketing-DPJc-3ff.js → Marketing-BzPTImcn.js} +4 -4
- package/dist/{MarketingMaterialEdit-D-hqhuMF.js → MarketingMaterialEdit--ATQqcpX.js} +6 -6
- package/dist/Member-BX-8sexf.js +649 -0
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dl8u5fl6.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Dkw9Wn1M.js} +23 -23
- package/dist/{MemberImportHistory-DAQ65F9g.js → MemberImportHistory-CLbmY4_Y.js} +7 -7
- package/dist/{MemberList-D5FzPL99.js → MemberList-DQhtO8LL.js} +14 -14
- package/dist/{MemberTransactions-DZaibYxC.js → MemberTransactions-BRZxbhZS.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-6xakpZEo.js → MessageInput.vue_vue_type_script_setup_true_lang-azZANLtU.js} +10 -10
- package/dist/{Mission-PXCFl4e-.js → Mission-CXE8Gr5g.js} +13 -13
- package/dist/{Overview-CcDElaj4.js → Overview-CcLgKLey.js} +4 -4
- package/dist/{Overview-BOlwqxBU.js → Overview-Wc_nkop_.js} +19 -19
- package/dist/{Point-CDSO_YG3.js → Point-w2r_uzND.js} +12 -12
- package/dist/{Promotion-DVw7hepB.js → Promotion-DFT8oAap.js} +13 -13
- package/dist/{Queue-DUb4qqpc.js → Queue-DMisBGyP.js} +11 -11
- package/dist/{Record-r2Bj4Y-2.js → Record-DaCQ9fWs.js} +9 -9
- package/dist/{Review-D5sC1CpN.js → Review-CapDuSOW.js} +2 -2
- package/dist/{ReviewFacebookCallback-C-pIS4uj.js → ReviewFacebookCallback-B58jwoO8.js} +5 -5
- package/dist/{ReviewGoogleCallback-wKBmFpBe.js → ReviewGoogleCallback-BuKfAzg4.js} +5 -5
- package/dist/{Reward-eY6C0L7i.js → Reward-BKmAIDMj.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CEXYfR09.js → RewardGroup.vue_vue_type_script_setup_true_lang-CcM0sAI4.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-ifUAqLwG.js → RuleGroup.vue_vue_type_script_setup_true_lang-DBw2hSKH.js} +16 -17
- package/dist/{Segment-CKXmFk6Q.js → Segment-DvpoSNUk.js} +32 -33
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DD7KLdTt.js → SelectItems.vue_vue_type_script_setup_true_lang-DoXvWKBk.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bl3KaAjj.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C1ll8PAQ.js} +21 -21
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-tpcHzd48.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-mZetZdjJ.js} +4 -4
- package/dist/{Setting-K-x016Eq.js → Setting-B5kt3xg-.js} +14 -14
- package/dist/{SettingAdvertisements-BGznpHIH.js → SettingAdvertisements-K9K4kJ0K.js} +12 -12
- package/dist/{Settings-CrPLvP2-.js → Settings-COKSGA87.js} +5 -5
- package/dist/{Store-PbvFQ03o.js → Store-FWqFmQkz.js} +25 -25
- package/dist/{StoreRewards-pYNbeyOQ.js → StoreRewards-Bmcaz6FR.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C5YoHPxm.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BNbEQu8Y.js} +23 -23
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DOyli0Kj.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dryke9SW.js} +2 -2
- package/dist/{Tier-BHlyTQfq.js → Tier-BNAY4zUT.js} +2238 -601
- package/dist/{Title-CSuSHz1O.js → Title-BfWmhZZ_.js} +32 -33
- package/dist/{Transaction-bKcfOmz1.js → Transaction-DYTygEuQ.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C6Pb93cp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Ch4s6p4Z.js} +20 -20
- package/dist/{Voucher-D_zf4aRU.js → Voucher-BEbl-HsE.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-D1VBWUFD.js → VoucherEditor.vue_vue_type_script_setup_true_lang-w2W2qt_7.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CRz6uhOz.js → ZodTextField.vue_vue_type_script_setup_true_lang-CBFwmgOo.js} +2 -2
- package/dist/{app-DsVK_Z9F.js → app-Do6spNSS.js} +2960 -2928
- package/dist/app.js +1 -1
- package/dist/{base.export-wsjx1b1F.js → base.export-D-qcrTy9.js} +2 -2
- package/dist/{business-emEflb7G.js → business-B77L5zCr.js} +1 -1
- package/dist/{campaign-CH1zEmK_.js → campaign-0nB3kGlT.js} +8 -8
- package/dist/{campaign-CczdPZEx.js → campaign-P-G3HMdp.js} +2 -2
- package/dist/{campaign.enum-jb40hQyq.js → campaign.enum-CiMl44dc.js} +1 -1
- package/dist/{campaign.fn-ZvIMg3Jv.js → campaign.fn-DGv2wAqn.js} +31 -31
- package/dist/{collectible.enum-Q0sMqRej.js → collectible.enum-CmrLMPA0.js} +1 -1
- package/dist/{collection.fn-CpOJTvnW.js → collection.fn-Ctdy8JkU.js} +2 -2
- package/dist/{currency-nVkRZfQp.js → currency-B1ZqBYyA.js} +1 -1
- package/dist/{duplicateCampaign-DszCNBjZ.js → duplicateCampaign-DsBHk-PC.js} +2 -2
- package/dist/{effect-De3cFxjA.js → effect-BE4BASWL.js} +1 -1
- package/dist/{email-addresses-BENEAxtQ.js → email-addresses-DxUQ_4QV.js} +209 -201
- package/dist/{helper-DjTmaBve.js → helper-BiKiceul.js} +1 -1
- package/dist/{index-BMQVCeHN.js → index-4F0WCPZ9.js} +354 -231
- package/dist/{index-Wd_vLVMH.js → index-B5vzubou.js} +1384 -1328
- package/dist/{index-BEU1eux8.js → index-BAtDTJo_.js} +1 -1
- package/dist/{index-P2yevS6i.js → index-BSyn-LO2.js} +1 -1
- package/dist/{index-BxRbdJOU.js → index-BncZ0745.js} +1 -1
- package/dist/{index-BH4TDRw4.js → index-CY0DaRSA.js} +2 -2
- package/dist/{index-fl12LmlG.js → index-CZtFd2Mm.js} +1 -1
- package/dist/{index-BlsV0pDI.js → index-CexA3ZNo.js} +9 -9
- package/dist/{index-DlAwtfWQ.js → index-CnZuz4FU.js} +3 -3
- package/dist/{index-p0RFjPyp.js → index-CsVa3rDe.js} +1 -1
- package/dist/{index-CKfVSZcR.js → index-D-9Q09e5.js} +2 -2
- package/dist/{index-B-GBUWJi.js → index-DIxLpCbJ.js} +600 -570
- package/dist/{index-BanLR_f4.js → index-DwQKXUeH.js} +2 -2
- package/dist/{index-vV9W0EhO.js → index-Dz1VDJc9.js} +1 -1
- package/dist/{index-DEtIu7G-.js → index-IwteF-7z.js} +3 -3
- package/dist/{index-DrSpG2nV.js → index-UhOpaM-R.js} +1 -1
- package/dist/{index-DsviWEPT.js → index-fAq8fqc-.js} +109 -108
- package/dist/{index-Bj_LrRir.js → index-r1k7ANUt.js} +1 -1
- package/dist/{index.esm2017-C-k-2kM3.js → index.esm2017-DN7GSWnA.js} +1 -1
- package/dist/{loading-TBGTHWt0.js → loading-weS_D5KN.js} +1 -1
- package/dist/{lodash-qQ2ie1zb.js → lodash-BoP2NKA5.js} +1 -1
- package/dist/{member-import-B_sizua-.js → member-import-CjV5FVUq.js} +1 -1
- package/dist/{membership-DJIuI4sn.js → membership-Fj9ZYUTs.js} +3 -3
- package/dist/{money-BOnCYNt8.js → money-X6FLZyEA.js} +1 -1
- package/dist/{number-GrW7Sgoo.js → number-DyX5qBY-.js} +1 -1
- package/dist/{objectid-DPTR7IEN.js → objectid-CrUq8fo_.js} +5 -5
- package/dist/{plugins-D80BsQ8l.js → plugins-Dc-NoCH3.js} +3 -3
- package/dist/{reward-ByHQgT7i.js → reward-B59sZKug.js} +1 -1
- package/dist/{rule-Djn2x0ov.js → rule-DegJg1Uj.js} +335 -275
- package/dist/{template-CR7fSIew.js → template-PaICU_3w.js} +6 -6
- package/dist/{timezone-BQH2AZ_H.js → timezone-Bktwc_gB.js} +1 -1
- package/dist/{transaction.fn-sp8FkkYr.js → transaction.fn-CtL0hJK5.js} +1 -1
- package/dist/{trigger-Y9ted5Uv.js → trigger-y6iOxxCH.js} +5 -5
- package/dist/{useMarketingMaterialActions-jZ3QuyxF.js → useMarketingMaterialActions-CGzkoaFi.js} +3 -3
- package/dist/{usePagination-pzo4ADvP.js → usePagination-cvobvego.js} +1 -1
- package/dist/{user-BtkZFzFm.js → user-DqcwNxjc.js} +1 -1
- package/dist/{vue-i18n-DHFwvj0q.js → vue-i18n-CKaxNvA5.js} +391 -391
- package/dist/{xlsx-BWsO-8j5.js → xlsx-NQidEwsK.js} +1 -1
- package/dist/{zod-BMKVB5Fl.js → zod-De7xWhI3.js} +1 -1
- package/package.json +2 -2
- package/dist/Member-CkRqgHe4.js +0 -630
- package/dist/rule-builder-Dp6YiO8-.js +0 -126
package/dist/Member-CkRqgHe4.js
DELETED
|
@@ -1,630 +0,0 @@
|
|
|
1
|
-
import { defineComponent as W, resolveComponent as f, unref as t, openBlock as n, createElementBlock as d, normalizeClass as Q, renderSlot as oe, createElementVNode as s, createVNode as u, ref as h, computed as D, onMounted as Re, onBeforeUnmount as Te, Fragment as B, createStaticVNode as Ce, withCtx as N, renderList as z, createBlock as w, toDisplayString as r, createCommentVNode as c, createTextVNode as se, isRef as Ie, watch as xe, createSlots as Le } from "vue";
|
|
2
|
-
import "./index-DrSpG2nV.js";
|
|
3
|
-
import { useDialog as re } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as ie } from "./vue-i18n-DHFwvj0q.js";
|
|
5
|
-
import { useCoreStore as Se } from "@feedmepos/mf-common";
|
|
6
|
-
import { F as ne } from "./FileSaver.min-D9YchN9l.js";
|
|
7
|
-
import { u as Y, w as Ae } from "./xlsx-BWsO-8j5.js";
|
|
8
|
-
import { M as le, a as Ne } from "./member-import-B_sizua-.js";
|
|
9
|
-
import { m as A } from "./index-CKfVSZcR.js";
|
|
10
|
-
import { useRouter as Me } from "vue-router";
|
|
11
|
-
import { R as E } from "./app-DsVK_Z9F.js";
|
|
12
|
-
const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full" }, Pe = /* @__PURE__ */ W({
|
|
13
|
-
__name: "FmAdminBadge",
|
|
14
|
-
props: {
|
|
15
|
-
class: { default: void 0 },
|
|
16
|
-
selectable: { type: Boolean, default: !1 }
|
|
17
|
-
},
|
|
18
|
-
setup(G) {
|
|
19
|
-
const m = G, M = Se();
|
|
20
|
-
return (_, e) => {
|
|
21
|
-
var v;
|
|
22
|
-
const i = f("FmIcon");
|
|
23
|
-
return (v = t(M).sessionUser.value) != null && v.role.isAdmin ? (n(), d("div", {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: Q([
|
|
26
|
-
"group gap-8 inline-flex items-center relative border-1 border-dashed rounded-md border-red-500 hover:border-opacity-30 transition-opacity",
|
|
27
|
-
{ "select-none": !m.selectable }
|
|
28
|
-
])
|
|
29
|
-
}, [
|
|
30
|
-
oe(_.$slots, "default"),
|
|
31
|
-
s("div", {
|
|
32
|
-
class: Q([
|
|
33
|
-
"pointer-events-none opacity-90 flex items-center justify-center rounded-xxxl bg-red-500 text-white group-hover:opacity-20",
|
|
34
|
-
m.class,
|
|
35
|
-
{
|
|
36
|
-
absolute: !0,
|
|
37
|
-
"bottom-[-5px] right-[-8px] px-4 h-[25px] w-[25px] border-2 border-red-800": !0
|
|
38
|
-
}
|
|
39
|
-
])
|
|
40
|
-
}, [
|
|
41
|
-
s("span", Fe, [
|
|
42
|
-
u(i, {
|
|
43
|
-
name: "support_agent",
|
|
44
|
-
size: "sm",
|
|
45
|
-
outline: ""
|
|
46
|
-
})
|
|
47
|
-
])
|
|
48
|
-
], 2)
|
|
49
|
-
], 2)) : oe(_.$slots, "non-admin", { key: 1 });
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}), De = { class: "w-[800px] max-w-full space-y-24 pb-16" }, Be = {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
55
|
-
}, Ye = { class: "flex justify-end" }, Oe = {
|
|
56
|
-
key: 1,
|
|
57
|
-
class: "flex items-center rounded-md border border-fm-color-neutral-gray-300 p-16"
|
|
58
|
-
}, Ve = { class: "fm-typo-en-body-lg-400 min-w-0 flex-1 truncate px-8" }, $e = { for: "member-import-file" }, Ue = { class: "flex items-center justify-between" }, He = { class: "fm-typo-en-title-sm-800" }, Ge = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, qe = {
|
|
59
|
-
key: 0,
|
|
60
|
-
class: "rounded-md bg-fm-color-system-error-100 p-16 fm-typo-en-body-sm-400"
|
|
61
|
-
}, je = {
|
|
62
|
-
key: 1,
|
|
63
|
-
class: "rounded-md bg-fm-color-system-info-100 p-16 fm-typo-en-body-md-400"
|
|
64
|
-
}, ze = {
|
|
65
|
-
key: 2,
|
|
66
|
-
class: "space-y-16"
|
|
67
|
-
}, Qe = { class: "grid grid-cols-2 gap-8 md:grid-cols-4" }, We = { class: "fm-typo-en-title-sm-800" }, Je = { class: "fm-typo-en-title-sm-800" }, Ke = { class: "fm-typo-en-title-sm-800" }, Xe = { class: "fm-typo-en-title-sm-800" }, Ze = {
|
|
68
|
-
key: 0,
|
|
69
|
-
class: "rounded-md bg-fm-color-system-warning-100 p-16 fm-typo-en-body-sm-400"
|
|
70
|
-
}, et = {
|
|
71
|
-
key: 1,
|
|
72
|
-
class: "rounded-md bg-fm-color-system-warning-100 p-16 fm-typo-en-body-sm-400"
|
|
73
|
-
}, tt = { class: "fm-typo-en-body-md-400" }, at = { class: "fm-typo-en-body-md-600" }, ot = { class: "rounded-md bg-fm-color-neutral-gray-100 p-12 fm-typo-en-body-sm-400" }, st = {
|
|
74
|
-
key: 3,
|
|
75
|
-
class: "space-y-12"
|
|
76
|
-
}, nt = { class: "rounded-md bg-fm-color-system-error-100 p-16" }, lt = { class: "fm-typo-en-body-sm-400" }, rt = {
|
|
77
|
-
key: 4,
|
|
78
|
-
class: "rounded-md bg-fm-color-system-error-100 p-16"
|
|
79
|
-
}, it = { class: "fm-typo-en-body-sm-400" }, dt = { class: "fm-typo-en-body-sm-400" }, ut = {
|
|
80
|
-
key: 5,
|
|
81
|
-
class: "rounded-md bg-fm-color-system-success-100 p-16"
|
|
82
|
-
}, ct = { class: "fm-typo-en-body-sm-400" }, mt = {
|
|
83
|
-
key: 6,
|
|
84
|
-
class: "rounded-md bg-fm-color-system-info-100 p-16"
|
|
85
|
-
}, pt = { class: "fm-typo-en-body-sm-400" }, ft = { class: "flex items-center justify-end gap-8" }, vt = /* @__PURE__ */ W({
|
|
86
|
-
__name: "ImportMemberDialog",
|
|
87
|
-
setup(G) {
|
|
88
|
-
const { t: m } = ie(), M = re(), _ = h(null), e = h(null), i = h(""), v = h(""), k = h(!1), C = h(!1), I = h(!1), b = h(!1), O = h(!0);
|
|
89
|
-
let F, x = 0;
|
|
90
|
-
const g = h({
|
|
91
|
-
mode: "UPSERT"
|
|
92
|
-
}), L = [
|
|
93
|
-
{ label: "Create missing members only", value: "CREATE" },
|
|
94
|
-
{ label: "Update existing members only", value: "UPDATE" },
|
|
95
|
-
{ label: "Create and update members", value: "UPSERT" }
|
|
96
|
-
], R = [
|
|
97
|
-
{
|
|
98
|
-
label: "CSV",
|
|
99
|
-
icon: "csv",
|
|
100
|
-
value: "csv"
|
|
101
|
-
/* csv */
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
label: "Excel",
|
|
105
|
-
icon: "description",
|
|
106
|
-
value: "xlsx"
|
|
107
|
-
/* xlsx */
|
|
108
|
-
}
|
|
109
|
-
], S = D(
|
|
110
|
-
() => {
|
|
111
|
-
var a;
|
|
112
|
-
return ["UPLOADED", "VALIDATING", "QUEUED", "RUNNING", "CANCELLING"].includes(
|
|
113
|
-
((a = e.value) == null ? void 0 : a.status) ?? ""
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
), V = D(() => {
|
|
117
|
-
var a;
|
|
118
|
-
return !(((a = e.value) == null ? void 0 : a.status) !== "READY" || !e.value.file || v.value !== e.value.businessName || e.value.summary.sharedProfiles > 0 && !C.value || e.value.summary.balanceRows > 0 && !I.value);
|
|
119
|
-
}), q = D(() => {
|
|
120
|
-
const a = e.value, o = a == null ? void 0 : a.summary, p = !!a && v.value === a.businessName;
|
|
121
|
-
return [
|
|
122
|
-
{
|
|
123
|
-
label: "Status is READY",
|
|
124
|
-
passed: (a == null ? void 0 : a.status) === "READY",
|
|
125
|
-
value: (a == null ? void 0 : a.status) ?? "missing"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
label: "Uploaded file exists",
|
|
129
|
-
passed: !!(a != null && a.file),
|
|
130
|
-
value: a != null && a.file ? "yes" : "no"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
label: "Business name matches exactly",
|
|
134
|
-
passed: p,
|
|
135
|
-
value: `entered "${v.value}" / expected "${(a == null ? void 0 : a.businessName) ?? ""}"`
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
label: "Shared-profile acknowledgement",
|
|
139
|
-
passed: !(o != null && o.sharedProfiles) || C.value,
|
|
140
|
-
value: o != null && o.sharedProfiles ? `${C.value ? "checked" : "required"} (${o.sharedProfiles} rows)` : "not required"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
label: "Balance-replacement acknowledgement",
|
|
144
|
-
passed: !(o != null && o.balanceRows) || I.value,
|
|
145
|
-
value: o != null && o.balanceRows ? `${I.value ? "checked" : "required"} (${o.balanceRows} rows)` : "not required"
|
|
146
|
-
}
|
|
147
|
-
];
|
|
148
|
-
});
|
|
149
|
-
function de(a) {
|
|
150
|
-
var o, p;
|
|
151
|
-
_.value = ((p = (o = a.target) == null ? void 0 : o.files) == null ? void 0 : p[0]) ?? null;
|
|
152
|
-
}
|
|
153
|
-
function ue(a) {
|
|
154
|
-
const o = [
|
|
155
|
-
[...le],
|
|
156
|
-
[...Ne]
|
|
157
|
-
], p = Y.aoa_to_sheet(o);
|
|
158
|
-
if (a === "csv") {
|
|
159
|
-
ne.saveAs(
|
|
160
|
-
new Blob([Y.sheet_to_csv(p)], {
|
|
161
|
-
type: "text/csv;charset=utf-8;"
|
|
162
|
-
}),
|
|
163
|
-
"ImportMemberTemplate.csv"
|
|
164
|
-
);
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
const y = Y.book_new();
|
|
168
|
-
for (let T = 0; T < le.length; T++) {
|
|
169
|
-
const U = p[Y.encode_cell({ r: 1, c: T })];
|
|
170
|
-
U && (U.z = "@");
|
|
171
|
-
}
|
|
172
|
-
Y.book_append_sheet(y, p, "Members"), Ae(y, "ImportMemberTemplate.xlsx", { cellStyles: !0 });
|
|
173
|
-
}
|
|
174
|
-
async function ce() {
|
|
175
|
-
if (!_.value) {
|
|
176
|
-
i.value = "Please upload a file.";
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
if (!k.value) {
|
|
180
|
-
i.value = "Please read and acknowledge the import warnings.";
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
b.value = !0, i.value = "";
|
|
184
|
-
try {
|
|
185
|
-
const a = new FormData();
|
|
186
|
-
a.append("file", _.value), a.append("config", JSON.stringify(g.value)), e.value = await A.import(a), await P();
|
|
187
|
-
} catch (a) {
|
|
188
|
-
i.value = a instanceof Error ? a.message : String(a);
|
|
189
|
-
} finally {
|
|
190
|
-
b.value = !1;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
async function me(a) {
|
|
194
|
-
var p, y;
|
|
195
|
-
if (!e.value) return !1;
|
|
196
|
-
const o = e.value._id.toString();
|
|
197
|
-
try {
|
|
198
|
-
const T = await A.readImport(o);
|
|
199
|
-
return a !== x || ((p = e.value) == null ? void 0 : p._id.toString()) !== o ? !1 : (e.value = T, !0);
|
|
200
|
-
} catch (T) {
|
|
201
|
-
if (a !== x || ((y = e.value) == null ? void 0 : y._id.toString()) !== o)
|
|
202
|
-
return !1;
|
|
203
|
-
throw T;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
async function P() {
|
|
207
|
-
var o;
|
|
208
|
-
$();
|
|
209
|
-
const a = x;
|
|
210
|
-
try {
|
|
211
|
-
if (!await me(a)) return;
|
|
212
|
-
} catch (p) {
|
|
213
|
-
if (a !== x) return;
|
|
214
|
-
i.value = p instanceof Error ? p.message : String(p), S.value && (F = setTimeout(P, 5e3));
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
a === x && S.value && (F = setTimeout(P, ((o = e.value) == null ? void 0 : o.status) === "RUNNING" ? 5e3 : 1500));
|
|
218
|
-
}
|
|
219
|
-
async function pe() {
|
|
220
|
-
try {
|
|
221
|
-
e.value = await A.resumableImport(), e.value && await P();
|
|
222
|
-
} catch (a) {
|
|
223
|
-
i.value = a instanceof Error ? a.message : String(a);
|
|
224
|
-
} finally {
|
|
225
|
-
O.value = !1;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
function $() {
|
|
229
|
-
x += 1, F && clearTimeout(F), F = void 0;
|
|
230
|
-
}
|
|
231
|
-
function fe() {
|
|
232
|
-
$(), e.value = null, _.value = null, i.value = "";
|
|
233
|
-
}
|
|
234
|
-
async function ve() {
|
|
235
|
-
if (!(!e.value || !V.value)) {
|
|
236
|
-
b.value = !0, i.value = "";
|
|
237
|
-
try {
|
|
238
|
-
e.value = await A.confirmImport(e.value._id.toString(), {
|
|
239
|
-
businessName: v.value,
|
|
240
|
-
fileHash: e.value.fileHash,
|
|
241
|
-
previewVersion: e.value.previewVersion,
|
|
242
|
-
acknowledgeSharedProfiles: C.value,
|
|
243
|
-
acknowledgeBalanceReplacement: I.value
|
|
244
|
-
}), await P();
|
|
245
|
-
} catch (a) {
|
|
246
|
-
i.value = a instanceof Error ? a.message : String(a);
|
|
247
|
-
} finally {
|
|
248
|
-
b.value = !1;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
async function ye() {
|
|
253
|
-
if (e.value) {
|
|
254
|
-
b.value = !0, i.value = "";
|
|
255
|
-
try {
|
|
256
|
-
e.value = await A.retryImport(e.value._id.toString()), await P();
|
|
257
|
-
} catch (a) {
|
|
258
|
-
i.value = a instanceof Error ? a.message : String(a);
|
|
259
|
-
} finally {
|
|
260
|
-
b.value = !1;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
async function be() {
|
|
265
|
-
if (!e.value || ["COMPLETED", "CANCELLED", "INVALID"].includes(e.value.status)) {
|
|
266
|
-
M.close();
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
if (e.value.status !== "CANCELLING") {
|
|
270
|
-
b.value = !0, i.value = "";
|
|
271
|
-
try {
|
|
272
|
-
const a = await A.cancelImport(e.value._id.toString());
|
|
273
|
-
$(), e.value = a, e.value.status === "CANCELLING" && await P();
|
|
274
|
-
} catch (a) {
|
|
275
|
-
i.value = a instanceof Error ? a.message : String(a);
|
|
276
|
-
} finally {
|
|
277
|
-
b.value = !1;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
async function _e() {
|
|
282
|
-
if (!e.value) return;
|
|
283
|
-
const a = await A.downloadImportResult(e.value._id.toString());
|
|
284
|
-
ne.saveAs(a, `member-import-${e.value._id}.csv`);
|
|
285
|
-
}
|
|
286
|
-
return Re(pe), Te($), (a, o) => {
|
|
287
|
-
var J, K, X, Z, ee, te, ae;
|
|
288
|
-
const p = f("FmSelect"), y = f("FmButton"), T = f("FmMenuItem"), U = f("FmMenu"), ge = f("FmDropField"), j = f("FmCheckbox"), he = f("FmChip"), H = f("FmCard"), we = f("FmTextField"), Ee = f("FmHelperText"), ke = f("FmSpacer");
|
|
289
|
-
return n(), d("div", De, [
|
|
290
|
-
t(O) ? (n(), d("div", Be, " Checking for an unfinished import… ")) : t(e) ? (n(), d(B, { key: 2 }, [
|
|
291
|
-
s("div", Ue, [
|
|
292
|
-
s("div", null, [
|
|
293
|
-
s("div", He, r(((J = t(e).file) == null ? void 0 : J.originalName) ?? "Unknown file"), 1),
|
|
294
|
-
s("div", Ge, " Import " + r(t(e)._id) + " · " + r(t(e).status), 1)
|
|
295
|
-
]),
|
|
296
|
-
u(he, {
|
|
297
|
-
label: t(e).status,
|
|
298
|
-
compact: ""
|
|
299
|
-
}, null, 8, ["label"])
|
|
300
|
-
]),
|
|
301
|
-
t(e).file ? c("", !0) : (n(), d("div", qe, " The saved import is missing its uploaded file. Cancel it and upload the file again. ")),
|
|
302
|
-
t(S) ? (n(), d("div", je, r(t(e).status === "RUNNING" ? "Importing members…" : t(e).status === "CANCELLING" ? "Cancelling import…" : "Preparing import preview…"), 1)) : c("", !0),
|
|
303
|
-
t(e).status === "READY" ? (n(), d("div", ze, [
|
|
304
|
-
s("div", Qe, [
|
|
305
|
-
u(H, {
|
|
306
|
-
variant: "outlined",
|
|
307
|
-
class: "p-12"
|
|
308
|
-
}, {
|
|
309
|
-
default: N(() => [
|
|
310
|
-
s("div", We, r(t(e).summary.total), 1),
|
|
311
|
-
o[7] || (o[7] = s("div", { class: "fm-typo-en-body-sm-400" }, "Rows", -1))
|
|
312
|
-
]),
|
|
313
|
-
_: 1
|
|
314
|
-
}),
|
|
315
|
-
u(H, {
|
|
316
|
-
variant: "outlined",
|
|
317
|
-
class: "p-12"
|
|
318
|
-
}, {
|
|
319
|
-
default: N(() => [
|
|
320
|
-
s("div", Je, r(t(e).summary.create), 1),
|
|
321
|
-
o[8] || (o[8] = s("div", { class: "fm-typo-en-body-sm-400" }, "Create", -1))
|
|
322
|
-
]),
|
|
323
|
-
_: 1
|
|
324
|
-
}),
|
|
325
|
-
u(H, {
|
|
326
|
-
variant: "outlined",
|
|
327
|
-
class: "p-12"
|
|
328
|
-
}, {
|
|
329
|
-
default: N(() => [
|
|
330
|
-
s("div", Ke, r(t(e).summary.update), 1),
|
|
331
|
-
o[9] || (o[9] = s("div", { class: "fm-typo-en-body-sm-400" }, "Update", -1))
|
|
332
|
-
]),
|
|
333
|
-
_: 1
|
|
334
|
-
}),
|
|
335
|
-
u(H, {
|
|
336
|
-
variant: "outlined",
|
|
337
|
-
class: "p-12"
|
|
338
|
-
}, {
|
|
339
|
-
default: N(() => [
|
|
340
|
-
s("div", Xe, r(t(e).summary.balanceRows), 1),
|
|
341
|
-
o[10] || (o[10] = s("div", { class: "fm-typo-en-body-sm-400" }, "Balance rows", -1))
|
|
342
|
-
]),
|
|
343
|
-
_: 1
|
|
344
|
-
})
|
|
345
|
-
]),
|
|
346
|
-
t(e).summary.balanceRows ? (n(), d("div", Ze, " 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),
|
|
347
|
-
t(e).summary.sharedProfiles ? (n(), d("div", et, r(t(e).summary.sharedProfiles) + " rows can update a shared profile used by another business. ", 1)) : c("", !0),
|
|
348
|
-
s("div", tt, [
|
|
349
|
-
o[11] || (o[11] = se(" To confirm your action, type ", -1)),
|
|
350
|
-
s("span", at, r(t(e).businessName), 1),
|
|
351
|
-
o[12] || (o[12] = se(" in the text field ", -1))
|
|
352
|
-
]),
|
|
353
|
-
u(we, {
|
|
354
|
-
modelValue: t(v),
|
|
355
|
-
"onUpdate:modelValue": o[3] || (o[3] = (l) => Ie(v) ? v.value = l : null)
|
|
356
|
-
}, null, 8, ["modelValue"]),
|
|
357
|
-
t(e).summary.sharedProfiles ? (n(), w(j, {
|
|
358
|
-
key: 2,
|
|
359
|
-
"model-value": t(C),
|
|
360
|
-
value: "shared-profile",
|
|
361
|
-
label: "I understand that shared profile fields can affect other businesses.",
|
|
362
|
-
"onUpdate:modelValue": o[4] || (o[4] = (l) => C.value = l)
|
|
363
|
-
}, null, 8, ["model-value"])) : c("", !0),
|
|
364
|
-
t(e).summary.balanceRows ? (n(), w(j, {
|
|
365
|
-
key: 3,
|
|
366
|
-
"model-value": t(I),
|
|
367
|
-
value: "balance-replacement",
|
|
368
|
-
label: "I understand that populated balance cells replace final balances.",
|
|
369
|
-
"onUpdate:modelValue": o[5] || (o[5] = (l) => I.value = l)
|
|
370
|
-
}, null, 8, ["model-value"])) : c("", !0),
|
|
371
|
-
s("div", ot, [
|
|
372
|
-
o[13] || (o[13] = s("div", { class: "fm-typo-en-body-sm-600" }, "Start import checks", -1)),
|
|
373
|
-
(n(!0), d(B, null, z(t(q), (l) => (n(), d("div", {
|
|
374
|
-
key: l.label,
|
|
375
|
-
class: "flex gap-8"
|
|
376
|
-
}, [
|
|
377
|
-
s("span", {
|
|
378
|
-
class: Q(l.passed ? "text-green-600" : "text-red-600")
|
|
379
|
-
}, r(l.passed ? "✓" : "✗"), 3),
|
|
380
|
-
s("span", null, r(l.label) + ": " + r(l.value), 1)
|
|
381
|
-
]))), 128))
|
|
382
|
-
])
|
|
383
|
-
])) : c("", !0),
|
|
384
|
-
t(e).status === "INVALID" ? (n(), d("div", st, [
|
|
385
|
-
s("div", nt, [
|
|
386
|
-
o[14] || (o[14] = s("div", { class: "fm-typo-en-body-md-600" }, "The file is not importable", -1)),
|
|
387
|
-
s("div", lt, r(t(e).error), 1)
|
|
388
|
-
]),
|
|
389
|
-
(n(!0), d(B, null, z((K = t(e).rowErrors) == null ? void 0 : K.slice(0, 10), (l) => (n(), d("div", {
|
|
390
|
-
key: l.rowNumber,
|
|
391
|
-
class: "fm-typo-en-body-sm-400"
|
|
392
|
-
}, " Row " + r(l.rowNumber) + ": " + r(l.errors.join("; ")), 1))), 128))
|
|
393
|
-
])) : c("", !0),
|
|
394
|
-
t(e).status === "STOPPED" ? (n(), d("div", rt, [
|
|
395
|
-
o[15] || (o[15] = s("div", { class: "fm-typo-en-body-md-600" }, "Import stopped", -1)),
|
|
396
|
-
s("div", it, r(t(e).summary.completed) + " rows completed before the first runtime error. Fix the cause, then retry this same import safely. ", 1),
|
|
397
|
-
s("div", dt, r(t(e).error), 1)
|
|
398
|
-
])) : c("", !0),
|
|
399
|
-
t(e).status === "COMPLETED" ? (n(), d("div", ut, [
|
|
400
|
-
o[16] || (o[16] = s("div", { class: "fm-typo-en-body-md-600" }, "Import completed", -1)),
|
|
401
|
-
s("div", ct, r(t(e).summary.completed) + " members were processed. ", 1)
|
|
402
|
-
])) : c("", !0),
|
|
403
|
-
t(e).status === "CANCELLED" ? (n(), d("div", mt, [
|
|
404
|
-
o[17] || (o[17] = s("div", { class: "fm-typo-en-body-md-600" }, "Import cancelled", -1)),
|
|
405
|
-
s("div", pt, r(t(e).summary.completed) + " rows were completed before cancellation. ", 1)
|
|
406
|
-
])) : c("", !0)
|
|
407
|
-
], 64)) : (n(), d(B, { key: 1 }, [
|
|
408
|
-
o[6] || (o[6] = Ce('<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>Keep the sample row and paste your members from row 3 onward.</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>Use <code>DD/MM/YYYY</code> for every date column, for example <code>01/12/1989</code>. The sample row adds <code>(DD/MM/YYYY)</code> as a reminder; omit it in member rows.</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)),
|
|
409
|
-
u(p, {
|
|
410
|
-
modelValue: t(g).mode,
|
|
411
|
-
"onUpdate:modelValue": o[0] || (o[0] = (l) => t(g).mode = l),
|
|
412
|
-
label: "Import mode",
|
|
413
|
-
items: L
|
|
414
|
-
}, null, 8, ["modelValue"]),
|
|
415
|
-
s("div", Ye, [
|
|
416
|
-
u(U, null, {
|
|
417
|
-
"menu-button": N(() => [
|
|
418
|
-
u(y, {
|
|
419
|
-
variant: "tertiary",
|
|
420
|
-
icon: "download",
|
|
421
|
-
label: "Download template"
|
|
422
|
-
})
|
|
423
|
-
]),
|
|
424
|
-
default: N(() => [
|
|
425
|
-
(n(), d(B, null, z(R, (l) => u(T, {
|
|
426
|
-
key: l.value,
|
|
427
|
-
icon: l.icon,
|
|
428
|
-
label: l.label,
|
|
429
|
-
selectable: "",
|
|
430
|
-
onClick: (bt) => ue(l.value)
|
|
431
|
-
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
432
|
-
]),
|
|
433
|
-
_: 1
|
|
434
|
-
})
|
|
435
|
-
]),
|
|
436
|
-
t(_) ? (n(), d("div", Oe, [
|
|
437
|
-
u(y, {
|
|
438
|
-
variant: "tertiary",
|
|
439
|
-
"prepend-icon": "attach_file"
|
|
440
|
-
}),
|
|
441
|
-
s("p", Ve, r(t(_).name), 1),
|
|
442
|
-
s("label", $e, [
|
|
443
|
-
u(y, {
|
|
444
|
-
variant: "plain",
|
|
445
|
-
label: t(m)("Replace File")
|
|
446
|
-
}, null, 8, ["label"]),
|
|
447
|
-
s("input", {
|
|
448
|
-
id: "member-import-file",
|
|
449
|
-
accept: ".csv, .xlsx",
|
|
450
|
-
class: "hidden",
|
|
451
|
-
type: "file",
|
|
452
|
-
onChange: de
|
|
453
|
-
}, null, 32)
|
|
454
|
-
])
|
|
455
|
-
])) : (n(), w(ge, {
|
|
456
|
-
key: 0,
|
|
457
|
-
accept: ".csv, .xlsx",
|
|
458
|
-
"max-file-size": 5e6,
|
|
459
|
-
onFileUpload: o[1] || (o[1] = (l) => _.value = l)
|
|
460
|
-
})),
|
|
461
|
-
u(j, {
|
|
462
|
-
"model-value": t(k),
|
|
463
|
-
value: "import-warnings",
|
|
464
|
-
label: "I have read and understand these import rules.",
|
|
465
|
-
"onUpdate:modelValue": o[2] || (o[2] = (l) => k.value = l)
|
|
466
|
-
}, null, 8, ["model-value"])
|
|
467
|
-
], 64)),
|
|
468
|
-
t(i) ? (n(), w(Ee, {
|
|
469
|
-
key: 3,
|
|
470
|
-
state: "error",
|
|
471
|
-
text: t(i)
|
|
472
|
-
}, null, 8, ["text"])) : c("", !0),
|
|
473
|
-
s("div", ft, [
|
|
474
|
-
t(e) && ["INVALID", "STOPPED", "COMPLETED", "CANCELLED"].includes(t(e).status) ? (n(), w(y, {
|
|
475
|
-
key: 0,
|
|
476
|
-
variant: "tertiary",
|
|
477
|
-
icon: "download",
|
|
478
|
-
label: "Download result",
|
|
479
|
-
disabled: t(e).summary.total === 0,
|
|
480
|
-
onClick: _e
|
|
481
|
-
}, null, 8, ["disabled"])) : c("", !0),
|
|
482
|
-
((X = t(e)) == null ? void 0 : X.status) === "INVALID" ? (n(), w(y, {
|
|
483
|
-
key: 1,
|
|
484
|
-
variant: "tertiary",
|
|
485
|
-
label: "Choose another file",
|
|
486
|
-
onClick: fe
|
|
487
|
-
})) : c("", !0),
|
|
488
|
-
u(ke),
|
|
489
|
-
u(y, {
|
|
490
|
-
variant: "secondary",
|
|
491
|
-
label: ((Z = t(e)) == null ? void 0 : Z.status) === "CANCELLING" ? "Cancelling…" : t(e) && ["COMPLETED", "CANCELLED", "INVALID"].includes(t(e).status) ? "Close" : "Cancel",
|
|
492
|
-
disabled: t(b) || ((ee = t(e)) == null ? void 0 : ee.status) === "CANCELLING",
|
|
493
|
-
onClick: be
|
|
494
|
-
}, null, 8, ["label", "disabled"]),
|
|
495
|
-
t(e) ? c("", !0) : (n(), w(y, {
|
|
496
|
-
key: 2,
|
|
497
|
-
label: "Validate file",
|
|
498
|
-
disabled: !t(_) || !t(k) || t(b),
|
|
499
|
-
onClick: ce
|
|
500
|
-
}, null, 8, ["disabled"])),
|
|
501
|
-
((te = t(e)) == null ? void 0 : te.status) === "READY" ? (n(), w(y, {
|
|
502
|
-
key: 3,
|
|
503
|
-
label: "Start import",
|
|
504
|
-
disabled: !t(V) || t(b),
|
|
505
|
-
onClick: ve
|
|
506
|
-
}, null, 8, ["disabled"])) : c("", !0),
|
|
507
|
-
((ae = t(e)) == null ? void 0 : ae.status) === "STOPPED" ? (n(), w(y, {
|
|
508
|
-
key: 4,
|
|
509
|
-
label: "Retry import",
|
|
510
|
-
disabled: t(b) || !t(e).file,
|
|
511
|
-
onClick: ye
|
|
512
|
-
}, null, 8, ["disabled"])) : c("", !0)
|
|
513
|
-
])
|
|
514
|
-
]);
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
}), yt = { class: "px-24 flex flex-col gap-y-16 pb-24" }, Lt = /* @__PURE__ */ W({
|
|
518
|
-
__name: "Member",
|
|
519
|
-
setup(G) {
|
|
520
|
-
const m = Me(), { t: M } = ie(), _ = re(), e = [
|
|
521
|
-
{
|
|
522
|
-
label: M("connect.loyalty.member.tabs.member_list"),
|
|
523
|
-
value: E["$connect-LOYALTY_MEMBER_LIST"]
|
|
524
|
-
}
|
|
525
|
-
], i = D(() => {
|
|
526
|
-
var L, R, S;
|
|
527
|
-
const g = m.currentRoute.value.name;
|
|
528
|
-
return g == E["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"] ? {
|
|
529
|
-
title: "Import history",
|
|
530
|
-
description: void 0,
|
|
531
|
-
backButton: !0,
|
|
532
|
-
onBackButton: async () => {
|
|
533
|
-
await m.push({
|
|
534
|
-
name: E["$connect-LOYALTY_MEMBER_LIST"]
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
} : g != E["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
538
|
-
title: v.value.label,
|
|
539
|
-
description: void 0
|
|
540
|
-
} : (v.value = e[1], {
|
|
541
|
-
backButton: !0,
|
|
542
|
-
title: M("connect.loyalty.member.title"),
|
|
543
|
-
description: `${(L = k.value) == null ? void 0 : L.name} (${(R = k.value) == null ? void 0 : R._id}) (${(S = k.value) == null ? void 0 : S.phoneNumber})`,
|
|
544
|
-
onBackButton: async () => {
|
|
545
|
-
await m.push({ name: E["$connect-LOYALTY_MEMBER_LIST"] });
|
|
546
|
-
}
|
|
547
|
-
});
|
|
548
|
-
}), v = h(
|
|
549
|
-
e.find((g) => g.value === m.currentRoute.value.name) ?? e[0]
|
|
550
|
-
), k = h(), C = D(
|
|
551
|
-
() => m.currentRoute.value.name === E["$connect-LOYALTY_MEMBER_TRANSACTIONS"] || m.currentRoute.value.name === E["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
552
|
-
), I = D(
|
|
553
|
-
() => m.currentRoute.value.name !== E["$connect-LOYALTY_MEMBER_TRANSACTIONS"]
|
|
554
|
-
), b = D(
|
|
555
|
-
() => m.currentRoute.value.name !== E["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
556
|
-
);
|
|
557
|
-
async function O(g) {
|
|
558
|
-
await m.push({ name: g });
|
|
559
|
-
}
|
|
560
|
-
async function F() {
|
|
561
|
-
_.open({
|
|
562
|
-
title: "Import members",
|
|
563
|
-
closeButton: !1,
|
|
564
|
-
dismissAway: !1,
|
|
565
|
-
maxHeight: "90vh",
|
|
566
|
-
contentComponent: vt
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
async function x() {
|
|
570
|
-
await m.push({
|
|
571
|
-
name: E["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
return xe(
|
|
575
|
-
() => m.currentRoute.value.name,
|
|
576
|
-
async (g) => {
|
|
577
|
-
v.value = e.find((R) => R.value === g) ?? e[0];
|
|
578
|
-
const L = m.currentRoute.value.params.id;
|
|
579
|
-
L && (k.value = await A.readById(L));
|
|
580
|
-
},
|
|
581
|
-
{ immediate: !0 }
|
|
582
|
-
), (g, L) => {
|
|
583
|
-
const R = f("FmButton"), S = f("FmPageHead"), V = f("FmTabs"), q = f("RouterView");
|
|
584
|
-
return n(), d(B, null, [
|
|
585
|
-
u(S, {
|
|
586
|
-
title: t(i).title,
|
|
587
|
-
description: t(i).description,
|
|
588
|
-
"back-button": t(i).backButton,
|
|
589
|
-
"onClick:back": t(i).onBackButton
|
|
590
|
-
}, Le({ _: 2 }, [
|
|
591
|
-
t(I) ? {
|
|
592
|
-
name: "append",
|
|
593
|
-
fn: N(() => [
|
|
594
|
-
u(Pe, null, {
|
|
595
|
-
default: N(() => [
|
|
596
|
-
t(b) ? (n(), w(R, {
|
|
597
|
-
key: 0,
|
|
598
|
-
label: "Import history",
|
|
599
|
-
"prepend-icon": "work_history",
|
|
600
|
-
variant: "tertiary",
|
|
601
|
-
onClick: x
|
|
602
|
-
})) : c("", !0),
|
|
603
|
-
u(R, {
|
|
604
|
-
label: t(M)("connect.loyalty.member.import"),
|
|
605
|
-
"prepend-icon": "download",
|
|
606
|
-
onClick: F
|
|
607
|
-
}, null, 8, ["label"])
|
|
608
|
-
]),
|
|
609
|
-
_: 1
|
|
610
|
-
})
|
|
611
|
-
]),
|
|
612
|
-
key: "0"
|
|
613
|
-
} : void 0
|
|
614
|
-
]), 1032, ["title", "description", "back-button", "onClick:back"]),
|
|
615
|
-
s("div", yt, [
|
|
616
|
-
t(C) ? c("", !0) : (n(), w(V, {
|
|
617
|
-
key: 0,
|
|
618
|
-
"model-value": t(v).value,
|
|
619
|
-
items: e,
|
|
620
|
-
"onUpdate:modelValue": O
|
|
621
|
-
}, null, 8, ["model-value"])),
|
|
622
|
-
u(q)
|
|
623
|
-
])
|
|
624
|
-
], 64);
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
});
|
|
628
|
-
export {
|
|
629
|
-
Lt as default
|
|
630
|
-
};
|