diff --git a/vue/src/apps/TestView/TestView.vue b/vue/src/apps/TestView/TestView.vue index 9ee2c9287e..3f1677320a 100644 --- a/vue/src/apps/TestView/TestView.vue +++ b/vue/src/apps/TestView/TestView.vue @@ -3,6 +3,50 @@
+ + + + + + + + +
    + + + +
    {{ d.name }}
    +

    + Cras sit amet nibh libero, in gravida nulla. +

    +

    + 1 + 1 + 1 +

    +
    + +
+ + +
+
+ + + + + + +
@@ -19,6 +63,7 @@ import BetaWarning from "@/components/BetaWarning.vue"; import {ApiApiFactory} from "@/utils/openapi/api"; import GenericMultiselect from "@/components/GenericMultiselect.vue"; import GenericModalForm from "@/components/Modals/GenericModalForm.vue"; +import {Models} from "@/utils/models"; Vue.use(BootstrapVue) @@ -30,13 +75,33 @@ export default { components: {}, computed: {}, data() { - return {} + return { + active_model: Models.FOOD, + + data: [], + query: "", + + items_per_page: 25, + items_total: 0, + current_page: 1, + + } }, mounted() { this.$i18n.locale = window.CUSTOM_LOCALE + + this.refreshData() }, methods: { - + refreshData: function () { + let apiClient = new ApiApiFactory() + apiClient.listFoods(this.query, 0, 0, this.current_page, this.items_per_page, {query: {extended: 1}}).then(result => { + this.items_total = result.data.count + this.data = result.data.results + }).catch((err) => { + StandardToasts.makeStandardToast(this, StandardToasts.FAIL_FETCH, err) + }) + } }, }