Skip to content

Commit

Permalink
Merge pull request #39 from pplg-smk-metland/admin-patch
Browse files Browse the repository at this point in the history
Admin patch
  • Loading branch information
Klrfl authored Oct 5, 2024
2 parents 36739a0 + df78b3a commit e2428d1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pages/admin/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ onMounted(async () => {

<div v-else class="grid grid-cols-2 gap-4">
<section class="main-section">
<h2>Buku yang belum dikonfirmasi</h2>
<h2 class="leading-relaxed mb-4">Buku yang belum dikonfirmasi</h2>

<DataTable :value="bukusBorrowPending" size="small">
<template #empty>
Expand All @@ -180,15 +180,15 @@ onMounted(async () => {
<Column field="pengguna.nama" header="Peminjam" />
<Column field="pengguna.kelas" header="Kelas" />
<Column header="aksi">
<template #body="{ data }">
<template #body="{ data }: { data: PeminjamanData[number] }">
<CTA label="konfirmasi" @click="konfirmasiPeminjaman(data.id)" />
</template>
</Column>
</DataTable>
</section>

<section class="main-section flex-1">
<h2>Buku mau dikembalikan</h2>
<h2 class="leading-relaxed mb-4">Buku mau dikembalikan</h2>

<DataTable :value="bukusReturnPending" size="small">
<template #empty>
Expand All @@ -199,15 +199,15 @@ onMounted(async () => {
<Column field="pengguna.nama" header="peminjam" />
<Column field="pengguna.kelas" header="kelas" />
<Column header="aksi">
<template #body="{ data }">
<CTA label="Konfirmasi" @click="konfirmasiPengembalian(data.id, data.buku)" />
<template #body="{ data }: { data: PeminjamanData[number] }">
<CTA label="Konfirmasi" @click="konfirmasiPengembalian(data, data.buku as Buku)" />
</template>
</Column>
</DataTable>
</section>

<section class="main-section col-span-full">
<h2>Buku yang sedang dipinjam</h2>
<h2 class="leading-relaxed mb-4">Buku yang sedang dipinjam</h2>

<DataTable :value="bukusBorrowConfirmed">
<template #empty>
Expand All @@ -218,7 +218,7 @@ onMounted(async () => {
<Column field="pengguna.nama" header="Peminjam" />
<Column field="pengguna.kelas" header="Kelas" />
<Column header="Dipinjam pada">
<template #body="{ data }">
<template #body="{ data }: { data: PeminjamanData[number] }">
{{ formatDate(new Date(data.tgl_pinjam), { dateStyle: "long", timeStyle: "long" }) }}
</template>
</Column>
Expand Down

0 comments on commit e2428d1

Please sign in to comment.