Gestión de Géneros
This commit is contained in:
0
src/app/pages/home-page/home-page.component.css
Normal file
0
src/app/pages/home-page/home-page.component.css
Normal file
39
src/app/pages/home-page/home-page.component.html
Normal file
39
src/app/pages/home-page/home-page.component.html
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
<div class="flex gap-2 p-6">
|
||||
<div class="w-2/3">
|
||||
<!-- name of each tab group should be unique -->
|
||||
<div class="tabs tabs-lift">
|
||||
<label class="tab">
|
||||
<input type="radio" name="tabTablas" [checked]="tablaSeleccionada === 'genders'" (click)="tablaSeleccionada = 'genders'"/>
|
||||
<div *ngIf="tablaSeleccionada !== 'genders'">
|
||||
<ng-icon name="bootstrapBookmarks" size="20" class="me-2 m-1"></ng-icon>
|
||||
</div>
|
||||
<div *ngIf="tablaSeleccionada == 'genders'">
|
||||
<ng-icon name="bootstrapBookmarksFill" size="20" class="me-2 m-1"></ng-icon>
|
||||
</div>
|
||||
Géneros
|
||||
</label>
|
||||
<div class="tab-content bg-base-100 border-base-300 p-6">
|
||||
<table-genders [filtro]="textoFiltro"></table-genders>
|
||||
</div>
|
||||
|
||||
<label class="tab">
|
||||
<input type="radio" name="tabTablas" [checked]="tablaSeleccionada === 'books'" (click)="tablaSeleccionada = 'books'"/>
|
||||
<div *ngIf="tablaSeleccionada !== 'books'">
|
||||
<ng-icon name="bootstrapBook" size="20" class="me-2 m-1"></ng-icon>
|
||||
</div>
|
||||
<div *ngIf="tablaSeleccionada === 'books'">
|
||||
<ng-icon name="bootstrapBookHalf" size="20" class="me-2 m-1"></ng-icon>
|
||||
</div>
|
||||
Libros
|
||||
</label>
|
||||
<div class="tab-content bg-base-100 border-base-300 p-6">
|
||||
<table-books></table-books>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider divider-horizontal"></div>
|
||||
<div class="w-1/3">
|
||||
<filter (filtro)="textoFiltro = $event"></filter>
|
||||
</div>
|
||||
</div>
|
||||
23
src/app/pages/home-page/home-page.component.spec.ts
Normal file
23
src/app/pages/home-page/home-page.component.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { HomePageComponent } from './home-page.component';
|
||||
|
||||
describe('HomePageComponent', () => {
|
||||
let component: HomePageComponent;
|
||||
let fixture: ComponentFixture<HomePageComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [HomePageComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(HomePageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
26
src/app/pages/home-page/home-page.component.ts
Normal file
26
src/app/pages/home-page/home-page.component.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { TableGendersComponent } from '../../components/table-genders/table-genders.component';
|
||||
import { TableBooksComponent } from '../../components/table-books/table-books.component';
|
||||
import { FilterComponent } from '../../components/filter/filter.component';
|
||||
import { NgIcon, provideIcons } from '@ng-icons/core';
|
||||
import { bootstrapBook, bootstrapBookHalf, bootstrapBookmarks, bootstrapBookmarksFill } from '@ng-icons/bootstrap-icons';
|
||||
import { NgIf } from '@angular/common';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-home-page',
|
||||
imports: [TableGendersComponent, TableBooksComponent, FilterComponent, NgIcon, NgIf],
|
||||
templateUrl: './home-page.component.html',
|
||||
styleUrl: './home-page.component.css',
|
||||
providers: [provideIcons({
|
||||
bootstrapBook,
|
||||
bootstrapBookHalf,
|
||||
bootstrapBookmarks,
|
||||
bootstrapBookmarksFill
|
||||
})]
|
||||
})
|
||||
export class HomePageComponent {
|
||||
tablaSeleccionada: string = 'genders';
|
||||
textoFiltro: string = '';
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user