2018-06-01 12:35:51 +00:00
|
|
|
<template>
|
|
|
|
<div id="app">
|
2018-10-22 18:10:22 +00:00
|
|
|
<div class="row no-gutters" v-if="showDesk">
|
2018-10-10 18:51:03 +00:00
|
|
|
<sidebar class="col-2" />
|
|
|
|
<div class="page-container col-10 bg-light">
|
|
|
|
<router-view />
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-10-05 05:35:20 +00:00
|
|
|
<setup-wizard v-else/>
|
2018-06-01 12:35:51 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-10-10 18:51:03 +00:00
|
|
|
import Sidebar from './components/Sidebar';
|
2018-10-22 18:02:47 +00:00
|
|
|
import frappe from 'frappejs';
|
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-10-05 05:35:20 +00:00
|
|
|
import SetupWizard from './pages/SetupWizard/SetupWizard';
|
2018-06-01 12:35:51 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'App',
|
2018-06-11 09:46:25 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2018-10-22 18:02:47 +00:00
|
|
|
showDesk: JSON.parse(localStorage.showDesk),
|
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-10-22 18:10:22 +00:00
|
|
|
SetupWizard,
|
2018-10-10 18:51:03 +00:00
|
|
|
Sidebar
|
2018-06-11 09:46:25 +00:00
|
|
|
},
|
2018-10-05 05:35:20 +00:00
|
|
|
async created() {
|
2018-10-22 18:02:47 +00:00
|
|
|
frappe.events.on('show-setup-wizard', () => {
|
2018-10-05 05:35:20 +00:00
|
|
|
this.showDesk = false;
|
2018-10-22 18:02:47 +00:00
|
|
|
})
|
2018-10-05 05:35:20 +00:00
|
|
|
|
2018-10-22 18:02:47 +00:00
|
|
|
frappe.events.on('show-desk', () => {
|
2018-10-05 05:35:20 +00:00
|
|
|
this.showDesk = true;
|
|
|
|
this.$router.push('/tree/Account');
|
|
|
|
});
|
2018-06-01 12:35:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss">
|
2018-10-10 18:51:03 +00:00
|
|
|
@import "styles/index.scss";
|
2018-10-22 21:29:07 +00:00
|
|
|
.page-container {
|
|
|
|
height: 100vh;
|
|
|
|
overflow: auto;
|
|
|
|
overflow-x: hidden;
|
|
|
|
}
|
2018-06-01 12:35:51 +00:00
|
|
|
</style>
|