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/barcode v2 #4732

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft

Feat/barcode v2 #4732

wants to merge 21 commits into from

Conversation

r0xsh
Copy link
Member

@r0xsh r0xsh commented Nov 8, 2024

This PR Includes

  • New Methods: Added assignTo(User) and unassign() methods to the Delivery entity.
  • Updated Behavior for /api/tasks/:id/{un}assign Endpoints:
    • ⚠️ The {un}assign endpoints now apply to the entire delivery if the task is linked to one. Initially, I considered adding separate methods on the Delivery entity endpoint, but decided against it to maintain data integrity directly via a single endpoint.
  • Barcodes Added to the Following Screens:
    • Dispatch Task Modal
    • Dispatch & Local Commerce Deliveries Lists
    • Dispatch & Local Commerce Delivery Details Screen
  • Improvements to /api/barcode Endpoint:
    • To enhance UI responsiveness, I adopted a more RPC-oriented approach in designing this endpoint.

To Be Completed

  • Add authentication to BarcodeController methods (consider using a Voter)
  • UI/UX adjustments
  • Documentation updates for users
  • Testing

@r0xsh r0xsh marked this pull request as draft November 12, 2024 17:30
This changes the behavior of the endpoint if the task is linked to a delivery.
Instead of only assigning the task in question, the entire delivery is assigned.
This may be less compliant with REST principles, but leaving it as it was without
any validation would have allowed clients to assign a delivery to different riders.
This change is related to the previous commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The barcodes URL should be non-guessable, insert HashId or something like this in the URL
1 participant