You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task will focus on adding sorting to some tables in pages that are already made including the Programs page, Single Program Page, and Archived Programs page matching the Figma. You will also be editing the /invoices/total endpoint to account for total adjustment with a booking_id.
Sorting for Tables
It might be helpful to create components for the sorting modals and then apply to each table/page. For example, the Programs page and Archived Programs page both use similar sorting modals.
Create the modals for each page listed on the Figma and match any design/icons necessary. Make the corresponding filtering fucntionality with the displayed table information.
Create the modals for the sort in /lpa/client/src/components/filters/ProgramFilter.jsx, /lpa/client/src/components/filters/DateFilter.jsx, etc...
Editing /invoices/total Endpoint
Currently, the endpoint calculates the current total of the entire invoice, taking into consideration multiple adjustments and comments.
Previously, for the adjustment_types, we implemented:
total
Applied to the entire invoice
Increases or decreases the total cost of the entire invoice
Use: adding $20 off or charging $5 for cleaning fees
rate_flat
Applied to EITHER a booking, OR the invoice itself
If applied to a booking, it is still tied to the invoice, but only applied to the booking
Increases or decreases the flat rate of the room associated with EITHER the booking or all bookings of the invoice
Use: giving the payee $10 off the room rate for the month or giving them $5 off for one booking because the room was dirty
rate_percent
Same as rate_flat, but applies a percent value to the original room rate
paid ( not used here )
Increases or decreases how much was paid by the payee for this invoice
Now, we want to add a slight change to total:
If the adjustment is total AND there is a booking_id associated with it, we want to apply the adjustment_value to the booking itself (previously total didn't account for booking_id)
Increases or decreases the total cost of the booking itself
Use: adding $10 or deducting $5 for that one session
Add this edit to the endpoint
You can reference this Issue if you'd like to understand more and learn about the invoices/total endpoint in detail.
Acceptance Criteria
Sorting Modals and Functionality for all pages
Programs page /home
Single Program page /programs/:id
Archived Programs page /programs/archived
Updated invoices/total endpoint to reflect the adjustment with total and booking_id associated with it
Tested the endpoint after changes
The text was updated successfully, but these errors were encountered:
This task will focus on adding sorting to some tables in pages that are already made including the Programs page, Single Program Page, and Archived Programs page matching the Figma. You will also be editing the
/invoices/total
endpoint to account fortotal
adjustment with a booking_id.Sorting for Tables
Create the modals for the sort in
/lpa/client/src/components/filters/ProgramFilter.jsx
,/lpa/client/src/components/filters/DateFilter.jsx
, etc...Editing
/invoices/total
EndpointCurrently, the endpoint calculates the current total of the entire invoice, taking into consideration multiple adjustments and comments.
Previously, for the adjustment_types, we implemented:
Now, we want to add a slight change to total:
You can reference this Issue if you'd like to understand more and learn about the
invoices/total
endpoint in detail.Acceptance Criteria
/home
/programs/:id
/programs/archived
invoices/total
endpoint to reflect the adjustment withtotal
and booking_id associated with itThe text was updated successfully, but these errors were encountered: