Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class CreateCustomerComponent implements OnInit, OnDestroy {

setDataToUpdate(customerData: Customer) {
if (customerData) {
this.changeValueAreTabsActives.emit(true);
this.customerForm.setValue({
name: customerData.name,
description: customerData.description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
>
<app-create-customer
[areTabsActive]="areTabsActive"
(changeValueAreTabsActives)="areTabsActive = $event"
(changeValueAreTabsActives)="activeTabs($event)"
></app-create-customer>
</div>
<div class="tab-pane fade mt-3" id="projects" role="tabpanel" aria-labelledby="projects-tab">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ describe('ManagmentCustomerProjectsComponent', () => {
it('component should be created', () => {
expect(component).toBeTruthy();
});

it('should be enable tabs', () => {
component.areTabsActive = false;
component.activeTabs(true);
setTimeout(() => {
expect(component.areTabsActive).toBeTrue();
}, 1);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { Component } from '@angular/core';
styleUrls: ['./management-customer-projects.component.scss'],
})
export class ManagementCustomerProjectsComponent {
areTabsActive = false;
areTabsActive: boolean;

constructor() {}

activeTabs($areTabsActive: boolean) {
setTimeout(() => this.areTabsActive = $areTabsActive, 1);
}
}