Skip to content

Commit 691bf66

Browse files
jr-98scastillo-jp
andauthored
fix: TT-139 Reduce the left margin on customers page (#631)
* fix: TT-139 Reduce the left margin on coutome page * fix: TT-139-Reduce-the-left-margin-on-the-customer-page * fix: TT-139 Resolved the cometaries on GitHub about identation and bootstrap * fix: TT-139 delete line white Co-authored-by: Sandro Castillo <[email protected]>
1 parent a4064ca commit 691bf66

File tree

4 files changed

+47
-44
lines changed

4 files changed

+47
-44
lines changed

src/app/modules/activities-management/components/activity-list/activity-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<tr class="d-flex">
55
<th class="col-4">Activity ID</th>
66
<th class="col-5">Activity</th>
7-
<th class="col-3 text-center"></th>
7+
<th class="col-3 text-center">Options</th>
88
</tr>
99
</thead>
1010
<app-loading-bar *ngIf="(isLoading$ | async)"></app-loading-bar>

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

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,45 @@
1-
<table
2-
*ngIf="customers"
3-
class="table table-sm table-bordered table-striped mb-0"
4-
datatable
5-
[dtTrigger]="dtTrigger"
6-
[dtOptions]="dtOptions"
7-
>
8-
<thead class="thead-blue">
9-
<tr class="d-flex">
10-
<th class="col-4">Customer ID</th>
11-
<th class="col-5">Name</th>
12-
<th class="col-3 text-center">Options</th>
13-
</tr>
14-
</thead>
15-
<app-loading-bar *ngIf="(isLoading$ | async)"></app-loading-bar>
16-
<tbody *ngIf="((isLoading$ | async) === false)">
17-
<tr class="d-flex" *ngFor="let customer of customers">
18-
<td class="col-sm-4">{{ customer.id }}</td>
19-
<td class="col-sm-5">{{ customer.name }}</td>
20-
<td class="col-sm-3 text-center">
21-
<button
22-
(click)="editCustomer(customer.id)"
23-
type="button"
24-
class="btn btn-sm btn-primary"
25-
>
26-
<i class="fa fa-pencil fa-xs"></i>
27-
</button>
28-
<button
29-
data-toggle="modal"
30-
data-target="#deleteModal"
31-
(click)="openModal(customer)"
32-
type="button"
33-
class="btn btn-sm btn-danger ml-2"
34-
>
35-
<i class="fa fa-trash-alt fa-xs"></i>
36-
</button>
37-
</td>
38-
</tr>
39-
</tbody>
40-
</table>
1+
<div class="table-responsive-sm">
2+
<table
3+
*ngIf="customers"
4+
class="table table-bordered table-striped mb-0"
5+
datatable
6+
[dtTrigger]="dtTrigger"
7+
[dtOptions]="dtOptions"
8+
>
9+
<thead class="thead-blue">
10+
<tr class="d-flex">
11+
<th class="col-5 text-center">Customer ID</th>
12+
<th class="col-3 text-center">Name</th>
13+
<th class="col-4 text-center">Options</th>
14+
</tr>
15+
</thead>
16+
<app-loading-bar *ngIf="(isLoading$ | async)"></app-loading-bar>
17+
<tbody *ngIf="((isLoading$ | async) === false)">
18+
<tr class="d-flex" *ngFor="let customer of customers">
19+
<td class="col-5 text-break">{{ customer.id }}</td>
20+
<td class="col-3 text-break">{{ customer.name }}</td>
21+
<td class="col-4 text-center">
22+
<button
23+
(click)="editCustomer(customer.id)"
24+
type="button"
25+
class="btn btn-sm btn-primary"
26+
>
27+
<i class="fa fa-pencil fa-xs"></i>
28+
</button>
29+
<button
30+
data-toggle="modal"
31+
data-target="#deleteModal"
32+
(click)="openModal(customer)"
33+
type="button"
34+
class="btn btn-sm btn-danger ml-2"
35+
>
36+
<i class="fa fa-trash-alt fa-xs"></i>
37+
</button>
38+
</td>
39+
</tr>
40+
</tbody>
41+
</table>
42+
</div>
4143

4244
<app-dialog
4345
*ngIf="showModal"

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit {
4040

4141
ngOnInit(): void {
4242
this.dtOptions = {
43-
scrollY: '290px',
43+
scrollY: '325px',
4444
paging: false,
45+
responsive: true,
4546
};
4647
this.loadCustomersSubscription = this.actionsSubject$
4748
.pipe(filter((action: any) => action.type === CustomerManagementActionTypes.LOAD_CUSTOMERS_SUCCESS))
4849
.subscribe((action) => {
4950
this.customers = action.payload;
5051
this.rerenderDataTable();
5152
});
52-
5353
this.changeCustomerSubscription = this.actionsSubject$
5454
.pipe(
5555
filter(
@@ -109,4 +109,5 @@ export class CustomerListComponent implements OnInit, OnDestroy, AfterViewInit {
109109
this.message = `Are you sure you want to delete ${item.name}?`;
110110
this.showModal = true;
111111
}
112+
112113
}

src/app/modules/customer-management/pages/customer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="container">
1+
<div class="container-fluid px-0 full-height">
22
<div class="row">
33
<div style="padding: 15px;">
44
<button (click)="activateCustomerForm()" class="btn btn-primary">Add new customer</button>

0 commit comments

Comments
 (0)