add multiple statuses to proejcts, though it's a bit hacked on.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -8,13 +8,21 @@
|
||||
|
||||
let expiringProjects: ProjectResult[];
|
||||
let activeProjects: ProjectResult[];
|
||||
let inactiveProjects: ProjectResult[];
|
||||
let completedProjects: ProjectResult[];
|
||||
let failedProjects: ProjectResult[];
|
||||
let posponedProjects: ProjectResult[];
|
||||
let ideaProjects: ProjectResult[];
|
||||
let project: ProjectResult = null;
|
||||
|
||||
$: project = $selectionStore.hash.startsWith("P") ? projects.find(p => p.id === $selectionStore.hash) : null;
|
||||
$: expiringProjects = projects.filter(p => p.active && p.endTime).sort((a,b) => Date.parse(a.endTime) - Date.parse(b.endTime));
|
||||
$: activeProjects = projects.filter(p => p.active && !p.endTime).sort((a,b) => a.name.localeCompare(b.name));
|
||||
$: completedProjects = projects.filter(p => !p.active).sort((a,b) => a.name.localeCompare(b.name));
|
||||
$: inactiveProjects = projects.filter(p => !p.active).sort((a,b) => a.name.localeCompare(b.name));
|
||||
$: completedProjects = inactiveProjects.filter(p => p.statusTag === "completed" || p.statusTag == null);
|
||||
$: failedProjects = inactiveProjects.filter(p => p.statusTag === "failed" || p.statusTag == null);
|
||||
$: postponedProjects = inactiveProjects.filter(p => p.statusTag === "postponed" || p.statusTag == null);
|
||||
$: ideaProjects = inactiveProjects.filter(p => p.statusTag === "idea" || p.statusTag == null);
|
||||
|
||||
$: {
|
||||
if (project === null && projects.length > 0) {
|
||||
@@ -31,6 +39,9 @@
|
||||
<QlList label="Deadlines" projects={expiringProjects} />
|
||||
<QlList label="Active" projects={activeProjects} />
|
||||
<QlList label="Completed" projects={completedProjects} />
|
||||
<QlList label="Postponed" projects={postponedProjects} />
|
||||
<QlList label="Ideas" projects={ideaProjects} />
|
||||
<QlList label="Failed" projects={failedProjects} />
|
||||
</div>
|
||||
<div class="body">
|
||||
{#if project != null}
|
||||
|
||||
Reference in New Issue
Block a user