Skip to content

Commit

Permalink
feat: add admin dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrinsieboy committed Jan 17, 2024
1 parent 3e69360 commit 4b5304a
Showing 1 changed file with 117 additions and 44 deletions.
161 changes: 117 additions & 44 deletions src/resources/vue/pages/admin/index.vue
Original file line number Diff line number Diff line change
@@ -1,52 +1,125 @@
<template>
<div>
<h1>bob</h1>
<div class="charts">
<apexchart
width="500"
type="bar"
:options="options"
:series="series"
></apexchart>
<apexchart
width="500"
type="bar"
:options="options"
:series="series"
></apexchart>
<div class="content">
<AdminLayout />
<div class="dashboard">
<span class="dashboard-title">Dashboard</span>
<div class="info-cards">
<div class="card">
<div class="card-body text-center">
<span class="card-title">Items</span>
<p class="card-text">4323</p>
</div>
</div>
<div class="card">
<div class="card-body text-center">
<span class="card-title">Klanten</span>
<p class="card-text">120</p>
</div>
</div>
<div class="card">
<div class="card-body text-center">
<span class="card-title">Reserveringen</span>
<p class="card-text">26</p>
</div>
</div>
<div class="card">
<div class="card-body text-center">
<span class="card-title">Openstaande Facturen</span>
<p class="card-text">18</p>
</div>
</div>
</div>
<div class="charts">
<apexchart class="chart" width="95%" type="bar" :options="options" :series="series"></apexchart>
<apexchart class="chart" width="95%" type="bar" :options="options" :series="series"></apexchart>
</div>
</div>
</div>
</template>

<script>
export default {
name: "Admin",
data: function () {
return {
options: {
chart: {
id: "vuechart-example",
},
xaxis: {
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998],
},
},
series: [
{
name: "series-1",
data: [30, 40, 45, 50, 49, 60, 70, 91],
import AdminLayout from "@/resources/vue/layouts/admin-layout.vue";
export default {
name: "AdminDashboard",
components: {
AdminLayout,
},
data: function () {
return {
options: {
chart: {
id: "vuechart-example",
background: "#f2f2f2",
},
xaxis: {
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998],
},
},
],
};
},
};
series: [
{
name: "series-1",
data: [30, 40, 45, 50, 49, 60, 70, 91],
},
],
};
},
};
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: row;
height: 100%;
.dashboard {
display: flex;
flex-direction: column;
align-items: start;
width: 100%;
padding: 1.3rem;
background-color: #f2f2f2;
.dashboard-title {
font-size: 2rem;
font-weight: bold;
margin-bottom: 1.3rem;
color: #191a21;
}
.info-cards {
display: flex;
flex-direction: row;
width: 100%;
justify-content: space-between;
gap: 1.9rem;
margin-bottom: 1.3rem;
.card {
flex: 1 1;
background-color: #f2f2f2;
color: #191a21;
.card-title {
font-size: 1.3rem;
font-weight: bold;
}
}
}
.charts {
display: flex;
flex-direction: row;
width: 100%;
gap: 1.9rem;
<style>
.charts {
display: flex;
flex-direction: row;
justify-content: space-around;
flex-wrap: wrap;
}
</style>
.chart {
padding: 10px;
border: 1px solid;
flex: 1 1;
border-radius: 0.375rem;
border-color: rgba(0, 0, 0, 0.175);
}
}
}
}
</style>

0 comments on commit 4b5304a

Please sign in to comment.