@feedmepos/mf-connect 0.1.117-dev → 0.1.118-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BpcsgH7K.js → App-BHcTqLff.js} +89 -97
- package/dist/{Bin-Cm0wjQeR.js → Bin-DWhXJmHo.js} +8 -8
- package/dist/{Broadcast-BoJaHqnO.js → Broadcast-Ct1DL8Pd.js} +21 -22
- package/dist/{CampaignAnalytic-Eg4xZW0B.js → CampaignAnalytic-BSEKCM-4.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BxRg2Wu8.js} +10 -9
- package/dist/{Card-BfkMcFaG.js → Card-B7DwrAPH.js} +23 -23
- package/dist/{Collections-RXmxQbII.js → Collections-BJw4JJq_.js} +185 -197
- package/dist/{Credit-CsRPM1jv.js → Credit-BteIGXkp.js} +20 -21
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CSFwIzOS.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJotVIKM.js +3496 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js → EffectSheet.vue_vue_type_style_index_0_lang-BDZ21UHA.js} +30 -30
- package/dist/{Experience-BC8Pj-v9.js → Experience-C_VQVfJX.js} +31 -32
- package/dist/{FileSaver.min-DzmoQFA0.js → FileSaver.min-CMiQUZQE.js} +1 -1
- package/dist/{Game-DJXNHFBs.js → Game-BiHMrMBF.js} +18 -19
- package/dist/{GiftCardSetup-_0n8lU-t.js → GiftCardSetup-DtJIm6oI.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BKGnPAEj.js} +7 -7
- package/dist/{Goals-DSZwKpds.js → Goals-B7VjLMDT.js} +4 -4
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js → ImageInput.vue_vue_type_script_setup_true_lang-C9ecPgpJ.js} +1 -1
- package/dist/{Index-Cbi0bquE.js → Index-D_DIHKZG.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js → LocationPicker.vue_vue_type_script_setup_true_lang-DSwB0Ubn.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-dk8_eVwd.js} +1 -1
- package/dist/{LoyaltyDashboard-fK90c27A.js → LoyaltyDashboard-DOgHeJdK.js} +15 -15
- package/dist/{MainLayout-Bf-l9yL4.js → MainLayout-CfYgoXLS.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js → MainLayout.vue_vue_type_script_setup_true_lang-Bz2LGHUd.js} +3 -3
- package/dist/{Marketing-B7cZGsO-.js → Marketing-B6TCrwaR.js} +4 -4
- package/dist/{MarketingMaterialEdit-5IcV2ct6.js → MarketingMaterialEdit-Bu3a9NGj.js} +211 -214
- package/dist/{Member-BGTrRVdq.js → Member-X51KrYXV.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CYU21JaO.js} +48 -40
- package/dist/{MemberImportHistory--FxkTJmu.js → MemberImportHistory-CHd9fx7E.js} +7 -7
- package/dist/{MemberList-EjY5dgwt.js → MemberList-D4L3bSlw.js} +105 -103
- package/dist/{MemberTransactions-Oia7LIFK.js → MemberTransactions-CEgjfhnX.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js → MessageInput.vue_vue_type_script_setup_true_lang-zsaig_yK.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-YZQkKG66.js} +1 -1
- package/dist/{Mission-BFHYb4aT.js → Mission-BEVtvY0-.js} +21 -22
- package/dist/{Overview-d5U37aot.js → Overview-4QRkldza.js} +144 -145
- package/dist/{Overview-BVNyQxFL.js → Overview-DVoXXZ16.js} +21 -21
- package/dist/{Point-CXkqH02Z.js → Point-BJmebaL9.js} +21 -22
- package/dist/{Promotion-DdxNvlOO.js → Promotion-DWZZBofu.js} +131 -137
- package/dist/{Queue-C96oNKyP.js → Queue-DLdsyhCT.js} +46 -46
- package/dist/{Record-Bj2e2Y4i.js → Record-QOD3XELf.js} +9 -9
- package/dist/{Review-CJK5S1oI.js → Review-CKmhyuqj.js} +2 -2
- package/dist/ReviewFacebookCallback-C6DlaJ_j.js +238 -0
- package/dist/{ReviewGoogleCallback-Dmk4VyGA.js → ReviewGoogleCallback-CDriVQPZ.js} +5 -5
- package/dist/{Reward-Dh2YI0Xb.js → Reward-DftoZfPN.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js → RewardGroup.vue_vue_type_script_setup_true_lang-ZgYX2QwC.js} +14 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHmBwLNP.js +1884 -0
- package/dist/{Segment-FYvtCkqH.js → Segment-URdB0lnl.js} +307 -304
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmI2LAsz.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCEgZzA4.js} +4 -4
- package/dist/{Setting-CUAWjCqa.js → Setting-BDIHH2Wk.js} +148 -159
- package/dist/{SettingAdvertisements-COIQwUD6.js → SettingAdvertisements-CkJYZnIN.js} +12 -12
- package/dist/Settings-9gaegvYJ.js +179 -0
- package/dist/{Store-BAXwiyvx.js → Store-CV0kYncl.js} +29 -29
- package/dist/{StoreRewards-2mUavtUg.js → StoreRewards-30kSkAZ_.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dgwyk3NA.js +1265 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CDUhH6wp.js +142 -0
- package/dist/{Tier-BmAOzRHL.js → Tier-DiQSC3iv.js} +688 -2576
- package/dist/{Title-DMxiUg30.js → Title-DixxpjAg.js} +95 -96
- package/dist/{Transaction-CF6hXEpN.js → Transaction-DQK4LUGD.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CL-GKkuD.js} +26 -26
- package/dist/{Voucher-DrtITxq-.js → Voucher-CSVlk_Hr.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CiSoy0Ky.js} +12 -12
- package/dist/{WhatsappAccount-Bb0Y7ikk.js → WhatsappAccount-CQYbv2Ew.js} +66 -64
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DjgRo9iA.js} +1 -1
- package/dist/{WhatsappBot-DNvvaPey.js → WhatsappBot-DdO9Bfvh.js} +324 -322
- package/dist/{WhatsappBotLogs-C8M-1pvv.js → WhatsappBotLogs-CjjWJGND.js} +11 -11
- package/dist/{WhatsappBotSettings-D6egqUyU.js → WhatsappBotSettings-DYGx-kRr.js} +287 -288
- package/dist/{WhatsappLayout-DeQTPuF6.js → WhatsappLayout-B6k_79Kl.js} +3 -3
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DTUytfe5.js +261 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js → ZodTextField.vue_vue_type_script_setup_true_lang-DdCUr_Zm.js} +2 -2
- package/dist/{app-BjdLqYQq.js → app-CqQeNnGq.js} +3382 -4110
- package/dist/app.js +3 -4
- package/dist/{base.export-B68z5BF6.js → base.export-Dls5LQeu.js} +2 -2
- package/dist/{business-D9fgkHxb.js → business-gvLSQklz.js} +1 -1
- package/dist/{campaign-Dw_ujovr.js → campaign-BqazvOUj.js} +94 -121
- package/dist/{campaign-eMaPX8r6.js → campaign-Cd6GmA4U.js} +25 -31
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
- package/dist/{campaign.fn-DFjGNvmN.js → campaign.fn-C0oMb1fs.js} +99 -99
- package/dist/{collection.fn-CCOWtB-c.js → collection.fn-CERMsFPh.js} +2 -2
- package/dist/{currency-CTLKReFC.js → currency-IkiKiNg1.js} +1 -1
- package/dist/{effect-CTI1ZH57.js → effect-j_T62HBN.js} +1 -1
- package/dist/{email-addresses-B74e3bnB.js → email-addresses-CN1kPlEj.js} +2 -2
- package/dist/{feature-flag-DVdEaChJ.js → feature-flag-DDfyOLsv.js} +88 -88
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-as9K-piK.js → helper-DVUe13eh.js} +1 -1
- package/dist/{index-BW7FoVEA.js → index-9RBtEPPj.js} +1 -1
- package/dist/{index-Czg-2Ni0.js → index-BmIfGArh.js} +3 -3
- package/dist/{index-DKI8401o.js → index-BvkqHehI.js} +7 -7
- package/dist/{index-B0h0iYWP.js → index-BvoOJdfc.js} +2 -2
- package/dist/{index-CWLOcQ6j.js → index-C-IajuP1.js} +9 -9
- package/dist/{index-3LjKJhQa.js → index-COuLtOaw.js} +1 -1
- package/dist/{index-QHqcSN2q.js → index-CPyK4a5J.js} +4 -4
- package/dist/{index-BbVbqe4Y.js → index-CWGbeg5X.js} +6 -19
- package/dist/{index-CHU3UePP.js → index-C_SaKemI.js} +1 -1
- package/dist/{index-BEKMTiFb.js → index-Cjy0SXCn.js} +197 -197
- package/dist/{index-C5V6u2Qd.js → index-DALsfLV7.js} +2613 -2699
- package/dist/{index-CQxkDpX0.js → index-DMiaWY0s.js} +581 -682
- package/dist/{index-B_wRpO02.js → index-D_1pnadB.js} +15 -29
- package/dist/{index-TAoQpeLQ.js → index-DzbVgUEP.js} +1 -1
- package/dist/{index-C-iwb2Ln.js → index-I9lmcd2w.js} +2 -2
- package/dist/{index-wsCCqwdr.js → index-UJHdDEG1.js} +2 -2
- package/dist/{index-DcZiikOH.js → index-ep_Kxxid.js} +2 -2
- package/dist/{index-BhTrG89b.js → index-fNYUguDQ.js} +232 -389
- package/dist/{index-Ba719MYq.js → index-jS16KX9p.js} +1 -1
- package/dist/{index-Ckz6u3ac.js → index-k7FFxt_M.js} +2 -2
- package/dist/{index-8mBfDn3M.js → index-lzQ6ehOk.js} +251 -608
- package/dist/{index.esm2017-DL6rTGDW.js → index.esm2017-vJKhLfdu.js} +177 -177
- package/dist/{loading-x6IScY4K.js → loading-jZV2Dm--.js} +1 -1
- package/dist/{lodash-nwnDizYo.js → lodash-C2pLek0l.js} +1 -1
- package/dist/{member-import-C-b01Tyd.js → member-import-BKI7soRD.js} +1 -1
- package/dist/{membership-DfarOMtO.js → membership-smdlFpPr.js} +2 -2
- package/dist/{money-CFn-jR4W.js → money-5XyTnYwW.js} +1 -1
- package/dist/{number-CSlyDL2x.js → number-DHU9qJJQ.js} +1 -1
- package/dist/objectid-jT5g6pGt.js +145 -0
- package/dist/{onboarding-DyaFaaF2.js → onboarding-C_5pyGx-.js} +25 -25
- package/dist/{onboardingSetup-DQt91O9f.js → onboardingSetup-Bd1V-Ipy.js} +2 -2
- package/dist/{plugins-DEHr0UOe.js → plugins-D1Ru-da5.js} +3 -3
- package/dist/{reward-Du_Pv-4p.js → reward-BqPl68Xk.js} +1 -1
- package/dist/{rule-DfqmQTVK.js → rule-WBrRXwL-.js} +492 -572
- package/dist/rule-builder-DAlSbaWh.js +102 -0
- package/dist/style.css +1 -1
- package/dist/template-DDquG4Xc.js +236 -0
- package/dist/{timezone-_4tabIaK.js → timezone-O4qrCDcK.js} +1 -1
- package/dist/{transaction.fn-C46PHwCV.js → transaction.fn-CY_F8Nb8.js} +2 -2
- package/dist/{trigger-Dipr6btC.js → trigger-D-vySeIB.js} +8 -8
- package/dist/{useMarketingMaterialActions-BAw2ZjeF.js → useMarketingMaterialActions-kA6SLHy_.js} +4 -4
- package/dist/{usePagination-D6RZ18zS.js → usePagination-AYE_RJH2.js} +1 -1
- package/dist/{user-BCexQj3Q.js → user-DJcMkYXP.js} +1 -1
- package/dist/vue-i18n-kXHiDb_1.js +2365 -0
- package/dist/{xlsx-BTxt_Jg6.js → xlsx--s3hBdDk.js} +224 -224
- package/dist/{zod-T4wMYjWT.js → zod-IpHRbxaJ.js} +1 -1
- package/package.json +2 -6
- package/dist/AuditLogs-BNnUiVnD.js +0 -2016
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +0 -4442
- package/dist/Grab-DDc7e-AC.js +0 -301
- package/dist/ReviewFacebookCallback-ChG7TRy5.js +0 -225
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +0 -1923
- package/dist/Settings-D2gFPvmW.js +0 -286
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +0 -1319
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +0 -7007
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +0 -253
- package/dist/duplicateCampaign-BcpBfUGL.js +0 -51
- package/dist/google-BQK68wbe.js +0 -5
- package/dist/objectid-zcT6ESET.js +0 -145
- package/dist/template-CcbNF4PF.js +0 -188
- package/dist/vue-i18n-DXvyTCZf.js +0 -2365
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
import { defineComponent as le, ref as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { n as
|
|
4
|
-
import { u as
|
|
5
|
-
import { FmButtonVariant as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import "./index-
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./index-
|
|
16
|
-
import { u as
|
|
17
|
-
import { e as
|
|
18
|
-
import { Z as
|
|
19
|
-
import { u as
|
|
20
|
-
import { z as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
1
|
+
import { defineComponent as le, ref as W, resolveComponent as h, openBlock as r, createElementBlock as k, createElementVNode as s, createVNode as d, unref as e, createCommentVNode as H, withCtx as $, Fragment as Z, renderList as me, createBlock as V, toDisplayString as D, normalizeClass as ce, computed as O, onMounted as we, isRef as Me, createSlots as Ee, h as B, onBeforeMount as De } from "vue";
|
|
2
|
+
import { _ as $e } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { n as Ae, p as Re } from "./plugins-D1Ru-da5.js";
|
|
4
|
+
import { u as Pe } from "./loading-jZV2Dm--.js";
|
|
5
|
+
import { FmButtonVariant as re, useSnackbar as Ne, components as ae } from "@feedmepos/ui-library";
|
|
6
|
+
import { u as Fe, _ as Ce } from "./usePagination-AYE_RJH2.js";
|
|
7
|
+
import { u as pe } from "./vue-i18n-kXHiDb_1.js";
|
|
8
|
+
import { g as Be, h as U, D as Ue, i as Ve } from "./index-DMiaWY0s.js";
|
|
9
|
+
import "./index-DALsfLV7.js";
|
|
10
|
+
import { F as ye } from "./index-BmIfGArh.js";
|
|
11
|
+
import { a as ge } from "./index-fNYUguDQ.js";
|
|
12
|
+
import "./index-lzQ6ehOk.js";
|
|
13
|
+
import "./index-BvoOJdfc.js";
|
|
14
|
+
import "./index-I9lmcd2w.js";
|
|
15
|
+
import "./index-9RBtEPPj.js";
|
|
16
|
+
import { u as de, w as ke } from "./xlsx--s3hBdDk.js";
|
|
17
|
+
import { e as Le, M as Ye } from "./email-addresses-CN1kPlEj.js";
|
|
18
|
+
import { Z as ze } from "./zod-IpHRbxaJ.js";
|
|
19
|
+
import { u as Oe } from "./app-wDQR6dpb.js";
|
|
20
|
+
import { z as je } from "./index-C_H8jFYf.js";
|
|
21
|
+
import { R as ve } from "./rule-builder-DAlSbaWh.js";
|
|
22
|
+
import { _ as qe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-DdCUr_Zm.js";
|
|
23
|
+
import { _ as Ge } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DHmBwLNP.js";
|
|
24
|
+
import { u as Ke, v as He, w as Je } from "./index.esm2017-vJKhLfdu.js";
|
|
25
|
+
import { F as Qe } from "./FileSaver.min-CMiQUZQE.js";
|
|
25
26
|
import { h as se } from "./moment-D7p2TMB-.js";
|
|
26
|
-
import { s as
|
|
27
|
-
import { o as
|
|
28
|
-
import { J as
|
|
29
|
-
import { u as
|
|
30
|
-
import { f as
|
|
31
|
-
import { t as
|
|
32
|
-
import "./index-
|
|
33
|
-
import { useRouter as
|
|
34
|
-
import { m as
|
|
35
|
-
import { R as
|
|
36
|
-
const
|
|
37
|
-
_id:
|
|
38
|
-
business:
|
|
39
|
-
file:
|
|
27
|
+
import { s as z, u as We } from "./membership-smdlFpPr.js";
|
|
28
|
+
import { o as Ze } from "./objectId-dwaoBfJX.js";
|
|
29
|
+
import { J as Xe } from "./JsonViewer-v8_C7l5N.js";
|
|
30
|
+
import { u as Ie } from "./business-gvLSQklz.js";
|
|
31
|
+
import { f as et } from "./number-DHU9qJJQ.js";
|
|
32
|
+
import { t as tt } from "./money-5XyTnYwW.js";
|
|
33
|
+
import "./index-jS16KX9p.js";
|
|
34
|
+
import { useRouter as ot } from "vue-router";
|
|
35
|
+
import { m as _e } from "./index-k7FFxt_M.js";
|
|
36
|
+
import { R as Se } from "./app-CqQeNnGq.js";
|
|
37
|
+
const nt = Be.extend({
|
|
38
|
+
_id: ye.optional(),
|
|
39
|
+
business: ye.optional(),
|
|
40
|
+
file: je.any().nullish()
|
|
40
41
|
});
|
|
41
|
-
var
|
|
42
|
-
const
|
|
42
|
+
var at = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", importFilesBucketUrl: "feedme-253402.appspot.com", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", featureFlagApiKey: "6GhcttsJ9Rj9cTevcdrpin" };
|
|
43
|
+
const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
43
44
|
key: 0,
|
|
44
|
-
class: /* @__PURE__ */
|
|
45
|
+
class: /* @__PURE__ */ ce([
|
|
45
46
|
"p-16 pl-24 space-x-8",
|
|
46
47
|
"bg-fm-color-primary-oats rounded-lg",
|
|
47
48
|
"flex items-center",
|
|
48
49
|
"justify-between"
|
|
49
50
|
])
|
|
50
|
-
},
|
|
51
|
+
}, it = { class: "flex justify-end" }, ct = {
|
|
51
52
|
key: 1,
|
|
52
|
-
class: /* @__PURE__ */
|
|
53
|
+
class: /* @__PURE__ */ ce([
|
|
53
54
|
"flex items-center",
|
|
54
55
|
"border border-fm-color-neutral-gray-300",
|
|
55
56
|
"p-16 space-x-16 rounded-md"
|
|
56
57
|
])
|
|
57
|
-
},
|
|
58
|
+
}, rt = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, dt = /* @__PURE__ */ le({
|
|
58
59
|
__name: "ImportSegment",
|
|
59
60
|
props: {
|
|
60
61
|
importFile: {}
|
|
61
62
|
},
|
|
62
63
|
emits: ["update:file"],
|
|
63
64
|
setup(t, { emit: f }) {
|
|
64
|
-
const c = t,
|
|
65
|
+
const c = t, T = f, { t: b } = pe(), _ = W(null), u = W(null), M = ["Id"], E = [
|
|
65
66
|
{
|
|
66
67
|
label: "CSV",
|
|
67
68
|
icon: "csv",
|
|
@@ -76,49 +77,49 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
76
77
|
async function a() {
|
|
77
78
|
if (c.importFile)
|
|
78
79
|
try {
|
|
79
|
-
const y =
|
|
80
|
+
const y = Ke(void 0, at.importFilesBucketUrl), p = He(y, c.importFile), g = await Je(p);
|
|
80
81
|
window.open(g, "_blank");
|
|
81
82
|
} catch (y) {
|
|
82
|
-
console.log(y),
|
|
83
|
+
console.log(y), Ae.error("Failed to download uploaded file");
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
async function m(y) {
|
|
86
87
|
switch (y) {
|
|
87
88
|
case "csv":
|
|
88
|
-
const p = new Blob([
|
|
89
|
+
const p = new Blob([M.join(",")], {
|
|
89
90
|
type: "text/csv;charset=utf-8;"
|
|
90
91
|
});
|
|
91
|
-
|
|
92
|
+
Qe.saveAs(p, "ImportSegmentTemplate.csv");
|
|
92
93
|
break;
|
|
93
94
|
case "xlsx":
|
|
94
|
-
const g =
|
|
95
|
-
|
|
95
|
+
const g = de.aoa_to_sheet([M]), S = de.book_new();
|
|
96
|
+
de.book_append_sheet(S, g, "Sheet1"), ke(S, "ImportSegmentTemplate.xlsx");
|
|
96
97
|
break;
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
function i(y) {
|
|
100
|
-
_.value = y,
|
|
101
|
+
_.value = y, T("update:file", _.value);
|
|
101
102
|
}
|
|
102
103
|
function A(y) {
|
|
103
|
-
var g,
|
|
104
|
-
const p = ((
|
|
104
|
+
var g, S;
|
|
105
|
+
const p = ((S = (g = y.target) == null ? void 0 : g.files) == null ? void 0 : S[0]) ?? null;
|
|
105
106
|
i(p);
|
|
106
107
|
}
|
|
107
108
|
return (y, p) => {
|
|
108
|
-
const g = h("FmButton"),
|
|
109
|
-
return r(), k("div",
|
|
109
|
+
const g = h("FmButton"), S = h("FmMenuItem"), j = h("FmMenu"), q = h("FmDropField");
|
|
110
|
+
return r(), k("div", st, [
|
|
110
111
|
p[2] || (p[2] = s("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
|
|
111
|
-
t.importFile ? (r(), k("div",
|
|
112
|
+
t.importFile ? (r(), k("div", lt, [
|
|
112
113
|
d(g, {
|
|
113
|
-
label: e(
|
|
114
|
-
variant: e(
|
|
114
|
+
label: e(b)("View uploaded file"),
|
|
115
|
+
variant: e(re).Plain,
|
|
115
116
|
icon: "file_present",
|
|
116
117
|
onClick: a
|
|
117
118
|
}, null, 8, ["label", "variant"])
|
|
118
119
|
])) : H("", !0),
|
|
119
120
|
s("div", null, [
|
|
120
|
-
s("div",
|
|
121
|
-
d(
|
|
121
|
+
s("div", it, [
|
|
122
|
+
d(j, { class: "" }, {
|
|
122
123
|
"menu-button": $(() => [
|
|
123
124
|
d(g, {
|
|
124
125
|
variant: "tertiary",
|
|
@@ -127,31 +128,31 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
127
128
|
})
|
|
128
129
|
]),
|
|
129
130
|
default: $(() => [
|
|
130
|
-
(r(), k(
|
|
131
|
+
(r(), k(Z, null, me(E, (I) => d(S, {
|
|
131
132
|
key: I.value,
|
|
132
133
|
icon: I.icon,
|
|
133
134
|
label: I.label,
|
|
134
|
-
onClick: (
|
|
135
|
+
onClick: (G) => m(I.value),
|
|
135
136
|
selectable: ""
|
|
136
137
|
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
137
138
|
]),
|
|
138
139
|
_: 1
|
|
139
140
|
})
|
|
140
141
|
]),
|
|
141
|
-
_.value ? (r(), k("div",
|
|
142
|
+
_.value ? (r(), k("div", ct, [
|
|
142
143
|
d(g, {
|
|
143
|
-
variant: e(
|
|
144
|
+
variant: e(re).Tertiary,
|
|
144
145
|
"prepend-icon": "attach_file"
|
|
145
146
|
}, null, 8, ["variant"]),
|
|
146
|
-
s("p",
|
|
147
|
+
s("p", rt, D(_.value.name), 1),
|
|
147
148
|
s("label", {
|
|
148
149
|
ref_key: "fileLabelRef",
|
|
149
150
|
ref: u,
|
|
150
151
|
htmlFor: "file"
|
|
151
152
|
}, [
|
|
152
153
|
d(g, {
|
|
153
|
-
variant: e(
|
|
154
|
-
label: e(
|
|
154
|
+
variant: e(re).Plain,
|
|
155
|
+
label: e(b)("Replace File"),
|
|
155
156
|
onClick: p[1] || (p[1] = () => {
|
|
156
157
|
var I;
|
|
157
158
|
return (I = u.value) == null ? void 0 : I.click();
|
|
@@ -166,7 +167,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
166
167
|
onChange: A
|
|
167
168
|
}, null, 32)
|
|
168
169
|
], 512)
|
|
169
|
-
])) : (r(), V(
|
|
170
|
+
])) : (r(), V(q, {
|
|
170
171
|
key: 0,
|
|
171
172
|
onFileUpload: p[0] || (p[0] = (I) => i(I)),
|
|
172
173
|
accept: ".csv, .xlsx",
|
|
@@ -176,18 +177,18 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
176
177
|
]);
|
|
177
178
|
};
|
|
178
179
|
}
|
|
179
|
-
}),
|
|
180
|
+
}), ut = { class: "space-y-16 pr-12" }, mt = { class: "fm-typo-en-title-md-800" }, pt = { class: "flex space-x-8" }, ft = { class: "fm-typo-en-title-md-800 text-fm-color-primary" }, yt = { class: "text-fm-color-typo-secondary" }, he = /* @__PURE__ */ le({
|
|
180
181
|
__name: "ReviewSegment",
|
|
181
182
|
props: {
|
|
182
183
|
title: {},
|
|
183
184
|
segment: {}
|
|
184
185
|
},
|
|
185
186
|
setup(t) {
|
|
186
|
-
const f = t, c =
|
|
187
|
+
const f = t, c = O(
|
|
187
188
|
() => f.segment.memberCount ?? f.segment.members.length
|
|
188
|
-
),
|
|
189
|
+
), T = O(
|
|
189
190
|
() => f.segment.lastUpdated ? se(f.segment.lastUpdated).format("DD MMM YYYY") : "Not refreshed yet"
|
|
190
|
-
),
|
|
191
|
+
), b = [
|
|
191
192
|
{
|
|
192
193
|
header: "Name",
|
|
193
194
|
accessorFn: (i) => i.name
|
|
@@ -198,7 +199,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
198
199
|
},
|
|
199
200
|
{
|
|
200
201
|
header: "Customer Since",
|
|
201
|
-
accessorFn: (i) => se(
|
|
202
|
+
accessorFn: (i) => se(Ze(i._id.toString())).format("DD MMM YYYY")
|
|
202
203
|
},
|
|
203
204
|
{
|
|
204
205
|
header: "Phone",
|
|
@@ -214,7 +215,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
214
215
|
}
|
|
215
216
|
];
|
|
216
217
|
async function _(i) {
|
|
217
|
-
return f.segment._id ? (console.log(i), await
|
|
218
|
+
return f.segment._id ? (console.log(i), await z.paginateSegmentUsers(
|
|
218
219
|
f.segment._id,
|
|
219
220
|
i
|
|
220
221
|
)) : {
|
|
@@ -228,32 +229,32 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
228
229
|
}
|
|
229
230
|
};
|
|
230
231
|
}
|
|
231
|
-
const { tableMeta: u, rowData:
|
|
232
|
-
return
|
|
232
|
+
const { tableMeta: u, rowData: M, onSort: E, debouncedFetchData: a, onSearch: m } = Fe(_);
|
|
233
|
+
return we(async () => {
|
|
233
234
|
await a();
|
|
234
|
-
}), (i, A) => (r(), k("div",
|
|
235
|
-
s("div",
|
|
236
|
-
s("div",
|
|
237
|
-
s("div",
|
|
238
|
-
s("div",
|
|
235
|
+
}), (i, A) => (r(), k("div", ut, [
|
|
236
|
+
s("div", mt, D(f.title), 1),
|
|
237
|
+
s("div", pt, [
|
|
238
|
+
s("div", ft, D(e(c)), 1),
|
|
239
|
+
s("div", yt, [
|
|
239
240
|
A[1] || (A[1] = s("div", null, "contacts in your segment", -1)),
|
|
240
|
-
s("div", null, "as of " +
|
|
241
|
+
s("div", null, "as of " + D(e(T)), 1)
|
|
241
242
|
])
|
|
242
243
|
]),
|
|
243
|
-
d(
|
|
244
|
+
d(Ce, {
|
|
244
245
|
loading: e(u).isLoading,
|
|
245
|
-
"row-data": e(
|
|
246
|
+
"row-data": e(M),
|
|
246
247
|
"row-count": e(u).totalRows,
|
|
247
|
-
"column-defs":
|
|
248
|
+
"column-defs": b,
|
|
248
249
|
"page-size": e(u).pageSize,
|
|
249
250
|
"page-count": e(u).pageCount,
|
|
250
251
|
"page-index": e(u).pageIndex,
|
|
251
|
-
onSortChange: e(
|
|
252
|
+
onSortChange: e(E),
|
|
252
253
|
onPageChange: A[0] || (A[0] = (y) => e(a)({ pageSize: y.pageSize, pageIndex: y.pageIndex }))
|
|
253
254
|
}, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
|
|
254
255
|
]));
|
|
255
256
|
}
|
|
256
|
-
}),
|
|
257
|
+
}), gt = { class: "space-y-24" }, vt = { class: "grid grid-cols-2 gap-16" }, _t = { class: "fm-typo-en-title-sm-800" }, St = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ht = /* @__PURE__ */ le({
|
|
257
258
|
__name: "SegmentTypeOption",
|
|
258
259
|
props: {
|
|
259
260
|
modelValue: {},
|
|
@@ -261,7 +262,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
261
262
|
},
|
|
262
263
|
emits: ["update:model-value"],
|
|
263
264
|
setup(t, { emit: f }) {
|
|
264
|
-
const c = t,
|
|
265
|
+
const c = t, T = f, b = [
|
|
265
266
|
{
|
|
266
267
|
label: "Dynamic",
|
|
267
268
|
sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
|
|
@@ -274,16 +275,16 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
274
275
|
}
|
|
275
276
|
];
|
|
276
277
|
function _(u) {
|
|
277
|
-
u !== c.modelValue &&
|
|
278
|
+
u !== c.modelValue && T("update:model-value", u);
|
|
278
279
|
}
|
|
279
|
-
return (u,
|
|
280
|
-
const
|
|
281
|
-
return r(), k("div",
|
|
282
|
-
s("div",
|
|
283
|
-
(r(), k(
|
|
280
|
+
return (u, M) => {
|
|
281
|
+
const E = h("FmCard"), a = h("FmHelperText");
|
|
282
|
+
return r(), k("div", gt, [
|
|
283
|
+
s("div", vt, [
|
|
284
|
+
(r(), k(Z, null, me(b, (m) => d(E, {
|
|
284
285
|
variant: "outlined",
|
|
285
|
-
class:
|
|
286
|
-
"col-span-2":
|
|
286
|
+
class: ce(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
287
|
+
"col-span-2": b.length == 1,
|
|
287
288
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": t.modelValue === m.value,
|
|
288
289
|
"hover:bg-fm-color-opacity-sm": t.modelValue !== m.value
|
|
289
290
|
}]),
|
|
@@ -291,8 +292,8 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
291
292
|
key: m.value
|
|
292
293
|
}, {
|
|
293
294
|
default: $(() => [
|
|
294
|
-
s("div",
|
|
295
|
-
s("div",
|
|
295
|
+
s("div", _t, D(m.label), 1),
|
|
296
|
+
s("div", St, D(m.sublabel), 1)
|
|
296
297
|
]),
|
|
297
298
|
_: 2
|
|
298
299
|
}, 1032, ["class", "onClick"])), 64))
|
|
@@ -306,43 +307,43 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
306
307
|
]);
|
|
307
308
|
};
|
|
308
309
|
}
|
|
309
|
-
}), xt = { class: "flex items-center gap-x-8" },
|
|
310
|
+
}), xt = { class: "flex items-center gap-x-8" }, bt = {
|
|
310
311
|
key: 0,
|
|
311
312
|
class: "space-y-16 pr-12"
|
|
312
|
-
},
|
|
313
|
+
}, wt = {
|
|
313
314
|
key: 0,
|
|
314
315
|
class: "flex flex-col gap-12"
|
|
315
|
-
},
|
|
316
|
+
}, Ft = { class: "flex flex-wrap items-center gap-8" }, Ct = { class: "fm-typo-en-title-sm-800" }, kt = { class: "flex flex-col gap-4" }, It = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Tt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mt = {
|
|
316
317
|
key: 2,
|
|
317
318
|
class: "flex flex-col space-y-16"
|
|
318
|
-
},
|
|
319
|
+
}, Et = {
|
|
319
320
|
key: 3,
|
|
320
321
|
class: "flex flex-col space-y-16"
|
|
321
|
-
},
|
|
322
|
+
}, Dt = {
|
|
322
323
|
key: 4,
|
|
323
324
|
class: "flex flex-col space-y-16"
|
|
324
|
-
},
|
|
325
|
+
}, $t = {
|
|
325
326
|
key: 5,
|
|
326
327
|
class: "flex flex-col space-y-16"
|
|
327
|
-
},
|
|
328
|
+
}, At = { class: "flex items-center gap-8" }, Rt = /* @__PURE__ */ le({
|
|
328
329
|
__name: "SegmentSheet",
|
|
329
330
|
emits: ["update:model-value"],
|
|
330
331
|
setup(t, { expose: f, emit: c }) {
|
|
331
|
-
const
|
|
332
|
+
const T = Oe(), { t: b } = pe(), _ = W(!1), u = W(!1), M = {
|
|
332
333
|
name: "",
|
|
333
334
|
isActive: !0,
|
|
334
335
|
type: U.enum.DYNAMIC,
|
|
335
|
-
rule:
|
|
336
|
+
rule: ve.scaffoldGroup(),
|
|
336
337
|
members: []
|
|
337
|
-
},
|
|
338
|
+
}, E = nt, a = W(M), m = O(() => !!a.value.defaultKey), i = O(
|
|
338
339
|
() => a.value.defaultKey ? `connect.loyalty.segment.default_segments.${a.value.defaultKey.toLowerCase()}` : void 0
|
|
339
|
-
), A =
|
|
340
|
-
() => i.value ?
|
|
341
|
-
), y =
|
|
340
|
+
), A = O(
|
|
341
|
+
() => i.value ? b(`${i.value}.name`) : a.value.name
|
|
342
|
+
), y = O(() => {
|
|
342
343
|
const v = a.value.defaultKey;
|
|
343
|
-
return v ?
|
|
344
|
-
}), p =
|
|
345
|
-
const v =
|
|
344
|
+
return v ? b(Ue[v]) : a.value.description ?? "";
|
|
345
|
+
}), p = O(() => {
|
|
346
|
+
const v = E.safeParse(a.value);
|
|
346
347
|
return v.success ? [] : v.error.errors;
|
|
347
348
|
});
|
|
348
349
|
function g(v) {
|
|
@@ -350,67 +351,67 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
350
351
|
...v,
|
|
351
352
|
isActive: v.isActive !== !1,
|
|
352
353
|
type: v.type ?? (v.importFile ? U.enum.STATIC : U.enum.DYNAMIC)
|
|
353
|
-
} : a.value = { ...
|
|
354
|
+
} : a.value = { ...M };
|
|
354
355
|
}
|
|
355
|
-
function
|
|
356
|
+
function S() {
|
|
356
357
|
_.value = !1;
|
|
357
358
|
}
|
|
358
|
-
async function
|
|
359
|
-
|
|
359
|
+
async function j() {
|
|
360
|
+
E.safeParse(a.value).success && (u.value = !0);
|
|
360
361
|
}
|
|
361
|
-
function
|
|
362
|
-
v === U.enum.STATIC ?
|
|
362
|
+
function q(v) {
|
|
363
|
+
v === U.enum.STATIC ? S() : u.value = !1;
|
|
363
364
|
}
|
|
364
365
|
async function I() {
|
|
365
|
-
a.value.type === U.enum.STATIC ? (a.value.rule =
|
|
366
|
+
a.value.type === U.enum.STATIC ? (a.value.rule = ve.scaffoldGroup(), a.value.isActive = !0) : a.value.file = void 0, J("update:model-value", a.value);
|
|
366
367
|
}
|
|
367
|
-
async function
|
|
368
|
+
async function G(v) {
|
|
368
369
|
a.value.type = v;
|
|
369
370
|
}
|
|
370
|
-
|
|
371
|
+
we(async () => {
|
|
371
372
|
});
|
|
372
|
-
const
|
|
373
|
+
const J = c;
|
|
373
374
|
return f({
|
|
374
375
|
showSheet: g,
|
|
375
|
-
hideSheet:
|
|
376
|
+
hideSheet: S
|
|
376
377
|
}), (v, l) => {
|
|
377
|
-
const
|
|
378
|
+
const R = h("FmButton"), X = h("FmChip"), ee = h("FmCard"), te = h("FmSwitch"), o = h("FmSideSheet");
|
|
378
379
|
return r(), V(o, {
|
|
379
380
|
modelValue: e(_),
|
|
380
|
-
"onUpdate:modelValue": l[9] || (l[9] = (n) =>
|
|
381
|
-
header: e(m) ? e(
|
|
381
|
+
"onUpdate:modelValue": l[9] || (l[9] = (n) => Me(_) ? _.value = n : null),
|
|
382
|
+
header: e(m) ? e(b)("connect.loyalty.segment.default_segments.default_segment") : e(a)._id ? "Edit segment" : "Add segment",
|
|
382
383
|
"dismiss-away": "",
|
|
383
384
|
"close-button": !0,
|
|
384
385
|
"max-width": 1100
|
|
385
|
-
},
|
|
386
|
+
}, Ee({
|
|
386
387
|
"side-sheet-footer": $(() => [
|
|
387
|
-
s("div",
|
|
388
|
-
e(m) ? (r(), V(
|
|
388
|
+
s("div", At, [
|
|
389
|
+
e(m) ? (r(), V(R, {
|
|
389
390
|
key: 0,
|
|
390
|
-
label: e(
|
|
391
|
-
onClick: l[6] || (l[6] = (n) =>
|
|
391
|
+
label: e(b)("connect.loyalty.segment.default_segments.close"),
|
|
392
|
+
onClick: l[6] || (l[6] = (n) => S()),
|
|
392
393
|
variant: "tertiary"
|
|
393
|
-
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(
|
|
394
|
-
d(
|
|
394
|
+
}, null, 8, ["label"])) : e(u) || e(a).type === e(U).enum.STATIC ? (r(), k(Z, { key: 1 }, [
|
|
395
|
+
d(R, {
|
|
395
396
|
label: "Save Segment",
|
|
396
397
|
onClick: I,
|
|
397
|
-
loading: e(
|
|
398
|
-
disabled: e(p).length > 0 || e(
|
|
398
|
+
loading: e(T).isLoading,
|
|
399
|
+
disabled: e(p).length > 0 || e(T).isLoading
|
|
399
400
|
}, null, 8, ["loading", "disabled"]),
|
|
400
|
-
d(
|
|
401
|
+
d(R, {
|
|
401
402
|
label: "Cancel",
|
|
402
|
-
onClick: l[7] || (l[7] = (n) =>
|
|
403
|
+
onClick: l[7] || (l[7] = (n) => q(e(a).type)),
|
|
403
404
|
variant: "tertiary"
|
|
404
405
|
})
|
|
405
|
-
], 64)) : (r(), k(
|
|
406
|
-
d(
|
|
406
|
+
], 64)) : (r(), k(Z, { key: 2 }, [
|
|
407
|
+
d(R, {
|
|
407
408
|
label: "Review Segment",
|
|
408
|
-
disabled: e(p).length > 0 || e(
|
|
409
|
-
onClick:
|
|
409
|
+
disabled: e(p).length > 0 || e(T).isLoading,
|
|
410
|
+
onClick: j
|
|
410
411
|
}, null, 8, ["disabled"]),
|
|
411
|
-
d(
|
|
412
|
+
d(R, {
|
|
412
413
|
label: "Cancel",
|
|
413
|
-
onClick: l[8] || (l[8] = (n) =>
|
|
414
|
+
onClick: l[8] || (l[8] = (n) => S()),
|
|
414
415
|
variant: "tertiary"
|
|
415
416
|
})
|
|
416
417
|
], 64))
|
|
@@ -419,80 +420,80 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
419
420
|
default: $(() => {
|
|
420
421
|
var n, F;
|
|
421
422
|
return [
|
|
422
|
-
d(
|
|
423
|
-
e(u) ? (r(), V(
|
|
423
|
+
d(Xe, { json: e(a) }, null, 8, ["json"]),
|
|
424
|
+
e(u) ? (r(), V(he, {
|
|
424
425
|
key: 1,
|
|
425
426
|
title: e(a).name,
|
|
426
427
|
segment: e(a)
|
|
427
|
-
}, null, 8, ["title", "segment"])) : (r(), k("div",
|
|
428
|
-
e(m) ? (r(), k("div",
|
|
429
|
-
s("div",
|
|
430
|
-
s("div",
|
|
431
|
-
d(
|
|
432
|
-
label: e(
|
|
428
|
+
}, null, 8, ["title", "segment"])) : (r(), k("div", bt, [
|
|
429
|
+
e(m) ? (r(), k("div", wt, [
|
|
430
|
+
s("div", Ft, [
|
|
431
|
+
s("div", Ct, D(e(A)), 1),
|
|
432
|
+
d(X, {
|
|
433
|
+
label: e(b)("connect.loyalty.segment.default_segments.system"),
|
|
433
434
|
compact: "",
|
|
434
435
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100"
|
|
435
436
|
}, null, 8, ["label"])
|
|
436
437
|
]),
|
|
437
|
-
d(
|
|
438
|
+
d(ee, {
|
|
438
439
|
variant: "outlined",
|
|
439
440
|
class: "p-16"
|
|
440
441
|
}, {
|
|
441
442
|
default: $(() => [
|
|
442
|
-
s("div",
|
|
443
|
-
s("div",
|
|
444
|
-
s("div",
|
|
443
|
+
s("div", kt, [
|
|
444
|
+
s("div", It, D(e(b)("connect.loyalty.segment.default_segments.description")), 1),
|
|
445
|
+
s("div", Tt, D(e(y)), 1)
|
|
445
446
|
])
|
|
446
447
|
]),
|
|
447
448
|
_: 1
|
|
448
449
|
})
|
|
449
|
-
])) : (r(), V(
|
|
450
|
+
])) : (r(), V(qe, {
|
|
450
451
|
key: 1,
|
|
451
452
|
modelValue: e(a).name,
|
|
452
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
453
|
+
"onUpdate:modelValue": l[1] || (l[1] = (w) => e(a).name = w),
|
|
453
454
|
label: "Segment title",
|
|
454
|
-
schema: e(
|
|
455
|
+
schema: e(ze).typeAtPath(e(E), "name")
|
|
455
456
|
}, null, 8, ["modelValue", "schema"])),
|
|
456
|
-
e(m) ? H("", !0) : (r(), k("div",
|
|
457
|
+
e(m) ? H("", !0) : (r(), k("div", Mt, [
|
|
457
458
|
l[11] || (l[11] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
|
|
458
|
-
d(
|
|
459
|
+
d(ht, {
|
|
459
460
|
"model-value": e(a).type,
|
|
460
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
461
|
-
|
|
461
|
+
"onUpdate:modelValue": l[2] || (l[2] = (w) => {
|
|
462
|
+
G(w);
|
|
462
463
|
})
|
|
463
464
|
}, null, 8, ["model-value"])
|
|
464
465
|
])),
|
|
465
|
-
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div",
|
|
466
|
+
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div", Et, [
|
|
466
467
|
l[12] || (l[12] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
|
|
467
|
-
d(
|
|
468
|
+
d(Ge, {
|
|
468
469
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
469
470
|
includeOnly: "user",
|
|
470
471
|
"model-value": (n = e(a)) == null ? void 0 : n.rule,
|
|
471
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
472
|
-
e(a).rule =
|
|
472
|
+
"onUpdate:modelValue": l[3] || (l[3] = (w) => {
|
|
473
|
+
e(a).rule = w;
|
|
473
474
|
})
|
|
474
475
|
}, null, 8, ["model-value"])
|
|
475
|
-
])) : e(m) ? H("", !0) : (r(), k("div",
|
|
476
|
-
d(
|
|
476
|
+
])) : e(m) ? H("", !0) : (r(), k("div", Dt, [
|
|
477
|
+
d(dt, {
|
|
477
478
|
importFile: e(a).importFile,
|
|
478
|
-
"onUpdate:file": l[4] || (l[4] = (
|
|
479
|
-
e(a).file =
|
|
479
|
+
"onUpdate:file": l[4] || (l[4] = (w) => {
|
|
480
|
+
e(a).file = w;
|
|
480
481
|
})
|
|
481
482
|
}, null, 8, ["importFile"])
|
|
482
483
|
])),
|
|
483
|
-
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div",
|
|
484
|
+
e(a).type === e(U).enum.DYNAMIC && !e(m) ? (r(), k("div", $t, [
|
|
484
485
|
l[13] || (l[13] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
|
|
485
|
-
d(
|
|
486
|
+
d(te, {
|
|
486
487
|
"model-value": e(a).isActive ?? !0,
|
|
487
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
488
|
+
"onUpdate:modelValue": l[5] || (l[5] = (w) => e(a).isActive = w),
|
|
488
489
|
label: "Active",
|
|
489
490
|
sublabel: "When enabled, this will recalculate the segment statistics daily.",
|
|
490
491
|
"label-placement": "right"
|
|
491
492
|
}, null, 8, ["model-value"])
|
|
492
493
|
])) : H("", !0),
|
|
493
|
-
e(m) ? (r(), V(
|
|
494
|
+
e(m) ? (r(), V(he, {
|
|
494
495
|
key: (F = e(a)._id) == null ? void 0 : F.toString(),
|
|
495
|
-
title: e(
|
|
496
|
+
title: e(b)("connect.loyalty.segment.default_segments.members"),
|
|
496
497
|
segment: e(a)
|
|
497
498
|
}, null, 8, ["title", "segment"])) : H("", !0)
|
|
498
499
|
]))
|
|
@@ -504,7 +505,7 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
504
505
|
name: "side-sheet-header",
|
|
505
506
|
fn: $(() => [
|
|
506
507
|
s("div", xt, [
|
|
507
|
-
d(
|
|
508
|
+
d(R, {
|
|
508
509
|
icon: "arrow_back",
|
|
509
510
|
variant: "tertiary",
|
|
510
511
|
onClick: l[0] || (l[0] = (n) => u.value = !1)
|
|
@@ -517,77 +518,79 @@ const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
|
517
518
|
]), 1032, ["modelValue", "header"]);
|
|
518
519
|
};
|
|
519
520
|
}
|
|
520
|
-
}), xe =
|
|
521
|
-
function
|
|
521
|
+
}), xe = We(), Pt = Ie();
|
|
522
|
+
function ue(t) {
|
|
522
523
|
const f = se(t);
|
|
523
524
|
return f.isValid() ? f.format("DD/MM/YYYY") : "";
|
|
524
525
|
}
|
|
525
|
-
const
|
|
526
|
+
const Nt = {
|
|
526
527
|
mapMemberExportRow: (t) => {
|
|
527
|
-
var a, m, i, A, y, p, g,
|
|
528
|
-
const f =
|
|
528
|
+
var a, m, i, A, y, p, g, S, j, q, I, G, J, v, l, R, X, ee, te, o, n, F, w, P, K, L, oe, ne;
|
|
529
|
+
const f = O(() => Pt.locations.map((C) => ({
|
|
529
530
|
label: C.name,
|
|
530
531
|
value: C._id
|
|
531
|
-
}))), c = (a =
|
|
532
|
+
}))), c = (a = Le.parseOneAddress(
|
|
532
533
|
t == null ? void 0 : t.email
|
|
533
|
-
)) != null && a.domain.includes("feedmepos.com") ? void 0 : t.email,
|
|
534
|
-
(C,
|
|
535
|
-
var
|
|
536
|
-
const
|
|
537
|
-
(
|
|
538
|
-
)) == null ? void 0 :
|
|
539
|
-
return !
|
|
534
|
+
)) != null && a.domain.includes("feedmepos.com") ? void 0 : t.email, T = (i = ((m = t == null ? void 0 : t.collection) == null ? void 0 : m.TITLE) || []) == null ? void 0 : i.reduce(
|
|
535
|
+
(C, N) => {
|
|
536
|
+
var x, Y;
|
|
537
|
+
const Q = (Y = (x = xe.sortedTitles) == null ? void 0 : x.find(
|
|
538
|
+
(ie) => ie._id === N.collectible
|
|
539
|
+
)) == null ? void 0 : Y.name;
|
|
540
|
+
return !Q || N.balance <= 0 || C.push(Q), C;
|
|
540
541
|
},
|
|
541
542
|
[]
|
|
542
|
-
),
|
|
543
|
-
(C,
|
|
544
|
-
var
|
|
545
|
-
const
|
|
546
|
-
(
|
|
547
|
-
)) == null ? void 0 :
|
|
548
|
-
return C[
|
|
543
|
+
), b = (xe.sortedTitles || []).reduce(
|
|
544
|
+
(C, N) => {
|
|
545
|
+
var x, Y, ie, fe;
|
|
546
|
+
const Q = (fe = (ie = (Y = (((x = t == null ? void 0 : t.collection) == null ? void 0 : x.TITLE) || []).find(
|
|
547
|
+
(Te) => Te.collectible === N._id
|
|
548
|
+
)) == null ? void 0 : Y.expiryBalance) == null ? void 0 : ie[0]) == null ? void 0 : fe.expiredAt;
|
|
549
|
+
return C[N.name] = Q ? se(Q).format("DD/MM/YYYY") : "", C;
|
|
549
550
|
},
|
|
550
551
|
{}
|
|
551
|
-
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((
|
|
552
|
-
(C,
|
|
552
|
+
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((q = (j = (S = (g = t.collection) == null ? void 0 : g.CREDIT) == null ? void 0 : S.at(0)) == null ? void 0 : j.expiryBalance) == null ? void 0 : q.reduce(
|
|
553
|
+
(C, N) => C + N.amount,
|
|
553
554
|
0
|
|
554
|
-
)) || 0,
|
|
555
|
+
)) || 0, M = et(_, 2);
|
|
555
556
|
return {
|
|
556
557
|
ID: t._id.toString(),
|
|
557
558
|
Name: ((I = t.name) == null ? void 0 : I.trim()) || "",
|
|
558
|
-
Phone: ((
|
|
559
|
+
Phone: ((G = t == null ? void 0 : t.phoneNumber) == null ? void 0 : G.trim()) || "",
|
|
559
560
|
Email: c || "",
|
|
560
561
|
Gender: t.gender || "",
|
|
561
562
|
CardNo: t.cardNo || "",
|
|
562
|
-
Birthday: t != null && t.birthday ?
|
|
563
|
-
Credit: parseFloat((Number(
|
|
563
|
+
Birthday: t != null && t.birthday ? ue(t == null ? void 0 : t.birthday) : "",
|
|
564
|
+
Credit: parseFloat((Number(M) - Number(u)).toFixed(2)),
|
|
564
565
|
FreeCredit: Number(u.toFixed(2)),
|
|
565
|
-
TotalCredit: Number(
|
|
566
|
-
Exp: t != null && t.collection ? ((l = (v = (
|
|
567
|
-
Point: t != null && t.collection ? ((
|
|
568
|
-
Level: t != null && t.collection ? ((n = (o = (
|
|
569
|
-
Tier: t != null && t.collection ? ((
|
|
570
|
-
Titles:
|
|
571
|
-
...
|
|
566
|
+
TotalCredit: Number(M),
|
|
567
|
+
Exp: t != null && t.collection ? ((l = (v = (J = t.collection) == null ? void 0 : J.POINT) == null ? void 0 : v.at(0)) == null ? void 0 : l.balance) ?? 0 : 0,
|
|
568
|
+
Point: t != null && t.collection ? ((ee = (X = (R = t.collection) == null ? void 0 : R.COIN) == null ? void 0 : X.at(0)) == null ? void 0 : ee.balance) ?? 0 : 0,
|
|
569
|
+
Level: t != null && t.collection ? ((n = (o = (te = t.collection) == null ? void 0 : te.TIER) == null ? void 0 : o.at(0)) == null ? void 0 : n.balance) ?? 0 : 0,
|
|
570
|
+
Tier: t != null && t.collection ? ((P = (w = (F = t.collection) == null ? void 0 : F.TIER) == null ? void 0 : w.at(0)) == null ? void 0 : P.balance) ?? 0 : 0,
|
|
571
|
+
Titles: T.join(","),
|
|
572
|
+
...b,
|
|
572
573
|
TotalTransaction: t.stats.visitCount,
|
|
573
|
-
AvgSpent:
|
|
574
|
+
AvgSpent: tt(Number(t.stats.avgBillSize || 0)).toFormat(
|
|
574
575
|
!1
|
|
575
576
|
),
|
|
576
577
|
TotalSpent: t.stats.avgBillSize * t.stats.visitCount,
|
|
577
|
-
LastVisit:
|
|
578
|
+
LastVisit: ue(t.stats.lastVisit),
|
|
578
579
|
Feedback: ((K = t.stats) == null ? void 0 : K.feedbackCount) || 0,
|
|
579
|
-
|
|
580
|
-
|
|
580
|
+
LastSeasonTierEarned: ((L = t.stats) == null ? void 0 : L.lastSeasonTierEarned) || 0,
|
|
581
|
+
LastSeasonPointEarned: ((oe = t.stats) == null ? void 0 : oe.lastSeasonPointEarned) || 0,
|
|
582
|
+
JoinedAt: ue(t.joinAt || void 0),
|
|
583
|
+
JoinedAtLocation: t.location && ((ne = f.value.find((C) => C.value == t.location)) == null ? void 0 : ne.label) || "-",
|
|
581
584
|
VisitFrequency: `${Number(
|
|
582
585
|
Math.ceil(t.stats.avgVisitFrequency).toFixed(0)
|
|
583
586
|
)}`
|
|
584
587
|
};
|
|
585
588
|
}
|
|
586
|
-
},
|
|
589
|
+
}, Bt = { class: "flex items-center" }, Ut = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Vt = { class: "px-24 flex flex-col gap-y-16" }, Lt = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Yt = { class: "flex flex-wrap items-center gap-8" }, zt = { class: "fm-typo-en-body-md-600" }, Ot = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, jt = { class: "flex flex-col gap-16 text-center" }, qt = { class: "fm-typo-en-title-sm-800" }, Gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, be = "text-fm-color-typo-info bg-fm-color-system-info-100", Eo = /* @__PURE__ */ le({
|
|
587
590
|
__name: "Segment",
|
|
588
591
|
setup(t) {
|
|
589
|
-
const { minor: f } =
|
|
590
|
-
function
|
|
592
|
+
const { minor: f } = Pe, { t: c } = pe(), T = Ie(), { mapMemberExportRow: b } = Nt, _ = Ne(), u = ot(), M = W(0);
|
|
593
|
+
function E(o) {
|
|
591
594
|
return !!o.defaultKey;
|
|
592
595
|
}
|
|
593
596
|
function a(o) {
|
|
@@ -598,7 +601,7 @@ const Pt = {
|
|
|
598
601
|
return n ? c(`${n}.name`) : o.name;
|
|
599
602
|
}
|
|
600
603
|
function i(o) {
|
|
601
|
-
return
|
|
604
|
+
return M.value <= 0 ? "0.00" : ((o ?? 0) * 100 / M.value).toFixed(2);
|
|
602
605
|
}
|
|
603
606
|
const A = [
|
|
604
607
|
{
|
|
@@ -607,9 +610,9 @@ const Pt = {
|
|
|
607
610
|
cell(o) {
|
|
608
611
|
return B("div", { class: "flex flex-wrap items-center gap-8" }, [
|
|
609
612
|
B("span", m(o.row.original)),
|
|
610
|
-
...
|
|
613
|
+
...E(o.row.original) ? [
|
|
611
614
|
B(ae.FmChip, {
|
|
612
|
-
class:
|
|
615
|
+
class: be,
|
|
613
616
|
label: c("connect.loyalty.segment.default_segments.system"),
|
|
614
617
|
compact: !0
|
|
615
618
|
})
|
|
@@ -663,7 +666,7 @@ const Pt = {
|
|
|
663
666
|
ae.FmMenuItem,
|
|
664
667
|
{
|
|
665
668
|
onClick: async (n) => {
|
|
666
|
-
n.stopPropagation(),
|
|
669
|
+
n.stopPropagation(), J(o.row.original);
|
|
667
670
|
}
|
|
668
671
|
},
|
|
669
672
|
{
|
|
@@ -676,12 +679,12 @@ const Pt = {
|
|
|
676
679
|
)
|
|
677
680
|
}
|
|
678
681
|
),
|
|
679
|
-
...
|
|
682
|
+
...E(o.row.original) ? [] : [
|
|
680
683
|
B(
|
|
681
684
|
ae.FmMenuItem,
|
|
682
685
|
{
|
|
683
686
|
onClick: async (n) => {
|
|
684
|
-
n.stopPropagation(),
|
|
687
|
+
n.stopPropagation(), G(o.row.original);
|
|
685
688
|
}
|
|
686
689
|
},
|
|
687
690
|
{
|
|
@@ -701,15 +704,15 @@ const Pt = {
|
|
|
701
704
|
]);
|
|
702
705
|
}
|
|
703
706
|
}
|
|
704
|
-
], y =
|
|
705
|
-
|
|
706
|
-
),
|
|
707
|
+
], y = W(null), { tableMeta: p, rowData: g, debouncedFetchData: S } = Fe(
|
|
708
|
+
z.readAll
|
|
709
|
+
), j = O(() => g.value.length === 0 ? !1 : Ve.some(
|
|
707
710
|
(o) => !g.value.some((n) => n.defaultKey === o)
|
|
708
711
|
));
|
|
709
|
-
async function
|
|
712
|
+
async function q() {
|
|
710
713
|
var o;
|
|
711
714
|
try {
|
|
712
|
-
await
|
|
715
|
+
await z.refreshSegments(), _.open({ type: "info", title: "Segment refresh queued" });
|
|
713
716
|
} catch (n) {
|
|
714
717
|
if (((n == null ? void 0 : n.status) ?? ((o = n == null ? void 0 : n.response) == null ? void 0 : o.status)) === 409) {
|
|
715
718
|
_.open({
|
|
@@ -727,7 +730,7 @@ const Pt = {
|
|
|
727
730
|
async function I() {
|
|
728
731
|
await f(
|
|
729
732
|
async () => {
|
|
730
|
-
await
|
|
733
|
+
await z.startDefaultSegments(), await S({ pageSize: 10, pageIndex: 0 });
|
|
731
734
|
},
|
|
732
735
|
{
|
|
733
736
|
message: c(
|
|
@@ -739,10 +742,10 @@ const Pt = {
|
|
|
739
742
|
}
|
|
740
743
|
);
|
|
741
744
|
}
|
|
742
|
-
async function
|
|
743
|
-
await
|
|
745
|
+
async function G(o) {
|
|
746
|
+
await Re.remove(`Are you sure you want to remove ${o.name}?`) && await f(
|
|
744
747
|
async () => {
|
|
745
|
-
await
|
|
748
|
+
await z.delete(o._id), await S({ pageSize: 10, pageIndex: 0 });
|
|
746
749
|
},
|
|
747
750
|
{
|
|
748
751
|
message: `Removing ${o.name}`,
|
|
@@ -750,14 +753,14 @@ const Pt = {
|
|
|
750
753
|
}
|
|
751
754
|
);
|
|
752
755
|
}
|
|
753
|
-
async function
|
|
756
|
+
async function J(o) {
|
|
754
757
|
const n = {
|
|
755
758
|
sortBy: "_id",
|
|
756
759
|
descending: !1,
|
|
757
760
|
rowsPerPage: 1e3,
|
|
758
761
|
page: 1,
|
|
759
762
|
rowsNumber: 0
|
|
760
|
-
}, F = new
|
|
763
|
+
}, F = new Ye(), w = m(o), P = (await _e.read({
|
|
761
764
|
limit: 1,
|
|
762
765
|
skip: 0,
|
|
763
766
|
sortBy: n.sortBy,
|
|
@@ -765,26 +768,26 @@ const Pt = {
|
|
|
765
768
|
})).meta.totalResources ?? 0, K = n.rowsPerPage;
|
|
766
769
|
await f(
|
|
767
770
|
async () => {
|
|
768
|
-
for (let L = 0; L <
|
|
769
|
-
const
|
|
771
|
+
for (let L = 0; L < P; L += K) {
|
|
772
|
+
const oe = {
|
|
770
773
|
...n,
|
|
771
774
|
limit: K,
|
|
772
775
|
skip: n.page - 1,
|
|
773
776
|
sortBy: n.sortBy,
|
|
774
777
|
descending: n.descending
|
|
775
|
-
},
|
|
778
|
+
}, ne = await z.paginateSegmentUsers(
|
|
776
779
|
o._id,
|
|
777
|
-
|
|
780
|
+
oe
|
|
778
781
|
);
|
|
779
|
-
for (const
|
|
780
|
-
const
|
|
781
|
-
F.addRecord(
|
|
782
|
+
for (const C of ne.resources) {
|
|
783
|
+
const N = b(C);
|
|
784
|
+
F.addRecord(N);
|
|
782
785
|
}
|
|
783
786
|
n.page++;
|
|
784
787
|
}
|
|
785
|
-
await
|
|
788
|
+
await ke(
|
|
786
789
|
F.buildExcel(),
|
|
787
|
-
`[${
|
|
790
|
+
`[${w}]-members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
788
791
|
{
|
|
789
792
|
bookType: "xlsx",
|
|
790
793
|
bookSST: !1,
|
|
@@ -805,11 +808,11 @@ const Pt = {
|
|
|
805
808
|
if (o.type === U.enum.STATIC) {
|
|
806
809
|
const F = new FormData();
|
|
807
810
|
if (F.append("file", o.file), o._id) {
|
|
808
|
-
const { members:
|
|
809
|
-
F.append("segment", JSON.stringify(L)), await
|
|
811
|
+
const { members: w, _id: P, file: K, ...L } = o;
|
|
812
|
+
F.append("segment", JSON.stringify(L)), await z.updateStatic(o._id, F);
|
|
810
813
|
} else {
|
|
811
|
-
const { file:
|
|
812
|
-
F.append("segment", JSON.stringify(
|
|
814
|
+
const { file: w, ...P } = o;
|
|
815
|
+
F.append("segment", JSON.stringify(P)), await z.createStatic(F);
|
|
813
816
|
}
|
|
814
817
|
o.file && _.open({
|
|
815
818
|
type: "info",
|
|
@@ -817,17 +820,17 @@ const Pt = {
|
|
|
817
820
|
action: "View",
|
|
818
821
|
onAction: async () => {
|
|
819
822
|
await u.push({
|
|
820
|
-
name:
|
|
821
|
-
query: { type: [
|
|
823
|
+
name: Se["$connect-QUEUE"],
|
|
824
|
+
query: { type: [ge.enum.SEGMENTATION_IMPORTED] }
|
|
822
825
|
});
|
|
823
826
|
}
|
|
824
827
|
});
|
|
825
828
|
} else if (o._id) {
|
|
826
|
-
const { members: F, _id:
|
|
827
|
-
await
|
|
829
|
+
const { members: F, _id: w, ...P } = o;
|
|
830
|
+
await z.update(o._id, P);
|
|
828
831
|
} else
|
|
829
|
-
await
|
|
830
|
-
await
|
|
832
|
+
await z.create(o);
|
|
833
|
+
await S({ pageSize: 10, pageIndex: 0 }), (n = y.value) == null || n.hideSheet();
|
|
831
834
|
},
|
|
832
835
|
{
|
|
833
836
|
message: "Saving segment",
|
|
@@ -839,21 +842,21 @@ const Pt = {
|
|
|
839
842
|
var n;
|
|
840
843
|
(n = y.value) == null || n.showSheet(o);
|
|
841
844
|
}
|
|
842
|
-
const
|
|
845
|
+
const R = {
|
|
843
846
|
label: c("connect.navigation.queue"),
|
|
844
847
|
value: "queue",
|
|
845
848
|
isPrimary: !1,
|
|
846
849
|
prependIcon: "work_history"
|
|
847
|
-
},
|
|
850
|
+
}, X = {
|
|
848
851
|
label: c("connect.loyalty.segment.default_segments.get_started.action"),
|
|
849
852
|
value: "start-default-segments",
|
|
850
853
|
isPrimary: !1,
|
|
851
854
|
prependIcon: "auto_awesome"
|
|
852
|
-
},
|
|
853
|
-
if (!
|
|
855
|
+
}, ee = O(() => {
|
|
856
|
+
if (!T.isPremium)
|
|
854
857
|
return [];
|
|
855
|
-
const o = [
|
|
856
|
-
return
|
|
858
|
+
const o = [R];
|
|
859
|
+
return j.value && o.push(X), o.push(
|
|
857
860
|
{
|
|
858
861
|
label: c("connect.loyalty.segment.actions.refresh"),
|
|
859
862
|
value: "refresh",
|
|
@@ -867,18 +870,18 @@ const Pt = {
|
|
|
867
870
|
}
|
|
868
871
|
), o;
|
|
869
872
|
});
|
|
870
|
-
function
|
|
873
|
+
function te(o) {
|
|
871
874
|
switch (o) {
|
|
872
875
|
case "add":
|
|
873
876
|
l();
|
|
874
877
|
break;
|
|
875
878
|
case "refresh":
|
|
876
|
-
|
|
879
|
+
q();
|
|
877
880
|
break;
|
|
878
881
|
case "queue":
|
|
879
882
|
u.push({
|
|
880
|
-
name:
|
|
881
|
-
query: { type: [
|
|
883
|
+
name: Se["$connect-QUEUE"],
|
|
884
|
+
query: { type: [ge.enum.SEGMENTATION_IMPORTED] }
|
|
882
885
|
});
|
|
883
886
|
break;
|
|
884
887
|
case "start-default-segments":
|
|
@@ -886,34 +889,34 @@ const Pt = {
|
|
|
886
889
|
break;
|
|
887
890
|
}
|
|
888
891
|
}
|
|
889
|
-
return
|
|
890
|
-
const { meta: o } = await
|
|
892
|
+
return De(async () => {
|
|
893
|
+
const { meta: o } = await _e.read({
|
|
891
894
|
limit: 1,
|
|
892
895
|
skip: 0,
|
|
893
896
|
sortBy: "_id",
|
|
894
897
|
search: void 0,
|
|
895
898
|
descending: !1
|
|
896
899
|
});
|
|
897
|
-
|
|
900
|
+
M.value = o.totalResources ?? 0, await S({ pageSize: 10, pageIndex: 0 }), await T.readPremium(), await T.readLocations();
|
|
898
901
|
}), (o, n) => {
|
|
899
|
-
const F = h("FmPill"),
|
|
900
|
-
return r(), k(
|
|
901
|
-
d(
|
|
902
|
+
const F = h("FmPill"), w = h("FmPageHead"), P = h("FmChip"), K = h("FmIcon"), L = h("FmMenuItem"), oe = h("FmMenu"), ne = h("FmListItem"), C = h("FmList"), N = h("FmButton"), Q = h("FmCard");
|
|
903
|
+
return r(), k(Z, null, [
|
|
904
|
+
d(w, {
|
|
902
905
|
title: "Segments",
|
|
903
|
-
actions: e(
|
|
904
|
-
"onClick:action": n[0] || (n[0] = (
|
|
906
|
+
actions: e(ee),
|
|
907
|
+
"onClick:action": n[0] || (n[0] = (x) => te(x))
|
|
905
908
|
}, {
|
|
906
909
|
title: $(() => [
|
|
907
|
-
s("div",
|
|
908
|
-
s("span",
|
|
910
|
+
s("div", Bt, [
|
|
911
|
+
s("span", Ut, D(e(c)("connect.loyalty.segment.title")), 1),
|
|
909
912
|
d(F, { variant: "premium" })
|
|
910
913
|
])
|
|
911
914
|
]),
|
|
912
915
|
_: 1
|
|
913
916
|
}, 8, ["actions"]),
|
|
914
|
-
s("div",
|
|
915
|
-
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(
|
|
916
|
-
d(
|
|
917
|
+
s("div", Vt, [
|
|
918
|
+
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(Z, { key: 0 }, [
|
|
919
|
+
d(Ce, {
|
|
917
920
|
loading: e(p).isLoading,
|
|
918
921
|
"row-data": e(g),
|
|
919
922
|
"row-count": e(p).totalRows,
|
|
@@ -922,35 +925,35 @@ const Pt = {
|
|
|
922
925
|
"page-count": e(p).pageCount,
|
|
923
926
|
"page-index": e(p).pageIndex,
|
|
924
927
|
"page-size": e(p).pageSize,
|
|
925
|
-
onRowClick: n[1] || (n[1] = (
|
|
926
|
-
l(
|
|
928
|
+
onRowClick: n[1] || (n[1] = (x) => {
|
|
929
|
+
l(x.original);
|
|
927
930
|
}),
|
|
928
|
-
onPageChange: e(
|
|
931
|
+
onPageChange: e(S)
|
|
929
932
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
|
|
930
|
-
d(
|
|
933
|
+
d(C, { class: "w-full hidden xs:!block" }, {
|
|
931
934
|
default: $(() => [
|
|
932
|
-
(r(!0), k(
|
|
933
|
-
key:
|
|
935
|
+
(r(!0), k(Z, null, me(e(g), (x) => (r(), V(ne, {
|
|
936
|
+
key: x._id.toString(),
|
|
934
937
|
tag: "label",
|
|
935
|
-
onClick: (
|
|
938
|
+
onClick: (Y) => l(x)
|
|
936
939
|
}, {
|
|
937
940
|
default: $(() => [
|
|
938
941
|
s("div", null, [
|
|
939
|
-
s("div",
|
|
940
|
-
s("div",
|
|
941
|
-
s("span",
|
|
942
|
-
|
|
942
|
+
s("div", Lt, D((x.memberCount ?? 0).toLocaleString()) + " total customers ", 1),
|
|
943
|
+
s("div", Yt, [
|
|
944
|
+
s("span", zt, D(m(x)), 1),
|
|
945
|
+
E(x) ? (r(), V(P, {
|
|
943
946
|
key: 0,
|
|
944
|
-
class:
|
|
947
|
+
class: ce(be),
|
|
945
948
|
label: e(c)("connect.loyalty.segment.default_segments.system"),
|
|
946
949
|
compact: ""
|
|
947
950
|
}, null, 8, ["label"])) : H("", !0)
|
|
948
951
|
]),
|
|
949
|
-
s("div",
|
|
952
|
+
s("div", Ot, D(i(x.memberCount)) + "% of customers ", 1)
|
|
950
953
|
])
|
|
951
954
|
]),
|
|
952
955
|
append: $(() => [
|
|
953
|
-
d(
|
|
956
|
+
d(oe, { "stop-click-propagation": !0 }, {
|
|
954
957
|
"menu-button": $(() => [
|
|
955
958
|
d(K, { name: "more_vert" })
|
|
956
959
|
]),
|
|
@@ -958,13 +961,13 @@ const Pt = {
|
|
|
958
961
|
d(L, {
|
|
959
962
|
class: "fm-typo-en-body-md-400",
|
|
960
963
|
label: "Export",
|
|
961
|
-
"onUpdate:modelValue": (
|
|
964
|
+
"onUpdate:modelValue": (Y) => Y && J(x)
|
|
962
965
|
}, null, 8, ["onUpdate:modelValue"]),
|
|
963
|
-
|
|
966
|
+
E(x) ? H("", !0) : (r(), V(L, {
|
|
964
967
|
key: 0,
|
|
965
968
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400",
|
|
966
969
|
label: "Remove",
|
|
967
|
-
"onUpdate:modelValue": (
|
|
970
|
+
"onUpdate:modelValue": (Y) => Y && G(x)
|
|
968
971
|
}, null, 8, ["onUpdate:modelValue"]))
|
|
969
972
|
]),
|
|
970
973
|
_: 2
|
|
@@ -982,26 +985,26 @@ const Pt = {
|
|
|
982
985
|
}, {
|
|
983
986
|
default: $(() => [
|
|
984
987
|
n[3] || (n[3] = s("img", {
|
|
985
|
-
src:
|
|
988
|
+
src: $e,
|
|
986
989
|
class: "aspect-square w-[150px]"
|
|
987
990
|
}, null, -1)),
|
|
988
|
-
s("div",
|
|
989
|
-
s("div",
|
|
990
|
-
s("div",
|
|
991
|
+
s("div", jt, [
|
|
992
|
+
s("div", qt, D(e(c)("connect.loyalty.segment.default_segments.get_started.title")), 1),
|
|
993
|
+
s("div", Gt, D(e(c)(
|
|
991
994
|
"connect.loyalty.segment.default_segments.get_started.description"
|
|
992
995
|
)), 1)
|
|
993
996
|
]),
|
|
994
|
-
d(
|
|
997
|
+
d(N, {
|
|
995
998
|
variant: "primary",
|
|
996
999
|
label: e(c)("connect.loyalty.segment.default_segments.get_started.action"),
|
|
997
|
-
disabled: !e(
|
|
1000
|
+
disabled: !e(T).isPremium,
|
|
998
1001
|
icon: "auto_awesome",
|
|
999
|
-
onClick: n[2] || (n[2] = (
|
|
1002
|
+
onClick: n[2] || (n[2] = (x) => I())
|
|
1000
1003
|
}, null, 8, ["label", "disabled"])
|
|
1001
1004
|
]),
|
|
1002
1005
|
_: 1
|
|
1003
1006
|
})),
|
|
1004
|
-
d(
|
|
1007
|
+
d(Rt, {
|
|
1005
1008
|
ref_key: "sheetRef",
|
|
1006
1009
|
ref: y,
|
|
1007
1010
|
"onUpdate:modelValue": v
|
|
@@ -1012,5 +1015,5 @@ const Pt = {
|
|
|
1012
1015
|
}
|
|
1013
1016
|
});
|
|
1014
1017
|
export {
|
|
1015
|
-
|
|
1018
|
+
Eo as default
|
|
1016
1019
|
};
|