Skip to content

Commit 265d90c

Browse files
author
Juan Gabriel Guzman
committed
feat: #310 Improving css on the eport page
1 parent 98c65c0 commit 265d90c

File tree

12 files changed

+67
-71
lines changed

12 files changed

+67
-71
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
@@ -1,6 +1,6 @@
11
<div class="activity-list">
22
<table class="table table-sm table-bordered table-striped">
3-
<thead class="thead-orange">
3+
<thead class="thead-blue">
44
<tr class="d-flex">
55
<th class="col-9">Activity</th>
66
<th class="col-3 text-center"></th>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<table *ngIf="customers" class="table table-sm table-bordered table-striped mb-0" datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions">
2-
<thead class="thead-orange">
2+
<thead class="thead-blue">
33
<tr class="d-flex">
44
<th class="col-9">Name</th>
55
<th class="col-3 text-center">Options</th>

src/app/modules/customer-management/components/projects-type/components/project-type-list/project-type-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="project-type-list-div">
22
<table class="table table-sm table-bordered table-striped">
3-
<thead class="thead-orange">
3+
<thead class="thead-blue">
44
<tr class="d-flex">
55
<th class="col-9">Project type</th>
66
<th class="col-3 text-center"></th>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="project-list">
22
<table class="table table-sm table-bordered table-striped">
3-
<thead class="thead-orange">
3+
<thead class="thead-blue">
44
<tr class="d-flex">
55
<th class="col-9">Project</th>
66
<th class="col-3 text-center"></th>
Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
<div class="container-flex m-5">
2-
<table class="table table-sm table-striped mb-0" datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions">
3-
<thead class="thead-orange">
4-
<tr class="d-flex">
5-
<th class="col md-col">Date</th>
6-
<th class="col sm-col">Duration</th>
7-
<th class="col md-col">Project</th>
8-
<th class="col md-col">Ticket</th>
9-
<th class="col lg-col" >Description</th>
10-
<th class="col lg-col">Technologies</th>
11-
</tr>
12-
</thead>
13-
<tbody>
14-
<tr
15-
class="d-flex"
16-
*ngFor="let entry of data"
17-
>
18-
<td class="col md-col"> {{ entry.start_date | date: 'dd/MM/yyyy' }} </td>
19-
<td class="col sm-col"> {{ entry.end_date | substractDate: entry.start_date }} </td>
20-
<td class="col md-col"> {{ entry.project_name }} </td>
21-
<td class="col md-col"> {{ entry.uri }} </td>
22-
<td class="col lg-col multiline-col"> {{ entry.description }} </td>
23-
<td class="col lg-col multiline-col"> {{ entry.technologies }} </td>
24-
</tr>
25-
</tbody>
26-
</table>
1+
<div class="row mt-5">
2+
<div class="col">
3+
<table class="table table-sm table-striped" datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions">
4+
<thead class="thead-blue">
5+
<tr class="d-flex">
6+
<th class="col md-col">Date</th>
7+
<th class="col sm-col">Duration</th>
8+
<th class="col md-col">Project</th>
9+
<th class="col md-col">Ticket</th>
10+
<th class="col lg-col">Description</th>
11+
<th class="col lg-col">Technologies</th>
12+
</tr>
13+
</thead>
14+
<tbody>
15+
<tr
16+
class="d-flex"
17+
*ngFor="let entry of data"
18+
>
19+
<td class="col md-col"> {{ entry.start_date | date: 'dd/MM/yyyy' }} </td>
20+
<td class="col sm-col"> {{ entry.end_date | substractDate: entry.start_date }} </td>
21+
<td class="col md-col"> {{ entry.project_name }} </td>
22+
<td class="col md-col"> {{ entry.uri }} </td>
23+
<td class="col lg-col multiline-col"> {{ entry.description }} </td>
24+
<td class="col lg-col multiline-col"> {{ entry.technologies }} </td>
25+
</tr>
26+
</tbody>
27+
</table>
28+
</div>
2729
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.lg-col{
10-
min-width: 20em;
10+
width: 15em;
1111
}
1212

1313
.multiline-col{
Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
<div class="container-flex">
2-
<form [formGroup]="reportForm" (ngSubmit)="onSubmit()">
3-
<div class="row">
4-
<div class="col">
5-
<div class="input-group">
6-
<app-input-label text="Start Date"></app-input-label>
7-
<app-input-date formControlName="startDate" required="true"></app-input-date>
8-
</div>
9-
</div>
10-
<div class="col">
11-
<div class="input-group">
12-
<app-input-label text="End Date"></app-input-label>
13-
<app-input-date formControlName="endDate" required="true"></app-input-date>
14-
</div>
1+
<form [formGroup]="reportForm" (ngSubmit)="onSubmit()">
2+
<div class="row">
3+
<div class="col">
4+
<div class="input-group">
5+
<app-input-label text="Start Date"></app-input-label>
6+
<app-input-date formControlName="startDate" required="true"></app-input-date>
157
</div>
168
</div>
17-
<div class="row">
18-
<div class="col">
19-
<button type="submit" class="btn btn-primary float-right"
20-
[disabled]="!(reportForm.touched && reportForm.valid)">Search
21-
</button>
9+
<div class="col">
10+
<div class="input-group">
11+
<app-input-label text="End Date"></app-input-label>
12+
<app-input-date formControlName="endDate" required="true"></app-input-date>
2213
</div>
2314
</div>
24-
</form>
25-
</div>
15+
</div>
16+
<div class="row mt-3">
17+
<div class="col">
18+
<button type="submit" class="btn btn-primary float-right"
19+
[disabled]="!(reportForm.touched && reportForm.valid)">Search
20+
</button>
21+
</div>
22+
</div>
23+
</form>
24+
2625

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<div class="w-100">
2-
<app-time-range-form></app-time-range-form>
3-
<app-time-entries-table></app-time-entries-table>
4-
</div>
1+
<app-time-range-form></app-time-range-form>
2+
<app-time-entries-table></app-time-entries-table>
3+

src/app/modules/reports/pages/reports.component.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ describe('ReportsComponent', () => {
3636
fixture.detectChanges();
3737

3838
const compile = fixture.debugElement.nativeElement;
39-
const div = compile.querySelector('div');
4039
const reportForm = compile.querySelector('app-time-range-form');
4140
const reportDataTable = compile.querySelector('app-time-entries-table');
42-
expect(div).toBeTruthy();
4341
expect(reportForm).toBeTruthy();
4442
expect(reportDataTable).toBeTruthy();
4543
}));

src/app/modules/time-clock/store/entry.effects.spec.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,14 @@ describe('TimeEntryActionEffects', () => {
4848
});
4949

5050
it('When the service fails, then LOAD_ENTRIES_BY_TIME_RANGE_FAIL should be triggered', async () => {
51-
const timeRange: TimeEntriesTimeRange = {start_date: new Date(), end_date: new Date()};
52-
actions$ = of({type: EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE, timeRange});
53-
const serviceSpy = spyOn(service, 'loadEntriesByTimeRange');
54-
serviceSpy.and.throwError('error getting time entries');
55-
56-
effects.loadEntriesByTimeRange$.subscribe(action => {
57-
expect(action.type).toEqual(EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE_FAIL);
58-
});
59-
60-
expect(service.loadEntriesByTimeRange).toHaveBeenCalledWith(timeRange);
51+
const timeRange: TimeEntriesTimeRange = {start_date: new Date(), end_date: new Date()};
52+
actions$ = of({type: EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE, timeRange});
53+
const serviceSpy = spyOn(service, 'loadEntriesByTimeRange');
54+
serviceSpy.and.throwError('error getting time entries');
55+
56+
effects.loadEntriesByTimeRange$.subscribe(action => {
57+
expect(action.type).toEqual(EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE_FAIL);
58+
});
6159
});
6260

6361
// TODO Implement the remaining unit tests for the other effects.

0 commit comments

Comments
 (0)