mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-26 02:10:07 +00:00
important client
fix
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
4a45a0b5fe
commit
d89b8827ea
@ -39,7 +39,8 @@ class UIClient extends TxOperations implements Client {
|
||||
}
|
||||
|
||||
tx(tx: Tx): Promise<void> {
|
||||
return Promise.all([super.tx(tx), this.liveQuery.tx(tx)]) as unknown as Promise<void>
|
||||
// return Promise.all([super.tx(tx), this.liveQuery.tx(tx)]) as unknown as Promise<void>
|
||||
return super.tx(tx)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,32 +84,13 @@
|
||||
|
||||
if (dragCardInitialPosition !== to) {
|
||||
|
||||
// const remove = client.txFactory.createTxUpdateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
// $pull: {
|
||||
// order: id
|
||||
// }
|
||||
// })
|
||||
|
||||
// const add = client.txFactory.createTxUpdateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
// $push: {
|
||||
// order: {
|
||||
// $each: [id],
|
||||
// $position: to
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
// const updateTx = client.txFactory.createTxBulkWrite(core.space.Model, [remove, add])
|
||||
|
||||
// await client.tx(updateTx)
|
||||
|
||||
await client.updateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
const remove = client.txFactory.createTxUpdateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
$pull: {
|
||||
order: id
|
||||
}
|
||||
})
|
||||
|
||||
client.updateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
const add = client.txFactory.createTxUpdateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
$push: {
|
||||
order: {
|
||||
$each: [id],
|
||||
@ -117,6 +98,25 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const updateTx = client.txFactory.createTxBulkWrite(core.space.Model, [remove, add])
|
||||
|
||||
await client.tx(updateTx)
|
||||
|
||||
// await client.updateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
// $pull: {
|
||||
// order: id
|
||||
// }
|
||||
// })
|
||||
|
||||
// client.updateDoc(core.class.SpaceWithStates, core.space.Model, space, {
|
||||
// $push: {
|
||||
// order: {
|
||||
// $each: [id],
|
||||
// $position: to
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user