Formatting

This commit is contained in:
neviyn 2018-10-31 12:55:46 +00:00
parent d25ec78fd9
commit 2981d9aa3a
7 changed files with 22 additions and 22 deletions

View File

@ -10,7 +10,7 @@ import "bootstrap-vue/dist/bootstrap-vue.css";
import datePicker from "vue-bootstrap-datetimepicker"; import datePicker from "vue-bootstrap-datetimepicker";
import "pc-bootstrap4-datetimepicker/build/css/bootstrap-datetimepicker.css"; import "pc-bootstrap4-datetimepicker/build/css/bootstrap-datetimepicker.css";
import Icon from "vue-awesome/components/Icon"; import Icon from "vue-awesome/components/Icon";
import titleMixin from './mixins/titleMixin'; import titleMixin from "./mixins/titleMixin";
Vue.config.productionTip = false; Vue.config.productionTip = false;
axios.defaults.baseURL = "/api"; axios.defaults.baseURL = "/api";

View File

@ -27,7 +27,7 @@
import "vue-awesome/icons/file-alt"; import "vue-awesome/icons/file-alt";
import "vue-awesome/icons/th-list"; import "vue-awesome/icons/th-list";
import "vue-awesome/icons/chart-line"; import "vue-awesome/icons/chart-line";
import "vue-awesome/icons/user-check" import "vue-awesome/icons/user-check";
export default { export default {
name: "Home", name: "Home",
title: "Observations Database" title: "Observations Database"

View File

@ -68,7 +68,7 @@
<b-col> <b-col>
<b-list-group> <b-list-group>
<b-list-group-item v-if="persons === [] || persons == null">Enter your name(s)!</b-list-group-item> <b-list-group-item v-if="persons === [] || persons == null">Enter your name(s)!</b-list-group-item>
<b-list-group-item v-for="(item, index) in persons">{{ item }}&nbsp;<a v-on:click="deletePerson(index)"><v-icon name="times-circle"/></a></b-list-group-item> <b-list-group-item v-bind:key="index" v-for="(item, index) in persons">{{ item }}&nbsp;<a v-on:click="deletePerson(index)"><v-icon name="times-circle"/></a></b-list-group-item>
</b-list-group> </b-list-group>
</b-col> </b-col>
</b-row> </b-row>
@ -162,7 +162,7 @@
import "bootstrap/dist/css/bootstrap.css"; import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue/dist/bootstrap-vue.css"; import "bootstrap-vue/dist/bootstrap-vue.css";
import "vue-awesome/icons/tag"; import "vue-awesome/icons/tag";
import "vue-awesome/icons/times-circle" import "vue-awesome/icons/times-circle";
import { mapState } from "vuex"; import { mapState } from "vuex";
import Vue from "vue"; import Vue from "vue";
@ -330,7 +330,7 @@ export default {
}, },
deletePerson: function(index) { deletePerson: function(index) {
this.persons.splice(index, 1); this.persons.splice(index, 1);
}, }
} }
}; };
</script> </script>

View File

@ -59,7 +59,7 @@
<p slot="title">{{ observation.date }}<br/>{{ observation.whom }} {{ observation.type }}<br/>{{ observation.observed }}</p> <p slot="title">{{ observation.date }}<br/>{{ observation.whom }} {{ observation.type }}<br/>{{ observation.observed }}</p>
<h2>{{ observation.date }}, {{ observation.whom }}<br/>{{ observation.type }}, {{ observation.observed }}</h2> <h2>{{ observation.date }}, {{ observation.whom }}<br/>{{ observation.type }}, {{ observation.observed }}</h2>
<b-row align-h="center"> <b-row align-h="center">
<h4><span v-for="(person, index) in observation.persons"><i>{{ person.name }}<span v-if="index+1 < observation.persons.length">,&nbsp;</span></i></span></h4> <h4><span v-bind:key="index" v-for="(person, index) in observation.persons"><i>{{ person.name }}<span v-if="index+1 < observation.persons.length">,&nbsp;</span></i></span></h4>
</b-row> </b-row>
<br /> <br />
<b-row class="mb-2"> <b-row class="mb-2">
@ -212,11 +212,11 @@ export default {
person: this.person person: this.person
}) })
.then(response => { .then(response => {
let blob = new Blob([response.data], {type: 'text/csv'}); let blob = new Blob([response.data], { type: "text/csv" });
let url = URL.createObjectURL(blob); let url = URL.createObjectURL(blob);
let link = document.createElement('a'); let link = document.createElement("a");
link.href = url; link.href = url;
link.setAttribute('download', 'dump.csv'); link.setAttribute("download", "dump.csv");
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
}) })

View File

@ -1,6 +1,6 @@
// vue.config.js // vue.config.js
module.exports = { module.exports = {
outputDir: 'target/dist', outputDir: "target/dist",
configureWebpack: { configureWebpack: {
optimization: { optimization: {
splitChunks: { splitChunks: {