2018-06-01 12:35:51 +00:00
|
|
|
<template>
|
|
|
|
<div id="app">
|
2018-06-11 09:46:25 +00:00
|
|
|
<frappe-desk v-if="showDesk">
|
2018-06-04 09:30:12 +00:00
|
|
|
<router-view />
|
2018-06-01 12:35:51 +00:00
|
|
|
</frappe-desk>
|
2018-06-11 09:46:25 +00:00
|
|
|
<router-view v-else name="setup" />
|
2018-06-01 12:35:51 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Desk from '@/components/Desk';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'App',
|
2018-06-11 09:46:25 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
showDesk: true
|
|
|
|
}
|
|
|
|
},
|
2018-06-01 12:35:51 +00:00
|
|
|
components: {
|
|
|
|
FrappeDesk: Desk
|
2018-06-11 09:46:25 +00:00
|
|
|
},
|
|
|
|
async beforeRouteUpdate(to, from, next) {
|
|
|
|
const accountingSettings = await frappe.getSingle('AccountingSettings');
|
|
|
|
if (accountingSettings.companyName) {
|
|
|
|
this.showDesk = true;
|
|
|
|
} else {
|
|
|
|
this.showDesk = true;
|
|
|
|
}
|
2018-06-01 12:35:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import "~bootstrap/scss/bootstrap";
|
|
|
|
|
|
|
|
html {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|