Observation entry now only possible if store values have been setup.
This commit is contained in:
parent
7217067690
commit
5089e36faf
@ -1,106 +1,120 @@
|
|||||||
<template>
|
<template>
|
||||||
<b-container>
|
<b-container>
|
||||||
<h3>
|
<b-container v-if="description != null && type != null && whom != null && site != null && tutors != null">
|
||||||
<v-icon name="tag" scale="1.5"/>
|
<h3>
|
||||||
{{type}}/{{description}}
|
<v-icon name="tag" scale="1.5"/>
|
||||||
</h3>
|
{{type}}/{{description}}
|
||||||
<b-container class="sidebar">
|
</h3>
|
||||||
<b-row align-v="center" class="sidebar-vert-padding">
|
<b-container class="sidebar">
|
||||||
<b-col class="centered-image">
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
<img src="../assets/Monitoring.svg" class="image-opacity"/>
|
<b-col class="centered-image">
|
||||||
<div class="image-centered-text">{{ totals[0] }}</div>
|
<img src="../assets/Monitoring.svg" class="image-opacity"/>
|
||||||
</b-col>
|
<div class="image-centered-text">{{ totals[0] }}</div>
|
||||||
</b-row>
|
|
||||||
<b-row align-v="center" class="sidebar-vert-padding">
|
|
||||||
<b-col class="centered-image">
|
|
||||||
<img src="../assets/Control.svg" class="image-opacity"/>
|
|
||||||
<div class="image-centered-text">{{ totals[1] }}</div>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row align-v="center" class="sidebar-vert-padding">
|
|
||||||
<b-col class="centered-image">
|
|
||||||
<img src="../assets/Conservatism.svg" class="image-opacity"/>
|
|
||||||
<div class="image-centered-text">{{ totals[2] }}</div>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row align-v="center" class="sidebar-vert-padding">
|
|
||||||
<b-col class="centered-image">
|
|
||||||
<img src="../assets/Teamwork.svg" class="image-opacity"/>
|
|
||||||
<div class="image-centered-text">{{ totals[3] }}</div>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row align-v="center">
|
|
||||||
<b-col class="centered-image">
|
|
||||||
<img src="../assets/Knowledge.svg" class="image-opacity"/>
|
|
||||||
<div class="image-centered-text">{{ totals[4] }}</div>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-container>
|
|
||||||
<b-form @submit="onSubmit" id="submission-form" novalidate>
|
|
||||||
<b-container v-for="(item, index) in observations" v-bind:key="index" class="border bottom-buffer">
|
|
||||||
<b-row class="top-buffer">
|
|
||||||
<b-col cols="3">
|
|
||||||
<b-form-group label="Type">
|
|
||||||
<b-form-select v-bind:value="item.type" @change="changeType(index, $event)" required>
|
|
||||||
<option :value=null>Please select an option</option>
|
|
||||||
<option value="MONITORING">Monitoring</option>
|
|
||||||
<option value="CONTROL">Control</option>
|
|
||||||
<option value="CONSERVATISM">Conservatism</option>
|
|
||||||
<option value="TEAMWORK">Teamwork</option>
|
|
||||||
<option value="KNOWLEDGE">Knowledge</option>
|
|
||||||
</b-form-select>
|
|
||||||
</b-form-group>
|
|
||||||
<b-form-group label="Rating">
|
|
||||||
<b-form-radio-group buttons button-variant="outline-info" size="lg"
|
|
||||||
v-bind:value="item.rating" @change="changeRating(index, $event)"
|
|
||||||
required>
|
|
||||||
<b-form-radio value=1>1</b-form-radio>
|
|
||||||
<b-form-radio value=2>2</b-form-radio>
|
|
||||||
<b-form-radio value=3>3</b-form-radio>
|
|
||||||
<b-form-radio value=4>4</b-form-radio>
|
|
||||||
<b-form-radio value=5>5</b-form-radio>
|
|
||||||
</b-form-radio-group>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
|
||||||
<b-col>
|
|
||||||
<b-form-group label="Strengths">
|
|
||||||
<b-form-textarea v-model="item.strengths" placeholder="Enter Strengths" :rows="3"
|
|
||||||
:max-rows="6" required no-resize>
|
|
||||||
</b-form-textarea>
|
|
||||||
</b-form-group>
|
|
||||||
<b-form-group label="Areas of Improvement">
|
|
||||||
<b-form-textarea v-model="item.improvements" placeholder="Enter Areas of Improvement"
|
|
||||||
:rows="3" :max-rows="6" required no-resize>
|
|
||||||
</b-form-textarea>
|
|
||||||
</b-form-group>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row class="bottom-buffer">
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
<b-col>
|
<b-col class="centered-image">
|
||||||
<b-button v-on:click="deleteObservation(index)">Delete</b-button>
|
<img src="../assets/Control.svg" class="image-opacity"/>
|
||||||
|
<div class="image-centered-text">{{ totals[1] }}</div>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
|
<b-col class="centered-image">
|
||||||
|
<img src="../assets/Conservatism.svg" class="image-opacity"/>
|
||||||
|
<div class="image-centered-text">{{ totals[2] }}</div>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
<b-row align-v="center" class="sidebar-vert-padding">
|
||||||
|
<b-col class="centered-image">
|
||||||
|
<img src="../assets/Teamwork.svg" class="image-opacity"/>
|
||||||
|
<div class="image-centered-text">{{ totals[3] }}</div>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
<b-row align-v="center">
|
||||||
|
<b-col class="centered-image">
|
||||||
|
<img src="../assets/Knowledge.svg" class="image-opacity"/>
|
||||||
|
<div class="image-centered-text">{{ totals[4] }}</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-container>
|
</b-container>
|
||||||
<b-row align-h="center">
|
<b-form @submit="onSubmit" id="submission-form" novalidate>
|
||||||
<b-col cols="1">
|
<b-container v-for="(item, index) in observations" v-bind:key="index" class="border bottom-buffer">
|
||||||
<b-button type="submit" variant="primary">Submit</b-button>
|
<b-row class="top-buffer">
|
||||||
</b-col>
|
<b-col cols="3">
|
||||||
<b-col offset="1" cols="1">
|
<b-form-group label="Type">
|
||||||
<b-button v-on:click="this.addAnotherObservation">Add Entry</b-button>
|
<b-form-select v-bind:value="item.type" @change="changeType(index, $event)" required>
|
||||||
|
<option :value=null>Please select an option</option>
|
||||||
|
<option value="MONITORING">Monitoring</option>
|
||||||
|
<option value="CONTROL">Control</option>
|
||||||
|
<option value="CONSERVATISM">Conservatism</option>
|
||||||
|
<option value="TEAMWORK">Teamwork</option>
|
||||||
|
<option value="KNOWLEDGE">Knowledge</option>
|
||||||
|
</b-form-select>
|
||||||
|
</b-form-group>
|
||||||
|
<b-form-group label="Rating">
|
||||||
|
<b-form-radio-group buttons button-variant="outline-info" size="lg"
|
||||||
|
v-bind:value="item.rating" @change="changeRating(index, $event)"
|
||||||
|
required>
|
||||||
|
<b-form-radio value=1>1</b-form-radio>
|
||||||
|
<b-form-radio value=2>2</b-form-radio>
|
||||||
|
<b-form-radio value=3>3</b-form-radio>
|
||||||
|
<b-form-radio value=4>4</b-form-radio>
|
||||||
|
<b-form-radio value=5>5</b-form-radio>
|
||||||
|
</b-form-radio-group>
|
||||||
|
</b-form-group>
|
||||||
|
</b-col>
|
||||||
|
<b-col>
|
||||||
|
<b-form-group label="Strengths">
|
||||||
|
<b-form-textarea v-model="item.strengths" placeholder="Enter Strengths" :rows="3"
|
||||||
|
:max-rows="6" required no-resize>
|
||||||
|
</b-form-textarea>
|
||||||
|
</b-form-group>
|
||||||
|
<b-form-group label="Areas of Improvement">
|
||||||
|
<b-form-textarea v-model="item.improvements" placeholder="Enter Areas of Improvement"
|
||||||
|
:rows="3" :max-rows="6" required no-resize>
|
||||||
|
</b-form-textarea>
|
||||||
|
</b-form-group>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
<b-row class="bottom-buffer">
|
||||||
|
<b-col>
|
||||||
|
<b-button v-on:click="deleteObservation(index)">Delete</b-button>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
</b-container>
|
||||||
|
<b-row align-h="center">
|
||||||
|
<b-col cols="1">
|
||||||
|
<b-button type="submit" variant="primary">Submit</b-button>
|
||||||
|
</b-col>
|
||||||
|
<b-col offset="1" cols="1">
|
||||||
|
<b-button v-on:click="this.addAnotherObservation">Add Entry</b-button>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
</b-form>
|
||||||
|
<b-modal id="submissionModal"
|
||||||
|
ref="submissionModal"
|
||||||
|
title="Enter password to confirm submission"
|
||||||
|
@ok="handleOk"
|
||||||
|
@shown="clearPassword">
|
||||||
|
<form @submit.stop.prevent="handleSubmit">
|
||||||
|
<b-form-input type="password"
|
||||||
|
placeholder="Enter password"
|
||||||
|
v-model="submitPassword"></b-form-input>
|
||||||
|
</form>
|
||||||
|
</b-modal>
|
||||||
|
</b-container>
|
||||||
|
<b-container v-else>
|
||||||
|
<b-row>
|
||||||
|
<b-col>
|
||||||
|
<h2>Error</h2>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</b-form>
|
<b-row>
|
||||||
<b-modal id="submissionModal"
|
<b-col>
|
||||||
ref="submissionModal"
|
<p>An Observation session has not been correctly setup, please try again.</p>
|
||||||
title="Enter password to confirm submission"
|
</b-col>
|
||||||
@ok="handleOk"
|
</b-row>
|
||||||
@shown="clearPassword">
|
</b-container>
|
||||||
<form @submit.stop.prevent="handleSubmit">
|
|
||||||
<b-form-input type="password"
|
|
||||||
placeholder="Enter password"
|
|
||||||
v-model="submitPassword"></b-form-input>
|
|
||||||
</form>
|
|
||||||
</b-modal>
|
|
||||||
</b-container>
|
</b-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user