Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@if (resource) {
<div class="flex flex-column gap-5 lg:flex-row lg:align-items-center lg:justify-content-between">
@if (!isCollectionsRoute() && isAdmin()) {
@if (!isCollectionsRoute() && isAdmin() && !isRegistration) {
<div class="flex gap-3 align-items-center">
<div class="flex gap-1" [class.inactive]="isPublic()">
<i class="fas fa-lock"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ export class OverviewToolbarComponent {
];
protected readonly ResourceType = ResourceType;

get isRegistration(): boolean {
return this.currentResource()?.resourceType === ResourceType.Registration;
}

constructor() {
effect(() => {
const bookmarksId = this.bookmarksCollectionId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>
} @else {
<div class="flex flex-column bg-white flex-1 p-4 gap-4">
@if (!schemaResponse()?.isOriginalResponse) {
@if (!schemaResponse()?.isOriginalResponse && !isInitialState) {
<p-message class="overview-message w-full" severity="warn">
<ng-template #container>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ResourceMetadataComponent,
SubHeaderComponent,
} from '@osf/shared/components';
import { ResourceType, RevisionReviewStates, UserPermissions } from '@osf/shared/enums';
import { RegistrationReviewStates, ResourceType, RevisionReviewStates, UserPermissions } from '@osf/shared/enums';
import { toCamelCase } from '@osf/shared/helpers';
import { MapRegistryOverview } from '@osf/shared/mappers';
import { SchemaResponse, ToolbarResource } from '@osf/shared/models';
Expand Down Expand Up @@ -157,6 +157,10 @@ export class RegistryOverviewComponent {
return this.userPermissions().includes(UserPermissions.Admin);
}

get isInitialState(): boolean {
return this.registry()?.reviewsState === RegistrationReviewStates.Initial;
}

constructor() {
this.route.parent?.params.subscribe((params) => {
const id = params['id'];
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/mappers/registration/registration.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class RegistrationMapper {
type: 'registrations',
attributes: {
embargo_end_date: embargoDate || null,
draft_registration: draftId,
draft_registration_id: draftId,
included_node_ids: components,
},
relationships: {
Expand Down