Skip to content

Commit f51cfd6

Browse files
committed
Admin One Dashboard template intergration
1 parent 5a28e47 commit f51cfd6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+4241
-290
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88
"@inertiajs/inertia": "^0.11.0",
99
"@inertiajs/inertia-vue3": "^0.6.0",
1010
"@inertiajs/progress": "^0.2.7",
11+
"@mdi/js": "^7.0.96",
1112
"@tailwindcss/forms": "^0.5.2",
13+
"@tailwindcss/line-clamp": "^0.4.0",
1214
"@vitejs/plugin-vue": "^3.0.1",
1315
"autoprefixer": "^10.4.2",
1416
"axios": "^0.27",
17+
"chart.js": "^3.9.1",
1518
"laravel-vite-plugin": "^0.5.0",
1619
"lodash": "^4.17.19",
20+
"numeral": "^2.0.6",
21+
"pinia": "^2.0.17",
1722
"postcss": "^8.4.6",
1823
"tailwindcss": "^3.1.0",
1924
"vite": "^3.0.0",

public/data-sources/clients.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"data":[{"id":19,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Howell-Hand.svg","login":"percy64","name":"Howell Hand","company":"Kiehn-Green","city":"Emelyside","progress":70,"created":"Mar 3, 2021","created_mm_dd_yyyy":"03-03-2021"},{"id":11,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Hope-Howe.svg","login":"dare.concepcion","name":"Hope Howe","company":"Nolan Inc","city":"Paristown","progress":68,"created":"Dec 1, 2021","created_mm_dd_yyyy":"12-01-2021"},{"id":32,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Nelson-Jerde.svg","login":"geovanni.kessler","name":"Nelson Jerde","company":"Nitzsche LLC","city":"Jailynbury","progress":49,"created":"May 18, 2021","created_mm_dd_yyyy":"05-18-2021"},{"id":22,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Kim-Weimann.svg","login":"macejkovic.dashawn","name":"Kim Weimann","company":"Brown-Lueilwitz","city":"New Emie","progress":38,"created":"May 4, 2021","created_mm_dd_yyyy":"05-04-2021"},{"id":34,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Justice-OReilly.svg","login":"hilpert.leora","name":"Justice O'Reilly","company":"Lakin-Muller","city":"New Kacie","progress":38,"created":"Mar 27, 2021","created_mm_dd_yyyy":"03-27-2021"},{"id":48,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Adrienne-Mayer-III.svg","login":"ferry.sophia","name":"Adrienne Mayer III","company":"Kozey, McLaughlin and Kuhn","city":"Howardbury","progress":39,"created":"Mar 29, 2021","created_mm_dd_yyyy":"03-29-2021"},{"id":20,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Mr.-Julien-Ebert.svg","login":"gokuneva","name":"Mr. Julien Ebert","company":"Cormier LLC","city":"South Serenaburgh","progress":29,"created":"Jun 25, 2021","created_mm_dd_yyyy":"06-25-2021"},{"id":47,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Lenna-Smitham.svg","login":"paolo.walter","name":"Lenna Smitham","company":"King Inc","city":"McCulloughfort","progress":59,"created":"Oct 8, 2021","created_mm_dd_yyyy":"10-08-2021"},{"id":24,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Travis-Davis.svg","login":"lkessler","name":"Travis Davis","company":"Leannon and Sons","city":"West Frankton","progress":52,"created":"Oct 20, 2021","created_mm_dd_yyyy":"10-20-2021"},{"id":49,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Prof.-Esteban-Steuber.svg","login":"shana.lang","name":"Prof. Esteban Steuber","company":"Langosh-Ernser","city":"East Sedrick","progress":34,"created":"May 16, 2021","created_mm_dd_yyyy":"05-16-2021"},{"id":36,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Russell-Goodwin-V.svg","login":"jewel07","name":"Russell Goodwin V","company":"Nolan-Stracke","city":"Williamsonmouth","progress":55,"created":"Apr 22, 2021","created_mm_dd_yyyy":"04-22-2021"},{"id":33,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Ms.-Cassidy-Wiegand-DVM.svg","login":"burnice.okuneva","name":"Ms. Cassidy Wiegand DVM","company":"Kuhlman-Hahn","city":"New Ruthiehaven","progress":76,"created":"Sep 16, 2021","created_mm_dd_yyyy":"09-16-2021"},{"id":44,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Mr.-Watson-Brakus-PhD.svg","login":"oconnell.juanita","name":"Mr. Watson Brakus PhD","company":"Osinski, Bins and Kuhn","city":"Lake Gloria","progress":58,"created":"Jun 22, 2021","created_mm_dd_yyyy":"06-22-2021"},{"id":46,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Mr.-Garrison-Friesen-V.svg","login":"vgutmann","name":"Mr. Garrison Friesen V","company":"VonRueden, Rippin and Pfeffer","city":"Port Cieloport","progress":39,"created":"Oct 19, 2021","created_mm_dd_yyyy":"10-19-2021"},{"id":14,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Ms.-Sister-Morar.svg","login":"veum.lucio","name":"Ms. Sister Morar","company":"Gusikowski, Altenwerth and Abbott","city":"Lake Macville","progress":34,"created":"Jun 11, 2021","created_mm_dd_yyyy":"06-11-2021"},{"id":40,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Ms.-Laisha-Reinger.svg","login":"edietrich","name":"Ms. Laisha Reinger","company":"Boehm PLC","city":"West Alexiemouth","progress":73,"created":"Nov 2, 2021","created_mm_dd_yyyy":"11-02-2021"},{"id":5,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Cameron-Lind.svg","login":"mose44","name":"Cameron Lind","company":"Tremblay, Padberg and Pouros","city":"Naderview","progress":59,"created":"Sep 14, 2021","created_mm_dd_yyyy":"09-14-2021"},{"id":43,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Sarai-Little.svg","login":"rau.abelardo","name":"Sarai Little","company":"Deckow LLC","city":"Jeanieborough","progress":49,"created":"Jun 13, 2021","created_mm_dd_yyyy":"06-13-2021"},{"id":2,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Shyann-Kautzer.svg","login":"imurazik","name":"Shyann Kautzer","company":"Osinski, Boehm and Kihn","city":"New Alvera","progress":41,"created":"Feb 15, 2021","created_mm_dd_yyyy":"02-15-2021"},{"id":15,"avatar":"https:\/\/avatars.dicebear.com\/v2\/gridy\/Lorna-Christiansen.svg","login":"annalise97","name":"Lorna Christiansen","company":"Altenwerth-Friesen","city":"Port Elbertland","progress":36,"created":"Mar 9, 2021","created_mm_dd_yyyy":"03-09-2021"}]}

public/data-sources/history.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"data":[{"amount":375.53,"account":"45721474","name":"Home Loan Account","date":"3 days ago","type":"deposit","business":"Turcotte"},{"amount":470.26,"account":"94486537","name":"Savings Account","date":"3 days ago","type":"payment","business":"Murazik - Graham"},{"amount":971.34,"account":"63189893","name":"Checking Account","date":"5 days ago","type":"invoice","business":"Fahey - Keebler"},{"amount":374.63,"account":"74828780","name":"Auto Loan Account","date":"7 days ago","type":"withdrawal","business":"Collier - Hintz"}]}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
.checkbox, .radio, .switch {
2+
@apply inline-flex items-center cursor-pointer relative;
3+
}
4+
5+
.checkbox input[type=checkbox], .radio input[type=radio], .switch input[type=checkbox] {
6+
@apply absolute left-0 opacity-0 -z-1;
7+
}
8+
9+
.checkbox input[type=checkbox]+.check, .radio input[type=radio]+.check, .switch input[type=checkbox]+.check {
10+
@apply border-gray-700 border transition-colors duration-200 dark:bg-slate-800;
11+
}
12+
13+
.checkbox input[type=checkbox]:focus+.check, .radio input[type=radio]:focus+.check, .switch input[type=checkbox]:focus+.check {
14+
@apply ring ring-blue-700;
15+
}
16+
17+
.checkbox input[type=checkbox]+.check, .radio input[type=radio]+.check {
18+
@apply block w-5 h-5;
19+
}
20+
21+
.checkbox input[type=checkbox]+.check {
22+
@apply rounded;
23+
}
24+
25+
.switch input[type=checkbox]+.check {
26+
@apply flex items-center shrink-0 w-12 h-6 p-0.5 bg-gray-200;
27+
}
28+
29+
.radio input[type=radio]+.check, .switch input[type=checkbox]+.check, .switch input[type=checkbox]+.check:before {
30+
@apply rounded-full;
31+
}
32+
33+
.checkbox input[type=checkbox]:checked+.check, .radio input[type=radio]:checked+.check {
34+
@apply bg-no-repeat bg-center bg-blue-600 border-blue-600 border-4;
35+
}
36+
37+
.checkbox input[type=checkbox]:checked+.check {
38+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath style='fill:%23fff' d='M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z'%3E%3C/path%3E%3C/svg%3E");
39+
}
40+
41+
.radio input[type=radio]:checked+.check {
42+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z' /%3E%3C/svg%3E");
43+
}
44+
45+
.switch input[type=checkbox]:checked+.check {
46+
@apply bg-blue-600 border-blue-600;
47+
}
48+
49+
.switch input[type=checkbox]+.check:before {
50+
content: '';
51+
@apply block w-5 h-5 bg-white border border-gray-700;
52+
}
53+
54+
.switch input[type=checkbox]:checked+.check:before {
55+
transform: translate3d(110%, 0 ,0);
56+
@apply border-blue-600;
57+
}
58+
59+
.checkbox .control-label, .radio .control-label, .switch .control-label {
60+
@apply pl-2;
61+
}

resources/css/_progress.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
progress {
2+
@apply h-3 rounded-full overflow-hidden;
3+
}
4+
5+
progress::-webkit-progress-bar {
6+
@apply bg-blue-200;
7+
}
8+
9+
progress::-webkit-progress-value {
10+
@apply bg-blue-500;
11+
}
12+
13+
progress::-moz-progress-bar {
14+
@apply bg-blue-500;
15+
}
16+
17+
progress::-ms-fill {
18+
@apply bg-blue-500 border-0;
19+
}

resources/css/_scrollbars.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
html {
2+
scrollbar-width: thin;
3+
scrollbar-color: #9ca3af #e5e7eb;
4+
}
5+
6+
html::-webkit-scrollbar {
7+
width: 8px;
8+
height: 8px;
9+
}
10+
11+
html::-webkit-scrollbar-track {
12+
@apply bg-gray-200;
13+
}
14+
15+
html::-webkit-scrollbar-thumb {
16+
@apply bg-gray-400 rounded;
17+
}
18+
19+
html::-webkit-scrollbar-thumb:hover {
20+
@apply bg-gray-500;
21+
}
22+
23+
html.dark-scrollbars {
24+
scrollbar-color: #374151 #111827;
25+
}
26+
27+
html.dark-scrollbars::-webkit-scrollbar-track {
28+
@apply bg-gray-900;
29+
}
30+
31+
html.dark-scrollbars::-webkit-scrollbar-thumb {
32+
@apply bg-gray-700;
33+
}
34+
35+
html.dark-scrollbars::-webkit-scrollbar-thumb:hover {
36+
@apply bg-gray-600;
37+
}

resources/css/_table.css

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
table {
2+
@apply w-full;
3+
}
4+
5+
thead {
6+
@apply hidden lg:table-header-group;
7+
}
8+
9+
tr {
10+
@apply max-w-full block relative border-b-4 border-gray-100
11+
lg:table-row lg:border-b-0 dark:border-slate-800;
12+
}
13+
14+
tr:last-child {
15+
@apply border-b-0;
16+
}
17+
18+
td:not(:first-child) {
19+
@apply lg:border-l lg:border-t-0 lg:border-r-0 lg:border-b-0 lg:border-gray-100 lg:dark:border-slate-700;
20+
}
21+
22+
th {
23+
@apply lg:text-left lg:p-3;
24+
}
25+
26+
td {
27+
@apply flex justify-between text-right py-3 px-4 align-top border-b border-gray-100
28+
lg:table-cell lg:text-left lg:p-3 lg:align-middle lg:border-b-0 dark:border-slate-800;
29+
}
30+
31+
td:last-child {
32+
@apply border-b-0;
33+
}
34+
35+
tbody tr, tbody tr:nth-child(odd) {
36+
@apply lg:hover:bg-gray-100 lg:dark:hover:bg-slate-700/70;
37+
}
38+
39+
tbody tr:nth-child(odd) {
40+
@apply lg:bg-gray-50 lg:dark:bg-slate-800;
41+
}
42+
43+
td:before {
44+
content: attr(data-label);
45+
@apply font-semibold pr-3 text-left lg:hidden;
46+
}

resources/css/app.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

resources/css/main.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@import "tailwind/_base.css";
2+
@import "tailwind/_components.css";
3+
@import "tailwind/_utilities.css";
4+
5+
@import "_checkbox-radio-switch.css";
6+
@import "_progress.css";
7+
@import "_scrollbars.css";
8+
@import "_table.css";

resources/css/tailwind/_base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@tailwind base;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@tailwind components;

resources/css/tailwind/_utilities.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@tailwind utilities;

resources/js/Components/AsideMenu.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script setup>
2+
import { useLayoutStore } from '@/Stores/layout.js'
3+
import menu from '@/menu.js'
4+
import AsideMenuLayer from '@/Components/AsideMenuLayer.vue'
5+
import OverlayLayer from '@/Components/OverlayLayer.vue'
6+
7+
const layoutStore = useLayoutStore()
8+
</script>
9+
10+
<template>
11+
<AsideMenuLayer
12+
:menu="menu"
13+
:class="[layoutStore.isAsideMobileExpanded ? 'left-0' : '-left-60 lg:left-0', {'lg:hidden xl:flex': !layoutStore.isAsideLgActive}]"
14+
/>
15+
<OverlayLayer
16+
v-show="layoutStore.isAsideLgActive"
17+
z-index="z-30"
18+
@overlay-click="layoutStore.isAsideLgActive = false"
19+
/>
20+
</template>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<script setup>
2+
import { ref, computed } from 'vue'
3+
import { Link } from '@inertiajs/inertia-vue3'
4+
import { useStyleStore } from '@/Stores/style.js'
5+
import { mdiMinus, mdiPlus } from '@mdi/js'
6+
import { getButtonColor } from '@/colors.js'
7+
import BaseIcon from '@/Components/BaseIcon.vue'
8+
import AsideMenuList from '@/Components/AsideMenuList.vue'
9+
10+
const props = defineProps({
11+
item: {
12+
type: Object,
13+
required: true
14+
},
15+
isDropdownList: Boolean,
16+
})
17+
18+
const itemHref = computed(() => props.item.route ? route(props.item.route) : props.item.href)
19+
20+
const emit = defineEmits(['menu-click'])
21+
22+
const styleStore = useStyleStore()
23+
24+
const hasColor = computed(() => props.item && props.item.color)
25+
26+
const asideMenuItemActiveStyle = computed(() => hasColor.value ? '' : styleStore.asideMenuItemActiveStyle)
27+
28+
const isDropdownActive = ref(false)
29+
30+
const componentClass = computed(() => (
31+
[
32+
props.isDropdownList ? 'py-3 px-6 text-sm' : 'py-3',
33+
hasColor.value
34+
? getButtonColor(props.item.color, false, true)
35+
: styleStore.asideMenuItemStyle
36+
]
37+
))
38+
39+
const hasDropdown = computed(() => !!props.item.menu)
40+
41+
const menuClick = event => {
42+
emit('menu-click', event, props.item)
43+
44+
if (hasDropdown.value) {
45+
isDropdownActive.value = !isDropdownActive.value
46+
}
47+
}
48+
49+
const activeInactiveStyle = computed(
50+
() => props.item.route && route().current(props.item.route)
51+
? styleStore.asideMenuItemActiveStyle
52+
: ''
53+
)
54+
</script>
55+
56+
<template>
57+
<li>
58+
<component
59+
:is="item.route ? Link : 'a'"
60+
:href="itemHref"
61+
:target="item.target ?? null"
62+
class="flex cursor-pointer dark:text-slate-300 dark:hover:text-white"
63+
:class="componentClass"
64+
@click="menuClick"
65+
>
66+
<BaseIcon
67+
v-if="item.icon"
68+
:path="item.icon"
69+
class="flex-none"
70+
:class="activeInactiveStyle"
71+
w="w-16"
72+
:size="18"
73+
/>
74+
<span
75+
class="grow text-ellipsis line-clamp-1"
76+
:class="activeInactiveStyle"
77+
>{{ item.label }}</span>
78+
<BaseIcon
79+
v-if="hasDropdown"
80+
:path="isDropdownActive ? mdiMinus : mdiPlus"
81+
class="flex-none"
82+
:class="activeInactiveStyle"
83+
w="w-12"
84+
/>
85+
</component>
86+
<AsideMenuList
87+
v-if="hasDropdown"
88+
:menu="item.menu"
89+
:class="[ styleStore.asideMenuDropdownStyle, isDropdownActive ? 'block dark:bg-slate-800/50' : 'hidden' ]"
90+
is-dropdown-list
91+
/>
92+
</li>
93+
</template>

0 commit comments

Comments
 (0)