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
Next Next commit
fix: TT-20 difference hours
  • Loading branch information
wobravo committed Apr 17, 2021
commit 2292e8bb9f0b31ff78fb9ac87135cfe5332a7ab3
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@
</div>
</div>

<div class="form-group row">
<label class="col-12 col-sm-2">Total Hours:</label>
<div class="col-12 col-sm-4">
<span>

</span>
</div>
</div>

<app-technologies
(technologyAdded)="onTechnologiesUpdated($event)"
(technologyRemoved)="onTechnologiesUpdated($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
this.end_date.setValue($event);
}

getTimeDifference(){
const horainico = this.start_hour.value;
const horafinal = this.end_hour.value;
console.log(horainico + ' ' + horafinal);
const ab = moment(horainico, 'HH:mm');
const ac = moment(horafinal, 'HH:mm');
console.error(moment.duration(ab.diff(ac)).humanize());
const diff = [moment.duration(ab.diff(ac)).humanize()];
return diff;
}

ngOnChanges(): void {
this.goingToWorkOnThis = this.entryToEdit ? this.entryToEdit.running : false;
this.shouldRestartEntry = false;
Expand Down