fix profile names
This commit is contained in:
@@ -14,7 +14,7 @@ export class ConfirmDialog {
|
||||
constructor(private i18nService: I18nService,
|
||||
public dialogRef: MatDialogRef<ConfirmDialog>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
this.text = i18nService.get(data.label, data.args);
|
||||
this.text = data.empty ? i18nService.getEmpty(data.label, data.args) : i18nService.get(data.label, data.args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1 mat-dialog-title>{{'profileField.name.' + profileField.name | i18n}}</h1>
|
||||
<h1 mat-dialog-title>{{'profileField.name.' + profileField.name | i18nEmpty}}</h1>
|
||||
<mat-dialog-content>
|
||||
<pre>
|
||||
{{profileField.blob}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1 mat-dialog-title>{{'profileField.name.' + profileField.name | i18n}}</h1>
|
||||
<h1 mat-dialog-title>{{'profileField.name.' + profileField.name | i18nEmpty}}</h1>
|
||||
<mat-dialog-content>
|
||||
<form [formGroup]="form">
|
||||
<mat-form-field>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="name"> {{'profileField.name' | i18n}} </th>
|
||||
<td mat-cell *matCellDef="let profileField"> {{'profileField.name.' + profileField.name | i18n}} </td>
|
||||
<td mat-cell *matCellDef="let profileField"> {{'profileField.name.' + profileField.name | i18nEmpty}} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="value">
|
||||
|
||||
@@ -61,7 +61,7 @@ export class ProfileFieldsComponent implements OnInit {
|
||||
this.profileFields = data.sort((a, b) => {
|
||||
const isAsc = sort.direction === 'asc';
|
||||
switch(sort.active) {
|
||||
case 'name': return this.compare(this.i18n.get('profileField.name.' + a.name, []), this.i18n.get('profileField.name.' + b.name, []), isAsc);
|
||||
case 'name': return this.compare(this.i18n.getEmpty('profileField.name.' + a.name, []), this.i18n.getEmpty('profileField.name.' + b.name, []), isAsc);
|
||||
case 'value': return this.compare(a.value, b.value, isAsc);
|
||||
case 'index': return this.compare(a.index, b.index, isAsc);
|
||||
case 'visibility': return this.compare(this.i18n.get('visibility.' + a.visibility, []), this.i18n.get('visibility.' + b.visibility, []), isAsc);
|
||||
@@ -105,6 +105,7 @@ export class ProfileFieldsComponent implements OnInit {
|
||||
const dialogRef = this.dialog.open(ConfirmDialog, {
|
||||
data: {
|
||||
'label': 'profileField.confirmDelete',
|
||||
'empty' : true,
|
||||
'args': ['profileField.name.' + profileField.name]
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user