Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Appointment by default shouldn't be 'all day' #831

Closed
marcorosas1991 opened this issue Dec 1, 2016 · 5 comments
Closed

Appointment by default shouldn't be 'all day' #831

marcorosas1991 opened this issue Dec 1, 2016 · 5 comments
Labels
🚀enhancement an issue/pull request that adds a feature to the application

Comments

@marcorosas1991
Copy link
Contributor

Expected behavior:
The 'all day' option should not be ticked by default. Most of the time appointments have a defined length.

Actual behavior:
The 'all day' option is ticked when the new appointment form is open.

Steps to reproduce:
Click Appointments > + add appointment.
See 'all day' option.

Screenshots (if applicable):
screen shot 2016-11-30 at 9 20 15 pm

OS and Browser:
Chrome Version 54.0.2840.98 (64-bit)
MacOS 10.12.1

@jkleinsc
Copy link
Member

jkleinsc commented Dec 1, 2016

@marcorosas1991 I think it depends upon context/preference. In some use cases the desired default will be all day appointments; in other cases exact times will be needed. The only thing I would suggest is an enhancement to allow this to be configurable.

@jkleinsc jkleinsc added the 🚀enhancement an issue/pull request that adds a feature to the application label Dec 1, 2016
@jkleinsc
Copy link
Member

@marcorosas1991 I was looking at something with appointments and I realized something:
I think the intention was that All Day would be on for Admission type appointments and off for other types of appointments, but I think this line was incorrectly coded:
https://github.com/HospitalRun/hospitalrun-frontend/blob/master/app/appointments/edit/controller.js#L76

@mqchau
Copy link
Contributor

mqchau commented Dec 13, 2016

I plan to revamp that function isAdmissionAppointment because it is causing a bug on appointment edit page. That bug was raised in #815. Maybe after that it solves this issue too.

@jkleinsc
Copy link
Member

@mqchau I don't mind if you take a look at this, but right now I am tackling an issue in appointments caused by the migration to Ember 2.10 - unless you already have a solution for this problem! Basically what I am seeing is that there are some observers in https://github.com/HospitalRun/hospitalrun-frontend/blob/master/app/appointments/edit/controller.js that don't play well with Ember 2.10. That code is used for appointments that are not multi day (eg anything but an Admission type visit). Those types of appointments are just supposed to display one date field and separate fields for start time and end time. I believe the solution is to move this logic/markup to a component.

@jkleinsc
Copy link
Member

@mqchau I ended fixing this a part of my refactor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚀enhancement an issue/pull request that adds a feature to the application
Projects
None yet
Development

No branches or pull requests

3 participants