Browse Source

Merge branch 'main' into module/stock

module/document
Stephan Richter 2 weeks ago
parent
commit
8d699bad1c
  1. 12
      core/src/main/java/de/srsoftware/umbrella/core/model/Task.java
  2. 1
      frontend/src/routes/wiki/AddPage.svelte

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

@ -246,11 +246,13 @@ public class Task implements Mappable {
private int totalPrio() { private int totalPrio() {
if (status >= Status.COMPLETE.code()) return 0; // task is done, do no longer highlight if (status >= Status.COMPLETE.code()) return 0; // task is done, do no longer highlight
if (dueDate == null) return priority; int total = priority;
var diff = (int) (dueDate.toEpochDay()-LocalDate.now().toEpochDay()); if (dueDate != null) {
if (diff <= 0) return priority + 100; // due date has passed var diff = (int) (dueDate.toEpochDay()-LocalDate.now().toEpochDay());
if (diff < 100) return priority + 100 - diff; // due within the next 100 days if (diff <= 0) total += 100; // due date has passed
return Math.min(100,priority); if (diff < 100) total += 100 - diff; // due within the next 100 days
}
return Math.min(100,total);
} }

1
frontend/src/routes/wiki/AddPage.svelte

@ -61,5 +61,6 @@
<label> <label>
{t('content')} {t('content')}
<Markdown bind:value={content} simple={true} /> <Markdown bind:value={content} simple={true} />
<button type="submit">{t('save')}</button>
</label> </label>
</form> </form>
Loading…
Cancel
Save