From df11d6dd31913bd90b0723a0b2c2eeebac1e063f Mon Sep 17 00:00:00 2001 From: Tomasz Subik Date: Wed, 6 Dec 2023 11:48:00 +0100 Subject: [PATCH] ability to submit for qc instead of just creating observation --- .../pages/observations/observation-detail.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/pages/observations/observation-detail.component.ts b/src/app/pages/observations/observation-detail.component.ts index ea728b5d..ba117eb2 100644 --- a/src/app/pages/observations/observation-detail.component.ts +++ b/src/app/pages/observations/observation-detail.component.ts @@ -1402,11 +1402,13 @@ export class ObservationDetailComponent implements OnDestroy { } canSubmitForReview(): boolean { - if (!this.observation) return false; - if (this.observation.hidden) return false; - const isCreating = !this.observation; const isDuplicating = this.isCopied; + + if (isCreating) return true; + if (isDuplicating) return true; + if (this.observation.hidden) return false; + const isAdmin = this.authService.isAdmin(); const isOwner = this.observation.user && this.observation.user.id === this.authService.userId; const isUserLinkedObserver = !!this.observation.observers.find(o => o.id === this.authService.userObserverId); @@ -1417,8 +1419,6 @@ export class ObservationDetailComponent implements OnDestroy { const isPublishedWithCommentsAndNotModified = this.observation['validation-status'] === 'Published (not modified)'; const isPublishedWithoutComments = this.observation['validation-status'] === 'Published (no comments)'; - if (isCreating) return true; - if (isDuplicating) return true; if (isCreated && isAdmin && isUserLinkedObserver) return true; if (isCreated && isOwner) return true; if (isInNeedOfRevision && isAmending) return true