Added tutor list to viewed observations.
This commit is contained in:
parent
2666814ef5
commit
9ed2543355
@ -43,9 +43,11 @@ data class Tutor(
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
val id: Long = 0,
|
||||
val name: String,
|
||||
@JsonIgnore
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
val site: Site
|
||||
) {
|
||||
@JsonIgnore
|
||||
@ManyToMany
|
||||
@JoinTable(name = "tutor_observations",
|
||||
joinColumns = [JoinColumn(name = " tutor_id", referencedColumnName = "id")],
|
||||
@ -91,7 +93,6 @@ data class Observation(
|
||||
val knowledge: Double?,
|
||||
@ElementCollection
|
||||
val entries: List<Entry>,
|
||||
@JsonIgnore
|
||||
@ManyToMany(mappedBy = "observations")
|
||||
val tutors: Set<Tutor>,
|
||||
@ManyToMany
|
||||
|
@ -59,7 +59,10 @@
|
||||
<p slot="title">{{ observation.date }}<br/>{{ observation.whom }} {{ observation.type }}<br/>{{ observation.observed }}</p>
|
||||
<h2>{{ observation.date }}, {{ observation.whom }}<br/>{{ observation.type }}, {{ observation.observed }}</h2>
|
||||
<b-row align-h="center">
|
||||
<h4><span v-bind:key="index" v-for="(person, index) in observation.persons"><i>{{ person.name }}<span v-if="index+1 < observation.persons.length">, </span></i></span></h4>
|
||||
<h4>Observed by: <span v-bind:key="index" v-for="(tutor, index) in observation.tutors"><i>{{ tutor.name }}<span v-if="index+1 < observation.tutors.length">, </span></i></span></h4>
|
||||
</b-row>
|
||||
<b-row align-h="center">
|
||||
<h4>Participants: <span v-bind:key="index" v-for="(person, index) in observation.persons"><i>{{ person.name }}<span v-if="index+1 < observation.persons.length">, </span></i></span></h4>
|
||||
</b-row>
|
||||
<br />
|
||||
<b-row class="mb-2">
|
||||
|
Loading…
Reference in New Issue
Block a user