feat: implement shared form view(WIP)

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2021-10-10 15:55:16 +05:30
parent 940d5d3994
commit ecea4c92dc
20 changed files with 3762 additions and 1863 deletions

View File

@@ -0,0 +1,33 @@
export default {
props: {
disabledColumns: {
type: Object,
default() {
return {}
}
},
meta: Object,
sqlUi: [Object, Function],
nodes: [Object],
api: [Object]
},
methods: {
isValid(_columnObj, rowObj, required = false) {
let columnObj = _columnObj
if (columnObj.bt) {
columnObj = this.meta.columns.find(c => c.cn === columnObj.bt.cn)
}
return ((required || columnObj.rqd) &&
(rowObj[columnObj._cn] === undefined || rowObj[columnObj._cn] === null) &&
!columnObj.default)
},
isRequired(_columnObj, rowObj, required = false) {
let columnObj = _columnObj
if (columnObj.bt) {
columnObj = this.meta.columns.find(c => c.cn === columnObj.bt.cn)
}
return ((required || columnObj.rqd) &&
!columnObj.default)
}
}
}