@feedmepos/mf-connect 0.1.111-prod → 0.1.113-beta.3
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-D3pYl3WL.js → App-YfpYV7C0.js} +738 -689
- package/dist/AuditLogs-kD0_HO_p.js +2016 -0
- package/dist/{Bin-DOZqpbYH.js → Bin-Dr-Xp3pn.js} +8 -8
- package/dist/Broadcast-CEbHu2xA.js +306 -0
- package/dist/{CampaignAnalytic-cFKvCgxX.js → CampaignAnalytic-DDiGxPwp.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B0eVEubS.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cc_Yho9-.js} +49 -32
- package/dist/Card-BUnwg0eM.js +1086 -0
- package/dist/{Collections-9QK5hbLo.js → Collections-CKyBkKq2.js} +197 -185
- package/dist/{Credit-8Ouy4O9a.js → Credit-CJOXWLV1.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CJA-yunY.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DmEBLeNI.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ce5R4Un6.js +4442 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Dv0q3B8m.js → EffectSheet.vue_vue_type_style_index_0_lang-CMFmlqfF.js} +32 -32
- package/dist/{Experience-DMh4hR1S.js → Experience-C_Am5CTY.js} +32 -31
- package/dist/{FileSaver.min-Bx9mdUgJ.js → FileSaver.min-CueAGbjq.js} +1 -1
- package/dist/{Game-CL0TZvg1.js → Game-B6GO_LVU.js} +19 -18
- package/dist/GiftCardSetup-CVLDDpI2.js +748 -0
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Bz5kIfoM.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-isfGhKO1.js} +7 -7
- package/dist/{Goals-Dz5Vp-lj.js → Goals-BX-sMV2V.js} +4 -4
- package/dist/Grab-Bh335Srh.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CaPDI3vY.js → ImageInput.vue_vue_type_script_setup_true_lang-srSgUY3e.js} +1 -1
- package/dist/{Index-kH8aAegB.js → Index-CyXRbwcm.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CFrgC3Ka.js → LocationPicker.vue_vue_type_script_setup_true_lang-S3GB2Ems.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DPIFLdBc.js → LottieAnimation.vue_vue_type_script_setup_true_lang-ZlWHXwXZ.js} +1 -1
- package/dist/{LoyaltyDashboard-BBxEoWol.js → LoyaltyDashboard-DrTq8oiu.js} +15 -15
- package/dist/MainLayout-KbKkpX5n.js +4 -0
- package/dist/{MainLayout-2BLwDyHQ.js → MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js} +5 -4
- package/dist/{Marketing-C4OnSV-c.js → Marketing-DQT1MWQg.js} +4 -4
- package/dist/MarketingMaterialEdit-fSqr53-M.js +1037 -0
- package/dist/{Member-CT9WwxP0.js → Member-DwDUCzlv.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C7yznkUn.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaQ4Lw8f.js} +43 -49
- package/dist/{MemberImportHistory-B__BFID7.js → MemberImportHistory-D4ezvJGZ.js} +7 -7
- package/dist/{MemberList-DgLI4wty.js → MemberList-DFieV7Qk.js} +103 -105
- package/dist/{MemberTransactions-UFx_DZYe.js → MemberTransactions-BPOXyAuC.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BFjZA8Y6.js → MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js} +4821 -4690
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Df9bxbUl.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CX8bk_IQ.js} +1 -1
- package/dist/{Mission-CawzGzDu.js → Mission-nErb05Es.js} +22 -21
- package/dist/{Overview-D19oSo24.js → Overview-7G31a7B-.js} +58 -56
- package/dist/{Overview-CAtTlEVa.js → Overview-DuJr_hAg.js} +145 -144
- package/dist/{Point-BPAGmKAj.js → Point-PWDLemD4.js} +22 -21
- package/dist/{Promotion-B0Uf9vjL.js → Promotion-N80Tj8M6.js} +137 -131
- package/dist/{Queue-CJEAFss_.js → Queue-M7ZpgiMT.js} +49 -47
- package/dist/{Record-s6hSQG2P.js → Record-NhxrdvWv.js} +9 -9
- package/dist/{Review-DhNCbAOm.js → Review-DiAaAzIG.js} +2 -2
- package/dist/ReviewFacebookCallback-JdyxFbNl.js +225 -0
- package/dist/{ReviewGoogleCallback-D8ENWii2.js → ReviewGoogleCallback-BXbI3Bsh.js} +5 -5
- package/dist/{Reward-BT00QsXL.js → Reward-yTaOqOT8.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DaZDGhbm.js → RewardGroup.vue_vue_type_script_setup_true_lang-BWPfjZ9K.js} +26 -24
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js +1923 -0
- package/dist/{Segment-BuGhX9zg.js → Segment-DE9Bcd6R.js} +287 -287
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DB718_4P.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-pmv0cb4J.js} +37 -35
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CkgXxy0C.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BeWwkTix.js} +4 -4
- package/dist/Setting-C0JAxIRT.js +574 -0
- package/dist/{SettingAdvertisements-aqFErKAr.js → SettingAdvertisements-DxueyKU8.js} +12 -12
- package/dist/Settings-Cs46AcxZ.js +286 -0
- package/dist/Store-DqQae9nE.js +2629 -0
- package/dist/{StoreRewards-D2pTL2oA.js → StoreRewards-JxSUsOzJ.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-qgrBtUNX.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D7ifzgsI.js +7007 -0
- package/dist/{Tier-OyE8oH2r.js → Tier-DWhgWush.js} +2576 -686
- package/dist/{Title-DAl7CKL_.js → Title-DUNeMdz8.js} +104 -101
- package/dist/Transaction-DAv-LVhC.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C0yHxQVr.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cih-9IoW.js} +26 -26
- package/dist/{Voucher-D2QGWSxs.js → Voucher-uLTq9RSK.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bt2YB745.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BevVL_Kx.js} +16 -16
- package/dist/WhatsappAccount-BpXQ4q0P.js +158 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js +39 -0
- package/dist/WhatsappBot-DB4NRZMd.js +589 -0
- package/dist/WhatsappBotLogs-DDN4H_bv.js +372 -0
- package/dist/WhatsappBotSettings-Bkv1VNwF.js +387 -0
- package/dist/WhatsappBotTickets-DAKgnE6T.js +162 -0
- package/dist/WhatsappLayout-DSnq84Uo.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-1BvxPD-k.js +195 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzCL64Jo.js → ZodTextField.vue_vue_type_script_setup_true_lang-CR-F0x1r.js} +2 -2
- package/dist/{app-QxosLNkH.js → app-Devzv4gO.js} +12854 -9732
- package/dist/app.js +4 -3
- package/dist/base.export-CCSMkvAm.js +75 -0
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-CbqG6NXr.js → business-BjAmUqNA.js} +1 -1
- package/dist/campaign-C5c47GqT.js +400 -0
- package/dist/{campaign-Rj7oDBnN.js → campaign-CTe-T5Gd.js} +31 -25
- package/dist/{campaign.enum-B7vdNYKd.js → campaign.enum-Dx-Zo68Q.js} +3 -2
- package/dist/campaign.fn-DxAO8A5b.js +776 -0
- package/dist/{collectible.enum-BsQseg7-.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-EbUIyB1X.js → collection.fn-C9l-OtNt.js} +2 -2
- package/dist/currency-mwm4AWXK.js +7 -0
- package/dist/duplicateCampaign-BbC4AwQ1.js +51 -0
- package/dist/{effect-B_91OlcX.js → effect-D8ba9z0K.js} +1 -1
- package/dist/{email-addresses-DXnYZG-e.js → email-addresses-BR5J6_Jz.js} +2 -2
- package/dist/feature-flag-C-5NdFW8.js +868 -0
- package/dist/feature-flag-CNcU4_3r.js +50 -0
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-_uhiXya1.js → helper-D9cEaMIv.js} +1 -1
- package/dist/index-0H82-X0n.js +80 -0
- package/dist/{index-Cp7oHMm3.js → index-B1jP-_Z_.js} +691 -229
- package/dist/{index-BZ2b0Pk6.js → index-B7HH6vKF.js} +8 -7
- package/dist/{index-tbo0pMIu.js → index-BFaZp6Et.js} +29 -15
- package/dist/index-B_gzo75q.js +53 -0
- package/dist/{index-DlQJZNwD.js → index-BfoDdVQS.js} +22 -6
- package/dist/{index-CDm0BWa3.js → index-BvY2hQac.js} +1 -1
- package/dist/index-Byg4ztr-.js +902 -0
- package/dist/{index-BWgc2-Qz.js → index-CZfqqrVu.js} +4 -3
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-xuFTeVrb.js → index-CmzjBrHR.js} +11 -9
- package/dist/{index-BBihP1s2.js → index-Ct6YjTIW.js} +2 -2
- package/dist/{index-Df4l6y-S.js → index-D34iYRdc.js} +1900 -2121
- package/dist/{index-DuhRCI0L.js → index-D4k1G2oE.js} +4 -4
- package/dist/{index-uuNGb1nv.js → index-DnepoNWn.js} +8028 -10766
- package/dist/index-Drmh0FT-.js +14571 -0
- package/dist/{index-DlGnYR5y.js → index-DtcUCknS.js} +2700 -2613
- package/dist/{index-C_1iqF1Q.js → index-DwTBiVts.js} +1 -1
- package/dist/{index-CWUmrVo_.js → index-OvnHt5x5.js} +800 -793
- package/dist/index-RwNlbTO8.js +115 -0
- package/dist/{index-CzYxnDWP.js → index-VqAbYyHH.js} +11 -6
- package/dist/{index-DzBzClHP.js → index-yGSko6Eq.js} +1 -1
- package/dist/{index.esm2017-B72iWwk_.js → index.esm2017-DLb2VyCT.js} +156 -156
- package/dist/{loading-rIhCiB_S.js → loading-CUNk5u1d.js} +1 -1
- package/dist/{lodash-B6fOjfjd.js → lodash-BJXravls.js} +1 -1
- package/dist/{member-import-CbHn7zss.js → member-import-DjYoddBi.js} +6 -5
- package/dist/{membership-DkJN7jyQ.js → membership-ByJUFP8f.js} +3 -3
- package/dist/{money-ChbDx6Nq.js → money-Bf2IEMJJ.js} +1 -1
- package/dist/{number-9TEd27Ku.js → number-CRBHrRUL.js} +1 -1
- package/dist/objectid-58gyOvdR.js +145 -0
- package/dist/{onboarding-BN3MKVRs.js → onboarding-CQ3lw7eY.js} +25 -25
- package/dist/{onboardingSetup-D9xhdgS3.js → onboardingSetup-CsdZKGFk.js} +2 -2
- package/dist/{plugins-CCibSJZa.js → plugins-iTZLbJGy.js} +3 -3
- package/dist/{MarketingMaterialEdit-DFhpsI2-.js → remy-icon-BhUGu2NI.js} +2 -1031
- package/dist/{reward-DjasF-NL.js → reward-DTN6JpEd.js} +1 -1
- package/dist/{rule-DqeChj0e.js → rule-BYACNQOL.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template--Vr0PCjB.js +188 -0
- package/dist/{timezone-D0nC1LDx.js → timezone-DwzjOED-.js} +1 -1
- package/dist/{transaction.fn-BkF4Ad2z.js → transaction.fn-DapYe3n7.js} +2 -2
- package/dist/{trigger-CxpXoQJO.js → trigger-D8r76yb0.js} +18 -18
- package/dist/{useMarketingMaterialActions-p0-fyMkm.js → useMarketingMaterialActions-CdMmibPE.js} +3 -3
- package/dist/{usePagination-CrC-1v4L.js → usePagination-BRcQJkO1.js} +1 -1
- package/dist/useWhatsappAccount-BOJ8fz84.js +62 -0
- package/dist/{user-CrylHgF1.js → user-vBZFKqXQ.js} +1 -1
- package/dist/vue-i18n-Cw6fF11e.js +2365 -0
- package/dist/{xlsx-CJNYF7-l.js → xlsx-Muy_Rjhk.js} +440 -440
- package/dist/{zod-Dzn9S95S.js → zod-CCPTOeUz.js} +1 -1
- package/package.json +12 -3
- package/dist/Broadcast-DZ4SP99P.js +0 -271
- package/dist/Card-B5ni027Q.js +0 -911
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYxswo-Z.js +0 -2430
- package/dist/ReviewFacebookCallback-DeZqcpJo.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BvxbKSkB.js +0 -1882
- package/dist/Setting-BOWPp05N.js +0 -2036
- package/dist/Settings-DekXvE-R.js +0 -179
- package/dist/Store-DpVlMuau.js +0 -1998
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNDv6eiZ.js +0 -1009
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-C-C3RSeW.js +0 -142
- package/dist/Transaction-mvKzTgLx.js +0 -39
- package/dist/campaign-Co4Lq-Wz.js +0 -228
- package/dist/campaign.fn-DolD3lYJ.js +0 -776
- package/dist/export-D0hWZSfH.js +0 -97
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/index-aCuOvuEC.js +0 -45
- package/dist/objectid-CGol1NeA.js +0 -145
- package/dist/rule-builder-DT854ycI.js +0 -102
- package/dist/template-BeCVA0-N.js +0 -236
- package/dist/vue-i18n-BjtkXdmG.js +0 -2365
|
@@ -1,65 +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 "./index-
|
|
12
|
-
import "./index-
|
|
13
|
-
import "./index-
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
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-iTZLbJGy.js";
|
|
4
|
+
import { u as Ae } from "./loading-CUNk5u1d.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-BRcQJkO1.js";
|
|
7
|
+
import { u as me } from "./vue-i18n-Cw6fF11e.js";
|
|
8
|
+
import { R as pe } from "./index-B1jP-_Z_.js";
|
|
9
|
+
import { i as Ne, j as U, D as Re, k as Be } from "./index-D34iYRdc.js";
|
|
10
|
+
import "./index-DtcUCknS.js";
|
|
11
|
+
import { F as fe } from "./index-DnepoNWn.js";
|
|
12
|
+
import { a as ye } from "./index-Byg4ztr-.js";
|
|
13
|
+
import "./index-B7HH6vKF.js";
|
|
14
|
+
import "./index-RwNlbTO8.js";
|
|
15
|
+
import "./index-CZfqqrVu.js";
|
|
16
|
+
import { u as re, w as Fe } from "./xlsx-Muy_Rjhk.js";
|
|
17
|
+
import { e as Ue, M as Ve } from "./email-addresses-BR5J6_Jz.js";
|
|
18
|
+
import { Z as Le } from "./zod-CCPTOeUz.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-CR-F0x1r.js";
|
|
22
|
+
import { a as je } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js";
|
|
23
|
+
import { u as qe, v as Ge, w as Je } from "./index.esm2017-DLb2VyCT.js";
|
|
24
|
+
import { F as Ke } from "./FileSaver.min-CueAGbjq.js";
|
|
23
25
|
import { h as se } from "./moment-D7p2TMB-.js";
|
|
24
|
-
import { s as
|
|
25
|
-
import { o as
|
|
26
|
-
import { J as
|
|
27
|
-
import { u as
|
|
28
|
-
import { f as
|
|
29
|
-
import { t as
|
|
30
|
-
import "./index-
|
|
31
|
-
import { useRouter as
|
|
32
|
-
import { m as
|
|
33
|
-
import { R as
|
|
34
|
-
const
|
|
35
|
-
_id:
|
|
36
|
-
business:
|
|
37
|
-
file:
|
|
26
|
+
import { s as Y, u as He } from "./membership-ByJUFP8f.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-BjAmUqNA.js";
|
|
30
|
+
import { f as Ze } from "./number-CRBHrRUL.js";
|
|
31
|
+
import { t as Xe } from "./money-Bf2IEMJJ.js";
|
|
32
|
+
import "./index-BvY2hQac.js";
|
|
33
|
+
import { useRouter as et } from "vue-router";
|
|
34
|
+
import { m as ge } from "./index-Ct6YjTIW.js";
|
|
35
|
+
import { R as ve } from "./app-Devzv4gO.js";
|
|
36
|
+
const tt = Ne.extend({
|
|
37
|
+
_id: fe.optional(),
|
|
38
|
+
business: fe.optional(),
|
|
39
|
+
file: ze.any().nullish()
|
|
38
40
|
});
|
|
39
|
-
var
|
|
40
|
-
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 = {
|
|
41
43
|
key: 0,
|
|
42
|
-
class: /* @__PURE__ */
|
|
44
|
+
class: /* @__PURE__ */ ie([
|
|
43
45
|
"p-16 pl-24 space-x-8",
|
|
44
46
|
"bg-fm-color-primary-oats rounded-lg",
|
|
45
47
|
"flex items-center",
|
|
46
48
|
"justify-between"
|
|
47
49
|
])
|
|
48
|
-
},
|
|
50
|
+
}, st = { class: "flex justify-end" }, lt = {
|
|
49
51
|
key: 1,
|
|
50
|
-
class: /* @__PURE__ */
|
|
52
|
+
class: /* @__PURE__ */ ie([
|
|
51
53
|
"flex items-center",
|
|
52
54
|
"border border-fm-color-neutral-gray-300",
|
|
53
55
|
"p-16 space-x-16 rounded-md"
|
|
54
56
|
])
|
|
55
|
-
},
|
|
57
|
+
}, it = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, ct = /* @__PURE__ */ le({
|
|
56
58
|
__name: "ImportSegment",
|
|
57
59
|
props: {
|
|
58
60
|
importFile: {}
|
|
59
61
|
},
|
|
60
62
|
emits: ["update:file"],
|
|
61
63
|
setup(t, { emit: f }) {
|
|
62
|
-
const c = t, M = f, { t:
|
|
64
|
+
const c = t, M = f, { t: S } = me(), _ = X(null), u = X(null), T = ["Id"], D = [
|
|
63
65
|
{
|
|
64
66
|
label: "CSV",
|
|
65
67
|
icon: "csv",
|
|
@@ -74,10 +76,10 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
74
76
|
async function a() {
|
|
75
77
|
if (c.importFile)
|
|
76
78
|
try {
|
|
77
|
-
const y =
|
|
79
|
+
const y = qe(void 0, ot.importFilesBucketUrl), p = Ge(y, c.importFile), g = await Je(p);
|
|
78
80
|
window.open(g, "_blank");
|
|
79
81
|
} catch (y) {
|
|
80
|
-
console.log(y),
|
|
82
|
+
console.log(y), Ee.error("Failed to download uploaded file");
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
async function m(y) {
|
|
@@ -86,11 +88,11 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
86
88
|
const p = new Blob([T.join(",")], {
|
|
87
89
|
type: "text/csv;charset=utf-8;"
|
|
88
90
|
});
|
|
89
|
-
|
|
91
|
+
Ke.saveAs(p, "ImportSegmentTemplate.csv");
|
|
90
92
|
break;
|
|
91
93
|
case "xlsx":
|
|
92
|
-
const g =
|
|
93
|
-
|
|
94
|
+
const g = re.aoa_to_sheet([T]), x = re.book_new();
|
|
95
|
+
re.book_append_sheet(x, g, "Sheet1"), Fe(x, "ImportSegmentTemplate.xlsx");
|
|
94
96
|
break;
|
|
95
97
|
}
|
|
96
98
|
}
|
|
@@ -98,25 +100,25 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
98
100
|
_.value = y, M("update:file", _.value);
|
|
99
101
|
}
|
|
100
102
|
function A(y) {
|
|
101
|
-
var g,
|
|
102
|
-
const p = ((
|
|
103
|
+
var g, x;
|
|
104
|
+
const p = ((x = (g = y.target) == null ? void 0 : g.files) == null ? void 0 : x[0]) ?? null;
|
|
103
105
|
i(p);
|
|
104
106
|
}
|
|
105
107
|
return (y, p) => {
|
|
106
|
-
const g =
|
|
107
|
-
return r(), k("div",
|
|
108
|
+
const g = h("FmButton"), x = h("FmMenuItem"), q = h("FmMenu"), G = h("FmDropField");
|
|
109
|
+
return r(), k("div", nt, [
|
|
108
110
|
p[2] || (p[2] = s("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
|
|
109
|
-
t.importFile ? (r(), k("div",
|
|
111
|
+
t.importFile ? (r(), k("div", at, [
|
|
110
112
|
d(g, {
|
|
111
|
-
label: e(
|
|
112
|
-
variant: e(
|
|
113
|
+
label: e(S)("View uploaded file"),
|
|
114
|
+
variant: e(ce).Plain,
|
|
113
115
|
icon: "file_present",
|
|
114
116
|
onClick: a
|
|
115
117
|
}, null, 8, ["label", "variant"])
|
|
116
|
-
])) :
|
|
118
|
+
])) : H("", !0),
|
|
117
119
|
s("div", null, [
|
|
118
|
-
s("div",
|
|
119
|
-
d(
|
|
120
|
+
s("div", st, [
|
|
121
|
+
d(q, { class: "" }, {
|
|
120
122
|
"menu-button": $(() => [
|
|
121
123
|
d(g, {
|
|
122
124
|
variant: "tertiary",
|
|
@@ -125,31 +127,31 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
125
127
|
})
|
|
126
128
|
]),
|
|
127
129
|
default: $(() => [
|
|
128
|
-
(r(), k(
|
|
130
|
+
(r(), k(ee, null, ue(D, (I) => d(x, {
|
|
129
131
|
key: I.value,
|
|
130
132
|
icon: I.icon,
|
|
131
133
|
label: I.label,
|
|
132
|
-
onClick: (
|
|
134
|
+
onClick: (J) => m(I.value),
|
|
133
135
|
selectable: ""
|
|
134
136
|
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
135
137
|
]),
|
|
136
138
|
_: 1
|
|
137
139
|
})
|
|
138
140
|
]),
|
|
139
|
-
_.value ? (r(), k("div",
|
|
141
|
+
_.value ? (r(), k("div", lt, [
|
|
140
142
|
d(g, {
|
|
141
|
-
variant: e(
|
|
143
|
+
variant: e(ce).Tertiary,
|
|
142
144
|
"prepend-icon": "attach_file"
|
|
143
145
|
}, null, 8, ["variant"]),
|
|
144
|
-
s("p",
|
|
146
|
+
s("p", it, E(_.value.name), 1),
|
|
145
147
|
s("label", {
|
|
146
148
|
ref_key: "fileLabelRef",
|
|
147
149
|
ref: u,
|
|
148
150
|
htmlFor: "file"
|
|
149
151
|
}, [
|
|
150
152
|
d(g, {
|
|
151
|
-
variant: e(
|
|
152
|
-
label: e(
|
|
153
|
+
variant: e(ce).Plain,
|
|
154
|
+
label: e(S)("Replace File"),
|
|
153
155
|
onClick: p[1] || (p[1] = () => {
|
|
154
156
|
var I;
|
|
155
157
|
return (I = u.value) == null ? void 0 : I.click();
|
|
@@ -164,7 +166,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
164
166
|
onChange: A
|
|
165
167
|
}, null, 32)
|
|
166
168
|
], 512)
|
|
167
|
-
])) : (r(), V(
|
|
169
|
+
])) : (r(), V(G, {
|
|
168
170
|
key: 0,
|
|
169
171
|
onFileUpload: p[0] || (p[0] = (I) => i(I)),
|
|
170
172
|
accept: ".csv, .xlsx",
|
|
@@ -174,18 +176,18 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
174
176
|
]);
|
|
175
177
|
};
|
|
176
178
|
}
|
|
177
|
-
}),
|
|
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({
|
|
178
180
|
__name: "ReviewSegment",
|
|
179
181
|
props: {
|
|
180
182
|
title: {},
|
|
181
183
|
segment: {}
|
|
182
184
|
},
|
|
183
185
|
setup(t) {
|
|
184
|
-
const f = t, c =
|
|
186
|
+
const f = t, c = z(
|
|
185
187
|
() => f.segment.memberCount ?? f.segment.members.length
|
|
186
|
-
), M =
|
|
188
|
+
), M = z(
|
|
187
189
|
() => f.segment.lastUpdated ? se(f.segment.lastUpdated).format("DD MMM YYYY") : "Not refreshed yet"
|
|
188
|
-
),
|
|
190
|
+
), S = [
|
|
189
191
|
{
|
|
190
192
|
header: "Name",
|
|
191
193
|
accessorFn: (i) => i.name
|
|
@@ -196,7 +198,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
196
198
|
},
|
|
197
199
|
{
|
|
198
200
|
header: "Customer Since",
|
|
199
|
-
accessorFn: (i) => se(
|
|
201
|
+
accessorFn: (i) => se(We(i._id.toString())).format("DD MMM YYYY")
|
|
200
202
|
},
|
|
201
203
|
{
|
|
202
204
|
header: "Phone",
|
|
@@ -212,7 +214,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
212
214
|
}
|
|
213
215
|
];
|
|
214
216
|
async function _(i) {
|
|
215
|
-
return f.segment._id ? (console.log(i), await
|
|
217
|
+
return f.segment._id ? (console.log(i), await Y.paginateSegmentUsers(
|
|
216
218
|
f.segment._id,
|
|
217
219
|
i
|
|
218
220
|
)) : {
|
|
@@ -226,32 +228,32 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
226
228
|
}
|
|
227
229
|
};
|
|
228
230
|
}
|
|
229
|
-
const { tableMeta: u, rowData: T, onSort:
|
|
230
|
-
return
|
|
231
|
+
const { tableMeta: u, rowData: T, onSort: D, debouncedFetchData: a, onSearch: m } = be(_);
|
|
232
|
+
return Se(async () => {
|
|
231
233
|
await a();
|
|
232
|
-
}), (i, A) => (r(), k("div",
|
|
233
|
-
s("div",
|
|
234
|
-
s("div",
|
|
235
|
-
s("div",
|
|
236
|
-
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, [
|
|
237
239
|
A[1] || (A[1] = s("div", null, "contacts in your segment", -1)),
|
|
238
|
-
s("div", null, "as of " +
|
|
240
|
+
s("div", null, "as of " + E(e(M)), 1)
|
|
239
241
|
])
|
|
240
242
|
]),
|
|
241
|
-
d(
|
|
243
|
+
d(we, {
|
|
242
244
|
loading: e(u).isLoading,
|
|
243
245
|
"row-data": e(T),
|
|
244
246
|
"row-count": e(u).totalRows,
|
|
245
|
-
"column-defs":
|
|
247
|
+
"column-defs": S,
|
|
246
248
|
"page-size": e(u).pageSize,
|
|
247
249
|
"page-count": e(u).pageCount,
|
|
248
250
|
"page-index": e(u).pageIndex,
|
|
249
|
-
onSortChange: e(
|
|
251
|
+
onSortChange: e(D),
|
|
250
252
|
onPageChange: A[0] || (A[0] = (y) => e(a)({ pageSize: y.pageSize, pageIndex: y.pageIndex }))
|
|
251
253
|
}, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
|
|
252
254
|
]));
|
|
253
255
|
}
|
|
254
|
-
}),
|
|
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({
|
|
255
257
|
__name: "SegmentTypeOption",
|
|
256
258
|
props: {
|
|
257
259
|
modelValue: {},
|
|
@@ -259,7 +261,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
259
261
|
},
|
|
260
262
|
emits: ["update:model-value"],
|
|
261
263
|
setup(t, { emit: f }) {
|
|
262
|
-
const c = t, M = f,
|
|
264
|
+
const c = t, M = f, S = [
|
|
263
265
|
{
|
|
264
266
|
label: "Dynamic",
|
|
265
267
|
sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
|
|
@@ -275,13 +277,13 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
275
277
|
u !== c.modelValue && M("update:model-value", u);
|
|
276
278
|
}
|
|
277
279
|
return (u, T) => {
|
|
278
|
-
const
|
|
279
|
-
return r(), k("div",
|
|
280
|
-
s("div",
|
|
281
|
-
(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, {
|
|
282
284
|
variant: "outlined",
|
|
283
|
-
class:
|
|
284
|
-
"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,
|
|
285
287
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": t.modelValue === m.value,
|
|
286
288
|
"hover:bg-fm-color-opacity-sm": t.modelValue !== m.value
|
|
287
289
|
}]),
|
|
@@ -289,8 +291,8 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
289
291
|
key: m.value
|
|
290
292
|
}, {
|
|
291
293
|
default: $(() => [
|
|
292
|
-
s("div",
|
|
293
|
-
s("div",
|
|
294
|
+
s("div", gt, E(m.label), 1),
|
|
295
|
+
s("div", vt, E(m.sublabel), 1)
|
|
294
296
|
]),
|
|
295
297
|
_: 2
|
|
296
298
|
}, 1032, ["class", "onClick"])), 64))
|
|
@@ -300,47 +302,47 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
300
302
|
class: "!mt-4",
|
|
301
303
|
text: t.errorText,
|
|
302
304
|
state: "error"
|
|
303
|
-
}, null, 8, ["text"])) :
|
|
305
|
+
}, null, 8, ["text"])) : H("", !0)
|
|
304
306
|
]);
|
|
305
307
|
};
|
|
306
308
|
}
|
|
307
|
-
}),
|
|
309
|
+
}), xt = { class: "flex items-center gap-x-8" }, ht = {
|
|
308
310
|
key: 0,
|
|
309
311
|
class: "space-y-16 pr-12"
|
|
310
|
-
},
|
|
312
|
+
}, St = {
|
|
311
313
|
key: 0,
|
|
312
314
|
class: "flex flex-col gap-12"
|
|
313
|
-
},
|
|
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 = {
|
|
314
316
|
key: 2,
|
|
315
317
|
class: "flex flex-col space-y-16"
|
|
316
|
-
},
|
|
318
|
+
}, Mt = {
|
|
317
319
|
key: 3,
|
|
318
320
|
class: "flex flex-col space-y-16"
|
|
319
|
-
},
|
|
321
|
+
}, Tt = {
|
|
320
322
|
key: 4,
|
|
321
323
|
class: "flex flex-col space-y-16"
|
|
322
|
-
},
|
|
324
|
+
}, Dt = {
|
|
323
325
|
key: 5,
|
|
324
326
|
class: "flex flex-col space-y-16"
|
|
325
|
-
},
|
|
327
|
+
}, Et = { class: "flex items-center gap-8" }, $t = /* @__PURE__ */ le({
|
|
326
328
|
__name: "SegmentSheet",
|
|
327
329
|
emits: ["update:model-value"],
|
|
328
330
|
setup(t, { expose: f, emit: c }) {
|
|
329
|
-
const M =
|
|
331
|
+
const M = Ye(), { t: S } = me(), _ = X(!1), u = X(!1), T = {
|
|
330
332
|
name: "",
|
|
331
333
|
isActive: !0,
|
|
332
334
|
type: U.enum.DYNAMIC,
|
|
333
|
-
rule:
|
|
335
|
+
rule: pe.scaffoldGroup(),
|
|
334
336
|
members: []
|
|
335
|
-
},
|
|
337
|
+
}, D = tt, a = X(T), m = z(() => !!a.value.defaultKey), i = z(
|
|
336
338
|
() => a.value.defaultKey ? `connect.loyalty.segment.default_segments.${a.value.defaultKey.toLowerCase()}` : void 0
|
|
337
|
-
), A =
|
|
338
|
-
() => i.value ?
|
|
339
|
-
), y =
|
|
339
|
+
), A = z(
|
|
340
|
+
() => i.value ? S(`${i.value}.name`) : a.value.name
|
|
341
|
+
), y = z(() => {
|
|
340
342
|
const v = a.value.defaultKey;
|
|
341
|
-
return v ?
|
|
342
|
-
}), p =
|
|
343
|
-
const v =
|
|
343
|
+
return v ? S(Re[v]) : a.value.description ?? "";
|
|
344
|
+
}), p = z(() => {
|
|
345
|
+
const v = D.safeParse(a.value);
|
|
344
346
|
return v.success ? [] : v.error.errors;
|
|
345
347
|
});
|
|
346
348
|
function g(v) {
|
|
@@ -350,45 +352,45 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
350
352
|
type: v.type ?? (v.importFile ? U.enum.STATIC : U.enum.DYNAMIC)
|
|
351
353
|
} : a.value = { ...T };
|
|
352
354
|
}
|
|
353
|
-
function
|
|
355
|
+
function x() {
|
|
354
356
|
_.value = !1;
|
|
355
357
|
}
|
|
356
|
-
async function
|
|
357
|
-
|
|
358
|
+
async function q() {
|
|
359
|
+
D.safeParse(a.value).success && (u.value = !0);
|
|
358
360
|
}
|
|
359
|
-
function
|
|
360
|
-
v === U.enum.STATIC ?
|
|
361
|
+
function G(v) {
|
|
362
|
+
v === U.enum.STATIC ? x() : u.value = !1;
|
|
361
363
|
}
|
|
362
364
|
async function I() {
|
|
363
|
-
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);
|
|
364
366
|
}
|
|
365
|
-
async function
|
|
367
|
+
async function J(v) {
|
|
366
368
|
a.value.type = v;
|
|
367
369
|
}
|
|
368
|
-
|
|
370
|
+
Se(async () => {
|
|
369
371
|
});
|
|
370
|
-
const
|
|
372
|
+
const W = c;
|
|
371
373
|
return f({
|
|
372
374
|
showSheet: g,
|
|
373
|
-
hideSheet:
|
|
375
|
+
hideSheet: x
|
|
374
376
|
}), (v, l) => {
|
|
375
|
-
const P =
|
|
377
|
+
const P = h("FmButton"), te = h("FmChip"), oe = h("FmCard"), ne = h("FmSwitch"), o = h("FmSideSheet");
|
|
376
378
|
return r(), V(o, {
|
|
377
379
|
modelValue: e(_),
|
|
378
|
-
"onUpdate:modelValue": l[9] || (l[9] = (n) =>
|
|
379
|
-
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",
|
|
380
382
|
"dismiss-away": "",
|
|
381
383
|
"close-button": !0,
|
|
382
384
|
"max-width": 1100
|
|
383
|
-
},
|
|
385
|
+
}, Me({
|
|
384
386
|
"side-sheet-footer": $(() => [
|
|
385
|
-
s("div",
|
|
387
|
+
s("div", Et, [
|
|
386
388
|
e(m) ? (r(), V(P, {
|
|
387
389
|
key: 0,
|
|
388
|
-
label: e(
|
|
389
|
-
onClick: l[6] || (l[6] = (n) =>
|
|
390
|
+
label: e(S)("connect.loyalty.segment.default_segments.close"),
|
|
391
|
+
onClick: l[6] || (l[6] = (n) => x()),
|
|
390
392
|
variant: "tertiary"
|
|
391
|
-
}, 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 }, [
|
|
392
394
|
d(P, {
|
|
393
395
|
label: "Save Segment",
|
|
394
396
|
onClick: I,
|
|
@@ -397,18 +399,18 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
397
399
|
}, null, 8, ["loading", "disabled"]),
|
|
398
400
|
d(P, {
|
|
399
401
|
label: "Cancel",
|
|
400
|
-
onClick: l[7] || (l[7] = (n) =>
|
|
402
|
+
onClick: l[7] || (l[7] = (n) => G(e(a).type)),
|
|
401
403
|
variant: "tertiary"
|
|
402
404
|
})
|
|
403
|
-
], 64)) : (r(), k(
|
|
405
|
+
], 64)) : (r(), k(ee, { key: 2 }, [
|
|
404
406
|
d(P, {
|
|
405
407
|
label: "Review Segment",
|
|
406
408
|
disabled: e(p).length > 0 || e(M).isLoading,
|
|
407
|
-
onClick:
|
|
409
|
+
onClick: q
|
|
408
410
|
}, null, 8, ["disabled"]),
|
|
409
411
|
d(P, {
|
|
410
412
|
label: "Cancel",
|
|
411
|
-
onClick: l[8] || (l[8] = (n) =>
|
|
413
|
+
onClick: l[8] || (l[8] = (n) => x()),
|
|
412
414
|
variant: "tertiary"
|
|
413
415
|
})
|
|
414
416
|
], 64))
|
|
@@ -417,82 +419,82 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
417
419
|
default: $(() => {
|
|
418
420
|
var n, F;
|
|
419
421
|
return [
|
|
420
|
-
d(
|
|
421
|
-
e(u) ? (r(), V(
|
|
422
|
+
d(Qe, { json: e(a) }, null, 8, ["json"]),
|
|
423
|
+
e(u) ? (r(), V(_e, {
|
|
422
424
|
key: 1,
|
|
423
425
|
title: e(a).name,
|
|
424
426
|
segment: e(a)
|
|
425
|
-
}, null, 8, ["title", "segment"])) : (r(), k("div",
|
|
426
|
-
e(m) ? (r(), k("div",
|
|
427
|
-
s("div",
|
|
428
|
-
s("div",
|
|
429
|
-
d(
|
|
430
|
-
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"),
|
|
431
433
|
compact: "",
|
|
432
434
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100"
|
|
433
435
|
}, null, 8, ["label"])
|
|
434
436
|
]),
|
|
435
|
-
d(
|
|
437
|
+
d(oe, {
|
|
436
438
|
variant: "outlined",
|
|
437
439
|
class: "p-16"
|
|
438
440
|
}, {
|
|
439
441
|
default: $(() => [
|
|
440
|
-
s("div",
|
|
441
|
-
s("div",
|
|
442
|
-
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)
|
|
443
445
|
])
|
|
444
446
|
]),
|
|
445
447
|
_: 1
|
|
446
448
|
})
|
|
447
|
-
])) : (r(), V(
|
|
449
|
+
])) : (r(), V(Oe, {
|
|
448
450
|
key: 1,
|
|
449
451
|
modelValue: e(a).name,
|
|
450
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
452
|
+
"onUpdate:modelValue": l[1] || (l[1] = (b) => e(a).name = b),
|
|
451
453
|
label: "Segment title",
|
|
452
|
-
schema: e(
|
|
454
|
+
schema: e(Le).typeAtPath(e(D), "name")
|
|
453
455
|
}, null, 8, ["modelValue", "schema"])),
|
|
454
|
-
e(m) ?
|
|
456
|
+
e(m) ? H("", !0) : (r(), k("div", It, [
|
|
455
457
|
l[11] || (l[11] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
|
|
456
|
-
d(
|
|
458
|
+
d(_t, {
|
|
457
459
|
"model-value": e(a).type,
|
|
458
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
459
|
-
|
|
460
|
+
"onUpdate:modelValue": l[2] || (l[2] = (b) => {
|
|
461
|
+
J(b);
|
|
460
462
|
})
|
|
461
463
|
}, null, 8, ["model-value"])
|
|
462
464
|
])),
|
|
463
|
-
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, [
|
|
464
466
|
l[12] || (l[12] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
|
|
465
|
-
d(
|
|
467
|
+
d(je, {
|
|
466
468
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
467
469
|
includeOnly: "user",
|
|
468
470
|
"model-value": (n = e(a)) == null ? void 0 : n.rule,
|
|
469
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
470
|
-
e(a).rule =
|
|
471
|
+
"onUpdate:modelValue": l[3] || (l[3] = (b) => {
|
|
472
|
+
e(a).rule = b;
|
|
471
473
|
})
|
|
472
474
|
}, null, 8, ["model-value"])
|
|
473
|
-
])) : e(m) ?
|
|
474
|
-
d(
|
|
475
|
+
])) : e(m) ? H("", !0) : (r(), k("div", Tt, [
|
|
476
|
+
d(ct, {
|
|
475
477
|
importFile: e(a).importFile,
|
|
476
|
-
"onUpdate:file": l[4] || (l[4] = (
|
|
477
|
-
e(a).file =
|
|
478
|
+
"onUpdate:file": l[4] || (l[4] = (b) => {
|
|
479
|
+
e(a).file = b;
|
|
478
480
|
})
|
|
479
481
|
}, null, 8, ["importFile"])
|
|
480
482
|
])),
|
|
481
|
-
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, [
|
|
482
484
|
l[13] || (l[13] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
|
|
483
|
-
d(
|
|
485
|
+
d(ne, {
|
|
484
486
|
"model-value": e(a).isActive ?? !0,
|
|
485
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
487
|
+
"onUpdate:modelValue": l[5] || (l[5] = (b) => e(a).isActive = b),
|
|
486
488
|
label: "Active",
|
|
487
489
|
sublabel: "When enabled, this will recalculate the segment statistics daily.",
|
|
488
490
|
"label-placement": "right"
|
|
489
491
|
}, null, 8, ["model-value"])
|
|
490
|
-
])) :
|
|
491
|
-
e(m) ? (r(), V(
|
|
492
|
+
])) : H("", !0),
|
|
493
|
+
e(m) ? (r(), V(_e, {
|
|
492
494
|
key: (F = e(a)._id) == null ? void 0 : F.toString(),
|
|
493
|
-
title: e(
|
|
495
|
+
title: e(S)("connect.loyalty.segment.default_segments.members"),
|
|
494
496
|
segment: e(a)
|
|
495
|
-
}, null, 8, ["title", "segment"])) :
|
|
497
|
+
}, null, 8, ["title", "segment"])) : H("", !0)
|
|
496
498
|
]))
|
|
497
499
|
];
|
|
498
500
|
}),
|
|
@@ -501,7 +503,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
501
503
|
e(u) && !e(m) ? {
|
|
502
504
|
name: "side-sheet-header",
|
|
503
505
|
fn: $(() => [
|
|
504
|
-
s("div",
|
|
506
|
+
s("div", xt, [
|
|
505
507
|
d(P, {
|
|
506
508
|
icon: "arrow_back",
|
|
507
509
|
variant: "tertiary",
|
|
@@ -515,79 +517,77 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
515
517
|
]), 1032, ["modelValue", "header"]);
|
|
516
518
|
};
|
|
517
519
|
}
|
|
518
|
-
}),
|
|
519
|
-
function
|
|
520
|
+
}), xe = He(), At = Ce();
|
|
521
|
+
function de(t) {
|
|
520
522
|
const f = se(t);
|
|
521
523
|
return f.isValid() ? f.format("DD/MM/YYYY") : "";
|
|
522
524
|
}
|
|
523
|
-
const
|
|
525
|
+
const Pt = {
|
|
524
526
|
mapMemberExportRow: (t) => {
|
|
525
|
-
var a, m, i, A, y, p, g,
|
|
526
|
-
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) => ({
|
|
527
529
|
label: C.name,
|
|
528
530
|
value: C._id
|
|
529
|
-
}))), c = (a =
|
|
531
|
+
}))), c = (a = Ue.parseOneAddress(
|
|
530
532
|
t == null ? void 0 : t.email
|
|
531
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(
|
|
532
|
-
(C,
|
|
533
|
-
var
|
|
534
|
-
const
|
|
535
|
-
(
|
|
536
|
-
)) == null ? void 0 :
|
|
537
|
-
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;
|
|
538
540
|
},
|
|
539
541
|
[]
|
|
540
|
-
),
|
|
541
|
-
(C,
|
|
542
|
-
var
|
|
543
|
-
const
|
|
544
|
-
(
|
|
545
|
-
)) == null ? void 0 :
|
|
546
|
-
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;
|
|
547
549
|
},
|
|
548
550
|
{}
|
|
549
|
-
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((
|
|
550
|
-
(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,
|
|
551
553
|
0
|
|
552
|
-
)) || 0, T =
|
|
554
|
+
)) || 0, T = Ze(_, 2);
|
|
553
555
|
return {
|
|
554
556
|
ID: t._id.toString(),
|
|
555
557
|
Name: ((I = t.name) == null ? void 0 : I.trim()) || "",
|
|
556
|
-
Phone: ((
|
|
558
|
+
Phone: ((J = t == null ? void 0 : t.phoneNumber) == null ? void 0 : J.trim()) || "",
|
|
557
559
|
Email: c || "",
|
|
558
560
|
Gender: t.gender || "",
|
|
559
561
|
CardNo: t.cardNo || "",
|
|
560
|
-
Birthday: t != null && t.birthday ?
|
|
562
|
+
Birthday: t != null && t.birthday ? de(t == null ? void 0 : t.birthday) : "",
|
|
561
563
|
Credit: parseFloat((Number(T) - Number(u)).toFixed(2)),
|
|
562
564
|
FreeCredit: Number(u.toFixed(2)),
|
|
563
565
|
TotalCredit: Number(T),
|
|
564
|
-
Exp: t != null && t.collection ? ((l = (v = (
|
|
565
|
-
Point: t != null && t.collection ? ((
|
|
566
|
-
Level: t != null && t.collection ? ((n = (o = (
|
|
567
|
-
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,
|
|
568
570
|
Titles: M.join(","),
|
|
569
|
-
...
|
|
571
|
+
...S,
|
|
570
572
|
TotalTransaction: t.stats.visitCount,
|
|
571
|
-
AvgSpent:
|
|
573
|
+
AvgSpent: Xe(Number(t.stats.avgBillSize || 0)).toFormat(
|
|
572
574
|
!1
|
|
573
575
|
),
|
|
574
576
|
TotalSpent: t.stats.avgBillSize * t.stats.visitCount,
|
|
575
|
-
LastVisit:
|
|
576
|
-
Feedback: ((
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
JoinedAt: ue(t.joinAt || void 0),
|
|
580
|
-
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) || "-",
|
|
581
581
|
VisitFrequency: `${Number(
|
|
582
582
|
Math.ceil(t.stats.avgVisitFrequency).toFixed(0)
|
|
583
583
|
)}`
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
},
|
|
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({
|
|
587
587
|
__name: "Segment",
|
|
588
588
|
setup(t) {
|
|
589
|
-
const { minor: f } =
|
|
590
|
-
function
|
|
589
|
+
const { minor: f } = Ae, { t: c } = me(), M = Ce(), { mapMemberExportRow: S } = Pt, _ = Pe(), u = et(), T = X(0);
|
|
590
|
+
function D(o) {
|
|
591
591
|
return !!o.defaultKey;
|
|
592
592
|
}
|
|
593
593
|
function a(o) {
|
|
@@ -607,9 +607,9 @@ const Nt = {
|
|
|
607
607
|
cell(o) {
|
|
608
608
|
return B("div", { class: "flex flex-wrap items-center gap-8" }, [
|
|
609
609
|
B("span", m(o.row.original)),
|
|
610
|
-
...
|
|
610
|
+
...D(o.row.original) ? [
|
|
611
611
|
B(ae.FmChip, {
|
|
612
|
-
class:
|
|
612
|
+
class: he,
|
|
613
613
|
label: c("connect.loyalty.segment.default_segments.system"),
|
|
614
614
|
compact: !0
|
|
615
615
|
})
|
|
@@ -663,7 +663,7 @@ const Nt = {
|
|
|
663
663
|
ae.FmMenuItem,
|
|
664
664
|
{
|
|
665
665
|
onClick: async (n) => {
|
|
666
|
-
n.stopPropagation(),
|
|
666
|
+
n.stopPropagation(), W(o.row.original);
|
|
667
667
|
}
|
|
668
668
|
},
|
|
669
669
|
{
|
|
@@ -676,12 +676,12 @@ const Nt = {
|
|
|
676
676
|
)
|
|
677
677
|
}
|
|
678
678
|
),
|
|
679
|
-
...
|
|
679
|
+
...D(o.row.original) ? [] : [
|
|
680
680
|
B(
|
|
681
681
|
ae.FmMenuItem,
|
|
682
682
|
{
|
|
683
683
|
onClick: async (n) => {
|
|
684
|
-
n.stopPropagation(),
|
|
684
|
+
n.stopPropagation(), J(o.row.original);
|
|
685
685
|
}
|
|
686
686
|
},
|
|
687
687
|
{
|
|
@@ -701,15 +701,15 @@ const Nt = {
|
|
|
701
701
|
]);
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
-
], y =
|
|
705
|
-
|
|
706
|
-
),
|
|
704
|
+
], y = X(null), { tableMeta: p, rowData: g, debouncedFetchData: x } = be(
|
|
705
|
+
Y.readAll
|
|
706
|
+
), q = z(() => g.value.length === 0 ? !1 : Be.some(
|
|
707
707
|
(o) => !g.value.some((n) => n.defaultKey === o)
|
|
708
708
|
));
|
|
709
|
-
async function
|
|
709
|
+
async function G() {
|
|
710
710
|
var o;
|
|
711
711
|
try {
|
|
712
|
-
await
|
|
712
|
+
await Y.refreshSegments(), _.open({ type: "info", title: "Segment refresh queued" });
|
|
713
713
|
} catch (n) {
|
|
714
714
|
if (((n == null ? void 0 : n.status) ?? ((o = n == null ? void 0 : n.response) == null ? void 0 : o.status)) === 409) {
|
|
715
715
|
_.open({
|
|
@@ -727,7 +727,7 @@ const Nt = {
|
|
|
727
727
|
async function I() {
|
|
728
728
|
await f(
|
|
729
729
|
async () => {
|
|
730
|
-
await
|
|
730
|
+
await Y.startDefaultSegments(), await x({ pageSize: 10, pageIndex: 0 });
|
|
731
731
|
},
|
|
732
732
|
{
|
|
733
733
|
message: c(
|
|
@@ -739,10 +739,10 @@ const Nt = {
|
|
|
739
739
|
}
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
async function
|
|
743
|
-
await
|
|
742
|
+
async function J(o) {
|
|
743
|
+
await $e.remove(`Are you sure you want to remove ${o.name}?`) && await f(
|
|
744
744
|
async () => {
|
|
745
|
-
await
|
|
745
|
+
await Y.delete(o._id), await x({ pageSize: 10, pageIndex: 0 });
|
|
746
746
|
},
|
|
747
747
|
{
|
|
748
748
|
message: `Removing ${o.name}`,
|
|
@@ -750,41 +750,41 @@ const Nt = {
|
|
|
750
750
|
}
|
|
751
751
|
);
|
|
752
752
|
}
|
|
753
|
-
async function
|
|
753
|
+
async function W(o) {
|
|
754
754
|
const n = {
|
|
755
755
|
sortBy: "_id",
|
|
756
756
|
descending: !1,
|
|
757
757
|
rowsPerPage: 1e3,
|
|
758
758
|
page: 1,
|
|
759
759
|
rowsNumber: 0
|
|
760
|
-
}, F = new
|
|
760
|
+
}, F = new Ve(), b = m(o), N = (await ge.read({
|
|
761
761
|
limit: 1,
|
|
762
762
|
skip: 0,
|
|
763
763
|
sortBy: n.sortBy,
|
|
764
764
|
descending: n.descending
|
|
765
|
-
})).meta.totalResources ?? 0,
|
|
765
|
+
})).meta.totalResources ?? 0, K = n.rowsPerPage;
|
|
766
766
|
await f(
|
|
767
767
|
async () => {
|
|
768
|
-
for (let L = 0; L <
|
|
769
|
-
const
|
|
768
|
+
for (let L = 0; L < N; L += K) {
|
|
769
|
+
const C = {
|
|
770
770
|
...n,
|
|
771
|
-
limit:
|
|
771
|
+
limit: K,
|
|
772
772
|
skip: n.page - 1,
|
|
773
773
|
sortBy: n.sortBy,
|
|
774
774
|
descending: n.descending
|
|
775
|
-
},
|
|
775
|
+
}, R = await Y.paginateSegmentUsers(
|
|
776
776
|
o._id,
|
|
777
|
-
|
|
777
|
+
C
|
|
778
778
|
);
|
|
779
|
-
for (const
|
|
780
|
-
const
|
|
781
|
-
F.addRecord(
|
|
779
|
+
for (const O of R.resources) {
|
|
780
|
+
const j = S(O);
|
|
781
|
+
F.addRecord(j);
|
|
782
782
|
}
|
|
783
783
|
n.page++;
|
|
784
784
|
}
|
|
785
|
-
await
|
|
785
|
+
await Fe(
|
|
786
786
|
F.buildExcel(),
|
|
787
|
-
`[${
|
|
787
|
+
`[${b}]-members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
788
788
|
{
|
|
789
789
|
bookType: "xlsx",
|
|
790
790
|
bookSST: !1,
|
|
@@ -805,11 +805,11 @@ const Nt = {
|
|
|
805
805
|
if (o.type === U.enum.STATIC) {
|
|
806
806
|
const F = new FormData();
|
|
807
807
|
if (F.append("file", o.file), o._id) {
|
|
808
|
-
const { members:
|
|
809
|
-
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);
|
|
810
810
|
} else {
|
|
811
|
-
const { file:
|
|
812
|
-
F.append("segment", JSON.stringify(
|
|
811
|
+
const { file: b, ...N } = o;
|
|
812
|
+
F.append("segment", JSON.stringify(N)), await Y.createStatic(F);
|
|
813
813
|
}
|
|
814
814
|
o.file && _.open({
|
|
815
815
|
type: "info",
|
|
@@ -817,17 +817,17 @@ const Nt = {
|
|
|
817
817
|
action: "View",
|
|
818
818
|
onAction: async () => {
|
|
819
819
|
await u.push({
|
|
820
|
-
name:
|
|
820
|
+
name: ve["$connect-QUEUE"],
|
|
821
821
|
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
824
|
});
|
|
825
825
|
} else if (o._id) {
|
|
826
|
-
const { members: F, _id:
|
|
827
|
-
await
|
|
826
|
+
const { members: F, _id: b, ...N } = o;
|
|
827
|
+
await Y.update(o._id, N);
|
|
828
828
|
} else
|
|
829
|
-
await
|
|
830
|
-
await
|
|
829
|
+
await Y.create(o);
|
|
830
|
+
await x({ pageSize: 10, pageIndex: 0 }), (n = y.value) == null || n.hideSheet();
|
|
831
831
|
},
|
|
832
832
|
{
|
|
833
833
|
message: "Saving segment",
|
|
@@ -844,16 +844,16 @@ const Nt = {
|
|
|
844
844
|
value: "queue",
|
|
845
845
|
isPrimary: !1,
|
|
846
846
|
prependIcon: "work_history"
|
|
847
|
-
},
|
|
847
|
+
}, te = {
|
|
848
848
|
label: c("connect.loyalty.segment.default_segments.get_started.action"),
|
|
849
849
|
value: "start-default-segments",
|
|
850
850
|
isPrimary: !1,
|
|
851
851
|
prependIcon: "auto_awesome"
|
|
852
|
-
},
|
|
852
|
+
}, oe = z(() => {
|
|
853
853
|
if (!M.isPremium)
|
|
854
854
|
return [];
|
|
855
855
|
const o = [P];
|
|
856
|
-
return
|
|
856
|
+
return q.value && o.push(te), o.push(
|
|
857
857
|
{
|
|
858
858
|
label: c("connect.loyalty.segment.actions.refresh"),
|
|
859
859
|
value: "refresh",
|
|
@@ -867,17 +867,17 @@ const Nt = {
|
|
|
867
867
|
}
|
|
868
868
|
), o;
|
|
869
869
|
});
|
|
870
|
-
function
|
|
870
|
+
function ne(o) {
|
|
871
871
|
switch (o) {
|
|
872
872
|
case "add":
|
|
873
873
|
l();
|
|
874
874
|
break;
|
|
875
875
|
case "refresh":
|
|
876
|
-
|
|
876
|
+
G();
|
|
877
877
|
break;
|
|
878
878
|
case "queue":
|
|
879
879
|
u.push({
|
|
880
|
-
name:
|
|
880
|
+
name: ve["$connect-QUEUE"],
|
|
881
881
|
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
882
882
|
});
|
|
883
883
|
break;
|
|
@@ -886,34 +886,34 @@ const Nt = {
|
|
|
886
886
|
break;
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
return
|
|
890
|
-
const { meta: o } = await
|
|
889
|
+
return Te(async () => {
|
|
890
|
+
const { meta: o } = await ge.read({
|
|
891
891
|
limit: 1,
|
|
892
892
|
skip: 0,
|
|
893
893
|
sortBy: "_id",
|
|
894
894
|
search: void 0,
|
|
895
895
|
descending: !1
|
|
896
896
|
});
|
|
897
|
-
T.value = o.totalResources ?? 0, await
|
|
897
|
+
T.value = o.totalResources ?? 0, await x({ pageSize: 10, pageIndex: 0 }), await M.readPremium(), await M.readLocations();
|
|
898
898
|
}), (o, n) => {
|
|
899
|
-
const F =
|
|
900
|
-
return r(), k(
|
|
901
|
-
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, {
|
|
902
902
|
title: "Segments",
|
|
903
|
-
actions: e(
|
|
904
|
-
"onClick:action": n[0] || (n[0] = (
|
|
903
|
+
actions: e(oe),
|
|
904
|
+
"onClick:action": n[0] || (n[0] = (w) => ne(w))
|
|
905
905
|
}, {
|
|
906
906
|
title: $(() => [
|
|
907
|
-
s("div",
|
|
908
|
-
s("span",
|
|
907
|
+
s("div", Nt, [
|
|
908
|
+
s("span", Rt, E(e(c)("connect.loyalty.segment.title")), 1),
|
|
909
909
|
d(F, { variant: "premium" })
|
|
910
910
|
])
|
|
911
911
|
]),
|
|
912
912
|
_: 1
|
|
913
913
|
}, 8, ["actions"]),
|
|
914
|
-
s("div",
|
|
915
|
-
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(
|
|
916
|
-
d(
|
|
914
|
+
s("div", Bt, [
|
|
915
|
+
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(ee, { key: 0 }, [
|
|
916
|
+
d(we, {
|
|
917
917
|
loading: e(p).isLoading,
|
|
918
918
|
"row-data": e(g),
|
|
919
919
|
"row-count": e(p).totalRows,
|
|
@@ -922,49 +922,49 @@ const Nt = {
|
|
|
922
922
|
"page-count": e(p).pageCount,
|
|
923
923
|
"page-index": e(p).pageIndex,
|
|
924
924
|
"page-size": e(p).pageSize,
|
|
925
|
-
onRowClick: n[1] || (n[1] = (
|
|
926
|
-
l(
|
|
925
|
+
onRowClick: n[1] || (n[1] = (w) => {
|
|
926
|
+
l(w.original);
|
|
927
927
|
}),
|
|
928
|
-
onPageChange: e(
|
|
928
|
+
onPageChange: e(x)
|
|
929
929
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
|
|
930
|
-
d(
|
|
930
|
+
d(O, { class: "w-full hidden xs:!block" }, {
|
|
931
931
|
default: $(() => [
|
|
932
|
-
(r(!0), k(
|
|
933
|
-
key:
|
|
932
|
+
(r(!0), k(ee, null, ue(e(g), (w) => (r(), V(R, {
|
|
933
|
+
key: w._id.toString(),
|
|
934
934
|
tag: "label",
|
|
935
|
-
onClick: (
|
|
935
|
+
onClick: (Z) => l(w)
|
|
936
936
|
}, {
|
|
937
937
|
default: $(() => [
|
|
938
938
|
s("div", null, [
|
|
939
|
-
s("div",
|
|
940
|
-
s("div",
|
|
941
|
-
s("span",
|
|
942
|
-
|
|
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, {
|
|
943
943
|
key: 0,
|
|
944
|
-
class:
|
|
944
|
+
class: ie(he),
|
|
945
945
|
label: e(c)("connect.loyalty.segment.default_segments.system"),
|
|
946
946
|
compact: ""
|
|
947
|
-
}, null, 8, ["label"])) :
|
|
947
|
+
}, null, 8, ["label"])) : H("", !0)
|
|
948
948
|
]),
|
|
949
|
-
s("div",
|
|
949
|
+
s("div", Yt, E(i(w.memberCount)) + "% of customers ", 1)
|
|
950
950
|
])
|
|
951
951
|
]),
|
|
952
952
|
append: $(() => [
|
|
953
|
-
d(
|
|
953
|
+
d(C, { "stop-click-propagation": !0 }, {
|
|
954
954
|
"menu-button": $(() => [
|
|
955
|
-
d(
|
|
955
|
+
d(K, { name: "more_vert" })
|
|
956
956
|
]),
|
|
957
957
|
default: $(() => [
|
|
958
958
|
d(L, {
|
|
959
959
|
class: "fm-typo-en-body-md-400",
|
|
960
960
|
label: "Export",
|
|
961
|
-
"onUpdate:modelValue": (
|
|
961
|
+
"onUpdate:modelValue": (Z) => Z && W(w)
|
|
962
962
|
}, null, 8, ["onUpdate:modelValue"]),
|
|
963
|
-
|
|
963
|
+
D(w) ? H("", !0) : (r(), V(L, {
|
|
964
964
|
key: 0,
|
|
965
965
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400",
|
|
966
966
|
label: "Remove",
|
|
967
|
-
"onUpdate:modelValue": (
|
|
967
|
+
"onUpdate:modelValue": (Z) => Z && J(w)
|
|
968
968
|
}, null, 8, ["onUpdate:modelValue"]))
|
|
969
969
|
]),
|
|
970
970
|
_: 2
|
|
@@ -982,26 +982,26 @@ const Nt = {
|
|
|
982
982
|
}, {
|
|
983
983
|
default: $(() => [
|
|
984
984
|
n[3] || (n[3] = s("img", {
|
|
985
|
-
src:
|
|
985
|
+
src: De,
|
|
986
986
|
class: "aspect-square w-[150px]"
|
|
987
987
|
}, null, -1)),
|
|
988
|
-
s("div",
|
|
989
|
-
s("div",
|
|
990
|
-
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)(
|
|
991
991
|
"connect.loyalty.segment.default_segments.get_started.description"
|
|
992
992
|
)), 1)
|
|
993
993
|
]),
|
|
994
|
-
d(
|
|
994
|
+
d(j, {
|
|
995
995
|
variant: "primary",
|
|
996
996
|
label: e(c)("connect.loyalty.segment.default_segments.get_started.action"),
|
|
997
997
|
disabled: !e(M).isPremium,
|
|
998
998
|
icon: "auto_awesome",
|
|
999
|
-
onClick: n[2] || (n[2] = (
|
|
999
|
+
onClick: n[2] || (n[2] = (w) => I())
|
|
1000
1000
|
}, null, 8, ["label", "disabled"])
|
|
1001
1001
|
]),
|
|
1002
1002
|
_: 1
|
|
1003
1003
|
})),
|
|
1004
|
-
d(
|
|
1004
|
+
d($t, {
|
|
1005
1005
|
ref_key: "sheetRef",
|
|
1006
1006
|
ref: y,
|
|
1007
1007
|
"onUpdate:modelValue": v
|