Die gewünschte HTML-Struktur wurde übernommen.
This commit is contained in:
@@ -13,48 +13,60 @@
|
||||
<title>{title}</title>
|
||||
</svelte:head>
|
||||
|
||||
<h1>{title}</h1>
|
||||
|
||||
{#if activeRecord === null}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Arbeitsstunden</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each params.records as record}
|
||||
<tr>
|
||||
<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>
|
||||
<section id="list-records">
|
||||
<header>
|
||||
<h1>{title}</h1>
|
||||
</header>
|
||||
<article>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Arbeitsstunden</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each params.records as record}
|
||||
<tr>
|
||||
<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>
|
||||
</article>
|
||||
</section>
|
||||
{: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>
|
||||
<section id="edit-record">
|
||||
<header>
|
||||
<h1>{title}</h1>
|
||||
</header>
|
||||
<article>
|
||||
<!--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>
|
||||
</article>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user