Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 65579c0b authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

PR

parent 2ba5be18
No related branches found
No related tags found
No related merge requests found
Pipeline #204813 failed
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
mat-sort-header>{{ "document.events.panel.label.date" | translate }} mat-sort-header>{{ "document.events.panel.label.date" | translate }}
</th> </th>
<td mat-cell *matCellDef="let row;"> <td mat-cell *matCellDef="let row;">
{{ row.eventOn | date: getDateTimeFormat }} {{ row.eventOn | date: dateTimeFormat }}
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="eventType"> <ng-container matColumnDef="eventType">
......
...@@ -76,7 +76,7 @@ export class DocumentEventsPanelComponent implements AfterViewInit, BeforeLeaveG ...@@ -76,7 +76,7 @@ export class DocumentEventsPanelComponent implements AfterViewInit, BeforeLeaveG
private controlContainer: ControlContainer) { private controlContainer: ControlContainer) {
} }
get getDateTimeFormat(): string { get dateTimeFormat(): string {
return this.globalLookups.getDateTimeFormat(); return this.globalLookups.getDateTimeFormat();
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
mat-sort-header>{{ "document.versions.panel.label.created" | translate }} mat-sort-header>{{ "document.versions.panel.label.created" | translate }}
</th> </th>
<td mat-cell *matCellDef="let row;"> <td mat-cell *matCellDef="let row;">
{{ row.createdOn | date: getDateTimeFormat }} {{ row.createdOn | date: dateTimeFormat }}
</ng-container> </ng-container>
<ng-container matColumnDef="lastUpdatedOn"> <ng-container matColumnDef="lastUpdatedOn">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
mat-sort-header>{{ "document.versions.panel.label.updated" | translate }} mat-sort-header>{{ "document.versions.panel.label.updated" | translate }}
</th> </th>
<td mat-cell *matCellDef="let row;"> <td mat-cell *matCellDef="let row;">
{{ row.lastUpdatedOn | date: getDateTimeFormat }} {{ row.lastUpdatedOn | date: dateTimeFormat }}
</ng-container> </ng-container>
<tr mat-header-row <tr mat-header-row
......
...@@ -76,7 +76,7 @@ export class DocumentVersionsPanelComponent implements AfterViewInit, BeforeLeav ...@@ -76,7 +76,7 @@ export class DocumentVersionsPanelComponent implements AfterViewInit, BeforeLeav
private controlContainer: ControlContainer) { private controlContainer: ControlContainer) {
} }
get getDateTimeFormat(): string { get dateTimeFormat(): string {
return this.globalLookups.getDateTimeFormat(); return this.globalLookups.getDateTimeFormat();
} }
......
...@@ -17,13 +17,4 @@ ...@@ -17,13 +17,4 @@
<ng-template #dateTimeColumn let-value="value" ngx-datatable-cell-template> <ng-template #dateTimeColumn let-value="value" ngx-datatable-cell-template>
<div class='truncate-text' title="{{value | date:dateTimeFormat}}">{{ value | date:dateTimeFormat }}</div> <div class='truncate-text' title="{{value | date:dateTimeFormat}}">{{ value | date:dateTimeFormat }}</div>
</ng-template> </ng-template>
<ng-template #truncateText let-value="value" ngx-datatable-cell-template>
<div class='truncate-text' title="{{value}}">{{ value }}</div>
</ng-template>
<ng-template #forUser let-row="row" let-value="value" ngx-datatable-cell-template>
<div class='truncate-text' title="{{ 'alert.panel.user.title' | translate: {value, mailTo: row.mailTo} }}">{{ value }}</div>
</ng-template>
<ng-template #credentialType let-row="row" let-value="value" ngx-datatable-cell-template>
<div class='truncate-text'>{{ value['CREDENTIAL_TYPE'] }}</div>
</ng-template>
</smp-search-table> </smp-search-table>
...@@ -154,13 +154,16 @@ export class ResourceDetailsPanelComponent implements BeforeLeaveGuard { ...@@ -154,13 +154,16 @@ export class ResourceDetailsPanelComponent implements BeforeLeaveGuard {
let updatedResource: ResourceRo = this.resource; let updatedResource: ResourceRo = this.resource;
this.editResourceService.updateResourceForGroup(updatedResource, this.group, this.domain).subscribe({ this.editResourceService.updateResourceForGroup(updatedResource, this.group, this.domain).subscribe({
next: (result: ResourceRo): void => { next: (result: ResourceRo): void => {
if (!!result) { try {
this.alertService.successForTranslation("resource.details.panel.alert.resource.saved"); if (!!result) {
this.editResourceController.selectedResource = result; this.alertService.successForTranslation("resource.details.panel.alert.resource.saved");
this._resource = result; this.editResourceController.selectedResource = result;
this.resourceForm.markAsPristine(); this._resource = result;
this.resourceForm.markAsPristine();
}
} finally {
this.windowSpinnerService.showSpinner = false;
} }
this.windowSpinnerService.showSpinner = false;
}, error: (err: any): void => { }, error: (err: any): void => {
this.alertService.error(err.error?.errorDescription) this.alertService.error(err.error?.errorDescription)
this.windowSpinnerService.showSpinner = false; this.windowSpinnerService.showSpinner = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment