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:
Eduardo Quiros 2021-07-14 19:40:25 -06:00
parent e983ad3ea9
commit e3e9bb1fc5
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
5 changed files with 1 additions and 109 deletions

View File

@ -1,14 +1,13 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { SharedModule } from 'app/shared/shared.module'; import { SharedModule } from 'app/shared/shared.module';
import { CategoriaComponent } from './list/categoria.component'; import { CategoriaComponent } from './list/categoria.component';
import { CategoriaDetailComponent } from './detail/categoria-detail.component';
import { CategoriaUpdateComponent } from './update/categoria-update.component'; import { CategoriaUpdateComponent } from './update/categoria-update.component';
import { CategoriaDeleteDialogComponent } from './delete/categoria-delete-dialog.component'; import { CategoriaDeleteDialogComponent } from './delete/categoria-delete-dialog.component';
import { CategoriaRoutingModule } from './route/categoria-routing.module'; import { CategoriaRoutingModule } from './route/categoria-routing.module';
@NgModule({ @NgModule({
imports: [SharedModule, CategoriaRoutingModule], imports: [SharedModule, CategoriaRoutingModule],
declarations: [CategoriaComponent, CategoriaDetailComponent, CategoriaUpdateComponent, CategoriaDeleteDialogComponent], declarations: [CategoriaComponent, CategoriaUpdateComponent, CategoriaDeleteDialogComponent],
entryComponents: [CategoriaDeleteDialogComponent], entryComponents: [CategoriaDeleteDialogComponent],
}) })
export class CategoriaModule {} export class CategoriaModule {}

View File

@ -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>&nbsp;<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>&nbsp;<span jhiTranslate="entity.action.edit">Edit</span>
</button>
</div>
</div>
</div>

View File

@ -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 }));
});
});
});
});

View File

@ -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();
}
}

View File

@ -3,7 +3,6 @@ import { RouterModule, Routes } from '@angular/router';
import { UserRouteAccessService } from 'app/core/auth/user-route-access.service'; import { UserRouteAccessService } from 'app/core/auth/user-route-access.service';
import { CategoriaComponent } from '../list/categoria.component'; import { CategoriaComponent } from '../list/categoria.component';
import { CategoriaDetailComponent } from '../detail/categoria-detail.component';
import { CategoriaUpdateComponent } from '../update/categoria-update.component'; import { CategoriaUpdateComponent } from '../update/categoria-update.component';
import { CategoriaRoutingResolveService } from './categoria-routing-resolve.service'; import { CategoriaRoutingResolveService } from './categoria-routing-resolve.service';
@ -13,14 +12,6 @@ const categoriaRoute: Routes = [
component: CategoriaComponent, component: CategoriaComponent,
canActivate: [UserRouteAccessService], canActivate: [UserRouteAccessService],
}, },
{
path: ':id/view',
component: CategoriaDetailComponent,
resolve: {
categoria: CategoriaRoutingResolveService,
},
canActivate: [UserRouteAccessService],
},
{ {
path: 'new', path: 'new',
component: CategoriaUpdateComponent, component: CategoriaUpdateComponent,