orders list native with status filter + seller
This commit is contained in:
+15
-10
@@ -37,7 +37,7 @@ const SideBar: FC = () => {
|
||||
const location = useLocation()
|
||||
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
return window.location.href.includes(name)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@@ -389,7 +389,7 @@ const ProductsSubMenu: FC = () => {
|
||||
|
||||
const OrdersSubMenu: FC = () => {
|
||||
const isActive = (name: string) => {
|
||||
return location.pathname.includes(name)
|
||||
return window.location.href.includes(name)
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -408,28 +408,33 @@ const OrdersSubMenu: FC = () => {
|
||||
<div className='flex flex-col mt-10 gap-4'>
|
||||
<SubMenuItem
|
||||
title={'لیست سفارشات (فروشندگان)'}
|
||||
isActive={isActive('sellers')}
|
||||
link="/orders/sellers"
|
||||
isActive={isActive('/seller')}
|
||||
link={Pages.orders.sellers}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'لیست سفارشات (مدیر)'}
|
||||
isActive={isActive('admin')}
|
||||
link="/orders/admin"
|
||||
isActive={isActive('/native')}
|
||||
link={Pages.orders.admin}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سفارشات کنسل شده'}
|
||||
isActive={isActive('cancelled')}
|
||||
link="/orders/cancelled"
|
||||
isActive={isActive('Cancelled')}
|
||||
link={Pages.orders.cancelled}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'سفارشات تکمیل شده'}
|
||||
isActive={isActive('Completed')}
|
||||
link={Pages.orders.completed}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی کنسلی ها'}
|
||||
isActive={isActive('cancellation-categories')}
|
||||
link="/orders/cancellation-categories"
|
||||
link={Pages.orders.cancellationCategories}
|
||||
/>
|
||||
<SubMenuItem
|
||||
title={'دسته بندی مرجوعی ها'}
|
||||
isActive={isActive('return-categories')}
|
||||
link="/orders/return-categories"
|
||||
link={Pages.orders.returnCategories}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user