Skip to content

Commit

Permalink
Case list actions speed improvement (#1170)
Browse files Browse the repository at this point in the history
* applied a fix to improve speed of list actions, only include process definitions linked to the case/document which can create/initialize a document
  • Loading branch information
maarten-ritense authored and ThomasMinkeRitense committed Sep 20, 2024
1 parent 0c54757 commit 05d2374
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@ export class DocumentService {
);
}

public findProcessDocumentDefinitionsByCanInitializeDocument(
documentDefinitionName: string,
canInitializeDocument: boolean
): Observable<ProcessDocumentDefinition[]> {
return this.http.get<ProcessDocumentDefinition[]>(
`${this.valtimoEndpointUri}v1/process-document/definition/document/${documentDefinitionName}?canInitializeDocument=${canInitializeDocument}`
);
}

public findProcessDocumentDefinitionsByVersion(
documentDefinitionName: string,
version: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class DossierListActionsComponent implements OnInit {
switchMap(documentDefinitionName =>
combineLatest([
documentDefinitionName
? this.documentService.findProcessDocumentDefinitions(documentDefinitionName)
? this.documentService.findProcessDocumentDefinitionsByCanInitializeDocument(documentDefinitionName, true)
: of([]),
this._loading$,
])
Expand Down

0 comments on commit 05d2374

Please sign in to comment.