Die HTML-Dateien für die Anzeige und Bearbeitung der Daten sind vorhanden.
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
};
|
||||
let r = {
|
||||
"workingDay": "2020-01-15",
|
||||
"workingTime": "99:00:00"
|
||||
"workingTime": "09:00:00"
|
||||
};
|
||||
let records = {
|
||||
"title" : "Einträge",
|
||||
@@ -83,7 +83,7 @@
|
||||
};
|
||||
|
||||
const router = Navaid('/')
|
||||
.on('/', () => run(import('../routes/Home.svelte')))
|
||||
.on('/', () => run(import('../routes/Home.svelte'), weekly))
|
||||
.on('/views/weekly', () => run(import('../routes/Views.svelte'), weekly))
|
||||
.on('/views/monthly', () => run(import('../routes/Views.svelte'), monthly))
|
||||
.on('/views/yearly', () => run(import('../routes/Views.svelte'), yearly))
|
||||
|
||||
@@ -2,14 +2,5 @@
|
||||
|
||||
<script>
|
||||
import Views from "./Views.svelte";
|
||||
let r = {
|
||||
"Zeitraum": "2020#01",
|
||||
"Arbeitstage": 20,
|
||||
"Arbeitsstunden": "99:00:00",
|
||||
"Unterstunden": "10:22:00"
|
||||
};
|
||||
let params = {
|
||||
"title" : "Wochenansicht",
|
||||
"records" : [r, r]
|
||||
};
|
||||
export let params;
|
||||
</script>
|
||||
@@ -1,6 +1,12 @@
|
||||
<script>
|
||||
export let params;
|
||||
let title = "Bearbeitung Einträge"
|
||||
import IconifyIcon from '@iconify/svelte';
|
||||
import wrenchIcon from '@iconify-icons/oi/wrench';
|
||||
import trashIcon from '@iconify-icons/oi/trash';
|
||||
import checkIcon from '@iconify-icons/oi/check';
|
||||
import xIcon from '@iconify-icons/oi/x';
|
||||
let activeRecord = null;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -9,23 +15,46 @@
|
||||
|
||||
<h1>{title}</h1>
|
||||
|
||||
{#if activeRecord === null}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zeitraum</th>
|
||||
<th>Arbeitstage</th>
|
||||
<th>Datum</th>
|
||||
<th>Arbeitsstunden</th>
|
||||
<th>Über- / Unterstunden</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each params.records as record}
|
||||
<tr>
|
||||
<td>{record.Zeitraum}</td>
|
||||
<td>{record.Arbeitstage}</td>
|
||||
<td>{record.Arbeitsstunden}</td>
|
||||
<td>{record.Unterstunden}</td>
|
||||
<td>{record.workingDay}</td>
|
||||
<td>{record.workingTime}</td>
|
||||
<td>
|
||||
<button>Bearbeiten <IconifyIcon icon={wrenchIcon} /></button>
|
||||
<button>Löschen <IconifyIcon icon={trashIcon} color="red" /></button>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
{:else}
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<form action="/working-hours" name="editRecord">
|
||||
<fieldset name="record-data">
|
||||
<div>
|
||||
<label for="workingDay">Arbeitstag</label>
|
||||
<!--suppress JSUnresolvedVariable -->
|
||||
<input bind:value={activeRecord.workingDay} placeholder="Arbeitstag" type="date" id="workingDay">
|
||||
</div>
|
||||
<div>
|
||||
<label for="workingTime">Arbeitszeit</label>
|
||||
<!--suppress JSUnresolvedVariable -->
|
||||
<input bind:value={activeRecord.workingTime} placeholder="Arbeitszeit" type="time" id="workingTime">
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset name="buttons">
|
||||
<button>Übernehmen <IconifyIcon icon={checkIcon} color="green" /></button>
|
||||
<button>Abbrechen <IconifyIcon icon={xIcon} /></button>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user