Merge main_v2 mobile tabbar/inventory UI refinements into production
Brings in main_v2 17c7ae6 (tab bar sizing, inventory actions, date picker
proportions, stats lead time).
Conflicts resolved in favour of main_v2, which deliberately removed the
'تغییر موجودی' top button (nav lives in the tab bar / InventoryTopNav now)
and rewrote the proforma date field. Dropped the now-unused Button import.
This commit is contained in:
@@ -4,7 +4,6 @@ import { Plus, Warehouse as WarehouseIcon, SlidersHorizontal, ArrowUpDown, X } f
|
||||
import { Header, PageLayout } from "../../components/layout/Header";
|
||||
import { EmptyState } from "../../components/EmptyState";
|
||||
import { Badge } from "../../components/ui/badge";
|
||||
import { Button } from "../../components/ui/button";
|
||||
import { useAuthStore } from "../../store/auth";
|
||||
import { AppSwitcherMenu } from "../../components/AppSwitcherMenu";
|
||||
import { inventorySubheader } from "./panelMenu";
|
||||
@@ -149,26 +148,16 @@ export function InventoryPage() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen pb-20 md:pb-6">
|
||||
<div className="min-h-screen pb-24 md:pb-6">
|
||||
<Header
|
||||
title="سامانه مدیریت انبار"
|
||||
sub={inventorySubheader(user)}
|
||||
icon={<WarehouseIcon className="h-4.5 w-4.5" strokeWidth={2} />}
|
||||
menu={<AppSwitcherMenu activeModule="warehouse" canSwitchToProcurement={isAdmin} />}
|
||||
actions={
|
||||
<div className="flex items-center gap-2">
|
||||
{/* تبهای تکراری در موبایل مخفی و فقط در دسکتاپ نمایش داده میشوند */}
|
||||
<div className="hidden md:flex items-center gap-2">
|
||||
<InventoryTopNav pathname={location.pathname} variant={isAdmin ? "admin" : "pm"} />
|
||||
</div>
|
||||
{isPM && (
|
||||
<Button asChild variant="primary" className="h-8 px-2.5 text-xs">
|
||||
<Link to="/inventory/change" className="no-underline">
|
||||
<Plus className="h-3.5 w-3.5" />
|
||||
<span>تغییر موجودی</span>
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
/* تبهای ناوبری فقط در دسکتاپ — دکمه بالایی به طور کامل حذف شد */
|
||||
<div className="hidden md:flex items-center gap-2">
|
||||
<InventoryTopNav pathname={location.pathname} variant={isAdmin ? "admin" : "pm"} />
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
@@ -227,7 +216,7 @@ export function InventoryPage() {
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{/* گزینههای فیلتر پیشرفته: در موبایل با دکمه باز میشود و در دسکتاپ همیشه باز است */}
|
||||
{/* گزینههای فیلتر پیشرفته */}
|
||||
<div
|
||||
className={cn(
|
||||
"mt-3 grid grid-cols-1 gap-2.5 border-t border-line/60 pt-3 sm:grid-cols-2 md:flex md:flex-wrap md:items-end",
|
||||
@@ -366,6 +355,18 @@ export function InventoryPage() {
|
||||
۱۰ نوع تراکنش استاندارد • سبز زمردی = ورود به انبار · رز = خروج/کاهش · آبی = انتقال و شمارش • کلیک روی هر سطر: خط زمانی با «مانده» لحظهبهلحظه و تفکیک برندها
|
||||
</div>
|
||||
</PageLayout>
|
||||
|
||||
{/* دکمه شناور تغییر موجودی (FAB دایرهای آبی با علامت جمع) */}
|
||||
{isPM && (
|
||||
<Link
|
||||
to="/inventory/change"
|
||||
className="fixed bottom-20 left-5 z-40 flex h-14 w-14 items-center justify-center rounded-full bg-blue-600 text-white shadow-xl shadow-blue-600/40 transition-all duration-200 hover:bg-blue-700 hover:scale-105 active:scale-90 md:bottom-8 md:left-8"
|
||||
title="تغییر موجودی"
|
||||
aria-label="تغییر موجودی"
|
||||
>
|
||||
<Plus className="h-7 w-7" strokeWidth={2.5} />
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user