-
Notifications
You must be signed in to change notification settings - Fork 60
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
Implement status filter on the org homepage #1432
Implement status filter on the org homepage #1432
Conversation
Hey thanks for submitting the PR and video. I'm a bit confused by what I'm seeing. At the 0:09 mark what action are you taking so that the order of bounties change? Also it looks like when you select a status, the check mark disappears. The check mark should persist. |
At the 0:09 mark, I trigger an API call with parameters such as the organization UUID from useParam, page set to 1, and a reset of the page to true. Additionally, the default status for all bounties is set to false ({Opened: false, Completed: false, Paid: false, Assigned: false}), and the default skill is empty string ' ' (indicating no specific language). ( Is this api call required ?) The check marks persist, but in the video, I double-clicked, making it look like they are not persistent Link of new video |
Hi @ecurrencyhodler, kindly review the pull request. |
Okay it looks like a call is firing when you click the button "status" and that no calls are being fired when you select "open/assigned/completed/paid". The opposite should be happening. No call should be fired when the button "status" is clicked but a call should be fired when a status is selected. You can use the homepage for reference for the type of behavior that is expected: https://community.sphinx.chat/bounties Also it looks like you're not pulling in org specific bounties because I see sphinx app, bounties, and core lightning all in this video. This should be an org specific call so only bounties associated with that org should appear. |
I have implemented all the behavior and reverted back after confirming with you 😂 . Now, I am going to implement the behavior that you are instructing me to do now. I will ping you as soon as I complete it. |
I'm sorry. I misunderstood what you were saying. Thanks for doing that. |
Hi @ecurrencyhodler, Please confirm this updated work Link. After confirmation, I will write the unit test and push it to the repository. |
@MahtabBukhari After I unselected, or select a new status it does not get refreshed, and the request happens really slow, compared to the bounties page. |
I haven't pushed the recently updated work on repo @elraphty |
@elraphty, Could you please check this one https://www.loom.com/share/146b8c8022524cb8b8cd28a63e0def78 |
Video looks good to me. Thanks. But there are some jest tests failing. Can you take another look? |
Ok let me sync with raph and get back to you. |
@elraphty, Is it fine? OR I have to use somthing different? |
@ecurrencyhodler @elraphty , This API and host are working as expected only when I select just one checkbox. However, when I select two checkboxes, multiple organization bounties appear. |
okay it looks like @AbdulWahab3181 ran into the same issue. We might need another ticket to address this problem. @elraphty can you take a look? |
@ecurrencyhodler I believe my issue is slightly different. Firstly, I am encountering null values when selecting multiple checkboxes, while Mahtab is receiving data for multiple organization bounties in the response. Secondly, I am using the 'metrics/bounties' endpoint, whereas Mahtab is utilizing the 'organizations/bounties' endpoint. |
@MahtabBukhari, In my case I used |
Thanks @Ekep-Obasi. You are right. The correct call is |
Error is same on both |
@ecurrencyhodler I also observed that Mahtab is utilizing the 'organizations/bounties' endpoint for the status filter, while I used the 'gobounties/all' endpoint for the search in this ticket#1316, and both tasks are related to organization bounties pages. I believe using two different endpoints may result in inaccurate results. I followed the instructions provided in the ticket, which guided me to implement the 'gobounties/all' endpoint. However, please let me know if I need to update my endpoint. Otherwise, we can instruct Mahtab to update his endpoint. |
Okay let's wait for @elraphty to chime in. Apologies for the confusion. |
I also have tried this one but the same issue |
@elraphty, please review my pull request. |
It's past dinner for him right now. He'll take a look maybe by tomorrow. |
New api endpoint for our backend is: https://api.people-test.sphinx.chat/ But i'm not sure that's related to this pr. But wouldn't hurt to try the new call. |
I have tested my work with the new backend API, https://api.people-test.sphinx.chat/. It is functioning properly with this update. You can also view the results here: https://www.loom.com/share/a61aa608a84643049fd842625dfbcd32. |
Beautiful. |
@ecurrencyhodler @elraphty Hi! I am waiting for the response on my queries. Could you please guide me? |
Problem: Create a status filter on the org homepage for Open, Assigned, Completed, and Paid bounties, ensuring correct API calls when user clicks on status and default display of all statuses, zero skills, and newest bounties first.
Issue ticket number and link
New Updated Evidance:
Changes
OrgHeader.tsx
OrgTickets.tsx
languageString
to manage the selected language string.onChangeStatus
function,checkboxIdToSelectedMap
, andlanguageString
.WidgetSwitchViewer.tsx
OrgHeader.spec.tsx:
Test: API Call Trigger on Status Filter Click
OrgHeader
component with mock props.waitFor
to ensure the API call (mainStore.getSpecificOrganizationBounties
) is triggered.