Flattened RatingComponent into scenario columns
This commit is contained in:
parent
8fb6142cb7
commit
ad01ff3cba
@ -16,7 +16,6 @@ import javax.persistence.JoinTable
|
|||||||
import javax.persistence.ManyToMany
|
import javax.persistence.ManyToMany
|
||||||
import javax.persistence.ManyToOne
|
import javax.persistence.ManyToOne
|
||||||
import javax.persistence.OneToMany
|
import javax.persistence.OneToMany
|
||||||
import javax.persistence.OneToOne
|
|
||||||
import javax.persistence.Table
|
import javax.persistence.Table
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
@ -98,22 +97,22 @@ data class Observation(
|
|||||||
"${roundScore(monitoring)},${roundScore(controlProcedural)},${roundScore(control)}," +
|
"${roundScore(monitoring)},${roundScore(controlProcedural)},${roundScore(control)}," +
|
||||||
"${roundScore(conservatism)},${roundScore(teamworkCommunications)},${roundScore(teamworkLeadership)}," +
|
"${roundScore(conservatism)},${roundScore(teamworkCommunications)},${roundScore(teamworkLeadership)}," +
|
||||||
"${roundScore(teamworkWorkload)},${roundScore(knowledge)}," +
|
"${roundScore(teamworkWorkload)},${roundScore(knowledge)}," +
|
||||||
"\"${scenarios.map { it.monitoring.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.monitoringStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.controlProcedural.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.controlProceduralStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.control.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.controlStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.conservatism.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.conservatismStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.teamworkCommunications.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.teamworkCommunicationsStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.teamworkLeadership.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.teamworkLeadershipStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.teamworkWorkload.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.teamworkWorkloadStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.knowledge.strengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.knowledgeStrengths }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.monitoring.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.monitoringImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.controlProcedural.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.controlProceduralImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.control.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.controlImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.conservatism.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.conservatismImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.teamworkCommunications.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.teamworkCommunicationsImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.teamworkLeadership.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.teamworkLeadershipImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.teamworkWorkload.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.teamworkWorkloadImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
"\"${scenarios.map { it.knowledge.improvements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
"\"${scenarios.map { it.knowledgeImprovements }.filter { it.isNotEmpty() }.joinToString(separator = "; ")}\"," +
|
||||||
";#None;#,"
|
";#None;#,"
|
||||||
return tutors.joinToString("\n") { it.name + "," + dataPortion }
|
return tutors.joinToString("\n") { it.name + "," + dataPortion }
|
||||||
}
|
}
|
||||||
@ -126,53 +125,50 @@ data class Observation(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
|
||||||
data class RatingComponent(
|
|
||||||
@Id
|
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
||||||
val id: Long = 0,
|
|
||||||
val rating: Int,
|
|
||||||
val strengths: String = "",
|
|
||||||
val improvements: String = ""
|
|
||||||
) {
|
|
||||||
fun ratingValid(): Boolean {
|
|
||||||
return rating in 1..5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
data class Scenario(
|
data class Scenario(
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
val id: Long = 0,
|
val id: Long = 0,
|
||||||
val title: String,
|
val title: String,
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val monitoringRating: Int,
|
||||||
val monitoring: RatingComponent,
|
val monitoringStrengths: String = "",
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val monitoringImprovements: String = "",
|
||||||
val controlProcedural: RatingComponent,
|
val controlProceduralRating: Int,
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val controlProceduralStrengths: String = "",
|
||||||
val control: RatingComponent,
|
val controlProceduralImprovements: String = "",
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val controlRating: Int,
|
||||||
val conservatism: RatingComponent,
|
val controlStrengths: String = "",
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val controlImprovements: String = "",
|
||||||
val teamworkCommunications: RatingComponent,
|
val conservatismRating: Int,
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val conservatismStrengths: String = "",
|
||||||
val teamworkLeadership: RatingComponent,
|
val conservatismImprovements: String = "",
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val teamworkCommunicationsRating: Int,
|
||||||
val teamworkWorkload: RatingComponent,
|
val teamworkCommunicationsStrengths: String = "",
|
||||||
@OneToOne(cascade = [CascadeType.ALL])
|
val teamworkCommunicationsImprovements: String = "",
|
||||||
val knowledge: RatingComponent
|
val teamworkLeadershipRating: Int,
|
||||||
|
val teamworkLeadershipStrengths: String = "",
|
||||||
|
val teamworkLeadershipImprovements: String = "",
|
||||||
|
val teamworkWorkloadRating: Int,
|
||||||
|
val teamworkWorkloadStrengths: String = "",
|
||||||
|
val teamworkWorkloadImprovements: String = "",
|
||||||
|
val knowledgeRating: Int,
|
||||||
|
val knowledgeStrengths: String = "",
|
||||||
|
val knowledgeImprovements: String = ""
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
private fun ratingValid(rating: Int): Boolean {
|
||||||
|
return rating in 1..5
|
||||||
|
}
|
||||||
fun ratingsAllValid(): Boolean {
|
fun ratingsAllValid(): Boolean {
|
||||||
return monitoring.ratingValid() &&
|
return ratingValid(monitoringRating) &&
|
||||||
controlProcedural.ratingValid() &&
|
ratingValid(controlProceduralRating) &&
|
||||||
control.ratingValid() &&
|
ratingValid(controlRating) &&
|
||||||
conservatism.ratingValid() &&
|
ratingValid(conservatismRating) &&
|
||||||
teamworkCommunications.ratingValid() &&
|
ratingValid(teamworkCommunicationsRating) &&
|
||||||
teamworkLeadership.ratingValid() &&
|
ratingValid(teamworkLeadershipRating) &&
|
||||||
teamworkWorkload.ratingValid() &&
|
ratingValid(teamworkWorkloadRating) &&
|
||||||
knowledge.ratingValid()
|
ratingValid(knowledgeRating)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,14 +161,14 @@ class GroupSessionController {
|
|||||||
date = LocalDate.now(),
|
date = LocalDate.now(),
|
||||||
type = GroupSessionManager.trainingType!!,
|
type = GroupSessionManager.trainingType!!,
|
||||||
observed = x.scenarios.joinToString { it.title },
|
observed = x.scenarios.joinToString { it.title },
|
||||||
monitoring = x.scenarios.map { it.monitoring.rating }.average(),
|
monitoring = x.scenarios.map { it.monitoringRating }.average(),
|
||||||
conservatism = x.scenarios.map { it.conservatism.rating }.average(),
|
conservatism = x.scenarios.map { it.conservatismRating }.average(),
|
||||||
controlProcedural = x.scenarios.map { it.controlProcedural.rating }.average(),
|
controlProcedural = x.scenarios.map { it.controlProceduralRating }.average(),
|
||||||
control = x.scenarios.map { it.control.rating }.average(),
|
control = x.scenarios.map { it.controlRating }.average(),
|
||||||
teamworkCommunications = x.scenarios.map { it.teamworkCommunications.rating }.average(),
|
teamworkCommunications = x.scenarios.map { it.teamworkCommunicationsRating }.average(),
|
||||||
teamworkLeadership = x.scenarios.map { it.teamworkLeadership.rating }.average(),
|
teamworkLeadership = x.scenarios.map { it.teamworkLeadershipRating }.average(),
|
||||||
teamworkWorkload = x.scenarios.map { it.teamworkWorkload.rating }.average(),
|
teamworkWorkload = x.scenarios.map { it.teamworkWorkloadRating }.average(),
|
||||||
knowledge = x.scenarios.map { it.knowledge.rating }.average(),
|
knowledge = x.scenarios.map { it.knowledgeRating }.average(),
|
||||||
scenarios = x.scenarios,
|
scenarios = x.scenarios,
|
||||||
tutors = tutors,
|
tutors = tutors,
|
||||||
person = personRepository.findFirstByNameLike(x.person.toUpperCase())
|
person = personRepository.findFirstByNameLike(x.person.toUpperCase())
|
||||||
|
@ -141,14 +141,14 @@ class ObservationsController {
|
|||||||
date = LocalDate.now(),
|
date = LocalDate.now(),
|
||||||
type = newObservation.type,
|
type = newObservation.type,
|
||||||
observed = newObservation.scenarios.joinToString { it.title },
|
observed = newObservation.scenarios.joinToString { it.title },
|
||||||
monitoring = newObservation.scenarios.map { it.monitoring.rating }.average(),
|
monitoring = newObservation.scenarios.map { it.monitoringRating }.average(),
|
||||||
conservatism = newObservation.scenarios.map { it.conservatism.rating }.average(),
|
conservatism = newObservation.scenarios.map { it.conservatismRating }.average(),
|
||||||
controlProcedural = newObservation.scenarios.map { it.controlProcedural.rating }.average(),
|
controlProcedural = newObservation.scenarios.map { it.controlProceduralRating }.average(),
|
||||||
control = newObservation.scenarios.map { it.control.rating }.average(),
|
control = newObservation.scenarios.map { it.controlRating }.average(),
|
||||||
teamworkCommunications = newObservation.scenarios.map { it.teamworkCommunications.rating }.average(),
|
teamworkCommunications = newObservation.scenarios.map { it.teamworkCommunicationsRating }.average(),
|
||||||
teamworkLeadership = newObservation.scenarios.map { it.teamworkLeadership.rating }.average(),
|
teamworkLeadership = newObservation.scenarios.map { it.teamworkLeadershipRating }.average(),
|
||||||
teamworkWorkload = newObservation.scenarios.map { it.teamworkWorkload.rating }.average(),
|
teamworkWorkload = newObservation.scenarios.map { it.teamworkWorkloadRating }.average(),
|
||||||
knowledge = newObservation.scenarios.map { it.knowledge.rating }.average(),
|
knowledge = newObservation.scenarios.map { it.knowledgeRating }.average(),
|
||||||
scenarios = newObservation.scenarios,
|
scenarios = newObservation.scenarios,
|
||||||
tutors = tutors,
|
tutors = tutors,
|
||||||
person = personRepository.findFirstByNameLike(newObservation.person.toUpperCase()) ?: personRepository.save(Person(name = newObservation.person.toUpperCase()))
|
person = personRepository.findFirstByNameLike(newObservation.person.toUpperCase()) ?: personRepository.save(Person(name = newObservation.person.toUpperCase()))
|
||||||
@ -255,21 +255,21 @@ class ObservationsController {
|
|||||||
logger.debug("Calculating AFI Data for ${data.size} entries")
|
logger.debug("Calculating AFI Data for ${data.size} entries")
|
||||||
for (x in data) {
|
for (x in data) {
|
||||||
for (y in x.scenarios) {
|
for (y in x.scenarios) {
|
||||||
if (y.monitoring.rating <= afiPieThreshold)
|
if (y.monitoringRating <= afiPieThreshold)
|
||||||
monitoring++
|
monitoring++
|
||||||
if (y.knowledge.rating <= afiPieThreshold)
|
if (y.knowledgeRating <= afiPieThreshold)
|
||||||
knowledge++
|
knowledge++
|
||||||
if (y.control.rating <= afiPieThreshold)
|
if (y.controlRating <= afiPieThreshold)
|
||||||
control++
|
control++
|
||||||
if (y.controlProcedural.rating <= afiPieThreshold)
|
if (y.controlProceduralRating <= afiPieThreshold)
|
||||||
control++
|
control++
|
||||||
if (y.conservatism.rating <= afiPieThreshold)
|
if (y.conservatismRating <= afiPieThreshold)
|
||||||
conservatism++
|
conservatism++
|
||||||
if (y.teamworkCommunications.rating <= afiPieThreshold)
|
if (y.teamworkCommunicationsRating <= afiPieThreshold)
|
||||||
teamwork++
|
teamwork++
|
||||||
if (y.teamworkLeadership.rating <= afiPieThreshold)
|
if (y.teamworkLeadershipRating <= afiPieThreshold)
|
||||||
teamwork++
|
teamwork++
|
||||||
if (y.teamworkWorkload.rating <= afiPieThreshold)
|
if (y.teamworkWorkloadRating <= afiPieThreshold)
|
||||||
teamwork++
|
teamwork++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ import uk.co.neviyn.observationdatabase.Observation
|
|||||||
import uk.co.neviyn.observationdatabase.ObservationRepository
|
import uk.co.neviyn.observationdatabase.ObservationRepository
|
||||||
import uk.co.neviyn.observationdatabase.Person
|
import uk.co.neviyn.observationdatabase.Person
|
||||||
import uk.co.neviyn.observationdatabase.PersonRepository
|
import uk.co.neviyn.observationdatabase.PersonRepository
|
||||||
import uk.co.neviyn.observationdatabase.RatingComponent
|
|
||||||
import uk.co.neviyn.observationdatabase.Scenario
|
import uk.co.neviyn.observationdatabase.Scenario
|
||||||
import uk.co.neviyn.observationdatabase.Site
|
import uk.co.neviyn.observationdatabase.Site
|
||||||
import uk.co.neviyn.observationdatabase.SiteRepository
|
import uk.co.neviyn.observationdatabase.SiteRepository
|
||||||
@ -100,8 +99,7 @@ class GroupSessionControllerTest {
|
|||||||
Mockito.doReturn(listOf(tutor)).`when`(tutorRepository).findAllById(listOf(1))
|
Mockito.doReturn(listOf(tutor)).`when`(tutorRepository).findAllById(listOf(1))
|
||||||
val person = Person(1, "A Student")
|
val person = Person(1, "A Student")
|
||||||
Mockito.doReturn(person).`when`(personRepository).save(any())
|
Mockito.doReturn(person).`when`(personRepository).save(any())
|
||||||
val rc = RatingComponent(rating = 5)
|
val scenario = Scenario(0, "Sample title", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "")
|
||||||
val scenario = Scenario(0, "Sample title", rc, rc, rc, rc, rc, rc, rc, rc)
|
|
||||||
Mockito.doReturn(Observation(1, site, LocalDate.now(), TrainingType.INITIAL, "Sample title", 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, listOf(scenario), setOf(tutor), person)).`when`(observationRepository).save(any())
|
Mockito.doReturn(Observation(1, site, LocalDate.now(), TrainingType.INITIAL, "Sample title", 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, listOf(scenario), setOf(tutor), person)).`when`(observationRepository).save(any())
|
||||||
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
||||||
controller.addGroupObservation(GroupObservation("A Student", listOf(scenario)))
|
controller.addGroupObservation(GroupObservation("A Student", listOf(scenario)))
|
||||||
@ -126,9 +124,8 @@ class GroupSessionControllerTest {
|
|||||||
Mockito.doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
Mockito.doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
||||||
Mockito.doReturn(listOf(Tutor(1, "Mr X", site))).`when`(tutorRepository).findAllById(listOf(1))
|
Mockito.doReturn(listOf(Tutor(1, "Mr X", site))).`when`(tutorRepository).findAllById(listOf(1))
|
||||||
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
||||||
val rc = RatingComponent(rating = 5)
|
controller.addGroupObservation(GroupObservation("A Student", listOf(Scenario(0, "Sample title", 0, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", ""))))
|
||||||
controller.addGroupObservation(GroupObservation("A Student", listOf(Scenario(0, "Sample title", RatingComponent(rating = 0), rc, rc, rc, rc, rc, rc, rc))))
|
verify(websocketMessenger, times(1)).convertAndSend("/ws/scenarios", mapOf("scenarios" to mapOf("Sample title" to listOf(Scenario(0, "A Student", 0, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "")))))
|
||||||
verify(websocketMessenger, times(1)).convertAndSend("/ws/scenarios", mapOf("scenarios" to mapOf("Sample title" to listOf(Scenario(0, "A Student", RatingComponent(rating = 0), rc, rc, rc, rc, rc, rc, rc)))))
|
|
||||||
controller.pushObservationsToDatabase()
|
controller.pushObservationsToDatabase()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,8 +135,7 @@ class GroupSessionControllerTest {
|
|||||||
Mockito.doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
Mockito.doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
||||||
Mockito.doReturn(listOf(Tutor(1, "Mr X", site))).`when`(tutorRepository).findAllById(listOf(1))
|
Mockito.doReturn(listOf(Tutor(1, "Mr X", site))).`when`(tutorRepository).findAllById(listOf(1))
|
||||||
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
||||||
val rc = RatingComponent(rating = 5)
|
controller.addGroupObservation(GroupObservation("A Student", listOf(Scenario(0, "Different Title", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", ""))))
|
||||||
controller.addGroupObservation(GroupObservation("A Student", listOf(Scenario(0, "Different Title", rc, rc, rc, rc, rc, rc, rc, rc))))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -148,8 +144,7 @@ class GroupSessionControllerTest {
|
|||||||
Mockito.doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
Mockito.doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
||||||
Mockito.doReturn(listOf(Tutor(1, "Mr X", site))).`when`(tutorRepository).findAllById(listOf(1))
|
Mockito.doReturn(listOf(Tutor(1, "Mr X", site))).`when`(tutorRepository).findAllById(listOf(1))
|
||||||
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title")))
|
||||||
val rc = RatingComponent(rating = 5)
|
controller.addGroupObservation(GroupObservation("A Student", listOf(Scenario(0, "Sample title", 0, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", ""))))
|
||||||
controller.addGroupObservation(GroupObservation("A Student", listOf(Scenario(0, "Sample title", RatingComponent(rating = 0), rc, rc, rc, rc, rc, rc, rc))))
|
|
||||||
assertEquals(1, GroupSessionManager.observations.size)
|
assertEquals(1, GroupSessionManager.observations.size)
|
||||||
assertEquals("A Student", GroupSessionManager.observations.keys.first())
|
assertEquals("A Student", GroupSessionManager.observations.keys.first())
|
||||||
assertEquals("A Student", GroupSessionManager.observations.values.first().person)
|
assertEquals("A Student", GroupSessionManager.observations.values.first().person)
|
||||||
@ -162,16 +157,14 @@ class GroupSessionControllerTest {
|
|||||||
|
|
||||||
@Test(expected = ResponseStatusException::class)
|
@Test(expected = ResponseStatusException::class)
|
||||||
fun testGetParticipantData_WrongName() {
|
fun testGetParticipantData_WrongName() {
|
||||||
val rc = RatingComponent(rating = 5)
|
val testData = GroupObservation("A Student", listOf(Scenario(0, "Sample title", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "")))
|
||||||
val testData = GroupObservation("A Student", listOf(Scenario(0, "Sample title", rc, rc, rc, rc, rc, rc, rc, rc)))
|
|
||||||
GroupSessionManager.observations["A Student"] = testData
|
GroupSessionManager.observations["A Student"] = testData
|
||||||
controller.getParticipantData("Another Student")
|
controller.getParticipantData("Another Student")
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testGetParticipantData() {
|
fun testGetParticipantData() {
|
||||||
val rc = RatingComponent(rating = 5)
|
val testData = GroupObservation("A Student", listOf(Scenario(0, "Sample title", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "")))
|
||||||
val testData = GroupObservation("A Student", listOf(Scenario(0, "Sample title", rc, rc, rc, rc, rc, rc, rc, rc)))
|
|
||||||
GroupSessionManager.observations["A Student"] = testData
|
GroupSessionManager.observations["A Student"] = testData
|
||||||
val output = controller.getParticipantData("A Student")
|
val output = controller.getParticipantData("A Student")
|
||||||
assertEquals(testData, output)
|
assertEquals(testData, output)
|
||||||
|
@ -25,7 +25,6 @@ import uk.co.neviyn.observationdatabase.ObservationRepository
|
|||||||
import uk.co.neviyn.observationdatabase.ObservationsRequest
|
import uk.co.neviyn.observationdatabase.ObservationsRequest
|
||||||
import uk.co.neviyn.observationdatabase.Person
|
import uk.co.neviyn.observationdatabase.Person
|
||||||
import uk.co.neviyn.observationdatabase.PersonRepository
|
import uk.co.neviyn.observationdatabase.PersonRepository
|
||||||
import uk.co.neviyn.observationdatabase.RatingComponent
|
|
||||||
import uk.co.neviyn.observationdatabase.Scenario
|
import uk.co.neviyn.observationdatabase.Scenario
|
||||||
import uk.co.neviyn.observationdatabase.Site
|
import uk.co.neviyn.observationdatabase.Site
|
||||||
import uk.co.neviyn.observationdatabase.SiteRepository
|
import uk.co.neviyn.observationdatabase.SiteRepository
|
||||||
@ -124,8 +123,7 @@ class ObservationsControllerTest {
|
|||||||
doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
doReturn(Optional.of(site)).`when`(siteRepository).findById(1)
|
||||||
doReturn(listOf(tutor)).`when`(tutorRepository).findAllById(listOf(1))
|
doReturn(listOf(tutor)).`when`(tutorRepository).findAllById(listOf(1))
|
||||||
doReturn(person).`when`(personRepository).findFirstByNameLike("MR X")
|
doReturn(person).`when`(personRepository).findFirstByNameLike("MR X")
|
||||||
val defaultComponent = RatingComponent(rating = 5, strengths = "", improvements = "")
|
val newData = NewObservation(1, TrainingType.INITIAL, "An Observation", listOf(Scenario(1, "Something", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "", 5, "", "")), listOf(1), "Mr X")
|
||||||
val newData = NewObservation(1, TrainingType.INITIAL, "An Observation", listOf(Scenario(title = "Something", monitoring = defaultComponent, controlProcedural = defaultComponent, control = defaultComponent, conservatism = defaultComponent, teamworkCommunications = defaultComponent, teamworkLeadership = defaultComponent, teamworkWorkload = defaultComponent, knowledge = defaultComponent)), listOf(1), "Mr X")
|
|
||||||
val observation = Observation(1, site, LocalDate.now(), TrainingType.INITIAL, "An Observation", 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, newData.scenarios, setOf(tutor), person)
|
val observation = Observation(1, site, LocalDate.now(), TrainingType.INITIAL, "An Observation", 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, newData.scenarios, setOf(tutor), person)
|
||||||
doReturn(observation).`when`(observationRepository).save(ArgumentMatchers.any())
|
doReturn(observation).`when`(observationRepository).save(ArgumentMatchers.any())
|
||||||
val result = controller.addObservation(newData)
|
val result = controller.addObservation(newData)
|
||||||
|
@ -3,22 +3,22 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col cols="3">
|
<b-col cols="3">
|
||||||
<p>{{ description }}</p>
|
<p>{{ description }}</p>
|
||||||
<h4 v-bind:class="{ scorewarn: scenariofundamental.rating < 3 }">
|
<h4 v-bind:class="{ scorewarn: rating < 3 }">
|
||||||
{{ scenariofundamental.rating }}
|
{{ rating }}
|
||||||
</h4>
|
</h4>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="9">
|
<b-col cols="9">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
:value="scenariofundamental.strengths"
|
:value="strengths"
|
||||||
placeholder="-"
|
placeholder="-"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
no-resize
|
no-resize
|
||||||
class="strength"
|
class="strengths"
|
||||||
readonly
|
readonly
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
:value="scenariofundamental.improvements"
|
:value="improvements"
|
||||||
placeholder="-"
|
placeholder="-"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ["scenariofundamental", "description"]
|
props: ["rating", "strengths", "improvements", "description"]
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Monitoring</h5>
|
<h5>Monitoring</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.monitoring.rating"
|
:score-value="item.monitoringRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.monitoring.rating = $event;
|
item.monitoringRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.monitoring.strengths"
|
v-model="item.monitoringStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -79,7 +79,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.monitoring.improvements"
|
v-model="item.monitoringImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -94,9 +94,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Control Procedural</h5>
|
<h5>Control Procedural</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.controlProcedural.rating"
|
:score-value="item.controlProceduralRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.controlProcedural.rating = $event;
|
item.controlProceduralRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -105,7 +105,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.controlProcedural.strengths"
|
v-model="item.controlProceduralStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -113,7 +113,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.controlProcedural.improvements"
|
v-model="item.controlProceduralImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -128,9 +128,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Control</h5>
|
<h5>Control</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.control.rating"
|
:score-value="item.controlRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.control.rating = $event;
|
item.controlRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -139,7 +139,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.control.strengths"
|
v-model="item.controlStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -147,7 +147,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.control.improvements"
|
v-model="item.controlImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -162,9 +162,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Conservatism</h5>
|
<h5>Conservatism</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.conservatism.rating"
|
:score-value="item.conservatismRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.conservatism.rating = $event;
|
item.conservatismRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -173,7 +173,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.conservatism.strengths"
|
v-model="item.conservatismStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -181,7 +181,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.conservatism.improvements"
|
v-model="item.conservatismImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -196,9 +196,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Teamwork Communications</h5>
|
<h5>Teamwork Communications</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.teamworkCommunications.rating"
|
:score-value="item.teamworkCommunicationsRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.teamworkCommunications.rating = $event;
|
item.teamworkCommunicationsRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -207,7 +207,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkCommunications.strengths"
|
v-model="item.teamworkCommunicationsStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -215,7 +215,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkCommunications.improvements"
|
v-model="item.teamworkCommunicationsImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -230,9 +230,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Teamwork Leadership</h5>
|
<h5>Teamwork Leadership</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.teamworkLeadership.rating"
|
:score-value="item.teamworkLeadershipRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.teamworkLeadership.rating = $event;
|
item.teamworkLeadershipRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -241,7 +241,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkLeadership.strengths"
|
v-model="item.teamworkLeadershipStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -249,7 +249,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkLeadership.improvements"
|
v-model="item.teamworkLeadershipImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -264,9 +264,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Teamwork Workload</h5>
|
<h5>Teamwork Workload</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.teamworkWorkload.rating"
|
:score-value="item.teamworkWorkloadRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.teamworkWorkload.rating = $event;
|
item.teamworkWorkloadRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -275,7 +275,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkWorkload.strengths"
|
v-model="item.teamworkWorkloadStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -283,7 +283,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkWorkload.improvements"
|
v-model="item.teamworkWorkloadImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -298,9 +298,9 @@
|
|||||||
<b-col>
|
<b-col>
|
||||||
<h5>Knowledge</h5>
|
<h5>Knowledge</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.knowledge.rating"
|
:score-value="item.knowledgeRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.knowledge.rating = $event;
|
item.knowledgeRating = $event;
|
||||||
actuallySubmit();
|
actuallySubmit();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
@ -309,7 +309,7 @@
|
|||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.knowledge.strengths"
|
v-model="item.knowledgeStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -317,7 +317,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.knowledge.improvements"
|
v-model="item.knowledgeImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -385,46 +385,30 @@ export default {
|
|||||||
addAnotherObservation: function(newTitle) {
|
addAnotherObservation: function(newTitle) {
|
||||||
this.scenarios.push({
|
this.scenarios.push({
|
||||||
title: newTitle,
|
title: newTitle,
|
||||||
monitoring: {
|
monitoringRating: 0,
|
||||||
rating: 0,
|
monitoringStrengths: "",
|
||||||
strengths: "",
|
monitoringImprovements: "",
|
||||||
improvements: ""
|
controlProceduralRating: 0,
|
||||||
},
|
controlProceduralStrengths: "",
|
||||||
controlProcedural: {
|
controlProceduralImprovements: "",
|
||||||
rating: 0,
|
controlRating: 0,
|
||||||
strengths: "",
|
controlStrengths: "",
|
||||||
improvements: ""
|
controlImprovements: "",
|
||||||
},
|
conservatismRating: 0,
|
||||||
control: {
|
conservatismStrengths: "",
|
||||||
rating: 0,
|
conservatismImprovements: "",
|
||||||
strengths: "",
|
teamworkCommunicationsRating: 0,
|
||||||
improvements: ""
|
teamworkCommunicationsStrengths: "",
|
||||||
},
|
teamworkCommunicationsImprovements: "",
|
||||||
conservatism: {
|
teamworkLeadershipRating: 0,
|
||||||
rating: 0,
|
teamworkLeadershipStrengths: "",
|
||||||
strengths: "",
|
teamworkLeadershipImprovements: "",
|
||||||
improvements: ""
|
teamworkWorkloadRating: 0,
|
||||||
},
|
teamworkWorkloadStrengths: "",
|
||||||
teamworkCommunications: {
|
teamworkWorkloadImprovements: "",
|
||||||
rating: 0,
|
knowledgeRating: 0,
|
||||||
strengths: "",
|
knowledgeStrengths: "",
|
||||||
improvements: ""
|
knowledgeImprovements: ""
|
||||||
},
|
|
||||||
teamworkLeadership: {
|
|
||||||
rating: 0,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
},
|
|
||||||
teamworkWorkload: {
|
|
||||||
rating: 0,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
},
|
|
||||||
knowledge: {
|
|
||||||
rating: 0,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
actuallySubmit() {
|
actuallySubmit() {
|
||||||
|
@ -151,16 +151,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Monitoring</h5>
|
<h5>Monitoring</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.monitoring.rating"
|
:score-value="item.monitoringRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.monitoring.rating = $event;
|
item.monitoringRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.monitoring.strengths"
|
v-model="item.monitoringStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -168,7 +168,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.monitoring.improvements"
|
v-model="item.monitoringImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -183,16 +183,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Control Procedural</h5>
|
<h5>Control Procedural</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.controlProcedural.rating"
|
:score-value="item.controlProceduralRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.controlProcedural.rating = $event;
|
item.controlProceduralRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.controlProcedural.strengths"
|
v-model="item.controlProceduralStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -200,7 +200,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.controlProcedural.improvements"
|
v-model="item.controlProceduralImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -217,16 +217,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Control</h5>
|
<h5>Control</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.control.rating"
|
:score-value="item.controlRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.control.rating = $event;
|
item.controlRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.control.strengths"
|
v-model="item.controlStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -234,7 +234,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.control.improvements"
|
v-model="item.controlImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -249,16 +249,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Conservatism</h5>
|
<h5>Conservatism</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.conservatism.rating"
|
:score-value="item.conservatismRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.conservatism.rating = $event;
|
item.conservatismRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.conservatism.strengths"
|
v-model="item.conservatismStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -266,7 +266,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.conservatism.improvements"
|
v-model="item.conservatismImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -283,16 +283,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Teamwork Communications</h5>
|
<h5>Teamwork Communications</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.teamworkCommunications.rating"
|
:score-value="item.teamworkCommunicationsRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.teamworkCommunications.rating = $event;
|
item.teamworkCommunicationsRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkCommunications.strengths"
|
v-model="item.teamworkCommunicationsStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -300,7 +300,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkCommunications.improvements"
|
v-model="item.teamworkCommunicationsImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -315,16 +315,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Teamwork Leadership</h5>
|
<h5>Teamwork Leadership</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.teamworkLeadership.rating"
|
:score-value="item.teamworkLeadershipRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.teamworkLeadership.rating = $event;
|
item.teamworkLeadershipRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkLeadership.strengths"
|
v-model="item.teamworkLeadershipStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -332,7 +332,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkLeadership.improvements"
|
v-model="item.teamworkLeadershipImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -349,16 +349,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Teamwork Workload</h5>
|
<h5>Teamwork Workload</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.teamworkWorkload.rating"
|
:score-value="item.teamworkWorkloadRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.teamworkWorkload.rating = $event;
|
item.teamworkWorkloadRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkWorkload.strengths"
|
v-model="item.teamworkWorkloadStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -366,7 +366,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.teamworkWorkload.improvements"
|
v-model="item.teamworkWorkloadImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -381,16 +381,16 @@
|
|||||||
<b-col cols="4">
|
<b-col cols="4">
|
||||||
<h5>Knowledge</h5>
|
<h5>Knowledge</h5>
|
||||||
<score-selector
|
<score-selector
|
||||||
:score-value="item.knowledge.rating"
|
:score-value="item.knowledgeRating"
|
||||||
v-on:newselection="
|
v-on:newselection="
|
||||||
item.knowledge.rating = $event;
|
item.knowledgeRating = $event;
|
||||||
updateTotals();
|
updateTotals();
|
||||||
"
|
"
|
||||||
></score-selector>
|
></score-selector>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.knowledge.strengths"
|
v-model="item.knowledgeStrengths"
|
||||||
placeholder="Strengths"
|
placeholder="Strengths"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -398,7 +398,7 @@
|
|||||||
class="strength"
|
class="strength"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
v-model="item.knowledge.improvements"
|
v-model="item.knowledgeImprovements"
|
||||||
placeholder="AFIs"
|
placeholder="AFIs"
|
||||||
:rows="1"
|
:rows="1"
|
||||||
:max-rows="2"
|
:max-rows="2"
|
||||||
@ -479,46 +479,30 @@ export default {
|
|||||||
scenarios: [
|
scenarios: [
|
||||||
{
|
{
|
||||||
title: "",
|
title: "",
|
||||||
monitoring: {
|
monitoringRating: null,
|
||||||
rating: null,
|
monitoringStrengths: "",
|
||||||
strengths: "",
|
monitoringImprovements: "",
|
||||||
improvements: ""
|
controlProceduralRating: null,
|
||||||
},
|
controlProceduralStrengths: "",
|
||||||
controlProcedural: {
|
controlProceduralImprovements: "",
|
||||||
rating: null,
|
controlRating: null,
|
||||||
strengths: "",
|
controlStrengths: "",
|
||||||
improvements: ""
|
controlImprovements: "",
|
||||||
},
|
conservatismRating: null,
|
||||||
control: {
|
conservatismStrengths: "",
|
||||||
rating: null,
|
conservatismImprovements: "",
|
||||||
strengths: "",
|
teamworkCommunicationsRating: null,
|
||||||
improvements: ""
|
teamworkCommunicationsStrengths: "",
|
||||||
},
|
teamworkCommunicationsImprovements: "",
|
||||||
conservatism: {
|
teamworkLeadershipRating: null,
|
||||||
rating: null,
|
teamworkLeadershipStrengths: "",
|
||||||
strengths: "",
|
teamworkLeadershipImprovements: "",
|
||||||
improvements: ""
|
teamworkWorkloadRating: null,
|
||||||
},
|
teamworkWorkloadStrengths: "",
|
||||||
teamworkCommunications: {
|
teamworkWorkloadImprovements: "",
|
||||||
rating: null,
|
knowledgeRating: null,
|
||||||
strengths: "",
|
knowledgeStrengths: "",
|
||||||
improvements: ""
|
knowledgeImprovements: ""
|
||||||
},
|
|
||||||
teamworkLeadership: {
|
|
||||||
rating: null,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
},
|
|
||||||
teamworkWorkload: {
|
|
||||||
rating: null,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
},
|
|
||||||
knowledge: {
|
|
||||||
rating: null,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
totals: [0, 0, 0, 0, 0, 0, 0, 0],
|
totals: [0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
@ -533,46 +517,30 @@ export default {
|
|||||||
addAnotherObservation: function() {
|
addAnotherObservation: function() {
|
||||||
this.scenarios.push({
|
this.scenarios.push({
|
||||||
title: "",
|
title: "",
|
||||||
monitoring: {
|
monitoringRating: null,
|
||||||
rating: null,
|
monitoringStrengths: "",
|
||||||
strengths: "",
|
monitoringImprovements: "",
|
||||||
improvements: ""
|
controlProceduralRating: null,
|
||||||
},
|
controlProceduralStrengths: "",
|
||||||
controlProcedural: {
|
controlProceduralImprovements: "",
|
||||||
rating: null,
|
controlRating: null,
|
||||||
strengths: "",
|
controlStrengths: "",
|
||||||
improvements: ""
|
controlImprovements: "",
|
||||||
},
|
conservatismRating: null,
|
||||||
control: {
|
conservatismStrengths: "",
|
||||||
rating: null,
|
conservatismImprovements: "",
|
||||||
strengths: "",
|
teamworkCommunicationsRating: null,
|
||||||
improvements: ""
|
teamworkCommunicationsStrengths: "",
|
||||||
},
|
teamworkCommunicationsImprovements: "",
|
||||||
conservatism: {
|
teamworkLeadershipRating: null,
|
||||||
rating: null,
|
teamworkLeadershipStrengths: "",
|
||||||
strengths: "",
|
teamworkLeadershipImprovements: "",
|
||||||
improvements: ""
|
teamworkWorkloadRating: null,
|
||||||
},
|
teamworkWorkloadStrengths: "",
|
||||||
teamworkCommunications: {
|
teamworkWorkloadImprovements: "",
|
||||||
rating: null,
|
knowledgeRating: null,
|
||||||
strengths: "",
|
knowledgeStrengths: "",
|
||||||
improvements: ""
|
knowledgeImprovements: ""
|
||||||
},
|
|
||||||
teamworkLeadership: {
|
|
||||||
rating: null,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
},
|
|
||||||
teamworkWorkload: {
|
|
||||||
rating: null,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
},
|
|
||||||
knowledge: {
|
|
||||||
rating: null,
|
|
||||||
strengths: "",
|
|
||||||
improvements: ""
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
Vue.nextTick(function() {
|
Vue.nextTick(function() {
|
||||||
window.scrollTo(
|
window.scrollTo(
|
||||||
@ -592,36 +560,36 @@ export default {
|
|||||||
var iTotals = [0, 0, 0, 0, 0, 0, 0, 0];
|
var iTotals = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
var counts = [0, 0, 0, 0, 0, 0, 0, 0];
|
var counts = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
this.scenarios.forEach(function(element) {
|
this.scenarios.forEach(function(element) {
|
||||||
if (element.monitoring.rating) {
|
if (element.monitoringRating) {
|
||||||
iTotals[0] += parseInt(element.monitoring.rating);
|
iTotals[0] += parseInt(element.monitoringRating);
|
||||||
counts[0] += 1;
|
counts[0] += 1;
|
||||||
}
|
}
|
||||||
if (element.controlProcedural.rating) {
|
if (element.controlProceduralRating) {
|
||||||
iTotals[1] += parseInt(element.controlProcedural.rating);
|
iTotals[1] += parseInt(element.controlProceduralRating);
|
||||||
counts[1] += 1;
|
counts[1] += 1;
|
||||||
}
|
}
|
||||||
if (element.control.rating) {
|
if (element.controlRating) {
|
||||||
iTotals[2] += parseInt(element.control.rating);
|
iTotals[2] += parseInt(element.controlRating);
|
||||||
counts[2] += 1;
|
counts[2] += 1;
|
||||||
}
|
}
|
||||||
if (element.conservatism.rating) {
|
if (element.conservatismRating) {
|
||||||
iTotals[3] += parseInt(element.conservatism.rating);
|
iTotals[3] += parseInt(element.conservatismRating);
|
||||||
counts[3] += 1;
|
counts[3] += 1;
|
||||||
}
|
}
|
||||||
if (element.teamworkCommunications.rating) {
|
if (element.teamworkCommunicationsRating) {
|
||||||
iTotals[4] += parseInt(element.teamworkCommunications.rating);
|
iTotals[4] += parseInt(element.teamworkCommunicationsRating);
|
||||||
counts[4] += 1;
|
counts[4] += 1;
|
||||||
}
|
}
|
||||||
if (element.teamworkLeadership.rating) {
|
if (element.teamworkLeadershipRating) {
|
||||||
iTotals[5] += parseInt(element.teamworkLeadership.rating);
|
iTotals[5] += parseInt(element.teamworkLeadershipRating);
|
||||||
counts[5] += 1;
|
counts[5] += 1;
|
||||||
}
|
}
|
||||||
if (element.teamworkWorkload.rating) {
|
if (element.teamworkWorkloadRating) {
|
||||||
iTotals[6] += parseInt(element.teamworkWorkload.rating);
|
iTotals[6] += parseInt(element.teamworkWorkloadRating);
|
||||||
counts[6] += 1;
|
counts[6] += 1;
|
||||||
}
|
}
|
||||||
if (element.knowledge.rating) {
|
if (element.knowledgeRating) {
|
||||||
iTotals[7] += parseInt(element.knowledge.rating);
|
iTotals[7] += parseInt(element.knowledgeRating);
|
||||||
counts[7] += 1;
|
counts[7] += 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -258,41 +258,57 @@
|
|||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.monitoring"
|
:rating="entry.monitoringRating"
|
||||||
|
:strengths="entry.monitoringStrengths"
|
||||||
|
:improvements="entry.monitoringImprovements"
|
||||||
:description="'Monitoring'"
|
:description="'Monitoring'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.controlProcedural"
|
:rating="entry.controlProceduralRating"
|
||||||
|
:strengths="entry.controlProceduralStrengths"
|
||||||
|
:improvements="entry.controlProceduralImprovements"
|
||||||
:description="'Control Procedural'"
|
:description="'Control Procedural'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.control"
|
:rating="entry.controlRating"
|
||||||
|
:strengths="entry.controlStrengths"
|
||||||
|
:improvements="entry.controlImprovements"
|
||||||
:description="'Control'"
|
:description="'Control'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.conservatism"
|
:rating="entry.conservatismRating"
|
||||||
|
:strengths="entry.conservatismStrengths"
|
||||||
|
:improvements="entry.conservatismImprovements"
|
||||||
:description="'Conservatism'"
|
:description="'Conservatism'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.teamworkCommunications"
|
:rating="entry.teamworkCommunicationsRating"
|
||||||
|
:strengths="entry.teamworkCommunicationsStrengths"
|
||||||
|
:improvements="entry.teamworkCommunicationsImprovements"
|
||||||
:description="'Teamwork Communications'"
|
:description="'Teamwork Communications'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.teamworkLeadership"
|
:rating="entry.teamworkLeadershipRating"
|
||||||
|
:strengths="entry.teamworkLeadershipStrengths"
|
||||||
|
:improvements="entry.teamworkLeadershipImprovements"
|
||||||
:description="'Teamwork Leadership'"
|
:description="'Teamwork Leadership'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.teamworkWorkload"
|
:rating="entry.teamworkWorkloadRating"
|
||||||
|
:strengths="entry.teamworkWorkloadStrengths"
|
||||||
|
:improvements="entry.teamworkWorkloadImprovements"
|
||||||
:description="'Teamwork Workload'"
|
:description="'Teamwork Workload'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
<observation-entry
|
<observation-entry
|
||||||
:scenariofundamental="entry.knowledge"
|
:rating="entry.knowledgeRating"
|
||||||
|
:strengths="entry.knowledgeStrengths"
|
||||||
|
:improvements="entry.knowledgeImprovements"
|
||||||
:description="'Knowledge'"
|
:description="'Knowledge'"
|
||||||
></observation-entry>
|
></observation-entry>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
Loading…
Reference in New Issue
Block a user