2 Commits
3 changed files with 39 additions and 21 deletions
+1 -1
View File
@@ -27,7 +27,7 @@
<h1>{TITLE}</h1>
</header>
<article>
<Formular bind:activeRecord={activeRecord} bind:currentPage/>
<Formular bind:activeRecord={activeRecord}/>
</article>
</section>
{/if}
@@ -94,7 +94,6 @@
let nextDate = null
let activeRecordList = []
export let activeRecord = null
export let currentPage = 1
let period_of_edit
let makeTimekeepingList
@@ -1,7 +1,12 @@
<script>
import Papa from '../../../papaparse.min'
import { paginate, PaginationNav } from 'svelte-paginate'
export let activeRecordList = []
let imported_data = []
export let currentPage = 1
let pageSize = 15
$: paginatedItems = paginate({ items: imported_data, pageSize, currentPage })
let files = null
@@ -34,7 +39,7 @@
let hours = cash_work_days[day]
let hours_digits = Math.trunc(hours)
let minutes_digits = Math.round((hours - hours_digits) * 60)
let working_time = String(hours_digits).padStart(2, '0') + ":"
let working_time = String(hours_digits).padStart(2, '0') + ':'
+ String(minutes_digits).padStart(2, '0') + ':00'
activeRecordList.push({ workingTime: working_time, workingDay: day })
}
@@ -71,6 +76,20 @@
</tr>
{/each}
</tbody>
<tfoot>
<tr>
<td colspan="4">
<PaginationNav
totalItems="{imported_data.length}"
pageSize="{pageSize}"
currentPage="{currentPage}"
limit="{1}"
showStepOptions="{true}"
on:setPage="{(e) => currentPage = e.detail.page}"
/>
</td>
</tr>
</tfoot>
</table>
{/if}
</div>