2023-05-23 12:43:09 -07:00
|
|
|
<script setup lang="ts">
|
2023-07-13 17:24:24 -07:00
|
|
|
import patrons from '@data/patrons'
|
2023-05-23 12:43:09 -07:00
|
|
|
</script>
|
|
|
|
|
2023-07-13 14:00:38 -07:00
|
|
|
<!--------------------------------------------------------------- TEMPLATE ---->
|
2023-05-23 12:43:09 -07:00
|
|
|
|
|
|
|
<template>
|
|
|
|
<section>
|
2023-07-13 14:29:43 -07:00
|
|
|
<Table>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
2023-07-13 14:29:43 -07:00
|
|
|
<TableThead>
|
2023-05-23 12:43:09 -07:00
|
|
|
<tr>
|
2023-07-13 14:29:43 -07:00
|
|
|
<TableTh>Name</TableTh>
|
|
|
|
<TableTh>Status</TableTh>
|
|
|
|
<TableTh>Checked Out</TableTh>
|
|
|
|
<TableTh>Fines</TableTh>
|
2023-07-13 17:03:49 -07:00
|
|
|
<TableTh actions>
|
2023-07-13 17:04:58 -07:00
|
|
|
<PrimaryButton>Add New</PrimaryButton>
|
2023-07-13 17:03:49 -07:00
|
|
|
</TableTh>
|
2023-05-23 12:43:09 -07:00
|
|
|
</tr>
|
2023-07-13 14:29:43 -07:00
|
|
|
</TableThead>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
2023-07-13 14:29:43 -07:00
|
|
|
<TableTbody>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
|
|
|
<tr v-for="(patron, index) in patrons" :key="index">
|
2023-07-13 14:29:43 -07:00
|
|
|
<TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
<div>{{ patron.name }}</div>
|
2023-07-13 16:40:11 -07:00
|
|
|
<SecondaryInfo>{{ patron.email }}</SecondaryInfo>
|
2023-07-13 14:29:43 -07:00
|
|
|
</TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
2023-07-13 14:29:43 -07:00
|
|
|
<TableTd>
|
2023-07-13 14:50:52 -07:00
|
|
|
<Badge :state="patron.status === 'Active' ? 'good' : 'bad'">
|
|
|
|
{{ patron.status }}
|
|
|
|
</Badge>
|
2023-07-13 14:29:43 -07:00
|
|
|
</TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
2023-07-13 14:29:43 -07:00
|
|
|
<TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
<div>{{ patron.checkedOut }} books</div>
|
2023-07-13 16:40:11 -07:00
|
|
|
<SecondaryInfo>{{ patron.overdue }} overdue</SecondaryInfo>
|
2023-07-13 14:29:43 -07:00
|
|
|
</TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
2023-07-13 14:29:43 -07:00
|
|
|
<TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
<div>${{ patron.fines }}</div>
|
2023-07-13 14:29:43 -07:00
|
|
|
</TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
2023-07-13 14:52:43 -07:00
|
|
|
<TableTd actions>
|
2023-05-23 12:43:09 -07:00
|
|
|
<a href="#">Check Out</a>
|
|
|
|
<a href="#">View</a>
|
|
|
|
<a href="#">Edit</a>
|
2023-07-13 14:29:43 -07:00
|
|
|
</TableTd>
|
2023-05-23 12:43:09 -07:00
|
|
|
</tr>
|
|
|
|
|
2023-07-13 14:29:43 -07:00
|
|
|
</TableTbody>
|
2023-05-23 12:43:09 -07:00
|
|
|
|
2023-07-13 14:29:43 -07:00
|
|
|
</Table>
|
2023-05-23 12:43:09 -07:00
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
2023-07-13 14:00:38 -07:00
|
|
|
<!------------------------------------------------------------------ STYLE ---->
|
2023-05-23 12:43:09 -07:00
|
|
|
|
|
|
|
<style scoped lang="postcss">
|
|
|
|
section {
|
|
|
|
@apply w-full px-10;
|
|
|
|
}
|
|
|
|
</style>
|