backoffice cleen up

This commit is contained in:
marshal
2026-06-16 11:04:36 +03:00
parent 1f0a642c03
commit a0dbb4ca6f
6 changed files with 71 additions and 527 deletions

View File

@@ -180,23 +180,37 @@ const FreightSidebar = ({
href={item.href}
className="fsb-item"
data-active={isActive}
onClick={(e) => navigateTo(e, item.href!)}
onClick={(e) => {
if (hasChildren) {
setExpanded((current) => ({
...current,
[item.href!]: true,
}));
}
navigateTo(e, item.href!);
}}
>
{item.icon && <span className="fsb-icon">{item.icon}</span>}
<span className="fsb-item-label">{item.label}</span>
{hasChildren && (
<ChevronDown
size={16}
className="fsb-chevron"
style={{
transform: isOpen ? "rotate(0deg)" : "rotate(-90deg)",
}}
<button
type="button"
className="fsb-chevron-btn"
aria-label={isOpen ? "Collapse section" : "Expand section"}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
toggleExpanded(item.href!);
}}
/>
>
<ChevronDown
size={16}
className="fsb-chevron"
style={{
transform: isOpen ? "rotate(0deg)" : "rotate(-90deg)",
}}
/>
</button>
)}
</a>