pie chart for food added

This commit is contained in:
2025-12-23 11:19:39 +03:30
parent 5bb18afa11
commit 4e1300c6b9
2 changed files with 65 additions and 3 deletions
@@ -14,7 +14,7 @@ import { UpdateOrderStatusDto } from '../dto/update-order-status.dto';
@ApiBearerAuth()
@Controller()
export class OrdersController {
constructor(private readonly ordersService: OrdersService) {}
constructor(private readonly ordersService: OrdersService) { }
@UseGuards(AuthGuard)
@Post('public/checkout')
@@ -98,8 +98,16 @@ export class OrdersController {
@UseGuards(AdminAuthGuard)
@ApiOperation({ summary: 'Get Stats for report page' })
@Get('admin/orders/stats')
findStats( @RestId() restId: string) {
@Get('admin/orders/stats')
findStats(@RestId() restId: string) {
return this.ordersService.getStats(restId);
}
@UseGuards(AdminAuthGuard)
@ApiOperation({ summary: 'Get food sales pie chart data for last month' })
@ApiHeader(API_HEADER_SLUG)
@Get('admin/orders/food-sales-pie-chart')
getFoodSalesPieChart(@RestId() restId: string) {
return this.ordersService.getFoodSalesPieChart(restId);
}
}