Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</div>
</div>

<div class="form-group row">
<div class="form-group row" >
<label class="col-12 col-sm-2">Date in:</label>
<div class="col-12 col-sm-4">
<input
Expand Down Expand Up @@ -107,6 +107,7 @@
formControlName="start_hour"
id="start_hour"
class="timepicker-input"
[defaultTime]="'00:00'"
[class.timepicker-input--disabled]="!(project_id.value && project_name.value)"
></ngx-timepicker-field>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/shared/models/entry.model.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface Entry {
running?: boolean;
id?: string;
start_date: Date;
start_date?: Date;
end_date?: Date;
activity_id?: string;
technologies?: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ describe('TimeEntriesComponent', () => {
uri: 'http://testing.is.fun',
activity_id: 'sss',
project_id: 'id',
start_date: new Date(new Date().setHours(0, 0, 0, 0)),
start_date: component.canMarkEntryAsWIP ? new Date() : new Date(new Date().setHours(0, 0, 0, 0)),
end_date: new Date(new Date().setHours(0, 0, 0, 0))
};
state.timeEntriesDataSource.data = [lastEntry];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
uri: dataToUse.uri ? dataToUse.uri : '',
activity_id: dataToUse.activity_id,
project_id: dataToUse.project_id,
start_date: startDate,
start_date: this.canMarkEntryAsWIP ? new Date() : startDate,
end_date: startDate
Copy link
Contributor

@jase156 jase156 Jun 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should change constant's the name of the startDate to endDate for better readability.

};
this.entry = entry;
Expand Down