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

Add calendar view to appointments #760

Closed
jkleinsc opened this issue Oct 20, 2016 · 10 comments
Closed

Add calendar view to appointments #760

jkleinsc opened this issue Oct 20, 2016 · 10 comments
Labels
in progress indicates that issue/pull request is currently being worked on

Comments

@jkleinsc
Copy link
Member

We need to add a calendar view. This calendar view should support a weekly view and a daily view.
Like the appointment search (/appointments/search), you should be able to filter on:
Doctor
Type
Location

On the calendar the following items should display with a link to appointment details:

First Name
Last Name
Doctor to be seen

@jkleinsc jkleinsc added Appointments help wanted indicates that an issue is open for contributions labels Oct 20, 2016
@ghost
Copy link

ghost commented Nov 3, 2016

I can take this one if nobody minds.

@jkleinsc jkleinsc added in progress indicates that issue/pull request is currently being worked on and removed help wanted indicates that an issue is open for contributions labels Nov 3, 2016
@jkleinsc
Copy link
Member Author

jkleinsc commented Nov 3, 2016

It's yours @BogdanAlexandru.

@garylm
Copy link

garylm commented Nov 16, 2016

Date Format Question: Since a lot of countries use a date format of DD/MM/YYYY vs MM/DD/YYYY should the format be an option/setting?

@jkleinsc
Copy link
Member Author

@garylm HospitalRun uses Moment.js to do date formatting, in particular we use the locale formatting options available. See http://momentjs.com/docs/#/displaying/format/, in particular the subsection there titled "Localized formats".

@ghost
Copy link

ghost commented Nov 18, 2016

Info on progress:

Pic

You can find a .gif with messed up colors showing it live here: http://imgur.com/a5rILVu
Not shown in the gif, but can be done: clicking on an appointment to edit it.

I've used FullCalendar. As far as features are concerned, the only thing left to do is filtering (location filter missing right now). Plenty left in the testing and polishing area though.

A neat thing to add I think would be double-clicking a day in the calendar to start a new appointment creation at that day, but this feels like a good candidate for a separate issue (the PR for this is already growing big).

Will be back with a WIP PR soon.

@garylm
Copy link

garylm commented Nov 19, 2016

So.... Does this imply there will be a 'calendar date format' setting?

@jkleinsc
Copy link
Member Author

@garylm there doesn't need to be a calendar date format setting. Moment.js' localized format allows us to display dates localized to the user's locale.

@garylm
Copy link

garylm commented Nov 21, 2016

So how do we set the user's locale?

@jkleinsc
Copy link
Member Author

@garylm I was under the impression that momentjs automatically set the user's locale based on the user's browser using navigator.language (https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language), but it turns out that we need to add code to do that, eg:

moment.locale(navigator.language.toLowerCase());

@garylm
Copy link

garylm commented Nov 24, 2016

The reason I was asking is that I have spent the last 3 months in Europe and I have yet to have any web form default to the European date format.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in progress indicates that issue/pull request is currently being worked on
Projects
None yet
Development

No branches or pull requests

2 participants