User now prompted when no data returned to view, rather than just showing nothing.
This commit is contained in:
parent
bd2aa557b4
commit
9925a900c6
@ -49,6 +49,10 @@
|
||||
<stats-view v-bind:chartData="chartData"
|
||||
style="position: relative; height:80vh" :options="options"/>
|
||||
</b-col>
|
||||
<b-col v-else>
|
||||
<v-icon name="search"></v-icon>
|
||||
<p>No data found with the given search parameters.</p>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
</template>
|
||||
@ -57,6 +61,8 @@
|
||||
import Vue from "vue";
|
||||
import StatsView from "../components/StatsView";
|
||||
import "vue-awesome/icons/exclamation-circle";
|
||||
import "vue-awesome/icons/search";
|
||||
|
||||
var moment = require("moment");
|
||||
|
||||
export default {
|
||||
@ -116,11 +122,11 @@
|
||||
getFilteredAverage: function() {
|
||||
Vue.axios
|
||||
.post("/observations/chartdata", {
|
||||
'site': this.siteSelection,
|
||||
'tutor': this.tutorSelection,
|
||||
'startDate': moment(this.startDate).format("YYYY-MM-DD"),
|
||||
'endDate': moment(this.endDate).format("YYYY-MM-DD"),
|
||||
'whom': this.whom
|
||||
site: this.siteSelection,
|
||||
tutor: this.tutorSelection,
|
||||
startDate: moment(this.startDate).format("YYYY-MM-DD"),
|
||||
endDate: moment(this.endDate).format("YYYY-MM-DD"),
|
||||
whom: this.whom
|
||||
})
|
||||
.then(response => {
|
||||
this.chartData = response.data;
|
||||
|
@ -67,11 +67,22 @@
|
||||
</b-tabs>
|
||||
</b-card>
|
||||
</b-container>
|
||||
<b-container v-else>
|
||||
<b-row>
|
||||
<b-col>
|
||||
<b-col v-else>
|
||||
<v-icon name="search"></v-icon>
|
||||
<p>No data found with the given search parameters.</p>
|
||||
</b-col>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
</b-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from "vue";
|
||||
import "vue-awesome/icons/search";
|
||||
|
||||
var moment = require("moment");
|
||||
export default {
|
||||
|
Loading…
Reference in New Issue
Block a user