improvement: all demo bugs fixed. give me more baby.

This commit is contained in:
2026-07-08 02:53:47 +03:30
parent 86b1e3afff
commit 8d334833ff
23 changed files with 876 additions and 626 deletions

View File

@@ -14,7 +14,7 @@ import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { LabOrgGuard } from '../../common/guards/lab-org.guard';
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
import { CasesService } from './cases.service';
import { ListLabCasesDto, UpdateLabCaseTaskDto } from './dto/cases.dto';
import { ListLabCasesDto, UpdateLabCaseImportantDto } from './dto/cases.dto';
@ApiTags('cases')
@ApiBearerAuth('JWT-auth')
@@ -64,15 +64,14 @@ export class CasesController {
file.stream.pipe(res);
}
@Patch(':id/tasks/:taskId')
@ApiOperation({ summary: 'Toggle task important flag' })
updateTask(
@Patch(':id/important')
@ApiOperation({ summary: 'Toggle the important flag for a whole case' })
setCaseImportant(
@Param('id') id: string,
@Param('taskId') taskId: string,
@Body() dto: UpdateLabCaseTaskDto,
@Body() dto: UpdateLabCaseImportantDto,
@Req() req,
) {
const organizationId = this.casesService.getOrganizationIdFromUser(req.user);
return this.casesService.updateTask(id, taskId, dto, organizationId, req.user.id, req.user.language);
return this.casesService.setCaseImportant(id, dto, organizationId, req.user.id, req.user.language);
}
}