Negative Werte werden deutlich dargestellt.
This commit is contained in:
@@ -6,6 +6,7 @@ Definition der Farben
|
|||||||
@hueSub: 215;
|
@hueSub: 215;
|
||||||
|
|
||||||
@mainColor: hsl(@hueMain, 90%, 29%);
|
@mainColor: hsl(@hueMain, 90%, 29%);
|
||||||
|
@redColor: hsl(0, 90%, 29%);
|
||||||
@mainColorDark: darken(@mainColor,66%,relativ);
|
@mainColorDark: darken(@mainColor,66%,relativ);
|
||||||
@mainColorLight: lighten(@mainColor,66%,relativ);
|
@mainColorLight: lighten(@mainColor,66%,relativ);
|
||||||
@subColor: hsl(@hueSub, 90%, 29%);
|
@subColor: hsl(@hueSub, 90%, 29%);
|
||||||
|
|||||||
@@ -79,6 +79,13 @@ main {
|
|||||||
border-bottom: @mainColor solid thin;
|
border-bottom: @mainColor solid thin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
tbody {
|
||||||
|
td.absence-time {
|
||||||
|
color: @redColor;
|
||||||
|
text-decoration-line: underline;
|
||||||
|
text-decoration-style: dashed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
form {
|
form {
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
<script>
|
<script>
|
||||||
export let params;
|
export let params;
|
||||||
console.log(params)
|
console.log(params)
|
||||||
|
if (!String.prototype.startsWith) {
|
||||||
|
String.prototype.startsWith = function(searchString, position) {
|
||||||
|
position = position || 0;
|
||||||
|
return this.indexOf(searchString, position) === position;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$: isNegative = time => time.startsWith('-') ? 'absence-time' : '';
|
||||||
|
$: cutMinusChar = time => time.startsWith('-') ? time.substr(1) : time;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -36,7 +44,7 @@
|
|||||||
<td>{record.period}</td>
|
<td>{record.period}</td>
|
||||||
<td>{record.workingDays}</td>
|
<td>{record.workingDays}</td>
|
||||||
<td>{record.totalHours}</td>
|
<td>{record.totalHours}</td>
|
||||||
<td>{record.overtime}</td>
|
<td class="{ isNegative(record.overtime) }">{cutMinusChar(record.overtime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user