@feedmepos/mf-connect 0.1.114-prod → 0.1.115-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/README.md +66 -1
- package/dist/{App-DMYXrCc7.js → App-43mZfFAr.js} +700 -654
- package/dist/AuditLogs-BPpdm96t.js +2016 -0
- package/dist/{Bin-CHZolo56.js → Bin-CA7v180Y.js} +8 -8
- package/dist/Broadcast-qmdifF2Y.js +306 -0
- package/dist/{CampaignAnalytic-DgZvsUoF.js → CampaignAnalytic-xnrDxqaH.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C42uL_JO.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js} +9 -9
- package/dist/{Card-wRFTJwJ9.js → Card-D8icsk7L.js} +25 -24
- package/dist/{Collections-9G-_9Etz.js → Collections--THcD-E_.js} +197 -185
- package/dist/{Credit-Bl7IDMCU.js → Credit-JrbtVMBp.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BVLJeofG.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +4442 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Q1f6EQW3.js → EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js} +32 -32
- package/dist/{Experience-Cs2iViLv.js → Experience-CFeRqBoj.js} +32 -31
- package/dist/{FileSaver.min-B3Levdbu.js → FileSaver.min-CCXIBm58.js} +1 -1
- package/dist/{Game-oXURgzan.js → Game-CPxq6Ex3.js} +19 -18
- package/dist/{GiftCardSetup-C2Wu-dRl.js → GiftCardSetup-D0esVZDp.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Da2e89Um.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js} +7 -7
- package/dist/{Goals-B_xEM7gf.js → Goals-DaKI6uXt.js} +4 -4
- package/dist/Grab-BWzdN_cd.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BRJR1heE.js → ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js} +1 -1
- package/dist/{Index-kuT6W6R_.js → Index-2kENoaZm.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-7JqHfSk-.js → LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CI_4S7tW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js} +1 -1
- package/dist/{LoyaltyDashboard-CqxHdZcm.js → LoyaltyDashboard-CB93Fz8u.js} +15 -15
- package/dist/MainLayout-DwnjGXh6.js +4 -0
- package/dist/{MainLayout-CAERFIms.js → MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js} +5 -4
- package/dist/Marketing-DCco__2F.js +273 -0
- package/dist/MarketingMaterialEdit-BbgFtrYP.js +1037 -0
- package/dist/{Member-B8VZEn9t.js → Member-B--nYyr0.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B31lVLKh.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js} +43 -50
- package/dist/{MemberImportHistory-D9tgHnTS.js → MemberImportHistory-D52Y4RTC.js} +7 -7
- package/dist/{MemberList-Hw_xQY1i.js → MemberList-13Owa1fj.js} +103 -105
- package/dist/{MemberTransactions-DiBO4plw.js → MemberTransactions-CpXEWNbq.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CbFt5X89.js → MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js} +4228 -4176
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BE_-Ed4z.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js} +1 -1
- package/dist/{Mission-DpYei3aF.js → Mission-Ci-UzXSu.js} +22 -21
- package/dist/{Overview-CARquJCS.js → Overview-CKxSfAGF.js} +145 -144
- package/dist/{Overview-BFQMmyT6.js → Overview-CXen9Ram.js} +23 -22
- package/dist/{Point-Dd2ykwNv.js → Point-CR3YOaag.js} +22 -21
- package/dist/{Promotion-DXl-W7np.js → Promotion-tw3J4ul-.js} +137 -131
- package/dist/{Queue-Cd3N-4iB.js → Queue-BZGA5ZXt.js} +47 -46
- package/dist/{Record-C3HdDsh5.js → Record-BTevVXnT.js} +9 -9
- package/dist/{Review-Bif3Ub9Z.js → Review-BU7c8ZF0.js} +2 -2
- package/dist/ReviewFacebookCallback-BnMF6Arh.js +225 -0
- package/dist/{ReviewGoogleCallback-i-RNLlLm.js → ReviewGoogleCallback-xpdPHSdg.js} +5 -5
- package/dist/{Reward-DHxzrR_7.js → Reward-jlA_7cxz.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DcrFlcSo.js → RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js} +16 -15
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +1923 -0
- package/dist/{Segment-Cjpxordk.js → Segment-C1Bwm--Q.js} +290 -291
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-6u21xBu6.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js} +31 -30
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BOXVzfer.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js} +4 -4
- package/dist/Setting-CDM4RhLW.js +574 -0
- package/dist/{SettingAdvertisements-aog5fz32.js → SettingAdvertisements-4XEAJzlL.js} +12 -12
- package/dist/Settings-D-0tvZRr.js +286 -0
- package/dist/{Store-Bq3kw1l2.js → Store-C56dXtc4.js} +31 -30
- package/dist/{StoreRewards-ZGXKEM09.js → StoreRewards-DQ1Q6WS6.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +7007 -0
- package/dist/{Tier-CfgpEHY7.js → Tier-D4CPZqw7.js} +2576 -687
- package/dist/{Title-B2itYWeD.js → Title-DCbwhUic.js} +94 -92
- package/dist/{Transaction-hJ5ygIcf.js → Transaction-C5LrasXr.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-8BgGlpTh.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js} +26 -26
- package/dist/{Voucher-TG47pGR3.js → Voucher-rrVbNZKR.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjuXCTxg.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js} +16 -16
- package/dist/WhatsappAccount-oJDo5zTr.js +159 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +39 -0
- package/dist/WhatsappBot-Cl64wG_F.js +876 -0
- package/dist/WhatsappBotLogs-D3uT4EiB.js +372 -0
- package/dist/WhatsappBotSettings-Cs1lLxh-.js +705 -0
- package/dist/WhatsappLayout-C639d2HP.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +253 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BRs-gbP0.js → ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js} +2 -2
- package/dist/{app-tPHYkJcQ.js → app-CgimGODl.js} +10610 -8223
- package/dist/app.js +4 -3
- package/dist/{base.export-BHDVnGj2.js → base.export-D2P6HFvo.js} +2 -2
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-HLyWfrXY.js → business-Bu5TqSA0.js} +1 -1
- package/dist/campaign-BFIXSgdJ.js +400 -0
- package/dist/{campaign-5zFgUNLw.js → campaign-zJxttSIk.js} +31 -25
- package/dist/{campaign.enum-BOkDnP2g.js → campaign.enum-Dx-Zo68Q.js} +3 -2
- package/dist/{campaign.fn-BIAoVtJj.js → campaign.fn-gvjlcEfe.js} +78 -78
- package/dist/{collectible.enum-BbZSAfys.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-DPSgBHnz.js → collection.fn-DOm0HsSh.js} +2 -2
- package/dist/{currency-BVrMqU6-.js → currency-BpbQvbm8.js} +1 -1
- package/dist/duplicateCampaign-CvsvjRE9.js +51 -0
- package/dist/{effect-BBifVx76.js → effect-D-GtNB3n.js} +1 -1
- package/dist/{email-addresses-9C7xHTNv.js → email-addresses-BKMoAtMi.js} +2 -2
- package/dist/feature-flag-BJ_eyKsq.js +868 -0
- package/dist/feature-flag-Bo-k5sIG.js +50 -0
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-C08jyQNK.js → helper-CkfjBgMM.js} +1 -1
- package/dist/{index-Dhyqf1s8.js → index-B6kU3PkV.js} +2700 -2613
- package/dist/{index-BgwZGunW.js → index-BAtUrtqM.js} +19 -6
- package/dist/index-BKsxIwbi.js +14571 -0
- package/dist/{index-DZ-q5O-V.js → index-BdEXUNoG.js} +4 -4
- package/dist/{index-hIUtD2eY.js → index-Bhl5IRXy.js} +11 -10
- package/dist/{index-kCbkOivd.js → index-BpTIulTX.js} +1 -1
- package/dist/index-C-iwb2Ln.js +109 -0
- package/dist/{index-Ciw2TZxV.js → index-CCEXSPxk.js} +8 -7
- package/dist/{index-CUle4c2B.js → index-CIej31pF.js} +4 -3
- package/dist/{index-ihw-WFCa.js → index-CQ8XFbBk.js} +2 -2
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-CEe1kJ0T.js → index-CfQuYqXn.js} +1 -1
- package/dist/{index-C_WoO58V.js → index-CuREApMc.js} +8 -7
- package/dist/{index-NJSI4wX4.js → index-D0JK99Ko.js} +693 -231
- package/dist/{index-DnRMNmUA.js → index-DKxN1mMS.js} +396 -232
- package/dist/index-DQ8JJhxs.js +74 -0
- package/dist/{index-D24Q28cH.js → index-DUAZOMVJ.js} +1 -1
- package/dist/{index-Yo0tP8KJ.js → index-DqGs6RJG.js} +683 -581
- package/dist/{index-B_334Y_i.js → index-DwU3fsLW.js} +29 -15
- package/dist/{index-hSRM1smQ.js → index-LygS9WsG.js} +8028 -10767
- package/dist/{index-96ZiAKj_.js → index-feCrYhi6.js} +1 -1
- package/dist/{index-Dk-jg0wN.js → index-zTvr2GR4.js} +2 -2
- package/dist/{index.esm2017-hN99SQTb.js → index.esm2017-DZi9IQPS.js} +209 -209
- package/dist/{loading-CVuY4vQ4.js → loading-Brid2wnu.js} +1 -1
- package/dist/{lodash-GFl9_FMH.js → lodash-C1epw3Kv.js} +1 -1
- package/dist/{member-import-CshTzabx.js → member-import-DAIxTIiu.js} +6 -5
- package/dist/{membership-S0KES3Ex.js → membership-BZmljFhF.js} +3 -3
- package/dist/{money-JxdX8ru4.js → money-cLcyGcSZ.js} +1 -1
- package/dist/{number-BRLwa-mB.js → number-C2jPLJr2.js} +1 -1
- package/dist/objectid-C-wocWKI.js +145 -0
- package/dist/{onboarding-BSKYeyP7.js → onboarding-oRfy_g05.js} +25 -25
- package/dist/{onboardingSetup-BqT52VRm.js → onboardingSetup-BLD6m8HY.js} +2 -2
- package/dist/{plugins-BR_wmMFJ.js → plugins-CUsr9vB0.js} +3 -3
- package/dist/{MarketingMaterialEdit-BvIthCHG.js → remy-icon-BhUGu2NI.js} +2 -1031
- package/dist/{reward-CpCGg_W2.js → reward-UOT03odb.js} +1 -1
- package/dist/{rule-Dbg9e8MO.js → rule-BgJnPjkI.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-BZyFhr73.js +188 -0
- package/dist/{timezone-CDVa-xPr.js → timezone-BXA4wq7Y.js} +1 -1
- package/dist/{transaction.fn-DrTBoF9T.js → transaction.fn-CQ4fpRt3.js} +2 -2
- package/dist/{trigger-wqGwQfB2.js → trigger-DXJCGT0q.js} +8 -8
- package/dist/useMarketingMaterialActions-B-Wib5ga.js +125 -0
- package/dist/{usePagination-fODgpZZ8.js → usePagination-Pp4okWr8.js} +1 -1
- package/dist/{user-DaLUK1dk.js → user-B3gXcAIy.js} +1 -1
- package/dist/vue-i18n-DWGiC_vs.js +2365 -0
- package/dist/{xlsx-Bl4_Dtrq.js → xlsx-CCaDUTgW.js} +651 -651
- package/dist/{zod-CAzWyVqj.js → zod-CPwjOxvW.js} +1 -1
- package/package.json +12 -3
- package/dist/Broadcast-ByWvxVhW.js +0 -271
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DGpQfV5T.js +0 -2431
- package/dist/Marketing-KgcwGErU.js +0 -236
- package/dist/ReviewFacebookCallback-mJF54-9l.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-39f3I4BB.js +0 -1883
- package/dist/Setting-Dl9MelHz.js +0 -2036
- package/dist/Settings-DvCCClIP.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DscLAF0p.js +0 -1264
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-l_v4FHO0.js +0 -142
- package/dist/campaign-awCRccgX.js +0 -228
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/index-CoNJdOx7.js +0 -51
- package/dist/objectid-CEHN25HN.js +0 -145
- package/dist/rule-builder-BEIjxsE0.js +0 -102
- package/dist/template-CS-lExgI.js +0 -236
- package/dist/useMarketingMaterialActions-DC0gIyIZ.js +0 -96
- package/dist/vue-i18n-Dx-KXojZ.js +0 -2365
|
@@ -1,66 +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-
|
|
14
|
-
import "./index-
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { _ as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
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-CUsr9vB0.js";
|
|
4
|
+
import { u as Ae } from "./loading-Brid2wnu.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-Pp4okWr8.js";
|
|
7
|
+
import { u as me } from "./vue-i18n-DWGiC_vs.js";
|
|
8
|
+
import { R as pe } from "./index-D0JK99Ko.js";
|
|
9
|
+
import { i as Ne, j as U, D as Re, k as Be } from "./index-DqGs6RJG.js";
|
|
10
|
+
import "./index-B6kU3PkV.js";
|
|
11
|
+
import { F as fe } from "./index-LygS9WsG.js";
|
|
12
|
+
import { a as ye } from "./index-DKxN1mMS.js";
|
|
13
|
+
import "./index-CuREApMc.js";
|
|
14
|
+
import "./index-C-iwb2Ln.js";
|
|
15
|
+
import "./index-CIej31pF.js";
|
|
16
|
+
import { u as re, w as Fe } from "./xlsx-CCaDUTgW.js";
|
|
17
|
+
import { e as Ue, M as Ve } from "./email-addresses-BKMoAtMi.js";
|
|
18
|
+
import { Z as Le } from "./zod-CPwjOxvW.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-C39_95SZ.js";
|
|
22
|
+
import { a as je } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js";
|
|
23
|
+
import { u as qe, v as Ge, w as Je } from "./index.esm2017-DZi9IQPS.js";
|
|
24
|
+
import { F as Ke } from "./FileSaver.min-CCXIBm58.js";
|
|
24
25
|
import { h as se } from "./moment-D7p2TMB-.js";
|
|
25
|
-
import { s as
|
|
26
|
-
import { o as
|
|
27
|
-
import { J as
|
|
28
|
-
import { u as
|
|
29
|
-
import { f as
|
|
30
|
-
import { t as
|
|
31
|
-
import "./index-
|
|
32
|
-
import { useRouter as
|
|
33
|
-
import { m as
|
|
34
|
-
import { R as
|
|
35
|
-
const
|
|
36
|
-
_id:
|
|
37
|
-
business:
|
|
38
|
-
file:
|
|
26
|
+
import { s as Y, u as He } from "./membership-BZmljFhF.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-Bu5TqSA0.js";
|
|
30
|
+
import { f as Ze } from "./number-C2jPLJr2.js";
|
|
31
|
+
import { t as Xe } from "./money-cLcyGcSZ.js";
|
|
32
|
+
import "./index-feCrYhi6.js";
|
|
33
|
+
import { useRouter as et } from "vue-router";
|
|
34
|
+
import { m as ge } from "./index-CQ8XFbBk.js";
|
|
35
|
+
import { R as ve } from "./app-CgimGODl.js";
|
|
36
|
+
const tt = Ne.extend({
|
|
37
|
+
_id: fe.optional(),
|
|
38
|
+
business: fe.optional(),
|
|
39
|
+
file: ze.any().nullish()
|
|
39
40
|
});
|
|
40
|
-
var
|
|
41
|
-
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 = {
|
|
42
43
|
key: 0,
|
|
43
|
-
class: /* @__PURE__ */
|
|
44
|
+
class: /* @__PURE__ */ ie([
|
|
44
45
|
"p-16 pl-24 space-x-8",
|
|
45
46
|
"bg-fm-color-primary-oats rounded-lg",
|
|
46
47
|
"flex items-center",
|
|
47
48
|
"justify-between"
|
|
48
49
|
])
|
|
49
|
-
},
|
|
50
|
+
}, st = { class: "flex justify-end" }, lt = {
|
|
50
51
|
key: 1,
|
|
51
|
-
class: /* @__PURE__ */
|
|
52
|
+
class: /* @__PURE__ */ ie([
|
|
52
53
|
"flex items-center",
|
|
53
54
|
"border border-fm-color-neutral-gray-300",
|
|
54
55
|
"p-16 space-x-16 rounded-md"
|
|
55
56
|
])
|
|
56
|
-
},
|
|
57
|
+
}, it = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, ct = /* @__PURE__ */ le({
|
|
57
58
|
__name: "ImportSegment",
|
|
58
59
|
props: {
|
|
59
60
|
importFile: {}
|
|
60
61
|
},
|
|
61
62
|
emits: ["update:file"],
|
|
62
63
|
setup(t, { emit: f }) {
|
|
63
|
-
const c = t, M = f, { t:
|
|
64
|
+
const c = t, M = f, { t: S } = me(), _ = X(null), u = X(null), T = ["Id"], D = [
|
|
64
65
|
{
|
|
65
66
|
label: "CSV",
|
|
66
67
|
icon: "csv",
|
|
@@ -75,10 +76,10 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
75
76
|
async function a() {
|
|
76
77
|
if (c.importFile)
|
|
77
78
|
try {
|
|
78
|
-
const y =
|
|
79
|
+
const y = qe(void 0, ot.importFilesBucketUrl), p = Ge(y, c.importFile), g = await Je(p);
|
|
79
80
|
window.open(g, "_blank");
|
|
80
81
|
} catch (y) {
|
|
81
|
-
console.log(y),
|
|
82
|
+
console.log(y), Ee.error("Failed to download uploaded file");
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
async function m(y) {
|
|
@@ -87,11 +88,11 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
87
88
|
const p = new Blob([T.join(",")], {
|
|
88
89
|
type: "text/csv;charset=utf-8;"
|
|
89
90
|
});
|
|
90
|
-
|
|
91
|
+
Ke.saveAs(p, "ImportSegmentTemplate.csv");
|
|
91
92
|
break;
|
|
92
93
|
case "xlsx":
|
|
93
|
-
const g =
|
|
94
|
-
|
|
94
|
+
const g = re.aoa_to_sheet([T]), x = re.book_new();
|
|
95
|
+
re.book_append_sheet(x, g, "Sheet1"), Fe(x, "ImportSegmentTemplate.xlsx");
|
|
95
96
|
break;
|
|
96
97
|
}
|
|
97
98
|
}
|
|
@@ -99,25 +100,25 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
99
100
|
_.value = y, M("update:file", _.value);
|
|
100
101
|
}
|
|
101
102
|
function A(y) {
|
|
102
|
-
var g,
|
|
103
|
-
const p = ((
|
|
103
|
+
var g, x;
|
|
104
|
+
const p = ((x = (g = y.target) == null ? void 0 : g.files) == null ? void 0 : x[0]) ?? null;
|
|
104
105
|
i(p);
|
|
105
106
|
}
|
|
106
107
|
return (y, p) => {
|
|
107
|
-
const g =
|
|
108
|
-
return r(), k("div",
|
|
108
|
+
const g = h("FmButton"), x = h("FmMenuItem"), q = h("FmMenu"), G = h("FmDropField");
|
|
109
|
+
return r(), k("div", nt, [
|
|
109
110
|
p[2] || (p[2] = s("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
|
|
110
|
-
t.importFile ? (r(), k("div",
|
|
111
|
+
t.importFile ? (r(), k("div", at, [
|
|
111
112
|
d(g, {
|
|
112
|
-
label: e(
|
|
113
|
-
variant: e(
|
|
113
|
+
label: e(S)("View uploaded file"),
|
|
114
|
+
variant: e(ce).Plain,
|
|
114
115
|
icon: "file_present",
|
|
115
116
|
onClick: a
|
|
116
117
|
}, null, 8, ["label", "variant"])
|
|
117
|
-
])) :
|
|
118
|
+
])) : H("", !0),
|
|
118
119
|
s("div", null, [
|
|
119
|
-
s("div",
|
|
120
|
-
d(
|
|
120
|
+
s("div", st, [
|
|
121
|
+
d(q, { class: "" }, {
|
|
121
122
|
"menu-button": $(() => [
|
|
122
123
|
d(g, {
|
|
123
124
|
variant: "tertiary",
|
|
@@ -126,31 +127,31 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
126
127
|
})
|
|
127
128
|
]),
|
|
128
129
|
default: $(() => [
|
|
129
|
-
(r(), k(
|
|
130
|
+
(r(), k(ee, null, ue(D, (I) => d(x, {
|
|
130
131
|
key: I.value,
|
|
131
132
|
icon: I.icon,
|
|
132
133
|
label: I.label,
|
|
133
|
-
onClick: (
|
|
134
|
+
onClick: (J) => m(I.value),
|
|
134
135
|
selectable: ""
|
|
135
136
|
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
136
137
|
]),
|
|
137
138
|
_: 1
|
|
138
139
|
})
|
|
139
140
|
]),
|
|
140
|
-
_.value ? (r(), k("div",
|
|
141
|
+
_.value ? (r(), k("div", lt, [
|
|
141
142
|
d(g, {
|
|
142
|
-
variant: e(
|
|
143
|
+
variant: e(ce).Tertiary,
|
|
143
144
|
"prepend-icon": "attach_file"
|
|
144
145
|
}, null, 8, ["variant"]),
|
|
145
|
-
s("p",
|
|
146
|
+
s("p", it, E(_.value.name), 1),
|
|
146
147
|
s("label", {
|
|
147
148
|
ref_key: "fileLabelRef",
|
|
148
149
|
ref: u,
|
|
149
150
|
htmlFor: "file"
|
|
150
151
|
}, [
|
|
151
152
|
d(g, {
|
|
152
|
-
variant: e(
|
|
153
|
-
label: e(
|
|
153
|
+
variant: e(ce).Plain,
|
|
154
|
+
label: e(S)("Replace File"),
|
|
154
155
|
onClick: p[1] || (p[1] = () => {
|
|
155
156
|
var I;
|
|
156
157
|
return (I = u.value) == null ? void 0 : I.click();
|
|
@@ -165,7 +166,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
165
166
|
onChange: A
|
|
166
167
|
}, null, 32)
|
|
167
168
|
], 512)
|
|
168
|
-
])) : (r(), V(
|
|
169
|
+
])) : (r(), V(G, {
|
|
169
170
|
key: 0,
|
|
170
171
|
onFileUpload: p[0] || (p[0] = (I) => i(I)),
|
|
171
172
|
accept: ".csv, .xlsx",
|
|
@@ -175,18 +176,18 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
175
176
|
]);
|
|
176
177
|
};
|
|
177
178
|
}
|
|
178
|
-
}),
|
|
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({
|
|
179
180
|
__name: "ReviewSegment",
|
|
180
181
|
props: {
|
|
181
182
|
title: {},
|
|
182
183
|
segment: {}
|
|
183
184
|
},
|
|
184
185
|
setup(t) {
|
|
185
|
-
const f = t, c =
|
|
186
|
+
const f = t, c = z(
|
|
186
187
|
() => f.segment.memberCount ?? f.segment.members.length
|
|
187
|
-
), M =
|
|
188
|
+
), M = z(
|
|
188
189
|
() => f.segment.lastUpdated ? se(f.segment.lastUpdated).format("DD MMM YYYY") : "Not refreshed yet"
|
|
189
|
-
),
|
|
190
|
+
), S = [
|
|
190
191
|
{
|
|
191
192
|
header: "Name",
|
|
192
193
|
accessorFn: (i) => i.name
|
|
@@ -197,7 +198,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
197
198
|
},
|
|
198
199
|
{
|
|
199
200
|
header: "Customer Since",
|
|
200
|
-
accessorFn: (i) => se(
|
|
201
|
+
accessorFn: (i) => se(We(i._id.toString())).format("DD MMM YYYY")
|
|
201
202
|
},
|
|
202
203
|
{
|
|
203
204
|
header: "Phone",
|
|
@@ -213,7 +214,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
213
214
|
}
|
|
214
215
|
];
|
|
215
216
|
async function _(i) {
|
|
216
|
-
return f.segment._id ? (console.log(i), await
|
|
217
|
+
return f.segment._id ? (console.log(i), await Y.paginateSegmentUsers(
|
|
217
218
|
f.segment._id,
|
|
218
219
|
i
|
|
219
220
|
)) : {
|
|
@@ -227,32 +228,32 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
227
228
|
}
|
|
228
229
|
};
|
|
229
230
|
}
|
|
230
|
-
const { tableMeta: u, rowData: T, onSort:
|
|
231
|
-
return
|
|
231
|
+
const { tableMeta: u, rowData: T, onSort: D, debouncedFetchData: a, onSearch: m } = be(_);
|
|
232
|
+
return Se(async () => {
|
|
232
233
|
await a();
|
|
233
|
-
}), (i, A) => (r(), k("div",
|
|
234
|
-
s("div",
|
|
235
|
-
s("div",
|
|
236
|
-
s("div",
|
|
237
|
-
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, [
|
|
238
239
|
A[1] || (A[1] = s("div", null, "contacts in your segment", -1)),
|
|
239
|
-
s("div", null, "as of " +
|
|
240
|
+
s("div", null, "as of " + E(e(M)), 1)
|
|
240
241
|
])
|
|
241
242
|
]),
|
|
242
|
-
d(
|
|
243
|
+
d(we, {
|
|
243
244
|
loading: e(u).isLoading,
|
|
244
245
|
"row-data": e(T),
|
|
245
246
|
"row-count": e(u).totalRows,
|
|
246
|
-
"column-defs":
|
|
247
|
+
"column-defs": S,
|
|
247
248
|
"page-size": e(u).pageSize,
|
|
248
249
|
"page-count": e(u).pageCount,
|
|
249
250
|
"page-index": e(u).pageIndex,
|
|
250
|
-
onSortChange: e(
|
|
251
|
+
onSortChange: e(D),
|
|
251
252
|
onPageChange: A[0] || (A[0] = (y) => e(a)({ pageSize: y.pageSize, pageIndex: y.pageIndex }))
|
|
252
253
|
}, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
|
|
253
254
|
]));
|
|
254
255
|
}
|
|
255
|
-
}),
|
|
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({
|
|
256
257
|
__name: "SegmentTypeOption",
|
|
257
258
|
props: {
|
|
258
259
|
modelValue: {},
|
|
@@ -260,7 +261,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
260
261
|
},
|
|
261
262
|
emits: ["update:model-value"],
|
|
262
263
|
setup(t, { emit: f }) {
|
|
263
|
-
const c = t, M = f,
|
|
264
|
+
const c = t, M = f, S = [
|
|
264
265
|
{
|
|
265
266
|
label: "Dynamic",
|
|
266
267
|
sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
|
|
@@ -276,13 +277,13 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
276
277
|
u !== c.modelValue && M("update:model-value", u);
|
|
277
278
|
}
|
|
278
279
|
return (u, T) => {
|
|
279
|
-
const
|
|
280
|
-
return r(), k("div",
|
|
281
|
-
s("div",
|
|
282
|
-
(r(), k(
|
|
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, {
|
|
283
284
|
variant: "outlined",
|
|
284
|
-
class:
|
|
285
|
-
"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,
|
|
286
287
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": t.modelValue === m.value,
|
|
287
288
|
"hover:bg-fm-color-opacity-sm": t.modelValue !== m.value
|
|
288
289
|
}]),
|
|
@@ -290,8 +291,8 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
290
291
|
key: m.value
|
|
291
292
|
}, {
|
|
292
293
|
default: $(() => [
|
|
293
|
-
s("div",
|
|
294
|
-
s("div",
|
|
294
|
+
s("div", gt, E(m.label), 1),
|
|
295
|
+
s("div", vt, E(m.sublabel), 1)
|
|
295
296
|
]),
|
|
296
297
|
_: 2
|
|
297
298
|
}, 1032, ["class", "onClick"])), 64))
|
|
@@ -301,47 +302,47 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
301
302
|
class: "!mt-4",
|
|
302
303
|
text: t.errorText,
|
|
303
304
|
state: "error"
|
|
304
|
-
}, null, 8, ["text"])) :
|
|
305
|
+
}, null, 8, ["text"])) : H("", !0)
|
|
305
306
|
]);
|
|
306
307
|
};
|
|
307
308
|
}
|
|
308
|
-
}),
|
|
309
|
+
}), xt = { class: "flex items-center gap-x-8" }, ht = {
|
|
309
310
|
key: 0,
|
|
310
311
|
class: "space-y-16 pr-12"
|
|
311
|
-
},
|
|
312
|
+
}, St = {
|
|
312
313
|
key: 0,
|
|
313
314
|
class: "flex flex-col gap-12"
|
|
314
|
-
},
|
|
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 = {
|
|
315
316
|
key: 2,
|
|
316
317
|
class: "flex flex-col space-y-16"
|
|
317
|
-
},
|
|
318
|
+
}, Mt = {
|
|
318
319
|
key: 3,
|
|
319
320
|
class: "flex flex-col space-y-16"
|
|
320
|
-
},
|
|
321
|
+
}, Tt = {
|
|
321
322
|
key: 4,
|
|
322
323
|
class: "flex flex-col space-y-16"
|
|
323
|
-
},
|
|
324
|
+
}, Dt = {
|
|
324
325
|
key: 5,
|
|
325
326
|
class: "flex flex-col space-y-16"
|
|
326
|
-
},
|
|
327
|
+
}, Et = { class: "flex items-center gap-8" }, $t = /* @__PURE__ */ le({
|
|
327
328
|
__name: "SegmentSheet",
|
|
328
329
|
emits: ["update:model-value"],
|
|
329
330
|
setup(t, { expose: f, emit: c }) {
|
|
330
|
-
const M =
|
|
331
|
+
const M = Ye(), { t: S } = me(), _ = X(!1), u = X(!1), T = {
|
|
331
332
|
name: "",
|
|
332
333
|
isActive: !0,
|
|
333
334
|
type: U.enum.DYNAMIC,
|
|
334
|
-
rule:
|
|
335
|
+
rule: pe.scaffoldGroup(),
|
|
335
336
|
members: []
|
|
336
|
-
},
|
|
337
|
+
}, D = tt, a = X(T), m = z(() => !!a.value.defaultKey), i = z(
|
|
337
338
|
() => a.value.defaultKey ? `connect.loyalty.segment.default_segments.${a.value.defaultKey.toLowerCase()}` : void 0
|
|
338
|
-
), A =
|
|
339
|
-
() => i.value ?
|
|
340
|
-
), y =
|
|
339
|
+
), A = z(
|
|
340
|
+
() => i.value ? S(`${i.value}.name`) : a.value.name
|
|
341
|
+
), y = z(() => {
|
|
341
342
|
const v = a.value.defaultKey;
|
|
342
|
-
return v ?
|
|
343
|
-
}), p =
|
|
344
|
-
const v =
|
|
343
|
+
return v ? S(Re[v]) : a.value.description ?? "";
|
|
344
|
+
}), p = z(() => {
|
|
345
|
+
const v = D.safeParse(a.value);
|
|
345
346
|
return v.success ? [] : v.error.errors;
|
|
346
347
|
});
|
|
347
348
|
function g(v) {
|
|
@@ -351,45 +352,45 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
351
352
|
type: v.type ?? (v.importFile ? U.enum.STATIC : U.enum.DYNAMIC)
|
|
352
353
|
} : a.value = { ...T };
|
|
353
354
|
}
|
|
354
|
-
function
|
|
355
|
+
function x() {
|
|
355
356
|
_.value = !1;
|
|
356
357
|
}
|
|
357
|
-
async function
|
|
358
|
-
|
|
358
|
+
async function q() {
|
|
359
|
+
D.safeParse(a.value).success && (u.value = !0);
|
|
359
360
|
}
|
|
360
|
-
function
|
|
361
|
-
v === U.enum.STATIC ?
|
|
361
|
+
function G(v) {
|
|
362
|
+
v === U.enum.STATIC ? x() : u.value = !1;
|
|
362
363
|
}
|
|
363
364
|
async function I() {
|
|
364
|
-
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);
|
|
365
366
|
}
|
|
366
|
-
async function
|
|
367
|
+
async function J(v) {
|
|
367
368
|
a.value.type = v;
|
|
368
369
|
}
|
|
369
|
-
|
|
370
|
+
Se(async () => {
|
|
370
371
|
});
|
|
371
|
-
const
|
|
372
|
+
const W = c;
|
|
372
373
|
return f({
|
|
373
374
|
showSheet: g,
|
|
374
|
-
hideSheet:
|
|
375
|
+
hideSheet: x
|
|
375
376
|
}), (v, l) => {
|
|
376
|
-
const P =
|
|
377
|
+
const P = h("FmButton"), te = h("FmChip"), oe = h("FmCard"), ne = h("FmSwitch"), o = h("FmSideSheet");
|
|
377
378
|
return r(), V(o, {
|
|
378
379
|
modelValue: e(_),
|
|
379
|
-
"onUpdate:modelValue": l[9] || (l[9] = (n) =>
|
|
380
|
-
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",
|
|
381
382
|
"dismiss-away": "",
|
|
382
383
|
"close-button": !0,
|
|
383
384
|
"max-width": 1100
|
|
384
|
-
},
|
|
385
|
+
}, Me({
|
|
385
386
|
"side-sheet-footer": $(() => [
|
|
386
|
-
s("div",
|
|
387
|
+
s("div", Et, [
|
|
387
388
|
e(m) ? (r(), V(P, {
|
|
388
389
|
key: 0,
|
|
389
|
-
label: e(
|
|
390
|
-
onClick: l[6] || (l[6] = (n) =>
|
|
390
|
+
label: e(S)("connect.loyalty.segment.default_segments.close"),
|
|
391
|
+
onClick: l[6] || (l[6] = (n) => x()),
|
|
391
392
|
variant: "tertiary"
|
|
392
|
-
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(
|
|
393
|
+
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(ee, { key: 1 }, [
|
|
393
394
|
d(P, {
|
|
394
395
|
label: "Save Segment",
|
|
395
396
|
onClick: I,
|
|
@@ -398,18 +399,18 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
398
399
|
}, null, 8, ["loading", "disabled"]),
|
|
399
400
|
d(P, {
|
|
400
401
|
label: "Cancel",
|
|
401
|
-
onClick: l[7] || (l[7] = (n) =>
|
|
402
|
+
onClick: l[7] || (l[7] = (n) => G(e(a).type)),
|
|
402
403
|
variant: "tertiary"
|
|
403
404
|
})
|
|
404
|
-
], 64)) : (r(), k(
|
|
405
|
+
], 64)) : (r(), k(ee, { key: 2 }, [
|
|
405
406
|
d(P, {
|
|
406
407
|
label: "Review Segment",
|
|
407
408
|
disabled: e(p).length > 0 || e(M).isLoading,
|
|
408
|
-
onClick:
|
|
409
|
+
onClick: q
|
|
409
410
|
}, null, 8, ["disabled"]),
|
|
410
411
|
d(P, {
|
|
411
412
|
label: "Cancel",
|
|
412
|
-
onClick: l[8] || (l[8] = (n) =>
|
|
413
|
+
onClick: l[8] || (l[8] = (n) => x()),
|
|
413
414
|
variant: "tertiary"
|
|
414
415
|
})
|
|
415
416
|
], 64))
|
|
@@ -418,82 +419,82 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
418
419
|
default: $(() => {
|
|
419
420
|
var n, F;
|
|
420
421
|
return [
|
|
421
|
-
d(
|
|
422
|
-
e(u) ? (r(), V(
|
|
422
|
+
d(Qe, { json: e(a) }, null, 8, ["json"]),
|
|
423
|
+
e(u) ? (r(), V(_e, {
|
|
423
424
|
key: 1,
|
|
424
425
|
title: e(a).name,
|
|
425
426
|
segment: e(a)
|
|
426
|
-
}, null, 8, ["title", "segment"])) : (r(), k("div",
|
|
427
|
-
e(m) ? (r(), k("div",
|
|
428
|
-
s("div",
|
|
429
|
-
s("div",
|
|
430
|
-
d(
|
|
431
|
-
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"),
|
|
432
433
|
compact: "",
|
|
433
434
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100"
|
|
434
435
|
}, null, 8, ["label"])
|
|
435
436
|
]),
|
|
436
|
-
d(
|
|
437
|
+
d(oe, {
|
|
437
438
|
variant: "outlined",
|
|
438
439
|
class: "p-16"
|
|
439
440
|
}, {
|
|
440
441
|
default: $(() => [
|
|
441
|
-
s("div",
|
|
442
|
-
s("div",
|
|
443
|
-
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)
|
|
444
445
|
])
|
|
445
446
|
]),
|
|
446
447
|
_: 1
|
|
447
448
|
})
|
|
448
|
-
])) : (r(), V(
|
|
449
|
+
])) : (r(), V(Oe, {
|
|
449
450
|
key: 1,
|
|
450
451
|
modelValue: e(a).name,
|
|
451
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
452
|
+
"onUpdate:modelValue": l[1] || (l[1] = (b) => e(a).name = b),
|
|
452
453
|
label: "Segment title",
|
|
453
|
-
schema: e(
|
|
454
|
+
schema: e(Le).typeAtPath(e(D), "name")
|
|
454
455
|
}, null, 8, ["modelValue", "schema"])),
|
|
455
|
-
e(m) ?
|
|
456
|
+
e(m) ? H("", !0) : (r(), k("div", It, [
|
|
456
457
|
l[11] || (l[11] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
|
|
457
|
-
d(
|
|
458
|
+
d(_t, {
|
|
458
459
|
"model-value": e(a).type,
|
|
459
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
460
|
-
|
|
460
|
+
"onUpdate:modelValue": l[2] || (l[2] = (b) => {
|
|
461
|
+
J(b);
|
|
461
462
|
})
|
|
462
463
|
}, null, 8, ["model-value"])
|
|
463
464
|
])),
|
|
464
|
-
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, [
|
|
465
466
|
l[12] || (l[12] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
|
|
466
|
-
d(
|
|
467
|
+
d(je, {
|
|
467
468
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
468
469
|
includeOnly: "user",
|
|
469
470
|
"model-value": (n = e(a)) == null ? void 0 : n.rule,
|
|
470
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
471
|
-
e(a).rule =
|
|
471
|
+
"onUpdate:modelValue": l[3] || (l[3] = (b) => {
|
|
472
|
+
e(a).rule = b;
|
|
472
473
|
})
|
|
473
474
|
}, null, 8, ["model-value"])
|
|
474
|
-
])) : e(m) ?
|
|
475
|
-
d(
|
|
475
|
+
])) : e(m) ? H("", !0) : (r(), k("div", Tt, [
|
|
476
|
+
d(ct, {
|
|
476
477
|
importFile: e(a).importFile,
|
|
477
|
-
"onUpdate:file": l[4] || (l[4] = (
|
|
478
|
-
e(a).file =
|
|
478
|
+
"onUpdate:file": l[4] || (l[4] = (b) => {
|
|
479
|
+
e(a).file = b;
|
|
479
480
|
})
|
|
480
481
|
}, null, 8, ["importFile"])
|
|
481
482
|
])),
|
|
482
|
-
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, [
|
|
483
484
|
l[13] || (l[13] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
|
|
484
|
-
d(
|
|
485
|
+
d(ne, {
|
|
485
486
|
"model-value": e(a).isActive ?? !0,
|
|
486
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
487
|
+
"onUpdate:modelValue": l[5] || (l[5] = (b) => e(a).isActive = b),
|
|
487
488
|
label: "Active",
|
|
488
489
|
sublabel: "When enabled, this will recalculate the segment statistics daily.",
|
|
489
490
|
"label-placement": "right"
|
|
490
491
|
}, null, 8, ["model-value"])
|
|
491
|
-
])) :
|
|
492
|
-
e(m) ? (r(), V(
|
|
492
|
+
])) : H("", !0),
|
|
493
|
+
e(m) ? (r(), V(_e, {
|
|
493
494
|
key: (F = e(a)._id) == null ? void 0 : F.toString(),
|
|
494
|
-
title: e(
|
|
495
|
+
title: e(S)("connect.loyalty.segment.default_segments.members"),
|
|
495
496
|
segment: e(a)
|
|
496
|
-
}, null, 8, ["title", "segment"])) :
|
|
497
|
+
}, null, 8, ["title", "segment"])) : H("", !0)
|
|
497
498
|
]))
|
|
498
499
|
];
|
|
499
500
|
}),
|
|
@@ -502,7 +503,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
502
503
|
e(u) && !e(m) ? {
|
|
503
504
|
name: "side-sheet-header",
|
|
504
505
|
fn: $(() => [
|
|
505
|
-
s("div",
|
|
506
|
+
s("div", xt, [
|
|
506
507
|
d(P, {
|
|
507
508
|
icon: "arrow_back",
|
|
508
509
|
variant: "tertiary",
|
|
@@ -516,79 +517,77 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
516
517
|
]), 1032, ["modelValue", "header"]);
|
|
517
518
|
};
|
|
518
519
|
}
|
|
519
|
-
}),
|
|
520
|
-
function
|
|
520
|
+
}), xe = He(), At = Ce();
|
|
521
|
+
function de(t) {
|
|
521
522
|
const f = se(t);
|
|
522
523
|
return f.isValid() ? f.format("DD/MM/YYYY") : "";
|
|
523
524
|
}
|
|
524
|
-
const
|
|
525
|
+
const Pt = {
|
|
525
526
|
mapMemberExportRow: (t) => {
|
|
526
|
-
var a, m, i, A, y, p, g,
|
|
527
|
-
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) => ({
|
|
528
529
|
label: C.name,
|
|
529
530
|
value: C._id
|
|
530
|
-
}))), c = (a =
|
|
531
|
+
}))), c = (a = Ue.parseOneAddress(
|
|
531
532
|
t == null ? void 0 : t.email
|
|
532
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(
|
|
533
|
-
(C,
|
|
534
|
-
var
|
|
535
|
-
const
|
|
536
|
-
(
|
|
537
|
-
)) == null ? void 0 :
|
|
538
|
-
return !
|
|
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;
|
|
539
540
|
},
|
|
540
541
|
[]
|
|
541
|
-
),
|
|
542
|
-
(C,
|
|
543
|
-
var
|
|
544
|
-
const
|
|
545
|
-
(
|
|
546
|
-
)) == null ? void 0 :
|
|
547
|
-
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;
|
|
548
549
|
},
|
|
549
550
|
{}
|
|
550
|
-
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((
|
|
551
|
-
(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,
|
|
552
553
|
0
|
|
553
|
-
)) || 0, T =
|
|
554
|
+
)) || 0, T = Ze(_, 2);
|
|
554
555
|
return {
|
|
555
556
|
ID: t._id.toString(),
|
|
556
557
|
Name: ((I = t.name) == null ? void 0 : I.trim()) || "",
|
|
557
|
-
Phone: ((
|
|
558
|
+
Phone: ((J = t == null ? void 0 : t.phoneNumber) == null ? void 0 : J.trim()) || "",
|
|
558
559
|
Email: c || "",
|
|
559
560
|
Gender: t.gender || "",
|
|
560
561
|
CardNo: t.cardNo || "",
|
|
561
|
-
Birthday: t != null && t.birthday ?
|
|
562
|
+
Birthday: t != null && t.birthday ? de(t == null ? void 0 : t.birthday) : "",
|
|
562
563
|
Credit: parseFloat((Number(T) - Number(u)).toFixed(2)),
|
|
563
564
|
FreeCredit: Number(u.toFixed(2)),
|
|
564
565
|
TotalCredit: Number(T),
|
|
565
|
-
Exp: t != null && t.collection ? ((l = (v = (
|
|
566
|
-
Point: t != null && t.collection ? ((
|
|
567
|
-
Level: t != null && t.collection ? ((n = (o = (
|
|
568
|
-
Tier: t != null && t.collection ? ((
|
|
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,
|
|
569
570
|
Titles: M.join(","),
|
|
570
|
-
...
|
|
571
|
+
...S,
|
|
571
572
|
TotalTransaction: t.stats.visitCount,
|
|
572
|
-
AvgSpent:
|
|
573
|
+
AvgSpent: Xe(Number(t.stats.avgBillSize || 0)).toFormat(
|
|
573
574
|
!1
|
|
574
575
|
),
|
|
575
576
|
TotalSpent: t.stats.avgBillSize * t.stats.visitCount,
|
|
576
|
-
LastVisit:
|
|
577
|
-
Feedback: ((
|
|
578
|
-
|
|
579
|
-
|
|
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) || "-",
|
|
577
|
+
LastVisit: de(t.stats.lastVisit),
|
|
578
|
+
Feedback: ((K = t.stats) == null ? void 0 : K.feedbackCount) || 0,
|
|
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) || "-",
|
|
582
581
|
VisitFrequency: `${Number(
|
|
583
582
|
Math.ceil(t.stats.avgVisitFrequency).toFixed(0)
|
|
584
583
|
)}`
|
|
585
584
|
};
|
|
586
585
|
}
|
|
587
|
-
},
|
|
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({
|
|
588
587
|
__name: "Segment",
|
|
589
588
|
setup(t) {
|
|
590
|
-
const { minor: f } =
|
|
591
|
-
function
|
|
589
|
+
const { minor: f } = Ae, { t: c } = me(), M = Ce(), { mapMemberExportRow: S } = Pt, _ = Pe(), u = et(), T = X(0);
|
|
590
|
+
function D(o) {
|
|
592
591
|
return !!o.defaultKey;
|
|
593
592
|
}
|
|
594
593
|
function a(o) {
|
|
@@ -608,9 +607,9 @@ const Nt = {
|
|
|
608
607
|
cell(o) {
|
|
609
608
|
return B("div", { class: "flex flex-wrap items-center gap-8" }, [
|
|
610
609
|
B("span", m(o.row.original)),
|
|
611
|
-
...
|
|
610
|
+
...D(o.row.original) ? [
|
|
612
611
|
B(ae.FmChip, {
|
|
613
|
-
class:
|
|
612
|
+
class: he,
|
|
614
613
|
label: c("connect.loyalty.segment.default_segments.system"),
|
|
615
614
|
compact: !0
|
|
616
615
|
})
|
|
@@ -664,7 +663,7 @@ const Nt = {
|
|
|
664
663
|
ae.FmMenuItem,
|
|
665
664
|
{
|
|
666
665
|
onClick: async (n) => {
|
|
667
|
-
n.stopPropagation(),
|
|
666
|
+
n.stopPropagation(), W(o.row.original);
|
|
668
667
|
}
|
|
669
668
|
},
|
|
670
669
|
{
|
|
@@ -677,12 +676,12 @@ const Nt = {
|
|
|
677
676
|
)
|
|
678
677
|
}
|
|
679
678
|
),
|
|
680
|
-
...
|
|
679
|
+
...D(o.row.original) ? [] : [
|
|
681
680
|
B(
|
|
682
681
|
ae.FmMenuItem,
|
|
683
682
|
{
|
|
684
683
|
onClick: async (n) => {
|
|
685
|
-
n.stopPropagation(),
|
|
684
|
+
n.stopPropagation(), J(o.row.original);
|
|
686
685
|
}
|
|
687
686
|
},
|
|
688
687
|
{
|
|
@@ -702,15 +701,15 @@ const Nt = {
|
|
|
702
701
|
]);
|
|
703
702
|
}
|
|
704
703
|
}
|
|
705
|
-
], y =
|
|
706
|
-
|
|
707
|
-
),
|
|
704
|
+
], y = X(null), { tableMeta: p, rowData: g, debouncedFetchData: x } = be(
|
|
705
|
+
Y.readAll
|
|
706
|
+
), q = z(() => g.value.length === 0 ? !1 : Be.some(
|
|
708
707
|
(o) => !g.value.some((n) => n.defaultKey === o)
|
|
709
708
|
));
|
|
710
|
-
async function
|
|
709
|
+
async function G() {
|
|
711
710
|
var o;
|
|
712
711
|
try {
|
|
713
|
-
await
|
|
712
|
+
await Y.refreshSegments(), _.open({ type: "info", title: "Segment refresh queued" });
|
|
714
713
|
} catch (n) {
|
|
715
714
|
if (((n == null ? void 0 : n.status) ?? ((o = n == null ? void 0 : n.response) == null ? void 0 : o.status)) === 409) {
|
|
716
715
|
_.open({
|
|
@@ -728,7 +727,7 @@ const Nt = {
|
|
|
728
727
|
async function I() {
|
|
729
728
|
await f(
|
|
730
729
|
async () => {
|
|
731
|
-
await
|
|
730
|
+
await Y.startDefaultSegments(), await x({ pageSize: 10, pageIndex: 0 });
|
|
732
731
|
},
|
|
733
732
|
{
|
|
734
733
|
message: c(
|
|
@@ -740,10 +739,10 @@ const Nt = {
|
|
|
740
739
|
}
|
|
741
740
|
);
|
|
742
741
|
}
|
|
743
|
-
async function
|
|
744
|
-
await
|
|
742
|
+
async function J(o) {
|
|
743
|
+
await $e.remove(`Are you sure you want to remove ${o.name}?`) && await f(
|
|
745
744
|
async () => {
|
|
746
|
-
await
|
|
745
|
+
await Y.delete(o._id), await x({ pageSize: 10, pageIndex: 0 });
|
|
747
746
|
},
|
|
748
747
|
{
|
|
749
748
|
message: `Removing ${o.name}`,
|
|
@@ -751,41 +750,41 @@ const Nt = {
|
|
|
751
750
|
}
|
|
752
751
|
);
|
|
753
752
|
}
|
|
754
|
-
async function
|
|
753
|
+
async function W(o) {
|
|
755
754
|
const n = {
|
|
756
755
|
sortBy: "_id",
|
|
757
756
|
descending: !1,
|
|
758
757
|
rowsPerPage: 1e3,
|
|
759
758
|
page: 1,
|
|
760
759
|
rowsNumber: 0
|
|
761
|
-
}, F = new
|
|
760
|
+
}, F = new Ve(), b = m(o), N = (await ge.read({
|
|
762
761
|
limit: 1,
|
|
763
762
|
skip: 0,
|
|
764
763
|
sortBy: n.sortBy,
|
|
765
764
|
descending: n.descending
|
|
766
|
-
})).meta.totalResources ?? 0,
|
|
765
|
+
})).meta.totalResources ?? 0, K = n.rowsPerPage;
|
|
767
766
|
await f(
|
|
768
767
|
async () => {
|
|
769
|
-
for (let L = 0; L <
|
|
770
|
-
const
|
|
768
|
+
for (let L = 0; L < N; L += K) {
|
|
769
|
+
const C = {
|
|
771
770
|
...n,
|
|
772
|
-
limit:
|
|
771
|
+
limit: K,
|
|
773
772
|
skip: n.page - 1,
|
|
774
773
|
sortBy: n.sortBy,
|
|
775
774
|
descending: n.descending
|
|
776
|
-
},
|
|
775
|
+
}, R = await Y.paginateSegmentUsers(
|
|
777
776
|
o._id,
|
|
778
|
-
|
|
777
|
+
C
|
|
779
778
|
);
|
|
780
|
-
for (const
|
|
781
|
-
const
|
|
782
|
-
F.addRecord(
|
|
779
|
+
for (const O of R.resources) {
|
|
780
|
+
const j = S(O);
|
|
781
|
+
F.addRecord(j);
|
|
783
782
|
}
|
|
784
783
|
n.page++;
|
|
785
784
|
}
|
|
786
|
-
await
|
|
785
|
+
await Fe(
|
|
787
786
|
F.buildExcel(),
|
|
788
|
-
`[${
|
|
787
|
+
`[${b}]-members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
789
788
|
{
|
|
790
789
|
bookType: "xlsx",
|
|
791
790
|
bookSST: !1,
|
|
@@ -806,11 +805,11 @@ const Nt = {
|
|
|
806
805
|
if (o.type === U.enum.STATIC) {
|
|
807
806
|
const F = new FormData();
|
|
808
807
|
if (F.append("file", o.file), o._id) {
|
|
809
|
-
const { members:
|
|
810
|
-
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);
|
|
811
810
|
} else {
|
|
812
|
-
const { file:
|
|
813
|
-
F.append("segment", JSON.stringify(
|
|
811
|
+
const { file: b, ...N } = o;
|
|
812
|
+
F.append("segment", JSON.stringify(N)), await Y.createStatic(F);
|
|
814
813
|
}
|
|
815
814
|
o.file && _.open({
|
|
816
815
|
type: "info",
|
|
@@ -818,17 +817,17 @@ const Nt = {
|
|
|
818
817
|
action: "View",
|
|
819
818
|
onAction: async () => {
|
|
820
819
|
await u.push({
|
|
821
|
-
name:
|
|
822
|
-
query: { type: [
|
|
820
|
+
name: ve["$connect-QUEUE"],
|
|
821
|
+
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
823
822
|
});
|
|
824
823
|
}
|
|
825
824
|
});
|
|
826
825
|
} else if (o._id) {
|
|
827
|
-
const { members: F, _id:
|
|
828
|
-
await
|
|
826
|
+
const { members: F, _id: b, ...N } = o;
|
|
827
|
+
await Y.update(o._id, N);
|
|
829
828
|
} else
|
|
830
|
-
await
|
|
831
|
-
await
|
|
829
|
+
await Y.create(o);
|
|
830
|
+
await x({ pageSize: 10, pageIndex: 0 }), (n = y.value) == null || n.hideSheet();
|
|
832
831
|
},
|
|
833
832
|
{
|
|
834
833
|
message: "Saving segment",
|
|
@@ -845,16 +844,16 @@ const Nt = {
|
|
|
845
844
|
value: "queue",
|
|
846
845
|
isPrimary: !1,
|
|
847
846
|
prependIcon: "work_history"
|
|
848
|
-
},
|
|
847
|
+
}, te = {
|
|
849
848
|
label: c("connect.loyalty.segment.default_segments.get_started.action"),
|
|
850
849
|
value: "start-default-segments",
|
|
851
850
|
isPrimary: !1,
|
|
852
851
|
prependIcon: "auto_awesome"
|
|
853
|
-
},
|
|
852
|
+
}, oe = z(() => {
|
|
854
853
|
if (!M.isPremium)
|
|
855
854
|
return [];
|
|
856
855
|
const o = [P];
|
|
857
|
-
return
|
|
856
|
+
return q.value && o.push(te), o.push(
|
|
858
857
|
{
|
|
859
858
|
label: c("connect.loyalty.segment.actions.refresh"),
|
|
860
859
|
value: "refresh",
|
|
@@ -868,18 +867,18 @@ const Nt = {
|
|
|
868
867
|
}
|
|
869
868
|
), o;
|
|
870
869
|
});
|
|
871
|
-
function
|
|
870
|
+
function ne(o) {
|
|
872
871
|
switch (o) {
|
|
873
872
|
case "add":
|
|
874
873
|
l();
|
|
875
874
|
break;
|
|
876
875
|
case "refresh":
|
|
877
|
-
|
|
876
|
+
G();
|
|
878
877
|
break;
|
|
879
878
|
case "queue":
|
|
880
879
|
u.push({
|
|
881
|
-
name:
|
|
882
|
-
query: { type: [
|
|
880
|
+
name: ve["$connect-QUEUE"],
|
|
881
|
+
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
883
882
|
});
|
|
884
883
|
break;
|
|
885
884
|
case "start-default-segments":
|
|
@@ -887,34 +886,34 @@ const Nt = {
|
|
|
887
886
|
break;
|
|
888
887
|
}
|
|
889
888
|
}
|
|
890
|
-
return
|
|
891
|
-
const { meta: o } = await
|
|
889
|
+
return Te(async () => {
|
|
890
|
+
const { meta: o } = await ge.read({
|
|
892
891
|
limit: 1,
|
|
893
892
|
skip: 0,
|
|
894
893
|
sortBy: "_id",
|
|
895
894
|
search: void 0,
|
|
896
895
|
descending: !1
|
|
897
896
|
});
|
|
898
|
-
T.value = o.totalResources ?? 0, await
|
|
897
|
+
T.value = o.totalResources ?? 0, await x({ pageSize: 10, pageIndex: 0 }), await M.readPremium(), await M.readLocations();
|
|
899
898
|
}), (o, n) => {
|
|
900
|
-
const F =
|
|
901
|
-
return r(), k(
|
|
902
|
-
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, {
|
|
903
902
|
title: "Segments",
|
|
904
|
-
actions: e(
|
|
905
|
-
"onClick:action": n[0] || (n[0] = (
|
|
903
|
+
actions: e(oe),
|
|
904
|
+
"onClick:action": n[0] || (n[0] = (w) => ne(w))
|
|
906
905
|
}, {
|
|
907
906
|
title: $(() => [
|
|
908
|
-
s("div",
|
|
909
|
-
s("span",
|
|
907
|
+
s("div", Nt, [
|
|
908
|
+
s("span", Rt, E(e(c)("connect.loyalty.segment.title")), 1),
|
|
910
909
|
d(F, { variant: "premium" })
|
|
911
910
|
])
|
|
912
911
|
]),
|
|
913
912
|
_: 1
|
|
914
913
|
}, 8, ["actions"]),
|
|
915
|
-
s("div",
|
|
916
|
-
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(
|
|
917
|
-
d(
|
|
914
|
+
s("div", Bt, [
|
|
915
|
+
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(ee, { key: 0 }, [
|
|
916
|
+
d(we, {
|
|
918
917
|
loading: e(p).isLoading,
|
|
919
918
|
"row-data": e(g),
|
|
920
919
|
"row-count": e(p).totalRows,
|
|
@@ -923,49 +922,49 @@ const Nt = {
|
|
|
923
922
|
"page-count": e(p).pageCount,
|
|
924
923
|
"page-index": e(p).pageIndex,
|
|
925
924
|
"page-size": e(p).pageSize,
|
|
926
|
-
onRowClick: n[1] || (n[1] = (
|
|
927
|
-
l(
|
|
925
|
+
onRowClick: n[1] || (n[1] = (w) => {
|
|
926
|
+
l(w.original);
|
|
928
927
|
}),
|
|
929
|
-
onPageChange: e(
|
|
928
|
+
onPageChange: e(x)
|
|
930
929
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
|
|
931
|
-
d(
|
|
930
|
+
d(O, { class: "w-full hidden xs:!block" }, {
|
|
932
931
|
default: $(() => [
|
|
933
|
-
(r(!0), k(
|
|
934
|
-
key:
|
|
932
|
+
(r(!0), k(ee, null, ue(e(g), (w) => (r(), V(R, {
|
|
933
|
+
key: w._id.toString(),
|
|
935
934
|
tag: "label",
|
|
936
|
-
onClick: (
|
|
935
|
+
onClick: (Z) => l(w)
|
|
937
936
|
}, {
|
|
938
937
|
default: $(() => [
|
|
939
938
|
s("div", null, [
|
|
940
|
-
s("div",
|
|
941
|
-
s("div",
|
|
942
|
-
s("span",
|
|
943
|
-
|
|
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, {
|
|
944
943
|
key: 0,
|
|
945
|
-
class:
|
|
944
|
+
class: ie(he),
|
|
946
945
|
label: e(c)("connect.loyalty.segment.default_segments.system"),
|
|
947
946
|
compact: ""
|
|
948
|
-
}, null, 8, ["label"])) :
|
|
947
|
+
}, null, 8, ["label"])) : H("", !0)
|
|
949
948
|
]),
|
|
950
|
-
s("div",
|
|
949
|
+
s("div", Yt, E(i(w.memberCount)) + "% of customers ", 1)
|
|
951
950
|
])
|
|
952
951
|
]),
|
|
953
952
|
append: $(() => [
|
|
954
|
-
d(
|
|
953
|
+
d(C, { "stop-click-propagation": !0 }, {
|
|
955
954
|
"menu-button": $(() => [
|
|
956
|
-
d(
|
|
955
|
+
d(K, { name: "more_vert" })
|
|
957
956
|
]),
|
|
958
957
|
default: $(() => [
|
|
959
958
|
d(L, {
|
|
960
959
|
class: "fm-typo-en-body-md-400",
|
|
961
960
|
label: "Export",
|
|
962
|
-
"onUpdate:modelValue": (
|
|
961
|
+
"onUpdate:modelValue": (Z) => Z && W(w)
|
|
963
962
|
}, null, 8, ["onUpdate:modelValue"]),
|
|
964
|
-
|
|
963
|
+
D(w) ? H("", !0) : (r(), V(L, {
|
|
965
964
|
key: 0,
|
|
966
965
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400",
|
|
967
966
|
label: "Remove",
|
|
968
|
-
"onUpdate:modelValue": (
|
|
967
|
+
"onUpdate:modelValue": (Z) => Z && J(w)
|
|
969
968
|
}, null, 8, ["onUpdate:modelValue"]))
|
|
970
969
|
]),
|
|
971
970
|
_: 2
|
|
@@ -983,26 +982,26 @@ const Nt = {
|
|
|
983
982
|
}, {
|
|
984
983
|
default: $(() => [
|
|
985
984
|
n[3] || (n[3] = s("img", {
|
|
986
|
-
src:
|
|
985
|
+
src: De,
|
|
987
986
|
class: "aspect-square w-[150px]"
|
|
988
987
|
}, null, -1)),
|
|
989
|
-
s("div",
|
|
990
|
-
s("div",
|
|
991
|
-
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)(
|
|
992
991
|
"connect.loyalty.segment.default_segments.get_started.description"
|
|
993
992
|
)), 1)
|
|
994
993
|
]),
|
|
995
|
-
d(
|
|
994
|
+
d(j, {
|
|
996
995
|
variant: "primary",
|
|
997
996
|
label: e(c)("connect.loyalty.segment.default_segments.get_started.action"),
|
|
998
997
|
disabled: !e(M).isPremium,
|
|
999
998
|
icon: "auto_awesome",
|
|
1000
|
-
onClick: n[2] || (n[2] = (
|
|
999
|
+
onClick: n[2] || (n[2] = (w) => I())
|
|
1001
1000
|
}, null, 8, ["label", "disabled"])
|
|
1002
1001
|
]),
|
|
1003
1002
|
_: 1
|
|
1004
1003
|
})),
|
|
1005
|
-
d(
|
|
1004
|
+
d($t, {
|
|
1006
1005
|
ref_key: "sheetRef",
|
|
1007
1006
|
ref: y,
|
|
1008
1007
|
"onUpdate:modelValue": v
|
|
@@ -1013,5 +1012,5 @@ const Nt = {
|
|
|
1013
1012
|
}
|
|
1014
1013
|
});
|
|
1015
1014
|
export {
|
|
1016
|
-
|
|
1015
|
+
Io as default
|
|
1017
1016
|
};
|