Skip to content

Commit f94c2c7

Browse files
committed
fix: TT-290 removal code smell second part
1 parent 750dc17 commit f94c2c7

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/app/modules/shared/components/dropdown/dropdown.component.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2-
import { ActivityFront, CustomerUI, ProjectUI } from '../../models';
3-
42
import { DropdownComponent } from './dropdown.component';
53

64
describe('DropdownComponent', () => {
75
let component: DropdownComponent;
86
let fixture: ComponentFixture<DropdownComponent>;
9-
let fakeInfo: ActivityFront | CustomerUI | ProjectUI;
7+
let fakeInfo: any;
108

119
beforeEach(waitForAsync(() => {
1210
TestBed.configureTestingModule({

src/app/modules/shared/components/dropdown/dropdown.component.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { Output, Component, EventEmitter, Input, OnInit } from '@angular/core';
2-
import { ActivityFront } from '../../models/activity.model';
3-
import { CustomerUI } from '../../models/customer.model';
4-
import { ProjectUI } from '../../models/project.model';
2+
53

64
@Component({
75
selector: 'app-dropdown',
@@ -11,9 +9,9 @@ import { ProjectUI } from '../../models/project.model';
119
export class DropdownComponent implements OnInit {
1210

1311
@Input() info: any;
14-
@Output() updateInfo: EventEmitter<ActivityFront | CustomerUI | ProjectUI> = new EventEmitter();
12+
@Output() updateInfo: EventEmitter<any> = new EventEmitter();
1513

16-
dataChange: ActivityFront | CustomerUI | ProjectUI = {
14+
dataChange: any = {
1715
id: '',
1816
name: '',
1917
description: '',
@@ -32,7 +30,7 @@ export class DropdownComponent implements OnInit {
3230

3331
ngOnInit(): void {}
3432

35-
changePropertiesItem(item: ActivityFront | CustomerUI | ProjectUI){
33+
changePropertiesItem(item: any){
3634
if (item.btnName === 'Active'){
3735
this.dataChange.btnName = 'Inactive';
3836
this.dataChange.btnIcon = item.btnIcon;
@@ -45,7 +43,7 @@ export class DropdownComponent implements OnInit {
4543

4644
}
4745

48-
changeOperation(item: ActivityFront | CustomerUI | ProjectUI){
46+
changeOperation(item: any){
4947
this.updateInfo.emit(item);
5048

5149
}

0 commit comments

Comments
 (0)