Skip to content

Commit 17509c8

Browse files
elsiosanchezelsiosanchez
andauthored
Adjust fields when opening the registration navigation (#927)
Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
1 parent 2247f81 commit 17509c8

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

src/components/ADempiere/Field/index.vue

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
<el-col
2121
v-if="isDisplayedField"
2222
key="is-panel-template"
23-
:xs="24"
24-
:sm="12"
25-
:md="8"
26-
:lg="8"
27-
:xl="8"
23+
:xs="sizeField.xs"
24+
:sm="sizeField.sm"
25+
:md="sizeField.md"
26+
:lg="sizeField.lg"
27+
:xl="sizeField.xl"
2828
:class="classField"
2929
>
30-
<el-form-item>
30+
<el-form-item :class="classFrom">
3131
<template slot="label">
3232
<field-options
3333
:metadata="fieldAttributes"
@@ -103,6 +103,30 @@ export default {
103103
isMobile() {
104104
return this.$store.state.app.device === 'mobile'
105105
},
106+
classFrom() {
107+
if (this.field.componentPath === 'FieldTextLong' || this.field.componentPath === 'FieldImage') {
108+
return 'from-text-long'
109+
}
110+
return 'from-field'
111+
},
112+
sizeField() {
113+
if (this.field.isShowedRecordNavigation) {
114+
return {
115+
xs: this.field.size.xs,
116+
sm: this.field.size.sm * 2,
117+
md: this.field.size.md * 2,
118+
lg: this.field.size.lg * 2,
119+
xl: this.field.size.xl * 2
120+
}
121+
}
122+
return {
123+
xs: this.field.size.xs,
124+
sm: this.field.size.sm,
125+
md: this.field.size.md,
126+
lg: this.field.size.lg,
127+
xl: this.field.size.xl
128+
}
129+
},
106130
// load the component that is indicated in the attributes of received property
107131
componentRender() {
108132
if (this.isEmptyValue(this.field.componentPath || !this.field.isSupported)) {
@@ -310,10 +334,16 @@ export default {
310334
/**
311335
* Separation between elements (item) of the form
312336
*/
337+
.from-text-long {
338+
max-height: 300px;
339+
min-height: 250px;
340+
}
341+
.from-field {
342+
max-height: 100px;
343+
}
313344
.el-form-item {
314345
margin-bottom: 10px !important;
315346
margin-left: 10px;
316-
// this.field.isShowedRecordNavigation
317347
margin-right: 10px;
318348
}
319349

src/utils/ADempiere/references.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,9 @@ export const YES_NO = {
514514
size: {
515515
xs: 14,
516516
sm: 8,
517-
md: 8,
518-
lg: 3,
519-
xl: 6
517+
md: 6,
518+
lg: 6,
519+
xl: 4
520520
}
521521
}
522522

0 commit comments

Comments
 (0)