feat(planner): save accordion state (#5042)

Signed-off-by: Eduard Aksamitov <e@euaaaio.ru>
This commit is contained in:
Eduard Aksamitov
2024-03-25 09:56:52 +07:00
committed by GitHub
parent 18e8dcab57
commit 2bb4295f4d
4 changed files with 23 additions and 13 deletions
@@ -23,7 +23,6 @@
import ToDoDraggable from './ToDoDraggable.svelte'
import ToDoDuration from './ToDoDuration.svelte'
import ToDoElement from './ToDoElement.svelte'
import time from '../plugin'
import { dragging } from '../dragging'
import ToDoProjectGroup from './ToDoProjectGroup.svelte'
import { getClient } from '@hcengineering/presentation'
@@ -49,6 +48,8 @@
let groups: Project[] | undefined = undefined
let withoutProject: boolean = false
$: id = `group:${title}`
$: groups = updateGroups(todos, projects)
const updateGroups = (_todos: WithLookup<ToDo>[], _projects: IdMap<Project>): Project[] | undefined => {
@@ -92,12 +93,12 @@
{#if showTitle}
<AccordionItem
{id}
label={title}
size={'large'}
bottomSpace={false}
counter={todos.length}
duration={showDuration}
isOpen={title !== time.string.Done}
fixHeader
background={'var(--theme-navpanel-color)'}
>