fixed backend imports

This commit is contained in:
2024-02-16 19:00:30 +01:00
parent 5ca56d36cf
commit 5242d4a3af
26 changed files with 195 additions and 279 deletions

View File

@ -33,6 +33,12 @@
import { ref, onMounted } from 'vue';
import Axios from '../axios.config.js';
import clientsideConfig from '../../clientsideConfig.js';
import { useStore } from 'vuex';
import { computed } from 'vue';
const store = useStore();
const editable = computed(() => store.state.assetEditable);
const chosenAssetId = computed(() => store.state.chosenAssetId);
const darkMode = ref(true)
const item = ref({});
@ -40,11 +46,9 @@ const softwareBoolean = ref(false)
// get config item from id
const getItemById = async () => {
// later itemIndex from route params
let itemIndex = 9;
try {
const response = await Axios.get(
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${itemIndex}`
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${chosenAssetId.value}`
);
item.value = response.data;
if ((item.value.softwareBool == 1) && (item.value.version.trim() === "") && (item.value.software.trim() === "")) {