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

fix: error height in two column form

- indicate dev mode
This commit is contained in:
18alantom 2022-06-09 14:12:41 +05:30
parent f1886926f3
commit 0c705fe225
2 changed files with 18 additions and 4 deletions

View File

@ -108,6 +108,12 @@
<feather-icon name="database" class="h-4 w-4" />
<p>{{ t`Change DB` }}</p>
</button>
<p
v-if="fyo.store.isDevelopment"
class="text-xs text-gray-500 select-none"
>
dev mode
</p>
</div>
</div>
</template>

View File

@ -59,9 +59,7 @@
:style="{
...style,
height: !['AttachImage', 'Text'].includes(df.fieldtype)
? 'calc(var(--h-row-mid) + 1px)'
: 'calc((var(--h-row-mid) + 1px) * 2)',
height: getFieldHeight(df),
}"
>
<div class="py-2 pl-4 flex text-gray-600">
@ -157,6 +155,17 @@ export default {
}
},
methods: {
getFieldHeight(df) {
if (['AttachImage', 'Text'].includes(df.fieldtype)) {
return 'calc((var(--h-row-mid) + 1px) * 2)';
}
if (this.errors[df.fieldname]) {
return 'calc((var(--h-row-mid) + 1px) * 2)';
}
return 'calc(var(--h-row-mid) + 1px)';
},
getRegularValue(df) {
if (!df.inline) {
return this.doc[df.fieldname];
@ -307,7 +316,6 @@ export default {
.join(' ');
return {
'grid-template-columns': templateColumns,
height: 'calc(var(--h-row-mid) + 1px)',
};
},
submitted() {