@feedmepos/mf-connect 0.1.98-beta.69 → 0.1.98-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BiKMxixG.js → App-B-Onur9k.js} +8 -8
- package/dist/{AuditLogs-hcUTD8r2.js → AuditLogs-BnEeKG1C.js} +11 -11
- package/dist/{Bin-BEIYu4Wb.js → Bin-BH9_nATR.js} +8 -8
- package/dist/{Broadcast-CdsOnoex.js → Broadcast-Gt2ZLLpZ.js} +11 -11
- package/dist/{CampaignAnalytic-tfJk4uHv.js → CampaignAnalytic-BT6zTgNk.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DCfa5b54.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -6
- package/dist/{Card-DD2E58eg.js → Card-dD52oor7.js} +21 -21
- package/dist/{Collections-BJ3-qcPo.js → Collections-7bwYNl3M.js} +8 -8
- package/dist/{Credit-CaNsiUeh.js → Credit-qZdlqXqR.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BYl60g2P.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CVnXbrDQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js} +35 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C6j2U0CU.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +6 -6
- package/dist/{Experience-WVRmN3BW.js → Experience-CAaWgWXP.js} +12 -12
- package/dist/{FileSaver.min-B0P2vo_g.js → FileSaver.min-BpfY6VnX.js} +1 -1
- package/dist/{Game-B72C_2ZX.js → Game-fhrbFb_5.js} +13 -13
- package/dist/{GiftCardSetup-BXrBTdxF.js → GiftCardSetup-CTwmNKim.js} +10 -10
- package/dist/{Grab-DkkVMS8x.js → Grab-BnPfb92x.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DOz5RTkO.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
- package/dist/{Index-CsTSWAqg.js → Index-DRwvmm_j.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Bqjz1_TS.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CDy7s43a.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
- package/dist/{LoyaltyDashboard-Cv1bGSmQ.js → LoyaltyDashboard-8jn6SIWo.js} +13 -13
- package/dist/{MainLayout-fHF57JEF.js → MainLayout-Bf42AcB1.js} +3 -3
- package/dist/{Marketing-DSR9Ltbm.js → Marketing-DruTMjiR.js} +4 -4
- package/dist/{MarketingMaterialEdit-DPiuYUe2.js → MarketingMaterialEdit-moEHd_gP.js} +6 -6
- package/dist/{Member-DS0JP4GM.js → Member-C9VTQqIm.js} +155 -150
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-Pf9idXlV.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js} +23 -23
- package/dist/{MemberImportHistory-DhWnUZlE.js → MemberImportHistory-DZVwya9v.js} +7 -7
- package/dist/{MemberList-BxVGAat6.js → MemberList-KusIfy1u.js} +14 -14
- package/dist/{MemberTransactions-Brwauef3.js → MemberTransactions-msyjdzlI.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B9t6HRkS.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-pUeLVYJs.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js} +1 -1
- package/dist/{Mission-BU_Broks.js → Mission-CUUxpBUF.js} +13 -13
- package/dist/{Overview-BCb7SrPX.js → Overview-C9jyKXHX.js} +19 -19
- package/dist/{Overview-Nx3E9gxA.js → Overview-CYKoF8Hp.js} +4 -4
- package/dist/{Point-DxHE0zpA.js → Point-CPpQ07yp.js} +12 -12
- package/dist/{Promotion-DkXyrAWE.js → Promotion-CJ95m9Qb.js} +13 -13
- package/dist/{Queue-DcqW6gFI.js → Queue-CX39ILh_.js} +11 -11
- package/dist/{Record-T7-Qn-BL.js → Record-6I0qyXB5.js} +9 -9
- package/dist/{Review-C0ORLjPk.js → Review-DoWu2XNT.js} +2 -2
- package/dist/{ReviewFacebookCallback-BamFJii5.js → ReviewFacebookCallback-Co-5TnI7.js} +5 -5
- package/dist/{ReviewGoogleCallback-BbogEq-S.js → ReviewGoogleCallback-Ca7ZuMcF.js} +5 -5
- package/dist/{Reward-Bs3PlUm1.js → Reward-Cx_N6qBJ.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-bt1XYaTg.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BIhuiOQp.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +13 -13
- package/dist/{Segment-ByHZvxzf.js → Segment-Bx0EW966.js} +24 -24
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Chb-W_Sp.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-v8tQQ_3M.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
- package/dist/{Setting-CDDQh6Km.js → Setting-DzEK3dWj.js} +14 -14
- package/dist/{SettingAdvertisements-vNfSi0PM.js → SettingAdvertisements-BNALbI88.js} +12 -12
- package/dist/{Settings-Dr9vVMqi.js → Settings-Cw85-xzq.js} +5 -5
- package/dist/{Store-6jIdhWvV.js → Store-BSqW1gwf.js} +25 -25
- package/dist/{StoreRewards-Bi-vUQa8.js → StoreRewards-CJXnS8Qf.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-D_goMUgu.js → StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js} +373 -373
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Dg1Caqaz.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
- package/dist/{Tier-DQxy11b5.js → Tier-DfitNxp2.js} +25 -25
- package/dist/{Title-BrYUm3dJ.js → Title-QCbtOvKB.js} +21 -21
- package/dist/{Transaction-BKaL8ft5.js → Transaction-dOCzlidD.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DO6LZkqJ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +6 -6
- package/dist/{Voucher-fevudt4N.js → Voucher-BfoCDwjg.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Cr4_aclC.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CeOuczNX.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
- package/dist/{app-BTQMPUaZ.js → app-BxTElIm-.js} +162 -162
- package/dist/app.js +1 -1
- package/dist/{base.export-BvF6HW_b.js → base.export-BmUK8hMh.js} +2 -2
- package/dist/{business-1bynM2S3.js → business-DjAiT8tR.js} +1 -1
- package/dist/{campaign-x2kSthOl.js → campaign-DlR3KF9m.js} +9 -9
- package/dist/{campaign-61jHDGE4.js → campaign-tAmQNoq7.js} +2 -2
- package/dist/{campaign.enum-DPKrl7Yi.js → campaign.enum-BjwEQd11.js} +1 -1
- package/dist/{campaign.fn-DVkjEyJa.js → campaign.fn-C6kWWIQx.js} +61 -61
- package/dist/{collectible.enum-C-25_MsY.js → collectible.enum-BrtXpT9S.js} +1 -1
- package/dist/{collection.fn-CTN43Pnh.js → collection.fn-CDhfM3Eq.js} +2 -2
- package/dist/{currency-CPD7bsCi.js → currency-10nX5QnT.js} +1 -1
- package/dist/{duplicateCampaign-BDFXsGKJ.js → duplicateCampaign-6oMZOvfM.js} +2 -2
- package/dist/{effect-Dm8vqK1h.js → effect-T4YzuTc5.js} +1 -1
- package/dist/{email-addresses-DW8Sb8Cs.js → email-addresses-BjODnJMM.js} +2 -2
- package/dist/{helper-CCZQK8H8.js → helper-BCl5r5yZ.js} +1 -1
- package/dist/{index-irwaz38u.js → index-B9ZMIUMa.js} +679 -650
- package/dist/{index-C8LcgPDt.js → index-BBsK7TUw.js} +3 -3
- package/dist/{index-BHJFHHKZ.js → index-BQk6zTgf.js} +2 -2
- package/dist/{index-D-mVW2R4.js → index-Bd4clHfr.js} +5 -5
- package/dist/{index-CN7lBDQn.js → index-BeVWchv7.js} +4 -4
- package/dist/{index-Dpfl5fwR.js → index-Bht1Z11w.js} +7 -7
- package/dist/{index-DADAdGcF.js → index-BiolIgqR.js} +1 -1
- package/dist/{index-D5th1Ref.js → index-BxU--5J5.js} +3 -3
- package/dist/{index-BG6_axTA.js → index-Bz6oSli7.js} +2 -2
- package/dist/{index-pNqNL1yL.js → index-C5IfNJUl.js} +1 -1
- package/dist/{index-CqOxyfYn.js → index-CRvUvCMA.js} +1 -1
- package/dist/{index-WMXL77u3.js → index-CnaQt4Pn.js} +1 -1
- package/dist/{index-BdIWlpWJ.js → index-Ctja--IE.js} +1 -1
- package/dist/{index-B9nAyvGU.js → index-D8rGhchh.js} +1 -1
- package/dist/{index-elefz7dV.js → index-DJdTDF9C.js} +7 -7
- package/dist/{index-B0E21F7i.js → index-DXiJa8Cw.js} +2 -2
- package/dist/{index-Ru-8vt_3.js → index-DeQKLilv.js} +3 -3
- package/dist/{index-Cj_YiRca.js → index-DhtKt4OL.js} +3 -3
- package/dist/{index.esm2017-BFkcep8i.js → index.esm2017-CEOegJjn.js} +37 -37
- package/dist/{loading-DY5cgK81.js → loading-Dx4SCvZY.js} +1 -1
- package/dist/{lodash-Mri5RxId.js → lodash-Dq8OKCKK.js} +1 -1
- package/dist/{member-import-Ds0mHQDO.js → member-import-DX-jn2uk.js} +1 -1
- package/dist/{membership-Dl9I9gta.js → membership-CltAa-gH.js} +3 -3
- package/dist/{money-DJf18iEv.js → money-DsaAjJTI.js} +1 -1
- package/dist/{number-CDlVA7gg.js → number-DmhHKYgY.js} +1 -1
- package/dist/{objectid-C7Jmt3kj.js → objectid-BdNv-dZX.js} +10 -10
- package/dist/{plugins-BB3qsUY2.js → plugins-BFKVM3uC.js} +3 -3
- package/dist/{reward-BDoWlsUZ.js → reward--SjvIeyy.js} +1 -1
- package/dist/{rule-DZQUn3H0.js → rule-CAKdNobZ.js} +8 -8
- package/dist/{template-DIsdAHue.js → template-Cfxc5eM8.js} +6 -6
- package/dist/{timezone-DINP7HO_.js → timezone-D2b-V5XD.js} +1 -1
- package/dist/transaction.fn-B5mLY7bz.js +71 -0
- package/dist/{trigger-BAhUCSbv.js → trigger-DvYcjRBZ.js} +5 -5
- package/dist/{useMarketingMaterialActions-waypQ70p.js → useMarketingMaterialActions-DtqnjMSt.js} +3 -3
- package/dist/{usePagination-BLZ_9QGR.js → usePagination-DKX24g31.js} +1 -1
- package/dist/{user-PO61yniX.js → user-fWb1NxGO.js} +1 -1
- package/dist/{vue-i18n-CfOCSTEg.js → vue-i18n-wJReAVJw.js} +190 -190
- package/dist/{xlsx-Cu-uiqcb.js → xlsx-Mthhu4JR.js} +224 -224
- package/dist/{zod-BM3CuDZq.js → zod-CVpVUgBZ.js} +1 -1
- package/package.json +1 -1
- package/dist/transaction.fn-CorgPho4.js +0 -64
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as J, resolveComponent as
|
|
2
|
-
import "./index-
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { u as
|
|
1
|
+
import { defineComponent as J, resolveComponent as y, unref as t, openBlock as n, createElementBlock as i, normalizeClass as W, renderSlot as ne, createElementVNode as s, createVNode as u, ref as g, computed as P, onMounted as xe, onBeforeUnmount as Se, Fragment as O, createStaticVNode as Le, withCtx as N, renderList as Q, createBlock as k, toDisplayString as r, createCommentVNode as d, createTextVNode as le, isRef as Ae, watch as Ne, createSlots as Me } from "vue";
|
|
2
|
+
import "./index-D8rGhchh.js";
|
|
3
|
+
import { useDialog as de } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as ue } from "./vue-i18n-wJReAVJw.js";
|
|
5
5
|
import { useCoreStore as Fe } from "@feedmepos/mf-common";
|
|
6
|
-
import { F as re } from "./FileSaver.min-
|
|
7
|
-
import { u as V, w as Pe } from "./xlsx-
|
|
6
|
+
import { F as re } from "./FileSaver.min-BpfY6VnX.js";
|
|
7
|
+
import { u as V, w as Pe } from "./xlsx-Mthhu4JR.js";
|
|
8
8
|
import { u as De } from "./app-wDQR6dpb.js";
|
|
9
|
-
import { M as ie, a as Be } from "./member-import-
|
|
10
|
-
import { m as A } from "./index-
|
|
9
|
+
import { M as ie, a as Be } from "./member-import-DX-jn2uk.js";
|
|
10
|
+
import { m as A } from "./index-DXiJa8Cw.js";
|
|
11
11
|
import { useRouter as Oe } from "vue-router";
|
|
12
|
-
import { R as I } from "./app-
|
|
12
|
+
import { R as I } from "./app-BxTElIm-.js";
|
|
13
13
|
const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full" }, Ye = /* @__PURE__ */ J({
|
|
14
14
|
__name: "FmAdminBadge",
|
|
15
15
|
props: {
|
|
@@ -20,7 +20,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
20
20
|
const m = G, M = Fe();
|
|
21
21
|
return (D, f) => {
|
|
22
22
|
var e;
|
|
23
|
-
const
|
|
23
|
+
const E = y("FmIcon");
|
|
24
24
|
return (e = t(M).sessionUser.value) != null && e.role.isAdmin ? (n(), i("div", {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: W([
|
|
@@ -40,7 +40,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
40
40
|
])
|
|
41
41
|
}, [
|
|
42
42
|
s("span", Ve, [
|
|
43
|
-
u(
|
|
43
|
+
u(E, {
|
|
44
44
|
name: "support_agent",
|
|
45
45
|
size: "sm",
|
|
46
46
|
outline: ""
|
|
@@ -77,7 +77,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
77
77
|
}, it = {
|
|
78
78
|
key: 3,
|
|
79
79
|
class: "space-y-12"
|
|
80
|
-
},
|
|
80
|
+
}, dt = { class: "rounded-md bg-fm-color-system-error-100 p-16" }, ut = { class: "fm-typo-en-body-sm-400" }, ct = {
|
|
81
81
|
key: 4,
|
|
82
82
|
class: "rounded-md bg-fm-color-system-error-100 p-16"
|
|
83
83
|
}, mt = { class: "fm-typo-en-body-sm-400" }, pt = { class: "fm-typo-en-body-sm-400" }, ft = {
|
|
@@ -89,7 +89,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
89
89
|
}, bt = { class: "fm-typo-en-body-sm-400" }, _t = { class: "flex items-center justify-end gap-8" }, gt = /* @__PURE__ */ J({
|
|
90
90
|
__name: "ImportMemberDialog",
|
|
91
91
|
setup(G) {
|
|
92
|
-
const { t: m } =
|
|
92
|
+
const { t: m } = ue(), M = de(), D = De(), f = g(null), E = g(null), e = g(null), c = g(""), R = g(""), B = g(!1), T = g(!1), x = g(!1), S = g(!1), b = g(!1), h = g(!0);
|
|
93
93
|
let w, _ = 0;
|
|
94
94
|
const L = g({
|
|
95
95
|
mode: "UPSERT"
|
|
@@ -112,41 +112,41 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
112
112
|
}
|
|
113
113
|
], z = P(
|
|
114
114
|
() => {
|
|
115
|
-
var
|
|
115
|
+
var o;
|
|
116
116
|
return ["UPLOADED", "VALIDATING", "QUEUED", "RUNNING", "CANCELLING"].includes(
|
|
117
|
-
((
|
|
117
|
+
((o = e.value) == null ? void 0 : o.status) ?? ""
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
120
|
), K = P(() => {
|
|
121
|
-
var
|
|
122
|
-
return !(((
|
|
121
|
+
var o;
|
|
122
|
+
return !(((o = e.value) == null ? void 0 : o.status) !== "READY" || !e.value.file || R.value !== e.value.businessName || !S.value || e.value.summary.sharedProfiles > 0 && !T.value || e.value.summary.balanceRows > 0 && !x.value);
|
|
123
123
|
}), ce = P(() => {
|
|
124
|
-
const
|
|
124
|
+
const o = e.value, a = o == null ? void 0 : o.summary, p = !!o && R.value === o.businessName;
|
|
125
125
|
return [
|
|
126
126
|
{
|
|
127
127
|
label: "Status is READY",
|
|
128
|
-
passed: (
|
|
129
|
-
value: (
|
|
128
|
+
passed: (o == null ? void 0 : o.status) === "READY",
|
|
129
|
+
value: (o == null ? void 0 : o.status) ?? "missing"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
label: "Uploaded file exists",
|
|
133
|
-
passed: !!(
|
|
134
|
-
value:
|
|
133
|
+
passed: !!(o != null && o.file),
|
|
134
|
+
value: o != null && o.file ? "yes" : "no"
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
label: "Business name matches exactly",
|
|
138
138
|
passed: p,
|
|
139
|
-
value: `entered "${R.value}" / expected "${(
|
|
139
|
+
value: `entered "${R.value}" / expected "${(o == null ? void 0 : o.businessName) ?? ""}"`
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
label: "Shared-profile acknowledgement",
|
|
143
|
-
passed: !(
|
|
144
|
-
value:
|
|
143
|
+
passed: !(a != null && a.sharedProfiles) || T.value,
|
|
144
|
+
value: a != null && a.sharedProfiles ? `${T.value ? "checked" : "required"} (${a.sharedProfiles} rows)` : "not required"
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
label: "Balance-replacement acknowledgement",
|
|
148
|
-
passed: !(
|
|
149
|
-
value:
|
|
148
|
+
passed: !(a != null && a.balanceRows) || x.value,
|
|
149
|
+
value: a != null && a.balanceRows ? `${x.value ? "checked" : "required"} (${a.balanceRows} rows)` : "not required"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
label: "Import responsibility acknowledgement",
|
|
@@ -155,19 +155,19 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
155
155
|
}
|
|
156
156
|
];
|
|
157
157
|
});
|
|
158
|
-
function me(
|
|
159
|
-
var
|
|
160
|
-
f.value = ((p = (
|
|
158
|
+
function me(o) {
|
|
159
|
+
var a, p;
|
|
160
|
+
f.value = ((p = (a = o.target) == null ? void 0 : a.files) == null ? void 0 : p[0]) ?? null;
|
|
161
161
|
}
|
|
162
162
|
function pe() {
|
|
163
|
-
|
|
163
|
+
E.value && (E.value.value = "", E.value.click());
|
|
164
164
|
}
|
|
165
|
-
function fe(
|
|
166
|
-
const
|
|
165
|
+
function fe(o) {
|
|
166
|
+
const a = [
|
|
167
167
|
[...ie],
|
|
168
168
|
[...Be]
|
|
169
|
-
], p = V.aoa_to_sheet(
|
|
170
|
-
if (
|
|
169
|
+
], p = V.aoa_to_sheet(a);
|
|
170
|
+
if (o === "csv") {
|
|
171
171
|
re.saveAs(
|
|
172
172
|
new Blob([V.sheet_to_csv(p)], {
|
|
173
173
|
type: "text/csv;charset=utf-8;"
|
|
@@ -176,63 +176,63 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
176
176
|
);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const v = V.book_new();
|
|
180
180
|
for (let C = 0; C < ie.length; C++) {
|
|
181
181
|
const $ = p[V.encode_cell({ r: 1, c: C })];
|
|
182
182
|
$ && ($.z = "@");
|
|
183
183
|
}
|
|
184
|
-
V.book_append_sheet(
|
|
184
|
+
V.book_append_sheet(v, p, "Members"), Pe(v, "ImportMemberTemplate.xlsx", { cellStyles: !0 });
|
|
185
185
|
}
|
|
186
186
|
async function ve() {
|
|
187
187
|
if (!f.value) {
|
|
188
|
-
|
|
188
|
+
c.value = "Please upload a file.";
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
191
|
if (!B.value) {
|
|
192
|
-
|
|
192
|
+
c.value = "Please read and acknowledge the import warnings.";
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
b.value = !0,
|
|
195
|
+
b.value = !0, c.value = "";
|
|
196
196
|
try {
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
} catch (
|
|
200
|
-
|
|
197
|
+
const o = new FormData();
|
|
198
|
+
o.append("file", f.value), o.append("config", JSON.stringify(L.value)), e.value = await A.import(o), await F();
|
|
199
|
+
} catch (o) {
|
|
200
|
+
c.value = o instanceof Error ? o.message : String(o);
|
|
201
201
|
} finally {
|
|
202
202
|
b.value = !1;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
async function ye(
|
|
206
|
-
var p,
|
|
205
|
+
async function ye(o) {
|
|
206
|
+
var p, v;
|
|
207
207
|
if (!e.value) return !1;
|
|
208
|
-
const
|
|
208
|
+
const a = e.value._id.toString();
|
|
209
209
|
try {
|
|
210
|
-
const C = await A.readImport(
|
|
211
|
-
return
|
|
210
|
+
const C = await A.readImport(a);
|
|
211
|
+
return o !== _ || ((p = e.value) == null ? void 0 : p._id.toString()) !== a ? !1 : (e.value = C, !0);
|
|
212
212
|
} catch (C) {
|
|
213
|
-
if (
|
|
213
|
+
if (o !== _ || ((v = e.value) == null ? void 0 : v._id.toString()) !== a)
|
|
214
214
|
return !1;
|
|
215
215
|
throw C;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
async function F() {
|
|
219
|
-
var
|
|
219
|
+
var a;
|
|
220
220
|
Y();
|
|
221
|
-
const
|
|
221
|
+
const o = _;
|
|
222
222
|
try {
|
|
223
|
-
if (!await ye(
|
|
223
|
+
if (!await ye(o)) return;
|
|
224
224
|
} catch (p) {
|
|
225
|
-
if (
|
|
226
|
-
|
|
225
|
+
if (o !== _) return;
|
|
226
|
+
c.value = p instanceof Error ? p.message : String(p), z.value && (w = setTimeout(F, 5e3));
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
|
-
|
|
229
|
+
o === _ && z.value && (w = setTimeout(F, ((a = e.value) == null ? void 0 : a.status) === "RUNNING" ? 5e3 : 1500));
|
|
230
230
|
}
|
|
231
231
|
async function be() {
|
|
232
232
|
try {
|
|
233
233
|
e.value = await A.resumableImport(), e.value && await F();
|
|
234
|
-
} catch (
|
|
235
|
-
|
|
234
|
+
} catch (o) {
|
|
235
|
+
c.value = o instanceof Error ? o.message : String(o);
|
|
236
236
|
} finally {
|
|
237
237
|
h.value = !1;
|
|
238
238
|
}
|
|
@@ -241,11 +241,11 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
241
241
|
_ += 1, w && clearTimeout(w), w = void 0;
|
|
242
242
|
}
|
|
243
243
|
function _e() {
|
|
244
|
-
Y(), e.value = null, f.value = null,
|
|
244
|
+
Y(), e.value = null, f.value = null, c.value = "", S.value = !1;
|
|
245
245
|
}
|
|
246
246
|
async function ge() {
|
|
247
247
|
if (!(!e.value || !K.value)) {
|
|
248
|
-
b.value = !0,
|
|
248
|
+
b.value = !0, c.value = "";
|
|
249
249
|
try {
|
|
250
250
|
e.value = await A.confirmImport(e.value._id.toString(), {
|
|
251
251
|
businessName: R.value,
|
|
@@ -254,8 +254,8 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
254
254
|
acknowledgeSharedProfiles: T.value,
|
|
255
255
|
acknowledgeBalanceReplacement: x.value
|
|
256
256
|
}), await F();
|
|
257
|
-
} catch (
|
|
258
|
-
|
|
257
|
+
} catch (o) {
|
|
258
|
+
c.value = o instanceof Error ? o.message : String(o);
|
|
259
259
|
} finally {
|
|
260
260
|
b.value = !1;
|
|
261
261
|
}
|
|
@@ -263,28 +263,26 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
263
263
|
}
|
|
264
264
|
async function he() {
|
|
265
265
|
if (e.value) {
|
|
266
|
-
b.value = !0,
|
|
266
|
+
b.value = !0, c.value = "";
|
|
267
267
|
try {
|
|
268
268
|
e.value = await A.retryImport(e.value._id.toString()), await F();
|
|
269
|
-
} catch (
|
|
270
|
-
|
|
269
|
+
} catch (o) {
|
|
270
|
+
c.value = o instanceof Error ? o.message : String(o);
|
|
271
271
|
} finally {
|
|
272
272
|
b.value = !1;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
async function we() {
|
|
277
|
-
if (!e.value || ["COMPLETED", "CANCELLED", "INVALID"].includes(
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
if (e.value.status !== "CANCELLING") {
|
|
282
|
-
b.value = !0, d.value = "";
|
|
277
|
+
if (!(!e.value || ["COMPLETED", "CANCELLED", "INVALID", "CANCELLING"].includes(
|
|
278
|
+
e.value.status
|
|
279
|
+
))) {
|
|
280
|
+
b.value = !0, c.value = "";
|
|
283
281
|
try {
|
|
284
|
-
const
|
|
285
|
-
Y(), e.value =
|
|
286
|
-
} catch (
|
|
287
|
-
|
|
282
|
+
const o = await A.cancelImport(e.value._id.toString());
|
|
283
|
+
Y(), e.value = o, e.value.status === "CANCELLING" && await F();
|
|
284
|
+
} catch (o) {
|
|
285
|
+
c.value = o instanceof Error ? o.message : String(o);
|
|
288
286
|
} finally {
|
|
289
287
|
b.value = !1;
|
|
290
288
|
}
|
|
@@ -292,12 +290,12 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
292
290
|
}
|
|
293
291
|
async function ke() {
|
|
294
292
|
if (!e.value) return;
|
|
295
|
-
const
|
|
296
|
-
re.saveAs(
|
|
293
|
+
const o = await A.downloadImportResult(e.value._id.toString());
|
|
294
|
+
re.saveAs(o, `member-import-${e.value._id}.csv`);
|
|
297
295
|
}
|
|
298
|
-
return xe(be), Se(Y), (
|
|
296
|
+
return xe(be), Se(Y), (o, a) => {
|
|
299
297
|
var X, Z, ee, te, ae, oe, se;
|
|
300
|
-
const p =
|
|
298
|
+
const p = y("FmSelect"), v = y("FmButton"), C = y("FmMenuItem"), $ = y("FmMenu"), Ee = y("FmDropField"), U = y("FmCheckbox"), Ie = y("FmChip"), H = y("FmCard"), Re = y("FmTextField"), Ce = y("FmHelperText"), Te = y("FmSpacer");
|
|
301
299
|
return n(), i("div", $e, [
|
|
302
300
|
t(h) ? (n(), i("div", Ue, " Checking for an unfinished import… ")) : t(e) ? (n(), i(O, { key: 2 }, [
|
|
303
301
|
s("div", je, [
|
|
@@ -310,8 +308,8 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
310
308
|
compact: ""
|
|
311
309
|
}, null, 8, ["label"])
|
|
312
310
|
]),
|
|
313
|
-
t(e).file ?
|
|
314
|
-
t(z) ? (n(), i("div", Je, r(t(e).status === "RUNNING" ? "Importing members…" : t(e).status === "CANCELLING" ? "Cancelling import…" : "Preparing import preview…"), 1)) :
|
|
311
|
+
t(e).file ? d("", !0) : (n(), i("div", We, " The saved import is missing its uploaded file. Cancel it and upload the file again. ")),
|
|
312
|
+
t(z) ? (n(), i("div", Je, r(t(e).status === "RUNNING" ? "Importing members…" : t(e).status === "CANCELLING" ? "Cancelling import…" : "Preparing import preview…"), 1)) : d("", !0),
|
|
315
313
|
t(e).status === "READY" ? (n(), i("div", Ke, [
|
|
316
314
|
s("div", Xe, [
|
|
317
315
|
u(H, {
|
|
@@ -320,7 +318,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
320
318
|
}, {
|
|
321
319
|
default: N(() => [
|
|
322
320
|
s("div", Ze, r(t(e).summary.total), 1),
|
|
323
|
-
|
|
321
|
+
a[9] || (a[9] = s("div", { class: "fm-typo-en-body-sm-400" }, "Rows", -1))
|
|
324
322
|
]),
|
|
325
323
|
_: 1
|
|
326
324
|
}),
|
|
@@ -330,7 +328,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
330
328
|
}, {
|
|
331
329
|
default: N(() => [
|
|
332
330
|
s("div", et, r(t(e).summary.create), 1),
|
|
333
|
-
|
|
331
|
+
a[10] || (a[10] = s("div", { class: "fm-typo-en-body-sm-400" }, "Create", -1))
|
|
334
332
|
]),
|
|
335
333
|
_: 1
|
|
336
334
|
}),
|
|
@@ -340,7 +338,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
340
338
|
}, {
|
|
341
339
|
default: N(() => [
|
|
342
340
|
s("div", tt, r(t(e).summary.update), 1),
|
|
343
|
-
|
|
341
|
+
a[11] || (a[11] = s("div", { class: "fm-typo-en-body-sm-400" }, "Update", -1))
|
|
344
342
|
]),
|
|
345
343
|
_: 1
|
|
346
344
|
}),
|
|
@@ -350,44 +348,44 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
350
348
|
}, {
|
|
351
349
|
default: N(() => [
|
|
352
350
|
s("div", at, r(t(e).summary.balanceRows), 1),
|
|
353
|
-
|
|
351
|
+
a[12] || (a[12] = s("div", { class: "fm-typo-en-body-sm-400" }, "Balance rows", -1))
|
|
354
352
|
]),
|
|
355
353
|
_: 1
|
|
356
354
|
})
|
|
357
355
|
]),
|
|
358
|
-
t(e).summary.balanceRows ? (n(), i("div", ot, " 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)) :
|
|
359
|
-
t(e).summary.sharedProfiles ? (n(), i("div", st, r(t(e).summary.sharedProfiles) + " rows can update a shared profile used by another business. ", 1)) :
|
|
356
|
+
t(e).summary.balanceRows ? (n(), i("div", ot, " 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)) : d("", !0),
|
|
357
|
+
t(e).summary.sharedProfiles ? (n(), i("div", st, r(t(e).summary.sharedProfiles) + " rows can update a shared profile used by another business. ", 1)) : d("", !0),
|
|
360
358
|
s("div", nt, [
|
|
361
|
-
|
|
359
|
+
a[13] || (a[13] = le(" To confirm your action, type ", -1)),
|
|
362
360
|
s("span", lt, r(t(e).businessName), 1),
|
|
363
|
-
|
|
361
|
+
a[14] || (a[14] = le(" in the text field ", -1))
|
|
364
362
|
]),
|
|
365
363
|
u(Re, {
|
|
366
364
|
modelValue: t(R),
|
|
367
|
-
"onUpdate:modelValue":
|
|
365
|
+
"onUpdate:modelValue": a[3] || (a[3] = (l) => Ae(R) ? R.value = l : null)
|
|
368
366
|
}, null, 8, ["modelValue"]),
|
|
369
|
-
t(e).summary.sharedProfiles ? (n(),
|
|
367
|
+
t(e).summary.sharedProfiles ? (n(), k(U, {
|
|
370
368
|
key: 2,
|
|
371
369
|
"model-value": t(T),
|
|
372
370
|
value: "shared-profile",
|
|
373
371
|
label: "I understand that shared profile fields can affect other businesses.",
|
|
374
|
-
"onUpdate:modelValue":
|
|
375
|
-
}, null, 8, ["model-value"])) :
|
|
376
|
-
t(e).summary.balanceRows ? (n(),
|
|
372
|
+
"onUpdate:modelValue": a[4] || (a[4] = (l) => T.value = l)
|
|
373
|
+
}, null, 8, ["model-value"])) : d("", !0),
|
|
374
|
+
t(e).summary.balanceRows ? (n(), k(U, {
|
|
377
375
|
key: 3,
|
|
378
376
|
"model-value": t(x),
|
|
379
377
|
value: "balance-replacement",
|
|
380
378
|
label: "I understand that populated balance cells replace final balances.",
|
|
381
|
-
"onUpdate:modelValue":
|
|
382
|
-
}, null, 8, ["model-value"])) :
|
|
379
|
+
"onUpdate:modelValue": a[5] || (a[5] = (l) => x.value = l)
|
|
380
|
+
}, null, 8, ["model-value"])) : d("", !0),
|
|
383
381
|
u(U, {
|
|
384
382
|
"model-value": t(S),
|
|
385
383
|
value: "import-responsibility",
|
|
386
384
|
label: "I acknowledge that I understand what data I import and will take the responsibility",
|
|
387
|
-
"onUpdate:modelValue":
|
|
385
|
+
"onUpdate:modelValue": a[6] || (a[6] = (l) => S.value = l)
|
|
388
386
|
}, null, 8, ["model-value"]),
|
|
389
387
|
t(D).debugMode ? (n(), i("div", rt, [
|
|
390
|
-
|
|
388
|
+
a[15] || (a[15] = s("div", { class: "fm-typo-en-body-sm-600" }, "Start import checks", -1)),
|
|
391
389
|
(n(!0), i(O, null, Q(t(ce), (l) => (n(), i("div", {
|
|
392
390
|
key: l.label,
|
|
393
391
|
class: "flex gap-8"
|
|
@@ -397,43 +395,43 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
397
395
|
}, r(l.passed ? "✓" : "✗"), 3),
|
|
398
396
|
s("span", null, r(l.label) + ": " + r(l.value), 1)
|
|
399
397
|
]))), 128))
|
|
400
|
-
])) :
|
|
401
|
-
])) :
|
|
398
|
+
])) : d("", !0)
|
|
399
|
+
])) : d("", !0),
|
|
402
400
|
t(e).status === "INVALID" ? (n(), i("div", it, [
|
|
403
|
-
s("div",
|
|
404
|
-
|
|
405
|
-
s("div",
|
|
401
|
+
s("div", dt, [
|
|
402
|
+
a[16] || (a[16] = s("div", { class: "fm-typo-en-body-md-600" }, "The file is not importable", -1)),
|
|
403
|
+
s("div", ut, r(t(e).error), 1)
|
|
406
404
|
]),
|
|
407
405
|
(n(!0), i(O, null, Q((Z = t(e).rowErrors) == null ? void 0 : Z.slice(0, 10), (l) => (n(), i("div", {
|
|
408
406
|
key: l.rowNumber,
|
|
409
407
|
class: "fm-typo-en-body-sm-400"
|
|
410
408
|
}, " Row " + r(l.rowNumber) + ": " + r(l.errors.join("; ")), 1))), 128))
|
|
411
|
-
])) :
|
|
409
|
+
])) : d("", !0),
|
|
412
410
|
t(e).status === "STOPPED" ? (n(), i("div", ct, [
|
|
413
|
-
|
|
411
|
+
a[17] || (a[17] = s("div", { class: "fm-typo-en-body-md-600" }, "Import stopped", -1)),
|
|
414
412
|
s("div", mt, r(t(e).summary.completed) + " rows completed before the first runtime error. Fix the cause, then retry this same import safely. ", 1),
|
|
415
413
|
s("div", pt, r(t(e).error), 1)
|
|
416
|
-
])) :
|
|
414
|
+
])) : d("", !0),
|
|
417
415
|
t(e).status === "COMPLETED" ? (n(), i("div", ft, [
|
|
418
|
-
|
|
416
|
+
a[18] || (a[18] = s("div", { class: "fm-typo-en-body-md-600" }, "Import completed", -1)),
|
|
419
417
|
s("div", vt, r(t(e).summary.completed) + " members were processed. ", 1)
|
|
420
|
-
])) :
|
|
418
|
+
])) : d("", !0),
|
|
421
419
|
t(e).status === "CANCELLED" ? (n(), i("div", yt, [
|
|
422
|
-
|
|
420
|
+
a[19] || (a[19] = s("div", { class: "fm-typo-en-body-md-600" }, "Import cancelled", -1)),
|
|
423
421
|
s("div", bt, r(t(e).summary.completed) + " rows were completed before cancellation. ", 1)
|
|
424
|
-
])) :
|
|
422
|
+
])) : d("", !0)
|
|
425
423
|
], 64)) : (n(), i(O, { key: 1 }, [
|
|
426
|
-
|
|
424
|
+
a[8] || (a[8] = Le('<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 day/month/year for every date column; day and month may have one or two digits, for example <code>1/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)),
|
|
427
425
|
u(p, {
|
|
428
426
|
modelValue: t(L).mode,
|
|
429
|
-
"onUpdate:modelValue":
|
|
427
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => t(L).mode = l),
|
|
430
428
|
label: "Import mode",
|
|
431
429
|
items: q
|
|
432
430
|
}, null, 8, ["modelValue"]),
|
|
433
431
|
s("div", He, [
|
|
434
432
|
u($, null, {
|
|
435
433
|
"menu-button": N(() => [
|
|
436
|
-
u(
|
|
434
|
+
u(v, {
|
|
437
435
|
variant: "tertiary",
|
|
438
436
|
icon: "download",
|
|
439
437
|
label: "Download template"
|
|
@@ -452,83 +450,90 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
452
450
|
})
|
|
453
451
|
]),
|
|
454
452
|
t(f) ? (n(), i("div", Ge, [
|
|
455
|
-
u(
|
|
453
|
+
u(v, {
|
|
456
454
|
variant: "tertiary",
|
|
457
455
|
"prepend-icon": "attach_file"
|
|
458
456
|
}),
|
|
459
457
|
s("p", qe, r(t(f).name), 1),
|
|
460
|
-
u(
|
|
458
|
+
u(v, {
|
|
461
459
|
variant: "plain",
|
|
462
460
|
label: t(m)("Replace File"),
|
|
463
461
|
onClick: pe
|
|
464
462
|
}, null, 8, ["label"]),
|
|
465
463
|
s("input", {
|
|
466
464
|
ref_key: "replaceFileInput",
|
|
467
|
-
ref:
|
|
465
|
+
ref: E,
|
|
468
466
|
id: "member-import-file",
|
|
469
467
|
accept: ".csv, .xlsx",
|
|
470
468
|
class: "hidden",
|
|
471
469
|
type: "file",
|
|
472
470
|
onChange: me
|
|
473
471
|
}, null, 544)
|
|
474
|
-
])) : (n(),
|
|
472
|
+
])) : (n(), k(Ee, {
|
|
475
473
|
key: 0,
|
|
476
474
|
accept: ".csv, .xlsx",
|
|
477
475
|
"max-file-size": 5e6,
|
|
478
|
-
onFileUpload:
|
|
476
|
+
onFileUpload: a[1] || (a[1] = (l) => f.value = l)
|
|
479
477
|
})),
|
|
480
478
|
u(U, {
|
|
481
479
|
"model-value": t(B),
|
|
482
480
|
value: "import-warnings",
|
|
483
481
|
label: "I have read and understand these import rules.",
|
|
484
|
-
"onUpdate:modelValue":
|
|
482
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => B.value = l)
|
|
485
483
|
}, null, 8, ["model-value"])
|
|
486
484
|
], 64)),
|
|
487
|
-
t(
|
|
485
|
+
t(c) ? (n(), k(Ce, {
|
|
488
486
|
key: 3,
|
|
489
487
|
state: "error",
|
|
490
|
-
text: t(
|
|
491
|
-
}, null, 8, ["text"])) :
|
|
488
|
+
text: t(c)
|
|
489
|
+
}, null, 8, ["text"])) : d("", !0),
|
|
492
490
|
s("div", _t, [
|
|
493
|
-
t(e) && ["INVALID", "STOPPED", "COMPLETED", "CANCELLED"].includes(t(e).status) ? (n(),
|
|
491
|
+
t(e) && ["INVALID", "STOPPED", "COMPLETED", "CANCELLED"].includes(t(e).status) ? (n(), k(v, {
|
|
494
492
|
key: 0,
|
|
495
493
|
variant: "tertiary",
|
|
496
494
|
icon: "download",
|
|
497
495
|
label: "Download result",
|
|
498
496
|
disabled: t(e).summary.total === 0,
|
|
499
497
|
onClick: ke
|
|
500
|
-
}, null, 8, ["disabled"])) :
|
|
501
|
-
((ee = t(e)) == null ? void 0 : ee.status) === "INVALID" ? (n(),
|
|
498
|
+
}, null, 8, ["disabled"])) : d("", !0),
|
|
499
|
+
((ee = t(e)) == null ? void 0 : ee.status) === "INVALID" ? (n(), k(v, {
|
|
502
500
|
key: 1,
|
|
503
501
|
variant: "tertiary",
|
|
504
502
|
label: "Choose another file",
|
|
505
503
|
onClick: _e
|
|
506
|
-
})) :
|
|
504
|
+
})) : d("", !0),
|
|
507
505
|
u(Te),
|
|
508
|
-
u(
|
|
506
|
+
u(v, {
|
|
509
507
|
variant: "secondary",
|
|
510
|
-
label:
|
|
508
|
+
label: "Close",
|
|
509
|
+
disabled: t(b),
|
|
510
|
+
onClick: a[7] || (a[7] = (l) => t(M).close())
|
|
511
|
+
}, null, 8, ["disabled"]),
|
|
512
|
+
t(e) && !["COMPLETED", "CANCELLED", "INVALID"].includes(t(e).status) ? (n(), k(v, {
|
|
513
|
+
key: 2,
|
|
514
|
+
variant: "secondary",
|
|
515
|
+
label: ((te = t(e)) == null ? void 0 : te.status) === "CANCELLING" ? "Cancelling…" : "Cancel import",
|
|
511
516
|
disabled: t(b) || ((ae = t(e)) == null ? void 0 : ae.status) === "CANCELLING",
|
|
512
517
|
onClick: we
|
|
513
|
-
}, null, 8, ["label", "disabled"]),
|
|
514
|
-
t(e) ?
|
|
515
|
-
key:
|
|
518
|
+
}, null, 8, ["label", "disabled"])) : d("", !0),
|
|
519
|
+
t(e) ? d("", !0) : (n(), k(v, {
|
|
520
|
+
key: 3,
|
|
516
521
|
label: "Validate file",
|
|
517
522
|
disabled: !t(f) || !t(B) || t(b),
|
|
518
523
|
onClick: ve
|
|
519
524
|
}, null, 8, ["disabled"])),
|
|
520
|
-
((oe = t(e)) == null ? void 0 : oe.status) === "READY" ? (n(),
|
|
521
|
-
key:
|
|
525
|
+
((oe = t(e)) == null ? void 0 : oe.status) === "READY" ? (n(), k(v, {
|
|
526
|
+
key: 4,
|
|
522
527
|
label: "Start import",
|
|
523
528
|
disabled: !t(K) || t(b),
|
|
524
529
|
onClick: ge
|
|
525
|
-
}, null, 8, ["disabled"])) :
|
|
526
|
-
((se = t(e)) == null ? void 0 : se.status) === "STOPPED" ? (n(),
|
|
527
|
-
key:
|
|
530
|
+
}, null, 8, ["disabled"])) : d("", !0),
|
|
531
|
+
((se = t(e)) == null ? void 0 : se.status) === "STOPPED" ? (n(), k(v, {
|
|
532
|
+
key: 5,
|
|
528
533
|
label: "Retry import",
|
|
529
534
|
disabled: t(b) || !t(e).file,
|
|
530
535
|
onClick: he
|
|
531
|
-
}, null, 8, ["disabled"])) :
|
|
536
|
+
}, null, 8, ["disabled"])) : d("", !0)
|
|
532
537
|
])
|
|
533
538
|
]);
|
|
534
539
|
};
|
|
@@ -536,12 +541,12 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
536
541
|
}), ht = { class: "px-24 flex flex-col gap-y-16 pb-24" }, Ft = /* @__PURE__ */ J({
|
|
537
542
|
__name: "Member",
|
|
538
543
|
setup(G) {
|
|
539
|
-
const m = Oe(), { t: M } =
|
|
544
|
+
const m = Oe(), { t: M } = ue(), D = de(), f = [
|
|
540
545
|
{
|
|
541
546
|
label: M("connect.loyalty.member.tabs.member_list"),
|
|
542
547
|
value: I["$connect-LOYALTY_MEMBER_LIST"]
|
|
543
548
|
}
|
|
544
|
-
],
|
|
549
|
+
], E = P(() => {
|
|
545
550
|
var w, _, L;
|
|
546
551
|
const h = m.currentRoute.value.name;
|
|
547
552
|
return h == I["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"] ? {
|
|
@@ -559,14 +564,14 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
559
564
|
} : (e.value = f[1], {
|
|
560
565
|
backButton: !0,
|
|
561
566
|
title: M("connect.loyalty.member.title"),
|
|
562
|
-
description: `${(w =
|
|
567
|
+
description: `${(w = c.value) == null ? void 0 : w.name} (${(_ = c.value) == null ? void 0 : _._id}) (${(L = c.value) == null ? void 0 : L.phoneNumber})`,
|
|
563
568
|
onBackButton: async () => {
|
|
564
569
|
await m.push({ name: I["$connect-LOYALTY_MEMBER_LIST"] });
|
|
565
570
|
}
|
|
566
571
|
});
|
|
567
572
|
}), e = g(
|
|
568
573
|
f.find((h) => h.value === m.currentRoute.value.name) ?? f[0]
|
|
569
|
-
),
|
|
574
|
+
), c = g(), R = P(
|
|
570
575
|
() => m.currentRoute.value.name === I["$connect-LOYALTY_MEMBER_TRANSACTIONS"] || m.currentRoute.value.name === I["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
571
576
|
), B = P(
|
|
572
577
|
() => m.currentRoute.value.name !== I["$connect-LOYALTY_MEMBER_TRANSACTIONS"]
|
|
@@ -595,30 +600,30 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
595
600
|
async (h) => {
|
|
596
601
|
e.value = f.find((_) => _.value === h) ?? f[0];
|
|
597
602
|
const w = m.currentRoute.value.params.id;
|
|
598
|
-
w && (
|
|
603
|
+
w && (c.value = await A.readById(w));
|
|
599
604
|
},
|
|
600
605
|
{ immediate: !0 }
|
|
601
606
|
), (h, w) => {
|
|
602
|
-
const _ =
|
|
607
|
+
const _ = y("FmButton"), L = y("FmPageHead"), q = y("FmTabs"), j = y("RouterView");
|
|
603
608
|
return n(), i(O, null, [
|
|
604
609
|
u(L, {
|
|
605
|
-
title: t(
|
|
606
|
-
description: t(
|
|
607
|
-
"back-button": t(
|
|
608
|
-
"onClick:back": t(
|
|
610
|
+
title: t(E).title,
|
|
611
|
+
description: t(E).description,
|
|
612
|
+
"back-button": t(E).backButton,
|
|
613
|
+
"onClick:back": t(E).onBackButton
|
|
609
614
|
}, Me({ _: 2 }, [
|
|
610
615
|
t(B) ? {
|
|
611
616
|
name: "append",
|
|
612
617
|
fn: N(() => [
|
|
613
618
|
u(Ye, null, {
|
|
614
619
|
default: N(() => [
|
|
615
|
-
t(T) ? (n(),
|
|
620
|
+
t(T) ? (n(), k(_, {
|
|
616
621
|
key: 0,
|
|
617
622
|
label: "Import history",
|
|
618
623
|
"prepend-icon": "work_history",
|
|
619
624
|
variant: "tertiary",
|
|
620
625
|
onClick: b
|
|
621
|
-
})) :
|
|
626
|
+
})) : d("", !0),
|
|
622
627
|
u(_, {
|
|
623
628
|
label: t(M)("connect.loyalty.member.import"),
|
|
624
629
|
"prepend-icon": "download",
|
|
@@ -632,7 +637,7 @@ const Ve = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
632
637
|
} : void 0
|
|
633
638
|
]), 1032, ["title", "description", "back-button", "onClick:back"]),
|
|
634
639
|
s("div", ht, [
|
|
635
|
-
t(R) ?
|
|
640
|
+
t(R) ? d("", !0) : (n(), k(q, {
|
|
636
641
|
key: 0,
|
|
637
642
|
"model-value": t(e).value,
|
|
638
643
|
items: f,
|