Skip to content

Commit

Permalink
fix: copy/edit functionality doesnt have to be show in certain cases
Browse files Browse the repository at this point in the history
see the issue for details

fixes issue #1121
  • Loading branch information
DanielPalafox committed Sep 14, 2021
1 parent 4577acc commit e71472a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/cdk/panel/panel/panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</button>
<button
mat-icon-button
*ngIf="!isPublicRecord && !isUserSource"
*ngIf="!isPublicRecord && !isUserSource && !userVersionPresent"
[matTooltip]="tooltipLabelMakeCopy"
(click)="openModal({ createACopy: true })"
>
Expand Down
1 change: 1 addition & 0 deletions src/app/cdk/panel/panel/panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class PanelComponent implements OnInit {
}

@Input() isUserSource = false
@Input() userVersionPresent = false
selected: boolean

formVisibility: FormGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[visibility]="affiliationStack.defaultAffiliation.visibility.visibility"
[isPublicRecord]="isPublicRecord"
[isUserSource]="userIsSource(affiliation)"
[userVersionPresent]="affiliationStack.userVersionPresent"
*ngIf="isPreferred(affiliation) || displayTheStack"
>
<h2 header class="orc-font-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[isPublicRecord]="isPublicRecord"
[putCode]="funding.putCode.value"
[isUserSource]="userIsSource(funding)"
[userVersionPresent]="fundingStack.userVersionPresent"
*ngIf="isPreferred(funding) || displayTheStack"
type="funding"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[editModalComponent]="worksModal"
[selectable]="true"
[isUserSource]="userIsSource(work)"
[userVersionPresent]="workStack.userVersionPresent"
(checkboxChangePanel)="checkboxChangeWorkStack($event)"
#panelsComponent
[type]="'works'"
Expand Down

0 comments on commit e71472a

Please sign in to comment.