-
Notifications
You must be signed in to change notification settings - Fork 51
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
Lalith team filter development Backend #3281
base: development
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
I followed steps as instructed, didn't get the filter details after saving it. Please check video for the reference. I had tried with the both development branch & your current branch for backend and checked into your branch in frontend, still not able to see the filter saved.
I am seeing an error, attached in the screenshot.
I've logged in as administrator. If am not following the process correctly, please mention it clearly in the setup process. Else, check the logic if it is working in admin/owner account or not.
video2578041659.mp4
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.
@sampantangi @rnavyaprabha Can you check out the lalith_team_filter_development branch from HighestGoodNetworkApp repo and lalith_tem_filter_dev branch from HGN REST repo and test it out. Please do let me know if you still get 404. @rnavyaprabha can you show me the particula error in the inspect network tab |
Check1.1.2.mp4@rnavyaprabha @sampantangi |
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.
I checked out the mentioned branch for both the frontend and backend, ran npm install, and started the server and frontend application. I followed the testing steps outlined in the description and the attached video. Logged in as an admin user and attempted to save a filter, but the filter was not being saved as expected (as demonstrated in the video below). Additionally, a 404 error appears in the console, which may indicate an issue with the API endpoint or request handling. Requesting changes to address these issues in the logic before proceeding with the merge.
PR.3281.mp4
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.
Hey, I have followed your instructions and got the app to work as expected. As an admin user, the Create, update, and delete filter works as per expectations.
Navigating to Weekly Summaries:
I would suggest adding a warning or acknowledgement when updating or deleting a filter. I can see how the features works, but an user may not find it easy.
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.
I did checked in the Admin account and able add the filters and delete them with no issues as far.
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.
Changes look good for me. The functionality is working as expected
Description
Added a filter to the weekly summary report, allowing only admins and owners to create or edit filters. All other users can only view and use the filters.
Related PRs (if applicable):
OneCommunityGlobal/HGNRest#1274
Key Changes:
Filter Creation & Storage: Allows saving selected groups as filters, which are stored in the database.
Edit & Delete Permissions: Filters can only be edited or deleted by admins and owners.
Access Control: Admins and owners can create, edit, and delete filters, while all other users can only view and apply them.
How to Test:
Login as an Admin or Owner.
Navigate to Reports: Click on the "Reports" button in the navigation bar and select the "Weekly Summary Report."
Create a Filter:
Use the dropdown to select groups for filtering.
Once selected, the "Save Filter" button will appear. Click it to save the filter.
Edit a Filter:
Click on the filter you want to modify.
Make the necessary changes and click "Update Filter" to save the updates.
Delete a Filter:
Select the filter you want to remove.
Click the "Delete Filter" button to delete it.
https://github.com/user-attachments/assets/c8f7feac-29dc-4e4a-8f3e-4cc938e40c3b