Reset controlado de datos operativos e históricos, nueva jerarquía manual Departamento → Área → Yacimiento → Instalación → Subinstalación, filtros y administración inline de Hallazgos, y corrección de alta con Área sin Operadora.
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { Controller, Get, Param, ParseUUIDPipe, Query } from '@nestjs/common';
|
|
import { RequirePermissions } from '../authorization/decorators/require-permissions.decorator';
|
|
import { InventoryBrowserQueryDto } from './dto/inventory-browser-query.dto';
|
|
import { InventoryBrowserService } from './inventory-browser.service';
|
|
|
|
@Controller('inventory-browser')
|
|
@RequirePermissions('assets.read')
|
|
export class InventoryBrowserController {
|
|
constructor(private readonly inventoryBrowser: InventoryBrowserService) {}
|
|
|
|
@Get('items')
|
|
items(@Query() query: InventoryBrowserQueryDto) {
|
|
return this.inventoryBrowser.items(query);
|
|
}
|
|
|
|
@Get('departments')
|
|
departments(@Query() query: InventoryBrowserQueryDto) {
|
|
return this.inventoryBrowser.departments(query);
|
|
}
|
|
|
|
@Get('companies')
|
|
companies(@Query() query: InventoryBrowserQueryDto) {
|
|
return this.inventoryBrowser.companies(query);
|
|
}
|
|
|
|
@Get('areas')
|
|
areas(@Query() query: InventoryBrowserQueryDto) {
|
|
return this.inventoryBrowser.areas(query);
|
|
}
|
|
|
|
@Get(':parentId/children')
|
|
children(
|
|
@Param('parentId', new ParseUUIDPipe({ version: '4' })) parentId: string,
|
|
@Query() query: InventoryBrowserQueryDto,
|
|
) {
|
|
return this.inventoryBrowser.children(parentId, query);
|
|
}
|
|
}
|