mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 07:51:02 +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 { CreateApprovalRuleDto } from '../dto/create-approval-rule.dto';
|
||||
import { MoveOrderDto } from '../dto/move-order.dto';
|
||||
import { ReorderItemsDto } from '../dto/reorder-items.dto';
|
||||
import { UpdateApprovalRuleDto } from '../dto/update-approval-rule.dto';
|
||||
import { ApprovalRulesService } from '../services/approval-rules.service';
|
||||
|
||||
@@ -35,6 +37,22 @@ export class ApprovalRulesController {
|
||||
return this.service.findChain(flag === 'true');
|
||||
}
|
||||
|
||||
@Post('reorder')
|
||||
@RuleEngineManage('approval-rules')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Bulk reorder approval steps within a chain' })
|
||||
reorder(@Body() dto: ReorderItemsDto) {
|
||||
return this.service.reorder(dto);
|
||||
}
|
||||
|
||||
@Post(':id/move-order')
|
||||
@RuleEngineManage('approval-rules')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Move an approval step up or down within its chain' })
|
||||
moveOrder(@Param('id', ParseUUIDPipe) id: string, @Body() dto: MoveOrderDto) {
|
||||
return this.service.moveOrder(id, dto.direction);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@RuleEngineView('approval-rules')
|
||||
@ApiOperation({ summary: 'Get an approval rule by ID' })
|
||||
|
||||
@@ -5,6 +5,8 @@ import {
|
||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { RuleEngineManage, RuleEngineView } from '../../../common/rule-engine-guards';
|
||||
import { CreateCargoTypeDto } from '../dto/create-cargo-type.dto';
|
||||
import { MoveOrderDto } from '../dto/move-order.dto';
|
||||
import { ReorderItemsDto } from '../dto/reorder-items.dto';
|
||||
import { UpdateCargoTypeDto } from '../dto/update-cargo-type.dto';
|
||||
import { CargoTypesService } from '../services/cargo-types.service';
|
||||
|
||||
@@ -32,6 +34,22 @@ export class CargoTypesController {
|
||||
});
|
||||
}
|
||||
|
||||
@Post('reorder')
|
||||
@RuleEngineManage('cargo-types')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Bulk reorder cargo types by ID list' })
|
||||
reorder(@Body() dto: ReorderItemsDto) {
|
||||
return this.service.reorder(dto);
|
||||
}
|
||||
|
||||
@Post(':id/move-order')
|
||||
@RuleEngineManage('cargo-types')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Move a cargo type 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('cargo-types')
|
||||
@ApiOperation({ summary: 'Get a cargo type by ID' })
|
||||
|
||||
@@ -5,6 +5,8 @@ import {
|
||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { RuleEngineManage, RuleEngineView } from '../../../common/rule-engine-guards';
|
||||
import { CreateContainerTypeDto } from '../dto/create-container-type.dto';
|
||||
import { MoveOrderDto } from '../dto/move-order.dto';
|
||||
import { ReorderItemsDto } from '../dto/reorder-items.dto';
|
||||
import { UpdateContainerTypeDto } from '../dto/update-container-type.dto';
|
||||
import { ContainerTypesService } from '../services/container-types.service';
|
||||
|
||||
@@ -25,6 +27,22 @@ export class ContainerTypesController {
|
||||
});
|
||||
}
|
||||
|
||||
@Post('reorder')
|
||||
@RuleEngineManage('container-types')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Bulk reorder container types by ID list' })
|
||||
reorder(@Body() dto: ReorderItemsDto) {
|
||||
return this.service.reorder(dto);
|
||||
}
|
||||
|
||||
@Post(':id/move-order')
|
||||
@RuleEngineManage('container-types')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Move a container type 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('container-types')
|
||||
@ApiOperation({ summary: 'Get a container type by ID' })
|
||||
|
||||
@@ -5,6 +5,8 @@ import {
|
||||
import { RuleEngineManage, RuleEngineView } from '../../../common/rule-engine-guards';
|
||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { CreateServiceTypeDto } from '../dto/create-service-type.dto';
|
||||
import { MoveOrderDto } from '../dto/move-order.dto';
|
||||
import { ReorderItemsDto } from '../dto/reorder-items.dto';
|
||||
import { UpdateServiceTypeDto } from '../dto/update-service-type.dto';
|
||||
import { ServiceTypesService } from '../services/service-types.service';
|
||||
|
||||
@@ -29,6 +31,22 @@ export class ServiceTypesController {
|
||||
});
|
||||
}
|
||||
|
||||
@Post('reorder')
|
||||
@RuleEngineManage('service-types')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Bulk reorder service types by ID list' })
|
||||
reorder(@Body() dto: ReorderItemsDto) {
|
||||
return this.service.reorder(dto);
|
||||
}
|
||||
|
||||
@Post(':id/move-order')
|
||||
@RuleEngineManage('service-types')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@ApiOperation({ summary: 'Move a service type 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('service-types')
|
||||
@ApiOperation({ summary: 'Get a service type by ID' })
|
||||
|
||||
@@ -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