2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00

[fix] db name section in sidebar showing absolute path instead of dbname in windows i.e. platform=win32

This commit is contained in:
Jaffrey98 2019-01-26 10:59:44 +05:30
parent aa721b59cc
commit 3653fa9b55

View File

@ -17,6 +17,7 @@
</div> </div>
</template> </template>
<script> <script>
const path = require('path');
export default { export default {
data() { data() {
return { return {
@ -54,7 +55,7 @@ export default {
const accountingSettings = await frappe.getDoc('AccountingSettings'); const accountingSettings = await frappe.getDoc('AccountingSettings');
this.companyName = accountingSettings.companyName; this.companyName = accountingSettings.companyName;
if (localStorage.dbPath) { if (localStorage.dbPath) {
const parts = localStorage.dbPath.split('/'); const parts = localStorage.dbPath.split(path.sep);
this.dbFileName = parts[parts.length - 1]; this.dbFileName = parts[parts.length - 1];
} }
}, },