implemented task priorities

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-09-22 12:11:45 +02:00
parent 48deb1a91c
commit 97c395fb38
5 changed files with 87 additions and 7 deletions

View File

@@ -221,11 +221,12 @@ public class Task implements Mappable {
memberMap.put(entry.getKey(),entry.getValue().toMap());
}
map.put(ID, id);
map.put(PROJECT_ID, projectId);
map.put(PARENT_TASK_ID, parentTaskId);
map.put(NAME, name);
map.put(DESCRIPTION, mapMarkdown(description));
map.put(STATUS, status);
map.put(PROJECT_ID, projectId);
map.put(PARENT_TASK_ID, parentTaskId);
map.put(PRIORITY,priority);
map.put(NAME, name);
map.put(DESCRIPTION, mapMarkdown(description));
map.put(STATUS, status);
map.put(ESTIMATED_TIME, estimatedTime);
map.put(START_DATE,start);
map.put(DUE_DATE,dueDate);

View File

@@ -2,7 +2,7 @@
let { onclick, ondragstart, task } = $props();
</script>
<div draggable="true" class="box" {onclick} {ondragstart} >
<div draggable="true" class={`box prio_${task.priority} p${Math.floor(task.priority/10)*10} p${task.priority % 10}`} {onclick} {ondragstart} >
<span class="title">{task.name}</span>
{#if task.estimated_time}
<span class="estimate">

View File

@@ -181,7 +181,7 @@
<span class="error">{error}</span>
{/if}
{#if task}
<div class="task grid2">
<div class={`task grid2 prio_${task.priority} p${Math.floor(task.priority/10)*10} p${task.priority % 10}`} >
{#if project}
<div>{t('project')}</div>
<div class="project">

View File

@@ -180,6 +180,7 @@
"positions": "Positionen",
"postpone": "aufschieben",
"price": "Preis",
"priority": "Priorität",
"processing_code": "Code wird verarbeitet…",
"project": "Projekt",
"projects": "Projekte",

View File

@@ -416,3 +416,81 @@ a.wikilink{
padding-top: 8px;
}
}
.task.p10 .name{
color: #fff066;
}
.kanban .state_20 .box.p10,
.kanban .state_40 .box.p10{
background: #fff066;
}
.task.p20 .name{
color: #ffe706;
}
.kanban .state_20 .box.p20,
.kanban .state_40 .box.p20{
background: #ffe706;
}
.task.p30 .name{
color: #ffa906;
}
.kanban .state_20 .box.p30,
.kanban .state_40 .box.p30{
background: #ffa906;
}
.task.p40 .name{
color: #ff8606;
}
.kanban .state_20 .box.p40,
.kanban .state_40 .box.p40{
background: #ff8606;
}
.task.p50 .name{
color: #ff4c06;
}
.kanban .state_20 .box.p50,
.kanban .state_40 .box.p50{
background: #ff4c06;
}
.task.p60 .name{
color: #ff3506;
}
.kanban .state_20 .box.p60,
.kanban .state_40 .box.p60{
background: #ff3506;
}
.task.p70 .name{
color: #ff0000;
}
.kanban .state_20 .box.p70,
.kanban .state_40 .box.p70{
background: #ff0000;
}
.task.p80 .name{
color: #df153b;
}
.kanban .state_20 .box.p80,
.kanban .state_40 .box.p80{
background: #df153b;
}
.task.p90 .name,
.kanban .state_20 .box.p90,
.kanban .state_40 .box.p90{
background: #991c34;
color: #ffff00;
}
.task.p100 .name,
.kanban .state_20 .box.p100,
.kanban .state_40 .box.p100{
background: #733440;
color: #ffff00;
}