This commit is contained in:
@@ -23,16 +23,25 @@
|
||||
let ideaProjects: ProjectResult[];
|
||||
let project: ProjectResult = null;
|
||||
|
||||
function sortProjects(a: ProjectResult, b: ProjectResult) {
|
||||
const aName = `${a.tags.slice(0, 1).map(t => t+":").join("")} ${a.name}`.trim();
|
||||
const bName = `${b.tags.slice(0, 1).map(t => t+":").join("")} ${b.name}`.trim();
|
||||
|
||||
console.log(aName, bName)
|
||||
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
$: 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));
|
||||
$: inactiveProjects = projects.filter(p => !p.active).sort((a,b) => a.name.localeCompare(b.name));
|
||||
$: activeProjects = projects.filter(p => p.active && !p.endTime).sort(sortProjects);
|
||||
$: inactiveProjects = projects.filter(p => !p.active).sort(sortProjects);
|
||||
$: completedProjects = inactiveProjects.filter(p => p.statusTag === "completed" || p.statusTag == null);
|
||||
$: failedProjects = inactiveProjects.filter(p => p.statusTag === "failed" || p.statusTag === "declined");
|
||||
$: onholdProjects = inactiveProjects.filter(p => p.statusTag === "on hold" || p.statusTag === "onhold");
|
||||
$: ideaProjects = inactiveProjects.filter(p => p.statusTag === "to do" || p.statusTag === "idea");
|
||||
$: backgroundProjects = inactiveProjects.filter(p => p.statusTag === "background");
|
||||
$: progressProjects = inactiveProjects.filter(p => p.statusTag === "progress");
|
||||
$: onholdProjects = inactiveProjects.filter(p => p.statusTag === "on hold" || p.statusTag === "onhold").sort(sortProjects);
|
||||
$: ideaProjects = inactiveProjects.filter(p => p.statusTag === "to do" || p.statusTag === "idea").sort(sortProjects);
|
||||
$: backgroundProjects = inactiveProjects.filter(p => p.statusTag === "background").sort(sortProjects);
|
||||
$: progressProjects = inactiveProjects.filter(p => p.statusTag === "progress").sort(sortProjects);
|
||||
|
||||
$: {
|
||||
if (project === null && projects.length > 0) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div style={style} class="tag" class:small>{value}</div>
|
||||
<div style={style} class="tag" class:small>{value}{small?":":""}</div>
|
||||
|
||||
<style>
|
||||
div.tag {
|
||||
@@ -28,6 +28,14 @@
|
||||
}
|
||||
|
||||
div.tag.small {
|
||||
padding: 0em 0.5ch;
|
||||
font-size: 1em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-right: 0.50ch;
|
||||
border: none;
|
||||
}
|
||||
|
||||
:global(div.ql-list-item:hover) div.tag.small {
|
||||
filter: brightness(150%);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user