<template>
    <div>
        <el-menu default-active="1" :collapse="true" style="float:left;margin-right:15px;">
            <el-menu-item index="1" @click="$router.push('/home')">
                <font-awesome-icon icon="home" size="lg"></font-awesome-icon>
                <span slot="title">HOME</span>
            </el-menu-item>
            <el-menu-item index="2" @click="$router.push('/contract')">
                <font-awesome-icon icon="file-signature" size="lg"></font-awesome-icon>
                <span slot="title">CONTRACTS</span>
            </el-menu-item>
            <el-menu-item index="3" @click="$router.push('/partner')" v-if="user.type === 1">
                <font-awesome-icon icon="handshake" size="lg"></font-awesome-icon>
                <span slot="title">PARTNERS</span>
            </el-menu-item>
            <el-menu-item index="4" @click="$router.push('/unit')" v-if="user.type === 1">
                <font-awesome-icon icon="sitemap" size="lg"></font-awesome-icon>
                <span slot="title">UNITS</span>
            </el-menu-item>
            <el-menu-item index="5" @click="$router.push('/user')" v-if="user.type === 1">
                <font-awesome-icon icon="users" size="lg"></font-awesome-icon>
                <span slot="title">USERS</span>
            </el-menu-item>
            <el-menu-item index="6" @click="$router.push('/log')" v-if="user.type === 1">
                <font-awesome-icon icon="bell" size="lg"></font-awesome-icon>
                <span slot="title">LOG</span>
            </el-menu-item>
            <el-menu-item index="7" onclick="document.getElementById('logout-form').submit()">
                <font-awesome-icon icon="sign-out-alt" size="lg"></font-awesome-icon>
                <span slot="title">SIGNOUT</span>
            </el-menu-item>
        </el-menu>
        <router-view></router-view>
    </div>
</template>

<script>
export default {
    data: function() {
        return {
            user: USER
        }
    }
}
</script>

<style lang="css" scoped>
</style>
