diff --git a/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.html b/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.html new file mode 100644 index 0000000..d257e70 --- /dev/null +++ b/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.html @@ -0,0 +1,24 @@ +
+ + + +
diff --git a/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.scss b/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.spec.ts b/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.spec.ts new file mode 100644 index 0000000..93e5dbd --- /dev/null +++ b/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EncuestaDeleteColaboratorDialogComponent } from './encuesta-delete-colaborator-dialog.component'; + +describe('EncuestaDeleteColaboratorDialogComponent', () => { + let component: EncuestaDeleteColaboratorDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [EncuestaDeleteColaboratorDialogComponent], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(EncuestaDeleteColaboratorDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.ts b/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.ts new file mode 100644 index 0000000..6b5be08 --- /dev/null +++ b/src/main/webapp/app/entities/encuesta/encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component.ts @@ -0,0 +1,26 @@ +import { Component, OnInit } from '@angular/core'; + +import { IUsuarioEncuesta } from '../../usuario-encuesta/usuario-encuesta.model'; +import { UsuarioEncuestaService } from '../../usuario-encuesta/service/usuario-encuesta.service'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'jhi-encuesta-delete-colaborator-dialog', + templateUrl: './encuesta-delete-colaborator-dialog.component.html', + styleUrls: ['./encuesta-delete-colaborator-dialog.component.scss'], +}) +export class EncuestaDeleteColaboratorDialogComponent { + colaborador?: IUsuarioEncuesta; + + constructor(protected usuarioEncuestaService: UsuarioEncuestaService, protected activeModal: NgbActiveModal) {} + + cancel(): void { + this.activeModal.dismiss(); + } + + confirmDelete(id: number): void { + this.usuarioEncuestaService.delete(id).subscribe(() => { + this.activeModal.close('deleted'); + }); + } +} diff --git a/src/main/webapp/app/entities/encuesta/encuesta.module.ts b/src/main/webapp/app/entities/encuesta/encuesta.module.ts index c6740f1..47ffbbf 100644 --- a/src/main/webapp/app/entities/encuesta/encuesta.module.ts +++ b/src/main/webapp/app/entities/encuesta/encuesta.module.ts @@ -10,6 +10,7 @@ import { EncuestaPublishDialogComponent } from './encuesta-publish-dialog/encues import { EncuestaDeleteQuestionDialogComponent } from './encuesta-delete-question-dialog/encuesta-delete-question-dialog.component'; import { EncuestaDeleteOptionDialogComponent } from './encuesta-delete-option-dialog/encuesta-delete-option-dialog.component'; import { EncuestaCompartirDialogComponent } from './encuesta-compartir-dialog/encuesta-compartir-dialog.component'; +import { EncuestaDeleteColaboratorDialogComponent } from './encuesta-delete-colaborator-dialog/encuesta-delete-colaborator-dialog.component'; @NgModule({ imports: [SharedModule, EncuestaRoutingModule, FontAwesomeModule], @@ -22,6 +23,7 @@ import { EncuestaCompartirDialogComponent } from './encuesta-compartir-dialog/en EncuestaDeleteQuestionDialogComponent, EncuestaDeleteOptionDialogComponent, EncuestaCompartirDialogComponent, + EncuestaDeleteColaboratorDialogComponent, ], entryComponents: [EncuestaDeleteDialogComponent], }) diff --git a/src/main/webapp/app/entities/encuesta/update/encuesta-update.component.html b/src/main/webapp/app/entities/encuesta/update/encuesta-update.component.html index 2858a9a..e756162 100644 --- a/src/main/webapp/app/entities/encuesta/update/encuesta-update.component.html +++ b/src/main/webapp/app/entities/encuesta/update/encuesta-update.component.html @@ -13,25 +13,27 @@ >   
-
+
+
{{ colaborador.usuarioExtra.nombre }}
@@ -444,7 +446,7 @@