Skip to content

Commit 1215f18

Browse files
committed
refactor: TT-477 change of name of variable
1 parent 59968ce commit 1215f18

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ describe('CustomerTableListComponent', () => {
281281
it('changeStatus should set inactive whan active', () => {
282282

283283
component.changeStatus();
284-
expect(component.status === 'inactive');
284+
expect(component.statusToEdit === 'inactive');
285285
});
286286

287287

src/app/modules/customer-management/components/customer-info/components/customer-list/customer-list.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit {
4040
showModal = false;
4141
idToDelete: string;
4242
idToEdit: string;
43-
status: string;
43+
statusToEdit: string;
4444
currentCustomerIdToEdit: string;
4545
message: string;
4646
isLoading$: Observable<boolean>;
@@ -171,7 +171,7 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit {
171171

172172
openModal(item: Customer) {
173173
this.idToDelete = item.id;
174-
this.status = item.status;
174+
this.statusToEdit = item.status;
175175
this.message = `Are you sure you want to disable ${item.name}?`;
176176
this.showModal = true;
177177
}
@@ -196,7 +196,7 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit {
196196
}
197197

198198
changeStatus(): void{
199-
this.store.dispatch(new UnarchiveCustomer(this.idToDelete, this.changeOppositeStatus(this.status)));
199+
this.store.dispatch(new UnarchiveCustomer(this.idToDelete, this.changeOppositeStatus(this.statusToEdit)));
200200
}
201201

202202
}

0 commit comments

Comments
 (0)