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

ui: [#855] add community membership request label type #382

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {

LabelStatusAccept,
LabelStatusCancel,
LabelStatusDecline,
Expand All @@ -12,24 +11,21 @@ import {
LabelTypeGuestAccess,
LabelTypeUserAccess,
LabelTypeCommunityManageRecord,
LabelTypeCommunitySubcommunity

LabelTypeCommunitySubcommunity,
LabelTypeCommunityMembershipRequest,
Copy link
Contributor Author

@fenekku fenekku Jul 9, 2024

Choose a reason for hiding this comment

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

It goes without saying that this whole situation of invenio-requests knowing about its dependents is not great.

} from "@js/invenio_requests/contrib";
import {

RequestAcceptButton,
RequestCancelButton,
RequestDeclineButton,
RequestSubmitButton,
} from "@js/invenio_requests/components/Buttons";
import {

RequestAcceptModalTrigger,
RequestDeclineModalTrigger,
RequestCancelModalTrigger,
} from "@js/invenio_requests/components/ModalTriggers";
import {

AccessRequestIcon,
CommunityInclusionIcon,
CommunityInvitationIcon,
Expand All @@ -43,6 +39,7 @@ export const defaultContribComponents = {
[`RequestTypeLabel.layout.user-access-request`]: LabelTypeUserAccess,
[`RequestTypeLabel.layout.community-manage-record`]: LabelTypeCommunityManageRecord,
[`RequestTypeLabel.layout.subcommunity`]: LabelTypeCommunitySubcommunity,
[`RequestTypeLabel.layout.community-membership-request`]: LabelTypeCommunityMembershipRequest,
[`RequestStatusLabel.layout.submitted`]: LabelStatusSubmit,
[`RequestStatusLabel.layout.deleted`]: LabelStatusDelete,
[`RequestStatusLabel.layout.accepted`]: LabelStatusAccept,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is part of InvenioRequests
// Copyright (C) 2022 CERN.
// Copyright (C) 2024 Northwestern University.
//
// Invenio RDM Records is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -49,3 +50,9 @@ export const LabelTypeCommunitySubcommunity = (props) => (
{i18next.t("Subcommunity")}
</Label>
);

export const LabelTypeCommunityMembershipRequest = (props) => (
<Label horizontal className="primary" size="small">
{i18next.t("Membership request")}
</Label>
);
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is part of InvenioRequests
// Copyright (C) 2022 CERN.
// Copyright (C) 2024 Northwestern University.
//
// Invenio RDM Records is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -29,7 +30,8 @@ import {
LabelTypeGuestAccess,
LabelTypeUserAccess,
LabelTypeCommunityManageRecord,
LabelTypeCommunitySubcommunity
LabelTypeCommunitySubcommunity,
LabelTypeCommunityMembershipRequest,
} from "./contrib";
import {
AcceptStatus,
Expand Down Expand Up @@ -75,6 +77,7 @@ const defaultComponents = {
"RequestTypeLabel.layout.user-access-request": LabelTypeUserAccess,
"RequestTypeLabel.layout.community-manage-record": LabelTypeCommunityManageRecord,
"RequestTypeLabel.layout.subcommunity": LabelTypeCommunitySubcommunity,
"RequestTypeLabel.layout.community-membership-request": LabelTypeCommunityMembershipRequest,
"RequestActionModalTrigger.accept": RequestAcceptModalTrigger,
"RequestActionModalTrigger.decline": RequestDeclineModalTrigger,
"RequestActionModalTrigger.cancel": RequestCancelModalTrigger,
Expand Down
1 change: 1 addition & 0 deletions invenio_requests/services/requests/facets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"guest-access-request": _("Guest access"),
"user-access-request": _("User access"),
"community-manage-record": _("Community manage record"),
"community-membership-request": _("Membership request"),
},
)

Expand Down
Loading