EZQMS-1392: Obsolete documents (#7833)

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
Victor Ilyushchenko
2025-01-29 17:18:46 +03:00
committed by GitHub
parent 7ae937461f
commit 984c7d90ab
20 changed files with 143 additions and 23 deletions
@@ -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}