<template>
    <div>
        <h4 class="text-center">{{ this.data.pcmanu }} {{ this.data.pcmake }} - <small class="text-muted">{{this.data.pcnickname}}</small></h4>
        <p>OS: {{this.pcextra[2]}}</p>
        <p>S/N: {{ this.pcextra[104] }}</p>
        <p>CPU: {{ this.pcextra[101]}}</p>
        <p>RAM: {{ this.pcextra[100] }}</p>
        <p>Graphics: {{this.pcextra[4]}}</p>
    </div>
</template>
<script>
export default {
    props: ['asset', 'pcextraStart'],
    data() {
        return {
            data: JSON.parse(this.asset),
            pcextra: JSON.parse(this.pcextraStart)
        }
    },
    mounted() {
        console.log(this.pcextra);
        Echo.channel('assets')
            .listen('AssetUpdated', (e) => {
                this.data = JSON.parse(e.data);
            });
    }
}
</script>