-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed