refactor(ui): modernize proposal wizard, dashboard cards and daily control calendar
Frontend-only application of prod_v2 (7bc6845, a29eafc). Dev docker-compose.yml change (b11cb36) and backups churn excluded.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { useMemo, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Users, FolderKanban, Ruler, Plus } from "lucide-react";
|
||||
import { Button } from "../../components/ui/button";
|
||||
import {
|
||||
useMaterials,
|
||||
useProjects,
|
||||
@@ -47,7 +46,7 @@ export function DashboardPage() {
|
||||
[quotes, suppliers, materials, projects, categoryUnits, unitConversions, standardConversions, topics],
|
||||
);
|
||||
|
||||
// فیلتر + مرتبسازی بر اساس زمان ساخت (created_at) — فیلترها بازنشانی نمیشوند
|
||||
// فیلتر + مرتبسازی بر اساس زمان ساخت (created_at)
|
||||
const filtered = useMemo(() => {
|
||||
const list = filterQuotes(store, filters);
|
||||
const createdTs = (q: (typeof store.quotes)[number]) => {
|
||||
@@ -80,35 +79,43 @@ export function DashboardPage() {
|
||||
brand
|
||||
menu={<AppSwitcherMenu activeModule="procurement" />}
|
||||
actions={
|
||||
<>
|
||||
<Button asChild variant="slate">
|
||||
<Link to="/suppliers" className="no-underline">
|
||||
<Users className="h-4 w-4" />
|
||||
تأمینکنندهها
|
||||
</Link>
|
||||
</Button>
|
||||
<div className="flex items-center gap-2">
|
||||
{/* دکمه تأمینکنندهها */}
|
||||
<Link
|
||||
to="/suppliers"
|
||||
className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-800 text-gray-700 dark:text-zinc-200 text-xs font-semibold hover:bg-gray-50 dark:hover:bg-zinc-700 shadow-2xs transition-all no-underline"
|
||||
>
|
||||
<Users className="h-4 w-4 text-gray-500 dark:text-zinc-400" />
|
||||
<span>تأمینکنندهها</span>
|
||||
</Link>
|
||||
|
||||
<Button asChild variant="slate">
|
||||
<Link to="/projects" className="no-underline">
|
||||
<FolderKanban className="h-4 w-4" />
|
||||
پروژهها
|
||||
</Link>
|
||||
</Button>
|
||||
{/* دکمه پروژهها */}
|
||||
<Link
|
||||
to="/projects"
|
||||
className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-800 text-gray-700 dark:text-zinc-200 text-xs font-semibold hover:bg-gray-50 dark:hover:bg-zinc-700 shadow-2xs transition-all no-underline"
|
||||
>
|
||||
<FolderKanban className="h-4 w-4 text-gray-500 dark:text-zinc-400" />
|
||||
<span>پروژهها</span>
|
||||
</Link>
|
||||
|
||||
<Button asChild variant="line">
|
||||
<Link to="/units" className="no-underline">
|
||||
<Ruler className="h-4 w-4" />
|
||||
ضرایب تبدیل
|
||||
</Link>
|
||||
</Button>
|
||||
{/* دکمه ضرایب تبدیل */}
|
||||
<Link
|
||||
to="/units"
|
||||
className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-xl border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-800 text-gray-700 dark:text-zinc-200 text-xs font-semibold hover:bg-gray-50 dark:hover:bg-zinc-700 shadow-2xs transition-all no-underline"
|
||||
>
|
||||
<Ruler className="h-4 w-4 text-gray-500 dark:text-zinc-400" />
|
||||
<span>ضرایب تبدیل</span>
|
||||
</Link>
|
||||
|
||||
<Button asChild variant="primary">
|
||||
<Link to="/wizard" className="no-underline">
|
||||
<Plus className="h-4 w-4" />
|
||||
افزودن پیشنهاد جدید
|
||||
</Link>
|
||||
</Button>
|
||||
</>
|
||||
{/* دکمه اصلی: افزودن پیشنهاد جدید */}
|
||||
<Link
|
||||
to="/wizard"
|
||||
className="inline-flex items-center gap-1.5 px-4 py-2 rounded-xl bg-blue-600 hover:bg-blue-700 active:bg-blue-800 text-white text-xs font-semibold shadow-sm hover:shadow transition-all no-underline"
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
<span>افزودن پیشنهاد جدید</span>
|
||||
</Link>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
<PageLayout className="flex flex-col gap-4">
|
||||
|
||||
Reference in New Issue
Block a user