newUI #1
@ -3,11 +3,12 @@
|
|||||||
<b-form-radio-group
|
<b-form-radio-group
|
||||||
buttons
|
buttons
|
||||||
button-variant="outline-info"
|
button-variant="outline-info"
|
||||||
size="lg"
|
size="custom"
|
||||||
v-model="propModel"
|
v-model="propModel"
|
||||||
invalid-feedback="Please select a score."
|
invalid-feedback="Please select a score."
|
||||||
required
|
required
|
||||||
>
|
>
|
||||||
|
<b-form-radio button-variant="0" value=null> </b-form-radio>
|
||||||
<b-form-radio button-variant="1" value="1">1</b-form-radio>
|
<b-form-radio button-variant="1" value="1">1</b-form-radio>
|
||||||
<b-form-radio button-variant="2" value="2">2</b-form-radio>
|
<b-form-radio button-variant="2" value="2">2</b-form-radio>
|
||||||
<b-form-radio button-variant="3" value="3">3</b-form-radio>
|
<b-form-radio button-variant="3" value="3">3</b-form-radio>
|
||||||
@ -27,13 +28,16 @@ export default {
|
|||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
this.$emit("newselection", value);
|
this.$emit("newselection", value);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
b-form-radio-group {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
.btn-1 {
|
.btn-1 {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background-color: #cc3232;
|
background-color: #cc3232;
|
||||||
@ -243,4 +247,51 @@ fieldset[disabled] .btn-5.active {
|
|||||||
color: #2dc937;
|
color: #2dc937;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
}
|
}
|
||||||
|
.btn-0 {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #6c757d;
|
||||||
|
border-color: #000000;
|
||||||
|
}
|
||||||
|
.btn-0:hover,
|
||||||
|
.btn-0:focus,
|
||||||
|
.btn-0:active,
|
||||||
|
.btn-0.active,
|
||||||
|
.open .dropdown-toggle.btn-0 {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #4285f4;
|
||||||
|
border-color: #000000;
|
||||||
|
}
|
||||||
|
.btn-0:active,
|
||||||
|
.btn-0.active,
|
||||||
|
.open .dropdown-toggle.btn-0 {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-0.disabled,
|
||||||
|
.btn-0[disabled],
|
||||||
|
fieldset[disabled] .btn-0,
|
||||||
|
.btn-0.disabled:hover,
|
||||||
|
.btn-0[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-0:hover,
|
||||||
|
.btn-0.disabled:focus,
|
||||||
|
.btn-0[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-0:focus,
|
||||||
|
.btn-0.disabled:active,
|
||||||
|
.btn-0[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-0:active,
|
||||||
|
.btn-0.disabled.active,
|
||||||
|
.btn-0[disabled].active,
|
||||||
|
fieldset[disabled] .btn-0.active {
|
||||||
|
background-color: #6c757d;
|
||||||
|
border-color: #4285f4;
|
||||||
|
}
|
||||||
|
.btn-0 .badge {
|
||||||
|
color: #6c757d;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-custom {
|
||||||
|
padding: 10px 13px;
|
||||||
|
font-size: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,125 +1,122 @@
|
|||||||
<template>
|
<template>
|
||||||
<b-container fluid>
|
<b-container fluid>
|
||||||
<b-container
|
<!-- v-if="type != null && whom != null && site != null && tutors != null" -->
|
||||||
v-if="type != null && whom != null && site != null && tutors != null"
|
<b-container v-if="true" fluid style="padding-left: 130px;">
|
||||||
fluid
|
|
||||||
style="padding-left: 130px;"
|
|
||||||
>
|
|
||||||
<h3>
|
<h3>
|
||||||
<v-icon name="tag" scale="1.5" />
|
<v-icon name="tag" scale="1.5" />
|
||||||
{{ type }} / {{ whom }}
|
{{ type }} / {{ whom }}
|
||||||
</h3>
|
</h3>
|
||||||
<b-container class="sidebar">
|
<b-container class="sidebar">
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[0] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Monitoring.svg"
|
src="../assets/Monitoring.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[0] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[0] < warningBound && totals[0] > 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[0] }}</div>
|
<div class="image-centered-text" v-if="totals[0] > 0">
|
||||||
|
{{ totals[0] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[1] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Control.svg"
|
src="../assets/Control.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[1] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[1] < warningBound && totals[1] > 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[1] }}</div>
|
<div class="image-centered-text" v-if="totals[1] > 0">
|
||||||
|
{{ totals[1] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[2] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Control.svg"
|
src="../assets/Control.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[2] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[2] < warningBound && totals[2] > 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[2] }}</div>
|
<div class="image-centered-text" v-if="totals[2] > 0">
|
||||||
|
{{ totals[2] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[3] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Conservatism.svg"
|
src="../assets/Conservatism.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[3] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[3] < warningBound && totals[3] > 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[3] }}</div>
|
<div class="image-centered-text" v-if="totals[3] > 0">
|
||||||
|
{{ totals[3] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[4] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Teamwork.svg"
|
src="../assets/Teamwork.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[4] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[4] < warningBound && totals[4] > 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[4] }}</div>
|
<div class="image-centered-text" v-if="totals[4] > 0">
|
||||||
|
{{ totals[4] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[5] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Teamwork.svg"
|
src="../assets/Teamwork.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[5] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[5] < warningBound && totals[5] > 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[5] }}</div>
|
<div class="image-centered-text" v-if="totals[5] > 0">
|
||||||
|
{{ totals[5] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[6] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Teamwork.svg"
|
src="../assets/Teamwork.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[6] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[6] < warningBound && totals[6] > 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[6] }}</div>
|
<div class="image-centered-text" v-if="totals[6] > 0">
|
||||||
|
{{ totals[6] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
align-v="center"
|
|
||||||
class="sidebar-vert-padding"
|
|
||||||
v-if="totals[7] > 0"
|
|
||||||
>
|
|
||||||
<b-col class="centered-image">
|
<b-col class="centered-image">
|
||||||
<img
|
<img
|
||||||
src="../assets/Knowledge.svg"
|
src="../assets/Knowledge.svg"
|
||||||
class="image-opacity"
|
class="image-opacity"
|
||||||
v-bind:class="{ scorewarning: totals[7] < warningBound }"
|
v-bind:class="{
|
||||||
|
scorewarning: totals[7] < warningBound && totals[7] != 0,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
<div class="image-centered-text">{{ totals[7] }}</div>
|
<div class="image-centered-text" v-if="totals[7] > 0">
|
||||||
|
{{ totals[7] }}
|
||||||
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
@ -140,7 +137,9 @@
|
|||||||
></b-form-input>
|
></b-form-input>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<b-col cols="1">
|
||||||
<b-button v-on:click="deleteObservation(index)" variant="outline-danger"
|
<b-button
|
||||||
|
v-on:click="deleteObservation(index)"
|
||||||
|
variant="outline-danger"
|
||||||
><b>Delete</b></b-button
|
><b>Delete</b></b-button
|
||||||
>
|
>
|
||||||
</b-col>
|
</b-col>
|
||||||
@ -160,14 +159,22 @@
|
|||||||
class="my-3"
|
class="my-3"
|
||||||
></b-form-select>
|
></b-form-select>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<b-button class="mr-3" variant="outline-danger" size="sm" v-on:click="deleteEntry(index, entryIndex)" v-b-tooltip.hover title="Delete this entry">X</b-button>
|
<b-button
|
||||||
<score-selector
|
class="mr-2"
|
||||||
:score-value="entry.rating"
|
variant="outline-danger"
|
||||||
v-on:newselection="
|
size="sm"
|
||||||
entry.rating = $event;
|
v-on:click="deleteEntry(index, entryIndex)"
|
||||||
updateTotals();
|
v-b-tooltip.hover
|
||||||
"
|
title="Delete this entry"
|
||||||
></score-selector>
|
>X</b-button
|
||||||
|
>
|
||||||
|
<score-selector
|
||||||
|
:score-value="entry.rating"
|
||||||
|
v-on:newselection="
|
||||||
|
entry.rating = $event;
|
||||||
|
updateTotals();
|
||||||
|
"
|
||||||
|
></score-selector>
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
@ -336,7 +343,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deleteEntry: function(scenarioIndex, entryIndex) {
|
deleteEntry: function(scenarioIndex, entryIndex) {
|
||||||
this.$delete(this.scenarios[scenarioIndex].entries, entryIndex);
|
this.$delete(this.scenarios[scenarioIndex].entries, entryIndex);
|
||||||
if(this.scenarios[scenarioIndex].entries.length === 0) {
|
if (this.scenarios[scenarioIndex].entries.length === 0) {
|
||||||
this.addAnotherEntry(this.scenarios[scenarioIndex]);
|
this.addAnotherEntry(this.scenarios[scenarioIndex]);
|
||||||
}
|
}
|
||||||
this.updateTotals();
|
this.updateTotals();
|
||||||
@ -394,6 +401,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
var form = document.getElementById("submission-form");
|
var form = document.getElementById("submission-form");
|
||||||
|
var notObservedValue = 0
|
||||||
if (form.checkValidity()) {
|
if (form.checkValidity()) {
|
||||||
let axiosConfig = {
|
let axiosConfig = {
|
||||||
auth: {
|
auth: {
|
||||||
@ -437,7 +445,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / monitoring.length
|
) / monitoring.length
|
||||||
: monitoring[0].rating
|
: monitoring[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
monitoringStrengths: monitoring
|
monitoringStrengths: monitoring
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join("; "),
|
.join("; "),
|
||||||
@ -451,7 +459,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / controlProcedural.length
|
) / controlProcedural.length
|
||||||
: controlProcedural[0].rating
|
: controlProcedural[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
controlProceduralStrengths: controlProcedural
|
controlProceduralStrengths: controlProcedural
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join("; "),
|
.join("; "),
|
||||||
@ -465,7 +473,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / control.length
|
) / control.length
|
||||||
: control[0].rating
|
: control[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
controlStrengths: control
|
controlStrengths: control
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join("; "),
|
.join("; "),
|
||||||
@ -477,7 +485,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / conservatism.length
|
) / conservatism.length
|
||||||
: conservatism[0].rating
|
: conservatism[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
conservatismStrengths: conservatism
|
conservatismStrengths: conservatism
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join(";"),
|
.join(";"),
|
||||||
@ -491,7 +499,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / teamworkCommunications.length
|
) / teamworkCommunications.length
|
||||||
: teamworkCommunications[0].rating
|
: teamworkCommunications[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
teamworkCommunicationsStrengths: teamworkCommunications
|
teamworkCommunicationsStrengths: teamworkCommunications
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join(";"),
|
.join(";"),
|
||||||
@ -505,7 +513,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / teamworkLeadership.length
|
) / teamworkLeadership.length
|
||||||
: teamworkLeadership[0].rating
|
: teamworkLeadership[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
teamworkLeadershipStrengths: teamworkLeadership
|
teamworkLeadershipStrengths: teamworkLeadership
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join(";"),
|
.join(";"),
|
||||||
@ -519,7 +527,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / teamworkWorkload.length
|
) / teamworkWorkload.length
|
||||||
: teamworkWorkload[0].rating
|
: teamworkWorkload[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
teamworkWorkloadStrengths: teamworkWorkload
|
teamworkWorkloadStrengths: teamworkWorkload
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join(";"),
|
.join(";"),
|
||||||
@ -533,7 +541,7 @@ export default {
|
|||||||
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
) / knowledge.length
|
) / knowledge.length
|
||||||
: knowledge[0].rating
|
: knowledge[0].rating
|
||||||
: 0,
|
: notObservedValue,
|
||||||
knowledgeStrengths: knowledge
|
knowledgeStrengths: knowledge
|
||||||
.map((entry) => entry.strengths)
|
.map((entry) => entry.strengths)
|
||||||
.join(";"),
|
.join(";"),
|
||||||
@ -607,7 +615,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
width: 160px; /* Set the width of the sidebar */
|
width: 8%; /* Set the width of the sidebar */
|
||||||
position: fixed; /* Fixed Sidebar (stay in place on scroll) */
|
position: fixed; /* Fixed Sidebar (stay in place on scroll) */
|
||||||
z-index: 1; /* Stay on top */
|
z-index: 1; /* Stay on top */
|
||||||
top: 10%; /* Stay at the top */
|
top: 10%; /* Stay at the top */
|
||||||
|
Loading…
Reference in New Issue
Block a user