diff --git a/models/doctype/Item/Item.js b/models/doctype/Item/Item.js index 2e1f6ecd..a5bb3c67 100644 --- a/models/doctype/Item/Item.js +++ b/models/doctype/Item/Item.js @@ -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: [ diff --git a/src/components/Controls/AutoComplete.vue b/src/components/Controls/AutoComplete.vue index 69074c04..69095cb7 100644 --- a/src/components/Controls/AutoComplete.vue +++ b/src/components/Controls/AutoComplete.vue @@ -5,7 +5,7 @@ :class="inputClasses" type="text" :value="linkValue" - :placeholder="placeholder" + :placeholder="inputPlaceholder" :readonly="df.readOnly" @focus="onFocus" @input="onInput" diff --git a/src/components/Controls/Base.vue b/src/components/Controls/Base.vue index b56c0646..74d8c052 100644 --- a/src/components/Controls/Base.vue +++ b/src/components/Controls/Base.vue @@ -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: {