Skip to content

Commit 033b96d

Browse files
committed
fix: TT-144 Responsive all tables
1 parent d467356 commit 033b96d

File tree

7 files changed

+23
-18
lines changed

7 files changed

+23
-18
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<div class="activity-list">
2-
<table class="table table-sm table-bordered table-striped">
2+
<table class="table table-responsive-sm table-bordered table-striped">
33
<thead class="thead-blue">
44
<tr class="d-flex">
5-
<th class="col-4">Activity ID</th>
6-
<th class="col-5">Activity</th>
5+
<th class="col-4 text-center">Activity ID</th>
6+
<th class="col-5 text-center">Activity</th>
77
<th class="col-3 text-center">Options</th>
88
</tr>
99
</thead>
1010
<app-loading-bar *ngIf="(isLoading$ | async)"></app-loading-bar>
1111
<tbody *ngIf="(isLoading$ | async) === false">
1212
<tr class="d-flex" *ngFor="let activity of activities">
13-
<td class="col-sm-4">{{ activity.id }}</td>
14-
<td class="col-sm-5">{{ activity.name }}</td>
15-
<td class="col-sm-3 text-center">
13+
<td class="col-4 text-break">{{ activity.id }}</td>
14+
<td class="col-5 ">{{ activity.name }}</td>
15+
<td class="col-3 text-center">
1616
<button
1717
type="button"
1818
class="btn btn-sm btn-primary"

src/app/modules/reports/components/time-entries-table/time-entries-table.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="row mt-5">
2-
<div class="col">
2+
<div class="table-responsive-sm">
33
<table
4-
class="table table-sm table-striped"
4+
class="table table-sm table-striped mb-0"
55
datatable
66
[dtTrigger]="dtTrigger"
77
[dtOptions]="dtOptions"

src/app/modules/reports/components/time-entries-table/time-entries-table.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@
2626
.hidden-col{
2727
display: none;
2828
}
29+
.table.dataTable th,
30+
.table.dataTable td {
31+
box-sizing: border-box;
32+
width: auto;
33+
}

src/app/modules/reports/components/time-entries-table/time-entries-table.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import { getReportDataSource } from '../../../time-clock/store/entry.selectors';
1717
})
1818
export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewInit {
1919
dtOptions: any = {
20-
scrollY: '600px',
20+
scrollY: '590px',
21+
scrollX: '500px',
2122
paging: false,
2223
dom: 'Bfrtip',
2324
buttons: [

src/app/modules/reports/components/time-range-form/time-range-form.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<form [formGroup]="reportForm" (ngSubmit)="onSubmit()">
2-
32
<div class="form-group row">
43
<label class="col-12 col-md-2 col-form-label my-1">Start date:</label>
54
<div class="col-12 col-sm-6 col-md-3 my-1">

src/app/modules/time-entries/pages/time-entries.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<th class="col">Customer</th>
2626
<th class="col">Project</th>
2727
<th class="col">Activity</th>
28-
<th class="col"></th>
28+
<th class="col">Options</th>
2929
</tr>
3030
</thead>
3131
<app-loading-bar *ngIf="dataSource.isLoading"></app-loading-bar>

src/app/modules/time-entries/pages/time-entries.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
128128
if (dataToUse && this.isNewEntry()) {
129129
const startDate = new Date(new Date().setHours(0, 0, 0, 0));
130130
const entry = {
131-
description : dataToUse.description ? dataToUse.description : '',
132-
technologies : dataToUse.technologies ? dataToUse.technologies : [],
133-
uri : dataToUse.uri ? dataToUse.uri : '',
134-
activity_id : dataToUse.activity_id,
135-
project_id : dataToUse.project_id,
136-
start_date : startDate,
137-
end_date : startDate
131+
description: dataToUse.description ? dataToUse.description : '',
132+
technologies: dataToUse.technologies ? dataToUse.technologies : [],
133+
uri: dataToUse.uri ? dataToUse.uri : '',
134+
activity_id: dataToUse.activity_id,
135+
project_id: dataToUse.project_id,
136+
start_date: startDate,
137+
end_date: startDate
138138
};
139139
this.entry = entry;
140140
}

0 commit comments

Comments
 (0)