improvement: added a history action button to connected orgs row inordr to see a brief report of the relevant cases between two orgs and the status of each related task.
This commit is contained in:
@@ -18,6 +18,7 @@ import { InviteOrganizationDto } from './dto/invite-organization.dto';
|
||||
import { PreviewOrganizationInviteDto } from './dto/preview-organization-invite.dto';
|
||||
import { RespondConnectionRequestDto } from './dto/respond-connection-request.dto';
|
||||
import { OrganizationService } from './organization.service';
|
||||
import { ListLabCasesDto } from '../cases/dto/cases.dto';
|
||||
|
||||
/**
|
||||
* Counterpart orgs (clinic↔lab).
|
||||
@@ -121,6 +122,40 @@ export class OrganizationController {
|
||||
return this.organizationService.deleteConnection(req.user.id, organizationId, connectionId);
|
||||
}
|
||||
|
||||
@Get('connections/:connectionId/cases')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiOperation({ summary: 'List cases exchanged with a connected organization' })
|
||||
listConnectionCases(
|
||||
@Req() req: { user: { id: string; organizationId?: string } },
|
||||
@Param('connectionId') connectionId: string,
|
||||
@Query() query: ListLabCasesDto,
|
||||
) {
|
||||
const organizationId = this.organizationService.getOrganizationIdFromUser(req.user);
|
||||
return this.organizationService.listConnectionCases(
|
||||
req.user.id,
|
||||
organizationId,
|
||||
connectionId,
|
||||
query,
|
||||
);
|
||||
}
|
||||
|
||||
@Get('connections/:connectionId/cases/:caseId')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiOperation({ summary: 'Get one case exchanged with a connected organization' })
|
||||
getConnectionCase(
|
||||
@Req() req: { user: { id: string; organizationId?: string } },
|
||||
@Param('connectionId') connectionId: string,
|
||||
@Param('caseId') caseId: string,
|
||||
) {
|
||||
const organizationId = this.organizationService.getOrganizationIdFromUser(req.user);
|
||||
return this.organizationService.getConnectionCase(
|
||||
req.user.id,
|
||||
organizationId,
|
||||
connectionId,
|
||||
caseId,
|
||||
);
|
||||
}
|
||||
|
||||
@Post('invitations/:invitationId/link')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiOperation({ summary: 'Get a shareable invite link for a pending invitation' })
|
||||
|
||||
Reference in New Issue
Block a user