Skip to content
Snippets Groups Projects
Commit 4b51cb0a authored by OZGCloud's avatar OZGCloud
Browse files

OZG-7006 fix hide form handling

Sub task: OZG-7177
parent 8477b2c2
Branches
Tags
No related merge requests found
...@@ -92,16 +92,6 @@ describe('ExterneFachstelleContainerComponent', () => { ...@@ -92,16 +92,6 @@ describe('ExterneFachstelleContainerComponent', () => {
}); });
}); });
describe('ngOnDestroy', () => {
it('should call hideForm', () => {
component.hideForm = jest.fn();
component.ngOnDestroy();
expect(component.hideForm).toHaveBeenCalled();
});
});
describe('hideForm', () => { describe('hideForm', () => {
it('should call service to hide form', () => { it('should call service to hide form', () => {
component.hideForm(); component.hideForm();
......
...@@ -27,10 +27,6 @@ export class ExterneFachstelleContainerComponent { ...@@ -27,10 +27,6 @@ export class ExterneFachstelleContainerComponent {
this.isFormVisible$ = this.service.isExterneFachstelleFormVisible(); this.isFormVisible$ = this.service.isExterneFachstelleFormVisible();
} }
ngOnDestroy(): void {
this.hideForm();
}
public hideForm(): void { public hideForm(): void {
this.service.hideExterneFachstelleForm(); this.service.hideExterneFachstelleForm();
this.formService.reset(); this.formService.reset();
......
...@@ -92,16 +92,6 @@ describe('OrganisationsEinheitContainerComponent', () => { ...@@ -92,16 +92,6 @@ describe('OrganisationsEinheitContainerComponent', () => {
}); });
}); });
describe('ngOnDestroy', () => {
it('should call hideForm', () => {
component.hideForm = jest.fn();
component.ngOnDestroy();
expect(component.hideForm).toHaveBeenCalled();
});
});
describe('hideForm', () => { describe('hideForm', () => {
it('should call service to hide form', () => { it('should call service to hide form', () => {
component.hideForm(); component.hideForm();
......
import { CollaborationListResource } from '@alfa-client/collaboration-shared'; import { CollaborationListResource } from '@alfa-client/collaboration-shared';
import { VorgangWithEingangLinkRel, VorgangWithEingangResource } from '@alfa-client/vorgang-shared'; import { VorgangWithEingangLinkRel, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { CollaborationService } from 'libs/collaboration-shared/src/lib/collaboration.service'; import { CollaborationService } from 'libs/collaboration-shared/src/lib/collaboration.service';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { CollaborationRequestFormService } from '../../collaboration-request-form/collaboration.request.formservice'; import { CollaborationRequestFormService } from '../../collaboration-request-form/collaboration.request.formservice';
...@@ -10,7 +10,7 @@ import { CollaborationRequestFormService } from '../../collaboration-request-for ...@@ -10,7 +10,7 @@ import { CollaborationRequestFormService } from '../../collaboration-request-for
templateUrl: './organisations-einheit-container.component.html', templateUrl: './organisations-einheit-container.component.html',
providers: [CollaborationRequestFormService], providers: [CollaborationRequestFormService],
}) })
export class OrganisationsEinheitContainerComponent implements OnInit, OnDestroy { export class OrganisationsEinheitContainerComponent implements OnInit {
@Input() public vorgang: VorgangWithEingangResource; @Input() public vorgang: VorgangWithEingangResource;
@Input() public collaborationListResource: CollaborationListResource; @Input() public collaborationListResource: CollaborationListResource;
...@@ -27,10 +27,6 @@ export class OrganisationsEinheitContainerComponent implements OnInit, OnDestroy ...@@ -27,10 +27,6 @@ export class OrganisationsEinheitContainerComponent implements OnInit, OnDestroy
this.isFormVisible$ = this.service.isOrganisationsEinheitFormVisible(); this.isFormVisible$ = this.service.isOrganisationsEinheitFormVisible();
} }
ngOnDestroy(): void {
this.hideForm();
}
public hideForm(): void { public hideForm(): void {
this.service.hideOrganisationseinheitForm(); this.service.hideOrganisationseinheitForm();
this.formService.reset(); this.formService.reset();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment