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)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
val id: Long = 0,
|
val id: Long = 0,
|
||||||
val name: String,
|
val name: String,
|
||||||
|
@JsonIgnore
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
val site: Site
|
val site: Site
|
||||||
) {
|
) {
|
||||||
|
@JsonIgnore
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
@JoinTable(name = "tutor_observations",
|
@JoinTable(name = "tutor_observations",
|
||||||
joinColumns = [JoinColumn(name = " tutor_id", referencedColumnName = "id")],
|
joinColumns = [JoinColumn(name = " tutor_id", referencedColumnName = "id")],
|
||||||
@ -91,7 +93,6 @@ data class Observation(
|
|||||||
val knowledge: Double?,
|
val knowledge: Double?,
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
val entries: List<Entry>,
|
val entries: List<Entry>,
|
||||||
@JsonIgnore
|
|
||||||
@ManyToMany(mappedBy = "observations")
|
@ManyToMany(mappedBy = "observations")
|
||||||
val tutors: Set<Tutor>,
|
val tutors: Set<Tutor>,
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
|
@ -59,7 +59,10 @@
|
|||||||
<p slot="title">{{ observation.date }}<br/>{{ observation.whom }} {{ observation.type }}<br/>{{ observation.observed }}</p>
|
<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>
|
<h2>{{ observation.date }}, {{ observation.whom }}<br/>{{ observation.type }}, {{ observation.observed }}</h2>
|
||||||
<b-row align-h="center">
|
<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>
|
</b-row>
|
||||||
<br />
|
<br />
|
||||||
<b-row class="mb-2">
|
<b-row class="mb-2">
|
||||||
|
Loading…
Reference in New Issue
Block a user