fix failing build

This commit is contained in:
hay-kot 2021-08-08 21:15:20 -08:00
parent bde885dc84
commit 625dbcdea5
7 changed files with 16 additions and 21 deletions

View file

@ -1,4 +1,5 @@
import { BaseCRUDAPI } from "./_base";
import { Recipe } from "~/types/api-types/recipe";
const prefix = "/api";
@ -6,6 +7,7 @@ export interface Category {
name: string;
id: number;
slug: string;
recipes?: Recipe[];
}
export interface CreateCategory {

View file

@ -1,4 +1,5 @@
import { BaseCRUDAPI } from "./_base";
import { Recipe } from "~/types/api-types/admin";
const prefix = "/api";
@ -6,6 +7,7 @@ export interface Tag {
name: string;
id: number;
slug: string;
recipes?: Recipe[];
}
export interface CreateTag {

View file

@ -11,10 +11,10 @@
</v-btn-toggle>
<v-spacer></v-spacer>
<v-btn-toggle v-model="match" tile group color="primary accent-3" mandatory @change="emitMulti">
<v-btn small :value="false">
<v-btn small :value="false" class="text-uppercase">
{{ $t("search.and") }}
</v-btn>
<v-btn small :value="true">
<v-btn small :value="true" class="text-uppercase">
{{ $t("search.or") }}
</v-btn>
</v-btn-toggle>

View file

@ -32,7 +32,7 @@ export default {
css: [{ src: "~/assets/main.css" }, { src: "~/assets/style-overrides.scss" }],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: ["~/plugins/globals.js", { src: "~/plugins/axios", mode: "server" }],
plugins: ["~/plugins/globals.js"],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
@ -265,12 +265,13 @@ export default {
},
},
// Build Configuration: https://go.nuxtjs.dev/config-build
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
// https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-build
analyze: true,
babel: {
plugins: [["@babel/plugin-proposal-private-property-in-object", { loose: true }]],
},
// transpile: process.env.NODE_ENV !== "production" ? [/@vue[\\/]composition-api/] : null
transpile: process.env.NODE_ENV !== "production" ? [/@vue[\\/]composition-api/] : null,
},
};

View file

@ -31,7 +31,9 @@ export default defineComponent({
},
methods: {
assignSorted(val: Array<Recipe>) {
this.category.recipes = val;
if (this.category) {
this.category.recipes = val;
}
},
},
});

View file

@ -31,7 +31,9 @@ export default defineComponent({
},
methods: {
assignSorted(val: Array<Recipe>) {
this.tag.recipes = val;
if (this.tag) {
this.tag.recipes = val;
}
},
},
});

View file

@ -1,14 +0,0 @@
export default ({ $axios, store }) => {
// $axios.onResponse((response) => {
// console.log(`[${response.status}] ${response.request.path}`);
// });
// $axios.onError((err) => {
// console.log(`[${err.response && err.response.status}] ${err.response && err.response.request.path}`);
// console.log(err.response && err.response.data);
// });
// $axios.onRequest((config) => {
// console.log("Making request to " + config.url);
// });
};