feat: redesign meal ordering system
This commit is contained in:
@@ -7,7 +7,7 @@ import './styles.scss'
|
||||
interface KitchenReportResponse {
|
||||
date: string
|
||||
mealType: string
|
||||
totalOrders: number
|
||||
totalMeals: number
|
||||
ingredients: Record<string, number>
|
||||
labels: Record<string, string>
|
||||
portionSizes?: Record<string, number>
|
||||
@@ -31,7 +31,7 @@ export const KitchenDashboard: React.FC = () => {
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/meal-orders/kitchen-report?date=${date}&mealType=${mealType}`,
|
||||
`/api/meals/kitchen-report?date=${date}&mealType=${mealType}`,
|
||||
{
|
||||
credentials: 'include',
|
||||
},
|
||||
@@ -138,14 +138,14 @@ export const KitchenDashboard: React.FC = () => {
|
||||
<strong>Meal:</strong> {getMealTypeLabel(report.mealType)}
|
||||
</span>
|
||||
<span className="kitchen-dashboard__meta-item kitchen-dashboard__meta-item--highlight">
|
||||
<strong>Total Orders:</strong> {report.totalOrders}
|
||||
<strong>Total Meals:</strong> {report.totalMeals}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{report.totalOrders === 0 ? (
|
||||
{report.totalMeals === 0 ? (
|
||||
<div className="kitchen-dashboard__empty">
|
||||
<p>No orders found for this date and meal type.</p>
|
||||
<p>No meals found for this date and meal type.</p>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user