refs #1319. Default menu logic
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
parent
fd5f4b5f41
commit
e9baede635
|
@ -24,6 +24,13 @@
|
|||
<mat-label>Comentarios</mat-label>
|
||||
<input matInput formControlName="comments" name="comments">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox
|
||||
formControlName="isDefault"
|
||||
class="example-margin"
|
||||
>
|
||||
{{ 'defaultMenuLabel' | translate }}
|
||||
</mat-checkbox>
|
||||
</form>
|
||||
|
||||
<!-- Iframe -->
|
||||
|
|
|
@ -31,6 +31,7 @@ export class CreateMenuComponent {
|
|||
name: ['', Validators.required],
|
||||
publicUrl: ['', Validators.required],
|
||||
resolution: ['', Validators.required],
|
||||
isDefault: [false],
|
||||
comments: [''],
|
||||
});
|
||||
}
|
||||
|
@ -58,6 +59,7 @@ export class CreateMenuComponent {
|
|||
publicUrl: [response.publicUrl, Validators.required],
|
||||
resolution: [response.resolution, Validators.required],
|
||||
comments: [response.comments],
|
||||
isDefault: [response.isDefault],
|
||||
});
|
||||
this.menuId = response['@id'];
|
||||
this.updateSafeUrl()
|
||||
|
@ -74,6 +76,7 @@ export class CreateMenuComponent {
|
|||
publicUrl: this.menuForm.value.publicUrl,
|
||||
resolution: this.menuForm.value.resolution,
|
||||
comments: this.menuForm.value.comments,
|
||||
isDefault: this.menuForm.value.isDefault,
|
||||
};
|
||||
|
||||
if (this.menuId) {
|
||||
|
|
|
@ -22,9 +22,14 @@
|
|||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<th mat-header-cell *matHeaderCellDef> {{ column.header }} </th>
|
||||
<td mat-cell *matCellDef="let menu" >
|
||||
<ng-container>
|
||||
<ng-container *ngIf="column.columnDef !== 'isDefault'">
|
||||
{{ column.cell(menu) }}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="column.columnDef === 'isDefault'">
|
||||
<mat-icon [color]="menu[column.columnDef] ? 'primary' : 'warn'">
|
||||
{{ menu[column.columnDef] ? 'check_circle' : 'cancel' }}
|
||||
</mat-icon>
|
||||
</ng-container>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@ export class MenusComponent {
|
|||
header: 'Url pública',
|
||||
cell: (repository: any) => `${this.baseUrl}/menu/${repository.publicUrl}`
|
||||
},
|
||||
{
|
||||
columnDef: 'isDefault',
|
||||
header: 'Por defecto',
|
||||
cell: (repository: any) => `${repository.isDefault}`
|
||||
},
|
||||
{
|
||||
columnDef: 'resolution',
|
||||
header: 'Resolución',
|
||||
|
|
|
@ -448,5 +448,6 @@
|
|||
"parent": "Parent",
|
||||
"adminUsersTitle": "Manage users",
|
||||
"filtersPanelStepText": "Use these filters to search or load configurations.",
|
||||
"organizationalUnitsStepText": "List of Organizational Units. Click on one to view details."
|
||||
"organizationalUnitsStepText": "List of Organizational Units. Click on one to view details.",
|
||||
"defaultMenuLabel": "Main menu"
|
||||
}
|
||||
|
|
|
@ -450,5 +450,6 @@
|
|||
"parent": "Padre",
|
||||
"adminUsersTitle": "Administrar usuarios",
|
||||
"filtersPanelStepText": "Utiliza estos filtros para buscar o cargar configuraciones.",
|
||||
"organizationalUnitsStepText": "Lista de Unidades Organizacionales. Haz clic en una para ver detalles."
|
||||
"organizationalUnitsStepText": "Lista de Unidades Organizacionales. Haz clic en una para ver detalles.",
|
||||
"defaultMenuLabel": "Menú por defecto"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue