- 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

@ -33,6 +33,12 @@ const routes = [
component: DatasetDetailComponent,
props: true,
},
// {
// path: "/10.24341/tethys.:datasetId",
// name: "dataset2",
// component: DatasetDetailComponent,
// props: true,
// },
{
path: "/services",
name: "Services",

View File

@ -128,6 +128,7 @@ class DatasetService {
// fq: ["subject:Steiermark", "language:de"],
fq: filterFields,
start: start,
sort: "server_date_published desc",
facet: "on",
// "facet.field": "language",
"json.facet.language": '{ type: "terms", field: "language" }',

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 + ", ";