order report by date
This commit is contained in:
@@ -13,6 +13,7 @@ import { Permissions } from 'src/common/decorators/permissions.decorator';
|
||||
import { Permission } from 'src/common/enums/permission.enum';
|
||||
import { AdminCreateOrderDto } from '../dto/admin-create-order.dto';
|
||||
import { FoodOrderReportDto } from '../dto/food-order-report.dto';
|
||||
import { DailyOrderReportDto } from '../dto/daily-order-report.dto';
|
||||
|
||||
@ApiTags('orders')
|
||||
@ApiBearerAuth()
|
||||
@@ -136,4 +137,12 @@ export class OrdersController {
|
||||
getFoodOrderReport(@RestId() restId: string, @Query() dto: FoodOrderReportDto) {
|
||||
return this.ordersService.getFoodOrderReport(restId, dto);
|
||||
}
|
||||
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@Permissions(Permission.VIEW_REPORTS)
|
||||
@ApiOperation({ summary: 'Get order report grouped by day' })
|
||||
@Get('admin/orders/report/by-day')
|
||||
getDailyOrderReport(@RestId() restId: string, @Query() dto: DailyOrderReportDto) {
|
||||
return this.ordersService.getDailyOrderReport(restId, dto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user