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

Title for SettingSection

This commit is contained in:
Faris Ansari 2018-10-23 09:48:07 +05:30
parent 40d82bf5fd
commit e7984bcfce
3 changed files with 13 additions and 3 deletions

View File

@ -2,7 +2,7 @@ const countryList = Object.keys(require('../../../fixtures/countryInfo.json')).s
module.exports = {
name: "AccountingSettings",
label: "AccountingSettings",
label: "Accounting Settings",
naming: "name", // {random|autoincrement}
isSingle: 1,
isChild: 0,

View File

@ -8,3 +8,10 @@ export default {
props: ['title']
}
</script>
<style>
.page-header {
position: sticky;
top: 0;
z-index: 1;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div v-if="doc">
<h4 class="mb-3">{{ doctype }}</h4>
<h4 class="mb-3">{{ title }}</h4>
<form-layout
:doc="doc"
:fields="fields"
@ -20,12 +20,15 @@ export default {
data() {
return {
doc: null,
title: '',
fields: []
}
},
async mounted() {
this.doc = await frappe.getDoc(this.doctype);
this.fields = frappe.getMeta(this.doctype).fields;
const meta = frappe.getMeta(this.doctype);
this.fields = meta.fields;
this.title = meta.label;
},
methods: {
saveDoc() {