mobile scroll, hapus akses kasir ke data sales
This commit is contained in:
parent
e1103f1819
commit
cba0c5a43e
@ -28,15 +28,28 @@ const baseItems = [
|
|||||||
const role = localStorage.getItem("role");
|
const role = localStorage.getItem("role");
|
||||||
|
|
||||||
const items = computed(() => {
|
const items = computed(() => {
|
||||||
if (role === "owner") {
|
let filteredItems = [...baseItems];
|
||||||
return baseItems;
|
|
||||||
}
|
|
||||||
if (role === "kasir") {
|
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 baseItems;
|
return item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return filteredItems;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const toggleDropdown = (index = null) => {
|
const toggleDropdown = (index = null) => {
|
||||||
if (index !== null) {
|
if (index !== null) {
|
||||||
openDropdownIndex.value = openDropdownIndex.value === index ? null : index;
|
openDropdownIndex.value = openDropdownIndex.value === index ? null : index;
|
||||||
|
|||||||
@ -27,8 +27,11 @@
|
|||||||
|
|
||||||
<!-- Table Section -->
|
<!-- Table Section -->
|
||||||
<div class="mt-6 overflow-x-auto">
|
<div class="mt-6 overflow-x-auto">
|
||||||
<div class="bg-white rounded-md border border-C overflow-hidden">
|
<div
|
||||||
<table class="w-full">
|
class="bg-white rounded-lg shadow-md overflow-x-auto"
|
||||||
|
>
|
||||||
|
<table class="min-w-[600px] w-full">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-C text-D">
|
<tr class="bg-C text-D">
|
||||||
<th class="border-x border-C px-3 py-3 text-left">
|
<th class="border-x border-C px-3 py-3 text-left">
|
||||||
|
|||||||
@ -70,9 +70,10 @@
|
|||||||
<!-- 🔹 End Alert -->
|
<!-- 🔹 End Alert -->
|
||||||
<!-- Table Section -->
|
<!-- Table Section -->
|
||||||
<div
|
<div
|
||||||
class="bg-white rounded-lg shadow-md overflow-hidden"
|
class="bg-white rounded-lg shadow-md overflow-x-auto"
|
||||||
>
|
>
|
||||||
<table class="w-full">
|
<table class="min-w-[600px] w-full">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-C text-white border-D border">
|
<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>
|
<th class="px-6 py-4 text-center text-D border-r border-D">No</th>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user