Skip to content

Commit 946f0c1

Browse files
authored
Merge pull request #475 from ioet/397-display-time-in-out
fix: #397 display time-in and time-out columns
2 parents f7fcc5c + 5f8336f commit 946f0c1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<th class="col md-col">User email</th>
88
<th class="col sm-col">Date</th>
99
<th class="col sm-col">Duration (hours)</th>
10+
<th class="col sm-col">Time in</th>
11+
<th class="col sm-col">Time out</th>
1012
<th class="col md-col">Project</th>
1113
<th class="col lg-col">Project ID</th>
1214
<th class="col md-col">Customer</th>
@@ -26,6 +28,8 @@
2628
<td class="col md-col multiline-col"> {{ entry.owner_email }} </td>
2729
<td class="col sm-col"> {{ entry.start_date | date: 'MM/dd/yyyy' }} </td>
2830
<td class="col sm-col"> {{ entry.end_date | substractDate: entry.start_date }} </td>
31+
<td class="col sm-col"> {{ entry.start_date | date: 'HH:mm' }} </td>
32+
<td class="col sm-col"> {{ entry.end_date | date: 'HH:mm' }} </td>
2933
<td class="col md-col"> {{ entry.project_name }} </td>
3034
<td class="col md-col"> {{ entry.project_id }} </td>
3135
<td class="col md-col"> {{ entry.customer_name }} </td>

src/app/modules/time-clock/services/entry.service.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ import * as moment from 'moment';
1010
describe('EntryService', () => {
1111
let service: EntryService;
1212
let httpMock: HttpTestingController;
13-
let datePipe: DatePipe;
1413

1514
beforeEach(() => {
1615
TestBed.configureTestingModule({imports: [HttpClientTestingModule], providers: [DatePipe]});
1716
service = TestBed.inject(EntryService);
1817
httpMock = TestBed.inject(HttpTestingController);
19-
datePipe = TestBed.inject(DatePipe);
2018
service.baseUrl = 'time-entries';
2119
});
2220

src/app/modules/time-clock/store/entry.selectors.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export const getCreateError = createSelector(getEntryState, (state: EntryState)
1717
});
1818

1919
export const getUpdateError = createSelector(getEntryState, (state: EntryState) => {
20-
return state.updateError;
20+
if (state) {
21+
return state.updateError;
22+
}
2123
});
2224
export const getStatusMessage = createSelector(getEntryState, (state: EntryState) => state.message);
2325

0 commit comments

Comments
 (0)