orders
This commit is contained in:
@@ -96,45 +96,10 @@ export class OrdersController {
|
||||
return this.ordersService.changeOrderStatus(orderId, restId, status, 'admin', dto?.desc);
|
||||
}
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @Patch('admin/orders/:orderId/confirm')
|
||||
// @ApiOperation({ summary: 'Accept an order' })
|
||||
// @ApiParam({ name: 'orderId', description: 'Order ID' })
|
||||
// acceptOrder(@Param('orderId') orderId: string, @RestId() restId: string) {
|
||||
// return this.ordersService.confirmOrder(orderId, restId);
|
||||
// }
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @Patch('admin/orders/:id/prepare')
|
||||
// @ApiOperation({ summary: 'Prepare an order By Admin' })
|
||||
// @ApiParam({ name: 'id', description: 'Order ID' })
|
||||
// prepareOrder(@Param('id') id: string, @RestId() restId: string) {
|
||||
// return this.ordersService.prepareOrder(id, restId);
|
||||
// }
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @Patch('admin/orders/:orderId/reject')
|
||||
// @ApiOperation({ summary: 'Reject an order' })
|
||||
// @ApiParam({ name: 'orderId', description: 'Order ID' })
|
||||
// rejectOrder(@Param('orderId') orderId: string, @RestId() restId: string) {
|
||||
// return this.ordersService.rejectOrder(orderId, restId);
|
||||
// }
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @ApiBearerAuth()
|
||||
// @Patch('admin/orders/:orderId/ready')
|
||||
// @ApiOperation({ summary: 'Ready for pickup or delivery ' })
|
||||
// @ApiParam({ name: 'orderId', description: 'Order ID' })
|
||||
// readyForPickup(@Param('orderId') orderId: string, @RestId() restId: string) {
|
||||
// return this.ordersService.readyForDelivery(orderId, restId);
|
||||
// }
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @ApiBearerAuth()
|
||||
// @Patch('admin/orders/:orderId/delivered')
|
||||
// @ApiOperation({ summary: 'Mark an order as delivered' })
|
||||
// @ApiParam({ name: 'orderId', description: 'Order ID' })
|
||||
// markAsDelivered(@Param('orderId') orderId: string, @RestId() restId: string) {
|
||||
// return this.ordersService.markAsDelivered(orderId, restId);
|
||||
// }
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@ApiOperation({ summary: 'Get Stats for report page' })
|
||||
@Get('admin/orders/stats')
|
||||
findStats( @RestId() restId: string) {
|
||||
return this.ordersService.getStats(restId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user