diff --git a/src/pages/15_dash-board/MainPage.vue b/src/pages/15_dash-board/MainPage.vue index 0a82c3a7..58ca2bd4 100644 --- a/src/pages/15_dash-board/MainPage.vue +++ b/src/pages/15_dash-board/MainPage.vue @@ -12,9 +12,13 @@ import ChartSales from './chart/ChartSales.vue'; // NOTE: Stores & Type import { useNavigator } from 'src/stores/navigator'; +import { useQuotationStore } from 'src/stores/quotations'; +import { storeToRefs } from 'pinia'; // NOTE: Variable const navigatorStore = useNavigator(); +const quotationStore = useQuotationStore(); +const { stats: quotationStats } = storeToRefs(quotationStore); const state = reactive({ role: 'admin', @@ -36,6 +40,12 @@ const option = reactive({ onMounted(async () => { navigatorStore.current.title = 'dashboard.title'; navigatorStore.current.path = [{ text: '' }]; + + const ret = await quotationStore.getQuotationStats(); + if (ret) { + quotationStats.value = Object.assign(quotationStats.value, ret); + console.log(quotationStats.value); + } });