2
0
mirror of https://github.com/frappe/books.git synced 2024-12-24 20:00:29 +00:00
books/src/App.vue

47 lines
928 B
Vue
Raw Normal View History

2018-06-01 12:35:51 +00:00
<template>
<div id="app">
2018-06-27 14:36:42 +00:00
<frappe-desk v-if="showDesk" :sidebarConfig="sidebarConfig">
<router-view />
2018-06-01 12:35:51 +00:00
</frappe-desk>
<router-view v-else name="setup" />
2018-06-01 12:35:51 +00:00
</div>
</template>
<script>
import Vue from 'vue';
import Observable from 'frappejs/utils/observable';
2018-06-27 14:36:42 +00:00
import Desk from 'frappejs/ui/components/Desk';
import sidebarConfig from './sidebarConfig';
2018-06-01 12:35:51 +00:00
export default {
name: 'App',
data() {
return {
showDesk: true,
2018-06-27 14:36:42 +00:00
sidebarConfig
}
},
2018-06-01 12:35:51 +00:00
components: {
FrappeDesk: Desk,
},
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";
2018-06-11 11:20:34 +00:00
@import '~frappe-datatable/dist/frappe-datatable';
2018-06-01 12:35:51 +00:00
html {
font-size: 14px;
}
</style>