mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
change price logic on the ,rule engine ui, auto generate the contrat
This commit is contained in:
@@ -5,6 +5,8 @@ import {
|
||||
import { RuleEngineManage, RuleEngineView } from '../../../common/rule-engine-guards';
|
||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { CreateYardDto } from '../dto/create-yard.dto';
|
||||
import { MoveOrderDto } from '../dto/move-order.dto';
|
||||
import { ReorderItemsDto } from '../dto/reorder-items.dto';
|
||||
import { UpdateYardDto } from '../dto/update-yard.dto';
|
||||
import { YardsService } from '../services/yards.service';
|
||||
|
||||
@@ -26,6 +28,22 @@ export class YardsController {
|
||||
});
|
||||
}
|
||||
|
||||
@Post('reorder')
|
||||
@RuleEngineManage('yards')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Bulk reorder yards by ID list' })
|
||||
reorder(@Body() dto: ReorderItemsDto) {
|
||||
return this.service.reorder(dto);
|
||||
}
|
||||
|
||||
@Post(':id/move-order')
|
||||
@RuleEngineManage('yards')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Move a yard up or down in display order' })
|
||||
moveOrder(@Param('id', ParseUUIDPipe) id: string, @Body() dto: MoveOrderDto) {
|
||||
return this.service.moveOrder(id, dto.direction);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@RuleEngineView('yards')
|
||||
@ApiOperation({ summary: 'Get a yard by ID' })
|
||||
|
||||
Reference in New Issue
Block a user