mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 12:25:17 +00:00
show attachments in Table
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
3f3953de3a
commit
58649a7a7d
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -60,9 +60,16 @@ export class TBacklink extends TComment implements Backlink {
|
|||||||
export class TAttachment extends TDoc implements Attachment {
|
export class TAttachment extends TDoc implements Attachment {
|
||||||
attachedTo!: Ref<Doc>
|
attachedTo!: Ref<Doc>
|
||||||
attachedToClass!: Ref<Class<Doc>>
|
attachedToClass!: Ref<Class<Doc>>
|
||||||
|
@Prop(TypeString(), 'Name' as IntlString)
|
||||||
name!: string
|
name!: string
|
||||||
|
|
||||||
|
@Prop(TypeString(), 'File' as IntlString)
|
||||||
file!: string
|
file!: string
|
||||||
|
|
||||||
|
@Prop(TypeString(), 'Size' as IntlString)
|
||||||
size!: number
|
size!: number
|
||||||
|
|
||||||
|
@Prop(TypeString(), 'Type' as IntlString)
|
||||||
type!: string
|
type!: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
import { generateId } from '@anticrm/core'
|
import { generateId } from '@anticrm/core'
|
||||||
import { createQuery, getClient, PDFViewer } from '@anticrm/presentation'
|
import { createQuery, getClient, PDFViewer } from '@anticrm/presentation'
|
||||||
import type { Attachment } from '@anticrm/chunter'
|
import type { Attachment } from '@anticrm/chunter'
|
||||||
|
import { Table } from '@anticrm/view-resources'
|
||||||
|
|
||||||
import { uploadFile } from '../utils'
|
import { uploadFile } from '../utils'
|
||||||
|
|
||||||
@ -82,28 +83,12 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<input bind:this={inputFile} type="file" name="file" id="file" style="display: none" on:change={fileSelected}/>
|
<input bind:this={inputFile} type="file" name="file" id="file" style="display: none" on:change={fileSelected}/>
|
||||||
</div>
|
</div>
|
||||||
<table class="table-body">
|
<Table
|
||||||
<thead>
|
_class={chunter.class.Attachment}
|
||||||
<tr class="tr-head">
|
config={['name', 'file', 'type']}
|
||||||
<th>Attachments</th>
|
options={ {} }
|
||||||
<th>Time</th>
|
search=""
|
||||||
</tr>
|
/>
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{#each attachments as file}
|
|
||||||
<tr class="tr-body">
|
|
||||||
<td class="item flex-row-center">
|
|
||||||
<div class="flex-center file-icon">pdf</div>
|
|
||||||
<div class="flex-col flex-grow" style="cursor: pointer" on:click={ () => { showPopup(PDFViewer, { file: file.file }, 'right') } }>
|
|
||||||
<div class="overflow-label caption-color">{trimFilename(file.name)}</div>
|
|
||||||
<div class="overflow-label file-desc">{file.type}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td>10 / 8</td>
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user