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

Fix timer stop #155

Merged
merged 5 commits into from
Nov 5, 2024
Merged

Fix timer stop #155

merged 5 commits into from
Nov 5, 2024

Conversation

CuddlyBunion341
Copy link
Contributor

@CuddlyBunion341 CuddlyBunion341 commented Nov 4, 2024

This PR addresses the tracky issue where stopping a timer session with empty end_time would not finish the session.

Todo

@CuddlyBunion341 CuddlyBunion341 self-assigned this Nov 4, 2024
return render_js(:update, :unprocessable_entity) unless @current_timer_session.update(timer_params)
updated_params = timer_params

updated_params[:timer_end] = user_time_zone.now.asctime if updated_params[:timer_end].blank?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be moved into the model perhaps?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not nicely possible, because a timer session without end time is valid, right?

destroy : Destroy Session
destroy --> Cancel : Cancel Timer
Cancel --> [*] : Return Cancel
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terminology doesn't seem correct yet on a first glance. Let's bring it on an correct it in a separate PR. I find the graph useful. Let's discuss this in person.

return render_js(:update, :unprocessable_entity) unless @current_timer_session.update(timer_params)
updated_params = timer_params

updated_params[:timer_end] = user_time_zone.now.asctime if updated_params[:timer_end].blank?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not nicely possible, because a timer session without end time is valid, right?

@schmijos schmijos merged commit fe471ed into main Nov 5, 2024
1 check passed
@schmijos schmijos deleted the feature/fix-timer-stop branch November 5, 2024 07:27
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