refs #1288. Added Menu CRUD
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
f51b255209
commit
1c791df45e
|
@ -4,7 +4,7 @@
|
||||||
</button>
|
</button>
|
||||||
<h2 class="title" joyrideStep="titleStep" text="Desde esta pantalla podrás ver y administrar los menus exitentes.">Administrar menús</h2>
|
<h2 class="title" joyrideStep="titleStep" text="Desde esta pantalla podrás ver y administrar los menus exitentes.">Administrar menús</h2>
|
||||||
<div class="images-button-row">
|
<div class="images-button-row">
|
||||||
<button mat-flat-button color="primary" (click)="addImage()" joyrideStep="addStep" text="Utiliza este botón para añadir un nuevo menu.">Añadir menú</button>
|
<button mat-flat-button color="primary" (click)="addMenu()" joyrideStep="addStep" text="Utiliza este botón para añadir un nuevo menu.">Añadir menú</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-divider class="divider"></mat-divider>
|
<mat-divider class="divider"></mat-divider>
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
|
|
||||||
<ng-container matColumnDef="actions">
|
<ng-container matColumnDef="actions">
|
||||||
<th mat-header-cell *matHeaderCellDef i18n="@@columnActions" style="text-align: center;">Acciones</th>
|
<th mat-header-cell *matHeaderCellDef i18n="@@columnActions" style="text-align: center;">Acciones</th>
|
||||||
<td mat-cell *matCellDef="let client" style="text-align: center;">
|
<td mat-cell *matCellDef="let menu" style="text-align: center;">
|
||||||
<button mat-icon-button color="primary" (click)="editMenu($event, client)" i18n="@@editImage"> <mat-icon>edit</mat-icon></button>
|
<button mat-icon-button color="primary" (click)="editMenu($event, menu)" i18n="@@editImage"> <mat-icon>edit</mat-icon></button>
|
||||||
<button mat-icon-button color="warn" (click)="deleteMenu($event, client)">
|
<button mat-icon-button color="warn" (click)="deleteMenu($event, menu)">
|
||||||
<mat-icon i18n="@@deleteElementTooltip">delete</mat-icon>
|
<mat-icon i18n="@@deleteElementTooltip">delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -6,10 +6,8 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import {ToastrService} from "ngx-toastr";
|
import {ToastrService} from "ngx-toastr";
|
||||||
import {JoyrideService} from "ngx-joyride";
|
import {JoyrideService} from "ngx-joyride";
|
||||||
import {Router} from "@angular/router";
|
import {Router} from "@angular/router";
|
||||||
import {CreateRepositoryComponent} from "../repositories/create-repository/create-repository.component";
|
|
||||||
import {DeleteModalComponent} from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
import {DeleteModalComponent} from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
import {CreateMenuComponent} from "./create-menu/create-menu.component";
|
import {CreateMenuComponent} from "./create-menu/create-menu.component";
|
||||||
import {CreateImageComponent} from "../images/create-image/create-image.component";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-menus',
|
selector: 'app-menus',
|
||||||
|
@ -68,7 +66,7 @@ export class MenusComponent {
|
||||||
this.search();
|
this.search();
|
||||||
}
|
}
|
||||||
|
|
||||||
addImage(): void {
|
addMenu(): void {
|
||||||
const dialogRef = this.dialog.open(CreateMenuComponent, {
|
const dialogRef = this.dialog.open(CreateMenuComponent, {
|
||||||
width: '600px'
|
width: '600px'
|
||||||
});
|
});
|
||||||
|
@ -101,7 +99,7 @@ export class MenusComponent {
|
||||||
}).afterClosed().subscribe(() => this.search());
|
}).afterClosed().subscribe(() => this.search());
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteMenu(event: MouseEvent,menu: any): void {
|
deleteMenu(event: MouseEvent, menu: any): void {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.dialog.open(DeleteModalComponent, {
|
this.dialog.open(DeleteModalComponent, {
|
||||||
width: '300px',
|
width: '300px',
|
||||||
|
|
Loading…
Reference in New Issue