staging into master #426

Merged
edraft merged 83 commits from staging into master 2023-11-06 20:06:34 +01:00
4 changed files with 14 additions and 9 deletions
Showing only changes of commit f972055ebf - Show all commits

View File

@ -52,4 +52,4 @@
"tslib": "^2.4.1",
"typescript": "~4.9.5"
}
}
}

View File

@ -3,7 +3,8 @@
</h1>
<div class="content-wrapper">
<div class="content">
<p-table #dt [value]="shortRoleNames" [responsive]="true" responsiveLayout="stack" [breakpoint]="'720px'" dataKey="id" editMode="row" [rowHover]="true" [rows]="10"
<p-table #dt [value]="shortRoleNames" [responsive]="true" responsiveLayout="stack" [breakpoint]="'720px'"
dataKey="id" editMode="row" [rowHover]="true" [rows]="10"
[rowsPerPageOptions]="[10,25,50]" [paginator]="true" [loading]="loading" [totalRecords]="totalRecords"
[lazy]="true" (onLazyLoad)="nextPage($event)">
@ -17,12 +18,14 @@
{{'view.server.short_role_names.short_role_names' | translate}}
</div>
<app-multi-select-columns [table]="name" [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
<app-multi-select-columns [table]="name" [columns]="columns"
[(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
</div>
<div class="table-caption-btn-wrapper btn-wrapper">
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
icon="pi pi-plus" (click)="addShortRoleName(dt)" [disabled]="isEditingNew || user?.isModerator && !user?.isAdmin">
icon="pi pi-plus" (click)="addShortRoleName(dt)"
[disabled]="isEditingNew || user?.isModerator && !user?.isAdmin">
</button>
<button pButton label="{{'common.reset_filters' | translate}}" icon="pi pi-undo"
class="icon-btn btn" (click)="resetFilters()">
@ -102,7 +105,8 @@
</th>
<th hideable-th="position" [parent]="this">
<form [formGroup]="filterForm">
<p-dropdown formControlName="position" [options]="positions" placeholder="{{'common.position' | translate}}"></p-dropdown>
<p-dropdown formControlName="position" [options]="positions"
placeholder="{{'common.position' | translate}}"></p-dropdown>
</form>
</th>
<th class="table-header-small-dropdown"></th>
@ -158,7 +162,7 @@
placeholder="{{'common.position' | translate}}"></p-dropdown>
</ng-template>
<ng-template pTemplate="output">
{{shortRoleName.position}}
{{ 'common.positions.' + shortRoleName.position | translate }}
</ng-template>
</p-cellEditor>
</td>
@ -187,7 +191,8 @@
</td>
<td>
<div class="btn-wrapper">
<app-history-btn *ngIf="!isEditingNew" [id]="shortRoleName.id" [query]="query" translationKey="view.server.short_role_names.header"></app-history-btn>
<app-history-btn *ngIf="!isEditingNew" [id]="shortRoleName.id" [query]="query"
translationKey="view.server.short_role_names.header"></app-history-btn>
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
(click)="onRowEditInit(dt, shortRoleName, ri)"></button>
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"

View File

@ -102,7 +102,7 @@ export class ShortRoleNamesComponent extends ComponentWithTable implements OnIni
if (data.shortRoleNamePositions) {
this.positions = data.shortRoleNamePositions
.map(x => {
return { label: x, value: x };
return { label: this.translate.instant(`common.positions.${x}`), value: x };
});
}
this.spinner.hideSpinner();

View File

@ -4,4 +4,4 @@
"Minor": "2",
"Micro": "0"
}
}
}