@feedmepos/mf-connect 0.1.98-beta.50 → 0.1.98-beta.52
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-XRTSw_F1.js → App-C9-lD2Hw.js} +8 -8
- package/dist/{AuditLogs-CgsvZ-7X.js → AuditLogs-mVSa1e2d.js} +10 -10
- package/dist/{Bin-CDwE00an.js → Bin-CHSDqvyp.js} +8 -8
- package/dist/{Broadcast-BOh56jYG.js → Broadcast-BUEwwGv8.js} +11 -11
- package/dist/{CampaignAnalytic-DZkCSGRF.js → CampaignAnalytic-D_qHmP-j.js} +6 -6
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DqYRlwCj.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DEzM1EH8.js} +7 -7
- package/dist/{Card-DZ01wmGw.js → Card-Bzbm3-sW.js} +20 -20
- package/dist/{Collections-CaIWOlsO.js → Collections-CERrTLRX.js} +8 -8
- package/dist/{Credit-C8TM9q2f.js → Credit-JxLtbWS-.js} +12 -12
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-1UH_Ie4E.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKIxsZIb.js} +34 -34
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CVqMqYhi.js → EffectSheet.vue_vue_type_style_index_0_lang-Bu486h20.js} +6 -6
- package/dist/{Experience-Cy0K8E9P.js → Experience-C-9zbUbV.js} +12 -12
- package/dist/{FileSaver.min-ClaVGDxU.js → FileSaver.min-B4bNs8iH.js} +1 -1
- package/dist/{Game-DxUNIK1H.js → Game-BYV8NF0m.js} +13 -13
- package/dist/{GiftCardSetup-DPuRb-29.js → GiftCardSetup-CJi_--PA.js} +9 -9
- package/dist/{Grab-VSlV6K7E.js → Grab-Bgm7CS6o.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BJQzLNY1.js → ImageInput.vue_vue_type_script_setup_true_lang-CuC8sOKH.js} +1 -1
- package/dist/{Index-D_xXXqKL.js → Index-sjstmJ91.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BJl8_bKp.js → LocationPicker.vue_vue_type_script_setup_true_lang-Dk1_IA4x.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BOaXZf3X.js → LottieAnimation.vue_vue_type_script_setup_true_lang-1COn62uz.js} +1 -1
- package/dist/LoyaltyDashboard-D6d8uvqc.js +2220 -0
- package/dist/{MainLayout-CeA24f8v.js → MainLayout-JJUJwFTJ.js} +3 -3
- package/dist/{Marketing-Bw437-ze.js → Marketing-DRCAImhs.js} +4 -4
- package/dist/{MarketingMaterialEdit-x6JdhQDh.js → MarketingMaterialEdit-KiR6qhk6.js} +6 -6
- package/dist/{Member-zLjxWmJf.js → Member-RbLwG_XD.js} +200 -196
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DM9c_Ow1.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CKuNtryb.js} +23 -23
- package/dist/{MemberImportHistory-BvvIfn9o.js → MemberImportHistory-CSMmUYaF.js} +7 -7
- package/dist/{MemberList-DqqAduX1.js → MemberList-CKe9oSOX.js} +80 -80
- package/dist/{MemberTransactions-j4nWa843.js → MemberTransactions-Cz9oW1ZB.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-z9lYA425.js → MessageInput.vue_vue_type_script_setup_true_lang-Czt1s9hi.js} +10 -10
- package/dist/{Mission-CPXEtNBm.js → Mission-PgkkwDkY.js} +13 -13
- package/dist/{Overview-DySRWqyr.js → Overview-BiQvzE6U.js} +19 -19
- package/dist/{Overview-Bel0iCe8.js → Overview-kvJ0MdN-.js} +3 -3
- package/dist/{Point-ClovAwUI.js → Point-q1JBP2YV.js} +12 -12
- package/dist/{Promotion-BiiruWmm.js → Promotion-D4mlfhUW.js} +13 -13
- package/dist/{Queue-DY9zRWWp.js → Queue-C073ieg_.js} +11 -11
- package/dist/{Record-BJ6M5bXk.js → Record-BzrKG6WO.js} +9 -9
- package/dist/{Review-Cyi-vRyc.js → Review-Ddzsk4S5.js} +2 -2
- package/dist/{ReviewFacebookCallback-CdSAfiJ7.js → ReviewFacebookCallback-B85JCrQU.js} +5 -5
- package/dist/{ReviewGoogleCallback-COen72wx.js → ReviewGoogleCallback-DdK3pD4V.js} +5 -5
- package/dist/{Reward-B3--b_8h.js → Reward-CG9HGB8d.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DCmSt5io.js → RewardGroup.vue_vue_type_script_setup_true_lang-BSv9kF2a.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-F2B47wb8.js → RuleGroup.vue_vue_type_script_setup_true_lang-CpUO-nFy.js} +15 -15
- package/dist/{Segment-DydGccSi.js → Segment-V_LOxVT5.js} +25 -25
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Bf_1Lw5R.js → SelectItems.vue_vue_type_script_setup_true_lang-CrscmyI5.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BXrHY1DU.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DEg68hNO.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DhitF847.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BFlPOyFp.js} +4 -4
- package/dist/{Setting-DgXgWy7W.js → Setting-DHop8c8g.js} +14 -14
- package/dist/{SettingAdvertisements-TMTfvGdU.js → SettingAdvertisements-YHMTZE3J.js} +12 -12
- package/dist/{Settings-b3K8fH29.js → Settings-BCaNCpJT.js} +5 -5
- package/dist/{Store-jAGYe4R6.js → Store-Cs_8_ngC.js} +24 -24
- package/dist/{StoreRewards-23IXon0V.js → StoreRewards-DFoUaW2a.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BroaESpx.js → StoreTransactions.vue_vue_type_script_setup_true_lang-gK0o53mY.js} +22 -22
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-gnjnQhXP.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D5O5DKbh.js} +2 -2
- package/dist/{Tier-B_ixl0ZY.js → Tier-BmQh3fVh.js} +25 -25
- package/dist/{Title-CUc90kzn.js → Title-UT4g--1-.js} +22 -22
- package/dist/{Transaction-BNVEjOC4.js → Transaction-ESFus2Ol.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CkbKlnrt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BGh_tZBk.js} +6 -6
- package/dist/{Voucher-eALK6zg9.js → Voucher-DZL9Fdg9.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CEsMYQ-L.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BAQ9jtAM.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BEAJ5tb7.js → ZodTextField.vue_vue_type_script_setup_true_lang-DYQUgY-k.js} +2 -2
- package/dist/{app-I3z-EN92.js → app-C38mcv88.js} +238 -238
- package/dist/app.js +1 -1
- package/dist/{business-D_ksG_j8.js → business-2oH_ru_8.js} +1 -1
- package/dist/{campaign-BKIxUyuf.js → campaign-Bjso0Xy2.js} +2 -2
- package/dist/{campaign-IZaOdcTr.js → campaign-CMZqifqP.js} +8 -8
- package/dist/{campaign.enum-k3u4N6yI.js → campaign.enum-Y6SY-diZ.js} +1 -1
- package/dist/{campaign.fn-DeQTMPoH.js → campaign.fn-FdFgkYSj.js} +3 -3
- package/dist/{collectible.enum-CSQwvFfW.js → collectible.enum-MBCR_vBG.js} +1 -1
- package/dist/{collection.fn-BtWAPYLz.js → collection.fn-BXNobS3V.js} +2 -2
- package/dist/{duplicateCampaign-BWdWO-Jv.js → duplicateCampaign-XPBqYkWX.js} +2 -2
- package/dist/{effect-BBSG58dq.js → effect-DIBdj1V2.js} +1 -1
- package/dist/{email-addresses-CJg5ttqC.js → email-addresses-DV4VUh2g.js} +2 -2
- package/dist/{export-BkjhRe8g.js → export-DWSRMvQd.js} +3 -3
- package/dist/{helper-DsSVIIP1.js → helper-aWWZOhk-.js} +1 -1
- package/dist/{index-wsdEChJx.js → index-BDxwnonR.js} +3 -3
- package/dist/{index-BmAoVlN8.js → index-BGZVdX7n.js} +2 -2
- package/dist/{index-f0JDFqAr.js → index-BW0_NNEE.js} +1 -1
- package/dist/{index-38Rnr26K.js → index-Br-UT1ir.js} +1 -1
- package/dist/{index-iagCxZ13.js → index-C567s8tj.js} +3 -3
- package/dist/{index-BsAuvfaE.js → index-CHhk4SQx.js} +2 -2
- package/dist/{index-DdV1nasM.js → index-CeXhFaZg.js} +5 -5
- package/dist/{index-CtXqXihA.js → index-CueUIXPn.js} +1 -1
- package/dist/{index-BbBies0f.js → index-DVA1kIwN.js} +5 -5
- package/dist/{index-CV1kOec1.js → index-DafINJH8.js} +1 -1
- package/dist/{index-ZPKkCZxS.js → index-DbULfnV3.js} +7 -7
- package/dist/{index-C-phzlda.js → index-DfXU3JsN.js} +1 -1
- package/dist/{index-CtF4Z_fd.js → index-DlzhY2Gz.js} +7 -7
- package/dist/{index-CPnv5m8Z.js → index-Dps3MKMS.js} +2 -2
- package/dist/{index-Ckr8ODhI.js → index-HQFexw0Z.js} +1 -1
- package/dist/{index-DCz9v1dd.js → index-Pz3KsQfw.js} +1 -1
- package/dist/{index-C0qgi7n9.js → index-WVDXkuyC.js} +1 -1
- package/dist/{index-blX95L2R.js → index-WXnNDUyq.js} +3 -3
- package/dist/{index.esm2017-BMC-Q91P.js → index.esm2017-D9a8Ow55.js} +1 -1
- package/dist/{loading-3obmcgAf.js → loading-C5r1cx-_.js} +1 -1
- package/dist/{lodash-C69G7pFG.js → lodash-BbPpFjHe.js} +1 -1
- package/dist/{member-import-BxBe9NE7.js → member-import-CftPgU92.js} +13 -13
- package/dist/{membership-_XX1_j55.js → membership-C7KQ-KXT.js} +3 -3
- package/dist/{money-DZpYudCC.js → money-CxcffdSc.js} +1 -1
- package/dist/{number-BbQQzzRA.js → number-Cqd6VhtH.js} +1 -1
- package/dist/{objectid-kWi62XJQ.js → objectid-CpTyDbom.js} +9 -9
- package/dist/{plugins-UfVjLlr4.js → plugins-BO66KEQi.js} +3 -3
- package/dist/{reward-1G2M5tgv.js → reward-D369xt9c.js} +1 -1
- package/dist/{rule-DHHGjLt5.js → rule-Dc83EYyn.js} +3 -3
- package/dist/{rule-builder-CgNmvg5o.js → rule-builder-CFK1__-e.js} +1 -1
- package/dist/{template-Ckva65hw.js → template-voSvaSNk.js} +6 -6
- package/dist/{timezone-Ddve0ese.js → timezone-DMQW1WZ5.js} +1 -1
- package/dist/{transaction.fn-7n5XLxfA.js → transaction.fn-BoPRNLs9.js} +1 -1
- package/dist/{trigger-F-XaDRpc.js → trigger-D2uZtisI.js} +5 -5
- package/dist/{useMarketingMaterialActions-DIhnstdO.js → useMarketingMaterialActions-Cfc1aeg0.js} +3 -3
- package/dist/{usePagination-C0TcC_Lo.js → usePagination-D6tENEun.js} +1 -1
- package/dist/{user-DeuI7T2e.js → user-lQkrcDz7.js} +1 -1
- package/dist/{vue-i18n-DRrphfc1.js → vue-i18n-3ow1X-2g.js} +2 -2
- package/dist/{xlsx-DaY_eyt1.js → xlsx-BtLSi0cI.js} +1 -1
- package/dist/{zod-BDdpK5Gp.js → zod-BkZnH28K.js} +1 -1
- package/package.json +1 -1
- package/dist/LoyaltyDashboard-CWPV6CHM.js +0 -2218
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import "./index-
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { u as
|
|
5
|
-
import { useCoreStore as
|
|
6
|
-
import { F as
|
|
7
|
-
import { u as
|
|
8
|
-
import { M as
|
|
9
|
-
import { m as
|
|
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-HQFexw0Z.js";
|
|
3
|
+
import { useDialog as re } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as ie } from "./vue-i18n-3ow1X-2g.js";
|
|
5
|
+
import { useCoreStore as Se } from "@feedmepos/mf-common";
|
|
6
|
+
import { F as ne } from "./FileSaver.min-B4bNs8iH.js";
|
|
7
|
+
import { u as Y, w as Ae } from "./xlsx-BtLSi0cI.js";
|
|
8
|
+
import { M as le, a as Ne } from "./member-import-CftPgU92.js";
|
|
9
|
+
import { m as A } from "./index-Dps3MKMS.js";
|
|
10
10
|
import { useRouter as Me } from "vue-router";
|
|
11
|
-
import { R as E } from "./app-
|
|
12
|
-
const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full" }, Pe = /* @__PURE__ */
|
|
11
|
+
import { R as E } from "./app-C38mcv88.js";
|
|
12
|
+
const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-full" }, Pe = /* @__PURE__ */ W({
|
|
13
13
|
__name: "FmAdminBadge",
|
|
14
14
|
props: {
|
|
15
15
|
class: { default: void 0 },
|
|
16
16
|
selectable: { type: Boolean, default: !1 }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
18
|
+
setup(G) {
|
|
19
|
+
const m = G, M = Se();
|
|
20
20
|
return (_, e) => {
|
|
21
21
|
var v;
|
|
22
22
|
const i = f("FmIcon");
|
|
23
|
-
return (v = t(
|
|
23
|
+
return (v = t(M).sessionUser.value) != null && v.role.isAdmin ? (n(), d("div", {
|
|
24
24
|
key: 0,
|
|
25
|
-
class:
|
|
25
|
+
class: Q([
|
|
26
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": !
|
|
27
|
+
{ "select-none": !m.selectable }
|
|
28
28
|
])
|
|
29
29
|
}, [
|
|
30
|
-
|
|
30
|
+
oe(_.$slots, "default"),
|
|
31
31
|
s("div", {
|
|
32
|
-
class:
|
|
32
|
+
class: Q([
|
|
33
33
|
"pointer-events-none opacity-90 flex items-center justify-center rounded-xxxl bg-red-500 text-white group-hover:opacity-20",
|
|
34
|
-
|
|
34
|
+
m.class,
|
|
35
35
|
{
|
|
36
36
|
absolute: !0,
|
|
37
37
|
"bottom-[-5px] right-[-8px] px-4 h-[25px] w-[25px] border-2 border-red-800": !0
|
|
@@ -39,23 +39,23 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
39
39
|
])
|
|
40
40
|
}, [
|
|
41
41
|
s("span", Fe, [
|
|
42
|
-
|
|
42
|
+
u(i, {
|
|
43
43
|
name: "support_agent",
|
|
44
44
|
size: "sm",
|
|
45
45
|
outline: ""
|
|
46
46
|
})
|
|
47
47
|
])
|
|
48
48
|
], 2)
|
|
49
|
-
], 2)) :
|
|
49
|
+
], 2)) : oe(_.$slots, "non-admin", { key: 1 });
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
52
|
+
}), De = { class: "w-[800px] max-w-full space-y-24 pb-16" }, Be = {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
55
|
-
},
|
|
55
|
+
}, Ye = { class: "flex justify-end" }, Oe = {
|
|
56
56
|
key: 1,
|
|
57
57
|
class: "flex items-center rounded-md border border-fm-color-neutral-gray-300 p-16"
|
|
58
|
-
},
|
|
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
59
|
key: 0,
|
|
60
60
|
class: "rounded-md bg-fm-color-system-error-100 p-16 fm-typo-en-body-sm-400"
|
|
61
61
|
}, je = {
|
|
@@ -76,20 +76,20 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
76
76
|
}, nt = { class: "rounded-md bg-fm-color-system-error-100 p-16" }, lt = { class: "fm-typo-en-body-sm-400" }, rt = {
|
|
77
77
|
key: 4,
|
|
78
78
|
class: "rounded-md bg-fm-color-system-error-100 p-16"
|
|
79
|
-
}, it = { class: "fm-typo-en-body-sm-400" },
|
|
79
|
+
}, it = { class: "fm-typo-en-body-sm-400" }, dt = { class: "fm-typo-en-body-sm-400" }, ut = {
|
|
80
80
|
key: 5,
|
|
81
81
|
class: "rounded-md bg-fm-color-system-success-100 p-16"
|
|
82
|
-
},
|
|
82
|
+
}, ct = { class: "fm-typo-en-body-sm-400" }, mt = {
|
|
83
83
|
key: 6,
|
|
84
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__ */
|
|
85
|
+
}, pt = { class: "fm-typo-en-body-sm-400" }, ft = { class: "flex items-center justify-end gap-8" }, vt = /* @__PURE__ */ W({
|
|
86
86
|
__name: "ImportMemberDialog",
|
|
87
|
-
setup(
|
|
88
|
-
const { t:
|
|
89
|
-
let
|
|
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
90
|
const g = h({
|
|
91
91
|
mode: "UPSERT"
|
|
92
|
-
}),
|
|
92
|
+
}), L = [
|
|
93
93
|
{ label: "Create missing members only", value: "CREATE" },
|
|
94
94
|
{ label: "Update existing members only", value: "UPDATE" },
|
|
95
95
|
{ label: "Create and update members", value: "UPSERT" }
|
|
@@ -106,17 +106,17 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
106
106
|
value: "xlsx"
|
|
107
107
|
/* xlsx */
|
|
108
108
|
}
|
|
109
|
-
],
|
|
109
|
+
], S = D(
|
|
110
110
|
() => {
|
|
111
111
|
var a;
|
|
112
112
|
return ["UPLOADED", "VALIDATING", "QUEUED", "RUNNING", "CANCELLING"].includes(
|
|
113
113
|
((a = e.value) == null ? void 0 : a.status) ?? ""
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
), V =
|
|
116
|
+
), V = D(() => {
|
|
117
117
|
var a;
|
|
118
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
|
-
}),
|
|
119
|
+
}), q = D(() => {
|
|
120
120
|
const a = e.value, o = a == null ? void 0 : a.summary, p = !!a && v.value === a.businessName;
|
|
121
121
|
return [
|
|
122
122
|
{
|
|
@@ -146,28 +146,32 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
146
146
|
}
|
|
147
147
|
];
|
|
148
148
|
});
|
|
149
|
-
function
|
|
149
|
+
function de(a) {
|
|
150
150
|
var o, p;
|
|
151
151
|
_.value = ((p = (o = a.target) == null ? void 0 : o.files) == null ? void 0 : p[0]) ?? null;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function ue(a) {
|
|
154
154
|
const o = [
|
|
155
|
-
[...
|
|
155
|
+
[...le],
|
|
156
156
|
[...Ne]
|
|
157
|
-
], p =
|
|
157
|
+
], p = Y.aoa_to_sheet(o);
|
|
158
158
|
if (a === "csv") {
|
|
159
|
-
|
|
160
|
-
new Blob([
|
|
159
|
+
ne.saveAs(
|
|
160
|
+
new Blob([Y.sheet_to_csv(p)], {
|
|
161
161
|
type: "text/csv;charset=utf-8;"
|
|
162
162
|
}),
|
|
163
163
|
"ImportMemberTemplate.csv"
|
|
164
164
|
);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
const y =
|
|
168
|
-
|
|
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 });
|
|
169
173
|
}
|
|
170
|
-
async function
|
|
174
|
+
async function ce() {
|
|
171
175
|
if (!_.value) {
|
|
172
176
|
i.value = "Please upload a file.";
|
|
173
177
|
return;
|
|
@@ -179,65 +183,65 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
179
183
|
b.value = !0, i.value = "";
|
|
180
184
|
try {
|
|
181
185
|
const a = new FormData();
|
|
182
|
-
a.append("file", _.value), a.append("config", JSON.stringify(g.value)), e.value = await
|
|
186
|
+
a.append("file", _.value), a.append("config", JSON.stringify(g.value)), e.value = await A.import(a), await P();
|
|
183
187
|
} catch (a) {
|
|
184
188
|
i.value = a instanceof Error ? a.message : String(a);
|
|
185
189
|
} finally {
|
|
186
190
|
b.value = !1;
|
|
187
191
|
}
|
|
188
192
|
}
|
|
189
|
-
async function
|
|
193
|
+
async function me(a) {
|
|
190
194
|
var p, y;
|
|
191
195
|
if (!e.value) return !1;
|
|
192
196
|
const o = e.value._id.toString();
|
|
193
197
|
try {
|
|
194
|
-
const
|
|
195
|
-
return a !==
|
|
196
|
-
} catch (
|
|
197
|
-
if (a !==
|
|
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)
|
|
198
202
|
return !1;
|
|
199
|
-
throw
|
|
203
|
+
throw T;
|
|
200
204
|
}
|
|
201
205
|
}
|
|
202
|
-
async function
|
|
206
|
+
async function P() {
|
|
203
207
|
var o;
|
|
204
|
-
|
|
205
|
-
const a =
|
|
208
|
+
$();
|
|
209
|
+
const a = x;
|
|
206
210
|
try {
|
|
207
|
-
if (!await
|
|
211
|
+
if (!await me(a)) return;
|
|
208
212
|
} catch (p) {
|
|
209
|
-
if (a !==
|
|
210
|
-
i.value = p instanceof Error ? p.message : String(p),
|
|
213
|
+
if (a !== x) return;
|
|
214
|
+
i.value = p instanceof Error ? p.message : String(p), S.value && (F = setTimeout(P, 5e3));
|
|
211
215
|
return;
|
|
212
216
|
}
|
|
213
|
-
a ===
|
|
217
|
+
a === x && S.value && (F = setTimeout(P, ((o = e.value) == null ? void 0 : o.status) === "RUNNING" ? 5e3 : 1500));
|
|
214
218
|
}
|
|
215
|
-
async function
|
|
219
|
+
async function pe() {
|
|
216
220
|
try {
|
|
217
|
-
e.value = await
|
|
221
|
+
e.value = await A.resumableImport(), e.value && await P();
|
|
218
222
|
} catch (a) {
|
|
219
223
|
i.value = a instanceof Error ? a.message : String(a);
|
|
220
224
|
} finally {
|
|
221
225
|
O.value = !1;
|
|
222
226
|
}
|
|
223
227
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
228
|
+
function $() {
|
|
229
|
+
x += 1, F && clearTimeout(F), F = void 0;
|
|
226
230
|
}
|
|
227
|
-
function
|
|
228
|
-
|
|
231
|
+
function fe() {
|
|
232
|
+
$(), e.value = null, _.value = null, i.value = "";
|
|
229
233
|
}
|
|
230
|
-
async function
|
|
234
|
+
async function ve() {
|
|
231
235
|
if (!(!e.value || !V.value)) {
|
|
232
236
|
b.value = !0, i.value = "";
|
|
233
237
|
try {
|
|
234
|
-
e.value = await
|
|
238
|
+
e.value = await A.confirmImport(e.value._id.toString(), {
|
|
235
239
|
businessName: v.value,
|
|
236
240
|
fileHash: e.value.fileHash,
|
|
237
241
|
previewVersion: e.value.previewVersion,
|
|
238
242
|
acknowledgeSharedProfiles: C.value,
|
|
239
243
|
acknowledgeBalanceReplacement: I.value
|
|
240
|
-
}), await
|
|
244
|
+
}), await P();
|
|
241
245
|
} catch (a) {
|
|
242
246
|
i.value = a instanceof Error ? a.message : String(a);
|
|
243
247
|
} finally {
|
|
@@ -245,11 +249,11 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
251
|
}
|
|
248
|
-
async function
|
|
252
|
+
async function ye() {
|
|
249
253
|
if (e.value) {
|
|
250
254
|
b.value = !0, i.value = "";
|
|
251
255
|
try {
|
|
252
|
-
e.value = await
|
|
256
|
+
e.value = await A.retryImport(e.value._id.toString()), await P();
|
|
253
257
|
} catch (a) {
|
|
254
258
|
i.value = a instanceof Error ? a.message : String(a);
|
|
255
259
|
} finally {
|
|
@@ -257,16 +261,16 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
257
261
|
}
|
|
258
262
|
}
|
|
259
263
|
}
|
|
260
|
-
async function
|
|
264
|
+
async function be() {
|
|
261
265
|
if (!e.value || ["COMPLETED", "CANCELLED", "INVALID"].includes(e.value.status)) {
|
|
262
|
-
|
|
266
|
+
M.close();
|
|
263
267
|
return;
|
|
264
268
|
}
|
|
265
269
|
if (e.value.status !== "CANCELLING") {
|
|
266
270
|
b.value = !0, i.value = "";
|
|
267
271
|
try {
|
|
268
|
-
const a = await
|
|
269
|
-
|
|
272
|
+
const a = await A.cancelImport(e.value._id.toString());
|
|
273
|
+
$(), e.value = a, e.value.status === "CANCELLING" && await P();
|
|
270
274
|
} catch (a) {
|
|
271
275
|
i.value = a instanceof Error ? a.message : String(a);
|
|
272
276
|
} finally {
|
|
@@ -274,198 +278,198 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
274
278
|
}
|
|
275
279
|
}
|
|
276
280
|
}
|
|
277
|
-
async function
|
|
281
|
+
async function _e() {
|
|
278
282
|
if (!e.value) return;
|
|
279
|
-
const a = await
|
|
280
|
-
|
|
283
|
+
const a = await A.downloadImportResult(e.value._id.toString());
|
|
284
|
+
ne.saveAs(a, `member-import-${e.value._id}.csv`);
|
|
281
285
|
}
|
|
282
|
-
return
|
|
283
|
-
var
|
|
284
|
-
const p = f("FmSelect"), y = f("FmButton"),
|
|
285
|
-
return n(),
|
|
286
|
-
t(O) ? (n(),
|
|
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 }, [
|
|
287
291
|
s("div", Ue, [
|
|
288
292
|
s("div", null, [
|
|
289
|
-
s("div", He, r(((
|
|
293
|
+
s("div", He, r(((J = t(e).file) == null ? void 0 : J.originalName) ?? "Unknown file"), 1),
|
|
290
294
|
s("div", Ge, " Import " + r(t(e)._id) + " · " + r(t(e).status), 1)
|
|
291
295
|
]),
|
|
292
|
-
|
|
296
|
+
u(he, {
|
|
293
297
|
label: t(e).status,
|
|
294
298
|
compact: ""
|
|
295
299
|
}, null, 8, ["label"])
|
|
296
300
|
]),
|
|
297
|
-
t(e).file ?
|
|
298
|
-
t(
|
|
299
|
-
t(e).status === "READY" ? (n(),
|
|
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, [
|
|
300
304
|
s("div", Qe, [
|
|
301
|
-
|
|
305
|
+
u(H, {
|
|
302
306
|
variant: "outlined",
|
|
303
307
|
class: "p-12"
|
|
304
308
|
}, {
|
|
305
|
-
default:
|
|
309
|
+
default: N(() => [
|
|
306
310
|
s("div", We, r(t(e).summary.total), 1),
|
|
307
311
|
o[7] || (o[7] = s("div", { class: "fm-typo-en-body-sm-400" }, "Rows", -1))
|
|
308
312
|
]),
|
|
309
313
|
_: 1
|
|
310
314
|
}),
|
|
311
|
-
|
|
315
|
+
u(H, {
|
|
312
316
|
variant: "outlined",
|
|
313
317
|
class: "p-12"
|
|
314
318
|
}, {
|
|
315
|
-
default:
|
|
319
|
+
default: N(() => [
|
|
316
320
|
s("div", Je, r(t(e).summary.create), 1),
|
|
317
321
|
o[8] || (o[8] = s("div", { class: "fm-typo-en-body-sm-400" }, "Create", -1))
|
|
318
322
|
]),
|
|
319
323
|
_: 1
|
|
320
324
|
}),
|
|
321
|
-
|
|
325
|
+
u(H, {
|
|
322
326
|
variant: "outlined",
|
|
323
327
|
class: "p-12"
|
|
324
328
|
}, {
|
|
325
|
-
default:
|
|
329
|
+
default: N(() => [
|
|
326
330
|
s("div", Ke, r(t(e).summary.update), 1),
|
|
327
331
|
o[9] || (o[9] = s("div", { class: "fm-typo-en-body-sm-400" }, "Update", -1))
|
|
328
332
|
]),
|
|
329
333
|
_: 1
|
|
330
334
|
}),
|
|
331
|
-
|
|
335
|
+
u(H, {
|
|
332
336
|
variant: "outlined",
|
|
333
337
|
class: "p-12"
|
|
334
338
|
}, {
|
|
335
|
-
default:
|
|
339
|
+
default: N(() => [
|
|
336
340
|
s("div", Xe, r(t(e).summary.balanceRows), 1),
|
|
337
341
|
o[10] || (o[10] = s("div", { class: "fm-typo-en-body-sm-400" }, "Balance rows", -1))
|
|
338
342
|
]),
|
|
339
343
|
_: 1
|
|
340
344
|
})
|
|
341
345
|
]),
|
|
342
|
-
t(e).summary.balanceRows ? (n(),
|
|
343
|
-
t(e).summary.sharedProfiles ? (n(),
|
|
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),
|
|
344
348
|
s("div", tt, [
|
|
345
|
-
o[11] || (o[11] =
|
|
349
|
+
o[11] || (o[11] = se(" To confirm your action, type ", -1)),
|
|
346
350
|
s("span", at, r(t(e).businessName), 1),
|
|
347
|
-
o[12] || (o[12] =
|
|
351
|
+
o[12] || (o[12] = se(" in the text field ", -1))
|
|
348
352
|
]),
|
|
349
|
-
|
|
353
|
+
u(we, {
|
|
350
354
|
modelValue: t(v),
|
|
351
355
|
"onUpdate:modelValue": o[3] || (o[3] = (l) => Ie(v) ? v.value = l : null)
|
|
352
356
|
}, null, 8, ["modelValue"]),
|
|
353
|
-
t(e).summary.sharedProfiles ? (n(), w(
|
|
357
|
+
t(e).summary.sharedProfiles ? (n(), w(j, {
|
|
354
358
|
key: 2,
|
|
355
359
|
"model-value": t(C),
|
|
356
360
|
value: "shared-profile",
|
|
357
361
|
label: "I understand that shared profile fields can affect other businesses.",
|
|
358
362
|
"onUpdate:modelValue": o[4] || (o[4] = (l) => C.value = l)
|
|
359
|
-
}, null, 8, ["model-value"])) :
|
|
360
|
-
t(e).summary.balanceRows ? (n(), w(
|
|
363
|
+
}, null, 8, ["model-value"])) : c("", !0),
|
|
364
|
+
t(e).summary.balanceRows ? (n(), w(j, {
|
|
361
365
|
key: 3,
|
|
362
366
|
"model-value": t(I),
|
|
363
367
|
value: "balance-replacement",
|
|
364
368
|
label: "I understand that populated balance cells replace final balances.",
|
|
365
369
|
"onUpdate:modelValue": o[5] || (o[5] = (l) => I.value = l)
|
|
366
|
-
}, null, 8, ["model-value"])) :
|
|
370
|
+
}, null, 8, ["model-value"])) : c("", !0),
|
|
367
371
|
s("div", ot, [
|
|
368
372
|
o[13] || (o[13] = s("div", { class: "fm-typo-en-body-sm-600" }, "Start import checks", -1)),
|
|
369
|
-
(n(!0),
|
|
373
|
+
(n(!0), d(B, null, z(t(q), (l) => (n(), d("div", {
|
|
370
374
|
key: l.label,
|
|
371
375
|
class: "flex gap-8"
|
|
372
376
|
}, [
|
|
373
377
|
s("span", {
|
|
374
|
-
class:
|
|
378
|
+
class: Q(l.passed ? "text-green-600" : "text-red-600")
|
|
375
379
|
}, r(l.passed ? "✓" : "✗"), 3),
|
|
376
380
|
s("span", null, r(l.label) + ": " + r(l.value), 1)
|
|
377
381
|
]))), 128))
|
|
378
382
|
])
|
|
379
|
-
])) :
|
|
380
|
-
t(e).status === "INVALID" ? (n(),
|
|
383
|
+
])) : c("", !0),
|
|
384
|
+
t(e).status === "INVALID" ? (n(), d("div", st, [
|
|
381
385
|
s("div", nt, [
|
|
382
386
|
o[14] || (o[14] = s("div", { class: "fm-typo-en-body-md-600" }, "The file is not importable", -1)),
|
|
383
387
|
s("div", lt, r(t(e).error), 1)
|
|
384
388
|
]),
|
|
385
|
-
(n(!0),
|
|
389
|
+
(n(!0), d(B, null, z((K = t(e).rowErrors) == null ? void 0 : K.slice(0, 10), (l) => (n(), d("div", {
|
|
386
390
|
key: l.rowNumber,
|
|
387
391
|
class: "fm-typo-en-body-sm-400"
|
|
388
392
|
}, " Row " + r(l.rowNumber) + ": " + r(l.errors.join("; ")), 1))), 128))
|
|
389
|
-
])) :
|
|
390
|
-
t(e).status === "STOPPED" ? (n(),
|
|
393
|
+
])) : c("", !0),
|
|
394
|
+
t(e).status === "STOPPED" ? (n(), d("div", rt, [
|
|
391
395
|
o[15] || (o[15] = s("div", { class: "fm-typo-en-body-md-600" }, "Import stopped", -1)),
|
|
392
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),
|
|
393
|
-
s("div",
|
|
394
|
-
])) :
|
|
395
|
-
t(e).status === "COMPLETED" ? (n(),
|
|
397
|
+
s("div", dt, r(t(e).error), 1)
|
|
398
|
+
])) : c("", !0),
|
|
399
|
+
t(e).status === "COMPLETED" ? (n(), d("div", ut, [
|
|
396
400
|
o[16] || (o[16] = s("div", { class: "fm-typo-en-body-md-600" }, "Import completed", -1)),
|
|
397
|
-
s("div",
|
|
398
|
-
])) :
|
|
399
|
-
t(e).status === "CANCELLED" ? (n(),
|
|
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, [
|
|
400
404
|
o[17] || (o[17] = s("div", { class: "fm-typo-en-body-md-600" }, "Import cancelled", -1)),
|
|
401
405
|
s("div", pt, r(t(e).summary.completed) + " rows were completed before cancellation. ", 1)
|
|
402
|
-
])) :
|
|
403
|
-
], 64)) : (n(),
|
|
404
|
-
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>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)),
|
|
405
|
-
|
|
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, {
|
|
406
410
|
modelValue: t(g).mode,
|
|
407
411
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => t(g).mode = l),
|
|
408
412
|
label: "Import mode",
|
|
409
|
-
items:
|
|
413
|
+
items: L
|
|
410
414
|
}, null, 8, ["modelValue"]),
|
|
411
|
-
s("div",
|
|
412
|
-
|
|
413
|
-
"menu-button":
|
|
414
|
-
|
|
415
|
+
s("div", Ye, [
|
|
416
|
+
u(U, null, {
|
|
417
|
+
"menu-button": N(() => [
|
|
418
|
+
u(y, {
|
|
415
419
|
variant: "tertiary",
|
|
416
420
|
icon: "download",
|
|
417
421
|
label: "Download template"
|
|
418
422
|
})
|
|
419
423
|
]),
|
|
420
|
-
default:
|
|
421
|
-
(n(),
|
|
424
|
+
default: N(() => [
|
|
425
|
+
(n(), d(B, null, z(R, (l) => u(T, {
|
|
422
426
|
key: l.value,
|
|
423
427
|
icon: l.icon,
|
|
424
428
|
label: l.label,
|
|
425
429
|
selectable: "",
|
|
426
|
-
onClick: (bt) =>
|
|
430
|
+
onClick: (bt) => ue(l.value)
|
|
427
431
|
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
428
432
|
]),
|
|
429
433
|
_: 1
|
|
430
434
|
})
|
|
431
435
|
]),
|
|
432
|
-
t(_) ? (n(),
|
|
433
|
-
|
|
436
|
+
t(_) ? (n(), d("div", Oe, [
|
|
437
|
+
u(y, {
|
|
434
438
|
variant: "tertiary",
|
|
435
439
|
"prepend-icon": "attach_file"
|
|
436
440
|
}),
|
|
437
|
-
s("p",
|
|
441
|
+
s("p", Ve, r(t(_).name), 1),
|
|
438
442
|
s("label", $e, [
|
|
439
|
-
|
|
443
|
+
u(y, {
|
|
440
444
|
variant: "plain",
|
|
441
|
-
label: t(
|
|
445
|
+
label: t(m)("Replace File")
|
|
442
446
|
}, null, 8, ["label"]),
|
|
443
447
|
s("input", {
|
|
444
448
|
id: "member-import-file",
|
|
445
449
|
accept: ".csv, .xlsx",
|
|
446
450
|
class: "hidden",
|
|
447
451
|
type: "file",
|
|
448
|
-
onChange:
|
|
452
|
+
onChange: de
|
|
449
453
|
}, null, 32)
|
|
450
454
|
])
|
|
451
|
-
])) : (n(), w(
|
|
455
|
+
])) : (n(), w(ge, {
|
|
452
456
|
key: 0,
|
|
453
457
|
accept: ".csv, .xlsx",
|
|
454
458
|
"max-file-size": 5e6,
|
|
455
459
|
onFileUpload: o[1] || (o[1] = (l) => _.value = l)
|
|
456
460
|
})),
|
|
457
|
-
|
|
461
|
+
u(j, {
|
|
458
462
|
"model-value": t(k),
|
|
459
463
|
value: "import-warnings",
|
|
460
464
|
label: "I have read and understand these import rules.",
|
|
461
465
|
"onUpdate:modelValue": o[2] || (o[2] = (l) => k.value = l)
|
|
462
466
|
}, null, 8, ["model-value"])
|
|
463
467
|
], 64)),
|
|
464
|
-
t(i) ? (n(), w(
|
|
468
|
+
t(i) ? (n(), w(Ee, {
|
|
465
469
|
key: 3,
|
|
466
470
|
state: "error",
|
|
467
471
|
text: t(i)
|
|
468
|
-
}, null, 8, ["text"])) :
|
|
472
|
+
}, null, 8, ["text"])) : c("", !0),
|
|
469
473
|
s("div", ft, [
|
|
470
474
|
t(e) && ["INVALID", "STOPPED", "COMPLETED", "CANCELLED"].includes(t(e).status) ? (n(), w(y, {
|
|
471
475
|
key: 0,
|
|
@@ -473,60 +477,60 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
473
477
|
icon: "download",
|
|
474
478
|
label: "Download result",
|
|
475
479
|
disabled: t(e).summary.total === 0,
|
|
476
|
-
onClick:
|
|
477
|
-
}, null, 8, ["disabled"])) :
|
|
478
|
-
((
|
|
480
|
+
onClick: _e
|
|
481
|
+
}, null, 8, ["disabled"])) : c("", !0),
|
|
482
|
+
((X = t(e)) == null ? void 0 : X.status) === "INVALID" ? (n(), w(y, {
|
|
479
483
|
key: 1,
|
|
480
484
|
variant: "tertiary",
|
|
481
485
|
label: "Choose another file",
|
|
482
|
-
onClick:
|
|
483
|
-
})) :
|
|
484
|
-
|
|
485
|
-
|
|
486
|
+
onClick: fe
|
|
487
|
+
})) : c("", !0),
|
|
488
|
+
u(ke),
|
|
489
|
+
u(y, {
|
|
486
490
|
variant: "secondary",
|
|
487
|
-
label: ((
|
|
488
|
-
disabled: t(b) || ((
|
|
489
|
-
onClick:
|
|
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
|
|
490
494
|
}, null, 8, ["label", "disabled"]),
|
|
491
|
-
t(e) ?
|
|
495
|
+
t(e) ? c("", !0) : (n(), w(y, {
|
|
492
496
|
key: 2,
|
|
493
497
|
label: "Validate file",
|
|
494
498
|
disabled: !t(_) || !t(k) || t(b),
|
|
495
|
-
onClick:
|
|
499
|
+
onClick: ce
|
|
496
500
|
}, null, 8, ["disabled"])),
|
|
497
|
-
((
|
|
501
|
+
((te = t(e)) == null ? void 0 : te.status) === "READY" ? (n(), w(y, {
|
|
498
502
|
key: 3,
|
|
499
503
|
label: "Start import",
|
|
500
504
|
disabled: !t(V) || t(b),
|
|
501
|
-
onClick:
|
|
502
|
-
}, null, 8, ["disabled"])) :
|
|
503
|
-
((
|
|
505
|
+
onClick: ve
|
|
506
|
+
}, null, 8, ["disabled"])) : c("", !0),
|
|
507
|
+
((ae = t(e)) == null ? void 0 : ae.status) === "STOPPED" ? (n(), w(y, {
|
|
504
508
|
key: 4,
|
|
505
509
|
label: "Retry import",
|
|
506
510
|
disabled: t(b) || !t(e).file,
|
|
507
|
-
onClick:
|
|
508
|
-
}, null, 8, ["disabled"])) :
|
|
511
|
+
onClick: ye
|
|
512
|
+
}, null, 8, ["disabled"])) : c("", !0)
|
|
509
513
|
])
|
|
510
514
|
]);
|
|
511
515
|
};
|
|
512
516
|
}
|
|
513
|
-
}), yt = { class: "px-24 flex flex-col gap-y-16 pb-24" }, Lt = /* @__PURE__ */
|
|
517
|
+
}), yt = { class: "px-24 flex flex-col gap-y-16 pb-24" }, Lt = /* @__PURE__ */ W({
|
|
514
518
|
__name: "Member",
|
|
515
|
-
setup(
|
|
516
|
-
const
|
|
519
|
+
setup(G) {
|
|
520
|
+
const m = Me(), { t: M } = ie(), _ = re(), e = [
|
|
517
521
|
{
|
|
518
|
-
label:
|
|
522
|
+
label: M("connect.loyalty.member.tabs.member_list"),
|
|
519
523
|
value: E["$connect-LOYALTY_MEMBER_LIST"]
|
|
520
524
|
}
|
|
521
|
-
], i =
|
|
522
|
-
var
|
|
523
|
-
const g =
|
|
525
|
+
], i = D(() => {
|
|
526
|
+
var L, R, S;
|
|
527
|
+
const g = m.currentRoute.value.name;
|
|
524
528
|
return g == E["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"] ? {
|
|
525
529
|
title: "Import history",
|
|
526
530
|
description: void 0,
|
|
527
531
|
backButton: !0,
|
|
528
532
|
onBackButton: async () => {
|
|
529
|
-
await
|
|
533
|
+
await m.push({
|
|
530
534
|
name: E["$connect-LOYALTY_MEMBER_LIST"]
|
|
531
535
|
});
|
|
532
536
|
}
|
|
@@ -535,25 +539,25 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
535
539
|
description: void 0
|
|
536
540
|
} : (v.value = e[1], {
|
|
537
541
|
backButton: !0,
|
|
538
|
-
title:
|
|
539
|
-
description: `${(
|
|
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})`,
|
|
540
544
|
onBackButton: async () => {
|
|
541
|
-
await
|
|
545
|
+
await m.push({ name: E["$connect-LOYALTY_MEMBER_LIST"] });
|
|
542
546
|
}
|
|
543
547
|
});
|
|
544
548
|
}), v = h(
|
|
545
|
-
e.find((g) => g.value ===
|
|
546
|
-
), k = h(), C =
|
|
547
|
-
() =>
|
|
548
|
-
), I =
|
|
549
|
-
() =>
|
|
550
|
-
), b =
|
|
551
|
-
() =>
|
|
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"]
|
|
552
556
|
);
|
|
553
557
|
async function O(g) {
|
|
554
|
-
await
|
|
558
|
+
await m.push({ name: g });
|
|
555
559
|
}
|
|
556
|
-
async function
|
|
560
|
+
async function F() {
|
|
557
561
|
_.open({
|
|
558
562
|
title: "Import members",
|
|
559
563
|
closeButton: !1,
|
|
@@ -562,44 +566,44 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
562
566
|
contentComponent: vt
|
|
563
567
|
});
|
|
564
568
|
}
|
|
565
|
-
async function
|
|
566
|
-
await
|
|
569
|
+
async function x() {
|
|
570
|
+
await m.push({
|
|
567
571
|
name: E["$connect-LOYALTY_MEMBER_IMPORT_HISTORY"]
|
|
568
572
|
});
|
|
569
573
|
}
|
|
570
|
-
return
|
|
571
|
-
() =>
|
|
574
|
+
return xe(
|
|
575
|
+
() => m.currentRoute.value.name,
|
|
572
576
|
async (g) => {
|
|
573
577
|
v.value = e.find((R) => R.value === g) ?? e[0];
|
|
574
|
-
const
|
|
575
|
-
|
|
578
|
+
const L = m.currentRoute.value.params.id;
|
|
579
|
+
L && (k.value = await A.readById(L));
|
|
576
580
|
},
|
|
577
581
|
{ immediate: !0 }
|
|
578
|
-
), (g,
|
|
579
|
-
const R = f("FmButton"),
|
|
580
|
-
return n(),
|
|
581
|
-
|
|
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, {
|
|
582
586
|
title: t(i).title,
|
|
583
587
|
description: t(i).description,
|
|
584
588
|
"back-button": t(i).backButton,
|
|
585
589
|
"onClick:back": t(i).onBackButton
|
|
586
|
-
},
|
|
590
|
+
}, Le({ _: 2 }, [
|
|
587
591
|
t(I) ? {
|
|
588
592
|
name: "append",
|
|
589
|
-
fn:
|
|
590
|
-
|
|
591
|
-
default:
|
|
593
|
+
fn: N(() => [
|
|
594
|
+
u(Pe, null, {
|
|
595
|
+
default: N(() => [
|
|
592
596
|
t(b) ? (n(), w(R, {
|
|
593
597
|
key: 0,
|
|
594
598
|
label: "Import history",
|
|
595
599
|
"prepend-icon": "work_history",
|
|
596
600
|
variant: "tertiary",
|
|
597
|
-
onClick:
|
|
598
|
-
})) :
|
|
599
|
-
|
|
600
|
-
label: t(
|
|
601
|
+
onClick: x
|
|
602
|
+
})) : c("", !0),
|
|
603
|
+
u(R, {
|
|
604
|
+
label: t(M)("connect.loyalty.member.import"),
|
|
601
605
|
"prepend-icon": "download",
|
|
602
|
-
onClick:
|
|
606
|
+
onClick: F
|
|
603
607
|
}, null, 8, ["label"])
|
|
604
608
|
]),
|
|
605
609
|
_: 1
|
|
@@ -609,13 +613,13 @@ const Fe = { class: "fm-typo-en-body-sm-400 justify-center flex items-center w-f
|
|
|
609
613
|
} : void 0
|
|
610
614
|
]), 1032, ["title", "description", "back-button", "onClick:back"]),
|
|
611
615
|
s("div", yt, [
|
|
612
|
-
t(C) ?
|
|
616
|
+
t(C) ? c("", !0) : (n(), w(V, {
|
|
613
617
|
key: 0,
|
|
614
618
|
"model-value": t(v).value,
|
|
615
619
|
items: e,
|
|
616
620
|
"onUpdate:modelValue": O
|
|
617
621
|
}, null, 8, ["model-value"])),
|
|
618
|
-
|
|
622
|
+
u(q)
|
|
619
623
|
])
|
|
620
624
|
], 64);
|
|
621
625
|
};
|