mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 20:27:43 +02:00
EZQMS-1392: Obsolete documents (#7833)
Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
+5
-4
@@ -148,9 +148,10 @@
|
||||
{@const title = doc ? getDocumentName(doc) : meta?.title ?? ''}
|
||||
{@const docid = doc?._id ?? prjdoc._id}
|
||||
{@const isFolder = prjdoc.document === documents.ids.Folder}
|
||||
{@const isObsolete = doc ? doc.state === DocumentState.Obsolete : false}
|
||||
{@const children = metaid ? childrenByParent[metaid] ?? [] : []}
|
||||
|
||||
{#if metaid}
|
||||
{@const children = childrenByParent[metaid] ?? []}
|
||||
{#if metaid && (!isObsolete || children.length > 0)}
|
||||
{@const isDraggedOver = draggedOver === metaid}
|
||||
<div class="flex-col relative">
|
||||
{#if isDraggedOver}
|
||||
@@ -160,12 +161,12 @@
|
||||
_id={docid}
|
||||
icon={isFolder ? documents.icon.Folder : documents.icon.Document}
|
||||
iconProps={{
|
||||
fill: 'currentColor'
|
||||
fill: isObsolete ? 'var(--dangerous-bg-color)' : 'currentColor'
|
||||
}}
|
||||
{title}
|
||||
selected={selected === docid || selected === prjdoc._id}
|
||||
isFold
|
||||
empty={children.length === 0 || children === undefined}
|
||||
empty={children.length === 0}
|
||||
actions={getMoreActions !== undefined ? () => getDocMoreActions(prjdoc) : undefined}
|
||||
{level}
|
||||
{collapsedPrefix}
|
||||
|
||||
Reference in New Issue
Block a user