Merge branch 'development' of https://git.abbauf.com/Magang-2025/Kasir into development
This commit is contained in:
commit
5a28ed5254
@ -28,15 +28,28 @@ const baseItems = [
|
||||
const role = localStorage.getItem("role");
|
||||
|
||||
const items = computed(() => {
|
||||
if (role === "owner") {
|
||||
return baseItems;
|
||||
}
|
||||
let filteredItems = [...baseItems];
|
||||
|
||||
if (role === "kasir") {
|
||||
return baseItems.filter(item => !["Akun", "Laporan"].includes(item.label));
|
||||
// Hilangkan menu Akun & Laporan
|
||||
filteredItems = filteredItems.filter(item => !["Akun", "Laporan"].includes(item.label));
|
||||
|
||||
// Hilangkan sub-menu Sales di Manajemen Produk
|
||||
filteredItems = filteredItems.map(item => {
|
||||
if (item.label === "Manajemen Produk") {
|
||||
return {
|
||||
...item,
|
||||
subItems: item.subItems?.filter(sub => sub.label !== "Sales") || []
|
||||
};
|
||||
}
|
||||
return item;
|
||||
});
|
||||
}
|
||||
return baseItems;
|
||||
|
||||
return filteredItems;
|
||||
});
|
||||
|
||||
|
||||
const toggleDropdown = (index = null) => {
|
||||
if (index !== null) {
|
||||
openDropdownIndex.value = openDropdownIndex.value === index ? null : index;
|
||||
|
||||
@ -27,8 +27,11 @@
|
||||
|
||||
<!-- Table Section -->
|
||||
<div class="mt-6 overflow-x-auto">
|
||||
<div class="bg-white rounded-md border border-C overflow-hidden">
|
||||
<table class="w-full">
|
||||
<div
|
||||
class="bg-white rounded-lg shadow-md overflow-x-auto"
|
||||
>
|
||||
<table class="min-w-[600px] w-full">
|
||||
|
||||
<thead>
|
||||
<tr class="bg-C text-D">
|
||||
<th class="border-x border-C px-3 py-3 text-left">
|
||||
|
||||
@ -70,9 +70,10 @@
|
||||
<!-- 🔹 End Alert -->
|
||||
<!-- Table Section -->
|
||||
<div
|
||||
class="bg-white rounded-lg shadow-md overflow-hidden"
|
||||
>
|
||||
<table class="w-full">
|
||||
class="bg-white rounded-lg shadow-md overflow-x-auto"
|
||||
>
|
||||
<table class="min-w-[600px] w-full">
|
||||
|
||||
<thead>
|
||||
<tr class="bg-C text-white border-D border">
|
||||
<th class="px-6 py-4 text-center text-D border-r border-D">No</th>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user