Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy comment from previous week's timesheet #157

Merged
1 commit merged into from
Jul 8, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jul 8, 2021

Changes

Make it possible for previous week's comment to be carried over when copying the week's timesheet

Related issues

#130

Added

Action that retrives a single timesheet based on employee and interval, and stores it to previousTimeSheet in store.
The more generic action would override the currently created timesheet with the old values, including the status. Rewriting it to match the new usecase risks breaking functionality, so I went with extending to a more specific scenario.

Changed

useTimesheets.ts #copyPreviousWeek now dispatches an event to retrieve previous timesheet. The #message is updated previousTImesheet alongside timesheet updates.

How to test

Fill in a week including a message.
Copy the week's values into a new timesheet
Note the comment persists into the new timesheet too.

Fill in a week without a message
Copy the week's values into a new timesheet
Note the comment empty.

@ghost ghost merged commit 391a61b into develop Jul 8, 2021
@italoteix italoteix deleted the feature/copy-message-previous-week branch July 30, 2021 06:50
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants