2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: Add placeholders for Item fields

This commit is contained in:
Faris Ansari 2019-10-22 18:52:56 +05:30
parent ebc8693c69
commit b9e52917be
3 changed files with 12 additions and 4 deletions

View File

@ -8,6 +8,7 @@ module.exports = {
fieldname: 'name',
label: 'Item Name',
fieldtype: 'Data',
placeholder: 'Item Name',
required: 1
},
{
@ -27,6 +28,7 @@ module.exports = {
label: 'Income',
fieldtype: 'Link',
target: 'Account',
placeholder: 'Sales',
required: 1,
getFilters: query => {
return {
@ -40,6 +42,7 @@ module.exports = {
label: 'Expense',
fieldtype: 'Link',
target: 'Account',
placeholder: 'Cost of Goods Sold',
required: 1,
getFilters: query => {
return {
@ -59,12 +62,14 @@ module.exports = {
fieldname: 'tax',
label: 'Tax',
fieldtype: 'Link',
target: 'Tax'
target: 'Tax',
placeholder: 'GST'
},
{
fieldname: 'rate',
label: 'Rate',
fieldtype: 'Currency'
fieldtype: 'Currency',
placeholder: '0.00'
}
],
quickEditFields: [

View File

@ -5,7 +5,7 @@
:class="inputClasses"
type="text"
:value="linkValue"
:placeholder="placeholder"
:placeholder="inputPlaceholder"
:readonly="df.readOnly"
@focus="onFocus"
@input="onInput"

View File

@ -5,7 +5,7 @@
:class="inputClasses"
:type="inputType"
:value="value"
:placeholder="placeholder || df.placeholder"
:placeholder="inputPlaceholder"
:readonly="df.readOnly"
@blur="e => triggerChange(e.target.value)"
/>
@ -30,6 +30,9 @@ export default {
},
'focus:outline-none focus:bg-gray-200 rounded-5px w-full text-gray-900'
];
},
inputPlaceholder() {
return this.placeholder || this.df.placeholder
}
},
methods: {