fixed backend imports
This commit is contained in:
@ -39,10 +39,7 @@
|
||||
<div class="additional">
|
||||
<div class="storage-configuration">
|
||||
<h3 :class="['area-title', darkMode ? 'h3-darkmode' : 'h3-lightmode']">Storage configuration:</h3>
|
||||
<input v-if="!editable" v-model="item.storageConfiguration"
|
||||
:class="['data', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']"
|
||||
id="storage-configuration">
|
||||
<input v-if="editable" v-model="item.storageConfiguration"
|
||||
<input v-model="item.storageConfiguration" :readonly="!editable"
|
||||
:class="['data', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']"
|
||||
id="storage-configuration">
|
||||
</div>
|
||||
@ -50,9 +47,7 @@
|
||||
<div class="additional">
|
||||
<div class="miscellaneous">
|
||||
<h3 :class="['area-title', darkMode ? 'h3-darkmode' : 'h3-lightmode']">Miscellaneous:</h3>
|
||||
<input v-if="!editable" v-model="item.miscellaneous"
|
||||
:class="['data', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']" id="miscellaneous">
|
||||
<input v-if="editable" v-model="item.miscellaneous"
|
||||
<input v-model="item.miscellaneous" :readonly="!editable"
|
||||
:class="['data', 'input', darkMode ? 'data-darkmode' : 'data-lightmode']" id="miscellaneous">
|
||||
</div>
|
||||
</div>
|
||||
@ -65,6 +60,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({});
|
||||
@ -72,11 +73,9 @@ const hardwareBoolean = 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.hardwareBool == 1) && (item.value.model === (null | "")) && (item.value.serialnumber.trim() === "") && (item.value.CPU.trim() === "") && (item.value.RAM.trim() === "") && (item.value.storageConfiguration.trim() === "") && (item.value.miscellaneous.trim() === "")) {
|
||||
@ -99,11 +98,6 @@ onMounted(() => {
|
||||
<script>
|
||||
export default {
|
||||
name: "HardwareSpecifications",
|
||||
computed: {
|
||||
editable() {
|
||||
return this.$store.state.assetEditable
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user