|
|
@ -925,7 +925,7 @@ export default class Column<T = any> implements ColumnType { |
|
|
|
|
|
|
|
|
|
|
|
static async update( |
|
|
|
static async update( |
|
|
|
colId: string, |
|
|
|
colId: string, |
|
|
|
column: Partial<Column>, |
|
|
|
column: Partial<Column> & Partial<Pick<ColumnReqType, 'column_order'>>, |
|
|
|
ncMeta = Noco.ncMeta, |
|
|
|
ncMeta = Noco.ncMeta, |
|
|
|
) { |
|
|
|
) { |
|
|
|
const oldCol = await Column.get({ colId }, ncMeta); |
|
|
|
const oldCol = await Column.get({ colId }, ncMeta); |
|
|
@ -1079,6 +1079,19 @@ export default class Column<T = any> implements ColumnType { |
|
|
|
await Column.delete(barcodeCol.fk_column_id, ncMeta); |
|
|
|
await Column.delete(barcodeCol.fk_column_id, ncMeta); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (column.column_order.order && column.column_order.view_id) { |
|
|
|
|
|
|
|
const viewColumn = ( |
|
|
|
|
|
|
|
await View.getColumns(column.column_order.view_id) |
|
|
|
|
|
|
|
).find((col) => col.fk_column_id === column.id); |
|
|
|
|
|
|
|
const res = await View.updateColumn( |
|
|
|
|
|
|
|
column.column_order.view_id, |
|
|
|
|
|
|
|
viewColumn.id, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
order: column.column_order.order, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
console.log(res); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// get existing cache
|
|
|
|
// get existing cache
|
|
|
|
const key = `${CacheScope.COLUMN}:${colId}`; |
|
|
|
const key = `${CacheScope.COLUMN}:${colId}`; |
|
|
|