mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-29 03:21:13 +00:00
fix predicate and attachments
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
8146b255d2
commit
f59ca31d5d
@ -47,7 +47,7 @@ const predicates: Record<string, PredicateFactory> = {
|
||||
}
|
||||
|
||||
export function isPredicate (o: Record<string, any>): boolean {
|
||||
if (typeof o !== 'object') { return false }
|
||||
if (o === null || typeof o !== 'object') { return false }
|
||||
const keys = Object.keys(o)
|
||||
return keys.length > 0 && keys.every((key) => key.startsWith('$'))
|
||||
}
|
||||
|
@ -23,14 +23,12 @@
|
||||
import chunter from '@anticrm/chunter'
|
||||
|
||||
export let object: Doc
|
||||
export let space: Ref<Space>
|
||||
// export let space: Ref<Space>
|
||||
|
||||
let files: Attachment[] = [{ name: 'Application description.pdf', type: 'PDF / 2,5 MB' }, { name: 'Application description.pdf', type: 'PDF / 2,5 MB' }]
|
||||
|
||||
console.log('query space', space)
|
||||
let files: Attachment[] = []
|
||||
|
||||
const query = createQuery()
|
||||
// $: query.query(chunter.class.Attachment, { space }, result => { files = result})
|
||||
$: query.query(chunter.class.Attachment, { attachmentTo: object._id }, result => { files = result})
|
||||
|
||||
</script>
|
||||
|
||||
@ -42,7 +40,7 @@
|
||||
<table class="table-body">
|
||||
<thead>
|
||||
<tr class="tr-head">
|
||||
<th>Attachments (2)</th>
|
||||
<th>Attachments</th>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -140,7 +140,7 @@
|
||||
</div>
|
||||
|
||||
<div class="attachments">
|
||||
<Attachments />
|
||||
<Attachments {object}/>
|
||||
</div>
|
||||
|
||||
</Panel>
|
||||
|
Loading…
Reference in New Issue
Block a user