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

WG opening listing sorted in chronological order (#2513) #3862

Closed
wants to merge 3 commits into from

Conversation

chrlschwb
Copy link
Contributor

Issue #2513.
WG opening listings sorted in chronological order.

@vercel
Copy link

vercel bot commented Nov 18, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
dao ✅ Ready (Inspect) Visit Preview Feb 20, 2023 at 1:57AM (UTC)
pioneer-2 ✅ Ready (Inspect) Visit Preview Feb 20, 2023 at 1:57AM (UTC)
pioneer-2-storybook ✅ Ready (Inspect) Visit Preview Feb 20, 2023 at 1:57AM (UTC)

Copy link
Contributor

@traumschule traumschule left a comment

Choose a reason for hiding this comment

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

Draft for #2513

@@ -42,8 +42,11 @@ export const useOpenings = ({ groupId: group_eq, type, openingsPositionType }: U
() => data?.workingGroupOpenings.map((opening) => asWorkingGroupOpening(opening)) ?? [],
[loading, data]
)

const sortedOpenings= openings.slice().sort((a, b) => a.workingGroupOpening.updatedAt - b.workingGroupOpening.updatedAt)
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to happen on the WorkingGroupsOpenings page. Also note the failing test:

ERROR in src/working-groups/hooks/useOpenings.ts:46:59
16:31:06.075 | \| TS2339: Property 'workingGroupOpening' does not exist on type 'WorkingGroupOpening'.
16:31:06.075 | \|     44 \|   )
16:31:06.075 | \|     45 \|
16:31:06.075 | \|   > 46 \|   const sortedOpenings= openings.slice().sort((a, b) => a.workingGroupOpening.updatedAt -

@@ -43,7 +43,7 @@ export const useOpenings = ({ groupId: group_eq, type, openingsPositionType }: U
[loading, data]
)

const sortedOpenings= openings.slice().sort((a, b) => a.workingGroupOpening.updatedAt - b.workingGroupOpening.updatedAt)
const sortedOpenings= openings.slice().sort((a, b) => a.leadId - b.leadId)
Copy link
Contributor

Choose a reason for hiding this comment

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

please describe this change. looks like this would sort all openings by the ID of the lead membership vs chronologically.

@vercel
Copy link

vercel bot commented Dec 15, 2022

@chrlschwb is attempting to deploy a commit to the joystream Team on Vercel.

A member of the Team first needs to authorize it.

@traumschule
Copy link
Contributor

Tests are failing. @gyroflaw do you think this is salvageable?

@traumschule
Copy link
Contributor

LGTM: https://dao-git-fork-chrlschwb-fix-2513-openingsorting-joystream.vercel.app/#/working-groups/openings
The design doesn't show creation time / block in the overview but it seems correct.

Why changes to 220 files? Still shows testnet banner - likely needs a rebase.

openings-list

@chrlschwb
Copy link
Contributor Author

I'm closing this PR in favor of a new PR based on the most recent dev branch.
#4191

@chrlschwb chrlschwb closed this Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builders-wg-code-review community-dev issue suitable for community-dev pipeline waiting-for-checks PR is reviewed and approved, but is waiting for checks to complete
Development

Successfully merging this pull request may close these issues.

None yet

2 participants