<template>
    <div>
        <p>Problem Description: <span v-text="this.data.probdesc"></span></p>
        <p>Suggested Solution: <span v-text="this.data.suggested"></span></p>
        <p>Work Order ID: <span v-text="this.data.woid"></span></p>
        <p>Store: <span v-text="this.data.storeid"></span></p>
        <p>Check-in Date: <span v-text="this.data.dropdate"></span></p>
        <p>Check-out Date: <span v-text="this.data.pickupdate"></span></p>
        <p>Accessories: <span v-text="this.data.custassets"></span></p>
    </div>
</template>
<script>
    export default {
        props: ['workOrder'],
        data() {
            return {
                data: JSON.parse(this.workOrder)
            }
        },
        mounted() {
            Echo.channel('work-orders')
                .listen('WorkOrderUpdated', (e) => {
                    this.data = JSON.parse(e.data);
                });
        }
    }
</script>