|
|
|
|
@ -26,6 +26,7 @@
@@ -26,6 +26,7 @@
|
|
|
|
|
let ranges = {}; |
|
|
|
|
let timeMap = $derived.by(calcYearMap); |
|
|
|
|
let selectionSum = $derived(sortedTimes.filter(time => selected[time.id]).map(time => time.duration).reduce((acc, a) => acc + a, 0)); |
|
|
|
|
let users = null; |
|
|
|
|
|
|
|
|
|
async function addTime(task_id){ |
|
|
|
|
const url = api(`time/track_task/${task_id}`); |
|
|
|
|
@ -107,6 +108,7 @@
@@ -107,6 +108,7 @@
|
|
|
|
|
tasks = json.tasks; |
|
|
|
|
projects = json.projects; |
|
|
|
|
docLinks = json.documents; |
|
|
|
|
users = json.users; |
|
|
|
|
} else { |
|
|
|
|
error(resp); |
|
|
|
|
} |
|
|
|
|
@ -207,6 +209,7 @@
@@ -207,6 +209,7 @@
|
|
|
|
|
<th>{t('month')}</th> |
|
|
|
|
<th>{t('start')}<wbr>…<wbr>{t('end')}</th> |
|
|
|
|
<th>{t('duration')}</th> |
|
|
|
|
<th>{t('user')}</th> |
|
|
|
|
<th>{t('subject')}</th> |
|
|
|
|
<th>{t('projects')} / {t('tasks')}</th> |
|
|
|
|
<th>{t('state')}</th> |
|
|
|
|
@ -232,7 +235,7 @@
@@ -232,7 +235,7 @@
|
|
|
|
|
{:else} |
|
|
|
|
<td class="start_end" onclick={e => toggleSelect(time.id)}> |
|
|
|
|
{time.start}{#if time.end_time}<wbr>…<wbr>{time.start.startsWith(time.end_date)?time.end.substring(11):time.end}{/if} |
|
|
|
|
{#if line>0 && Math.abs(sortedTimes[line-1].start_time - time.end_time)<100} |
|
|
|
|
{#if line>0 && (sortedTimes[line-1].user_id == time.user_id) && (Math.abs(sortedTimes[line-1].start_time - time.end_time)<100)} |
|
|
|
|
<button class="symbol join" title={t('join_objects',{objects:t('times')})} onclick={e => joinTimes(e, time.id, sortedTimes[line-1].id)} ></button> |
|
|
|
|
{/if} |
|
|
|
|
</td> |
|
|
|
|
@ -241,6 +244,9 @@
@@ -241,6 +244,9 @@
|
|
|
|
|
{time.duration.toFixed(3)} h |
|
|
|
|
{/if} |
|
|
|
|
</td> |
|
|
|
|
<td class="user"> |
|
|
|
|
{users[time.user_id].name} |
|
|
|
|
</td> |
|
|
|
|
<td class="subject" onclick={e => {detail = time.id}}> |
|
|
|
|
{time.subject} |
|
|
|
|
</td> |
|
|
|
|
|