Eliminar modulo de vista de categorias
Este modulo no esta en uso. Por lo que es mejor eliminarlo para evitar que se acumule mucho codigo muerto.
This commit is contained in:
parent
e983ad3ea9
commit
e3e9bb1fc5
|
@ -1,14 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from 'app/shared/shared.module';
|
||||
import { CategoriaComponent } from './list/categoria.component';
|
||||
import { CategoriaDetailComponent } from './detail/categoria-detail.component';
|
||||
import { CategoriaUpdateComponent } from './update/categoria-update.component';
|
||||
import { CategoriaDeleteDialogComponent } from './delete/categoria-delete-dialog.component';
|
||||
import { CategoriaRoutingModule } from './route/categoria-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule, CategoriaRoutingModule],
|
||||
declarations: [CategoriaComponent, CategoriaDetailComponent, CategoriaUpdateComponent, CategoriaDeleteDialogComponent],
|
||||
declarations: [CategoriaComponent, CategoriaUpdateComponent, CategoriaDeleteDialogComponent],
|
||||
entryComponents: [CategoriaDeleteDialogComponent],
|
||||
})
|
||||
export class CategoriaModule {}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<div *ngIf="categoria">
|
||||
<h2 data-cy="categoriaDetailsHeading"><span jhiTranslate="dataSurveyApp.categoria.detail.title">Categoria</span></h2>
|
||||
|
||||
<hr />
|
||||
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
|
||||
<jhi-alert></jhi-alert>
|
||||
|
||||
<dl class="row-md jh-entity-details">
|
||||
<dt><span jhiTranslate="global.field.id">ID</span></dt>
|
||||
<dd>
|
||||
<span>{{ categoria.id }}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="dataSurveyApp.categoria.nombre">Nombre</span></dt>
|
||||
<dd>
|
||||
<span>{{ categoria.nombre }}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="dataSurveyApp.categoria.estado">Estado</span></dt>
|
||||
<dd>
|
||||
<span jhiTranslate="{{ 'dataSurveyApp.EstadoCategoria.' + categoria.estado }}">{{ categoria.estado }}</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<button type="submit" (click)="previousState()" class="btn btn-ds btn-info" data-cy="entityDetailsBackButton">
|
||||
<fa-icon icon="arrow-left"></fa-icon> <span jhiTranslate="entity.action.back">Back</span>
|
||||
</button>
|
||||
|
||||
<button type="button" [routerLink]="['/categoria', categoria.id, 'edit']" class="btn btn-ds btn-ds-primary btn-primary">
|
||||
<fa-icon icon="pencil-alt"></fa-icon> <span jhiTranslate="entity.action.edit">Edit</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,38 +0,0 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
import { CategoriaDetailComponent } from './categoria-detail.component';
|
||||
|
||||
describe('Component Tests', () => {
|
||||
describe('Categoria Management Detail Component', () => {
|
||||
let comp: CategoriaDetailComponent;
|
||||
let fixture: ComponentFixture<CategoriaDetailComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [CategoriaDetailComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: ActivatedRoute,
|
||||
useValue: { data: of({ categoria: { id: 123 } }) },
|
||||
},
|
||||
],
|
||||
})
|
||||
.overrideTemplate(CategoriaDetailComponent, '')
|
||||
.compileComponents();
|
||||
fixture = TestBed.createComponent(CategoriaDetailComponent);
|
||||
comp = fixture.componentInstance;
|
||||
});
|
||||
|
||||
describe('OnInit', () => {
|
||||
it('Should load categoria on init', () => {
|
||||
// WHEN
|
||||
comp.ngOnInit();
|
||||
|
||||
// THEN
|
||||
expect(comp.categoria).toEqual(expect.objectContaining({ id: 123 }));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,24 +0,0 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { ICategoria } from '../categoria.model';
|
||||
|
||||
@Component({
|
||||
selector: 'jhi-categoria-detail',
|
||||
templateUrl: './categoria-detail.component.html',
|
||||
})
|
||||
export class CategoriaDetailComponent implements OnInit {
|
||||
categoria: ICategoria | null = null;
|
||||
|
||||
constructor(protected activatedRoute: ActivatedRoute) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.activatedRoute.data.subscribe(({ categoria }) => {
|
||||
this.categoria = categoria;
|
||||
});
|
||||
}
|
||||
|
||||
previousState(): void {
|
||||
window.history.back();
|
||||
}
|
||||
}
|
|
@ -3,7 +3,6 @@ import { RouterModule, Routes } from '@angular/router';
|
|||
|
||||
import { UserRouteAccessService } from 'app/core/auth/user-route-access.service';
|
||||
import { CategoriaComponent } from '../list/categoria.component';
|
||||
import { CategoriaDetailComponent } from '../detail/categoria-detail.component';
|
||||
import { CategoriaUpdateComponent } from '../update/categoria-update.component';
|
||||
import { CategoriaRoutingResolveService } from './categoria-routing-resolve.service';
|
||||
|
||||
|
@ -13,14 +12,6 @@ const categoriaRoute: Routes = [
|
|||
component: CategoriaComponent,
|
||||
canActivate: [UserRouteAccessService],
|
||||
},
|
||||
{
|
||||
path: ':id/view',
|
||||
component: CategoriaDetailComponent,
|
||||
resolve: {
|
||||
categoria: CategoriaRoutingResolveService,
|
||||
},
|
||||
canActivate: [UserRouteAccessService],
|
||||
},
|
||||
{
|
||||
path: 'new',
|
||||
component: CategoriaUpdateComponent,
|
||||
|
|
Loading…
Reference in New Issue