Skip to content

Commit

Permalink
ui: [#855] add community membership request label type
Browse files Browse the repository at this point in the history
  • Loading branch information
fenekku authored and slint committed Jul 19, 2024
1 parent 82dbf28 commit 5e8a470
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
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,
} 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

0 comments on commit 5e8a470

Please sign in to comment.