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

Remove reviewer info in the PDFs #569

Merged
merged 1 commit into from
Dec 14, 2023
Merged
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
Expand Up @@ -1076,8 +1076,9 @@ const htmlAtbdContentSections = [
{
label: 'Reviewer Information',
id: 'reviewer_info',
shouldRender: ({ atbd }) => {
shouldRender: ({ atbd, printMode }) => {
if (!atbd) return false;
if (printMode) return false; // Should not render in the PDF preview

// Render if there are reviewers with the role 'Document Reviewer'
const contactsLink = atbd?.contacts_link || [];
Expand Down Expand Up @@ -1294,43 +1295,6 @@ const pdfAtbdContentSections = [
}));
}
},
{
label: 'Reviewer Information',
id: 'reviewer_info',
shouldRender: ({ atbd }) => {
if (!atbd) return false;

// Render if there are reviewers with the role 'Document Reviewer'
const contactsLink = atbd?.contacts_link || [];

for (const { roles } of contactsLink) {
if (roles.includes('Document Reviewer')) {
return true;
}
}
return false;
},
render: ({ element, atbd, printMode, children }) => {
if (!atbd) {
return null;
}
return (
<AtbdSection
key={element.id}
id={element.id}
title={element.label}
atbd={atbd}
printMode={printMode}
>
{React.Children.count(children) ? (
children
) : (
<p>There are no reviewers associated with this document</p>
)}
</AtbdSection>
);
}
},
{
label: 'References',
id: 'references',
Expand Down
Loading