From 4ba5b9def32215006897d0b1bf074e1000ea0c7f Mon Sep 17 00:00:00 2001 From: Aditya Siregar Date: Thu, 25 Sep 2025 20:31:33 +0700 Subject: [PATCH] Update Report --- .../dashboards/daily-report/page.tsx | 47 +++---------------- src/services/api.ts | 4 +- 2 files changed, 9 insertions(+), 42 deletions(-) diff --git a/src/app/[lang]/(dashboard)/(private)/dashboards/daily-report/page.tsx b/src/app/[lang]/(dashboard)/(private)/dashboards/daily-report/page.tsx index d5ba06b..7fbb7bf 100644 --- a/src/app/[lang]/(dashboard)/(private)/dashboards/daily-report/page.tsx +++ b/src/app/[lang]/(dashboard)/(private)/dashboards/daily-report/page.tsx @@ -369,12 +369,6 @@ const DailyPOSReport = () => { Total Invoice {profitLoss?.summary.total_orders ?? 0} -
- Rata-rata Tagihan Per Invoice - - {formatCurrency(profitLoss?.summary.average_profit ?? 0)} - -
@@ -446,7 +440,6 @@ const DailyPOSReport = () => { Nama - Total Produk Qty Pendapatan @@ -455,7 +448,6 @@ const DailyPOSReport = () => { {category?.data?.map((c, index) => ( {c.category_name} - {c.product_count} {c.total_quantity} {formatCurrency(c.total_revenue)} @@ -466,7 +458,6 @@ const DailyPOSReport = () => { TOTAL - {categorySummary?.productCount ?? 0} {categorySummary?.totalQuantity ?? 0} {formatCurrency(categorySummary?.totalRevenue ?? 0)} @@ -485,19 +476,15 @@ const DailyPOSReport = () => {
- - - - - + + + - - - + @@ -539,8 +526,6 @@ const DailyPOSReport = () => { {categoryName.toUpperCase()} - - ) @@ -563,15 +548,9 @@ const DailyPOSReport = () => { - - - ) }) @@ -581,10 +560,6 @@ const DailyPOSReport = () => { (sum, item) => sum + (item.quantity_sold || 0), 0 ) - const categoryTotalOrders = categoryProducts.reduce( - (sum, item) => sum + (item.order_count || 0), - 0 - ) const categoryTotalRevenue = categoryProducts.reduce( (sum, item) => sum + (item.revenue || 0), 0 @@ -602,13 +577,9 @@ const DailyPOSReport = () => { - - - ) }) @@ -622,13 +593,9 @@ const DailyPOSReport = () => { - - -
Produk QtyOrderPendapatanRata RataPendapatan
{item.quantity_sold} - {item.order_count ?? 0} - + {formatCurrency(item.revenue)} - {formatCurrency(item.average_price)} -
{categoryTotalQty} - {categoryTotalOrders} - + {formatCurrency(categoryTotalRevenue)}
{productSummary.totalQuantitySold ?? 0} - {productSummary.totalOrders ?? 0} - + {formatCurrency(productSummary.totalRevenue ?? 0)}
diff --git a/src/services/api.ts b/src/services/api.ts index 2f7d1d8..5890323 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -6,8 +6,8 @@ const getToken = () => { } export const api = axios.create({ - baseURL: 'https://api-pos.apskel.id/api/v1', - // baseURL: 'http://127.0.0.1:4000/api/v1', + // baseURL: 'https://api-pos.apskel.id/api/v1', + baseURL: 'http://127.0.0.1:4000/api/v1', headers: { 'Content-Type': 'application/json' },