Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: TT-328 remove redundant pieces of code
  • Loading branch information
bytesantiago committed Sep 3, 2021
commit 30ad48e8dc47f2c4967744573fef896d9f704e68
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,14 @@ describe('TimeEntriesComponent', () => {
const currentDate = new Date();
currentDate.setSeconds(defaultSeconds);
currentDate.setMilliseconds(defaultSeconds);
const emptyDate = new Date(new Date().setHours(0, 0, 0, 0));
const lastEntry = {
description: 'testing is fun',
technologies: [],
uri: 'http://testing.is.fun',
activity_id: 'sss',
project_id: 'id',
start_date: currentDate,
end_date: emptyDate
end_date: currentDate
};
state.timeEntriesDataSource.data = [lastEntry];
mockEntriesSelector = store.overrideSelector(getTimeEntriesDataSource, state.timeEntriesDataSource);
Expand Down
3 changes: 1 addition & 2 deletions src/app/modules/time-entries/pages/time-entries.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,14 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
const currentDate = new Date();
currentDate.setSeconds(defaultSeconds);
currentDate.setMilliseconds(defaultSeconds);
const emptyDate = new Date(new Date().setHours(0, 0, 0, 0));
const entry = {
description: dataToUse.description ? dataToUse.description : '',
technologies: dataToUse.technologies ? dataToUse.technologies : [],
uri: dataToUse.uri ? dataToUse.uri : '',
activity_id: dataToUse.activity_id,
project_id: dataToUse.project_id,
start_date: currentDate,
end_date: emptyDate
end_date: currentDate
};
this.entry = entry;
}
Expand Down