|
|
@ -52,6 +52,7 @@ import { |
|
|
|
KanbanView, |
|
|
|
KanbanView, |
|
|
|
Model, |
|
|
|
Model, |
|
|
|
Source, |
|
|
|
Source, |
|
|
|
|
|
|
|
View, |
|
|
|
} from '~/models'; |
|
|
|
} from '~/models'; |
|
|
|
import Noco from '~/Noco'; |
|
|
|
import Noco from '~/Noco'; |
|
|
|
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; |
|
|
|
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; |
|
|
@ -195,7 +196,8 @@ export class ColumnsService { |
|
|
|
formula?: string; |
|
|
|
formula?: string; |
|
|
|
formula_raw?: string; |
|
|
|
formula_raw?: string; |
|
|
|
parsed_tree?: any; |
|
|
|
parsed_tree?: any; |
|
|
|
}; |
|
|
|
} & Partial<Pick<ColumnReqType, 'column_order'>>; |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
isCreatedOrLastModifiedTimeCol(column) || |
|
|
|
isCreatedOrLastModifiedTimeCol(column) || |
|
|
|
[ |
|
|
|
[ |
|
|
@ -274,7 +276,28 @@ export class ColumnsService { |
|
|
|
meta: colBody.meta, |
|
|
|
meta: colBody.meta, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
[UITypes.Links, UITypes.LinkToAnotherRecord].includes( |
|
|
|
|
|
|
|
column.uidt, |
|
|
|
|
|
|
|
) && |
|
|
|
|
|
|
|
colBody?.column_order && |
|
|
|
|
|
|
|
colBody.column_order?.order && |
|
|
|
|
|
|
|
colBody.column_order?.view_id |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
const viewColumn = ( |
|
|
|
|
|
|
|
await View.getColumns(colBody.column_order.view_id) |
|
|
|
|
|
|
|
).find((col) => col.fk_column_id === column.id); |
|
|
|
|
|
|
|
await View.updateColumn( |
|
|
|
|
|
|
|
colBody.column_order.view_id, |
|
|
|
|
|
|
|
viewColumn.id, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
order: colBody.column_order.order, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await this.updateRollupOrLookup(colBody, column); |
|
|
|
await this.updateRollupOrLookup(colBody, column); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
NcError.notImplemented( |
|
|
|
NcError.notImplemented( |
|
|
|