Skip to content

Commit b26c0a6

Browse files
committed
changed pipe function
1 parent 2a535f7 commit b26c0a6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
{{ entry.start_date | date: 'MM/dd/yyyy' }}
4040
</td>
4141
<td class="col sm-col">
42-
{{ durationAsFloat(entry) }}
42+
{{ entry.end_date | substractDate: entry.start_date }}
4343
</td>
4444
<td class="col x-sm-col">{{ dateTimeOffset.parseDateTimeOffset(entry.start_date, entry.timezone_offset) }}</td>
4545
<td class="col x-sm-col">{{ dateTimeOffset.parseDateTimeOffset(entry.end_date, entry.timezone_offset) }}</td>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,3 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
183183
return this.resultSumEntriesSelected;
184184
}
185185
}
186-

src/app/modules/shared/pipes/substract-date/substract-date.pipe.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export class SubstractDatePipe implements PipeTransform {
3535
const hours = this.formatTime(duration.hours() + daysInHours);
3636
const minutes = this.formatTime(duration.minutes());
3737
const seconds = lessThanMinute ? `:${this.formatTime(duration.seconds())}` : '';
38-
return `${hours}:${minutes}${seconds}`;
38+
const duration_hours = duration.asHours()
39+
return duration_hours.toString();
3940
}
4041

4142
formatTime(time: number): string {

0 commit comments

Comments
 (0)