@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-beta.80
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-DsB2o1oB.js → App-DievprEi.js} +853 -683
- package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-DrdqOhZL.js} +16 -13
- package/dist/{Bin-DMr7K8Kj.js → Bin-Ci2k3z77.js} +8 -8
- package/dist/Broadcast-CpDMAG1o.js +306 -0
- package/dist/CampaignAnalytic-uRyGaLaN.js +1830 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -5
- package/dist/Card-tb98Kyr-.js +1086 -0
- package/dist/{Collections-B0uGC2FE.js → Collections-P1S5WjnJ.js} +14 -13
- package/dist/Credit-DwK7JYf-.js +286 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js +53 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js +4432 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js} +36 -36
- package/dist/Experience-BejtRlOj.js +288 -0
- package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-C-hmBaHm.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-n8qL896g.js +356 -0
- package/dist/GiftCardSetup-Bgsfcu7N.js +736 -0
- package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js +424 -0
- package/dist/Goals-BB8LJlq3.js +247 -0
- package/dist/{Grab-DmmwrGzk.js → Grab-COq3Ujst.js} +33 -32
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
- package/dist/{Index-m7l4insz.js → Index-BdkIinaE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
- package/dist/LoyaltyDashboard-D4Jtpw0n.js +2911 -0
- package/dist/MainLayout-Ca-Xm3eZ.js +143 -0
- package/dist/{Marketing-C9pSIdBU.js → Marketing-Cpe4s7NZ.js} +7 -6
- package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-nTeS9VVx.js} +15 -14
- package/dist/Member-DgGZ4Cdg.js +654 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js +1281 -0
- package/dist/MemberImportHistory-rdlbDVWU.js +187 -0
- package/dist/MemberList-BC4aRJTt.js +334 -0
- package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-BFfdTttp.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +5928 -5644
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js +40 -0
- package/dist/Mission-BWCNKTjU.js +363 -0
- package/dist/Overview--Q7vzhNK.js +1316 -0
- package/dist/{Overview-DOJj4XvO.js → Overview-i02Wnyjn.js} +23 -20
- package/dist/Point-CiWxqny5.js +297 -0
- package/dist/Promotion-B0G9qfBm.js +426 -0
- package/dist/{Queue-55G2gtP5.js → Queue-YfwgYmzH.js} +16 -13
- package/dist/{Record-DNPI02c6.js → Record-CCuwrPKW.js} +9 -9
- package/dist/Review-ymsfdh7Q.js +45 -0
- package/dist/ReviewFacebookCallback-DyDExWvP.js +238 -0
- package/dist/ReviewGoogleCallback-DNyg3n2S.js +213 -0
- package/dist/{Reward-CnP8R2pS.js → Reward-BKIb0ezH.js} +28 -28
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +26 -23
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +198 -186
- package/dist/{Segment-CxiQnnyj.js → Segment-D5_pp7fh.js} +278 -276
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js} +45 -42
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
- package/dist/Setting-CD78gIMU.js +574 -0
- package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
- package/dist/Settings-DI_tryQV.js +230 -0
- package/dist/Store-BV2JTRNZ.js +2615 -0
- package/dist/{StoreRewards-DILeipMG.js → StoreRewards-Bk55YXyO.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +1331 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
- package/dist/{Tier-BAZ1xuKL.js → Tier-CO2K30Ew.js} +2576 -757
- package/dist/{Title-CcNAt47f.js → Title-qProQh3T.js} +41 -37
- package/dist/Transaction-qL5L-fE_.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js} +26 -26
- package/dist/Voucher-VFD1LY9Y.js +837 -0
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +118 -124
- package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
- package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
- package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
- package/dist/{app-Z-UKRG5V.js → app-BEYzXWZO.js} +50954 -42517
- package/dist/app.js +1 -1
- package/dist/base.export-S_82Elmg.js +75 -0
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-C7EF6cKC.js → business-DH7djUl8.js} +5 -5
- package/dist/campaign-DlHDgoFX.js +100 -0
- package/dist/campaign-k_WHxsOR.js +400 -0
- package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
- package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-B-4JRzft.js} +67 -67
- package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/collection.fn-zQwWDzZT.js +26 -0
- package/dist/currency-CQVHXBFe.js +7 -0
- package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-YTXMbJTj.js} +11 -11
- package/dist/{effect-BcB8IlTI.js → effect-CQkVLHWi.js} +1 -1
- package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-BIoVbPGC.js} +209 -201
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-BSgrCJRv.js → helper-BCkTvF4m.js} +1 -1
- package/dist/{index-CoHWpylO.js → index-B-bQnb0_.js} +2115 -2557
- package/dist/index-BAJOC43K.js +14550 -0
- package/dist/{index-HXiYGO4_.js → index-BFIHEBnX.js} +6343 -7693
- package/dist/{index-VlFWaBrg.js → index-BJIQe3QJ.js} +1 -1
- package/dist/{index-BpI-BI4H.js → index-BJkRTH5T.js} +4 -4
- package/dist/index-BOJogkKQ.js +172 -0
- package/dist/{index-BoYEqLif.js → index-BRPajAkE.js} +1517 -263
- package/dist/{index-CsoBDon4.js → index-BTkxgos0.js} +1590 -1523
- package/dist/index-BUP4aHq8.js +32438 -0
- package/dist/index-BYvnqARr.js +902 -0
- package/dist/{index-hlyg-wxV.js → index-Bonq819P.js} +1 -1
- package/dist/{index-CIBPhxlC.js → index-C6mOI2Pp.js} +105 -123
- package/dist/{index-Bf6jNZit.js → index-CDIe15AY.js} +24 -9
- package/dist/index-CTrcdIkt.js +137 -0
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/index-CpnchVe1.js +74 -0
- package/dist/index-D5AR7A5e.js +151 -0
- package/dist/index-D7-Q86HI.js +54 -0
- package/dist/index-DdOj8Hew.js +53 -0
- package/dist/{index-iMPtFp54.js → index-Dvqguh2B.js} +10 -9
- package/dist/{index-Bm0QPucw.js → index-hAKRfE-4.js} +14 -14
- package/dist/index-o2Ga_qaX.js +39 -0
- package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-D0fhMMPG.js} +128 -128
- package/dist/{loading-CSXr0Yqz.js → loading-C686AMVG.js} +1 -1
- package/dist/{lodash-Bh7XKI-R.js → lodash-CANlWUWW.js} +1 -1
- package/dist/member-import-UzJ6ByIS.js +188 -0
- package/dist/membership-DCVzFaFy.js +274 -0
- package/dist/{money-BZIST_m9.js → money-DuazwoX7.js} +1 -1
- package/dist/{number-DXLR2w95.js → number-B2HFiV0g.js} +1 -1
- package/dist/objectid-Bq-oVMdP.js +145 -0
- package/dist/onboarding-BxvNxz-9.js +131 -0
- package/dist/onboardingSetup-CcvKmyx8.js +17 -0
- package/dist/{plugins-4FlbwoES.js → plugins-C39O5j42.js} +13 -12
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-DUbl79bZ.js → reward-HYt-2nxt.js} +1 -1
- package/dist/{rule-BQUoZ4l_.js → rule-3xNIYM7z.js} +337 -275
- package/dist/style.css +1 -1
- package/dist/{template-BoiSG7G7.js → template-D37Z_b0m.js} +6 -6
- package/dist/timezone-JwnQgpaU.js +20 -0
- package/dist/transaction.fn-C5vswLI_.js +71 -0
- package/dist/{trigger-D5g5m6tT.js → trigger-Bc6s2cvq.js} +17 -17
- package/dist/useMarketingMaterialActions-DMGyAXcy.js +96 -0
- package/dist/{usePagination-DHePBBoR.js → usePagination-DLOOwiiY.js} +1 -1
- package/dist/{user-C_ToSo-g.js → user-CTIGugVF.js} +1 -1
- package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-Dpic36zz.js} +287 -287
- package/dist/{xlsx-h4G1C-xj.js → xlsx-CT9_1SFr.js} +786 -786
- package/dist/{zod-CgigfJar.js → zod-CGVrMcDl.js} +1 -1
- package/package.json +10 -6
- package/dist/Broadcast-C9akM-TB.js +0 -266
- package/dist/Card-DRkIYs0M.js +0 -910
- package/dist/Credit-V5YA_hGx.js +0 -260
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
- package/dist/Experience-WTWy5yY6.js +0 -259
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-BwOfTCW5.js +0 -330
- package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
- package/dist/MainLayout-Du5kZOtA.js +0 -41
- package/dist/Member-DUV_vbPI.js +0 -280
- package/dist/MemberList-Ye4nOk-i.js +0 -1601
- package/dist/Mission-BBmCGpt8.js +0 -334
- package/dist/Point-Bzg6hi6o.js +0 -262
- package/dist/Promotion-BMXIp_ef.js +0 -397
- package/dist/Review-CYNPPxYU.js +0 -1141
- package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
- package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
- package/dist/Setting-jHAjccod.js +0 -2047
- package/dist/Store-Cu-hKmVa.js +0 -1996
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
- package/dist/Transaction-D7DO3dKQ.js +0 -39
- package/dist/Voucher-Cq-n1CaC.js +0 -421
- package/dist/campaign--MjoY1Mn.js +0 -219
- package/dist/campaign-DHBuP4UA.js +0 -277
- package/dist/export-CjB7qxZ9.js +0 -97
- package/dist/index-BIAjmMga.js +0 -85
- package/dist/index-Bv4MBLQ5.js +0 -52
- package/dist/index-hbyCVNa7.js +0 -30289
- package/dist/membership-CfredTm3.js +0 -255
- package/dist/objectid-Dg4ZodlT.js +0 -145
- package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
|
@@ -1,63 +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 { R as
|
|
9
|
-
import { i as
|
|
10
|
-
import "./index-
|
|
11
|
-
import { F as
|
|
12
|
-
import "./index-
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { u as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
20
|
-
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 K, 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-C39O5j42.js";
|
|
4
|
+
import { u as Ae } from "./loading-C686AMVG.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-DLOOwiiY.js";
|
|
7
|
+
import { u as me } from "./vue-i18n-Dpic36zz.js";
|
|
8
|
+
import { R as pe } from "./index-BRPajAkE.js";
|
|
9
|
+
import { i as Re, j as U, D as Ne, k as Be } from "./index-B-bQnb0_.js";
|
|
10
|
+
import "./index-BTkxgos0.js";
|
|
11
|
+
import { F as fe } from "./index-BFIHEBnX.js";
|
|
12
|
+
import { a as ye } from "./index-BYvnqARr.js";
|
|
13
|
+
import "./index-Dvqguh2B.js";
|
|
14
|
+
import "./index-o2Ga_qaX.js";
|
|
15
|
+
import "./index-BOJogkKQ.js";
|
|
16
|
+
import { u as re, w as Fe } from "./xlsx-CT9_1SFr.js";
|
|
17
|
+
import { e as Ue, M as Ve } from "./email-addresses-BIoVbPGC.js";
|
|
18
|
+
import { Z as Le } from "./zod-CGVrMcDl.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-Bcsi94dw.js";
|
|
22
|
+
import { a as je } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js";
|
|
23
|
+
import { u as qe, v as Ge, w as He } from "./index.esm2017-D0fhMMPG.js";
|
|
24
|
+
import { F as Je } from "./FileSaver.min-C-hmBaHm.js";
|
|
21
25
|
import { h as se } from "./moment-D7p2TMB-.js";
|
|
22
|
-
import { s as
|
|
23
|
-
import { o as
|
|
24
|
-
import { J as
|
|
25
|
-
import { u as
|
|
26
|
-
import { f as
|
|
27
|
-
import { t as
|
|
28
|
-
import "./index-
|
|
29
|
-
import { useRouter as
|
|
30
|
-
import { m as
|
|
31
|
-
import { R as
|
|
32
|
-
const
|
|
33
|
-
_id:
|
|
34
|
-
business:
|
|
35
|
-
file:
|
|
26
|
+
import { s as Y, u as Ke } from "./membership-DCVzFaFy.js";
|
|
27
|
+
import { o as Qe } from "./objectId-dwaoBfJX.js";
|
|
28
|
+
import { J as We } from "./JsonViewer-v8_C7l5N.js";
|
|
29
|
+
import { u as Ce } from "./business-DH7djUl8.js";
|
|
30
|
+
import { f as Ze } from "./number-B2HFiV0g.js";
|
|
31
|
+
import { t as Xe } from "./money-DuazwoX7.js";
|
|
32
|
+
import "./index-Bonq819P.js";
|
|
33
|
+
import { useRouter as et } from "vue-router";
|
|
34
|
+
import { m as ge } from "./index-CTrcdIkt.js";
|
|
35
|
+
import { R as ve } from "./app-BEYzXWZO.js";
|
|
36
|
+
const tt = Re.extend({
|
|
37
|
+
_id: fe.optional(),
|
|
38
|
+
business: fe.optional(),
|
|
39
|
+
file: ze.any().nullish()
|
|
36
40
|
});
|
|
37
|
-
var
|
|
38
|
-
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" };
|
|
42
|
+
const nt = { class: "flex flex-col space-y-16" }, at = {
|
|
39
43
|
key: 0,
|
|
40
|
-
class: /* @__PURE__ */
|
|
44
|
+
class: /* @__PURE__ */ ie([
|
|
41
45
|
"p-16 pl-24 space-x-8",
|
|
42
46
|
"bg-fm-color-primary-oats rounded-lg",
|
|
43
47
|
"flex items-center",
|
|
44
48
|
"justify-between"
|
|
45
49
|
])
|
|
46
|
-
},
|
|
50
|
+
}, st = { class: "flex justify-end" }, lt = {
|
|
47
51
|
key: 1,
|
|
48
|
-
class: /* @__PURE__ */
|
|
52
|
+
class: /* @__PURE__ */ ie([
|
|
49
53
|
"flex items-center",
|
|
50
54
|
"border border-fm-color-neutral-gray-300",
|
|
51
55
|
"p-16 space-x-16 rounded-md"
|
|
52
56
|
])
|
|
53
|
-
},
|
|
57
|
+
}, it = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, ct = /* @__PURE__ */ le({
|
|
54
58
|
__name: "ImportSegment",
|
|
55
59
|
props: {
|
|
56
60
|
importFile: {}
|
|
57
61
|
},
|
|
58
62
|
emits: ["update:file"],
|
|
59
63
|
setup(t, { emit: f }) {
|
|
60
|
-
const c = t, M = f, { t:
|
|
64
|
+
const c = t, M = f, { t: S } = me(), _ = X(null), u = X(null), T = ["Id"], D = [
|
|
61
65
|
{
|
|
62
66
|
label: "CSV",
|
|
63
67
|
icon: "csv",
|
|
@@ -72,10 +76,10 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
72
76
|
async function a() {
|
|
73
77
|
if (c.importFile)
|
|
74
78
|
try {
|
|
75
|
-
const y =
|
|
79
|
+
const y = qe(void 0, ot.importFilesBucketUrl), p = Ge(y, c.importFile), g = await He(p);
|
|
76
80
|
window.open(g, "_blank");
|
|
77
81
|
} catch (y) {
|
|
78
|
-
console.log(y),
|
|
82
|
+
console.log(y), Ee.error("Failed to download uploaded file");
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
async function m(y) {
|
|
@@ -84,11 +88,11 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
84
88
|
const p = new Blob([T.join(",")], {
|
|
85
89
|
type: "text/csv;charset=utf-8;"
|
|
86
90
|
});
|
|
87
|
-
|
|
91
|
+
Je.saveAs(p, "ImportSegmentTemplate.csv");
|
|
88
92
|
break;
|
|
89
93
|
case "xlsx":
|
|
90
|
-
const g =
|
|
91
|
-
|
|
94
|
+
const g = re.aoa_to_sheet([T]), x = re.book_new();
|
|
95
|
+
re.book_append_sheet(x, g, "Sheet1"), Fe(x, "ImportSegmentTemplate.xlsx");
|
|
92
96
|
break;
|
|
93
97
|
}
|
|
94
98
|
}
|
|
@@ -101,20 +105,20 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
101
105
|
i(p);
|
|
102
106
|
}
|
|
103
107
|
return (y, p) => {
|
|
104
|
-
const g =
|
|
105
|
-
return r(), k("div",
|
|
108
|
+
const g = h("FmButton"), x = h("FmMenuItem"), q = h("FmMenu"), G = h("FmDropField");
|
|
109
|
+
return r(), k("div", nt, [
|
|
106
110
|
p[2] || (p[2] = s("div", { class: "fm-typo-en-title-sm-800" }, "Upload File", -1)),
|
|
107
|
-
t.importFile ? (r(), k("div",
|
|
111
|
+
t.importFile ? (r(), k("div", at, [
|
|
108
112
|
d(g, {
|
|
109
|
-
label: e(
|
|
110
|
-
variant: e(
|
|
113
|
+
label: e(S)("View uploaded file"),
|
|
114
|
+
variant: e(ce).Plain,
|
|
111
115
|
icon: "file_present",
|
|
112
116
|
onClick: a
|
|
113
117
|
}, null, 8, ["label", "variant"])
|
|
114
|
-
])) :
|
|
118
|
+
])) : K("", !0),
|
|
115
119
|
s("div", null, [
|
|
116
|
-
s("div",
|
|
117
|
-
d(
|
|
120
|
+
s("div", st, [
|
|
121
|
+
d(q, { class: "" }, {
|
|
118
122
|
"menu-button": $(() => [
|
|
119
123
|
d(g, {
|
|
120
124
|
variant: "tertiary",
|
|
@@ -123,31 +127,31 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
123
127
|
})
|
|
124
128
|
]),
|
|
125
129
|
default: $(() => [
|
|
126
|
-
(r(), k(
|
|
130
|
+
(r(), k(ee, null, ue(D, (I) => d(x, {
|
|
127
131
|
key: I.value,
|
|
128
132
|
icon: I.icon,
|
|
129
133
|
label: I.label,
|
|
130
|
-
onClick: (
|
|
134
|
+
onClick: (H) => m(I.value),
|
|
131
135
|
selectable: ""
|
|
132
136
|
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
133
137
|
]),
|
|
134
138
|
_: 1
|
|
135
139
|
})
|
|
136
140
|
]),
|
|
137
|
-
_.value ? (r(), k("div",
|
|
141
|
+
_.value ? (r(), k("div", lt, [
|
|
138
142
|
d(g, {
|
|
139
|
-
variant: e(
|
|
143
|
+
variant: e(ce).Tertiary,
|
|
140
144
|
"prepend-icon": "attach_file"
|
|
141
145
|
}, null, 8, ["variant"]),
|
|
142
|
-
s("p",
|
|
146
|
+
s("p", it, E(_.value.name), 1),
|
|
143
147
|
s("label", {
|
|
144
148
|
ref_key: "fileLabelRef",
|
|
145
149
|
ref: u,
|
|
146
150
|
htmlFor: "file"
|
|
147
151
|
}, [
|
|
148
152
|
d(g, {
|
|
149
|
-
variant: e(
|
|
150
|
-
label: e(
|
|
153
|
+
variant: e(ce).Plain,
|
|
154
|
+
label: e(S)("Replace File"),
|
|
151
155
|
onClick: p[1] || (p[1] = () => {
|
|
152
156
|
var I;
|
|
153
157
|
return (I = u.value) == null ? void 0 : I.click();
|
|
@@ -162,7 +166,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
162
166
|
onChange: A
|
|
163
167
|
}, null, 32)
|
|
164
168
|
], 512)
|
|
165
|
-
])) : (r(), V(
|
|
169
|
+
])) : (r(), V(G, {
|
|
166
170
|
key: 0,
|
|
167
171
|
onFileUpload: p[0] || (p[0] = (I) => i(I)),
|
|
168
172
|
accept: ".csv, .xlsx",
|
|
@@ -172,18 +176,18 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
172
176
|
]);
|
|
173
177
|
};
|
|
174
178
|
}
|
|
175
|
-
}),
|
|
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({
|
|
176
180
|
__name: "ReviewSegment",
|
|
177
181
|
props: {
|
|
178
182
|
title: {},
|
|
179
183
|
segment: {}
|
|
180
184
|
},
|
|
181
185
|
setup(t) {
|
|
182
|
-
const f = t, c =
|
|
186
|
+
const f = t, c = z(
|
|
183
187
|
() => f.segment.memberCount ?? f.segment.members.length
|
|
184
|
-
), M =
|
|
188
|
+
), M = z(
|
|
185
189
|
() => f.segment.lastUpdated ? se(f.segment.lastUpdated).format("DD MMM YYYY") : "Not refreshed yet"
|
|
186
|
-
),
|
|
190
|
+
), S = [
|
|
187
191
|
{
|
|
188
192
|
header: "Name",
|
|
189
193
|
accessorFn: (i) => i.name
|
|
@@ -194,7 +198,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
194
198
|
},
|
|
195
199
|
{
|
|
196
200
|
header: "Customer Since",
|
|
197
|
-
accessorFn: (i) => se(
|
|
201
|
+
accessorFn: (i) => se(Qe(i._id.toString())).format("DD MMM YYYY")
|
|
198
202
|
},
|
|
199
203
|
{
|
|
200
204
|
header: "Phone",
|
|
@@ -210,7 +214,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
210
214
|
}
|
|
211
215
|
];
|
|
212
216
|
async function _(i) {
|
|
213
|
-
return f.segment._id ? (console.log(i), await
|
|
217
|
+
return f.segment._id ? (console.log(i), await Y.paginateSegmentUsers(
|
|
214
218
|
f.segment._id,
|
|
215
219
|
i
|
|
216
220
|
)) : {
|
|
@@ -224,32 +228,32 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
224
228
|
}
|
|
225
229
|
};
|
|
226
230
|
}
|
|
227
|
-
const { tableMeta: u, rowData: T, onSort:
|
|
228
|
-
return
|
|
231
|
+
const { tableMeta: u, rowData: T, onSort: D, debouncedFetchData: a, onSearch: m } = be(_);
|
|
232
|
+
return Se(async () => {
|
|
229
233
|
await a();
|
|
230
|
-
}), (i, A) => (r(), k("div",
|
|
231
|
-
s("div",
|
|
232
|
-
s("div",
|
|
233
|
-
s("div",
|
|
234
|
-
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, [
|
|
235
239
|
A[1] || (A[1] = s("div", null, "contacts in your segment", -1)),
|
|
236
|
-
s("div", null, "as of " +
|
|
240
|
+
s("div", null, "as of " + E(e(M)), 1)
|
|
237
241
|
])
|
|
238
242
|
]),
|
|
239
|
-
d(
|
|
243
|
+
d(we, {
|
|
240
244
|
loading: e(u).isLoading,
|
|
241
245
|
"row-data": e(T),
|
|
242
246
|
"row-count": e(u).totalRows,
|
|
243
|
-
"column-defs":
|
|
247
|
+
"column-defs": S,
|
|
244
248
|
"page-size": e(u).pageSize,
|
|
245
249
|
"page-count": e(u).pageCount,
|
|
246
250
|
"page-index": e(u).pageIndex,
|
|
247
|
-
onSortChange: e(
|
|
251
|
+
onSortChange: e(D),
|
|
248
252
|
onPageChange: A[0] || (A[0] = (y) => e(a)({ pageSize: y.pageSize, pageIndex: y.pageIndex }))
|
|
249
253
|
}, null, 8, ["loading", "row-data", "row-count", "page-size", "page-count", "page-index", "onSortChange"])
|
|
250
254
|
]));
|
|
251
255
|
}
|
|
252
|
-
}),
|
|
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({
|
|
253
257
|
__name: "SegmentTypeOption",
|
|
254
258
|
props: {
|
|
255
259
|
modelValue: {},
|
|
@@ -257,7 +261,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
257
261
|
},
|
|
258
262
|
emits: ["update:model-value"],
|
|
259
263
|
setup(t, { emit: f }) {
|
|
260
|
-
const c = t, M = f,
|
|
264
|
+
const c = t, M = f, S = [
|
|
261
265
|
{
|
|
262
266
|
label: "Dynamic",
|
|
263
267
|
sublabel: "Segment statistics are based on rules configured and will be recalculated automatically when rule changes.",
|
|
@@ -273,13 +277,13 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
273
277
|
u !== c.modelValue && M("update:model-value", u);
|
|
274
278
|
}
|
|
275
279
|
return (u, T) => {
|
|
276
|
-
const
|
|
277
|
-
return r(), k("div",
|
|
278
|
-
s("div",
|
|
279
|
-
(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, {
|
|
280
284
|
variant: "outlined",
|
|
281
|
-
class:
|
|
282
|
-
"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,
|
|
283
287
|
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": t.modelValue === m.value,
|
|
284
288
|
"hover:bg-fm-color-opacity-sm": t.modelValue !== m.value
|
|
285
289
|
}]),
|
|
@@ -287,8 +291,8 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
287
291
|
key: m.value
|
|
288
292
|
}, {
|
|
289
293
|
default: $(() => [
|
|
290
|
-
s("div",
|
|
291
|
-
s("div",
|
|
294
|
+
s("div", gt, E(m.label), 1),
|
|
295
|
+
s("div", vt, E(m.sublabel), 1)
|
|
292
296
|
]),
|
|
293
297
|
_: 2
|
|
294
298
|
}, 1032, ["class", "onClick"])), 64))
|
|
@@ -298,47 +302,47 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
298
302
|
class: "!mt-4",
|
|
299
303
|
text: t.errorText,
|
|
300
304
|
state: "error"
|
|
301
|
-
}, null, 8, ["text"])) :
|
|
305
|
+
}, null, 8, ["text"])) : K("", !0)
|
|
302
306
|
]);
|
|
303
307
|
};
|
|
304
308
|
}
|
|
305
|
-
}),
|
|
309
|
+
}), xt = { class: "flex items-center gap-x-8" }, ht = {
|
|
306
310
|
key: 0,
|
|
307
311
|
class: "space-y-16 pr-12"
|
|
308
|
-
},
|
|
312
|
+
}, St = {
|
|
309
313
|
key: 0,
|
|
310
314
|
class: "flex flex-col gap-12"
|
|
311
|
-
},
|
|
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 = {
|
|
312
316
|
key: 2,
|
|
313
317
|
class: "flex flex-col space-y-16"
|
|
314
|
-
},
|
|
318
|
+
}, Mt = {
|
|
315
319
|
key: 3,
|
|
316
320
|
class: "flex flex-col space-y-16"
|
|
317
|
-
},
|
|
321
|
+
}, Tt = {
|
|
318
322
|
key: 4,
|
|
319
323
|
class: "flex flex-col space-y-16"
|
|
320
|
-
},
|
|
324
|
+
}, Dt = {
|
|
321
325
|
key: 5,
|
|
322
326
|
class: "flex flex-col space-y-16"
|
|
323
|
-
},
|
|
327
|
+
}, Et = { class: "flex items-center gap-8" }, $t = /* @__PURE__ */ le({
|
|
324
328
|
__name: "SegmentSheet",
|
|
325
329
|
emits: ["update:model-value"],
|
|
326
330
|
setup(t, { expose: f, emit: c }) {
|
|
327
|
-
const M =
|
|
331
|
+
const M = Ye(), { t: S } = me(), _ = X(!1), u = X(!1), T = {
|
|
328
332
|
name: "",
|
|
329
333
|
isActive: !0,
|
|
330
334
|
type: U.enum.DYNAMIC,
|
|
331
|
-
rule:
|
|
335
|
+
rule: pe.scaffoldGroup(),
|
|
332
336
|
members: []
|
|
333
|
-
},
|
|
337
|
+
}, D = tt, a = X(T), m = z(() => !!a.value.defaultKey), i = z(
|
|
334
338
|
() => a.value.defaultKey ? `connect.loyalty.segment.default_segments.${a.value.defaultKey.toLowerCase()}` : void 0
|
|
335
|
-
), A =
|
|
336
|
-
() => i.value ?
|
|
337
|
-
), y =
|
|
339
|
+
), A = z(
|
|
340
|
+
() => i.value ? S(`${i.value}.name`) : a.value.name
|
|
341
|
+
), y = z(() => {
|
|
338
342
|
const v = a.value.defaultKey;
|
|
339
|
-
return v ?
|
|
340
|
-
}), p =
|
|
341
|
-
const v =
|
|
343
|
+
return v ? S(Ne[v]) : a.value.description ?? "";
|
|
344
|
+
}), p = z(() => {
|
|
345
|
+
const v = D.safeParse(a.value);
|
|
342
346
|
return v.success ? [] : v.error.errors;
|
|
343
347
|
});
|
|
344
348
|
function g(v) {
|
|
@@ -351,42 +355,42 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
351
355
|
function x() {
|
|
352
356
|
_.value = !1;
|
|
353
357
|
}
|
|
354
|
-
async function
|
|
355
|
-
|
|
358
|
+
async function q() {
|
|
359
|
+
D.safeParse(a.value).success && (u.value = !0);
|
|
356
360
|
}
|
|
357
|
-
function
|
|
361
|
+
function G(v) {
|
|
358
362
|
v === U.enum.STATIC ? x() : u.value = !1;
|
|
359
363
|
}
|
|
360
364
|
async function I() {
|
|
361
|
-
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, Q("update:model-value", a.value);
|
|
362
366
|
}
|
|
363
|
-
async function
|
|
367
|
+
async function H(v) {
|
|
364
368
|
a.value.type = v;
|
|
365
369
|
}
|
|
366
|
-
|
|
370
|
+
Se(async () => {
|
|
367
371
|
});
|
|
368
|
-
const
|
|
372
|
+
const Q = c;
|
|
369
373
|
return f({
|
|
370
374
|
showSheet: g,
|
|
371
375
|
hideSheet: x
|
|
372
376
|
}), (v, l) => {
|
|
373
|
-
const P =
|
|
377
|
+
const P = h("FmButton"), te = h("FmChip"), oe = h("FmCard"), ne = h("FmSwitch"), o = h("FmSideSheet");
|
|
374
378
|
return r(), V(o, {
|
|
375
379
|
modelValue: e(_),
|
|
376
|
-
"onUpdate:modelValue": l[9] || (l[9] = (n) =>
|
|
377
|
-
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",
|
|
378
382
|
"dismiss-away": "",
|
|
379
383
|
"close-button": !0,
|
|
380
384
|
"max-width": 1100
|
|
381
|
-
},
|
|
385
|
+
}, Me({
|
|
382
386
|
"side-sheet-footer": $(() => [
|
|
383
|
-
s("div",
|
|
387
|
+
s("div", Et, [
|
|
384
388
|
e(m) ? (r(), V(P, {
|
|
385
389
|
key: 0,
|
|
386
|
-
label: e(
|
|
390
|
+
label: e(S)("connect.loyalty.segment.default_segments.close"),
|
|
387
391
|
onClick: l[6] || (l[6] = (n) => x()),
|
|
388
392
|
variant: "tertiary"
|
|
389
|
-
}, 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 }, [
|
|
390
394
|
d(P, {
|
|
391
395
|
label: "Save Segment",
|
|
392
396
|
onClick: I,
|
|
@@ -395,14 +399,14 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
395
399
|
}, null, 8, ["loading", "disabled"]),
|
|
396
400
|
d(P, {
|
|
397
401
|
label: "Cancel",
|
|
398
|
-
onClick: l[7] || (l[7] = (n) =>
|
|
402
|
+
onClick: l[7] || (l[7] = (n) => G(e(a).type)),
|
|
399
403
|
variant: "tertiary"
|
|
400
404
|
})
|
|
401
|
-
], 64)) : (r(), k(
|
|
405
|
+
], 64)) : (r(), k(ee, { key: 2 }, [
|
|
402
406
|
d(P, {
|
|
403
407
|
label: "Review Segment",
|
|
404
408
|
disabled: e(p).length > 0 || e(M).isLoading,
|
|
405
|
-
onClick:
|
|
409
|
+
onClick: q
|
|
406
410
|
}, null, 8, ["disabled"]),
|
|
407
411
|
d(P, {
|
|
408
412
|
label: "Cancel",
|
|
@@ -415,82 +419,82 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
415
419
|
default: $(() => {
|
|
416
420
|
var n, F;
|
|
417
421
|
return [
|
|
418
|
-
d(
|
|
419
|
-
e(u) ? (r(), V(
|
|
422
|
+
d(We, { json: e(a) }, null, 8, ["json"]),
|
|
423
|
+
e(u) ? (r(), V(_e, {
|
|
420
424
|
key: 1,
|
|
421
425
|
title: e(a).name,
|
|
422
426
|
segment: e(a)
|
|
423
|
-
}, null, 8, ["title", "segment"])) : (r(), k("div",
|
|
424
|
-
e(m) ? (r(), k("div",
|
|
425
|
-
s("div",
|
|
426
|
-
s("div",
|
|
427
|
-
d(
|
|
428
|
-
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"),
|
|
429
433
|
compact: "",
|
|
430
434
|
class: "text-fm-color-typo-info bg-fm-color-system-info-100"
|
|
431
435
|
}, null, 8, ["label"])
|
|
432
436
|
]),
|
|
433
|
-
d(
|
|
437
|
+
d(oe, {
|
|
434
438
|
variant: "outlined",
|
|
435
439
|
class: "p-16"
|
|
436
440
|
}, {
|
|
437
441
|
default: $(() => [
|
|
438
|
-
s("div",
|
|
439
|
-
s("div",
|
|
440
|
-
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)
|
|
441
445
|
])
|
|
442
446
|
]),
|
|
443
447
|
_: 1
|
|
444
448
|
})
|
|
445
|
-
])) : (r(), V(
|
|
449
|
+
])) : (r(), V(Oe, {
|
|
446
450
|
key: 1,
|
|
447
451
|
modelValue: e(a).name,
|
|
448
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
452
|
+
"onUpdate:modelValue": l[1] || (l[1] = (b) => e(a).name = b),
|
|
449
453
|
label: "Segment title",
|
|
450
|
-
schema: e(
|
|
454
|
+
schema: e(Le).typeAtPath(e(D), "name")
|
|
451
455
|
}, null, 8, ["modelValue", "schema"])),
|
|
452
|
-
e(m) ?
|
|
456
|
+
e(m) ? K("", !0) : (r(), k("div", It, [
|
|
453
457
|
l[11] || (l[11] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Type", -1)),
|
|
454
|
-
d(
|
|
458
|
+
d(_t, {
|
|
455
459
|
"model-value": e(a).type,
|
|
456
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
457
|
-
|
|
460
|
+
"onUpdate:modelValue": l[2] || (l[2] = (b) => {
|
|
461
|
+
H(b);
|
|
458
462
|
})
|
|
459
463
|
}, null, 8, ["model-value"])
|
|
460
464
|
])),
|
|
461
|
-
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, [
|
|
462
466
|
l[12] || (l[12] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Filter", -1)),
|
|
463
|
-
d(
|
|
467
|
+
d(je, {
|
|
464
468
|
"trigger-type": "MEMBERSHIP_JOINED",
|
|
465
469
|
includeOnly: "user",
|
|
466
470
|
"model-value": (n = e(a)) == null ? void 0 : n.rule,
|
|
467
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
468
|
-
e(a).rule =
|
|
471
|
+
"onUpdate:modelValue": l[3] || (l[3] = (b) => {
|
|
472
|
+
e(a).rule = b;
|
|
469
473
|
})
|
|
470
474
|
}, null, 8, ["model-value"])
|
|
471
|
-
])) : e(m) ?
|
|
472
|
-
d(
|
|
475
|
+
])) : e(m) ? K("", !0) : (r(), k("div", Tt, [
|
|
476
|
+
d(ct, {
|
|
473
477
|
importFile: e(a).importFile,
|
|
474
|
-
"onUpdate:file": l[4] || (l[4] = (
|
|
475
|
-
e(a).file =
|
|
478
|
+
"onUpdate:file": l[4] || (l[4] = (b) => {
|
|
479
|
+
e(a).file = b;
|
|
476
480
|
})
|
|
477
481
|
}, null, 8, ["importFile"])
|
|
478
482
|
])),
|
|
479
|
-
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, [
|
|
480
484
|
l[13] || (l[13] = s("div", { class: "fm-typo-en-title-sm-800" }, "Segment Status", -1)),
|
|
481
|
-
d(
|
|
485
|
+
d(ne, {
|
|
482
486
|
"model-value": e(a).isActive ?? !0,
|
|
483
|
-
"onUpdate:modelValue": l[5] || (l[5] = (
|
|
487
|
+
"onUpdate:modelValue": l[5] || (l[5] = (b) => e(a).isActive = b),
|
|
484
488
|
label: "Active",
|
|
485
489
|
sublabel: "When enabled, this will recalculate the segment statistics daily.",
|
|
486
490
|
"label-placement": "right"
|
|
487
491
|
}, null, 8, ["model-value"])
|
|
488
|
-
])) :
|
|
489
|
-
e(m) ? (r(), V(
|
|
492
|
+
])) : K("", !0),
|
|
493
|
+
e(m) ? (r(), V(_e, {
|
|
490
494
|
key: (F = e(a)._id) == null ? void 0 : F.toString(),
|
|
491
|
-
title: e(
|
|
495
|
+
title: e(S)("connect.loyalty.segment.default_segments.members"),
|
|
492
496
|
segment: e(a)
|
|
493
|
-
}, null, 8, ["title", "segment"])) :
|
|
497
|
+
}, null, 8, ["title", "segment"])) : K("", !0)
|
|
494
498
|
]))
|
|
495
499
|
];
|
|
496
500
|
}),
|
|
@@ -499,7 +503,7 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
499
503
|
e(u) && !e(m) ? {
|
|
500
504
|
name: "side-sheet-header",
|
|
501
505
|
fn: $(() => [
|
|
502
|
-
s("div",
|
|
506
|
+
s("div", xt, [
|
|
503
507
|
d(P, {
|
|
504
508
|
icon: "arrow_back",
|
|
505
509
|
variant: "tertiary",
|
|
@@ -513,79 +517,77 @@ const st = { class: "flex flex-col space-y-16" }, lt = {
|
|
|
513
517
|
]), 1032, ["modelValue", "header"]);
|
|
514
518
|
};
|
|
515
519
|
}
|
|
516
|
-
}),
|
|
517
|
-
function
|
|
520
|
+
}), xe = Ke(), At = Ce();
|
|
521
|
+
function de(t) {
|
|
518
522
|
const f = se(t);
|
|
519
523
|
return f.isValid() ? f.format("DD/MM/YYYY") : "";
|
|
520
524
|
}
|
|
521
|
-
const
|
|
525
|
+
const Pt = {
|
|
522
526
|
mapMemberExportRow: (t) => {
|
|
523
|
-
var a, m, i, A, y, p, g, x,
|
|
524
|
-
const f =
|
|
527
|
+
var a, m, i, A, y, p, g, x, q, G, I, H, Q, v, l, P, te, oe, ne, o, n, F, b, R, J, L;
|
|
528
|
+
const f = z(() => At.locations.map((C) => ({
|
|
525
529
|
label: C.name,
|
|
526
530
|
value: C._id
|
|
527
|
-
}))), c = (a =
|
|
531
|
+
}))), c = (a = Ue.parseOneAddress(
|
|
528
532
|
t == null ? void 0 : t.email
|
|
529
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(
|
|
530
534
|
(C, N) => {
|
|
531
|
-
var
|
|
532
|
-
const
|
|
533
|
-
(
|
|
534
|
-
)) == null ? void 0 :
|
|
535
|
-
return !
|
|
535
|
+
var j, W;
|
|
536
|
+
const O = (W = (j = xe.sortedTitles) == null ? void 0 : j.find(
|
|
537
|
+
(w) => w._id === N.collectible
|
|
538
|
+
)) == null ? void 0 : W.name;
|
|
539
|
+
return !O || N.balance <= 0 || C.push(O), C;
|
|
536
540
|
},
|
|
537
541
|
[]
|
|
538
|
-
),
|
|
542
|
+
), S = (xe.sortedTitles || []).reduce(
|
|
539
543
|
(C, N) => {
|
|
540
|
-
var
|
|
541
|
-
const
|
|
542
|
-
(
|
|
543
|
-
)) == null ? void 0 :
|
|
544
|
-
return C[N.name] =
|
|
544
|
+
var j, W, w, Z;
|
|
545
|
+
const O = (Z = (w = (W = (((j = t == null ? void 0 : t.collection) == null ? void 0 : j.TITLE) || []).find(
|
|
546
|
+
(ke) => ke.collectible === N._id
|
|
547
|
+
)) == null ? void 0 : W.expiryBalance) == null ? void 0 : w[0]) == null ? void 0 : Z.expiredAt;
|
|
548
|
+
return C[N.name] = O ? se(O).format("DD/MM/YYYY") : "", C;
|
|
545
549
|
},
|
|
546
550
|
{}
|
|
547
|
-
), _ = ((p = (y = (A = t.collection) == null ? void 0 : A.CREDIT) == null ? void 0 : y.at(0)) == null ? void 0 : p.balance) || 0, u = ((
|
|
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(
|
|
548
552
|
(C, N) => C + N.amount,
|
|
549
553
|
0
|
|
550
|
-
)) || 0, T =
|
|
554
|
+
)) || 0, T = Ze(_, 2);
|
|
551
555
|
return {
|
|
552
556
|
ID: t._id.toString(),
|
|
553
557
|
Name: ((I = t.name) == null ? void 0 : I.trim()) || "",
|
|
554
|
-
Phone: ((
|
|
558
|
+
Phone: ((H = t == null ? void 0 : t.phoneNumber) == null ? void 0 : H.trim()) || "",
|
|
555
559
|
Email: c || "",
|
|
556
560
|
Gender: t.gender || "",
|
|
557
561
|
CardNo: t.cardNo || "",
|
|
558
|
-
Birthday: t != null && t.birthday ?
|
|
562
|
+
Birthday: t != null && t.birthday ? de(t == null ? void 0 : t.birthday) : "",
|
|
559
563
|
Credit: parseFloat((Number(T) - Number(u)).toFixed(2)),
|
|
560
564
|
FreeCredit: Number(u.toFixed(2)),
|
|
561
565
|
TotalCredit: Number(T),
|
|
562
|
-
Exp: t != null && t.collection ? ((l = (v = (
|
|
563
|
-
Point: t != null && t.collection ? ((
|
|
564
|
-
Level: t != null && t.collection ? ((n = (o = (
|
|
565
|
-
Tier: t != null && t.collection ? ((R = (
|
|
566
|
+
Exp: t != null && t.collection ? ((l = (v = (Q = t.collection) == null ? void 0 : Q.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 ? ((R = (b = (F = t.collection) == null ? void 0 : F.TIER) == null ? void 0 : b.at(0)) == null ? void 0 : R.balance) ?? 0 : 0,
|
|
566
570
|
Titles: M.join(","),
|
|
567
|
-
...
|
|
571
|
+
...S,
|
|
568
572
|
TotalTransaction: t.stats.visitCount,
|
|
569
|
-
AvgSpent:
|
|
573
|
+
AvgSpent: Xe(Number(t.stats.avgBillSize || 0)).toFormat(
|
|
570
574
|
!1
|
|
571
575
|
),
|
|
572
576
|
TotalSpent: t.stats.avgBillSize * t.stats.visitCount,
|
|
573
|
-
LastVisit:
|
|
574
|
-
Feedback: ((
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
JoinedAt: ue(t.joinAt || void 0),
|
|
578
|
-
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: ((J = t.stats) == null ? void 0 : J.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) || "-",
|
|
579
581
|
VisitFrequency: `${Number(
|
|
580
582
|
Math.ceil(t.stats.avgVisitFrequency).toFixed(0)
|
|
581
583
|
)}`
|
|
582
584
|
};
|
|
583
585
|
}
|
|
584
|
-
},
|
|
586
|
+
}, Rt = { class: "flex items-center" }, Nt = { 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({
|
|
585
587
|
__name: "Segment",
|
|
586
588
|
setup(t) {
|
|
587
|
-
const { minor: f } =
|
|
588
|
-
function
|
|
589
|
+
const { minor: f } = Ae, { t: c } = me(), M = Ce(), { mapMemberExportRow: S } = Pt, _ = Pe(), u = et(), T = X(0);
|
|
590
|
+
function D(o) {
|
|
589
591
|
return !!o.defaultKey;
|
|
590
592
|
}
|
|
591
593
|
function a(o) {
|
|
@@ -605,9 +607,9 @@ const Nt = {
|
|
|
605
607
|
cell(o) {
|
|
606
608
|
return B("div", { class: "flex flex-wrap items-center gap-8" }, [
|
|
607
609
|
B("span", m(o.row.original)),
|
|
608
|
-
...
|
|
610
|
+
...D(o.row.original) ? [
|
|
609
611
|
B(ae.FmChip, {
|
|
610
|
-
class:
|
|
612
|
+
class: he,
|
|
611
613
|
label: c("connect.loyalty.segment.default_segments.system"),
|
|
612
614
|
compact: !0
|
|
613
615
|
})
|
|
@@ -661,7 +663,7 @@ const Nt = {
|
|
|
661
663
|
ae.FmMenuItem,
|
|
662
664
|
{
|
|
663
665
|
onClick: async (n) => {
|
|
664
|
-
n.stopPropagation(),
|
|
666
|
+
n.stopPropagation(), Q(o.row.original);
|
|
665
667
|
}
|
|
666
668
|
},
|
|
667
669
|
{
|
|
@@ -674,12 +676,12 @@ const Nt = {
|
|
|
674
676
|
)
|
|
675
677
|
}
|
|
676
678
|
),
|
|
677
|
-
...
|
|
679
|
+
...D(o.row.original) ? [] : [
|
|
678
680
|
B(
|
|
679
681
|
ae.FmMenuItem,
|
|
680
682
|
{
|
|
681
683
|
onClick: async (n) => {
|
|
682
|
-
n.stopPropagation(),
|
|
684
|
+
n.stopPropagation(), H(o.row.original);
|
|
683
685
|
}
|
|
684
686
|
},
|
|
685
687
|
{
|
|
@@ -699,15 +701,15 @@ const Nt = {
|
|
|
699
701
|
]);
|
|
700
702
|
}
|
|
701
703
|
}
|
|
702
|
-
], y =
|
|
703
|
-
|
|
704
|
-
),
|
|
704
|
+
], y = X(null), { tableMeta: p, rowData: g, debouncedFetchData: x } = be(
|
|
705
|
+
Y.readAll
|
|
706
|
+
), q = z(() => g.value.length === 0 ? !1 : Be.some(
|
|
705
707
|
(o) => !g.value.some((n) => n.defaultKey === o)
|
|
706
708
|
));
|
|
707
|
-
async function
|
|
709
|
+
async function G() {
|
|
708
710
|
var o;
|
|
709
711
|
try {
|
|
710
|
-
await
|
|
712
|
+
await Y.refreshSegments(), _.open({ type: "info", title: "Segment refresh queued" });
|
|
711
713
|
} catch (n) {
|
|
712
714
|
if (((n == null ? void 0 : n.status) ?? ((o = n == null ? void 0 : n.response) == null ? void 0 : o.status)) === 409) {
|
|
713
715
|
_.open({
|
|
@@ -725,7 +727,7 @@ const Nt = {
|
|
|
725
727
|
async function I() {
|
|
726
728
|
await f(
|
|
727
729
|
async () => {
|
|
728
|
-
await
|
|
730
|
+
await Y.startDefaultSegments(), await x({ pageSize: 10, pageIndex: 0 });
|
|
729
731
|
},
|
|
730
732
|
{
|
|
731
733
|
message: c(
|
|
@@ -737,10 +739,10 @@ const Nt = {
|
|
|
737
739
|
}
|
|
738
740
|
);
|
|
739
741
|
}
|
|
740
|
-
async function
|
|
741
|
-
await
|
|
742
|
+
async function H(o) {
|
|
743
|
+
await $e.remove(`Are you sure you want to remove ${o.name}?`) && await f(
|
|
742
744
|
async () => {
|
|
743
|
-
await
|
|
745
|
+
await Y.delete(o._id), await x({ pageSize: 10, pageIndex: 0 });
|
|
744
746
|
},
|
|
745
747
|
{
|
|
746
748
|
message: `Removing ${o.name}`,
|
|
@@ -748,41 +750,41 @@ const Nt = {
|
|
|
748
750
|
}
|
|
749
751
|
);
|
|
750
752
|
}
|
|
751
|
-
async function
|
|
753
|
+
async function Q(o) {
|
|
752
754
|
const n = {
|
|
753
755
|
sortBy: "_id",
|
|
754
756
|
descending: !1,
|
|
755
757
|
rowsPerPage: 1e3,
|
|
756
758
|
page: 1,
|
|
757
759
|
rowsNumber: 0
|
|
758
|
-
}, F = new
|
|
760
|
+
}, F = new Ve(), b = m(o), R = (await ge.read({
|
|
759
761
|
limit: 1,
|
|
760
762
|
skip: 0,
|
|
761
763
|
sortBy: n.sortBy,
|
|
762
764
|
descending: n.descending
|
|
763
|
-
})).meta.totalResources ?? 0,
|
|
765
|
+
})).meta.totalResources ?? 0, J = n.rowsPerPage;
|
|
764
766
|
await f(
|
|
765
767
|
async () => {
|
|
766
|
-
for (let L = 0; L < R; L +=
|
|
767
|
-
const
|
|
768
|
+
for (let L = 0; L < R; L += J) {
|
|
769
|
+
const C = {
|
|
768
770
|
...n,
|
|
769
|
-
limit:
|
|
771
|
+
limit: J,
|
|
770
772
|
skip: n.page - 1,
|
|
771
773
|
sortBy: n.sortBy,
|
|
772
774
|
descending: n.descending
|
|
773
|
-
},
|
|
775
|
+
}, N = await Y.paginateSegmentUsers(
|
|
774
776
|
o._id,
|
|
775
|
-
|
|
777
|
+
C
|
|
776
778
|
);
|
|
777
|
-
for (const
|
|
778
|
-
const
|
|
779
|
-
F.addRecord(
|
|
779
|
+
for (const O of N.resources) {
|
|
780
|
+
const j = S(O);
|
|
781
|
+
F.addRecord(j);
|
|
780
782
|
}
|
|
781
783
|
n.page++;
|
|
782
784
|
}
|
|
783
|
-
await
|
|
785
|
+
await Fe(
|
|
784
786
|
F.buildExcel(),
|
|
785
|
-
`[${
|
|
787
|
+
`[${b}]-members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
786
788
|
{
|
|
787
789
|
bookType: "xlsx",
|
|
788
790
|
bookSST: !1,
|
|
@@ -803,11 +805,11 @@ const Nt = {
|
|
|
803
805
|
if (o.type === U.enum.STATIC) {
|
|
804
806
|
const F = new FormData();
|
|
805
807
|
if (F.append("file", o.file), o._id) {
|
|
806
|
-
const { members:
|
|
807
|
-
F.append("segment", JSON.stringify(L)), await
|
|
808
|
+
const { members: b, _id: R, file: J, ...L } = o;
|
|
809
|
+
F.append("segment", JSON.stringify(L)), await Y.updateStatic(o._id, F);
|
|
808
810
|
} else {
|
|
809
|
-
const { file:
|
|
810
|
-
F.append("segment", JSON.stringify(R)), await
|
|
811
|
+
const { file: b, ...R } = o;
|
|
812
|
+
F.append("segment", JSON.stringify(R)), await Y.createStatic(F);
|
|
811
813
|
}
|
|
812
814
|
o.file && _.open({
|
|
813
815
|
type: "info",
|
|
@@ -815,16 +817,16 @@ const Nt = {
|
|
|
815
817
|
action: "View",
|
|
816
818
|
onAction: async () => {
|
|
817
819
|
await u.push({
|
|
818
|
-
name:
|
|
819
|
-
query: { type: [
|
|
820
|
+
name: ve["$connect-QUEUE"],
|
|
821
|
+
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
820
822
|
});
|
|
821
823
|
}
|
|
822
824
|
});
|
|
823
825
|
} else if (o._id) {
|
|
824
|
-
const { members: F, _id:
|
|
825
|
-
await
|
|
826
|
+
const { members: F, _id: b, ...R } = o;
|
|
827
|
+
await Y.update(o._id, R);
|
|
826
828
|
} else
|
|
827
|
-
await
|
|
829
|
+
await Y.create(o);
|
|
828
830
|
await x({ pageSize: 10, pageIndex: 0 }), (n = y.value) == null || n.hideSheet();
|
|
829
831
|
},
|
|
830
832
|
{
|
|
@@ -842,16 +844,16 @@ const Nt = {
|
|
|
842
844
|
value: "queue",
|
|
843
845
|
isPrimary: !1,
|
|
844
846
|
prependIcon: "work_history"
|
|
845
|
-
},
|
|
847
|
+
}, te = {
|
|
846
848
|
label: c("connect.loyalty.segment.default_segments.get_started.action"),
|
|
847
849
|
value: "start-default-segments",
|
|
848
850
|
isPrimary: !1,
|
|
849
851
|
prependIcon: "auto_awesome"
|
|
850
|
-
},
|
|
852
|
+
}, oe = z(() => {
|
|
851
853
|
if (!M.isPremium)
|
|
852
854
|
return [];
|
|
853
855
|
const o = [P];
|
|
854
|
-
return
|
|
856
|
+
return q.value && o.push(te), o.push(
|
|
855
857
|
{
|
|
856
858
|
label: c("connect.loyalty.segment.actions.refresh"),
|
|
857
859
|
value: "refresh",
|
|
@@ -865,18 +867,18 @@ const Nt = {
|
|
|
865
867
|
}
|
|
866
868
|
), o;
|
|
867
869
|
});
|
|
868
|
-
function
|
|
870
|
+
function ne(o) {
|
|
869
871
|
switch (o) {
|
|
870
872
|
case "add":
|
|
871
873
|
l();
|
|
872
874
|
break;
|
|
873
875
|
case "refresh":
|
|
874
|
-
|
|
876
|
+
G();
|
|
875
877
|
break;
|
|
876
878
|
case "queue":
|
|
877
879
|
u.push({
|
|
878
|
-
name:
|
|
879
|
-
query: { type: [
|
|
880
|
+
name: ve["$connect-QUEUE"],
|
|
881
|
+
query: { type: [ye.enum.SEGMENTATION_IMPORTED] }
|
|
880
882
|
});
|
|
881
883
|
break;
|
|
882
884
|
case "start-default-segments":
|
|
@@ -884,8 +886,8 @@ const Nt = {
|
|
|
884
886
|
break;
|
|
885
887
|
}
|
|
886
888
|
}
|
|
887
|
-
return
|
|
888
|
-
const { meta: o } = await
|
|
889
|
+
return Te(async () => {
|
|
890
|
+
const { meta: o } = await ge.read({
|
|
889
891
|
limit: 1,
|
|
890
892
|
skip: 0,
|
|
891
893
|
sortBy: "_id",
|
|
@@ -894,24 +896,24 @@ const Nt = {
|
|
|
894
896
|
});
|
|
895
897
|
T.value = o.totalResources ?? 0, await x({ pageSize: 10, pageIndex: 0 }), await M.readPremium(), await M.readLocations();
|
|
896
898
|
}), (o, n) => {
|
|
897
|
-
const F =
|
|
898
|
-
return r(), k(
|
|
899
|
-
d(
|
|
899
|
+
const F = h("FmPill"), b = h("FmPageHead"), R = h("FmChip"), J = h("FmIcon"), L = h("FmMenuItem"), C = h("FmMenu"), N = h("FmListItem"), O = h("FmList"), j = h("FmButton"), W = h("FmCard");
|
|
900
|
+
return r(), k(ee, null, [
|
|
901
|
+
d(b, {
|
|
900
902
|
title: "Segments",
|
|
901
|
-
actions: e(
|
|
902
|
-
"onClick:action": n[0] || (n[0] = (
|
|
903
|
+
actions: e(oe),
|
|
904
|
+
"onClick:action": n[0] || (n[0] = (w) => ne(w))
|
|
903
905
|
}, {
|
|
904
906
|
title: $(() => [
|
|
905
|
-
s("div",
|
|
906
|
-
s("span",
|
|
907
|
+
s("div", Rt, [
|
|
908
|
+
s("span", Nt, E(e(c)("connect.loyalty.segment.title")), 1),
|
|
907
909
|
d(F, { variant: "premium" })
|
|
908
910
|
])
|
|
909
911
|
]),
|
|
910
912
|
_: 1
|
|
911
913
|
}, 8, ["actions"]),
|
|
912
|
-
s("div",
|
|
913
|
-
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(
|
|
914
|
-
d(
|
|
914
|
+
s("div", Bt, [
|
|
915
|
+
e(g).length > 0 || e(p).searchValue || e(p).isLoading ? (r(), k(ee, { key: 0 }, [
|
|
916
|
+
d(we, {
|
|
915
917
|
loading: e(p).isLoading,
|
|
916
918
|
"row-data": e(g),
|
|
917
919
|
"row-count": e(p).totalRows,
|
|
@@ -920,49 +922,49 @@ const Nt = {
|
|
|
920
922
|
"page-count": e(p).pageCount,
|
|
921
923
|
"page-index": e(p).pageIndex,
|
|
922
924
|
"page-size": e(p).pageSize,
|
|
923
|
-
onRowClick: n[1] || (n[1] = (
|
|
924
|
-
l(
|
|
925
|
+
onRowClick: n[1] || (n[1] = (w) => {
|
|
926
|
+
l(w.original);
|
|
925
927
|
}),
|
|
926
928
|
onPageChange: e(x)
|
|
927
929
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onPageChange"]),
|
|
928
|
-
d(
|
|
930
|
+
d(O, { class: "w-full hidden xs:!block" }, {
|
|
929
931
|
default: $(() => [
|
|
930
|
-
(r(!0), k(
|
|
931
|
-
key:
|
|
932
|
+
(r(!0), k(ee, null, ue(e(g), (w) => (r(), V(N, {
|
|
933
|
+
key: w._id.toString(),
|
|
932
934
|
tag: "label",
|
|
933
|
-
onClick: (
|
|
935
|
+
onClick: (Z) => l(w)
|
|
934
936
|
}, {
|
|
935
937
|
default: $(() => [
|
|
936
938
|
s("div", null, [
|
|
937
|
-
s("div",
|
|
938
|
-
s("div",
|
|
939
|
-
s("span",
|
|
940
|
-
|
|
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(R, {
|
|
941
943
|
key: 0,
|
|
942
|
-
class:
|
|
944
|
+
class: ie(he),
|
|
943
945
|
label: e(c)("connect.loyalty.segment.default_segments.system"),
|
|
944
946
|
compact: ""
|
|
945
|
-
}, null, 8, ["label"])) :
|
|
947
|
+
}, null, 8, ["label"])) : K("", !0)
|
|
946
948
|
]),
|
|
947
|
-
s("div",
|
|
949
|
+
s("div", Yt, E(i(w.memberCount)) + "% of customers ", 1)
|
|
948
950
|
])
|
|
949
951
|
]),
|
|
950
952
|
append: $(() => [
|
|
951
|
-
d(
|
|
953
|
+
d(C, { "stop-click-propagation": !0 }, {
|
|
952
954
|
"menu-button": $(() => [
|
|
953
|
-
d(
|
|
955
|
+
d(J, { name: "more_vert" })
|
|
954
956
|
]),
|
|
955
957
|
default: $(() => [
|
|
956
958
|
d(L, {
|
|
957
959
|
class: "fm-typo-en-body-md-400",
|
|
958
960
|
label: "Export",
|
|
959
|
-
"onUpdate:modelValue": (
|
|
961
|
+
"onUpdate:modelValue": (Z) => Z && Q(w)
|
|
960
962
|
}, null, 8, ["onUpdate:modelValue"]),
|
|
961
|
-
|
|
963
|
+
D(w) ? K("", !0) : (r(), V(L, {
|
|
962
964
|
key: 0,
|
|
963
965
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400",
|
|
964
966
|
label: "Remove",
|
|
965
|
-
"onUpdate:modelValue": (
|
|
967
|
+
"onUpdate:modelValue": (Z) => Z && H(w)
|
|
966
968
|
}, null, 8, ["onUpdate:modelValue"]))
|
|
967
969
|
]),
|
|
968
970
|
_: 2
|
|
@@ -973,33 +975,33 @@ const Nt = {
|
|
|
973
975
|
]),
|
|
974
976
|
_: 1
|
|
975
977
|
})
|
|
976
|
-
], 64)) : (r(), V(
|
|
978
|
+
], 64)) : (r(), V(W, {
|
|
977
979
|
key: 1,
|
|
978
980
|
variant: "outlined",
|
|
979
981
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
980
982
|
}, {
|
|
981
983
|
default: $(() => [
|
|
982
984
|
n[3] || (n[3] = s("img", {
|
|
983
|
-
src:
|
|
985
|
+
src: De,
|
|
984
986
|
class: "aspect-square w-[150px]"
|
|
985
987
|
}, null, -1)),
|
|
986
|
-
s("div",
|
|
987
|
-
s("div",
|
|
988
|
-
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)(
|
|
989
991
|
"connect.loyalty.segment.default_segments.get_started.description"
|
|
990
992
|
)), 1)
|
|
991
993
|
]),
|
|
992
|
-
d(
|
|
994
|
+
d(j, {
|
|
993
995
|
variant: "primary",
|
|
994
996
|
label: e(c)("connect.loyalty.segment.default_segments.get_started.action"),
|
|
995
997
|
disabled: !e(M).isPremium,
|
|
996
998
|
icon: "auto_awesome",
|
|
997
|
-
onClick: n[2] || (n[2] = (
|
|
999
|
+
onClick: n[2] || (n[2] = (w) => I())
|
|
998
1000
|
}, null, 8, ["label", "disabled"])
|
|
999
1001
|
]),
|
|
1000
1002
|
_: 1
|
|
1001
1003
|
})),
|
|
1002
|
-
d(
|
|
1004
|
+
d($t, {
|
|
1003
1005
|
ref_key: "sheetRef",
|
|
1004
1006
|
ref: y,
|
|
1005
1007
|
"onUpdate:modelValue": v
|
|
@@ -1010,5 +1012,5 @@ const Nt = {
|
|
|
1010
1012
|
}
|
|
1011
1013
|
});
|
|
1012
1014
|
export {
|
|
1013
|
-
|
|
1015
|
+
Io as default
|
|
1014
1016
|
};
|