diff --git a/projects/valtimo/document/src/lib/services/document.service.ts b/projects/valtimo/document/src/lib/services/document.service.ts index db8e0b24b..31a609901 100644 --- a/projects/valtimo/document/src/lib/services/document.service.ts +++ b/projects/valtimo/document/src/lib/services/document.service.ts @@ -297,6 +297,15 @@ export class DocumentService { ); } + public findProcessDocumentDefinitionsByCanInitializeDocument( + documentDefinitionName: string, + canInitializeDocument: boolean + ): Observable { + return this.http.get( + `${this.valtimoEndpointUri}v1/process-document/definition/document/${documentDefinitionName}?canInitializeDocument=${canInitializeDocument}` + ); + } + public findProcessDocumentDefinitionsByVersion( documentDefinitionName: string, version: number diff --git a/projects/valtimo/dossier/src/lib/components/dossier-list-actions/dossier-list-actions.component.ts b/projects/valtimo/dossier/src/lib/components/dossier-list-actions/dossier-list-actions.component.ts index 009b9bee9..38171fa5b 100644 --- a/projects/valtimo/dossier/src/lib/components/dossier-list-actions/dossier-list-actions.component.ts +++ b/projects/valtimo/dossier/src/lib/components/dossier-list-actions/dossier-list-actions.component.ts @@ -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$, ])