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

incr: remove chevrons when readonly

This commit is contained in:
18alantom 2022-05-18 23:04:51 +05:30
parent ce87ff6802
commit 3a527c1fdd
4 changed files with 7 additions and 4 deletions

View File

@ -17,7 +17,7 @@
/>
<div
v-show="!showInput"
:class="[inputClasses, 'cursor-text']"
:class="[inputClasses, 'cursor-text whitespace-nowrap overflow-x-scroll']"
@click="activateInput"
@focus="activateInput"
tabindex="0"

View File

@ -27,11 +27,12 @@
v-if="value"
>
<TableRow
v-for="row in value"
:class="{ 'pointer-events-none': isReadOnly }"
ref="table-row"
v-for="row in value"
:key="row.name"
v-bind="{ row, tableFields, size, ratio, isNumeric }"
:read-only="isReadOnly"
@remove="removeRow(row)"
/>
</div>

View File

@ -16,11 +16,12 @@
<!-- Data Input Form Control -->
<FormControl
v-for="df in tableFields"
:size="size"
class="py-2"
:read-only="readOnly"
:input-class="{ 'text-right': isNumeric(df), 'bg-transparent': true }"
:key="df.fieldname"
v-for="df in tableFields"
:df="df"
:value="row[df.fieldname]"
@change="(value) => onChange(df, value)"
@ -50,6 +51,7 @@ export default {
size: String,
ratio: Array,
isNumeric: Function,
readOnly: Boolean,
},
emits: ['remove'],
components: {

View File

@ -297,7 +297,7 @@ export default {
};
},
submitted() {
return Boolean(this.doc.schema.isSubmittable && this.doc.submitted);
return this.doc.isSubmitted;
},
},
};