feat: 統一全系統頁面標題樣式、優化側邊欄與實作角色成員查看功能
This commit is contained in:
11
resources/js/Pages/Vendor/Index.tsx
vendored
11
resources/js/Pages/Vendor/Index.tsx
vendored
@@ -8,6 +8,7 @@ import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
|
||||
import { Head, router } from "@inertiajs/react";
|
||||
import { debounce } from "lodash";
|
||||
import { getBreadcrumbs } from "@/utils/breadcrumb";
|
||||
import { Can } from "@/Components/Permission/Can";
|
||||
|
||||
export interface Vendor {
|
||||
id: number;
|
||||
@@ -160,10 +161,12 @@ export default function VendorManagement({ vendors, filters }: PageProps) {
|
||||
</div>
|
||||
|
||||
{/* Add Button */}
|
||||
<Button onClick={handleAddVendor} className="flex-1 md:flex-none button-filled-primary">
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
新增廠商
|
||||
</Button>
|
||||
<Can permission="vendors.create">
|
||||
<Button onClick={handleAddVendor} className="flex-1 md:flex-none button-filled-primary">
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
新增廠商
|
||||
</Button>
|
||||
</Can>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user