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">
|
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>
|
2018-06-13 09:14:51 +00:00
|
|
|
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',
|
2018-06-11 09:46:25 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2018-06-13 09:14:51 +00:00
|
|
|
showDesk: true,
|
2018-06-27 14:36:42 +00:00
|
|
|
sidebarConfig
|
2018-06-11 09:46:25 +00:00
|
|
|
}
|
|
|
|
},
|
2018-06-01 12:35:51 +00:00
|
|
|
components: {
|
2018-06-13 09:14:51 +00:00
|
|
|
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";
|
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>
|