@feedmepos/mf-connect 0.1.119-prod → 0.1.120-dev
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-BN2LKM3u.js → App-Dw3rnEq4.js} +147 -135
- package/dist/AuditLogs-DhXCWAPt.js +2016 -0
- package/dist/{Bin-DpQ1atb7.js → Bin-CUr1xsO9.js} +8 -8
- package/dist/{Broadcast-c1ZyYClI.js → Broadcast-_XJq6IJN.js} +22 -21
- package/dist/{CampaignAnalytic-w1hIlc2r.js → CampaignAnalytic-DqaUuRKr.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7U6evm1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VIKZyXYe.js} +8 -9
- package/dist/{Card-De53Xgbe.js → Card-D-jdr-yk.js} +22 -22
- package/dist/{Collections-BL2RD3FU.js → Collections-BkD4tNm-.js} +197 -185
- package/dist/{Credit-2KvFFcwR.js → Credit-BetxSEVi.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CKSs2nYE.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B38KWvjh.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DjrUbq3p.js +4439 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Jy7HkK5Z.js → EffectSheet.vue_vue_type_style_index_0_lang-ZUyAIXG8.js} +30 -30
- package/dist/{Experience-Cb0jHtVo.js → Experience-BFA5Z-vR.js} +32 -31
- package/dist/{FileSaver.min-UDgZF_Cv.js → FileSaver.min-8JbG2mJ3.js} +1 -1
- package/dist/{Game-BnysxSMs.js → Game-U5KLh4hO.js} +19 -18
- package/dist/{GiftCardSetup-s1OR6xQq.js → GiftCardSetup-Co-IZAGp.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-D108r20x.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BEpn_v0p.js} +7 -7
- package/dist/{Goals-BAieLPzR.js → Goals-BjfIo1eJ.js} +4 -4
- package/dist/Grab-BqMAyeT4.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B9Jgq5Bp.js → ImageInput.vue_vue_type_script_setup_true_lang-BS_4suKR.js} +1 -1
- package/dist/{Index-DnX16GAE.js → Index-B6vsJrc1.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DeM-WG6m.js → LocationPicker.vue_vue_type_script_setup_true_lang-BnKkTFya.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BAN69FOS.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BekFDJxs.js} +1 -1
- package/dist/{LoyaltyDashboard-D8g6OSbC.js → LoyaltyDashboard-0jJUfdtM.js} +15 -15
- package/dist/{MainLayout-DWABjpQn.js → MainLayout-DCJfGVVF.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COp7iulq.js → MainLayout.vue_vue_type_script_setup_true_lang-CRkbPnQq.js} +16 -16
- package/dist/{Marketing-Dagatr0y.js → Marketing-DsZoY2Ef.js} +4 -4
- package/dist/{MarketingMaterialEdit-DYVzNDpM.js → MarketingMaterialEdit-BMJ2yjL0.js} +214 -211
- package/dist/{Member-DAxdEF_Z.js → Member-Bi7EuVUS.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-nBg7Hckj.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CXXKlmiR.js} +39 -47
- package/dist/{MemberImportHistory-2gx6FnLh.js → MemberImportHistory-CXnIaEaw.js} +7 -7
- package/dist/{MemberList-By_gGl-J.js → MemberList-C1CdR6m8.js} +103 -105
- package/dist/{MemberTransactions-BEF-4ZNp.js → MemberTransactions-BhSWE28t.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bs8wKx9B.js → MessageInput.vue_vue_type_script_setup_true_lang-DqkkAHPc.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DN3mWfKj.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-D6h_DlFU.js} +1 -1
- package/dist/{Mission-jg15lBxo.js → Mission-DZgMAkA4.js} +22 -21
- package/dist/{Overview-BFKLTAk1.js → Overview-BtV1gIgD.js} +145 -144
- package/dist/{Overview-C7WfdzfV.js → Overview-o0WZa6xE.js} +20 -20
- package/dist/{Point-dv9WgWTQ.js → Point-BdeI3vOp.js} +22 -21
- package/dist/{Promotion-mFPF_8jO.js → Promotion-eYwTP1qU.js} +137 -131
- package/dist/{Queue-BQoR_M5H.js → Queue-C72lnZ0G.js} +45 -45
- package/dist/{Record-1JZ1N5iX.js → Record-D1lHOQjk.js} +9 -9
- package/dist/{Review-B52AxCeT.js → Review-CbXC2Up5.js} +2 -2
- package/dist/ReviewFacebookCallback-BckFN6Dh.js +225 -0
- package/dist/{ReviewGoogleCallback-DO6SVFIC.js → ReviewGoogleCallback-CdBzIoTM.js} +5 -5
- package/dist/{Reward-Cp4jPAB0.js → Reward-hov1NEKT.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DLD6X13Z.js → RewardGroup.vue_vue_type_script_setup_true_lang-C65e4Bjf.js} +13 -13
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-04yLkHZC.js +1923 -0
- package/dist/{Segment-DaKw0YXF.js → Segment-CLl-iQEV.js} +303 -306
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bj3OQ_JJ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-cNl8HWu7.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B1Otak97.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DW40ulZz.js} +4 -4
- package/dist/{Setting-DveUrt8J.js → Setting-DUQnhLNq.js} +159 -148
- package/dist/{SettingAdvertisements-QRXOMNnM.js → SettingAdvertisements-BSn0-F2x.js} +12 -12
- package/dist/Settings-D_YrG-1N.js +286 -0
- package/dist/{Store-DjdXRw3V.js → Store-CDYO-NC0.js} +28 -28
- package/dist/{StoreRewards-CjlGrc9E.js → StoreRewards-DJh59Fob.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DZGywP7T.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-YIWh91VO.js +7007 -0
- package/dist/{Tier-D74Oh2np.js → Tier-BW6W3yBu.js} +2575 -687
- package/dist/{Title-CeeviOW8.js → Title-B2eCIHuR.js} +95 -94
- package/dist/{Transaction-CWdw0ITl.js → Transaction-DPoCHqkz.js} +2 -2
- package/dist/Upselling-Bc8sJPTF.js +1013 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B9nf-9s0.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B5aLnMyK.js} +26 -26
- package/dist/{Voucher-C0nNXMtv.js → Voucher-B6nQmBiS.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DxZLsQq9.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BdPZ41yo.js} +12 -12
- package/dist/{WhatsappAccount-CoLSjCQ2.js → WhatsappAccount-Ciq2u7nb.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DkHPlGgT.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-tkb0lN-h.js} +1 -1
- package/dist/{WhatsappBot-kLb3kUav.js → WhatsappBot-BYpVe09e.js} +6 -6
- package/dist/{WhatsappBotLogs-jcYaHs0t.js → WhatsappBotLogs-CgHw2yge.js} +6 -6
- package/dist/{WhatsappBotSettings-B6jJD61h.js → WhatsappBotSettings-BwpFbl7Z.js} +4 -4
- package/dist/{WhatsappLayout-C24bIjI2.js → WhatsappLayout-CwpwPh6N.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-9a_grP76.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DO9SPgkB.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-i8Wc2mCr.js → ZodTextField.vue_vue_type_script_setup_true_lang-C2jWAGpk.js} +2 -2
- package/dist/{app-C06bAZj3.js → app-vKvoaMkb.js} +4181 -3401
- package/dist/app.js +4 -3
- package/dist/{base.export-CgNRhKu8.js → base.export-ohC--hGH.js} +2 -2
- package/dist/{business-D23Dt1x4.js → business-28bym_1L.js} +1 -1
- package/dist/{campaign-DfEvGigm.js → campaign-DMboDbth.js} +121 -94
- package/dist/{campaign-FVcbXtrP.js → campaign-DgPBKJb-.js} +34 -28
- package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
- package/dist/campaign.fn-CFGvGCnh.js +776 -0
- package/dist/{collection.fn-DC1AMI9o.js → collection.fn-D1_zLTmc.js} +2 -2
- package/dist/{currency-Bra2RJK4.js → currency-DMOuxF-S.js} +1 -1
- package/dist/duplicateCampaign-DUktLBHE.js +51 -0
- package/dist/{effect-EL4V3pAu.js → effect-B5u1fe_H.js} +1 -1
- package/dist/{email-addresses-Ddtf1x_y.js → email-addresses-DlCCiXKC.js} +2 -2
- package/dist/{feature-flag-umACX47C.js → feature-flag-CjzcqKbW.js} +70 -70
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-DqDOnLCf.js → helper-B6jcRgk4.js} +1 -1
- package/dist/{index-ByVPdKdB.js → index-B2wPJtZQ.js} +682 -581
- package/dist/{index-B2lqC_hH.js → index-Bf8aQe9s.js} +1 -1
- package/dist/{index-C6p9Lsvf.js → index-BoxhFA0T.js} +1 -1
- package/dist/{index-TDCPGtW3.js → index-BuuNZzmf.js} +389 -232
- package/dist/{index-C3hAzzS2.js → index-CNc35JQ-.js} +29 -15
- package/dist/{index-C3lk4GHF.js → index-CQJRkES4.js} +4 -4
- package/dist/{index-BTjhdlN_.js → index-CYyJd65t.js} +1 -1
- package/dist/{index-CEh6ryp2.js → index-CuqYl8B1.js} +19 -6
- package/dist/{index-BroF2fC8.js → index-CxKq67I1.js} +608 -251
- package/dist/{index-DK9zxpDu.js → index-D2ZgTMnz.js} +3 -3
- package/dist/{index-Bvk61_w_.js → index-DAJ0XegF.js} +1 -1
- package/dist/{index-pfmx-Gor.js → index-DCKK1jWV.js} +2 -2
- package/dist/{index-B3U3KZl0.js → index-DEixqEZl.js} +2 -2
- package/dist/{index-iVbjwKxc.js → index-DLxrYNl3.js} +10 -10
- package/dist/{index-LjoAs_nX.js → index-DPwp9uUi.js} +10 -10
- package/dist/{index-rcfcslIC.js → index-DYkwpfhH.js} +197 -197
- package/dist/{index-BkKu2G2c.js → index-DfRs6Yvh.js} +2 -2
- package/dist/{index-BzwwXWpZ.js → index-EJ2519DL.js} +1 -1
- package/dist/{index-B_BmgKrh.js → index-hbfWGXN8.js} +2699 -2613
- package/dist/{index-DuCJtx1m.js → index-wOCVa2Eh.js} +1 -1
- package/dist/{index.esm2017-DCuQPCX2.js → index.esm2017-C3o6d_kv.js} +111 -111
- package/dist/{loading-CQm1DKWE.js → loading-Dbol8f8F.js} +1 -1
- package/dist/{lodash-C2wVbAap.js → lodash-FYmuGFr2.js} +1 -1
- package/dist/{member-import-BLEmTRso.js → member-import-FmqKKCXM.js} +1 -1
- package/dist/{membership-XycnxPEW.js → membership-CMsYIvf9.js} +2 -2
- package/dist/{money-DY_QGzd1.js → money-DMsQ8s71.js} +1 -1
- package/dist/{number-BHthf4qF.js → number-D_xzX-4k.js} +1 -1
- package/dist/objectid-Wc5m2Orq.js +145 -0
- package/dist/{onboarding-BOJw54Fn.js → onboarding-k2Qm1tTl.js} +36 -36
- package/dist/{onboardingSetup-Cf2u1tXu.js → onboardingSetup-DJeJJn0h.js} +2 -2
- package/dist/{plugins-DKQeoL_e.js → plugins-lVdrZkVB.js} +3 -3
- package/dist/{reward-D4RIYSpl.js → reward-BoH6x-Iu.js} +1 -1
- package/dist/{rule-Ba-s0L_w.js → rule-4QLYlkQ-.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-DLUzJbvo.js +224 -0
- package/dist/{timezone-CAc8xi1h.js → timezone-BV11O4o0.js} +1 -1
- package/dist/{transaction.fn-Cp2hnhyU.js → transaction.fn-5ws2MHHG.js} +2 -2
- package/dist/{trigger-3ebhNBX7.js → trigger-DHq8ksaN.js} +9 -9
- package/dist/{useMarketingMaterialActions-6URv8neP.js → useMarketingMaterialActions-DhBVUMSG.js} +4 -4
- package/dist/{usePagination-C-fyMmiy.js → usePagination-t6nU2p5V.js} +1 -1
- package/dist/{user-T-iXTrYV.js → user-KJLOr9ee.js} +1 -1
- package/dist/vue-i18n-DCq2tYAx.js +2365 -0
- package/dist/{xlsx-B8OqaJfb.js → xlsx-BkxKl6H8.js} +224 -224
- package/dist/{zod-DZkNj425.js → zod-CLLw9flE.js} +1 -1
- package/package.json +8 -3
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXb7v7wc.js +0 -3493
- package/dist/ReviewFacebookCallback-ihTdiI8V.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-pdHRjCt8.js +0 -1884
- package/dist/Settings-D9D-mkBa.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DnwMpqzf.js +0 -1265
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-I5-5BV4h.js +0 -142
- package/dist/campaign.fn-0MNUj1fZ.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-CPCAqIiC.js +0 -145
- package/dist/rule-builder-D0B0DPao.js +0 -102
- package/dist/template-B40I16Yg.js +0 -236
- package/dist/vue-i18n-DzsxJorb.js +0 -2365
|
@@ -1,68 +1,67 @@
|
|
|
1
|
-
import { defineComponent as le, ref as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { n as
|
|
4
|
-
import { u as
|
|
5
|
-
import { FmButtonVariant as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import "./index-
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
1
|
+
import { defineComponent as le, ref as X, resolveComponent as h, openBlock as r, createElementBlock as k, createElementVNode as s, createVNode as d, unref as e, createCommentVNode as H, withCtx as $, Fragment as ee, renderList as ue, createBlock as V, toDisplayString as E, normalizeClass as ie, computed as z, onMounted as Se, isRef as Ie, createSlots as Me, h as B, onBeforeMount as Te } from "vue";
|
|
2
|
+
import { _ as De } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { n as Ee, p as $e } from "./plugins-lVdrZkVB.js";
|
|
4
|
+
import { u as Ae } from "./loading-Dbol8f8F.js";
|
|
5
|
+
import { FmButtonVariant as ce, useSnackbar as Pe, components as ae } from "@feedmepos/ui-library";
|
|
6
|
+
import { u as be, _ as we } from "./usePagination-t6nU2p5V.js";
|
|
7
|
+
import { u as me } from "./vue-i18n-DCq2tYAx.js";
|
|
8
|
+
import { R as pe } from "./index-CxKq67I1.js";
|
|
9
|
+
import { i as Ne, j as U, D as Re, k as Be } from "./index-B2wPJtZQ.js";
|
|
10
|
+
import "./index-hbfWGXN8.js";
|
|
11
|
+
import { F as fe } from "./index-D2ZgTMnz.js";
|
|
12
|
+
import { a as ye } from "./index-BuuNZzmf.js";
|
|
13
|
+
import "./index-DEixqEZl.js";
|
|
14
14
|
import "./index-I9lmcd2w.js";
|
|
15
|
-
import "./index-
|
|
16
|
-
import { u as
|
|
17
|
-
import { e as
|
|
18
|
-
import { Z as
|
|
19
|
-
import { u as
|
|
20
|
-
import { z as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { F as Qe } from "./FileSaver.min-UDgZF_Cv.js";
|
|
15
|
+
import "./index-DAJ0XegF.js";
|
|
16
|
+
import { u as re, w as Fe } from "./xlsx-BkxKl6H8.js";
|
|
17
|
+
import { e as Ue, M as Ve } from "./email-addresses-DlCCiXKC.js";
|
|
18
|
+
import { Z as Le } from "./zod-CLLw9flE.js";
|
|
19
|
+
import { u as Ye } from "./app-wDQR6dpb.js";
|
|
20
|
+
import { z as ze } from "./index-C_H8jFYf.js";
|
|
21
|
+
import { _ as Oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-C2jWAGpk.js";
|
|
22
|
+
import { a as je } from "./RuleGroup.vue_vue_type_script_setup_true_lang-04yLkHZC.js";
|
|
23
|
+
import { u as qe, v as Ge, w as Je } from "./index.esm2017-C3o6d_kv.js";
|
|
24
|
+
import { F as Ke } from "./FileSaver.min-8JbG2mJ3.js";
|
|
26
25
|
import { h as se } from "./moment-D7p2TMB-.js";
|
|
27
|
-
import { s as
|
|
28
|
-
import { o as
|
|
29
|
-
import { J as
|
|
30
|
-
import { u as
|
|
31
|
-
import { f as
|
|
32
|
-
import { t as
|
|
33
|
-
import "./index-
|
|
34
|
-
import { useRouter as
|
|
35
|
-
import { m as
|
|
36
|
-
import { R as
|
|
37
|
-
const
|
|
38
|
-
_id:
|
|
39
|
-
business:
|
|
40
|
-
file:
|
|
26
|
+
import { s as Y, u as He } from "./membership-CMsYIvf9.js";
|
|
27
|
+
import { o as We } from "./objectId-dwaoBfJX.js";
|
|
28
|
+
import { J as Qe } from "./JsonViewer-v8_C7l5N.js";
|
|
29
|
+
import { u as Ce } from "./business-28bym_1L.js";
|
|
30
|
+
import { f as Ze } from "./number-D_xzX-4k.js";
|
|
31
|
+
import { t as Xe } from "./money-DMsQ8s71.js";
|
|
32
|
+
import "./index-EJ2519DL.js";
|
|
33
|
+
import { useRouter as et } from "vue-router";
|
|
34
|
+
import { m as ge } from "./index-DCKK1jWV.js";
|
|
35
|
+
import { R as ve } from "./app-vKvoaMkb.js";
|
|
36
|
+
const tt = Ne.extend({
|
|
37
|
+
_id: fe.optional(),
|
|
38
|
+
business: fe.optional(),
|
|
39
|
+
file: ze.any().nullish()
|
|
41
40
|
});
|
|
42
|
-
var
|
|
43
|
-
const
|
|
41
|
+
var ot = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", featureFlagApiKey: "MaGoXrEWuEJNpWgKTqseee" };
|
|
42
|
+
const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
44
43
|
key: 0,
|
|
45
|
-
class: /* @__PURE__ */
|
|
44
|
+
class: /* @__PURE__ */ ie([
|
|
46
45
|
"p-16 pl-24 space-x-8",
|
|
47
46
|
"bg-fm-color-primary-oats rounded-lg",
|
|
48
47
|
"flex items-center",
|
|
49
48
|
"justify-between"
|
|
50
49
|
])
|
|
51
|
-
},
|
|
50
|
+
}, st = { class: "flex justify-end" }, lt = {
|
|
52
51
|
key: 1,
|
|
53
|
-
class: /* @__PURE__ */
|
|
52
|
+
class: /* @__PURE__ */ ie([
|
|
54
53
|
"flex items-center",
|
|
55
54
|
"border border-fm-color-neutral-gray-300",
|
|
56
55
|
"p-16 space-x-16 rounded-md"
|
|
57
56
|
])
|
|
58
|
-
},
|
|
57
|
+
}, it = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, ct = /* @__PURE__ */ le({
|
|
59
58
|
__name: "ImportSegment",
|
|
60
59
|
props: {
|
|
61
60
|
importFile: {}
|
|
62
61
|
},
|
|
63
62
|
emits: ["update:file"],
|
|
64
63
|
setup(t, { emit: f }) {
|
|
65
|
-
const c = t,
|
|
64
|
+
const c = t, M = f, { t: S } = me(), _ = X(null), u = X(null), T = ["Id"], D = [
|
|
66
65
|
{
|
|
67
66
|
label: "CSV",
|
|
68
67
|
icon: "csv",
|
|
@@ -77,49 +76,49 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
77
76
|
async function a() {
|
|
78
77
|
if (c.importFile)
|
|
79
78
|
try {
|
|
80
|
-
const y =
|
|
79
|
+
const y = qe(void 0, ot.importFilesBucketUrl), p = Ge(y, c.importFile), g = await Je(p);
|
|
81
80
|
window.open(g, "_blank");
|
|
82
81
|
} catch (y) {
|
|
83
|
-
console.log(y),
|
|
82
|
+
console.log(y), Ee.error("Failed to download uploaded file");
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
async function m(y) {
|
|
87
86
|
switch (y) {
|
|
88
87
|
case "csv":
|
|
89
|
-
const p = new Blob([
|
|
88
|
+
const p = new Blob([T.join(",")], {
|
|
90
89
|
type: "text/csv;charset=utf-8;"
|
|
91
90
|
});
|
|
92
|
-
|
|
91
|
+
Ke.saveAs(p, "ImportSegmentTemplate.csv");
|
|
93
92
|
break;
|
|
94
93
|
case "xlsx":
|
|
95
|
-
const g =
|
|
96
|
-
|
|
94
|
+
const g = re.aoa_to_sheet([T]), x = re.book_new();
|
|
95
|
+
re.book_append_sheet(x, g, "Sheet1"), Fe(x, "ImportSegmentTemplate.xlsx");
|
|
97
96
|
break;
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
function i(y) {
|
|
101
|
-
_.value = y,
|
|
100
|
+
_.value = y, M("update:file", _.value);
|
|
102
101
|
}
|
|
103
102
|
function A(y) {
|
|
104
|
-
var g,
|
|
105
|
-
const p = ((
|
|
103
|
+
var g, x;
|
|
104
|
+
const p = ((x = (g = y.target) == null ? void 0 : g.files) == null ? void 0 : x[0]) ?? null;
|
|
106
105
|
i(p);
|
|
107
106
|
}
|
|
108
107
|
return (y, p) => {
|
|
109
|
-
const g = h("FmButton"),
|
|
110
|
-
return r(), k("div",
|
|
108
|
+
const g = h("FmButton"), x = h("FmMenuItem"), q = h("FmMenu"), G = h("FmDropField");
|
|
109
|
+
return r(), k("div", nt, [
|
|
111
110
|
p[2] || (p[2] = s("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
|
|
112
|
-
t.importFile ? (r(), k("div",
|
|
111
|
+
t.importFile ? (r(), k("div", at, [
|
|
113
112
|
d(g, {
|
|
114
|
-
label: e(
|
|
115
|
-
variant: e(
|
|
113
|
+
label: e(S)("View uploaded file"),
|
|
114
|
+
variant: e(ce).Plain,
|
|
116
115
|
icon: "file_present",
|
|
117
116
|
onClick: a
|
|
118
117
|
}, null, 8, ["label", "variant"])
|
|
119
118
|
])) : H("", !0),
|
|
120
119
|
s("div", null, [
|
|
121
|
-
s("div",
|
|
122
|
-
d(
|
|
120
|
+
s("div", st, [
|
|
121
|
+
d(q, { class: "" }, {
|
|
123
122
|
"menu-button": $(() => [
|
|
124
123
|
d(g, {
|
|
125
124
|
variant: "tertiary",
|
|
@@ -128,31 +127,31 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
128
127
|
})
|
|
129
128
|
]),
|
|
130
129
|
default: $(() => [
|
|
131
|
-
(r(), k(
|
|
130
|
+
(r(), k(ee, null, ue(D, (I) => d(x, {
|
|
132
131
|
key: I.value,
|
|
133
132
|
icon: I.icon,
|
|
134
133
|
label: I.label,
|
|
135
|
-
onClick: (
|
|
134
|
+
onClick: (J) => m(I.value),
|
|
136
135
|
selectable: ""
|
|
137
136
|
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
138
137
|
]),
|
|
139
138
|
_: 1
|
|
140
139
|
})
|
|
141
140
|
]),
|
|
142
|
-
_.value ? (r(), k("div",
|
|
141
|
+
_.value ? (r(), k("div", lt, [
|
|
143
142
|
d(g, {
|
|
144
|
-
variant: e(
|
|
143
|
+
variant: e(ce).Tertiary,
|
|
145
144
|
"prepend-icon": "attach_file"
|
|
146
145
|
}, null, 8, ["variant"]),
|
|
147
|
-
s("p",
|
|
146
|
+
s("p", it, E(_.value.name), 1),
|
|
148
147
|
s("label", {
|
|
149
148
|
ref_key: "fileLabelRef",
|
|
150
149
|
ref: u,
|
|
151
150
|
htmlFor: "file"
|
|
152
151
|
}, [
|
|
153
152
|
d(g, {
|
|
154
|
-
variant: e(
|
|
155
|
-
label: e(
|
|
153
|
+
variant: e(ce).Plain,
|
|
154
|
+
label: e(S)("Replace File"),
|
|
156
155
|
onClick: p[1] || (p[1] = () => {
|
|
157
156
|
var I;
|
|
158
157
|
return (I = u.value) == null ? void 0 : I.click();
|
|
@@ -167,7 +166,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
167
166
|
onChange: A
|
|
168
167
|
}, null, 32)
|
|
169
168
|
], 512)
|
|
170
|
-
])) : (r(), V(
|
|
169
|
+
])) : (r(), V(G, {
|
|
171
170
|
key: 0,
|
|
172
171
|
onFileUpload: p[0] || (p[0] = (I) => i(I)),
|
|
173
172
|
accept: ".csv, .xlsx",
|
|
@@ -177,18 +176,18 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
177
176
|
]);
|
|
178
177
|
};
|
|
179
178
|
}
|
|
180
|
-
}),
|
|
179
|
+
}), rt = { class: "space-y-16 pr-12" }, dt = { class: "fm-typo-en-title-md-800" }, ut = { class: "flex space-x-8" }, mt = { class: "fm-typo-en-title-md-800 text-fm-color-primary" }, pt = { class: "text-fm-color-typo-secondary" }, _e = /* @__PURE__ */ le({
|
|
181
180
|
__name: "ReviewSegment",
|
|
182
181
|
props: {
|
|
183
182
|
title: {},
|
|
184
183
|
segment: {}
|
|
185
184
|
},
|
|
186
185
|
setup(t) {
|
|
187
|
-
const f = t, c =
|
|
186
|
+
const f = t, c = z(
|
|
188
187
|
() => f.segment.memberCount ?? f.segment.members.length
|
|
189
|
-
),
|
|
188
|
+
), M = z(
|
|
190
189
|
() => f.segment.lastUpdated ? se(f.segment.lastUpdated).format("DD MMM YYYY") : "Not refreshed yet"
|
|
191
|
-
),
|
|
190
|
+
), S = [
|
|
192
191
|
{
|
|
193
192
|
header: "Name",
|
|
194
193
|
accessorFn: (i) => i.name
|
|
@@ -199,7 +198,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
199
198
|
},
|
|
200
199
|
{
|
|
201
200
|
header: "Customer Since",
|
|
202
|
-
accessorFn: (i) => se(
|
|
201
|
+
accessorFn: (i) => se(We(i._id.toString())).format("DD MMM YYYY")
|
|
203
202
|
},
|
|
204
203
|
{
|
|
205
204
|
header: "Phone",
|
|
@@ -215,7 +214,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
215
214
|
}
|
|
216
215
|
];
|
|
217
216
|
async function _(i) {
|
|
218
|
-
return f.segment._id ? (console.log(i), await
|
|
217
|
+
return f.segment._id ? (console.log(i), await Y.paginateSegmentUsers(
|
|
219
218
|
f.segment._id,
|
|
220
219
|
i
|
|
221
220
|
)) : {
|
|
@@ -229,32 +228,32 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
229
228
|
}
|
|
230
229
|
};
|
|
231
230
|
}
|
|
232
|
-
const { tableMeta: u, rowData:
|
|
233
|
-
return
|
|
231
|
+
const { tableMeta: u, rowData: T, onSort: D, debouncedFetchData: a, onSearch: m } = be(_);
|
|
232
|
+
return Se(async () => {
|
|
234
233
|
await a();
|
|
235
|
-
}), (i, A) => (r(), k("div",
|
|
236
|
-
s("div",
|
|
237
|
-
s("div",
|
|
238
|
-
s("div",
|
|
239
|
-
s("div",
|
|
234
|
+
}), (i, A) => (r(), k("div", rt, [
|
|
235
|
+
s("div", dt, E(f.title), 1),
|
|
236
|
+
s("div", ut, [
|
|
237
|
+
s("div", mt, E(e(c)), 1),
|
|
238
|
+
s("div", pt, [
|
|
240
239
|
A[1] || (A[1] = s("div", null, "contacts in your segment", -1)),
|
|
241
|
-
s("div", null, "as of " +
|
|
240
|
+
s("div", null, "as of " + E(e(M)), 1)
|
|
242
241
|
])
|
|
243
242
|
]),
|
|
244
|
-
d(
|
|
243
|
+
d(we, {
|
|
245
244
|
loading: e(u).isLoading,
|
|
246
|
-
"row-data": e(
|
|
245
|
+
"row-data": e(T),
|
|
247
246
|
"row-count": e(u).totalRows,
|
|
248
|
-
"column-defs":
|
|
247
|
+
"column-defs": S,
|
|
249
248
|
"page-size": e(u).pageSize,
|
|
250
249
|
"page-count": e(u).pageCount,
|
|
251
250
|
"page-index": e(u).pageIndex,
|
|
252
|
-
onSortChange: e(
|
|
251
|
+
onSortChange: e(D),
|
|
253
252
|
onPageChange: A[0] || (A[0] = (y) => e(a)({ pageSize: y.pageSize, pageIndex: y.pageIndex }))
|
|
254
253
|
}, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
|
|
255
254
|
]));
|
|
256
255
|
}
|
|
257
|
-
}),
|
|
256
|
+
}), ft = { class: "space-y-24" }, yt = { class: "grid grid-cols-2 gap-16" }, gt = { class: "fm-typo-en-title-sm-800" }, vt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _t = /* @__PURE__ */ le({
|
|
258
257
|
__name: "SegmentTypeOption",
|
|
259
258
|
props: {
|
|
260
259
|
modelValue: {},
|
|
@@ -262,7 +261,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
262
261
|
},
|
|
263
262
|
emits: ["update:model-value"],
|
|
264
263
|
setup(t, { emit: f }) {
|
|
265
|
-
const c = t,
|
|
264
|
+
const c = t, M = f, S = [
|
|
266
265
|
{
|
|
267
266
|
label: "Dynamic",
|
|
268
267
|
sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
|
|
@@ -275,16 +274,16 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
275
274
|
}
|
|
276
275
|
];
|
|
277
276
|
function _(u) {
|
|
278
|
-
u !== c.modelValue &&
|
|
277
|
+
u !== c.modelValue && M("update:model-value", u);
|
|
279
278
|
}
|
|
280
|
-
return (u,
|
|
281
|
-
const
|
|
282
|
-
return r(), k("div",
|
|
283
|
-
s("div",
|
|
284
|
-
(r(), k(
|
|
279
|
+
return (u, T) => {
|
|
280
|
+
const D = h("FmCard"), a = h("FmHelperText");
|
|
281
|
+
return r(), k("div", ft, [
|
|
282
|
+
s("div", yt, [
|
|
283
|
+
(r(), k(ee, null, ue(S, (m) => d(D, {
|
|
285
284
|
variant: "outlined",
|
|
286
|
-
class:
|
|
287
|
-
"col-span-2":
|
|
285
|
+
class: ie(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
286
|
+
"col-span-2": S.length == 1,
|
|
288
287
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": t.modelValue === m.value,
|
|
289
288
|
"hover:bg-fm-color-opacity-sm": t.modelValue !== m.value
|
|
290
289
|
}]),
|
|
@@ -292,8 +291,8 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
292
291
|
key: m.value
|
|
293
292
|
}, {
|
|
294
293
|
default: $(() => [
|
|
295
|
-
s("div",
|
|
296
|
-
s("div",
|
|
294
|
+
s("div", gt, E(m.label), 1),
|
|
295
|
+
s("div", vt, E(m.sublabel), 1)
|
|
297
296
|
]),
|
|
298
297
|
_: 2
|
|
299
298
|
}, 1032, ["class", "onClick"])), 64))
|
|
@@ -307,43 +306,43 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
307
306
|
]);
|
|
308
307
|
};
|
|
309
308
|
}
|
|
310
|
-
}), xt = { class: "flex items-center gap-x-8" },
|
|
309
|
+
}), xt = { class: "flex items-center gap-x-8" }, ht = {
|
|
311
310
|
key: 0,
|
|
312
311
|
class: "space-y-16 pr-12"
|
|
313
|
-
},
|
|
312
|
+
}, St = {
|
|
314
313
|
key: 0,
|
|
315
314
|
class: "flex flex-col gap-12"
|
|
316
|
-
},
|
|
315
|
+
}, bt = { class: "flex flex-wrap items-center gap-8" }, wt = { class: "fm-typo-en-title-sm-800" }, Ft = { class: "flex flex-col gap-4" }, Ct = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, It = {
|
|
317
316
|
key: 2,
|
|
318
317
|
class: "flex flex-col space-y-16"
|
|
319
|
-
},
|
|
318
|
+
}, Mt = {
|
|
320
319
|
key: 3,
|
|
321
320
|
class: "flex flex-col space-y-16"
|
|
322
|
-
},
|
|
321
|
+
}, Tt = {
|
|
323
322
|
key: 4,
|
|
324
323
|
class: "flex flex-col space-y-16"
|
|
325
|
-
},
|
|
324
|
+
}, Dt = {
|
|
326
325
|
key: 5,
|
|
327
326
|
class: "flex flex-col space-y-16"
|
|
328
|
-
},
|
|
327
|
+
}, Et = { class: "flex items-center gap-8" }, $t = /* @__PURE__ */ le({
|
|
329
328
|
__name: "SegmentSheet",
|
|
330
329
|
emits: ["update:model-value"],
|
|
331
330
|
setup(t, { expose: f, emit: c }) {
|
|
332
|
-
const
|
|
331
|
+
const M = Ye(), { t: S } = me(), _ = X(!1), u = X(!1), T = {
|
|
333
332
|
name: "",
|
|
334
333
|
isActive: !0,
|
|
335
334
|
type: U.enum.DYNAMIC,
|
|
336
|
-
rule:
|
|
335
|
+
rule: pe.scaffoldGroup(),
|
|
337
336
|
members: []
|
|
338
|
-
},
|
|
337
|
+
}, D = tt, a = X(T), m = z(() => !!a.value.defaultKey), i = z(
|
|
339
338
|
() => a.value.defaultKey ? `connect.loyalty.segment.default_segments.${a.value.defaultKey.toLowerCase()}` : void 0
|
|
340
|
-
), A =
|
|
341
|
-
() => i.value ?
|
|
342
|
-
), y =
|
|
339
|
+
), A = z(
|
|
340
|
+
() => i.value ? S(`${i.value}.name`) : a.value.name
|
|
341
|
+
), y = z(() => {
|
|
343
342
|
const v = a.value.defaultKey;
|
|
344
|
-
return v ?
|
|
345
|
-
}), p =
|
|
346
|
-
const v =
|
|
343
|
+
return v ? S(Re[v]) : a.value.description ?? "";
|
|
344
|
+
}), p = z(() => {
|
|
345
|
+
const v = D.safeParse(a.value);
|
|
347
346
|
return v.success ? [] : v.error.errors;
|
|
348
347
|
});
|
|
349
348
|
function g(v) {
|
|
@@ -351,67 +350,67 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
351
350
|
...v,
|
|
352
351
|
isActive: v.isActive !== !1,
|
|
353
352
|
type: v.type ?? (v.importFile ? U.enum.STATIC : U.enum.DYNAMIC)
|
|
354
|
-
} : a.value = { ...
|
|
353
|
+
} : a.value = { ...T };
|
|
355
354
|
}
|
|
356
|
-
function
|
|
355
|
+
function x() {
|
|
357
356
|
_.value = !1;
|
|
358
357
|
}
|
|
359
|
-
async function
|
|
360
|
-
|
|
358
|
+
async function q() {
|
|
359
|
+
D.safeParse(a.value).success && (u.value = !0);
|
|
361
360
|
}
|
|
362
|
-
function
|
|
363
|
-
v === U.enum.STATIC ?
|
|
361
|
+
function G(v) {
|
|
362
|
+
v === U.enum.STATIC ? x() : u.value = !1;
|
|
364
363
|
}
|
|
365
364
|
async function I() {
|
|
366
|
-
a.value.type === U.enum.STATIC ? (a.value.rule =
|
|
365
|
+
a.value.type === U.enum.STATIC ? (a.value.rule = pe.scaffoldGroup(), a.value.isActive = !0) : a.value.file = void 0, W("update:model-value", a.value);
|
|
367
366
|
}
|
|
368
|
-
async function
|
|
367
|
+
async function J(v) {
|
|
369
368
|
a.value.type = v;
|
|
370
369
|
}
|
|
371
|
-
|
|
370
|
+
Se(async () => {
|
|
372
371
|
});
|
|
373
|
-
const
|
|
372
|
+
const W = c;
|
|
374
373
|
return f({
|
|
375
374
|
showSheet: g,
|
|
376
|
-
hideSheet:
|
|
375
|
+
hideSheet: x
|
|
377
376
|
}), (v, l) => {
|
|
378
|
-
const
|
|
377
|
+
const P = h("FmButton"), te = h("FmChip"), oe = h("FmCard"), ne = h("FmSwitch"), o = h("FmSideSheet");
|
|
379
378
|
return r(), V(o, {
|
|
380
379
|
modelValue: e(_),
|
|
381
|
-
"onUpdate:modelValue": l[9] || (l[9] = (n) =>
|
|
382
|
-
header: e(m) ? e(
|
|
380
|
+
"onUpdate:modelValue": l[9] || (l[9] = (n) => Ie(_) ? _.value = n : null),
|
|
381
|
+
header: e(m) ? e(S)("connect.loyalty.segment.default_segments.default_segment") : e(a)._id ? "Edit segment" : "Add segment",
|
|
383
382
|
"dismiss-away": "",
|
|
384
383
|
"close-button": !0,
|
|
385
384
|
"max-width": 1100
|
|
386
|
-
},
|
|
385
|
+
}, Me({
|
|
387
386
|
"side-sheet-footer": $(() => [
|
|
388
|
-
s("div",
|
|
389
|
-
e(m) ? (r(), V(
|
|
387
|
+
s("div", Et, [
|
|
388
|
+
e(m) ? (r(), V(P, {
|
|
390
389
|
key: 0,
|
|
391
|
-
label: e(
|
|
392
|
-
onClick: l[6] || (l[6] = (n) =>
|
|
390
|
+
label: e(S)("connect.loyalty.segment.default_segments.close"),
|
|
391
|
+
onClick: l[6] || (l[6] = (n) => x()),
|
|
393
392
|
variant: "tertiary"
|
|
394
|
-
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(
|
|
395
|
-
d(
|
|
393
|
+
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(ee, { key: 1 }, [
|
|
394
|
+
d(P, {
|
|
396
395
|
label: "Save Segment",
|
|
397
396
|
onClick: I,
|
|
398
|
-
loading: e(
|
|
399
|
-
disabled: e(p).length > 0 || e(
|
|
397
|
+
loading: e(M).isLoading,
|
|
398
|
+
disabled: e(p).length > 0 || e(M).isLoading
|
|
400
399
|
}, null, 8, ["loading", "disabled"]),
|
|
401
|
-
d(
|
|
400
|
+
d(P, {
|
|
402
401
|
label: "Cancel",
|
|
403
|
-
onClick: l[7] || (l[7] = (n) =>
|
|
402
|
+
onClick: l[7] || (l[7] = (n) => G(e(a).type)),
|
|
404
403
|
variant: "tertiary"
|
|
405
404
|
})
|
|
406
|
-
], 64)) : (r(), k(
|
|
407
|
-
d(
|
|
405
|
+
], 64)) : (r(), k(ee, { key: 2 }, [
|
|
406
|
+
d(P, {
|
|
408
407
|
label: "Review Segment",
|
|
409
|
-
disabled: e(p).length > 0 || e(
|
|
410
|
-
onClick:
|
|
408
|
+
disabled: e(p).length > 0 || e(M).isLoading,
|
|
409
|
+
onClick: q
|
|
411
410
|
}, null, 8, ["disabled"]),
|
|
412
|
-
d(
|
|
411
|
+
d(P, {
|
|
413
412
|
label: "Cancel",
|
|
414
|
-
onClick: l[8] || (l[8] = (n) =>
|
|
413
|
+
onClick: l[8] || (l[8] = (n) => x()),
|
|
415
414
|
variant: "tertiary"
|
|
416
415
|
})
|
|
417
416
|
], 64))
|
|
@@ -420,80 +419,80 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
420
419
|
default: $(() => {
|
|
421
420
|
var n, F;
|
|
422
421
|
return [
|
|
423
|
-
d(
|
|
424
|
-
e(u) ? (r(), V(
|
|
422
|
+
d(Qe, { json: e(a) }, null, 8, ["json"]),
|
|
423
|
+
e(u) ? (r(), V(_e, {
|
|
425
424
|
key: 1,
|
|
426
425
|
title: e(a).name,
|
|
427
426
|
segment: e(a)
|
|
428
|
-
}, null, 8, ["title", "segment"])) : (r(), k("div",
|
|
429
|
-
e(m) ? (r(), k("div",
|
|
430
|
-
s("div",
|
|
431
|
-
s("div",
|
|
432
|
-
d(
|
|
433
|
-
label: e(
|
|
427
|
+
}, null, 8, ["title", "segment"])) : (r(), k("div", ht, [
|
|
428
|
+
e(m) ? (r(), k("div", St, [
|
|
429
|
+
s("div", bt, [
|
|
430
|
+
s("div", wt, E(e(A)), 1),
|
|
431
|
+
d(te, {
|
|
432
|
+
label: e(S)("connect.loyalty.segment.default_segments.system"),
|
|
434
433
|
compact: "",
|
|
435
434
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100"
|
|
436
435
|
}, null, 8, ["label"])
|
|
437
436
|
]),
|
|
438
|
-
d(
|
|
437
|
+
d(oe, {
|
|
439
438
|
variant: "outlined",
|
|
440
439
|
class: "p-16"
|
|
441
440
|
}, {
|
|
442
441
|
default: $(() => [
|
|
443
|
-
s("div",
|
|
444
|
-
s("div",
|
|
445
|
-
s("div",
|
|
442
|
+
s("div", Ft, [
|
|
443
|
+
s("div", Ct, E(e(S)("connect.loyalty.segment.default_segments.description")), 1),
|
|
444
|
+
s("div", kt, E(e(y)), 1)
|
|
446
445
|
])
|
|
447
446
|
]),
|
|
448
447
|
_: 1
|
|
449
448
|
})
|
|
450
|
-
])) : (r(), V(
|
|
449
|
+
])) : (r(), V(Oe, {
|
|
451
450
|
key: 1,
|
|
452
451
|
modelValue: e(a).name,
|
|
453
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
452
|
+
"onUpdate:modelValue": l[1] || (l[1] = (b) => e(a).name = b),
|
|
454
453
|
label: "Segment title",
|
|
455
|
-
schema: e(
|
|
454
|
+
schema: e(Le).typeAtPath(e(D), "name")
|
|
456
455
|
}, null, 8, ["modelValue", "schema"])),
|
|
457
|
-
e(m) ? H("", !0) : (r(), k("div",
|
|
456
|
+
e(m) ? H("", !0) : (r(), k("div", It, [
|
|
458
457
|
l[11] || (l[11] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
|
|
459
|
-
d(
|
|
458
|
+
d(_t, {
|
|
460
459
|
"model-value": e(a).type,
|
|
461
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
462
|
-
|
|
460
|
+
"onUpdate:modelValue": l[2] || (l[2] = (b) => {
|
|
461
|
+
J(b);
|
|
463
462
|
})
|
|
464
463
|
}, null, 8, ["model-value"])
|
|
465
464
|
])),
|
|
466
|
-
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div",
|
|
465
|
+
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div", Mt, [
|
|
467
466
|
l[12] || (l[12] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
|
|
468
|
-
d(
|
|
467
|
+
d(je, {
|
|
469
468
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
470
469
|
includeOnly: "user",
|
|
471
470
|
"model-value": (n = e(a)) == null ? void 0 : n.rule,
|
|
472
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
473
|
-
e(a).rule =
|
|
471
|
+
"onUpdate:modelValue": l[3] || (l[3] = (b) => {
|
|
472
|
+
e(a).rule = b;
|
|
474
473
|
})
|
|
475
474
|
}, null, 8, ["model-value"])
|
|
476
|
-
])) : e(m) ? H("", !0) : (r(), k("div",
|
|
477
|
-
d(
|
|
475
|
+
])) : e(m) ? H("", !0) : (r(), k("div", Tt, [
|
|
476
|
+
d(ct, {
|
|
478
477
|
importFile: e(a).importFile,
|
|
479
|
-
"onUpdate:file": l[4] || (l[4] = (
|
|
480
|
-
e(a).file =
|
|
478
|
+
"onUpdate:file": l[4] || (l[4] = (b) => {
|
|
479
|
+
e(a).file = b;
|
|
481
480
|
})
|
|
482
481
|
}, null, 8, ["importFile"])
|
|
483
482
|
])),
|
|
484
|
-
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div",
|
|
483
|
+
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div", Dt, [
|
|
485
484
|
l[13] || (l[13] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
|
|
486
|
-
d(
|
|
485
|
+
d(ne, {
|
|
487
486
|
"model-value": e(a).isActive ?? !0,
|
|
488
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
487
|
+
"onUpdate:modelValue": l[5] || (l[5] = (b) => e(a).isActive = b),
|
|
489
488
|
label: "Active",
|
|
490
489
|
sublabel: "When enabled, this will recalculate the segment statistics daily.",
|
|
491
490
|
"label-placement": "right"
|
|
492
491
|
}, null, 8, ["model-value"])
|
|
493
492
|
])) : H("", !0),
|
|
494
|
-
e(m) ? (r(), V(
|
|
493
|
+
e(m) ? (r(), V(_e, {
|
|
495
494
|
key: (F = e(a)._id) == null ? void 0 : F.toString(),
|
|
496
|
-
title: e(
|
|
495
|
+
title: e(S)("connect.loyalty.segment.default_segments.members"),
|
|
497
496
|
segment: e(a)
|
|
498
497
|
}, null, 8, ["title", "segment"])) : H("", !0)
|
|
499
498
|
]))
|
|
@@ -505,7 +504,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
505
504
|
name: "side-sheet-header",
|
|
506
505
|
fn: $(() => [
|
|
507
506
|
s("div", xt, [
|
|
508
|
-
d(
|
|
507
|
+
d(P, {
|
|
509
508
|
icon: "arrow_back",
|
|
510
509
|
variant: "tertiary",
|
|
511
510
|
onClick: l[0] || (l[0] = (n) => u.value = !1)
|
|
@@ -518,79 +517,77 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
518
517
|
]), 1032, ["modelValue", "header"]);
|
|
519
518
|
};
|
|
520
519
|
}
|
|
521
|
-
}), xe =
|
|
522
|
-
function
|
|
520
|
+
}), xe = He(), At = Ce();
|
|
521
|
+
function de(t) {
|
|
523
522
|
const f = se(t);
|
|
524
523
|
return f.isValid() ? f.format("DD/MM/YYYY") : "";
|
|
525
524
|
}
|
|
526
|
-
const
|
|
525
|
+
const Pt = {
|
|
527
526
|
mapMemberExportRow: (t) => {
|
|
528
|
-
var a, m, i, A, y, p, g,
|
|
529
|
-
const f =
|
|
527
|
+
var a, m, i, A, y, p, g, x, q, G, I, J, W, v, l, P, te, oe, ne, o, n, F, b, N, K, L;
|
|
528
|
+
const f = z(() => At.locations.map((C) => ({
|
|
530
529
|
label: C.name,
|
|
531
530
|
value: C._id
|
|
532
|
-
}))), c = (a =
|
|
531
|
+
}))), c = (a = Ue.parseOneAddress(
|
|
533
532
|
t == null ? void 0 : t.email
|
|
534
|
-
)) != null && a.domain.includes("feedmepos.com") ? void 0 : t.email,
|
|
535
|
-
(C,
|
|
536
|
-
var
|
|
537
|
-
const
|
|
538
|
-
(
|
|
539
|
-
)) == null ? void 0 :
|
|
540
|
-
return !
|
|
533
|
+
)) != null && a.domain.includes("feedmepos.com") ? void 0 : t.email, M = (i = ((m = t == null ? void 0 : t.collection) == null ? void 0 : m.TITLE) || []) == null ? void 0 : i.reduce(
|
|
534
|
+
(C, R) => {
|
|
535
|
+
var j, Q;
|
|
536
|
+
const O = (Q = (j = xe.sortedTitles) == null ? void 0 : j.find(
|
|
537
|
+
(w) => w._id === R.collectible
|
|
538
|
+
)) == null ? void 0 : Q.name;
|
|
539
|
+
return !O || R.balance <= 0 || C.push(O), C;
|
|
541
540
|
},
|
|
542
541
|
[]
|
|
543
|
-
),
|
|
544
|
-
(C,
|
|
545
|
-
var
|
|
546
|
-
const
|
|
547
|
-
(
|
|
548
|
-
)) == null ? void 0 :
|
|
549
|
-
return C[
|
|
542
|
+
), S = (xe.sortedTitles || []).reduce(
|
|
543
|
+
(C, R) => {
|
|
544
|
+
var j, Q, w, Z;
|
|
545
|
+
const O = (Z = (w = (Q = (((j = t == null ? void 0 : t.collection) == null ? void 0 : j.TITLE) || []).find(
|
|
546
|
+
(ke) => ke.collectible === R._id
|
|
547
|
+
)) == null ? void 0 : Q.expiryBalance) == null ? void 0 : w[0]) == null ? void 0 : Z.expiredAt;
|
|
548
|
+
return C[R.name] = O ? se(O).format("DD/MM/YYYY") : "", C;
|
|
550
549
|
},
|
|
551
550
|
{}
|
|
552
|
-
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((
|
|
553
|
-
(C,
|
|
551
|
+
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((G = (q = (x = (g = t.collection) == null ? void 0 : g.CREDIT) == null ? void 0 : x.at(0)) == null ? void 0 : q.expiryBalance) == null ? void 0 : G.reduce(
|
|
552
|
+
(C, R) => C + R.amount,
|
|
554
553
|
0
|
|
555
|
-
)) || 0,
|
|
554
|
+
)) || 0, T = Ze(_, 2);
|
|
556
555
|
return {
|
|
557
556
|
ID: t._id.toString(),
|
|
558
557
|
Name: ((I = t.name) == null ? void 0 : I.trim()) || "",
|
|
559
|
-
Phone: ((
|
|
558
|
+
Phone: ((J = t == null ? void 0 : t.phoneNumber) == null ? void 0 : J.trim()) || "",
|
|
560
559
|
Email: c || "",
|
|
561
560
|
Gender: t.gender || "",
|
|
562
561
|
CardNo: t.cardNo || "",
|
|
563
|
-
Birthday: t != null && t.birthday ?
|
|
564
|
-
Credit: parseFloat((Number(
|
|
562
|
+
Birthday: t != null && t.birthday ? de(t == null ? void 0 : t.birthday) : "",
|
|
563
|
+
Credit: parseFloat((Number(T) - Number(u)).toFixed(2)),
|
|
565
564
|
FreeCredit: Number(u.toFixed(2)),
|
|
566
|
-
TotalCredit: Number(
|
|
567
|
-
Exp: t != null && t.collection ? ((l = (v = (
|
|
568
|
-
Point: t != null && t.collection ? ((
|
|
569
|
-
Level: t != null && t.collection ? ((n = (o = (
|
|
570
|
-
Tier: t != null && t.collection ? ((
|
|
571
|
-
Titles:
|
|
572
|
-
...
|
|
565
|
+
TotalCredit: Number(T),
|
|
566
|
+
Exp: t != null && t.collection ? ((l = (v = (W = t.collection) == null ? void 0 : W.POINT) == null ? void 0 : v.at(0)) == null ? void 0 : l.balance) ?? 0 : 0,
|
|
567
|
+
Point: t != null && t.collection ? ((oe = (te = (P = t.collection) == null ? void 0 : P.COIN) == null ? void 0 : te.at(0)) == null ? void 0 : oe.balance) ?? 0 : 0,
|
|
568
|
+
Level: t != null && t.collection ? ((n = (o = (ne = t.collection) == null ? void 0 : ne.TIER) == null ? void 0 : o.at(0)) == null ? void 0 : n.balance) ?? 0 : 0,
|
|
569
|
+
Tier: t != null && t.collection ? ((N = (b = (F = t.collection) == null ? void 0 : F.TIER) == null ? void 0 : b.at(0)) == null ? void 0 : N.balance) ?? 0 : 0,
|
|
570
|
+
Titles: M.join(","),
|
|
571
|
+
...S,
|
|
573
572
|
TotalTransaction: t.stats.visitCount,
|
|
574
|
-
AvgSpent:
|
|
573
|
+
AvgSpent: Xe(Number(t.stats.avgBillSize || 0)).toFormat(
|
|
575
574
|
!1
|
|
576
575
|
),
|
|
577
576
|
TotalSpent: t.stats.avgBillSize * t.stats.visitCount,
|
|
578
|
-
LastVisit:
|
|
577
|
+
LastVisit: de(t.stats.lastVisit),
|
|
579
578
|
Feedback: ((K = t.stats) == null ? void 0 : K.feedbackCount) || 0,
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
JoinedAt: ue(t.joinAt || void 0),
|
|
583
|
-
JoinedAtLocation: t.location && ((ne = f.value.find((C) => C.value == t.location)) == null ? void 0 : ne.label) || "-",
|
|
579
|
+
JoinedAt: de(t.joinAt || void 0),
|
|
580
|
+
JoinedAtLocation: t.location && ((L = f.value.find((C) => C.value == t.location)) == null ? void 0 : L.label) || "-",
|
|
584
581
|
VisitFrequency: `${Number(
|
|
585
582
|
Math.ceil(t.stats.avgVisitFrequency).toFixed(0)
|
|
586
583
|
)}`
|
|
587
584
|
};
|
|
588
585
|
}
|
|
589
|
-
},
|
|
586
|
+
}, Nt = { class: "flex items-center" }, Rt = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Bt = { class: "px-24 flex flex-col gap-y-16" }, Ut = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Vt = { class: "flex flex-wrap items-center gap-8" }, Lt = { class: "fm-typo-en-body-md-600" }, Yt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, zt = { class: "flex flex-col gap-16 text-center" }, Ot = { class: "fm-typo-en-title-sm-800" }, jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, he = "text-fm-color-typo-info bg-fm-color-system-info-100", Io = /* @__PURE__ */ le({
|
|
590
587
|
__name: "Segment",
|
|
591
588
|
setup(t) {
|
|
592
|
-
const { minor: f } =
|
|
593
|
-
function
|
|
589
|
+
const { minor: f } = Ae, { t: c } = me(), M = Ce(), { mapMemberExportRow: S } = Pt, _ = Pe(), u = et(), T = X(0);
|
|
590
|
+
function D(o) {
|
|
594
591
|
return !!o.defaultKey;
|
|
595
592
|
}
|
|
596
593
|
function a(o) {
|
|
@@ -601,7 +598,7 @@ const Nt = {
|
|
|
601
598
|
return n ? c(`${n}.name`) : o.name;
|
|
602
599
|
}
|
|
603
600
|
function i(o) {
|
|
604
|
-
return
|
|
601
|
+
return T.value <= 0 ? "0.00" : ((o ?? 0) * 100 / T.value).toFixed(2);
|
|
605
602
|
}
|
|
606
603
|
const A = [
|
|
607
604
|
{
|
|
@@ -610,9 +607,9 @@ const Nt = {
|
|
|
610
607
|
cell(o) {
|
|
611
608
|
return B("div", { class: "flex flex-wrap items-center gap-8" }, [
|
|
612
609
|
B("span", m(o.row.original)),
|
|
613
|
-
...
|
|
610
|
+
...D(o.row.original) ? [
|
|
614
611
|
B(ae.FmChip, {
|
|
615
|
-
class:
|
|
612
|
+
class: he,
|
|
616
613
|
label: c("connect.loyalty.segment.default_segments.system"),
|
|
617
614
|
compact: !0
|
|
618
615
|
})
|
|
@@ -666,7 +663,7 @@ const Nt = {
|
|
|
666
663
|
ae.FmMenuItem,
|
|
667
664
|
{
|
|
668
665
|
onClick: async (n) => {
|
|
669
|
-
n.stopPropagation(),
|
|
666
|
+
n.stopPropagation(), W(o.row.original);
|
|
670
667
|
}
|
|
671
668
|
},
|
|
672
669
|
{
|
|
@@ -679,12 +676,12 @@ const Nt = {
|
|
|
679
676
|
)
|
|
680
677
|
}
|
|
681
678
|
),
|
|
682
|
-
...
|
|
679
|
+
...D(o.row.original) ? [] : [
|
|
683
680
|
B(
|
|
684
681
|
ae.FmMenuItem,
|
|
685
682
|
{
|
|
686
683
|
onClick: async (n) => {
|
|
687
|
-
n.stopPropagation(),
|
|
684
|
+
n.stopPropagation(), J(o.row.original);
|
|
688
685
|
}
|
|
689
686
|
},
|
|
690
687
|
{
|
|
@@ -704,15 +701,15 @@ const Nt = {
|
|
|
704
701
|
]);
|
|
705
702
|
}
|
|
706
703
|
}
|
|
707
|
-
], y =
|
|
708
|
-
|
|
709
|
-
),
|
|
704
|
+
], y = X(null), { tableMeta: p, rowData: g, debouncedFetchData: x } = be(
|
|
705
|
+
Y.readAll
|
|
706
|
+
), q = z(() => g.value.length === 0 ? !1 : Be.some(
|
|
710
707
|
(o) => !g.value.some((n) => n.defaultKey === o)
|
|
711
708
|
));
|
|
712
|
-
async function
|
|
709
|
+
async function G() {
|
|
713
710
|
var o;
|
|
714
711
|
try {
|
|
715
|
-
await
|
|
712
|
+
await Y.refreshSegments(), _.open({ type: "info", title: "Segment refresh queued" });
|
|
716
713
|
} catch (n) {
|
|
717
714
|
if (((n == null ? void 0 : n.status) ?? ((o = n == null ? void 0 : n.response) == null ? void 0 : o.status)) === 409) {
|
|
718
715
|
_.open({
|
|
@@ -730,7 +727,7 @@ const Nt = {
|
|
|
730
727
|
async function I() {
|
|
731
728
|
await f(
|
|
732
729
|
async () => {
|
|
733
|
-
await
|
|
730
|
+
await Y.startDefaultSegments(), await x({ pageSize: 10, pageIndex: 0 });
|
|
734
731
|
},
|
|
735
732
|
{
|
|
736
733
|
message: c(
|
|
@@ -742,10 +739,10 @@ const Nt = {
|
|
|
742
739
|
}
|
|
743
740
|
);
|
|
744
741
|
}
|
|
745
|
-
async function
|
|
746
|
-
await
|
|
742
|
+
async function J(o) {
|
|
743
|
+
await $e.remove(`Are you sure you want to remove ${o.name}?`) && await f(
|
|
747
744
|
async () => {
|
|
748
|
-
await
|
|
745
|
+
await Y.delete(o._id), await x({ pageSize: 10, pageIndex: 0 });
|
|
749
746
|
},
|
|
750
747
|
{
|
|
751
748
|
message: `Removing ${o.name}`,
|
|
@@ -753,14 +750,14 @@ const Nt = {
|
|
|
753
750
|
}
|
|
754
751
|
);
|
|
755
752
|
}
|
|
756
|
-
async function
|
|
753
|
+
async function W(o) {
|
|
757
754
|
const n = {
|
|
758
755
|
sortBy: "_id",
|
|
759
756
|
descending: !1,
|
|
760
757
|
rowsPerPage: 1e3,
|
|
761
758
|
page: 1,
|
|
762
759
|
rowsNumber: 0
|
|
763
|
-
}, F = new
|
|
760
|
+
}, F = new Ve(), b = m(o), N = (await ge.read({
|
|
764
761
|
limit: 1,
|
|
765
762
|
skip: 0,
|
|
766
763
|
sortBy: n.sortBy,
|
|
@@ -768,26 +765,26 @@ const Nt = {
|
|
|
768
765
|
})).meta.totalResources ?? 0, K = n.rowsPerPage;
|
|
769
766
|
await f(
|
|
770
767
|
async () => {
|
|
771
|
-
for (let L = 0; L <
|
|
772
|
-
const
|
|
768
|
+
for (let L = 0; L < N; L += K) {
|
|
769
|
+
const C = {
|
|
773
770
|
...n,
|
|
774
771
|
limit: K,
|
|
775
772
|
skip: n.page - 1,
|
|
776
773
|
sortBy: n.sortBy,
|
|
777
774
|
descending: n.descending
|
|
778
|
-
},
|
|
775
|
+
}, R = await Y.paginateSegmentUsers(
|
|
779
776
|
o._id,
|
|
780
|
-
|
|
777
|
+
C
|
|
781
778
|
);
|
|
782
|
-
for (const
|
|
783
|
-
const
|
|
784
|
-
F.addRecord(
|
|
779
|
+
for (const O of R.resources) {
|
|
780
|
+
const j = S(O);
|
|
781
|
+
F.addRecord(j);
|
|
785
782
|
}
|
|
786
783
|
n.page++;
|
|
787
784
|
}
|
|
788
|
-
await
|
|
785
|
+
await Fe(
|
|
789
786
|
F.buildExcel(),
|
|
790
|
-
`[${
|
|
787
|
+
`[${b}]-members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
791
788
|
{
|
|
792
789
|
bookType: "xlsx",
|
|
793
790
|
bookSST: !1,
|
|
@@ -808,11 +805,11 @@ const Nt = {
|
|
|
808
805
|
if (o.type === U.enum.STATIC) {
|
|
809
806
|
const F = new FormData();
|
|
810
807
|
if (F.append("file", o.file), o._id) {
|
|
811
|
-
const { members:
|
|
812
|
-
F.append("segment", JSON.stringify(L)), await
|
|
808
|
+
const { members: b, _id: N, file: K, ...L } = o;
|
|
809
|
+
F.append("segment", JSON.stringify(L)), await Y.updateStatic(o._id, F);
|
|
813
810
|
} else {
|
|
814
|
-
const { file:
|
|
815
|
-
F.append("segment", JSON.stringify(
|
|
811
|
+
const { file: b, ...N } = o;
|
|
812
|
+
F.append("segment", JSON.stringify(N)), await Y.createStatic(F);
|
|
816
813
|
}
|
|
817
814
|
o.file && _.open({
|
|
818
815
|
type: "info",
|
|
@@ -820,17 +817,17 @@ const Nt = {
|
|
|
820
817
|
action: "View",
|
|
821
818
|
onAction: async () => {
|
|
822
819
|
await u.push({
|
|
823
|
-
name:
|
|
824
|
-
query: { type: [
|
|
820
|
+
name: ve["$connect-QUEUE"],
|
|
821
|
+
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
825
822
|
});
|
|
826
823
|
}
|
|
827
824
|
});
|
|
828
825
|
} else if (o._id) {
|
|
829
|
-
const { members: F, _id:
|
|
830
|
-
await
|
|
826
|
+
const { members: F, _id: b, ...N } = o;
|
|
827
|
+
await Y.update(o._id, N);
|
|
831
828
|
} else
|
|
832
|
-
await
|
|
833
|
-
await
|
|
829
|
+
await Y.create(o);
|
|
830
|
+
await x({ pageSize: 10, pageIndex: 0 }), (n = y.value) == null || n.hideSheet();
|
|
834
831
|
},
|
|
835
832
|
{
|
|
836
833
|
message: "Saving segment",
|
|
@@ -842,21 +839,21 @@ const Nt = {
|
|
|
842
839
|
var n;
|
|
843
840
|
(n = y.value) == null || n.showSheet(o);
|
|
844
841
|
}
|
|
845
|
-
const
|
|
842
|
+
const P = {
|
|
846
843
|
label: c("connect.navigation.queue"),
|
|
847
844
|
value: "queue",
|
|
848
845
|
isPrimary: !1,
|
|
849
846
|
prependIcon: "work_history"
|
|
850
|
-
},
|
|
847
|
+
}, te = {
|
|
851
848
|
label: c("connect.loyalty.segment.default_segments.get_started.action"),
|
|
852
849
|
value: "start-default-segments",
|
|
853
850
|
isPrimary: !1,
|
|
854
851
|
prependIcon: "auto_awesome"
|
|
855
|
-
},
|
|
856
|
-
if (!
|
|
852
|
+
}, oe = z(() => {
|
|
853
|
+
if (!M.isPremium)
|
|
857
854
|
return [];
|
|
858
|
-
const o = [
|
|
859
|
-
return
|
|
855
|
+
const o = [P];
|
|
856
|
+
return q.value && o.push(te), o.push(
|
|
860
857
|
{
|
|
861
858
|
label: c("connect.loyalty.segment.actions.refresh"),
|
|
862
859
|
value: "refresh",
|
|
@@ -870,18 +867,18 @@ const Nt = {
|
|
|
870
867
|
}
|
|
871
868
|
), o;
|
|
872
869
|
});
|
|
873
|
-
function
|
|
870
|
+
function ne(o) {
|
|
874
871
|
switch (o) {
|
|
875
872
|
case "add":
|
|
876
873
|
l();
|
|
877
874
|
break;
|
|
878
875
|
case "refresh":
|
|
879
|
-
|
|
876
|
+
G();
|
|
880
877
|
break;
|
|
881
878
|
case "queue":
|
|
882
879
|
u.push({
|
|
883
|
-
name:
|
|
884
|
-
query: { type: [
|
|
880
|
+
name: ve["$connect-QUEUE"],
|
|
881
|
+
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
885
882
|
});
|
|
886
883
|
break;
|
|
887
884
|
case "start-default-segments":
|
|
@@ -889,34 +886,34 @@ const Nt = {
|
|
|
889
886
|
break;
|
|
890
887
|
}
|
|
891
888
|
}
|
|
892
|
-
return
|
|
893
|
-
const { meta: o } = await
|
|
889
|
+
return Te(async () => {
|
|
890
|
+
const { meta: o } = await ge.read({
|
|
894
891
|
limit: 1,
|
|
895
892
|
skip: 0,
|
|
896
893
|
sortBy: "_id",
|
|
897
894
|
search: void 0,
|
|
898
895
|
descending: !1
|
|
899
896
|
});
|
|
900
|
-
|
|
897
|
+
T.value = o.totalResources ?? 0, await x({ pageSize: 10, pageIndex: 0 }), await M.readPremium(), await M.readLocations();
|
|
901
898
|
}), (o, n) => {
|
|
902
|
-
const F = h("FmPill"),
|
|
903
|
-
return r(), k(
|
|
904
|
-
d(
|
|
899
|
+
const F = h("FmPill"), b = h("FmPageHead"), N = h("FmChip"), K = h("FmIcon"), L = h("FmMenuItem"), C = h("FmMenu"), R = h("FmListItem"), O = h("FmList"), j = h("FmButton"), Q = h("FmCard");
|
|
900
|
+
return r(), k(ee, null, [
|
|
901
|
+
d(b, {
|
|
905
902
|
title: "Segments",
|
|
906
|
-
actions: e(
|
|
907
|
-
"onClick:action": n[0] || (n[0] = (
|
|
903
|
+
actions: e(oe),
|
|
904
|
+
"onClick:action": n[0] || (n[0] = (w) => ne(w))
|
|
908
905
|
}, {
|
|
909
906
|
title: $(() => [
|
|
910
|
-
s("div",
|
|
911
|
-
s("span",
|
|
907
|
+
s("div", Nt, [
|
|
908
|
+
s("span", Rt, E(e(c)("connect.loyalty.segment.title")), 1),
|
|
912
909
|
d(F, { variant: "premium" })
|
|
913
910
|
])
|
|
914
911
|
]),
|
|
915
912
|
_: 1
|
|
916
913
|
}, 8, ["actions"]),
|
|
917
|
-
s("div",
|
|
918
|
-
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(
|
|
919
|
-
d(
|
|
914
|
+
s("div", Bt, [
|
|
915
|
+
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(ee, { key: 0 }, [
|
|
916
|
+
d(we, {
|
|
920
917
|
loading: e(p).isLoading,
|
|
921
918
|
"row-data": e(g),
|
|
922
919
|
"row-count": e(p).totalRows,
|
|
@@ -925,35 +922,35 @@ const Nt = {
|
|
|
925
922
|
"page-count": e(p).pageCount,
|
|
926
923
|
"page-index": e(p).pageIndex,
|
|
927
924
|
"page-size": e(p).pageSize,
|
|
928
|
-
onRowClick: n[1] || (n[1] = (
|
|
929
|
-
l(
|
|
925
|
+
onRowClick: n[1] || (n[1] = (w) => {
|
|
926
|
+
l(w.original);
|
|
930
927
|
}),
|
|
931
|
-
onPageChange: e(
|
|
928
|
+
onPageChange: e(x)
|
|
932
929
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
|
|
933
|
-
d(
|
|
930
|
+
d(O, { class: "w-full hidden xs:!block" }, {
|
|
934
931
|
default: $(() => [
|
|
935
|
-
(r(!0), k(
|
|
936
|
-
key:
|
|
932
|
+
(r(!0), k(ee, null, ue(e(g), (w) => (r(), V(R, {
|
|
933
|
+
key: w._id.toString(),
|
|
937
934
|
tag: "label",
|
|
938
|
-
onClick: (
|
|
935
|
+
onClick: (Z) => l(w)
|
|
939
936
|
}, {
|
|
940
937
|
default: $(() => [
|
|
941
938
|
s("div", null, [
|
|
942
|
-
s("div",
|
|
943
|
-
s("div",
|
|
944
|
-
s("span",
|
|
945
|
-
|
|
939
|
+
s("div", Ut, E((w.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
|
|
940
|
+
s("div", Vt, [
|
|
941
|
+
s("span", Lt, E(m(w)), 1),
|
|
942
|
+
D(w) ? (r(), V(N, {
|
|
946
943
|
key: 0,
|
|
947
|
-
class:
|
|
944
|
+
class: ie(he),
|
|
948
945
|
label: e(c)("connect.loyalty.segment.default_segments.system"),
|
|
949
946
|
compact: ""
|
|
950
947
|
}, null, 8, ["label"])) : H("", !0)
|
|
951
948
|
]),
|
|
952
|
-
s("div",
|
|
949
|
+
s("div", Yt, E(i(w.memberCount)) + "% of customers ", 1)
|
|
953
950
|
])
|
|
954
951
|
]),
|
|
955
952
|
append: $(() => [
|
|
956
|
-
d(
|
|
953
|
+
d(C, { "stop-click-propagation": !0 }, {
|
|
957
954
|
"menu-button": $(() => [
|
|
958
955
|
d(K, { name: "more_vert" })
|
|
959
956
|
]),
|
|
@@ -961,13 +958,13 @@ const Nt = {
|
|
|
961
958
|
d(L, {
|
|
962
959
|
class: "fm-typo-en-body-md-400",
|
|
963
960
|
label: "Export",
|
|
964
|
-
"onUpdate:modelValue": (
|
|
961
|
+
"onUpdate:modelValue": (Z) => Z && W(w)
|
|
965
962
|
}, null, 8, ["onUpdate:modelValue"]),
|
|
966
|
-
|
|
963
|
+
D(w) ? H("", !0) : (r(), V(L, {
|
|
967
964
|
key: 0,
|
|
968
965
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400",
|
|
969
966
|
label: "Remove",
|
|
970
|
-
"onUpdate:modelValue": (
|
|
967
|
+
"onUpdate:modelValue": (Z) => Z && J(w)
|
|
971
968
|
}, null, 8, ["onUpdate:modelValue"]))
|
|
972
969
|
]),
|
|
973
970
|
_: 2
|
|
@@ -985,26 +982,26 @@ const Nt = {
|
|
|
985
982
|
}, {
|
|
986
983
|
default: $(() => [
|
|
987
984
|
n[3] || (n[3] = s("img", {
|
|
988
|
-
src:
|
|
985
|
+
src: De,
|
|
989
986
|
class: "aspect-square w-[150px]"
|
|
990
987
|
}, null, -1)),
|
|
991
|
-
s("div",
|
|
992
|
-
s("div",
|
|
993
|
-
s("div",
|
|
988
|
+
s("div", zt, [
|
|
989
|
+
s("div", Ot, E(e(c)("connect.loyalty.segment.default_segments.get_started.title")), 1),
|
|
990
|
+
s("div", jt, E(e(c)(
|
|
994
991
|
"connect.loyalty.segment.default_segments.get_started.description"
|
|
995
992
|
)), 1)
|
|
996
993
|
]),
|
|
997
|
-
d(
|
|
994
|
+
d(j, {
|
|
998
995
|
variant: "primary",
|
|
999
996
|
label: e(c)("connect.loyalty.segment.default_segments.get_started.action"),
|
|
1000
|
-
disabled: !e(
|
|
997
|
+
disabled: !e(M).isPremium,
|
|
1001
998
|
icon: "auto_awesome",
|
|
1002
|
-
onClick: n[2] || (n[2] = (
|
|
999
|
+
onClick: n[2] || (n[2] = (w) => I())
|
|
1003
1000
|
}, null, 8, ["label", "disabled"])
|
|
1004
1001
|
]),
|
|
1005
1002
|
_: 1
|
|
1006
1003
|
})),
|
|
1007
|
-
d(
|
|
1004
|
+
d($t, {
|
|
1008
1005
|
ref_key: "sheetRef",
|
|
1009
1006
|
ref: y,
|
|
1010
1007
|
"onUpdate:modelValue": v
|
|
@@ -1015,5 +1012,5 @@ const Nt = {
|
|
|
1015
1012
|
}
|
|
1016
1013
|
});
|
|
1017
1014
|
export {
|
|
1018
|
-
|
|
1015
|
+
Io as default
|
|
1019
1016
|
};
|