Added edit mode

This commit is contained in:
2026-09-19 21:53:10 +02:00
parent 9bb9260c09
commit d46a5f10af
8 changed files with 458 additions and 64 deletions

View File

@@ -10,6 +10,7 @@ const DAY = {
status: 'closed',
lunchType: 'restaurant',
restaurant: 'Le Relais',
startedTs: at('07:30'),
endedTs: at('17:30'),
};
@@ -39,6 +40,7 @@ describe('buildResume', () => {
it('keeps lunch out of the worked total', () => {
const r = buildResume(DAY, ENTRIES, 15);
expect(r.workedMs).toBe(9 * 60 * MINUTE); // 09h00 on site, lunch excluded
expect(r.totalMs).toBe(10 * 60 * MINUTE);
expect(r.lunch).toEqual({ type: 'restaurant', restaurant: 'Le Relais', ms: 60 * MINUTE });
});
@@ -91,7 +93,8 @@ describe('resumeToText', () => {
'',
'Déjeuner : restaurant (Le Relais), 1h00',
'',
'Total travaillé : 9h00',
'Travail hors repas : 9h00',
'Total journée (repas compris) : 10h00',
].join('\n'),
);
});