2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11: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 = { module.exports = {
name: "AccountingSettings", name: "AccountingSettings",
label: "AccountingSettings", label: "Accounting Settings",
naming: "name", // {random|autoincrement} naming: "name", // {random|autoincrement}
isSingle: 1, isSingle: 1,
isChild: 0, isChild: 0,

View File

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

View File

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