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