-
-
Notifications
You must be signed in to change notification settings - Fork 813
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 sorting on the organizations screen #1072
Comments
@aashimawadhwa, I would like to work on this issue. Please assign me :). |
Changes Made: - Added a new state variable, `sortingOption`, to manage the current sorting preference. Default is set to 'latest'. - Introduced a sorting mechanism using the `sortOrgs` function that sorts organizations based on creation date. - Updated the `useEffect` hook to apply sorting when either `orgsData` or `sortingOption` changes. - Added two sorting options - latest first and oldest first - Also added the relevant tests for the correct functionality of the changes. Fixes issue PalisadoesFoundation#1072 Signed-off-by: Akhilender <[email protected]>
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
Changes Made: - Added a new state variable, `sortingOption`, to manage the current sorting preference. Default is set to 'latest'. - Introduced a sorting mechanism using the `sortOrgs` function that sorts organizations based on creation date. - Updated the `useEffect` hook to apply sorting when either `orgsData` or `sortingOption` changes. - Added two sorting options - latest first and oldest first - Also added the relevant tests for the correct functionality of the changes. Fixes issue PalisadoesFoundation#1072 Signed-off-by: Akhilender <[email protected]>
@akhilender-bongirwar Hey, are you working on this? |
@LakshyaSatpal, please check this PR #1076 |
Changes Made: - Added a new state variable, `sortingOption`, to manage the current sorting preference. Default is set to 'latest'. - Introduced a sorting mechanism using the `sortOrgs` function that sorts organizations based on creation date. - Updated the `useEffect` hook to apply sorting when either `orgsData` or `sortingOption` changes. - Added two sorting options - latest first and oldest first - Also added the relevant tests for the correct functionality of the changes. Fixes issue PalisadoesFoundation#1072 Signed-off-by: Akhilender <[email protected]>
This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue. |
* feat: Implemented orglist sorting functionality Changes Made: - Added a new state variable, `sortingOption`, to manage the current sorting preference. Default is set to 'latest'. - Introduced a sorting mechanism using the `sortOrgs` function that sorts organizations based on creation date. - Updated the `useEffect` hook to apply sorting when either `orgsData` or `sortingOption` changes. - Added two sorting options - latest first and oldest first - Also added the relevant tests for the correct functionality of the changes. Fixes issue #1072 Signed-off-by: Akhilender <[email protected]> * fix: Removed redundancy - Removed the new interface instead imported the existing interface. - Added cleanup function in tests. Signed-off-by: Akhilender <[email protected]> * fix: Highlighted the selected option - Ensured that the selected option is highlighted in the sort dropdown. - Made changes to ensure proper translation. - Changed the variant from "outline success" to "success" when the option is selected, making it feasible for the user to know that the option is applied. Signed-off-by: Akhilender <[email protected]> * Removed redundant code - Removed extra state variable and combined the two state variables into one as they perform same functionality. Signed-off-by: Akhilender <[email protected]> * fixed the failing test Signed-off-by: Akhilender <[email protected]> * Update en.json - Changed the sort option titles - Latest first to Latest - Oldest first to Earliest * fix: Translations modified - Ensured correct translations for oldest first to earliest and latest first to latest in all languages Signed-off-by: Akhilender <[email protected]> * fixed the failing test Signed-off-by: Akhilender <[email protected]> * feat: Implement server-side sorting for organizations Instead of handling sorting on the client side the GraphQL query for fetching organizations (`ORGANIZATION_CONNECTION_LIST`) has been enhanced to support ordering based on the `createdAt` field. - Modified the GraphQL query in `ORGANIZATION_CONNECTION_LIST` to include the `orderBy` parameter. - Updated the `handleSorting` function to trigger a server-side refetch with the appropriate sorting order. - Removed the client-side sorting logic in the `sortOrgs` function, as sorting is now handled on the server. - Corrected the graphql schema for OrganizationOrderByInput enum Signed-off-by: Akhilender <[email protected]> * Fix: fixed the failing test Signed-off-by: Akhilender <[email protected]> * fix: Changed oldest to earliest - Altered the oldest key to earliest to avoid confusion Signed-off-by: Akhilender <[email protected]> --------- Signed-off-by: Akhilender <[email protected]>
Describe the bug
Currently sorting is not implemented in the organization screen, the aim is to implement the sort functionality with latest first, oldest first etc. options, you can refer from the posts screen.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
sorting of organization on the basis of defined and selected attributes.
Additional details
NA
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship PalisadoesFoundation/talawa#359
The text was updated successfully, but these errors were encountered: