Skip to content

Commit

Permalink
fix(resource): update lastModificationDate after editing label (DEV-315
Browse files Browse the repository at this point in the history
…) (#616)
  • Loading branch information
kilchenmann committed Dec 9, 2021
1 parent 29acf3a commit 3b9d93b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app/workspace/resource/properties/properties.component.html
Expand Up @@ -73,18 +73,18 @@ <h3 class="label mat-title">

<!-- additional line with project and user information -->
<div class="infobar mat-caption" *ngIf="project && user">
<p *ngIf="displayProjectInfo">This resource belongs to the project
<span *ngIf="displayProjectInfo">This resource belongs to the project
<span class="project link" (click)="openProject(project)" (mouseover)="previewProject(project)">
<strong>{{project?.shortname}}</strong>
<mat-icon inline>open_in_new</mat-icon>
</span>
</p>
<span class="fill-remaining-space"></span>
<p *ngIf="user || resource.res.creationDate">
</span>
<span class="fill-remaining-space desktop-only"></span>
<span *ngIf="user || resource.res.creationDate">
Created
<span *ngIf="user">by {{(user.username ? user.username : user.givenName + ' ' + user.familyName)}}</span>
<span *ngIf="resource.res.creationDate"> on {{resource.res.creationDate | date}}</span>
</p>
</span>
</div>

<!-- list of properties -->
Expand Down
Expand Up @@ -34,6 +34,7 @@

.infobar {
height: 24px;
flex-wrap: wrap;
}

.clipboard-arkurl {
Expand Down
Expand Up @@ -343,6 +343,7 @@ export class PropertiesComponent implements OnInit, OnChanges, OnDestroy {
this._dspApiConnection.v2.res.updateResourceMetadata(payload).subscribe(
(response: UpdateResourceMetadataResponse) => {
this.resource.res.label = payload.label;
this.lastModificationDate = response.lastModificationDate;
},
(error: ApiResponseError) => {
this._errorHandler.showMessage(error);
Expand Down

0 comments on commit 3b9d93b

Please sign in to comment.