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

Sort campCollaboration- & MaterialList-List #5535

Merged
merged 8 commits into from
Aug 6, 2024

Conversation

pmattmann
Copy link
Member

@pmattmann pmattmann commented Jul 13, 2024

close #5484

In ScheduleEntry-View, ResponsibleUser List is sorted alphabetically.

In Material-View, MaterialList is sorted
Non-User before User-Lists
then alphabetically

@pmattmann pmattmann requested a review from a team July 13, 2024 17:44
@manuelmeister manuelmeister added the deploy! Creates a feature branch deployment for this PR label Jul 15, 2024
Copy link

github-actions bot commented Jul 15, 2024

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

common/helpers/materialListsSorted.js Show resolved Hide resolved
frontend/src/components/collaborator/CollaboratorList.vue Outdated Show resolved Hide resolved
...keyBy(this.camp.campCollaborations().items, '_meta.self'),
...keyBy(
sortBy(this.camp.campCollaborations().items, (u) =>
campCollaborationDisplayName(u, this.$tc.bind(this)).toLowerCase()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the toLowerCase?

Copy link
Member Author

Choose a reason for hiding this comment

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

So that sorting is alphabetical regardless of capitalization.

Comment on lines +68 to +85
return sortBy(
this.campCollaborations.items
.filter((cc) => {
return (
cc.status !== 'inactive' ||
this.currentCampCollaborationIRIs.includes(cc._meta.self)
)
})
.map((value) => {
// following structure is defined by vuetify v-select items property
return {
value: value._meta.self,
campCollaboration: value,
text: campCollaborationDisplayName(value, this.$tc.bind(this)),
}
}),
(value) => value.text.toLowerCase()
)
Copy link
Member

Choose a reason for hiding this comment

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

Move to own computed

@pmattmann pmattmann added this pull request to the merge queue Aug 6, 2024
Merged via the queue into ecamp:devel with commit eb97ee7 Aug 6, 2024
30 checks passed
@pmattmann pmattmann deleted the feature/list-orders branch August 6, 2024 19:08
This was referenced Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy! Creates a feature branch deployment for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort order of material lists and people
3 participants