diff --git a/src/components/08_request-list/DataDisplay.vue b/src/components/08_request-list/DataDisplay.vue index a969b865..b344a5bb 100644 --- a/src/components/08_request-list/DataDisplay.vue +++ b/src/components/08_request-list/DataDisplay.vue @@ -1,7 +1,8 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/15_dash-board/chart/ChartOpportunity.vue b/src/pages/15_dash-board/chart/ChartOpportunity.vue new file mode 100644 index 00000000..23900231 --- /dev/null +++ b/src/pages/15_dash-board/chart/ChartOpportunity.vue @@ -0,0 +1,58 @@ + + + + {{ $t('dashboard.opportunity.title') }} + + {{ $t('dashboard.opportunity.caption') }} + + + + diff --git a/src/pages/15_dash-board/chart/ChartQuotationStatus.vue b/src/pages/15_dash-board/chart/ChartQuotationStatus.vue new file mode 100644 index 00000000..8792c6dd --- /dev/null +++ b/src/pages/15_dash-board/chart/ChartQuotationStatus.vue @@ -0,0 +1,107 @@ + + + + {{ $t('dashboard.quotation.title') }} + + {{ $t('dashboard.quotation.caption') }} + + + + diff --git a/src/pages/15_dash-board/chart/ChartReceipt.vue b/src/pages/15_dash-board/chart/ChartReceipt.vue new file mode 100644 index 00000000..8b470064 --- /dev/null +++ b/src/pages/15_dash-board/chart/ChartReceipt.vue @@ -0,0 +1,111 @@ + + + + {{ $t('dashboard.receipt.title') }} + + {{ $t('dashboard.receipt.caption') }} + + + + + + + + + + + + + diff --git a/src/pages/15_dash-board/chart/ChartSales.vue b/src/pages/15_dash-board/chart/ChartSales.vue new file mode 100644 index 00000000..2cafbef2 --- /dev/null +++ b/src/pages/15_dash-board/chart/ChartSales.vue @@ -0,0 +1,75 @@ + + + + {{ $t('dashboard.sales.title') }} + + {{ $t('dashboard.sales.caption') }} + + + + diff --git a/src/stores/report/index.ts b/src/stores/report/index.ts index 0f0ab14f..7686236c 100644 --- a/src/stores/report/index.ts +++ b/src/stores/report/index.ts @@ -2,7 +2,13 @@ import { ref } from 'vue'; import { defineStore } from 'pinia'; import { Pagination, Status } from '../types'; import { api } from 'src/boot/axios'; -import { Report, ReportProduct, ReportQuotation, ReportSale } from './types'; +import { + Report, + ReportPayment, + ReportProduct, + ReportQuotation, + ReportSale, +} from './types'; const ENDPOINT = 'report'; @@ -48,12 +54,21 @@ export async function getReportProduct() { return null; } +export async function getReportPayment() { + const res = await api.get(`/${ENDPOINT}/payment`); + if (res.status < 400) { + return res.data; + } + return null; +} + export const useReportStore = defineStore('report-store', () => { const dataReportQuotation = ref([]); const dataReportInvoice = ref([]); const dataReportReceipt = ref([]); const dataReportSale = ref(); const dataReportProduct = ref([]); + const dataReportPayment = ref([]); return { dataReportQuotation, @@ -61,11 +76,13 @@ export const useReportStore = defineStore('report-store', () => { dataReportReceipt, dataReportSale, dataReportProduct, + dataReportPayment, getReportQuotation, getReportInvoice, getReportReceipt, getReportSale, getReportProduct, + getReportPayment, }; }); diff --git a/src/stores/report/types.ts b/src/stores/report/types.ts index 92215ae3..1f057af2 100644 --- a/src/stores/report/types.ts +++ b/src/stores/report/types.ts @@ -2,6 +2,7 @@ import { QuotationStatus } from 'src/stores/quotations/types'; import { ProductGroup } from '../product-service/types'; import { User } from '../user'; import { CustomerBranch } from '../customer'; +import { PaymentDataStatus } from '../payment/types'; export type ReportQuotation = { updatedAt: Date | null; @@ -34,6 +35,12 @@ export type ReportProduct = { code: string; }; +export type ReportPayment = { + year: string; + month: string; + data: Partial>; +}; + export type ReportSale = { byCustomer: (Omit & { _count: number })[]; bySale: (User & { _count: number })[]; diff --git a/src/stores/request-list/types.ts b/src/stores/request-list/types.ts index 124a8c99..c17e0ebf 100644 --- a/src/stores/request-list/types.ts +++ b/src/stores/request-list/types.ts @@ -9,6 +9,9 @@ export type RequestData = { createdAt: string; updatedAt: string; + customerRequestCancel?: boolean; + customerRequestCancelReason?: string; + quotation: QuotationFull & { debitNoteQuotationId: string; isDebitNote: boolean; @@ -60,6 +63,8 @@ export type RequestWork = { attributes?: Attributes; creditNoteId?: string; processByUserId?: string; + customerRequestCancel?: boolean; + customerRequestCancelReason?: string; }; export type RowDocument = {