shilomagen / passport-extension

MIT License
131 stars 23 forks source link

[Feature] Schedule appointment within a specific date range #18

Closed yair-dana closed 1 year ago

yair-dana commented 1 year ago

Description

This PR adds a new feature to the system which allows users to schedule appointments within a specific date range. 1) The default start date is set to today's date, but users can now choose their own start date. 2) The date format has been fixed to conform to the Israeli format of DD-MM-YYYY.

Open Question

There is a decision to be made on how to implement this feature - either by calling the MyVisit service with the updated Start Date, or by filtering the dates after they have been fetched from the service. (For now- both approaches are implemented) My concern is that the startDate functionality may not be properly implemented on the MyVisit side. WDYT?

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

This PR adds more unit tests and an RTL driver to improve the testing capabilities of the BOT. The unit tests check the Date functionality (isBefore/isAfter/isDateInRange), while the RTL driver and multiple tests cover the DateRangePicker component. These additions will increase the reliability of the system, ensuring a better user experience and reducing the risk of issues in the future.

Checklist:

yair-dana commented 1 year ago

Hi @shilomagen , I made the changes following the review. I also handle some edge case related to storage: when you set a start/end date and after a few days those dates are not valid (dates that already pass). in this case, we should generate the default dates.

WDYT following my open question? There is a decision to be made on how to implement this feature - either by calling the MyVisit service with the updated Start Date, or by filtering the dates after they have been fetched from the service. (For now- both approaches are implemented) My concern is that the startDate functionality may not be properly implemented on the MyVisit side.

Thanks!