diff --git a/src/components/14_report/Expansion.vue b/src/components/14_report/Expansion.vue deleted file mode 100644 index 581c677b..00000000 --- a/src/components/14_report/Expansion.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/src/i18n/eng.ts b/src/i18n/eng.ts index 3b7d494a..c822240c 100644 --- a/src/i18n/eng.ts +++ b/src/i18n/eng.ts @@ -1336,44 +1336,4 @@ export default { Succeed: 'Completed', }, }, - - report: { - report: { - title: 'Report', - view: { - Document: 'Document Status Report', - Invoice: 'Payment Report', - Product: 'Product and Service Report', - admin: { - Product: 'Product Movement Report', - Sale: 'Sales Summary Report', - }, - }, - document: { - code: 'Code', - status: 'Quotation Status', - createAt: 'Created Date', - updateAt: 'Updated Date', - }, - table: { - code: 'Code', - status: 'Status', - createAt: 'Created Date', - }, - product: { - did: 'Processed Quantity', - sale: 'Sold Quantity', - name: 'Product Name', - code: 'Product Code', - }, - sale: { - byCustomer: 'Sales by Branch', - byProductGroup: 'Sales by Product Category', - bySale: 'Sales by Salesperson', - code: 'Code', - name: 'Name', - count: 'Sold Quantity', - }, - }, - }, }; diff --git a/src/i18n/tha.ts b/src/i18n/tha.ts index 8657680f..c3205cbc 100644 --- a/src/i18n/tha.ts +++ b/src/i18n/tha.ts @@ -1315,43 +1315,4 @@ export default { Succeed: 'เสร็จสิ้น', }, }, - - report: { - title: 'รายงาน', - view: { - Document: 'รายงานสถานะเอกสาร', - Invoice: 'รายงานการชำระเงิน', - Product: 'รายงานสินค้าและบริการ', - admin: { - Product: 'รายงานการเคลื่อนไหวของสินค้า', - Sale: 'รายงานสรุปยอดขาย', - }, - }, - document: { - code: 'รหัส', - status: 'สถานะใบเสนอราคา', - createAt: 'วันที่สร้าง', - updateAt: 'วันที่แก้ไข', - }, - table: { - code: 'รหัส', - status: 'สถานะ', - createAt: 'วันที่สร้าง', - }, - product: { - did: 'จำนวนที่ออกไปดำเนินการ', - sale: 'จำนวนที่ขายออกไป', - name: 'ชื่อสินค้า', - code: 'รหัสสินค้า', - }, - - sale: { - byCustomer: 'ยอดขายตามสาขา', - byProductGroup: 'ยอดขายตามประเภทสินค้า', - bySale: 'ยอดขายตามพนักงานขาย', - code: 'รหัส', - name: 'ชื่อ', - count: 'จำนวนที่ขาย', - }, - }, }; diff --git a/src/pages/14_report/MainPage.vue b/src/pages/14_report/MainPage.vue index b8464197..7f3a32b7 100644 --- a/src/pages/14_report/MainPage.vue +++ b/src/pages/14_report/MainPage.vue @@ -1,362 +1,24 @@ diff --git a/src/pages/14_report/Table/TableReport.vue b/src/pages/14_report/Table/TableReport.vue deleted file mode 100644 index 29214126..00000000 --- a/src/pages/14_report/Table/TableReport.vue +++ /dev/null @@ -1,64 +0,0 @@ - - diff --git a/src/pages/14_report/constants.ts b/src/pages/14_report/constants.ts deleted file mode 100644 index fc2b9883..00000000 --- a/src/pages/14_report/constants.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { QTableProps } from 'quasar'; -import { Invoice, Receipt } from 'src/stores/payment/types'; -import { - Report, - ReportProduct, - ReportQuotation, -} from 'src/stores/report/types'; -import { formatNumberDecimal } from 'src/stores/utils'; -import { dateFormatJS } from 'src/utils/datetime'; - -export enum ViewMode { - Document = 'document', - Invoice = 'invoice', - Receipt = 'receipt', - Product = 'product', - Sale = 'sale', -} - -type ColumnsSale = { - code: string; - name: string; - _count: number; -}; - -type ColumnsBySale = ColumnsSale & { - url?: string; - id?: string; - gender?: string; -}; - -export const colReportQuotation = [ - { - name: 'code', - align: 'center', - label: 'report.document.code', - field: (data: ReportQuotation) => data.code, - }, - { - name: '#status', - align: 'center', - label: 'report.document.status', - field: '', - }, - { - name: 'createAt', - align: 'center', - label: 'report.document.createAt', - field: (data: ReportQuotation) => dateFormatJS({ date: data.createdAt }), - }, - { - name: 'updateAt', - align: 'center', - label: 'report.document.updateAt', - field: (data: ReportQuotation) => dateFormatJS({ date: data.updatedAt }), - }, -] as const satisfies QTableProps['columns']; - -export const colReport = [ - { - name: 'code', - align: 'center', - label: 'report.table.code', - field: (data: Report) => data.code, - }, - { - name: '#status', - align: 'center', - label: 'report.table.status', - field: '', - }, - { - name: 'createAt', - align: 'center', - label: 'report.table.createAt', - field: (data: Report) => dateFormatJS({ date: data.createdAt }), - }, -] as const satisfies QTableProps['columns']; - -export const colReportProduct = [ - { - name: 'code', - align: 'center', - label: 'report.product.code', - field: (data: ReportProduct) => data.code, - }, - { - name: 'name', - align: 'center', - label: 'report.product.name', - field: (data: ReportProduct) => data.name, - }, - { - name: 'sale', - align: 'center', - label: 'report.product.sale', - field: (data: ReportProduct) => data.sale, - }, - { - name: 'did', - align: 'center', - label: 'report.product.did', - field: (data: ReportProduct) => data.did, - }, -] as const satisfies QTableProps['columns']; - -export const colReportSale = [ - { - name: 'code', - align: 'left', - label: 'report.sale.code', - field: (data: ColumnsSale) => data.code, - }, - { - name: '#name', - align: 'left', - label: 'report.sale.name', - field: '', - }, - { - name: 'count', - align: 'center', - label: 'report.sale.count', - field: (data: ColumnsSale) => data._count, - }, -] as const satisfies QTableProps['columns']; - -export const colReportBySale = [ - { - name: 'code', - align: 'left', - label: 'report.sale.code', - field: (data: ColumnsBySale) => data.code, - }, - { - name: '#name', - align: 'left', - label: 'report.sale.name', - field: '', - }, - { - name: 'count', - align: 'center', - label: 'report.sale.count', - field: (data: ColumnsBySale) => data._count, - }, -] as const satisfies QTableProps['columns']; - -export const pageTabs = [ - { label: 'Document', value: ViewMode.Document, by: ['user'] }, - { label: 'Invoice', value: ViewMode.Invoice, by: ['user'] }, - { label: 'Product', value: ViewMode.Product, by: ['user', 'admin'] }, - { label: 'Sale', value: ViewMode.Sale, by: ['admin'] }, -];