fixed backend imports
This commit is contained in:
@ -29,7 +29,8 @@
|
||||
<!-- <router-link to="/assets" class="button"
|
||||
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']" > {{
|
||||
item.assetName }} </router-link> -->
|
||||
<nuxt-link to="/assets" class="button" :class="[darkMode ? 'button-darkmode' : 'button-lightmode']"
|
||||
<nuxt-link to="/assets" id="nuxt-link" class="button"
|
||||
:class="[darkMode ? 'button-darkmode' : 'button-lightmode']"
|
||||
@click="goToChosenAsset(item.primaryID)">
|
||||
{{ item.assetName }}
|
||||
</nuxt-link>
|
||||
@ -51,6 +52,14 @@
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
// get accesss to the store
|
||||
const store = useStore()
|
||||
const goToChosenAsset = (id) => {
|
||||
store.commit('setChosenAsset', id);
|
||||
store.commit('changeToAsset');
|
||||
};
|
||||
|
||||
const darkMode = ref(true)
|
||||
const configItemList = ref([]);
|
||||
@ -73,13 +82,6 @@ onMounted(async () => {
|
||||
<script>
|
||||
export default {
|
||||
name: "AssetTable",
|
||||
methods: {
|
||||
// switch to chosen Asset page
|
||||
goToChosenAsset(id) {
|
||||
this.$store.commit('toggleEditableAsset', id)
|
||||
this.$store.commit('changeToAsset')
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -233,4 +235,9 @@ th {
|
||||
.label-lightmode {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#nuxt-link {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user