Skip to content

Commit 0346b3a

Browse files
committed
fix: TT-29 identation-and-code-structure-corrections
1 parent 094fb76 commit 0346b3a

File tree

2 files changed

+39
-10
lines changed

2 files changed

+39
-10
lines changed

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

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<div class="table-responsive-sm">
2-
<table *ngIf="customers" class="table table-bordered table-striped mb-0" datatable [dtTrigger]="dtTrigger"
2+
<table
3+
*ngIf="customers"
4+
class="table table-bordered table-striped mb-0"
5+
datatable
6+
[dtTrigger]="dtTrigger"
37
[dtOptions]="dtOptions">
48
<thead class="thead-blue">
59
<tr class="d-flex">
@@ -14,10 +18,19 @@
1418
<td class="col-5 text-break">{{ customer.id }}</td>
1519
<td class="col-3 text-break">{{ customer.name }}</td>
1620
<td class="col-4 text-center">
17-
<button data-toggle="modal" data-target="#editModal" (click)="openEditModal(customer)" type="button" class="btn btn-sm btn-primary">
21+
<button
22+
data-toggle="modal"
23+
data-target="#editModal"
24+
(click)="openEditModal(customer)"
25+
type="button"
26+
class="btn btn-sm btn-primary">
1827
<i class="fa fa-pencil fa-xs"></i>
1928
</button>
20-
<button data-toggle="modal" data-target="#deleteModal" (click)="openModal(customer)" type="button"
29+
<button
30+
data-toggle="modal"
31+
data-target="#deleteModal"
32+
(click)="openModal(customer)"
33+
type="button"
2134
class="btn btn-sm btn-danger ml-2">
2235
<i class="fa fa-trash-alt fa-xs"></i>
2336
</button>
@@ -27,9 +40,25 @@
2740
</table>
2841
</div>
2942

30-
<app-dialog *ngIf="showModal" class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-hidden="true"
31-
[title]="'Delete Customer'" [body]="message" (closeModalEvent)="deleteCustomer()">
43+
<app-dialog
44+
*ngIf="showModal"
45+
class="modal fade"
46+
id="deleteModal"
47+
tabindex="-1"
48+
role="dialog"
49+
aria-hidden="true"
50+
[title]="'Delete Customer'"
51+
[body]="message"
52+
(closeModalEvent)="deleteCustomer()">
3253
</app-dialog>
33-
<app-dialog *ngIf="showModal" class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-hidden="true"
34-
[title]="'Edit Customer'" [body]="message" (closeModalEvent)="editCustomer()">
54+
<app-dialog
55+
*ngIf="showModal"
56+
class="modal fade"
57+
id="editModal"
58+
tabindex="-1"
59+
role="dialog"
60+
aria-hidden="true"
61+
[title]="'Edit Customer'"
62+
[body]="message"
63+
(closeModalEvent)="editCustomer()">
3564
</app-dialog>

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
@@ -111,13 +111,13 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit {
111111
this.message = `Are you sure you want to delete ${item.name}?`;
112112
this.showModal = true;
113113
}
114-
openEditModal(item: Customer) {
115-
if (this.showCustomerForm === true) {
114+
115+
openEditModal(item: Customer) {
116116
this.idToEdit = item.id;
117+
if (this.showCustomerForm === true) {
117118
this.message = `The changes will lose. Are you sure you change to customer ${item.name}?`;
118119
this.showModal = true;
119120
} else {
120-
this.idToEdit = item.id;
121121
this.editCustomer();
122122
}
123123
}

0 commit comments

Comments
 (0)