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

Lalith team filter development Backend #3281

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

lalith425
Copy link

@lalith425 lalith425 commented Mar 16, 2025

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.

  1. verify function “A” (feel free to include screenshot here)
    https://github.com/user-attachments/assets/c8f7feac-29dc-4e4a-8f3e-4cc938e40c3b

Copy link

netlify bot commented Mar 16, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 7561e9d
🔍 Latest deploy log https://app.netlify.com/sites/highestgoodnetwork-dev/deploys/67dc7b419552130008b4a162
😎 Deploy Preview https://deploy-preview-3281--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sampantangi sampantangi self-requested a review March 16, 2025 03:27
Copy link

@sampantangi sampantangi left a 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.
image

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

@rnavyaprabha
Copy link

I also followed steps as instructed, I had tried with the both development branch & your current branch for backend and checked into your branch in frontend, .
I am seeing below error, attached in the screenshot.
I will try to verify one more time
3281

@rnavyaprabha rnavyaprabha self-requested a review March 16, 2025 05:33
Copy link

@rnavyaprabha rnavyaprabha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also followed steps as instructed, I had tried with the both development branch & your current branch for backend and checked into your branch in frontend, .
I am seeing below error, attached in the screenshot.
I will try to verify one more time meanwhile can you figure out what's wrong?
3281

@lalith425
Copy link
Author

lalith425 commented Mar 17, 2025

@sampantangi @rnavyaprabha
Can you both please confirm did you synced both the backend and frontend changes? This functionality has changes in both frontend and backend.

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

@lalith425 lalith425 changed the title Lalith team filter development Lalith team filter development Backend Mar 17, 2025
@lalith425
Copy link
Author

Check1.1.2.mp4

@rnavyaprabha @sampantangi
In the above video, it was working fine for me, I have shown my working brach for those two repo. Try testing one more time, and do let me know if you people are facing the issue still.

Copy link

@angad363 angad363 left a 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

image

Copy link

@Amalesh-A Amalesh-A left a 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:
Navigating to the Weekly Summaries Page

Creating a Filter:
Creating a Filter

The Filter Exists:
Filter Exists

Updating the Filter:
Update Filter

After Deletion:
Deleted Filter

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.

Copy link

@sampantangi sampantangi left a 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.

@manushajyasta30 manushajyasta30 self-requested a review March 24, 2025 13:35
Copy link

@manushajyasta30 manushajyasta30 left a 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

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.

6 participants