Browse Source

implemented task priorities

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
module/users
Stephan Richter 1 month ago
parent
commit
97c395fb38
  1. 1
      core/src/main/java/de/srsoftware/umbrella/core/model/Task.java
  2. 2
      frontend/src/routes/project/KanbanCard.svelte
  3. 2
      frontend/src/routes/task/View.svelte
  4. 1
      translations/src/main/resources/de.json
  5. 78
      web/src/main/resources/web/css/default.css

1
core/src/main/java/de/srsoftware/umbrella/core/model/Task.java

@ -223,6 +223,7 @@ public class Task implements Mappable { @@ -223,6 +223,7 @@ public class Task implements Mappable {
map.put(ID, id);
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);

2
frontend/src/routes/project/KanbanCard.svelte

@ -2,7 +2,7 @@ @@ -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">

2
frontend/src/routes/task/View.svelte

@ -181,7 +181,7 @@ @@ -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">

1
translations/src/main/resources/de.json

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

78
web/src/main/resources/web/css/default.css

@ -416,3 +416,81 @@ a.wikilink{ @@ -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;
}
Loading…
Cancel
Save