Skip to content

Commit

Permalink
fix: staff contact and alt language display (#693)
Browse files Browse the repository at this point in the history
* add staff contact info to collection detail

* fix double entry of alt name on staff directory listing

* add staff job title to collection detail page
  • Loading branch information
dianneweinthal authored Mar 14, 2023
1 parent ab98b94 commit d347c25
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
24 changes: 18 additions & 6 deletions gql/queries/CollectionDetail.gql
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,27 @@ query CollectionDetail($slug: [String!]) {
}
associatedStaffMember {
email
phoneNumber
staffMemberJobTitle
jobTitle: staffMemberJobTitle
nameFirst
nameLast
alternativeName {
... on alternativeName_alternativeName_BlockType {
fullName
languageAltName
}
}
to: uri
bookAConsultation
staffDepartment {
title
}
phone: phoneNumber
consultation: bookAConsultation
departments: staffDepartment(orderBy: "level") {
id
title
}
locations: staffAssociatedLocations {
id
title
uri: slug
}
image: staffPortrait {
...Image
}
Expand Down
5 changes: 1 addition & 4 deletions pages/about/staff/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,7 @@ export default {
...obj,
to: `/about/staff/${obj.to}`,
image: _get(obj, "image[0]", null),
staffName:
obj.alternativeName.length > 0
? `${obj.nameFirst} ${obj.nameLast} ${obj.alternativeName[0].fullName}`
: `${obj.nameFirst} ${obj.nameLast}`,
staffName: `${obj.nameFirst} ${obj.nameLast}`,
language: _get(
obj,
"alternativeName[0].languageAltName",
Expand Down
10 changes: 10 additions & 0 deletions pages/collections/explore/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ export default {
to: `/${obj.to}`,
image: _get(obj, "image[0]", null),
staffName: `${obj.nameFirst} ${obj.nameLast}`,
language: _get(
obj,
"alternativeName[0].languageAltName",
null
),
alternativeFullName: _get(
obj,
"alternativeName[0].fullName",
null
),
}
})
},
Expand Down

9 comments on commit d347c25

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://64117e7c521e802ae098be2a--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://64122734ce88ec057647dbbf--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://64124deb26a11b2374ec729a--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://6412cffaf5fcd55400522a26--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://6413789f9c4f0206f1a5048b--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://6414218eacffb709040e51d3--uclalibrary.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://www.library.ucla.edu as production
πŸš€ Deployed on https://6414ca4b97a24a2e9bec14d2--uclalibrary.netlify.app

Please sign in to comment.