Merge branch 'Antrean-Code' of https://git.rssa.top/arie.bagus.2905/Web-Antrean into Antrean-Code

This commit is contained in:
bagus-arie05
2025-10-14 09:13:20 +07:00
17 changed files with 3584 additions and 4548 deletions

View File

@@ -1,3 +1,4 @@
<!-- components/sideBar.vue -->
<template>
<v-navigation-drawer
v-model="drawer"
@@ -112,27 +113,15 @@
<v-divider class="my-4 mx-2"></v-divider>
</v-list>
<v-spacer></v-spacer>
<template v-slot:append>
<div class="pa-3">
<ProfileMenu
:user="user.value" :rail="rail"
@logout="handleLogout"
class="full-width-on-expand"
/>
</div>
</template>
</v-navigation-drawer>
</template>
<script setup>
import { ref, computed } from "vue";
import { useRoute } from "vue-router";
// Import store Pinia
import { useNavItemsStore } from "@/stores/navItems"; // Sesuaikan path ini jika perlu
import ProfileMenu from "./ProfileMenu.vue";
import { useNavItemsStore } from "@/stores/navItems";
import ProfilePopup from "./ProfilePopup.vue";
import { useAuth } from "~/composables/useAuth";
// State
const drawer = ref(true);
@@ -143,7 +132,7 @@ const hoverTimeout = ref(null);
const user = ref({
name: 'Adam Sulfat',
email: 'adam@rssa.com',
picture: 'https://i.pravatar.cc/150?img=33', // Ganti dengan URL gambar dinamis
picture: 'https://i.pravatar.cc/150?img=33',
id: 'a1b2c3d4e5f6g7h8'
});
const navItemsStore = useNavItemsStore();
@@ -151,10 +140,10 @@ const navItemsStore = useNavItemsStore();
const currentRoute = useRoute();
const currentActiveMenu = computed(() => {
// Menggunakan Getter untuk mendapatkan array menu yang pasti valid
const items = navItemsStore.getNavItems;
// Pengecekan keamanan (walaupun Getter seharusnya sudah menjamin array)
if (!Array.isArray(items) || items.length === 0) {
return "";
}