-
Notifications
You must be signed in to change notification settings - Fork 0
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
[#138] Fix request history visibility and add status field #142
Conversation
Updates request serializers and components to surface the new 'status' field on food requests. This allows filtering requests by open/closed status and displaying the current status directly in request lists for clearer visibility of request lifecycles.
This change updates the requests list component to pre-filter requests client-side rather than server-side. It initializes an in-memory filtered requests store and recomputes visibility on mount instead of refetching on every status change. This avoids unnecessary round trips to the server while still keeping the UI updated reactively. It also adds documentation to explain the authentication flow.
PR Review
|
@@ -29,6 +29,7 @@ class Meta: | |||
"date_requested", | |||
"safe_drop_agree", | |||
"safe_drop_instructions", | |||
"status", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing "status" from read_only_fields
in FoodRequestUpdateSerializer
if the status is intended to be updated by the user or through the API. This change allows the status field to be updated when necessary. [important]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not meant to be updatable via the API. Only by logic in our code.
@@ -9,7 +9,16 @@ const props = defineProps<{ | |||
cta?: Boolean | |||
}>() | |||
|
|||
// A list of all the users in your account including their name, title, email and role. | |||
const visibleRequests = ref(props.requests || []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement server-side filtering for the requests based on their status to improve performance and scalability. This approach reduces the client-side workload and ensures the application can handle a large number of requests efficiently. [important]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using this approach for quicker prototyping while we gather the initial feedback from users.
@@ -78,7 +78,7 @@ dependencies: | |||
specifier: ^3.2.5 | |||
version: 3.2.5 | |||
vue: | |||
specifier: ^3.4.21 | |||
specifier: ^3.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the downgrade of Vue from ^3.4.21
to ^3.4.0
is intentional and tested for compatibility with the project's dependencies. Unintended downgrades can introduce bugs or compatibility issues. [important]
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
CI Failure Feedback(Checks updated until commit 39bf1cf)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
See more information about the |
Signed-off-by: Delano <1206+delano@users.noreply.github.com>
This pull request fixes the visibility of the request history and adds a new 'status' field to track the status of requests. It improves the requests list component to pre-filter requests client-side, avoiding unnecessary server round trips. Additionally, it updates the request serializers and components to surface the new 'status' field. This PR addresses issue #138.