Mike-Heneghan / ALISS

ALISS (A Local Information System for Scotland) is a service to help you find help and support close to you when you need it most.
https://aliss.org
0 stars 0 forks source link

Short term service feature. #130

Open Mike-Heneghan opened 4 years ago

Mike-Heneghan commented 4 years ago

Some users who add services to ALISS have given feedback that their services have predetermined end dates. This can be due to the availability of funding, staff or seasonal changes. For these users, they might find it challenging to go back and remove the service after it has been added.

Additionally, some services may come to an end but will start up again in the future and users don't want to have to delete and then later re-upload information regarding the service.

A potential solution to these related challenges could be to add a new column in the Service model which would store the end date. After this date, the services would be removed from the ElasticSearch index and would therefore not be searchable. Although preferably the data wouldn't be deleted.

If a user wants to reinstate or permanently add their service they could mark it as indefinite.

Need to consider how this can be implemented without adding unnecessary complexity.

Need to consider:

Mike-Heneghan commented 4 years ago

To implement one way could be:

Mike-Heneghan commented 4 years ago

The initial plan was to not add the end date to the elastic search index although this complicated matters. The current methods of filtering and ordering could be impacted and it might be easier to remain consistent with the current approach.

Mike-Heneghan commented 4 years ago

After issues filtering with Elasticsearch instead added the exclusion as a filter of the Service objects in the search View.

Mike-Heneghan commented 4 years ago
Mike-Heneghan commented 4 years ago

An issue with standard form validation expecting the date to be inputted in American format i.e. month before day. Need to set the DateTime field input format to allow UK date format to be validated.

Mike-Heneghan commented 4 years ago

Fixed the saving and validation of dates.

Need to improve the form to hide the short term service content behind a question.

Mike-Heneghan commented 4 years ago

Adding a checkbox for short term service which then renders the inputs.

Mike-Heneghan commented 4 years ago

If a service has start date and end date of None.

Tooltip to explain feature.

Screenshot 2020-01-14 at 17 33 05

When the checkbox is selected

Form validation

Datepicker expans on click of input.

Screenshot 2020-01-14 at 17 33 55
Mike-Heneghan commented 4 years ago

May need to split the start and end dates as is the start date is left blank it will default to the current date.

Mike-Heneghan commented 4 years ago

Added further test coverage to ensure the form can be submitted with a start and end date on creation and update of a service. Also tested that validation stops users from adding services with an end which is less than three days after the start date.

Mike-Heneghan commented 4 years ago

Still to complete: