@feedmepos/mf-connect 0.1.115-dev → 0.1.115-prod
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/README.md +1 -66
- package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
- package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
- package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
- package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
- package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
- package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
- package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
- package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
- package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
- package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
- package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
- package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
- package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
- package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
- package/dist/Marketing-BKK45Eve.js +236 -0
- package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
- package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
- package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
- package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
- package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
- package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
- package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
- package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
- package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
- package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
- package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
- package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
- package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
- package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
- package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
- package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
- package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
- package/dist/Setting-BnFRI0Se.js +2037 -0
- package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
- package/dist/Settings-BvT8_tkQ.js +179 -0
- package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
- package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
- package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
- package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
- package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
- package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
- package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
- package/dist/app.js +3 -4
- package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
- package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
- package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
- package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
- package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
- package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
- package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
- package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
- package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
- package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
- package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
- package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
- package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
- package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
- package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
- package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
- package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
- package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
- package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
- package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
- package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
- package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
- package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
- package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
- package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
- package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
- package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
- package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
- package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
- package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
- package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
- package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
- package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
- package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
- package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
- package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
- package/dist/objectid-DEMM_jdR.js +145 -0
- package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
- package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
- package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
- package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
- package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
- package/dist/rule-builder-Deufb6h_.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DeebIqJ_.js +236 -0
- package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
- package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
- package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
- package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
- package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
- package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
- package/dist/vue-i18n-Cze706-f.js +2365 -0
- package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
- package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BPpdm96t.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
- package/dist/Grab-BWzdN_cd.js +0 -301
- package/dist/MainLayout-DwnjGXh6.js +0 -4
- package/dist/Marketing-DCco__2F.js +0 -273
- package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
- package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
- package/dist/Setting-CDM4RhLW.js +0 -574
- package/dist/Settings-D-0tvZRr.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
- package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
- package/dist/WhatsappBot-Cl64wG_F.js +0 -876
- package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
- package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
- package/dist/WhatsappLayout-C639d2HP.js +0 -21
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
- package/dist/browser-BSAOEeIM.js +0 -1478
- package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
- package/dist/feature-flag-Bo-k5sIG.js +0 -50
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/index-C-iwb2Ln.js +0 -109
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/index-DQ8JJhxs.js +0 -74
- package/dist/objectid-C-wocWKI.js +0 -145
- package/dist/template-BZyFhr73.js +0 -188
- package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
- package/dist/vue-i18n-DWGiC_vs.js +0 -2365
|
@@ -1,67 +1,66 @@
|
|
|
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
|
|
10
|
-
import "./index-
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { _ as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { F as Ke } from "./FileSaver.min-CCXIBm58.js";
|
|
1
|
+
import { defineComponent as le, ref as W, 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 Z, renderList as me, createBlock as V, toDisplayString as D, normalizeClass as ce, computed as O, onMounted as we, isRef as Me, createSlots as Ee, h as B, onBeforeMount as De } from "vue";
|
|
2
|
+
import { _ as $e } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { n as Ae, p as Re } from "./plugins-DQNOWwRC.js";
|
|
4
|
+
import { u as Pe } from "./loading-BvHm1m3K.js";
|
|
5
|
+
import { FmButtonVariant as re, useSnackbar as Ne, components as ae } from "@feedmepos/ui-library";
|
|
6
|
+
import { u as Fe, _ as Ce } from "./usePagination-QT552XyF.js";
|
|
7
|
+
import { u as pe } from "./vue-i18n-Cze706-f.js";
|
|
8
|
+
import { g as Be, h as U, D as Ue, i as Ve } from "./index-IZRfmmde.js";
|
|
9
|
+
import "./index-CPODug8b.js";
|
|
10
|
+
import { F as ye, z as Le } from "./index-BYI9ttxy.js";
|
|
11
|
+
import { a as ge } from "./index-CqOCJTeR.js";
|
|
12
|
+
import "./index-BW6eb3n6.js";
|
|
13
|
+
import "./index-D4d3l0gw.js";
|
|
14
|
+
import "./index-B8yWVB8P.js";
|
|
15
|
+
import { u as de, w as ke } from "./xlsx-DAczoc8y.js";
|
|
16
|
+
import { e as Ye, M as ze } from "./email-addresses-De5PGOY4.js";
|
|
17
|
+
import { Z as Oe } from "./zod-Aj-GuVQL.js";
|
|
18
|
+
import { u as je } from "./app-wDQR6dpb.js";
|
|
19
|
+
import { R as ve } from "./rule-builder-Deufb6h_.js";
|
|
20
|
+
import { _ as qe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js";
|
|
21
|
+
import { _ as Ge } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js";
|
|
22
|
+
import { u as Ke, v as He, w as Je } from "./index.esm2017-AVbZ9btd.js";
|
|
23
|
+
import { F as Qe } from "./FileSaver.min-CFVQKaC-.js";
|
|
25
24
|
import { h as se } from "./moment-D7p2TMB-.js";
|
|
26
|
-
import { s as
|
|
27
|
-
import { o as
|
|
28
|
-
import { J as
|
|
29
|
-
import { u as
|
|
30
|
-
import { f as
|
|
31
|
-
import { t as
|
|
32
|
-
import "./index-
|
|
33
|
-
import { useRouter as
|
|
34
|
-
import { m as
|
|
35
|
-
import { R as
|
|
36
|
-
const
|
|
37
|
-
_id:
|
|
38
|
-
business:
|
|
39
|
-
file:
|
|
25
|
+
import { s as z, u as We } from "./membership-D-pZS634.js";
|
|
26
|
+
import { o as Ze } from "./objectId-dwaoBfJX.js";
|
|
27
|
+
import { J as Xe } from "./JsonViewer-v8_C7l5N.js";
|
|
28
|
+
import { u as Ie } from "./business-Ce8vq3wQ.js";
|
|
29
|
+
import { f as et } from "./number-DJ6ncfT6.js";
|
|
30
|
+
import { t as tt } from "./money-D4skwMkD.js";
|
|
31
|
+
import "./index-B8meeQoD.js";
|
|
32
|
+
import { useRouter as ot } from "vue-router";
|
|
33
|
+
import { m as _e } from "./index-__UT3_Ey.js";
|
|
34
|
+
import { R as Se } from "./app-DdNKsn2Q.js";
|
|
35
|
+
const nt = Be.extend({
|
|
36
|
+
_id: ye.optional(),
|
|
37
|
+
business: ye.optional(),
|
|
38
|
+
file: Le.any().nullish()
|
|
40
39
|
});
|
|
41
|
-
var
|
|
42
|
-
const
|
|
40
|
+
var at = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", importFilesBucketUrl: "feedme-253402.appspot.com", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", featureFlagApiKey: "6GhcttsJ9Rj9cTevcdrpin" };
|
|
41
|
+
const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
43
42
|
key: 0,
|
|
44
|
-
class: /* @__PURE__ */
|
|
43
|
+
class: /* @__PURE__ */ ce([
|
|
45
44
|
"p-16 pl-24 space-x-8",
|
|
46
45
|
"bg-fm-color-primary-oats rounded-lg",
|
|
47
46
|
"flex items-center",
|
|
48
47
|
"justify-between"
|
|
49
48
|
])
|
|
50
|
-
},
|
|
49
|
+
}, it = { class: "flex justify-end" }, ct = {
|
|
51
50
|
key: 1,
|
|
52
|
-
class: /* @__PURE__ */
|
|
51
|
+
class: /* @__PURE__ */ ce([
|
|
53
52
|
"flex items-center",
|
|
54
53
|
"border border-fm-color-neutral-gray-300",
|
|
55
54
|
"p-16 space-x-16 rounded-md"
|
|
56
55
|
])
|
|
57
|
-
},
|
|
56
|
+
}, rt = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, dt = /* @__PURE__ */ le({
|
|
58
57
|
__name: "ImportSegment",
|
|
59
58
|
props: {
|
|
60
59
|
importFile: {}
|
|
61
60
|
},
|
|
62
61
|
emits: ["update:file"],
|
|
63
62
|
setup(t, { emit: f }) {
|
|
64
|
-
const c = t,
|
|
63
|
+
const c = t, T = f, { t: b } = pe(), _ = W(null), u = W(null), M = ["Id"], E = [
|
|
65
64
|
{
|
|
66
65
|
label: "CSV",
|
|
67
66
|
icon: "csv",
|
|
@@ -76,49 +75,49 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
76
75
|
async function a() {
|
|
77
76
|
if (c.importFile)
|
|
78
77
|
try {
|
|
79
|
-
const y =
|
|
78
|
+
const y = Ke(void 0, at.importFilesBucketUrl), p = He(y, c.importFile), g = await Je(p);
|
|
80
79
|
window.open(g, "_blank");
|
|
81
80
|
} catch (y) {
|
|
82
|
-
console.log(y),
|
|
81
|
+
console.log(y), Ae.error("Failed to download uploaded file");
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
async function m(y) {
|
|
86
85
|
switch (y) {
|
|
87
86
|
case "csv":
|
|
88
|
-
const p = new Blob([
|
|
87
|
+
const p = new Blob([M.join(",")], {
|
|
89
88
|
type: "text/csv;charset=utf-8;"
|
|
90
89
|
});
|
|
91
|
-
|
|
90
|
+
Qe.saveAs(p, "ImportSegmentTemplate.csv");
|
|
92
91
|
break;
|
|
93
92
|
case "xlsx":
|
|
94
|
-
const g =
|
|
95
|
-
|
|
93
|
+
const g = de.aoa_to_sheet([M]), S = de.book_new();
|
|
94
|
+
de.book_append_sheet(S, g, "Sheet1"), ke(S, "ImportSegmentTemplate.xlsx");
|
|
96
95
|
break;
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
function i(y) {
|
|
100
|
-
_.value = y,
|
|
99
|
+
_.value = y, T("update:file", _.value);
|
|
101
100
|
}
|
|
102
101
|
function A(y) {
|
|
103
|
-
var g,
|
|
104
|
-
const p = ((
|
|
102
|
+
var g, S;
|
|
103
|
+
const p = ((S = (g = y.target) == null ? void 0 : g.files) == null ? void 0 : S[0]) ?? null;
|
|
105
104
|
i(p);
|
|
106
105
|
}
|
|
107
106
|
return (y, p) => {
|
|
108
|
-
const g = h("FmButton"),
|
|
109
|
-
return r(), k("div",
|
|
107
|
+
const g = h("FmButton"), S = h("FmMenuItem"), j = h("FmMenu"), q = h("FmDropField");
|
|
108
|
+
return r(), k("div", st, [
|
|
110
109
|
p[2] || (p[2] = s("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
|
|
111
|
-
t.importFile ? (r(), k("div",
|
|
110
|
+
t.importFile ? (r(), k("div", lt, [
|
|
112
111
|
d(g, {
|
|
113
|
-
label: e(
|
|
114
|
-
variant: e(
|
|
112
|
+
label: e(b)("View uploaded file"),
|
|
113
|
+
variant: e(re).Plain,
|
|
115
114
|
icon: "file_present",
|
|
116
115
|
onClick: a
|
|
117
116
|
}, null, 8, ["label", "variant"])
|
|
118
117
|
])) : H("", !0),
|
|
119
118
|
s("div", null, [
|
|
120
|
-
s("div",
|
|
121
|
-
d(
|
|
119
|
+
s("div", it, [
|
|
120
|
+
d(j, { class: "" }, {
|
|
122
121
|
"menu-button": $(() => [
|
|
123
122
|
d(g, {
|
|
124
123
|
variant: "tertiary",
|
|
@@ -127,31 +126,31 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
127
126
|
})
|
|
128
127
|
]),
|
|
129
128
|
default: $(() => [
|
|
130
|
-
(r(), k(
|
|
129
|
+
(r(), k(Z, null, me(E, (I) => d(S, {
|
|
131
130
|
key: I.value,
|
|
132
131
|
icon: I.icon,
|
|
133
132
|
label: I.label,
|
|
134
|
-
onClick: (
|
|
133
|
+
onClick: (G) => m(I.value),
|
|
135
134
|
selectable: ""
|
|
136
135
|
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
137
136
|
]),
|
|
138
137
|
_: 1
|
|
139
138
|
})
|
|
140
139
|
]),
|
|
141
|
-
_.value ? (r(), k("div",
|
|
140
|
+
_.value ? (r(), k("div", ct, [
|
|
142
141
|
d(g, {
|
|
143
|
-
variant: e(
|
|
142
|
+
variant: e(re).Tertiary,
|
|
144
143
|
"prepend-icon": "attach_file"
|
|
145
144
|
}, null, 8, ["variant"]),
|
|
146
|
-
s("p",
|
|
145
|
+
s("p", rt, D(_.value.name), 1),
|
|
147
146
|
s("label", {
|
|
148
147
|
ref_key: "fileLabelRef",
|
|
149
148
|
ref: u,
|
|
150
149
|
htmlFor: "file"
|
|
151
150
|
}, [
|
|
152
151
|
d(g, {
|
|
153
|
-
variant: e(
|
|
154
|
-
label: e(
|
|
152
|
+
variant: e(re).Plain,
|
|
153
|
+
label: e(b)("Replace File"),
|
|
155
154
|
onClick: p[1] || (p[1] = () => {
|
|
156
155
|
var I;
|
|
157
156
|
return (I = u.value) == null ? void 0 : I.click();
|
|
@@ -166,7 +165,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
166
165
|
onChange: A
|
|
167
166
|
}, null, 32)
|
|
168
167
|
], 512)
|
|
169
|
-
])) : (r(), V(
|
|
168
|
+
])) : (r(), V(q, {
|
|
170
169
|
key: 0,
|
|
171
170
|
onFileUpload: p[0] || (p[0] = (I) => i(I)),
|
|
172
171
|
accept: ".csv, .xlsx",
|
|
@@ -176,18 +175,18 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
176
175
|
]);
|
|
177
176
|
};
|
|
178
177
|
}
|
|
179
|
-
}),
|
|
178
|
+
}), ut = { class: "space-y-16 pr-12" }, mt = { class: "fm-typo-en-title-md-800" }, pt = { class: "flex space-x-8" }, ft = { class: "fm-typo-en-title-md-800 text-fm-color-primary" }, yt = { class: "text-fm-color-typo-secondary" }, he = /* @__PURE__ */ le({
|
|
180
179
|
__name: "ReviewSegment",
|
|
181
180
|
props: {
|
|
182
181
|
title: {},
|
|
183
182
|
segment: {}
|
|
184
183
|
},
|
|
185
184
|
setup(t) {
|
|
186
|
-
const f = t, c =
|
|
185
|
+
const f = t, c = O(
|
|
187
186
|
() => f.segment.memberCount ?? f.segment.members.length
|
|
188
|
-
),
|
|
187
|
+
), T = O(
|
|
189
188
|
() => f.segment.lastUpdated ? se(f.segment.lastUpdated).format("DD MMM YYYY") : "Not refreshed yet"
|
|
190
|
-
),
|
|
189
|
+
), b = [
|
|
191
190
|
{
|
|
192
191
|
header: "Name",
|
|
193
192
|
accessorFn: (i) => i.name
|
|
@@ -198,7 +197,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
198
197
|
},
|
|
199
198
|
{
|
|
200
199
|
header: "Customer Since",
|
|
201
|
-
accessorFn: (i) => se(
|
|
200
|
+
accessorFn: (i) => se(Ze(i._id.toString())).format("DD MMM YYYY")
|
|
202
201
|
},
|
|
203
202
|
{
|
|
204
203
|
header: "Phone",
|
|
@@ -214,7 +213,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
214
213
|
}
|
|
215
214
|
];
|
|
216
215
|
async function _(i) {
|
|
217
|
-
return f.segment._id ? (console.log(i), await
|
|
216
|
+
return f.segment._id ? (console.log(i), await z.paginateSegmentUsers(
|
|
218
217
|
f.segment._id,
|
|
219
218
|
i
|
|
220
219
|
)) : {
|
|
@@ -228,32 +227,32 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
228
227
|
}
|
|
229
228
|
};
|
|
230
229
|
}
|
|
231
|
-
const { tableMeta: u, rowData:
|
|
232
|
-
return
|
|
230
|
+
const { tableMeta: u, rowData: M, onSort: E, debouncedFetchData: a, onSearch: m } = Fe(_);
|
|
231
|
+
return we(async () => {
|
|
233
232
|
await a();
|
|
234
|
-
}), (i, A) => (r(), k("div",
|
|
235
|
-
s("div",
|
|
236
|
-
s("div",
|
|
237
|
-
s("div",
|
|
238
|
-
s("div",
|
|
233
|
+
}), (i, A) => (r(), k("div", ut, [
|
|
234
|
+
s("div", mt, D(f.title), 1),
|
|
235
|
+
s("div", pt, [
|
|
236
|
+
s("div", ft, D(e(c)), 1),
|
|
237
|
+
s("div", yt, [
|
|
239
238
|
A[1] || (A[1] = s("div", null, "contacts in your segment", -1)),
|
|
240
|
-
s("div", null, "as of " +
|
|
239
|
+
s("div", null, "as of " + D(e(T)), 1)
|
|
241
240
|
])
|
|
242
241
|
]),
|
|
243
|
-
d(
|
|
242
|
+
d(Ce, {
|
|
244
243
|
loading: e(u).isLoading,
|
|
245
|
-
"row-data": e(
|
|
244
|
+
"row-data": e(M),
|
|
246
245
|
"row-count": e(u).totalRows,
|
|
247
|
-
"column-defs":
|
|
246
|
+
"column-defs": b,
|
|
248
247
|
"page-size": e(u).pageSize,
|
|
249
248
|
"page-count": e(u).pageCount,
|
|
250
249
|
"page-index": e(u).pageIndex,
|
|
251
|
-
onSortChange: e(
|
|
250
|
+
onSortChange: e(E),
|
|
252
251
|
onPageChange: A[0] || (A[0] = (y) => e(a)({ pageSize: y.pageSize, pageIndex: y.pageIndex }))
|
|
253
252
|
}, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
|
|
254
253
|
]));
|
|
255
254
|
}
|
|
256
|
-
}),
|
|
255
|
+
}), gt = { class: "space-y-24" }, vt = { class: "grid grid-cols-2 gap-16" }, _t = { class: "fm-typo-en-title-sm-800" }, St = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ht = /* @__PURE__ */ le({
|
|
257
256
|
__name: "SegmentTypeOption",
|
|
258
257
|
props: {
|
|
259
258
|
modelValue: {},
|
|
@@ -261,7 +260,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
261
260
|
},
|
|
262
261
|
emits: ["update:model-value"],
|
|
263
262
|
setup(t, { emit: f }) {
|
|
264
|
-
const c = t,
|
|
263
|
+
const c = t, T = f, b = [
|
|
265
264
|
{
|
|
266
265
|
label: "Dynamic",
|
|
267
266
|
sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
|
|
@@ -274,16 +273,16 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
274
273
|
}
|
|
275
274
|
];
|
|
276
275
|
function _(u) {
|
|
277
|
-
u !== c.modelValue &&
|
|
276
|
+
u !== c.modelValue && T("update:model-value", u);
|
|
278
277
|
}
|
|
279
|
-
return (u,
|
|
280
|
-
const
|
|
281
|
-
return r(), k("div",
|
|
282
|
-
s("div",
|
|
283
|
-
(r(), k(
|
|
278
|
+
return (u, M) => {
|
|
279
|
+
const E = h("FmCard"), a = h("FmHelperText");
|
|
280
|
+
return r(), k("div", gt, [
|
|
281
|
+
s("div", vt, [
|
|
282
|
+
(r(), k(Z, null, me(b, (m) => d(E, {
|
|
284
283
|
variant: "outlined",
|
|
285
|
-
class:
|
|
286
|
-
"col-span-2":
|
|
284
|
+
class: ce(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
285
|
+
"col-span-2": b.length == 1,
|
|
287
286
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": t.modelValue === m.value,
|
|
288
287
|
"hover:bg-fm-color-opacity-sm": t.modelValue !== m.value
|
|
289
288
|
}]),
|
|
@@ -291,8 +290,8 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
291
290
|
key: m.value
|
|
292
291
|
}, {
|
|
293
292
|
default: $(() => [
|
|
294
|
-
s("div",
|
|
295
|
-
s("div",
|
|
293
|
+
s("div", _t, D(m.label), 1),
|
|
294
|
+
s("div", St, D(m.sublabel), 1)
|
|
296
295
|
]),
|
|
297
296
|
_: 2
|
|
298
297
|
}, 1032, ["class", "onClick"])), 64))
|
|
@@ -306,43 +305,43 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
306
305
|
]);
|
|
307
306
|
};
|
|
308
307
|
}
|
|
309
|
-
}), xt = { class: "flex items-center gap-x-8" },
|
|
308
|
+
}), xt = { class: "flex items-center gap-x-8" }, bt = {
|
|
310
309
|
key: 0,
|
|
311
310
|
class: "space-y-16 pr-12"
|
|
312
|
-
},
|
|
311
|
+
}, wt = {
|
|
313
312
|
key: 0,
|
|
314
313
|
class: "flex flex-col gap-12"
|
|
315
|
-
},
|
|
314
|
+
}, Ft = { class: "flex flex-wrap items-center gap-8" }, Ct = { class: "fm-typo-en-title-sm-800" }, kt = { class: "flex flex-col gap-4" }, It = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mt = {
|
|
316
315
|
key: 2,
|
|
317
316
|
class: "flex flex-col space-y-16"
|
|
318
|
-
},
|
|
317
|
+
}, Et = {
|
|
319
318
|
key: 3,
|
|
320
319
|
class: "flex flex-col space-y-16"
|
|
321
|
-
},
|
|
320
|
+
}, Dt = {
|
|
322
321
|
key: 4,
|
|
323
322
|
class: "flex flex-col space-y-16"
|
|
324
|
-
},
|
|
323
|
+
}, $t = {
|
|
325
324
|
key: 5,
|
|
326
325
|
class: "flex flex-col space-y-16"
|
|
327
|
-
},
|
|
326
|
+
}, At = { class: "flex items-center gap-8" }, Rt = /* @__PURE__ */ le({
|
|
328
327
|
__name: "SegmentSheet",
|
|
329
328
|
emits: ["update:model-value"],
|
|
330
329
|
setup(t, { expose: f, emit: c }) {
|
|
331
|
-
const
|
|
330
|
+
const T = je(), { t: b } = pe(), _ = W(!1), u = W(!1), M = {
|
|
332
331
|
name: "",
|
|
333
332
|
isActive: !0,
|
|
334
333
|
type: U.enum.DYNAMIC,
|
|
335
|
-
rule:
|
|
334
|
+
rule: ve.scaffoldGroup(),
|
|
336
335
|
members: []
|
|
337
|
-
},
|
|
336
|
+
}, E = nt, a = W(M), m = O(() => !!a.value.defaultKey), i = O(
|
|
338
337
|
() => a.value.defaultKey ? `connect.loyalty.segment.default_segments.${a.value.defaultKey.toLowerCase()}` : void 0
|
|
339
|
-
), A =
|
|
340
|
-
() => i.value ?
|
|
341
|
-
), y =
|
|
338
|
+
), A = O(
|
|
339
|
+
() => i.value ? b(`${i.value}.name`) : a.value.name
|
|
340
|
+
), y = O(() => {
|
|
342
341
|
const v = a.value.defaultKey;
|
|
343
|
-
return v ?
|
|
344
|
-
}), p =
|
|
345
|
-
const v =
|
|
342
|
+
return v ? b(Ue[v]) : a.value.description ?? "";
|
|
343
|
+
}), p = O(() => {
|
|
344
|
+
const v = E.safeParse(a.value);
|
|
346
345
|
return v.success ? [] : v.error.errors;
|
|
347
346
|
});
|
|
348
347
|
function g(v) {
|
|
@@ -350,67 +349,67 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
350
349
|
...v,
|
|
351
350
|
isActive: v.isActive !== !1,
|
|
352
351
|
type: v.type ?? (v.importFile ? U.enum.STATIC : U.enum.DYNAMIC)
|
|
353
|
-
} : a.value = { ...
|
|
352
|
+
} : a.value = { ...M };
|
|
354
353
|
}
|
|
355
|
-
function
|
|
354
|
+
function S() {
|
|
356
355
|
_.value = !1;
|
|
357
356
|
}
|
|
358
|
-
async function
|
|
359
|
-
|
|
357
|
+
async function j() {
|
|
358
|
+
E.safeParse(a.value).success && (u.value = !0);
|
|
360
359
|
}
|
|
361
|
-
function
|
|
362
|
-
v === U.enum.STATIC ?
|
|
360
|
+
function q(v) {
|
|
361
|
+
v === U.enum.STATIC ? S() : u.value = !1;
|
|
363
362
|
}
|
|
364
363
|
async function I() {
|
|
365
|
-
a.value.type === U.enum.STATIC ? (a.value.rule =
|
|
364
|
+
a.value.type === U.enum.STATIC ? (a.value.rule = ve.scaffoldGroup(), a.value.isActive = !0) : a.value.file = void 0, J("update:model-value", a.value);
|
|
366
365
|
}
|
|
367
|
-
async function
|
|
366
|
+
async function G(v) {
|
|
368
367
|
a.value.type = v;
|
|
369
368
|
}
|
|
370
|
-
|
|
369
|
+
we(async () => {
|
|
371
370
|
});
|
|
372
|
-
const
|
|
371
|
+
const J = c;
|
|
373
372
|
return f({
|
|
374
373
|
showSheet: g,
|
|
375
|
-
hideSheet:
|
|
374
|
+
hideSheet: S
|
|
376
375
|
}), (v, l) => {
|
|
377
|
-
const
|
|
376
|
+
const R = h("FmButton"), X = h("FmChip"), ee = h("FmCard"), te = h("FmSwitch"), o = h("FmSideSheet");
|
|
378
377
|
return r(), V(o, {
|
|
379
378
|
modelValue: e(_),
|
|
380
|
-
"onUpdate:modelValue": l[9] || (l[9] = (n) =>
|
|
381
|
-
header: e(m) ? e(
|
|
379
|
+
"onUpdate:modelValue": l[9] || (l[9] = (n) => Me(_) ? _.value = n : null),
|
|
380
|
+
header: e(m) ? e(b)("connect.loyalty.segment.default_segments.default_segment") : e(a)._id ? "Edit segment" : "Add segment",
|
|
382
381
|
"dismiss-away": "",
|
|
383
382
|
"close-button": !0,
|
|
384
383
|
"max-width": 1100
|
|
385
|
-
},
|
|
384
|
+
}, Ee({
|
|
386
385
|
"side-sheet-footer": $(() => [
|
|
387
|
-
s("div",
|
|
388
|
-
e(m) ? (r(), V(
|
|
386
|
+
s("div", At, [
|
|
387
|
+
e(m) ? (r(), V(R, {
|
|
389
388
|
key: 0,
|
|
390
|
-
label: e(
|
|
391
|
-
onClick: l[6] || (l[6] = (n) =>
|
|
389
|
+
label: e(b)("connect.loyalty.segment.default_segments.close"),
|
|
390
|
+
onClick: l[6] || (l[6] = (n) => S()),
|
|
392
391
|
variant: "tertiary"
|
|
393
|
-
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(
|
|
394
|
-
d(
|
|
392
|
+
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(Z, { key: 1 }, [
|
|
393
|
+
d(R, {
|
|
395
394
|
label: "Save Segment",
|
|
396
395
|
onClick: I,
|
|
397
|
-
loading: e(
|
|
398
|
-
disabled: e(p).length > 0 || e(
|
|
396
|
+
loading: e(T).isLoading,
|
|
397
|
+
disabled: e(p).length > 0 || e(T).isLoading
|
|
399
398
|
}, null, 8, ["loading", "disabled"]),
|
|
400
|
-
d(
|
|
399
|
+
d(R, {
|
|
401
400
|
label: "Cancel",
|
|
402
|
-
onClick: l[7] || (l[7] = (n) =>
|
|
401
|
+
onClick: l[7] || (l[7] = (n) => q(e(a).type)),
|
|
403
402
|
variant: "tertiary"
|
|
404
403
|
})
|
|
405
|
-
], 64)) : (r(), k(
|
|
406
|
-
d(
|
|
404
|
+
], 64)) : (r(), k(Z, { key: 2 }, [
|
|
405
|
+
d(R, {
|
|
407
406
|
label: "Review Segment",
|
|
408
|
-
disabled: e(p).length > 0 || e(
|
|
409
|
-
onClick:
|
|
407
|
+
disabled: e(p).length > 0 || e(T).isLoading,
|
|
408
|
+
onClick: j
|
|
410
409
|
}, null, 8, ["disabled"]),
|
|
411
|
-
d(
|
|
410
|
+
d(R, {
|
|
412
411
|
label: "Cancel",
|
|
413
|
-
onClick: l[8] || (l[8] = (n) =>
|
|
412
|
+
onClick: l[8] || (l[8] = (n) => S()),
|
|
414
413
|
variant: "tertiary"
|
|
415
414
|
})
|
|
416
415
|
], 64))
|
|
@@ -419,80 +418,80 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
419
418
|
default: $(() => {
|
|
420
419
|
var n, F;
|
|
421
420
|
return [
|
|
422
|
-
d(
|
|
423
|
-
e(u) ? (r(), V(
|
|
421
|
+
d(Xe, { json: e(a) }, null, 8, ["json"]),
|
|
422
|
+
e(u) ? (r(), V(he, {
|
|
424
423
|
key: 1,
|
|
425
424
|
title: e(a).name,
|
|
426
425
|
segment: e(a)
|
|
427
|
-
}, null, 8, ["title", "segment"])) : (r(), k("div",
|
|
428
|
-
e(m) ? (r(), k("div",
|
|
429
|
-
s("div",
|
|
430
|
-
s("div",
|
|
431
|
-
d(
|
|
432
|
-
label: e(
|
|
426
|
+
}, null, 8, ["title", "segment"])) : (r(), k("div", bt, [
|
|
427
|
+
e(m) ? (r(), k("div", wt, [
|
|
428
|
+
s("div", Ft, [
|
|
429
|
+
s("div", Ct, D(e(A)), 1),
|
|
430
|
+
d(X, {
|
|
431
|
+
label: e(b)("connect.loyalty.segment.default_segments.system"),
|
|
433
432
|
compact: "",
|
|
434
433
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100"
|
|
435
434
|
}, null, 8, ["label"])
|
|
436
435
|
]),
|
|
437
|
-
d(
|
|
436
|
+
d(ee, {
|
|
438
437
|
variant: "outlined",
|
|
439
438
|
class: "p-16"
|
|
440
439
|
}, {
|
|
441
440
|
default: $(() => [
|
|
442
|
-
s("div",
|
|
443
|
-
s("div",
|
|
444
|
-
s("div",
|
|
441
|
+
s("div", kt, [
|
|
442
|
+
s("div", It, D(e(b)("connect.loyalty.segment.default_segments.description")), 1),
|
|
443
|
+
s("div", Tt, D(e(y)), 1)
|
|
445
444
|
])
|
|
446
445
|
]),
|
|
447
446
|
_: 1
|
|
448
447
|
})
|
|
449
|
-
])) : (r(), V(
|
|
448
|
+
])) : (r(), V(qe, {
|
|
450
449
|
key: 1,
|
|
451
450
|
modelValue: e(a).name,
|
|
452
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
451
|
+
"onUpdate:modelValue": l[1] || (l[1] = (w) => e(a).name = w),
|
|
453
452
|
label: "Segment title",
|
|
454
|
-
schema: e(
|
|
453
|
+
schema: e(Oe).typeAtPath(e(E), "name")
|
|
455
454
|
}, null, 8, ["modelValue", "schema"])),
|
|
456
|
-
e(m) ? H("", !0) : (r(), k("div",
|
|
455
|
+
e(m) ? H("", !0) : (r(), k("div", Mt, [
|
|
457
456
|
l[11] || (l[11] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
|
|
458
|
-
d(
|
|
457
|
+
d(ht, {
|
|
459
458
|
"model-value": e(a).type,
|
|
460
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
461
|
-
|
|
459
|
+
"onUpdate:modelValue": l[2] || (l[2] = (w) => {
|
|
460
|
+
G(w);
|
|
462
461
|
})
|
|
463
462
|
}, null, 8, ["model-value"])
|
|
464
463
|
])),
|
|
465
|
-
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div",
|
|
464
|
+
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div", Et, [
|
|
466
465
|
l[12] || (l[12] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
|
|
467
|
-
d(
|
|
466
|
+
d(Ge, {
|
|
468
467
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
469
468
|
includeOnly: "user",
|
|
470
469
|
"model-value": (n = e(a)) == null ? void 0 : n.rule,
|
|
471
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
472
|
-
e(a).rule =
|
|
470
|
+
"onUpdate:modelValue": l[3] || (l[3] = (w) => {
|
|
471
|
+
e(a).rule = w;
|
|
473
472
|
})
|
|
474
473
|
}, null, 8, ["model-value"])
|
|
475
|
-
])) : e(m) ? H("", !0) : (r(), k("div",
|
|
476
|
-
d(
|
|
474
|
+
])) : e(m) ? H("", !0) : (r(), k("div", Dt, [
|
|
475
|
+
d(dt, {
|
|
477
476
|
importFile: e(a).importFile,
|
|
478
|
-
"onUpdate:file": l[4] || (l[4] = (
|
|
479
|
-
e(a).file =
|
|
477
|
+
"onUpdate:file": l[4] || (l[4] = (w) => {
|
|
478
|
+
e(a).file = w;
|
|
480
479
|
})
|
|
481
480
|
}, null, 8, ["importFile"])
|
|
482
481
|
])),
|
|
483
|
-
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div",
|
|
482
|
+
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div", $t, [
|
|
484
483
|
l[13] || (l[13] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
|
|
485
|
-
d(
|
|
484
|
+
d(te, {
|
|
486
485
|
"model-value": e(a).isActive ?? !0,
|
|
487
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
486
|
+
"onUpdate:modelValue": l[5] || (l[5] = (w) => e(a).isActive = w),
|
|
488
487
|
label: "Active",
|
|
489
488
|
sublabel: "When enabled, this will recalculate the segment statistics daily.",
|
|
490
489
|
"label-placement": "right"
|
|
491
490
|
}, null, 8, ["model-value"])
|
|
492
491
|
])) : H("", !0),
|
|
493
|
-
e(m) ? (r(), V(
|
|
492
|
+
e(m) ? (r(), V(he, {
|
|
494
493
|
key: (F = e(a)._id) == null ? void 0 : F.toString(),
|
|
495
|
-
title: e(
|
|
494
|
+
title: e(b)("connect.loyalty.segment.default_segments.members"),
|
|
496
495
|
segment: e(a)
|
|
497
496
|
}, null, 8, ["title", "segment"])) : H("", !0)
|
|
498
497
|
]))
|
|
@@ -504,7 +503,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
504
503
|
name: "side-sheet-header",
|
|
505
504
|
fn: $(() => [
|
|
506
505
|
s("div", xt, [
|
|
507
|
-
d(
|
|
506
|
+
d(R, {
|
|
508
507
|
icon: "arrow_back",
|
|
509
508
|
variant: "tertiary",
|
|
510
509
|
onClick: l[0] || (l[0] = (n) => u.value = !1)
|
|
@@ -517,77 +516,79 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
517
516
|
]), 1032, ["modelValue", "header"]);
|
|
518
517
|
};
|
|
519
518
|
}
|
|
520
|
-
}), xe =
|
|
521
|
-
function
|
|
519
|
+
}), xe = We(), Pt = Ie();
|
|
520
|
+
function ue(t) {
|
|
522
521
|
const f = se(t);
|
|
523
522
|
return f.isValid() ? f.format("DD/MM/YYYY") : "";
|
|
524
523
|
}
|
|
525
|
-
const
|
|
524
|
+
const Nt = {
|
|
526
525
|
mapMemberExportRow: (t) => {
|
|
527
|
-
var a, m, i, A, y, p, g,
|
|
528
|
-
const f =
|
|
526
|
+
var a, m, i, A, y, p, g, S, j, q, I, G, J, v, l, R, X, ee, te, o, n, F, w, P, K, L, oe, ne;
|
|
527
|
+
const f = O(() => Pt.locations.map((C) => ({
|
|
529
528
|
label: C.name,
|
|
530
529
|
value: C._id
|
|
531
|
-
}))), c = (a =
|
|
530
|
+
}))), c = (a = Ye.parseOneAddress(
|
|
532
531
|
t == null ? void 0 : t.email
|
|
533
|
-
)) != null && a.domain.includes("feedmepos.com") ? void 0 : t.email,
|
|
534
|
-
(C,
|
|
535
|
-
var
|
|
536
|
-
const
|
|
537
|
-
(
|
|
538
|
-
)) == null ? void 0 :
|
|
539
|
-
return !
|
|
532
|
+
)) != null && a.domain.includes("feedmepos.com") ? void 0 : t.email, T = (i = ((m = t == null ? void 0 : t.collection) == null ? void 0 : m.TITLE) || []) == null ? void 0 : i.reduce(
|
|
533
|
+
(C, N) => {
|
|
534
|
+
var x, Y;
|
|
535
|
+
const Q = (Y = (x = xe.sortedTitles) == null ? void 0 : x.find(
|
|
536
|
+
(ie) => ie._id === N.collectible
|
|
537
|
+
)) == null ? void 0 : Y.name;
|
|
538
|
+
return !Q || N.balance <= 0 || C.push(Q), C;
|
|
540
539
|
},
|
|
541
540
|
[]
|
|
542
|
-
),
|
|
543
|
-
(C,
|
|
544
|
-
var
|
|
545
|
-
const
|
|
546
|
-
(
|
|
547
|
-
)) == null ? void 0 :
|
|
548
|
-
return C[
|
|
541
|
+
), b = (xe.sortedTitles || []).reduce(
|
|
542
|
+
(C, N) => {
|
|
543
|
+
var x, Y, ie, fe;
|
|
544
|
+
const Q = (fe = (ie = (Y = (((x = t == null ? void 0 : t.collection) == null ? void 0 : x.TITLE) || []).find(
|
|
545
|
+
(Te) => Te.collectible === N._id
|
|
546
|
+
)) == null ? void 0 : Y.expiryBalance) == null ? void 0 : ie[0]) == null ? void 0 : fe.expiredAt;
|
|
547
|
+
return C[N.name] = Q ? se(Q).format("DD/MM/YYYY") : "", C;
|
|
549
548
|
},
|
|
550
549
|
{}
|
|
551
|
-
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((
|
|
552
|
-
(C,
|
|
550
|
+
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((q = (j = (S = (g = t.collection) == null ? void 0 : g.CREDIT) == null ? void 0 : S.at(0)) == null ? void 0 : j.expiryBalance) == null ? void 0 : q.reduce(
|
|
551
|
+
(C, N) => C + N.amount,
|
|
553
552
|
0
|
|
554
|
-
)) || 0,
|
|
553
|
+
)) || 0, M = et(_, 2);
|
|
555
554
|
return {
|
|
556
555
|
ID: t._id.toString(),
|
|
557
556
|
Name: ((I = t.name) == null ? void 0 : I.trim()) || "",
|
|
558
|
-
Phone: ((
|
|
557
|
+
Phone: ((G = t == null ? void 0 : t.phoneNumber) == null ? void 0 : G.trim()) || "",
|
|
559
558
|
Email: c || "",
|
|
560
559
|
Gender: t.gender || "",
|
|
561
560
|
CardNo: t.cardNo || "",
|
|
562
|
-
Birthday: t != null && t.birthday ?
|
|
563
|
-
Credit: parseFloat((Number(
|
|
561
|
+
Birthday: t != null && t.birthday ? ue(t == null ? void 0 : t.birthday) : "",
|
|
562
|
+
Credit: parseFloat((Number(M) - Number(u)).toFixed(2)),
|
|
564
563
|
FreeCredit: Number(u.toFixed(2)),
|
|
565
|
-
TotalCredit: Number(
|
|
566
|
-
Exp: t != null && t.collection ? ((l = (v = (
|
|
567
|
-
Point: t != null && t.collection ? ((
|
|
568
|
-
Level: t != null && t.collection ? ((n = (o = (
|
|
569
|
-
Tier: t != null && t.collection ? ((
|
|
570
|
-
Titles:
|
|
571
|
-
...
|
|
564
|
+
TotalCredit: Number(M),
|
|
565
|
+
Exp: t != null && t.collection ? ((l = (v = (J = t.collection) == null ? void 0 : J.POINT) == null ? void 0 : v.at(0)) == null ? void 0 : l.balance) ?? 0 : 0,
|
|
566
|
+
Point: t != null && t.collection ? ((ee = (X = (R = t.collection) == null ? void 0 : R.COIN) == null ? void 0 : X.at(0)) == null ? void 0 : ee.balance) ?? 0 : 0,
|
|
567
|
+
Level: t != null && t.collection ? ((n = (o = (te = t.collection) == null ? void 0 : te.TIER) == null ? void 0 : o.at(0)) == null ? void 0 : n.balance) ?? 0 : 0,
|
|
568
|
+
Tier: t != null && t.collection ? ((P = (w = (F = t.collection) == null ? void 0 : F.TIER) == null ? void 0 : w.at(0)) == null ? void 0 : P.balance) ?? 0 : 0,
|
|
569
|
+
Titles: T.join(","),
|
|
570
|
+
...b,
|
|
572
571
|
TotalTransaction: t.stats.visitCount,
|
|
573
|
-
AvgSpent:
|
|
572
|
+
AvgSpent: tt(Number(t.stats.avgBillSize || 0)).toFormat(
|
|
574
573
|
!1
|
|
575
574
|
),
|
|
576
575
|
TotalSpent: t.stats.avgBillSize * t.stats.visitCount,
|
|
577
|
-
LastVisit:
|
|
576
|
+
LastVisit: ue(t.stats.lastVisit),
|
|
578
577
|
Feedback: ((K = t.stats) == null ? void 0 : K.feedbackCount) || 0,
|
|
579
|
-
|
|
580
|
-
|
|
578
|
+
LastSeasonTierEarned: ((L = t.stats) == null ? void 0 : L.lastSeasonTierEarned) || 0,
|
|
579
|
+
LastSeasonPointEarned: ((oe = t.stats) == null ? void 0 : oe.lastSeasonPointEarned) || 0,
|
|
580
|
+
JoinedAt: ue(t.joinAt || void 0),
|
|
581
|
+
JoinedAtLocation: t.location && ((ne = f.value.find((C) => C.value == t.location)) == null ? void 0 : ne.label) || "-",
|
|
581
582
|
VisitFrequency: `${Number(
|
|
582
583
|
Math.ceil(t.stats.avgVisitFrequency).toFixed(0)
|
|
583
584
|
)}`
|
|
584
585
|
};
|
|
585
586
|
}
|
|
586
|
-
},
|
|
587
|
+
}, Bt = { class: "flex items-center" }, Ut = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Vt = { class: "px-24 flex flex-col gap-y-16" }, Lt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Yt = { class: "flex flex-wrap items-center gap-8" }, zt = { class: "fm-typo-en-body-md-600" }, Ot = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, jt = { class: "flex flex-col gap-16 text-center" }, qt = { class: "fm-typo-en-title-sm-800" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, be = "text-fm-color-typo-info bg-fm-color-system-info-100", To = /* @__PURE__ */ le({
|
|
587
588
|
__name: "Segment",
|
|
588
589
|
setup(t) {
|
|
589
|
-
const { minor: f } =
|
|
590
|
-
function
|
|
590
|
+
const { minor: f } = Pe, { t: c } = pe(), T = Ie(), { mapMemberExportRow: b } = Nt, _ = Ne(), u = ot(), M = W(0);
|
|
591
|
+
function E(o) {
|
|
591
592
|
return !!o.defaultKey;
|
|
592
593
|
}
|
|
593
594
|
function a(o) {
|
|
@@ -598,7 +599,7 @@ const Pt = {
|
|
|
598
599
|
return n ? c(`${n}.name`) : o.name;
|
|
599
600
|
}
|
|
600
601
|
function i(o) {
|
|
601
|
-
return
|
|
602
|
+
return M.value <= 0 ? "0.00" : ((o ?? 0) * 100 / M.value).toFixed(2);
|
|
602
603
|
}
|
|
603
604
|
const A = [
|
|
604
605
|
{
|
|
@@ -607,9 +608,9 @@ const Pt = {
|
|
|
607
608
|
cell(o) {
|
|
608
609
|
return B("div", { class: "flex flex-wrap items-center gap-8" }, [
|
|
609
610
|
B("span", m(o.row.original)),
|
|
610
|
-
...
|
|
611
|
+
...E(o.row.original) ? [
|
|
611
612
|
B(ae.FmChip, {
|
|
612
|
-
class:
|
|
613
|
+
class: be,
|
|
613
614
|
label: c("connect.loyalty.segment.default_segments.system"),
|
|
614
615
|
compact: !0
|
|
615
616
|
})
|
|
@@ -663,7 +664,7 @@ const Pt = {
|
|
|
663
664
|
ae.FmMenuItem,
|
|
664
665
|
{
|
|
665
666
|
onClick: async (n) => {
|
|
666
|
-
n.stopPropagation(),
|
|
667
|
+
n.stopPropagation(), J(o.row.original);
|
|
667
668
|
}
|
|
668
669
|
},
|
|
669
670
|
{
|
|
@@ -676,12 +677,12 @@ const Pt = {
|
|
|
676
677
|
)
|
|
677
678
|
}
|
|
678
679
|
),
|
|
679
|
-
...
|
|
680
|
+
...E(o.row.original) ? [] : [
|
|
680
681
|
B(
|
|
681
682
|
ae.FmMenuItem,
|
|
682
683
|
{
|
|
683
684
|
onClick: async (n) => {
|
|
684
|
-
n.stopPropagation(),
|
|
685
|
+
n.stopPropagation(), G(o.row.original);
|
|
685
686
|
}
|
|
686
687
|
},
|
|
687
688
|
{
|
|
@@ -701,15 +702,15 @@ const Pt = {
|
|
|
701
702
|
]);
|
|
702
703
|
}
|
|
703
704
|
}
|
|
704
|
-
], y =
|
|
705
|
-
|
|
706
|
-
),
|
|
705
|
+
], y = W(null), { tableMeta: p, rowData: g, debouncedFetchData: S } = Fe(
|
|
706
|
+
z.readAll
|
|
707
|
+
), j = O(() => g.value.length === 0 ? !1 : Ve.some(
|
|
707
708
|
(o) => !g.value.some((n) => n.defaultKey === o)
|
|
708
709
|
));
|
|
709
|
-
async function
|
|
710
|
+
async function q() {
|
|
710
711
|
var o;
|
|
711
712
|
try {
|
|
712
|
-
await
|
|
713
|
+
await z.refreshSegments(), _.open({ type: "info", title: "Segment refresh queued" });
|
|
713
714
|
} catch (n) {
|
|
714
715
|
if (((n == null ? void 0 : n.status) ?? ((o = n == null ? void 0 : n.response) == null ? void 0 : o.status)) === 409) {
|
|
715
716
|
_.open({
|
|
@@ -727,7 +728,7 @@ const Pt = {
|
|
|
727
728
|
async function I() {
|
|
728
729
|
await f(
|
|
729
730
|
async () => {
|
|
730
|
-
await
|
|
731
|
+
await z.startDefaultSegments(), await S({ pageSize: 10, pageIndex: 0 });
|
|
731
732
|
},
|
|
732
733
|
{
|
|
733
734
|
message: c(
|
|
@@ -739,10 +740,10 @@ const Pt = {
|
|
|
739
740
|
}
|
|
740
741
|
);
|
|
741
742
|
}
|
|
742
|
-
async function
|
|
743
|
-
await
|
|
743
|
+
async function G(o) {
|
|
744
|
+
await Re.remove(`Are you sure you want to remove ${o.name}?`) && await f(
|
|
744
745
|
async () => {
|
|
745
|
-
await
|
|
746
|
+
await z.delete(o._id), await S({ pageSize: 10, pageIndex: 0 });
|
|
746
747
|
},
|
|
747
748
|
{
|
|
748
749
|
message: `Removing ${o.name}`,
|
|
@@ -750,14 +751,14 @@ const Pt = {
|
|
|
750
751
|
}
|
|
751
752
|
);
|
|
752
753
|
}
|
|
753
|
-
async function
|
|
754
|
+
async function J(o) {
|
|
754
755
|
const n = {
|
|
755
756
|
sortBy: "_id",
|
|
756
757
|
descending: !1,
|
|
757
758
|
rowsPerPage: 1e3,
|
|
758
759
|
page: 1,
|
|
759
760
|
rowsNumber: 0
|
|
760
|
-
}, F = new
|
|
761
|
+
}, F = new ze(), w = m(o), P = (await _e.read({
|
|
761
762
|
limit: 1,
|
|
762
763
|
skip: 0,
|
|
763
764
|
sortBy: n.sortBy,
|
|
@@ -765,26 +766,26 @@ const Pt = {
|
|
|
765
766
|
})).meta.totalResources ?? 0, K = n.rowsPerPage;
|
|
766
767
|
await f(
|
|
767
768
|
async () => {
|
|
768
|
-
for (let L = 0; L <
|
|
769
|
-
const
|
|
769
|
+
for (let L = 0; L < P; L += K) {
|
|
770
|
+
const oe = {
|
|
770
771
|
...n,
|
|
771
772
|
limit: K,
|
|
772
773
|
skip: n.page - 1,
|
|
773
774
|
sortBy: n.sortBy,
|
|
774
775
|
descending: n.descending
|
|
775
|
-
},
|
|
776
|
+
}, ne = await z.paginateSegmentUsers(
|
|
776
777
|
o._id,
|
|
777
|
-
|
|
778
|
+
oe
|
|
778
779
|
);
|
|
779
|
-
for (const
|
|
780
|
-
const
|
|
781
|
-
F.addRecord(
|
|
780
|
+
for (const C of ne.resources) {
|
|
781
|
+
const N = b(C);
|
|
782
|
+
F.addRecord(N);
|
|
782
783
|
}
|
|
783
784
|
n.page++;
|
|
784
785
|
}
|
|
785
|
-
await
|
|
786
|
+
await ke(
|
|
786
787
|
F.buildExcel(),
|
|
787
|
-
`[${
|
|
788
|
+
`[${w}]-members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
788
789
|
{
|
|
789
790
|
bookType: "xlsx",
|
|
790
791
|
bookSST: !1,
|
|
@@ -805,11 +806,11 @@ const Pt = {
|
|
|
805
806
|
if (o.type === U.enum.STATIC) {
|
|
806
807
|
const F = new FormData();
|
|
807
808
|
if (F.append("file", o.file), o._id) {
|
|
808
|
-
const { members:
|
|
809
|
-
F.append("segment", JSON.stringify(L)), await
|
|
809
|
+
const { members: w, _id: P, file: K, ...L } = o;
|
|
810
|
+
F.append("segment", JSON.stringify(L)), await z.updateStatic(o._id, F);
|
|
810
811
|
} else {
|
|
811
|
-
const { file:
|
|
812
|
-
F.append("segment", JSON.stringify(
|
|
812
|
+
const { file: w, ...P } = o;
|
|
813
|
+
F.append("segment", JSON.stringify(P)), await z.createStatic(F);
|
|
813
814
|
}
|
|
814
815
|
o.file && _.open({
|
|
815
816
|
type: "info",
|
|
@@ -817,17 +818,17 @@ const Pt = {
|
|
|
817
818
|
action: "View",
|
|
818
819
|
onAction: async () => {
|
|
819
820
|
await u.push({
|
|
820
|
-
name:
|
|
821
|
-
query: { type: [
|
|
821
|
+
name: Se["$connect-QUEUE"],
|
|
822
|
+
query: { type: [ge.enum.SEGMENTATION_IMPORTED] }
|
|
822
823
|
});
|
|
823
824
|
}
|
|
824
825
|
});
|
|
825
826
|
} else if (o._id) {
|
|
826
|
-
const { members: F, _id:
|
|
827
|
-
await
|
|
827
|
+
const { members: F, _id: w, ...P } = o;
|
|
828
|
+
await z.update(o._id, P);
|
|
828
829
|
} else
|
|
829
|
-
await
|
|
830
|
-
await
|
|
830
|
+
await z.create(o);
|
|
831
|
+
await S({ pageSize: 10, pageIndex: 0 }), (n = y.value) == null || n.hideSheet();
|
|
831
832
|
},
|
|
832
833
|
{
|
|
833
834
|
message: "Saving segment",
|
|
@@ -839,21 +840,21 @@ const Pt = {
|
|
|
839
840
|
var n;
|
|
840
841
|
(n = y.value) == null || n.showSheet(o);
|
|
841
842
|
}
|
|
842
|
-
const
|
|
843
|
+
const R = {
|
|
843
844
|
label: c("connect.navigation.queue"),
|
|
844
845
|
value: "queue",
|
|
845
846
|
isPrimary: !1,
|
|
846
847
|
prependIcon: "work_history"
|
|
847
|
-
},
|
|
848
|
+
}, X = {
|
|
848
849
|
label: c("connect.loyalty.segment.default_segments.get_started.action"),
|
|
849
850
|
value: "start-default-segments",
|
|
850
851
|
isPrimary: !1,
|
|
851
852
|
prependIcon: "auto_awesome"
|
|
852
|
-
},
|
|
853
|
-
if (!
|
|
853
|
+
}, ee = O(() => {
|
|
854
|
+
if (!T.isPremium)
|
|
854
855
|
return [];
|
|
855
|
-
const o = [
|
|
856
|
-
return
|
|
856
|
+
const o = [R];
|
|
857
|
+
return j.value && o.push(X), o.push(
|
|
857
858
|
{
|
|
858
859
|
label: c("connect.loyalty.segment.actions.refresh"),
|
|
859
860
|
value: "refresh",
|
|
@@ -867,18 +868,18 @@ const Pt = {
|
|
|
867
868
|
}
|
|
868
869
|
), o;
|
|
869
870
|
});
|
|
870
|
-
function
|
|
871
|
+
function te(o) {
|
|
871
872
|
switch (o) {
|
|
872
873
|
case "add":
|
|
873
874
|
l();
|
|
874
875
|
break;
|
|
875
876
|
case "refresh":
|
|
876
|
-
|
|
877
|
+
q();
|
|
877
878
|
break;
|
|
878
879
|
case "queue":
|
|
879
880
|
u.push({
|
|
880
|
-
name:
|
|
881
|
-
query: { type: [
|
|
881
|
+
name: Se["$connect-QUEUE"],
|
|
882
|
+
query: { type: [ge.enum.SEGMENTATION_IMPORTED] }
|
|
882
883
|
});
|
|
883
884
|
break;
|
|
884
885
|
case "start-default-segments":
|
|
@@ -886,34 +887,34 @@ const Pt = {
|
|
|
886
887
|
break;
|
|
887
888
|
}
|
|
888
889
|
}
|
|
889
|
-
return
|
|
890
|
-
const { meta: o } = await
|
|
890
|
+
return De(async () => {
|
|
891
|
+
const { meta: o } = await _e.read({
|
|
891
892
|
limit: 1,
|
|
892
893
|
skip: 0,
|
|
893
894
|
sortBy: "_id",
|
|
894
895
|
search: void 0,
|
|
895
896
|
descending: !1
|
|
896
897
|
});
|
|
897
|
-
|
|
898
|
+
M.value = o.totalResources ?? 0, await S({ pageSize: 10, pageIndex: 0 }), await T.readPremium(), await T.readLocations();
|
|
898
899
|
}), (o, n) => {
|
|
899
|
-
const F = h("FmPill"),
|
|
900
|
-
return r(), k(
|
|
901
|
-
d(
|
|
900
|
+
const F = h("FmPill"), w = h("FmPageHead"), P = h("FmChip"), K = h("FmIcon"), L = h("FmMenuItem"), oe = h("FmMenu"), ne = h("FmListItem"), C = h("FmList"), N = h("FmButton"), Q = h("FmCard");
|
|
901
|
+
return r(), k(Z, null, [
|
|
902
|
+
d(w, {
|
|
902
903
|
title: "Segments",
|
|
903
|
-
actions: e(
|
|
904
|
-
"onClick:action": n[0] || (n[0] = (
|
|
904
|
+
actions: e(ee),
|
|
905
|
+
"onClick:action": n[0] || (n[0] = (x) => te(x))
|
|
905
906
|
}, {
|
|
906
907
|
title: $(() => [
|
|
907
|
-
s("div",
|
|
908
|
-
s("span",
|
|
908
|
+
s("div", Bt, [
|
|
909
|
+
s("span", Ut, D(e(c)("connect.loyalty.segment.title")), 1),
|
|
909
910
|
d(F, { variant: "premium" })
|
|
910
911
|
])
|
|
911
912
|
]),
|
|
912
913
|
_: 1
|
|
913
914
|
}, 8, ["actions"]),
|
|
914
|
-
s("div",
|
|
915
|
-
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(
|
|
916
|
-
d(
|
|
915
|
+
s("div", Vt, [
|
|
916
|
+
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(Z, { key: 0 }, [
|
|
917
|
+
d(Ce, {
|
|
917
918
|
loading: e(p).isLoading,
|
|
918
919
|
"row-data": e(g),
|
|
919
920
|
"row-count": e(p).totalRows,
|
|
@@ -922,35 +923,35 @@ const Pt = {
|
|
|
922
923
|
"page-count": e(p).pageCount,
|
|
923
924
|
"page-index": e(p).pageIndex,
|
|
924
925
|
"page-size": e(p).pageSize,
|
|
925
|
-
onRowClick: n[1] || (n[1] = (
|
|
926
|
-
l(
|
|
926
|
+
onRowClick: n[1] || (n[1] = (x) => {
|
|
927
|
+
l(x.original);
|
|
927
928
|
}),
|
|
928
|
-
onPageChange: e(
|
|
929
|
+
onPageChange: e(S)
|
|
929
930
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
|
|
930
|
-
d(
|
|
931
|
+
d(C, { class: "w-full hidden xs:!block" }, {
|
|
931
932
|
default: $(() => [
|
|
932
|
-
(r(!0), k(
|
|
933
|
-
key:
|
|
933
|
+
(r(!0), k(Z, null, me(e(g), (x) => (r(), V(ne, {
|
|
934
|
+
key: x._id.toString(),
|
|
934
935
|
tag: "label",
|
|
935
|
-
onClick: (
|
|
936
|
+
onClick: (Y) => l(x)
|
|
936
937
|
}, {
|
|
937
938
|
default: $(() => [
|
|
938
939
|
s("div", null, [
|
|
939
|
-
s("div",
|
|
940
|
-
s("div",
|
|
941
|
-
s("span",
|
|
942
|
-
|
|
940
|
+
s("div", Lt, D((x.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
|
|
941
|
+
s("div", Yt, [
|
|
942
|
+
s("span", zt, D(m(x)), 1),
|
|
943
|
+
E(x) ? (r(), V(P, {
|
|
943
944
|
key: 0,
|
|
944
|
-
class:
|
|
945
|
+
class: ce(be),
|
|
945
946
|
label: e(c)("connect.loyalty.segment.default_segments.system"),
|
|
946
947
|
compact: ""
|
|
947
948
|
}, null, 8, ["label"])) : H("", !0)
|
|
948
949
|
]),
|
|
949
|
-
s("div",
|
|
950
|
+
s("div", Ot, D(i(x.memberCount)) + "% of customers ", 1)
|
|
950
951
|
])
|
|
951
952
|
]),
|
|
952
953
|
append: $(() => [
|
|
953
|
-
d(
|
|
954
|
+
d(oe, { "stop-click-propagation": !0 }, {
|
|
954
955
|
"menu-button": $(() => [
|
|
955
956
|
d(K, { name: "more_vert" })
|
|
956
957
|
]),
|
|
@@ -958,13 +959,13 @@ const Pt = {
|
|
|
958
959
|
d(L, {
|
|
959
960
|
class: "fm-typo-en-body-md-400",
|
|
960
961
|
label: "Export",
|
|
961
|
-
"onUpdate:modelValue": (
|
|
962
|
+
"onUpdate:modelValue": (Y) => Y && J(x)
|
|
962
963
|
}, null, 8, ["onUpdate:modelValue"]),
|
|
963
|
-
|
|
964
|
+
E(x) ? H("", !0) : (r(), V(L, {
|
|
964
965
|
key: 0,
|
|
965
966
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400",
|
|
966
967
|
label: "Remove",
|
|
967
|
-
"onUpdate:modelValue": (
|
|
968
|
+
"onUpdate:modelValue": (Y) => Y && G(x)
|
|
968
969
|
}, null, 8, ["onUpdate:modelValue"]))
|
|
969
970
|
]),
|
|
970
971
|
_: 2
|
|
@@ -982,26 +983,26 @@ const Pt = {
|
|
|
982
983
|
}, {
|
|
983
984
|
default: $(() => [
|
|
984
985
|
n[3] || (n[3] = s("img", {
|
|
985
|
-
src:
|
|
986
|
+
src: $e,
|
|
986
987
|
class: "aspect-square w-[150px]"
|
|
987
988
|
}, null, -1)),
|
|
988
|
-
s("div",
|
|
989
|
-
s("div",
|
|
990
|
-
s("div",
|
|
989
|
+
s("div", jt, [
|
|
990
|
+
s("div", qt, D(e(c)("connect.loyalty.segment.default_segments.get_started.title")), 1),
|
|
991
|
+
s("div", Gt, D(e(c)(
|
|
991
992
|
"connect.loyalty.segment.default_segments.get_started.description"
|
|
992
993
|
)), 1)
|
|
993
994
|
]),
|
|
994
|
-
d(
|
|
995
|
+
d(N, {
|
|
995
996
|
variant: "primary",
|
|
996
997
|
label: e(c)("connect.loyalty.segment.default_segments.get_started.action"),
|
|
997
|
-
disabled: !e(
|
|
998
|
+
disabled: !e(T).isPremium,
|
|
998
999
|
icon: "auto_awesome",
|
|
999
|
-
onClick: n[2] || (n[2] = (
|
|
1000
|
+
onClick: n[2] || (n[2] = (x) => I())
|
|
1000
1001
|
}, null, 8, ["label", "disabled"])
|
|
1001
1002
|
]),
|
|
1002
1003
|
_: 1
|
|
1003
1004
|
})),
|
|
1004
|
-
d(
|
|
1005
|
+
d(Rt, {
|
|
1005
1006
|
ref_key: "sheetRef",
|
|
1006
1007
|
ref: y,
|
|
1007
1008
|
"onUpdate:modelValue": v
|
|
@@ -1012,5 +1013,5 @@ const Pt = {
|
|
|
1012
1013
|
}
|
|
1013
1014
|
});
|
|
1014
1015
|
export {
|
|
1015
|
-
|
|
1016
|
+
To as default
|
|
1016
1017
|
};
|