Added Day shift selector entry, temporary diversion from task database csv style
This commit is contained in:
parent
f2d4a76e74
commit
8016c4163e
@ -99,7 +99,7 @@ data class Observation(
|
||||
val persons: Set<Person>
|
||||
) {
|
||||
fun toCsvFormat(): String {
|
||||
return ",,\"${tutors.elementAt(0).name}\",$date,\"$observed\",\"Training\",\"Performance Improvement - Training\",\"${site.name}\",\"N/A\"," +
|
||||
return ",,\"${tutors.joinToString { it.name }}\",$date,\"$observed\",\"Training\",\"Performance Improvement - Training\",\"${site.name}\",\"N/A\"," +
|
||||
"${roundScore(monitoring)},${roundScore(controlProcedural)},${roundScore(control)}," +
|
||||
"${roundScore(conservatism)},${roundScore(teamworkCommunications)},${roundScore(teamworkLeadership)}," +
|
||||
"${roundScore(teamworkWorkload)},${roundScore(knowledge)},\"${getStrengths(RatingCategory.MONITORING)}\"," +
|
||||
@ -113,11 +113,11 @@ data class Observation(
|
||||
}
|
||||
|
||||
private fun getStrengths(category: RatingCategory): String {
|
||||
return entries.asSequence().filter { it.type == category }.map { it.strengths }.joinToString()
|
||||
return entries.asSequence().filter { it.type == category && it.strengths.isNotBlank() }.map { it.strengths }.joinToString()
|
||||
}
|
||||
|
||||
private fun getImprovements(category: RatingCategory): String {
|
||||
return entries.asSequence().filter { it.type == category }.map { it.improvements }.joinToString()
|
||||
return entries.asSequence().filter { it.type == category && it.improvements.isNotBlank() }.map { it.improvements }.joinToString()
|
||||
}
|
||||
|
||||
private fun roundScore(input: Double?): String {
|
||||
|
@ -41,6 +41,7 @@
|
||||
<option value="C">C</option>
|
||||
<option value="D">D</option>
|
||||
<option value="E">E</option>
|
||||
<option value="DAY">Day</option>
|
||||
</b-form-select>
|
||||
</b-form-group>
|
||||
</b-col>
|
||||
|
Loading…
Reference in New Issue
Block a user