Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: enrollments can expire #1989

Merged
merged 18 commits into from
Apr 2, 2024
Merged

Feat: enrollments can expire #1989

merged 18 commits into from
Apr 2, 2024

Commits on Apr 1, 2024

  1. refactor(enrollment): check for existing group funding source first

    this is instead of catching the 409 response code
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    33b0efc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0ee7251 View commit details
    Browse the repository at this point in the history
  3. feat(settings): app time zone is America/Los_Angeles

    see https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-TIME_ZONE
    
    > Note that this isn’t necessarily the time zone of the server.
    > When USE_TZ is True, this is the default time zone that Django will use to display datetimes in templates
    > and to interpret datetimes entered in forms.
    thekaveman authored and angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    0e6b8a9 View commit details
    Browse the repository at this point in the history
  4. feat: implement expiration date calculation

    use `django.utils.timezone` for access to the TIME_ZONE setting.
    
    the business logic is to set the expiration date as midnight in Pacific
    Time of the (N+1)th day, where N is the value of `expiration_days`.
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    245d484 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6ae8416 View commit details
    Browse the repository at this point in the history
  6. feat: implement scenario - supports expiration, but no expiration

    this is an unlikely but possible scenario
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    2be2891 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1757d3b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    df49eea View commit details
    Browse the repository at this point in the history
  9. feat: implement helper function to indicate being within reenrollment

    also add view test for this scenario
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    d43a265 View commit details
    Browse the repository at this point in the history
  10. chore: raise error for a scenario that cannot be implemented yet

    we want to remove the expiration date for the scenario of expiration is
    not supported and yet there is an expiration date.
    
    this functionality has not been implemented in cal-itp/littlepay, nor
    have we confirmed that it is possible
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    4fa50a7 View commit details
    Browse the repository at this point in the history
  11. feat: implement scenario - supports expiration, not expired yet

    leave view function and template for #1921 to implement
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    768e3ea View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    945e4c0 View commit details
    Browse the repository at this point in the history
  13. test: make assertion about expiry date more specific

    we know that we should be using the value from session.enrollment_expiry
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    25f6d38 View commit details
    Browse the repository at this point in the history
  14. refactor(view): remove potentially misleading variables

    use the specific condition that is leading to the branch of code, which
    namely is if the concession expiry is None or not.
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    77bb1f8 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f39d909 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b9caeed View commit details
    Browse the repository at this point in the history
  17. refactor(view): remove unnecessary log statements

    similar to what was done in 5666973
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    86ea118 View commit details
    Browse the repository at this point in the history
  18. refactor(view): consolidate sending analytics event into success view

    this removes the need for any helper function
    angela-tran committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    8cb5e33 View commit details
    Browse the repository at this point in the history