mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
parent
2c681a88a9
commit
fd13e7f446
@ -916,7 +916,7 @@ export function createModel (builder: Builder): void {
|
||||
component: tracker.component.SetParentIssueActionPopup,
|
||||
element: 'top',
|
||||
fillProps: {
|
||||
_object: 'value'
|
||||
_objects: 'value'
|
||||
}
|
||||
},
|
||||
label: tracker.string.SetParent,
|
||||
|
@ -547,7 +547,14 @@ export class LiveQuery extends TxProcessor implements Client {
|
||||
if (q.result instanceof Promise) {
|
||||
q.result = await q.result
|
||||
}
|
||||
q.result.push(res[0])
|
||||
const doc = res[0]
|
||||
const pos = q.result.findIndex((el) => el._id === doc._id)
|
||||
if (pos !== -1) {
|
||||
q.result[pos] = doc
|
||||
} else {
|
||||
q.result.push(doc)
|
||||
q.total++
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -221,6 +221,8 @@ async function ShowPopup (
|
||||
}
|
||||
if (docKey === '_object') {
|
||||
;(cprops as any)[propKey] = docs[0]
|
||||
} else if (docKey === '_objects') {
|
||||
;(cprops as any)[propKey] = docs.length === 1 ? docs[0] : docs
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user