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

final #1431

Merged
merged 1 commit into from
Apr 9, 2024
Merged

final #1431

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
25 changes: 17 additions & 8 deletions src/components/work/bibliographicdata/BibliographicData.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ export function BibliographicData({ manifestations, workId }) {
>
<Accordion>
{sliced.map((manifestation, index) => {
// very 1. priority
let volume = manifestation?.titles?.identifyingAddition
? manifestation?.titles?.identifyingAddition
: "";
volume +=
volume && manifestation?.volume ? ", " + manifestation.volume : "";

const formattedMaterialTypes = formatMaterialTypesToPresentation(
flattenMaterialType(manifestation)
);
Expand All @@ -54,12 +61,13 @@ export function BibliographicData({ manifestations, workId }) {
// show the materialtype
const shortMaterialType = [formattedMaterialTypes].join("");

// show a person involved - prioritized
// 1. contributor (dkind) - indlæser
// 2. illustrator
// 3. titles.identifyingAddition - text describing contribution
// 4. creator
// 5. .. nothing
// show additional info - prioritized
// 1. volume
// 2. contributor (dkind) - indlæser
// 3. illustrator
// 4. titles.identifyingAddition - text describing contribution
// 5. creator
// 6. .. nothing

// priority 1
const personsReading = manifestation?.contributors?.filter((con) => {
Expand All @@ -75,7 +83,8 @@ export function BibliographicData({ manifestations, workId }) {
);
}
);
const shortPerson =
const shortAddit =
(volume && volume) ||
(personsReading.length > 0 &&
personsReading
?.map(
Expand Down Expand Up @@ -115,7 +124,7 @@ export function BibliographicData({ manifestations, workId }) {
// the list to pass to accordion
const additinalText = [
shortMaterialType,
shortPerson,
shortAddit,
shortPublishing,
];

Expand Down