forked from jappel/leistungsbilanz-ts
Drag and drop working
This commit is contained in:
parent
efbb81c13d
commit
897e506b74
9 changed files with 679 additions and 63 deletions
|
|
@ -123,4 +123,14 @@ export class CircuitDeviceRowRepository {
|
|||
async delete(rowId: string) {
|
||||
await db.delete(circuitDeviceRows).where(eq(circuitDeviceRows.id, rowId));
|
||||
}
|
||||
|
||||
async moveToCircuit(rowId: string, targetCircuitId: string, sortOrder: number) {
|
||||
await db
|
||||
.update(circuitDeviceRows)
|
||||
.set({
|
||||
circuitId: targetCircuitId,
|
||||
sortOrder,
|
||||
})
|
||||
.where(eq(circuitDeviceRows.id, rowId));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue