Created
October 12, 2021 07:50
-
-
Save chaluvadi-jayanth/7ee3088fe3da87531bf26952f3498f93 to your computer and use it in GitHub Desktop.
Home.vue -> In dashboard transaction count is zero.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<b-row> | |
<b-colxx xxs="12"> | |
<piaf-breadcrumb :heading="$t('menu.analytics')" /> | |
<page-info :text="$t('home.page-info')"></page-info> | |
<div class="separator mb-5"></div> | |
</b-colxx> | |
</b-row> | |
<b-row> | |
<b-colxx xl="6" lg="12"> | |
<icon-cards-home | |
:total-org="businessCount" | |
:no-of-customers="customerCount" | |
:no-of-cards="cardCount" | |
:no-of-txns="transactionCount" | |
></icon-cards-home> | |
<b-row> | |
<b-colxx md="12" class="mb-4"> | |
<pre-org-data-card></pre-org-data-card> | |
</b-colxx> | |
</b-row> | |
</b-colxx> | |
<b-colxx lg="12" xl="6" class="mb-4"> | |
<!-- <recent-orders></recent-orders> --> | |
<list-status :list-of-status="listStatusData"></list-status> | |
</b-colxx> | |
</b-row> | |
<b-row> | |
<b-colxx sm="12" md="6" class="mb-4"> | |
<volume-of-transactions></volume-of-transactions> | |
</b-colxx> | |
<b-colxx sm="12" md="6" class="mb-4"> | |
<no-of-transactions></no-of-transactions> | |
</b-colxx> | |
</b-row> | |
</div> | |
</template> | |
<script> | |
import { mapGetters, mapActions } from 'vuex'; | |
import IconCardsHome from '../../../containers/dashboards/IconCardsHome'; | |
import PreOrgDataCard from '../../../containers/dashboards/PreOrgDataCard'; | |
import ListStatus from '../../../containers/dashboards/ListStatus'; | |
import NoOfTransactionCard from '../../../containers/dashboards/NoOfTransactionCard'; | |
import VolumeOfTransaction from '../../../containers/dashboards/VolumeOfTransaction'; | |
export default { | |
components: { | |
'icon-cards-home': IconCardsHome, | |
'volume-of-transactions': VolumeOfTransaction, | |
'no-of-transactions': NoOfTransactionCard, | |
'pre-org-data-card': PreOrgDataCard, | |
'list-status': ListStatus | |
}, | |
data() { | |
return { | |
dashboardMertic: null, | |
listStatusData: [ | |
{ | |
title: 'Basic Information', | |
total: 18, | |
status: 12 | |
}, | |
{ | |
title: 'Portfolio', | |
total: 8, | |
status: 1 | |
}, | |
{ | |
title: 'Billing Details', | |
total: 6, | |
status: 2 | |
}, | |
{ | |
title: 'Interests', | |
total: 10, | |
status: 0 | |
}, | |
{ | |
title: 'Legal Documents', | |
total: 2, | |
status: 1 | |
} | |
] | |
}; | |
}, | |
computed: { | |
...mapGetters({ | |
locStorageActiveOrg: 'organization/locStorageActiveOrg' | |
}), | |
cardCount() { | |
return this.dashboardMertic?.cardCount || 0; | |
}, | |
customerCount() { | |
return this.dashboardMertic?.cardHolderCount || 0; | |
}, | |
businessCount() { | |
return this.dashboardMertic?.childOrgCount + 1 || 0; | |
}, | |
transactionCount() { | |
return 0; | |
} | |
}, | |
mounted() { | |
this.getSingleOrgDetailsAct(this.locStorageActiveOrg.id).then((res) => { | |
if (res.data.success) { | |
this.dashboardMertic = res.data.orgMetrics; | |
} | |
}); | |
}, | |
methods: { | |
...mapActions({ | |
getSingleOrgDetailsAct: 'organization/getSingleOrgDetailsAct' | |
}) | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment