Please provide a summary of the change and the issue fixed. Please include relevant context. List dependency changes.
Replace (completely) application payment page with shopping cart page
Introduce all shopping cart features (filter, select/deselect, remove, add, pay for multiple applications)
Filter shopping cart based on persona (permit applicant, company admin, staff)
Update application lifecycle and actions
Add basic change tracking to locate and update stale shopping cart items (via warning modals), and show which items have been modified (possibly elsewhere)
Derive total payment amount based on selected cart items (instead of previous application duration)
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
[x] Login as company admin, and first thing you should see is the shopping cart icon in the header with total items already in the cart (for the company). After creating an application, you have the option of adding it to the cart or proceed with checkout, both of which will add the item to the cart (reflected by updated cart count in the header). Checkout or clicking on the shopping cart icon will show the shopping cart page, with applications currently added to the company's shopping cart.
[x] Inside the shopping cart page, you should be able to select/deselect any cart items as needed, and the corresponding total fee should match the total fees of the cart items selected. Filtering between "All Applications" and "My applications" should display the correct corresponding applications in the cart (either all applications of the company and only the applications added personally by the user). Only staff and company admin should be able to see and use this filter, while the permit applicant should not.
[x] Removing item(s) from the shopping cart should work as intended, and clicking on the link of any of the items will bring about a dialog asking whether the user wants to remove the item from the cart before proceeding with editing. Continuing on this dialog will remove the item from the cart, and navigate to the application form page for editing.
[x] Paying for multiple selected permits should succeed, and behave just as with paying for a single application. Selecting no applications and proceeding to pay will result in a tooltip asking user to first select items before proceeding with payment.
[x] If user changes the filter or removes items from the cart (whenever cart items list changes), the remaining cart items will automatically be all selected. Upon entering the shopping cart page, the "All Applications" will be the default selection, and all items are initially selected.
Description
Please provide a summary of the change and the issue fixed. Please include relevant context. List dependency changes.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist
Further comments
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are promoted to: