mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
client filtering model transactions
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
daf7ea7208
commit
899e9e9f83
@ -59,8 +59,9 @@ class ClientImpl implements Client {
|
||||
async tx (tx: Tx): Promise<void> {
|
||||
if (tx.objectSpace === core.space.Model) {
|
||||
this.hierarchy.tx(tx)
|
||||
await this.model.tx(tx)
|
||||
}
|
||||
await Promise.all([this.conn.tx(tx), this.model.tx(tx)])
|
||||
await this.conn.tx(tx)
|
||||
this.notify?.(tx)
|
||||
}
|
||||
|
||||
|
@ -44,14 +44,14 @@
|
||||
const query = createQuery()
|
||||
$: query.query(chunter.class.Backlink, { objectId: object._id }, result => { backlinks = result })
|
||||
|
||||
function save() {
|
||||
async function save() {
|
||||
const attributes: Record<string, any> = {}
|
||||
for (const key in object) {
|
||||
if ((newValue as any)[key] !== (object as any)[key]) {
|
||||
attributes[key] = (newValue as any)[key]
|
||||
}
|
||||
}
|
||||
client.updateDoc(recruit.class.Candidate, object.space, object._id, attributes)
|
||||
await client.updateDoc(recruit.class.Candidate, object.space, object._id, attributes)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user