Implemented initial UI changes
This commit is contained in:
parent
4e222f7830
commit
ec9ae15c29
@ -145,268 +145,57 @@
|
|||||||
>
|
>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row cols="2">
|
||||||
<b-col cols="6" class="border">
|
<div
|
||||||
<b-row>
|
v-for="(entry, entryIndex) in item.entries"
|
||||||
<b-col cols="4">
|
v-bind:key="entryIndex"
|
||||||
<h5>Monitoring</h5>
|
>
|
||||||
<score-selector
|
<b-col class="border">
|
||||||
:score-value="item.monitoringRating"
|
<b-row>
|
||||||
v-on:newselection="
|
<b-col cols="4">
|
||||||
item.monitoringRating = $event;
|
<b-form-select
|
||||||
updateTotals();
|
v-model="entry.type"
|
||||||
"
|
:options="entryTypeOptions"
|
||||||
></score-selector>
|
v-on:change="updateTotals()"
|
||||||
</b-col>
|
class="my-3"
|
||||||
<b-col cols="8">
|
></b-form-select>
|
||||||
<b-form-textarea
|
<score-selector
|
||||||
v-model="item.monitoringStrengths"
|
:score-value="entry.rating"
|
||||||
placeholder="Strengths"
|
v-on:newselection="
|
||||||
:rows="1"
|
entry.rating = $event;
|
||||||
:max-rows="2"
|
updateTotals();
|
||||||
no-resize
|
"
|
||||||
class="strength"
|
></score-selector>
|
||||||
></b-form-textarea>
|
</b-col>
|
||||||
<b-form-textarea
|
<b-col cols="8">
|
||||||
v-model="item.monitoringImprovements"
|
<b-form-textarea
|
||||||
placeholder="AFIs"
|
v-model="entry.strengths"
|
||||||
:rows="1"
|
placeholder="Strengths"
|
||||||
:max-rows="2"
|
:rows="1"
|
||||||
no-resize
|
:max-rows="2"
|
||||||
class="afi"
|
no-resize
|
||||||
></b-form-textarea>
|
class="strength"
|
||||||
</b-col>
|
></b-form-textarea>
|
||||||
</b-row>
|
<b-form-textarea
|
||||||
</b-col>
|
v-model="entry.AFIs"
|
||||||
<b-col cols="6" class="border">
|
placeholder="AFIs"
|
||||||
<b-row>
|
:rows="1"
|
||||||
<b-col cols="4">
|
:max-rows="2"
|
||||||
<h5>Control Procedural</h5>
|
no-resize
|
||||||
<score-selector
|
class="afi"
|
||||||
:score-value="item.controlProceduralRating"
|
></b-form-textarea>
|
||||||
v-on:newselection="
|
</b-col>
|
||||||
item.controlProceduralRating = $event;
|
</b-row>
|
||||||
updateTotals();
|
</b-col>
|
||||||
"
|
</div>
|
||||||
></score-selector>
|
<b-col cols="6" align-self="center">
|
||||||
</b-col>
|
<b-button
|
||||||
<b-col cols="8">
|
v-on:click="addAnotherEntry(item)"
|
||||||
<b-form-textarea
|
size="lg"
|
||||||
v-model="item.controlProceduralStrengths"
|
style="font-size: 200%"
|
||||||
placeholder="Strengths"
|
class="py-4 my-4"
|
||||||
:rows="1"
|
> + </b-button
|
||||||
:max-rows="2"
|
>
|
||||||
no-resize
|
|
||||||
class="strength"
|
|
||||||
></b-form-textarea>
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.controlProceduralImprovements"
|
|
||||||
placeholder="AFIs"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="afi"
|
|
||||||
></b-form-textarea>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="6" class="border">
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="4">
|
|
||||||
<h5>Control</h5>
|
|
||||||
<score-selector
|
|
||||||
:score-value="item.controlRating"
|
|
||||||
v-on:newselection="
|
|
||||||
item.controlRating = $event;
|
|
||||||
updateTotals();
|
|
||||||
"
|
|
||||||
></score-selector>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="8">
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.controlStrengths"
|
|
||||||
placeholder="Strengths"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="strength"
|
|
||||||
></b-form-textarea>
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.controlImprovements"
|
|
||||||
placeholder="AFIs"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="afi"
|
|
||||||
></b-form-textarea>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="6" class="border">
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="4">
|
|
||||||
<h5>Conservatism</h5>
|
|
||||||
<score-selector
|
|
||||||
:score-value="item.conservatismRating"
|
|
||||||
v-on:newselection="
|
|
||||||
item.conservatismRating = $event;
|
|
||||||
updateTotals();
|
|
||||||
"
|
|
||||||
></score-selector>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="8">
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.conservatismStrengths"
|
|
||||||
placeholder="Strengths"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="strength"
|
|
||||||
></b-form-textarea>
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.conservatismImprovements"
|
|
||||||
placeholder="AFIs"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="afi"
|
|
||||||
></b-form-textarea>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="6" class="border">
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="4">
|
|
||||||
<h5>Teamwork Communications</h5>
|
|
||||||
<score-selector
|
|
||||||
:score-value="item.teamworkCommunicationsRating"
|
|
||||||
v-on:newselection="
|
|
||||||
item.teamworkCommunicationsRating = $event;
|
|
||||||
updateTotals();
|
|
||||||
"
|
|
||||||
></score-selector>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="8">
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.teamworkCommunicationsStrengths"
|
|
||||||
placeholder="Strengths"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="strength"
|
|
||||||
></b-form-textarea>
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.teamworkCommunicationsImprovements"
|
|
||||||
placeholder="AFIs"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="afi"
|
|
||||||
></b-form-textarea>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="6" class="border">
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="4">
|
|
||||||
<h5>Teamwork Leadership</h5>
|
|
||||||
<score-selector
|
|
||||||
:score-value="item.teamworkLeadershipRating"
|
|
||||||
v-on:newselection="
|
|
||||||
item.teamworkLeadershipRating = $event;
|
|
||||||
updateTotals();
|
|
||||||
"
|
|
||||||
></score-selector>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="8">
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.teamworkLeadershipStrengths"
|
|
||||||
placeholder="Strengths"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="strength"
|
|
||||||
></b-form-textarea>
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.teamworkLeadershipImprovements"
|
|
||||||
placeholder="AFIs"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="afi"
|
|
||||||
></b-form-textarea>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="6" class="border">
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="4">
|
|
||||||
<h5>Teamwork Workload</h5>
|
|
||||||
<score-selector
|
|
||||||
:score-value="item.teamworkWorkloadRating"
|
|
||||||
v-on:newselection="
|
|
||||||
item.teamworkWorkloadRating = $event;
|
|
||||||
updateTotals();
|
|
||||||
"
|
|
||||||
></score-selector>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="8">
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.teamworkWorkloadStrengths"
|
|
||||||
placeholder="Strengths"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="strength"
|
|
||||||
></b-form-textarea>
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.teamworkWorkloadImprovements"
|
|
||||||
placeholder="AFIs"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="afi"
|
|
||||||
></b-form-textarea>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="6" class="border">
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="4">
|
|
||||||
<h5>Knowledge</h5>
|
|
||||||
<score-selector
|
|
||||||
:score-value="item.knowledgeRating"
|
|
||||||
v-on:newselection="
|
|
||||||
item.knowledgeRating = $event;
|
|
||||||
updateTotals();
|
|
||||||
"
|
|
||||||
></score-selector>
|
|
||||||
</b-col>
|
|
||||||
<b-col cols="8">
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.knowledgeStrengths"
|
|
||||||
placeholder="Strengths"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="strength"
|
|
||||||
></b-form-textarea>
|
|
||||||
<b-form-textarea
|
|
||||||
v-model="item.knowledgeImprovements"
|
|
||||||
placeholder="AFIs"
|
|
||||||
:rows="1"
|
|
||||||
:max-rows="2"
|
|
||||||
no-resize
|
|
||||||
class="afi"
|
|
||||||
></b-form-textarea>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
@ -479,68 +268,46 @@ export default {
|
|||||||
scenarios: [
|
scenarios: [
|
||||||
{
|
{
|
||||||
title: "",
|
title: "",
|
||||||
monitoringRating: null,
|
entries: [
|
||||||
monitoringStrengths: "",
|
{
|
||||||
monitoringImprovements: "",
|
type: null,
|
||||||
controlProceduralRating: null,
|
rating: 0,
|
||||||
controlProceduralStrengths: "",
|
strengths: "",
|
||||||
controlProceduralImprovements: "",
|
AFIs: "",
|
||||||
controlRating: null,
|
},
|
||||||
controlStrengths: "",
|
],
|
||||||
controlImprovements: "",
|
},
|
||||||
conservatismRating: null,
|
|
||||||
conservatismStrengths: "",
|
|
||||||
conservatismImprovements: "",
|
|
||||||
teamworkCommunicationsRating: null,
|
|
||||||
teamworkCommunicationsStrengths: "",
|
|
||||||
teamworkCommunicationsImprovements: "",
|
|
||||||
teamworkLeadershipRating: null,
|
|
||||||
teamworkLeadershipStrengths: "",
|
|
||||||
teamworkLeadershipImprovements: "",
|
|
||||||
teamworkWorkloadRating: null,
|
|
||||||
teamworkWorkloadStrengths: "",
|
|
||||||
teamworkWorkloadImprovements: "",
|
|
||||||
knowledgeRating: null,
|
|
||||||
knowledgeStrengths: "",
|
|
||||||
knowledgeImprovements: ""
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
totals: [0, 0, 0, 0, 0, 0, 0, 0],
|
totals: [0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
warningBound: 2.5,
|
warningBound: 2.5,
|
||||||
submitPassword: null
|
submitPassword: null,
|
||||||
|
entryTypeOptions: [
|
||||||
|
{ value: "monitoring", text: "Monitoring" },
|
||||||
|
{ value: "controlProcedural", text: "Control Procedural" },
|
||||||
|
{ value: "control", text: "Control" },
|
||||||
|
{ value: "conservatism", text: "Conservatism" },
|
||||||
|
{ value: "teamworkCommunications", text: "Teamwork Communications" },
|
||||||
|
{ value: "teamworkLeadership", text: "Teamwork Leadership" },
|
||||||
|
{ value: "teamworkWorkload", text: "Teamwork Workload" },
|
||||||
|
{ value: "knowledge", text: "Knowledge" },
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["type", "whom", "site", "tutors"])
|
...mapState(["type", "whom", "site", "tutors"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addAnotherObservation: function() {
|
addAnotherObservation: function() {
|
||||||
this.scenarios.push({
|
this.scenarios.push({
|
||||||
title: "",
|
title: "",
|
||||||
monitoringRating: null,
|
entries: [
|
||||||
monitoringStrengths: "",
|
{
|
||||||
monitoringImprovements: "",
|
type: null,
|
||||||
controlProceduralRating: null,
|
rating: 0,
|
||||||
controlProceduralStrengths: "",
|
strengths: "",
|
||||||
controlProceduralImprovements: "",
|
AFIs: "",
|
||||||
controlRating: null,
|
},
|
||||||
controlStrengths: "",
|
],
|
||||||
controlImprovements: "",
|
|
||||||
conservatismRating: null,
|
|
||||||
conservatismStrengths: "",
|
|
||||||
conservatismImprovements: "",
|
|
||||||
teamworkCommunicationsRating: null,
|
|
||||||
teamworkCommunicationsStrengths: "",
|
|
||||||
teamworkCommunicationsImprovements: "",
|
|
||||||
teamworkLeadershipRating: null,
|
|
||||||
teamworkLeadershipStrengths: "",
|
|
||||||
teamworkLeadershipImprovements: "",
|
|
||||||
teamworkWorkloadRating: null,
|
|
||||||
teamworkWorkloadStrengths: "",
|
|
||||||
teamworkWorkloadImprovements: "",
|
|
||||||
knowledgeRating: null,
|
|
||||||
knowledgeStrengths: "",
|
|
||||||
knowledgeImprovements: ""
|
|
||||||
});
|
});
|
||||||
Vue.nextTick(function() {
|
Vue.nextTick(function() {
|
||||||
window.scrollTo(
|
window.scrollTo(
|
||||||
@ -556,42 +323,34 @@ export default {
|
|||||||
}
|
}
|
||||||
this.updateTotals();
|
this.updateTotals();
|
||||||
},
|
},
|
||||||
|
addAnotherEntry: function(scenario) {
|
||||||
|
scenario.entries.push({
|
||||||
|
type: null,
|
||||||
|
rating: 0,
|
||||||
|
strengths: "",
|
||||||
|
AFIs: "",
|
||||||
|
});
|
||||||
|
},
|
||||||
updateTotals: function() {
|
updateTotals: function() {
|
||||||
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) {
|
var indices = {
|
||||||
if (element.monitoringRating) {
|
monitoring: 0,
|
||||||
iTotals[0] += parseInt(element.monitoringRating);
|
controlProcedural: 1,
|
||||||
counts[0] += 1;
|
control: 2,
|
||||||
}
|
conservatism: 3,
|
||||||
if (element.controlProceduralRating) {
|
teamworkCommunications: 4,
|
||||||
iTotals[1] += parseInt(element.controlProceduralRating);
|
teamworkLeadership: 5,
|
||||||
counts[1] += 1;
|
teamworkWorkload: 6,
|
||||||
}
|
knowledge: 7,
|
||||||
if (element.controlRating) {
|
};
|
||||||
iTotals[2] += parseInt(element.controlRating);
|
this.scenarios.forEach(function(scenario) {
|
||||||
counts[2] += 1;
|
scenario.entries.forEach(function(entry) {
|
||||||
}
|
if (entry.type !== null && entry.rating > 0) {
|
||||||
if (element.conservatismRating) {
|
iTotals[indices[entry.type]] += parseInt(entry.rating);
|
||||||
iTotals[3] += parseInt(element.conservatismRating);
|
counts[indices[entry.type]] += 1;
|
||||||
counts[3] += 1;
|
}
|
||||||
}
|
});
|
||||||
if (element.teamworkCommunicationsRating) {
|
|
||||||
iTotals[4] += parseInt(element.teamworkCommunicationsRating);
|
|
||||||
counts[4] += 1;
|
|
||||||
}
|
|
||||||
if (element.teamworkLeadershipRating) {
|
|
||||||
iTotals[5] += parseInt(element.teamworkLeadershipRating);
|
|
||||||
counts[5] += 1;
|
|
||||||
}
|
|
||||||
if (element.teamworkWorkloadRating) {
|
|
||||||
iTotals[6] += parseInt(element.teamworkWorkloadRating);
|
|
||||||
counts[6] += 1;
|
|
||||||
}
|
|
||||||
if (element.knowledgeRating) {
|
|
||||||
iTotals[7] += parseInt(element.knowledgeRating);
|
|
||||||
counts[7] += 1;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
for (var i = 0; i < iTotals.length; i++) {
|
for (var i = 0; i < iTotals.length; i++) {
|
||||||
if (counts[i] !== 0) {
|
if (counts[i] !== 0) {
|
||||||
@ -629,10 +388,150 @@ export default {
|
|||||||
let axiosConfig = {
|
let axiosConfig = {
|
||||||
auth: {
|
auth: {
|
||||||
username: "admin",
|
username: "admin",
|
||||||
password: this.submitPassword
|
password: this.submitPassword,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var transformedScenarioData = [];
|
||||||
|
this.scenarios.forEach(function(scenario) {
|
||||||
|
var monitoring = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "monitoring"
|
||||||
|
);
|
||||||
|
var controlProcedural = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "controlProcedural"
|
||||||
|
);
|
||||||
|
var control = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "control"
|
||||||
|
);
|
||||||
|
var conservatism = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "conservatism"
|
||||||
|
);
|
||||||
|
var teamworkCommunications = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "teamworkCommunications"
|
||||||
|
);
|
||||||
|
var teamworkLeadership = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "teamworkLeadership"
|
||||||
|
);
|
||||||
|
var teamworkWorkload = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "teamworkWorkload"
|
||||||
|
);
|
||||||
|
var knowledge = scenario.entries.filter(
|
||||||
|
(entry) => entry.type === "knowledge"
|
||||||
|
);
|
||||||
|
transformedScenarioData.push({
|
||||||
|
title: scenario.title,
|
||||||
|
monitoringRating:
|
||||||
|
monitoring.length > 0
|
||||||
|
? monitoring.length > 1
|
||||||
|
? monitoring.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / monitoring.length
|
||||||
|
: monitoring[0].rating
|
||||||
|
: 0,
|
||||||
|
monitoringStrengths: monitoring
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join("; "),
|
||||||
|
monitoringImprovements: monitoring
|
||||||
|
.map((entry) => entry.AFIs)
|
||||||
|
.join("; "),
|
||||||
|
controlProceduralRating:
|
||||||
|
controlProcedural.length > 0
|
||||||
|
? controlProcedural.length > 1
|
||||||
|
? controlProcedural.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / controlProcedural.length
|
||||||
|
: controlProcedural[0].rating
|
||||||
|
: 0,
|
||||||
|
controlProceduralStrengths: controlProcedural
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join("; "),
|
||||||
|
controlProceduralImprovements: controlProcedural
|
||||||
|
.map((entry) => entry.AFIs)
|
||||||
|
.join("; "),
|
||||||
|
controlRating:
|
||||||
|
control.length > 0
|
||||||
|
? control.length > 1
|
||||||
|
? control.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / control.length
|
||||||
|
: control[0].rating
|
||||||
|
: 0,
|
||||||
|
controlStrengths: control
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join("; "),
|
||||||
|
controlImprovements: control.map((entry) => entry.AFIs).join("; "),
|
||||||
|
conservatismRating:
|
||||||
|
conservatism.length > 0
|
||||||
|
? conservatism.length > 1
|
||||||
|
? conservatism.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / conservatism.length
|
||||||
|
: conservatism[0].rating
|
||||||
|
: 0,
|
||||||
|
conservatismStrengths: conservatism
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join(";"),
|
||||||
|
conservatismImprovements: conservatism
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join(";"),
|
||||||
|
teamworkCommunicationsRating:
|
||||||
|
teamworkCommunications.length > 0
|
||||||
|
? teamworkCommunications.length > 1
|
||||||
|
? teamworkCommunications.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / teamworkCommunications.length
|
||||||
|
: teamworkCommunications[0].rating
|
||||||
|
: 0,
|
||||||
|
teamworkCommunicationsStrengths: teamworkCommunications
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join(";"),
|
||||||
|
teamworkCommunicationsImprovements: teamworkCommunications
|
||||||
|
.map((entry) => entry.AFIs)
|
||||||
|
.join(";"),
|
||||||
|
teamworkLeadershipRating:
|
||||||
|
teamworkLeadership.length > 0
|
||||||
|
? teamworkLeadership.length > 1
|
||||||
|
? teamworkLeadership.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / teamworkLeadership.length
|
||||||
|
: teamworkLeadership[0].rating
|
||||||
|
: 0,
|
||||||
|
teamworkLeadershipStrengths: teamworkLeadership
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join(";"),
|
||||||
|
teamworkLeadershipImprovements: teamworkLeadership
|
||||||
|
.map((entry) => entry.AFIs)
|
||||||
|
.join(";"),
|
||||||
|
teamworkWorkloadRating:
|
||||||
|
teamworkWorkload.length > 0
|
||||||
|
? teamworkWorkload.length > 1
|
||||||
|
? teamworkWorkload.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / teamworkWorkload.length
|
||||||
|
: teamworkWorkload[0].rating
|
||||||
|
: 0,
|
||||||
|
teamworkWorkloadStrengths: teamworkWorkload
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join(";"),
|
||||||
|
teamworkWorkloadImprovements: teamworkWorkload
|
||||||
|
.map((entry) => entry.AFIs)
|
||||||
|
.join(";"),
|
||||||
|
knowledgeRating:
|
||||||
|
knowledge.length > 0
|
||||||
|
? knowledge.length > 1
|
||||||
|
? knowledge.reduce(
|
||||||
|
(a, b) => parseInt(a.rating) + parseInt(b.rating)
|
||||||
|
) / knowledge.length
|
||||||
|
: knowledge[0].rating
|
||||||
|
: 0,
|
||||||
|
knowledgeStrengths: knowledge
|
||||||
|
.map((entry) => entry.strengths)
|
||||||
|
.join(";"),
|
||||||
|
knowledgeImprovements: knowledge
|
||||||
|
.map((entry) => entry.AFIs)
|
||||||
|
.join(";"),
|
||||||
|
});
|
||||||
|
});
|
||||||
Vue.axios
|
Vue.axios
|
||||||
.post(
|
.post(
|
||||||
"/observation",
|
"/observation",
|
||||||
@ -641,8 +540,8 @@ export default {
|
|||||||
tutors: this.tutors,
|
tutors: this.tutors,
|
||||||
person: this.whom,
|
person: this.whom,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
observed: this.scenarios.map(x => x.title).join(", "),
|
observed: this.scenarios.map((x) => x.title).join("; "),
|
||||||
scenarios: JSON.parse(JSON.stringify(this.scenarios))
|
scenarios: JSON.parse(JSON.stringify(transformedScenarioData)),
|
||||||
},
|
},
|
||||||
axiosConfig
|
axiosConfig
|
||||||
)
|
)
|
||||||
@ -654,8 +553,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.clearPassword();
|
this.clearPassword();
|
||||||
form.classList.add("was-validated");
|
form.classList.add("was-validated");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user