Skip to content

Commit

Permalink
Merge branch 'feat/submit-for-qc-first-step' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubik committed Dec 6, 2023
2 parents af372dd + df11d6d commit 9626b08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app/pages/observations/observation-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,11 +1416,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);
Expand All @@ -1431,8 +1433,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
Expand Down

0 comments on commit 9626b08

Please sign in to comment.