Prettier formatting.
This commit is contained in:
parent
9925a900c6
commit
586fa70104
@ -34,8 +34,9 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
}
|
}
|
||||||
.fade-enter-active, .fade-leave-active {
|
.fade-enter-active,
|
||||||
transition: opacity .5s;
|
.fade-leave-active {
|
||||||
|
transition: opacity 0.5s;
|
||||||
}
|
}
|
||||||
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
@ -23,13 +23,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import 'vue-awesome/icons/database'
|
import "vue-awesome/icons/database";
|
||||||
import 'vue-awesome/icons/ban'
|
import "vue-awesome/icons/ban";
|
||||||
export default {
|
export default {
|
||||||
name: "DatabaseUnavailable"
|
name: "DatabaseUnavailable"
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -26,9 +26,8 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "Home"
|
name: "Home"
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -36,8 +36,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
Vue.axios
|
Vue.axios
|
||||||
.get("/site")
|
.get("/site")
|
||||||
.then(response => {
|
.then(response => {})
|
||||||
})
|
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error.response.status === 404) {
|
if (error.response.status === 404) {
|
||||||
this.$router.push("/dberror");
|
this.$router.push("/dberror");
|
||||||
@ -66,7 +65,7 @@
|
|||||||
};
|
};
|
||||||
if (form.checkValidity()) {
|
if (form.checkValidity()) {
|
||||||
Vue.axios
|
Vue.axios
|
||||||
.post("/site", {'name': this.siteName}, axiosConfig)
|
.post("/site", { name: this.siteName }, axiosConfig)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.alertVariant = "success";
|
this.alertVariant = "success";
|
||||||
this.alertText = "Successfully added " + response.data.text;
|
this.alertText = "Successfully added " + response.data.text;
|
||||||
|
@ -70,10 +70,14 @@ export default {
|
|||||||
};
|
};
|
||||||
if (form.checkValidity()) {
|
if (form.checkValidity()) {
|
||||||
Vue.axios
|
Vue.axios
|
||||||
.post("/tutor", {
|
.post(
|
||||||
'siteId': this.siteSelection,
|
"/tutor",
|
||||||
'name': this.tutorName
|
{
|
||||||
}, axiosConfig)
|
siteId: this.siteSelection,
|
||||||
|
name: this.tutorName
|
||||||
|
},
|
||||||
|
axiosConfig
|
||||||
|
)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.alertVariant = "success";
|
this.alertVariant = "success";
|
||||||
this.alertText = "Successfully added " + response.data.text;
|
this.alertText = "Successfully added " + response.data.text;
|
||||||
|
@ -210,13 +210,13 @@
|
|||||||
this.$refs.submissionModal.show();
|
this.$refs.submissionModal.show();
|
||||||
},
|
},
|
||||||
clearPassword() {
|
clearPassword() {
|
||||||
this.submitPassword = null
|
this.submitPassword = null;
|
||||||
},
|
},
|
||||||
handleOk(evt) {
|
handleOk(evt) {
|
||||||
// Prevent modal from closing
|
// Prevent modal from closing
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if (this.submitPassword !== null) {
|
if (this.submitPassword !== null) {
|
||||||
this.handleSubmit()
|
this.handleSubmit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
@ -230,14 +230,18 @@
|
|||||||
};
|
};
|
||||||
var self = this;
|
var self = this;
|
||||||
Vue.axios
|
Vue.axios
|
||||||
.post("/observation", {
|
.post(
|
||||||
|
"/observation",
|
||||||
|
{
|
||||||
site: this.site,
|
site: this.site,
|
||||||
tutors: this.tutors,
|
tutors: this.tutors,
|
||||||
observed: this.description,
|
observed: this.description,
|
||||||
whom: this.whom,
|
whom: this.whom,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
entries: JSON.parse(JSON.stringify(this.observations))
|
entries: JSON.parse(JSON.stringify(this.observations))
|
||||||
}, axiosConfig)
|
},
|
||||||
|
axiosConfig
|
||||||
|
)
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
self.$router.push("/complete");
|
self.$router.push("/complete");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState(["description", "type", "whom", "site", "tutors"])
|
...mapState(["description", "type", "whom", "site", "tutors"])
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -137,14 +137,16 @@
|
|||||||
]),
|
]),
|
||||||
getTutors: function() {
|
getTutors: function() {
|
||||||
if (this.site != null) {
|
if (this.site != null) {
|
||||||
Vue.axios.get("/site/" + this.site + "/tutors").then(response => {
|
Vue.axios
|
||||||
|
.get("/site/" + this.site + "/tutors")
|
||||||
|
.then(response => {
|
||||||
this.tutorOptions = response.data;
|
this.tutorOptions = response.data;
|
||||||
this.loadingTutors = false;
|
this.loadingTutors = false;
|
||||||
}).catch(error => {
|
})
|
||||||
|
.catch(error => {
|
||||||
if (error.response.status === 404) {
|
if (error.response.status === 404) {
|
||||||
this.$router.push("/dberror");
|
this.$router.push("/dberror");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
this.errorStatus = error.response.status;
|
this.errorStatus = error.response.status;
|
||||||
this.errorMessage = error.response.data;
|
this.errorMessage = error.response.data;
|
||||||
|
Loading…
Reference in New Issue
Block a user