Skip to content

Commit ccf7136

Browse files
authored
fix: TT-138 The table users does not adapt to mobile screens (#632)
* fix: TT-138 The table users does not adapt to mobile screens * fix: TT-138 delete space
1 parent 767487a commit ccf7136

File tree

1 file changed

+40
-38
lines changed

1 file changed

+40
-38
lines changed
Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
1-
<table
2-
*ngIf="users"
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">User Email</th>
11-
<th class="col-5">Names</th>
12-
<th class="col-3">Roles</th>
13-
</tr>
14-
</thead>
15-
<app-loading-bar *ngIf="isLoading$ | async"></app-loading-bar>
16-
<tbody>
17-
<tr class="d-flex" *ngFor="let user of users">
18-
<td class="col-4">{{ user.email }}</td>
19-
<td class="col-5">{{ user.name }}</td>
20-
<td class="col-3 text-center">
21-
<div>
22-
<ui-switch
23-
size="small"
24-
(change)="switchRole(user.id, user.roles, 'admin', 'time-tracker-admin')"
25-
[checked]="user.roles.includes('time-tracker-admin')"
26-
></ui-switch>
27-
admin
28-
<ui-switch
29-
size="small"
30-
(change)="switchRole(user.id, user.roles, 'test', 'time-tracker-tester')"
31-
[checked]="user.roles.includes('time-tracker-tester')"
32-
></ui-switch>
33-
test
34-
</div>
35-
</td>
36-
</tr>
37-
</tbody>
38-
</table>
1+
<div class="table-responsive">
2+
<table
3+
*ngIf="users"
4+
class="table table-sm 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 flex-wrap">
11+
<th class="col-4">User Email</th>
12+
<th class="col-5">Names</th>
13+
<th class="col-3">Roles</th>
14+
</tr>
15+
</thead>
16+
<app-loading-bar *ngIf="isLoading$ | async"></app-loading-bar>
17+
<tbody>
18+
<tr class="d-flex flex-wrap" *ngFor="let user of users">
19+
<td class="col-4 text-break">{{ user.email }}</td>
20+
<td class="col-5 text-break">{{ user.name }}</td>
21+
<td class="col-3 text-center">
22+
<div>
23+
<ui-switch
24+
size="small"
25+
(change)="switchRole(user.id, user.roles, 'admin', 'time-tracker-admin')"
26+
[checked]="user.roles.includes('time-tracker-admin')"
27+
></ui-switch>
28+
admin
29+
<ui-switch
30+
size="small"
31+
(change)="switchRole(user.id, user.roles, 'test', 'time-tracker-tester')"
32+
[checked]="user.roles.includes('time-tracker-tester')"
33+
></ui-switch>
34+
test
35+
</div>
36+
</td>
37+
</tr>
38+
</tbody>
39+
</table>
40+
</div>

0 commit comments

Comments
 (0)