You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a service has a duration of less than 1 minute, the JavaScript function calculating the end time doesn't account for seconds. This results in the end time being identical to the start time, triggering a validation error in the Django model.
Problem:
Service duration is set to less than 1 minute (e.g., 30 seconds)
JavaScript rounds down to 0 minutes when calculating end time
Start time and end time are the same
Django model validation fails, preventing appointment creation
Proposed solutions:
Update JavaScript to handle seconds in duration calculation
Pros: More precise, allows for very short services
Cons: Requires changes to frontend logic and possibly UI
Set a minimum service duration of 1 minute
Pros: Simple to implement, prevents edge case entirely
Cons: Limits flexibility for very short services
Next steps:
Decide on preferred solution
Implement chosen solution
Update tests to cover this edge case
Update documentation if minimum duration is enforced
This issue affects the usability of the system for very short services and should be addressed to ensure proper functionality across all service durations.
But seriously, I'd love to hear from someone who has a service duration of less than a minute...use case etc.
This issue is open to anyone who wants to implement it.
The text was updated successfully, but these errors were encountered:
Currently, when a service has a duration of less than 1 minute, the JavaScript function calculating the end time doesn't account for seconds. This results in the end time being identical to the start time, triggering a validation error in the Django model.
Problem:
Proposed solutions:
Update JavaScript to handle seconds in duration calculation
Set a minimum service duration of 1 minute
Next steps:
This issue affects the usability of the system for very short services and should be addressed to ensure proper functionality across all service durations.
But seriously, I'd love to hear from someone who has a service duration of less than a minute...use case etc.
This issue is open to anyone who wants to implement it.
The text was updated successfully, but these errors were encountered: