|
|
@ -1601,17 +1601,16 @@ class BaseModelSqlv2 { |
|
|
|
// hide if column marked as hidden in view
|
|
|
|
// hide if column marked as hidden in view
|
|
|
|
// of if column is system field and system field is hidden
|
|
|
|
// of if column is system field and system field is hidden
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
fieldsSet |
|
|
|
shouldSkipField( |
|
|
|
? !fieldsSet.has(column.title) |
|
|
|
fieldsSet, |
|
|
|
: !extractPkAndPv && |
|
|
|
viewOrTableColumn, |
|
|
|
!(viewOrTableColumn instanceof Column) && |
|
|
|
view, |
|
|
|
(!(viewOrTableColumn as GridViewColumn)?.show || |
|
|
|
column, |
|
|
|
(!view?.show_system_fields && |
|
|
|
extractPkAndPv, |
|
|
|
column.uidt !== UITypes.ForeignKey && |
|
|
|
) |
|
|
|
!column.pk && |
|
|
|
) { |
|
|
|
isSystemColumn(column))) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!checkColumnRequired(column, fields, extractPkAndPv)) continue; |
|
|
|
if (!checkColumnRequired(column, fields, extractPkAndPv)) continue; |
|
|
|
|
|
|
|
|
|
|
@ -3347,4 +3346,35 @@ function haveFormulaColumn(columns: Column[]) { |
|
|
|
return columns.some((c) => c.uidt === UITypes.Formula); |
|
|
|
return columns.some((c) => c.uidt === UITypes.Formula); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function shouldSkipField( |
|
|
|
|
|
|
|
fieldsSet, |
|
|
|
|
|
|
|
viewOrTableColumn, |
|
|
|
|
|
|
|
view, |
|
|
|
|
|
|
|
column, |
|
|
|
|
|
|
|
extractPkAndPv, |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
if (fieldsSet) { |
|
|
|
|
|
|
|
return !fieldsSet.has(column.title); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (!extractPkAndPv) { |
|
|
|
|
|
|
|
if (!(viewOrTableColumn instanceof Column)) { |
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
!(viewOrTableColumn as GridViewColumn)?.show && |
|
|
|
|
|
|
|
!(column.rqd && !column.cdf && !column.ai) && |
|
|
|
|
|
|
|
!column.pk |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
!view?.show_system_fields && |
|
|
|
|
|
|
|
column.uidt !== UITypes.ForeignKey && |
|
|
|
|
|
|
|
!column.pk && |
|
|
|
|
|
|
|
isSystemColumn(column) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export { BaseModelSqlv2 }; |
|
|
|
export { BaseModelSqlv2 }; |
|
|
|