|
|
@ -1554,10 +1554,16 @@ export default class View implements ViewType { |
|
|
|
'base_id', |
|
|
|
'base_id', |
|
|
|
'source_id', |
|
|
|
'source_id', |
|
|
|
'order', |
|
|
|
'order', |
|
|
|
'width', |
|
|
|
...(view.type === ViewTypes.FORM |
|
|
|
'group_by', |
|
|
|
? [ |
|
|
|
'group_by_order', |
|
|
|
'label', |
|
|
|
'group_by_sort', |
|
|
|
'help', |
|
|
|
|
|
|
|
'description', |
|
|
|
|
|
|
|
'required', |
|
|
|
|
|
|
|
'enable_scanner', |
|
|
|
|
|
|
|
'meta', |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
: ['width', 'group_by', 'group_by_order', 'group_by_sort']), |
|
|
|
]), |
|
|
|
]), |
|
|
|
fk_view_id: view.id, |
|
|
|
fk_view_id: view.id, |
|
|
|
base_id: view.base_id, |
|
|
|
base_id: view.base_id, |
|
|
@ -1760,6 +1766,7 @@ export default class View implements ViewType { |
|
|
|
|
|
|
|
|
|
|
|
const copyFromView = |
|
|
|
const copyFromView = |
|
|
|
view.copy_from_id && (await View.get(view.copy_from_id, ncMeta)); |
|
|
|
view.copy_from_id && (await View.get(view.copy_from_id, ncMeta)); |
|
|
|
|
|
|
|
await copyFromView?.getView(); |
|
|
|
|
|
|
|
|
|
|
|
// get base and base id if missing
|
|
|
|
// get base and base id if missing
|
|
|
|
if (!(view.base_id && view.source_id)) { |
|
|
|
if (!(view.base_id && view.source_id)) { |
|
|
@ -1809,12 +1816,10 @@ export default class View implements ViewType { |
|
|
|
); |
|
|
|
); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ViewTypes.FORM: |
|
|
|
case ViewTypes.FORM: |
|
|
|
const copyFromFormView = |
|
|
|
|
|
|
|
view.copy_from_id && (await FormView.get(view.copy_from_id, ncMeta)); |
|
|
|
|
|
|
|
await FormView.insert( |
|
|
|
await FormView.insert( |
|
|
|
{ |
|
|
|
{ |
|
|
|
heading: view.title, |
|
|
|
heading: view.title, |
|
|
|
...(copyFromFormView || {}), |
|
|
|
...(copyFromView?.view || {}), |
|
|
|
...view, |
|
|
|
...view, |
|
|
|
fk_view_id: view_id, |
|
|
|
fk_view_id: view_id, |
|
|
|
}, |
|
|
|
}, |
|
|
|