- Dataset.php: autors() and contributors() are now sorted by pivot attribute 'link_documents_persons.sort_order'

- show id attribute of persorns larger in PersonTable.vue
- composer updates
This commit is contained in:
Arno Kaimbacher 2020-09-21 18:20:13 +02:00
parent ecaf2b5790
commit 30afb3b1f8
5 changed files with 32 additions and 30 deletions

View file

@ -152,7 +152,8 @@ class Dataset extends Model
return $this
->persons()
//->belongsToMany(Person::class, 'link_documents_persons', 'document_id', 'person_id')
->wherePivot('role', 'author');
->wherePivot('role', 'author')
->orderBy('link_documents_persons.sort_order');
}
/**
@ -177,7 +178,8 @@ class Dataset extends Model
return $this
->persons()
// ->belongsToMany(Person::class, 'link_documents_persons', 'document_id', 'person_id')
->wherePivot('role', 'contributor');
->wherePivot('role', 'contributor')
->orderBy('link_documents_persons.sort_order');
}
#endregion