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

CM-295: display group head #26

Merged
merged 2 commits into from
Oct 2, 2023
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
1 change: 1 addition & 0 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const GROUP_INDIVIDUAL_FULL_PROJECTION = [
const GROUP_FULL_PROJECTION = [
'id',
'isDeleted',
'head {firstName, lastName}',
'dateCreated',
'dateUpdated',
'jsonExt',
Expand Down
4 changes: 4 additions & 0 deletions src/components/GroupSearcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function GroupSearcher({
const headers = () => {
const headers = [
'group.id',
'group.head',
];
if (rights.includes(RIGHT_GROUP_UPDATE)) {
headers.push('emptyLabel');
Expand All @@ -120,6 +121,9 @@ function GroupSearcher({
const itemFormatters = () => {
const formatters = [
(group) => group.id,
(group) => (group?.head
? `${group?.head?.firstName} ${group?.head?.lastName}`
: formatMessage(intl, 'group', 'noHeadSpecified')),
];
if (rights.includes(RIGHT_GROUP_UPDATE)) {
formatters.push((group) => (
Expand Down
2 changes: 2 additions & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
},
"group": {
"id": "ID",
"head": "Head",
"noHeadSpecified": "head not specified",
"individual.firstName": "Individual First Name",
"individual.lastName": "Individual Last Name",
"pageTitle": "Group {id}",
Expand Down
Loading