- correct sorting for solr results

- correct authors in dataset citation
This commit is contained in:
Arno Kaimbacher 2022-01-14 10:24:21 +01:00
parent 110fbcac63
commit 7e47b30340
3 changed files with 17 additions and 1 deletions

View file

@ -106,7 +106,16 @@ export default class DatasetDetailComponent extends Vue {
}
public getCitation(): string {
let citation = this.dataset.contributors.map((u) => u.last_name + ", " + u.first_name.substring(0, 1).toUpperCase() + ".").join(", ");
let citation = this.dataset.authors
.map((u) => {
let name = u.last_name;
if (u.first_name) {
name += ", " + u.first_name?.substring(0, 1).toUpperCase() + ".";
}
return name;
// u.last_name + ", " + u.first_name?.substring(0, 1).toUpperCase() + "."
})
.join(", ");
citation += " " + moment(this.dataset.server_date_published).format("YYYY") + ": ";
citation += this.dataset.MainTitle?.value;
citation += "." + this.dataset.creating_corporation + ", ";