Skip to content

Commit

Permalink
ASAP-812 Custom app to display lab membership (#4481)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabiayako authored Dec 17, 2024
1 parent 53f9196 commit 1fffd26
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const MembershipCard = ({
return `${data.fields.firstName?.['en-US']} ${data.fields.lastName?.['en-US']}`;
case 'team':
return data.fields.displayName?.['en-US'];
case 'lab':
case 'contributingCohort':
return data.fields.name?.['en-US'];
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe('Field component', () => {
entityName
${'team'}
${'user'}
${'lab'}
${'contributingCohort'}
`('common - $entityName', ({ entityName }) => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports.description = 'Change lab membership appearance';

module.exports.up = (migration) => {
const users = migration.editContentType('users');
users.changeFieldControl('labs', 'app', 'Yp64pYYDuRNHdvAAAJPYa', {
entityName: 'lab',
showUserEmail: false,
showLinkEntityAction: false,
showCreateEntityAction: true,
});
};

module.exports.down = (migration) => {
const users = migration.editContentType('users');

users.changeFieldControl('labs', 'builtin', 'entryLinksEditor', {
showLinkEntityAction: false,
showCreateEntityAction: true,
});
};

0 comments on commit 1fffd26

Please sign in to comment.