Skip to content

Commit

Permalink
feat: add hours as float to the csv export
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelRauber committed Sep 5, 2024
1 parent 970505a commit b20bc2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/settings/settings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class SettingsComponent {
const startDay = today.minus({ day: days });
const items = await firstValueFrom(this.timeTable.groupByDay$(startDay.toMillis(), today.toMillis()));
const rows = [
['Date', 'Start Time', 'End Time', 'Duration', 'Is A Day Off?', 'Is a non work day?', 'description'],
['Date', 'Start Time', 'End Time', 'Duration', 'Duration (float)', 'Is A Day Off?', 'Is a non work day?', 'description'],
...items.flatMap(item => [
...item.items.map(timeEntry => [
DateTime.fromMillis(item.utcDate).toISODate(),
Expand All @@ -70,6 +70,7 @@ export default class SettingsComponent {
extendedZone: false,
}),
millisecondsToHumanReadable(timeEntry.duration.toMillis()),
timeEntry.duration.shiftTo('hours').hours,
timeEntry.isADayOff,
timeEntry.isNonWorkday,
timeEntry.description,
Expand Down

0 comments on commit b20bc2f

Please sign in to comment.