Update index.html
1 file changed+4−2
index.html+4−2View file
| @@ -2679,12 +2679,14 @@ | ||
| state.timesheet_days = state.timesheet_days.filter(d => d.timesheetId !== currentTsId); | ||
| // Append active days that are worked or have details | ||
| activeEditorDays.forEach(d => { | ||
| - if (d.worked || d.details || d.meetingDurationMinutes > 0) { | ||
| + const amount = d.workAmount !== undefined && d.workAmount !== null ? Number(d.workAmount) : (d.worked ? 1.0 : 0); | ||
| + if (amount > 0 || d.details || (d.meetingDurationMinutes || 0) > 0) { | ||
| state.timesheet_days.push({ | ||
| _id: 'day_' + Math.random().toString(36).substring(2, 10), | ||
| timesheetId: currentTsId, | ||
| date: d.date, | ||
| - worked: !!d.worked, | ||
| + workAmount: amount, | ||
| + worked: amount > 0, | ||
| details: d.details || '', | ||
| meetingDurationMinutes: d.meetingDurationMinutes || 0 | ||
| }); | ||