完善公共事業費用與會計報表權限設定
- 新增 utility_fees 與 accounting 相關權限至 PermissionSeeder - 更新 RoleController 加入權限群組中文標題映射 - 為會計報表匯出功能加上權限保護 - 前端加入 Can 組件保護按鈕顯示 - 更新權限管理 Skill 文件,補充 UI 顯示設定步驟
This commit is contained in:
@@ -27,6 +27,7 @@ import { getDateRange, formatDateWithDayOfWeek } from "@/utils/format";
|
||||
import { Badge } from "@/Components/ui/badge";
|
||||
import Pagination from "@/Components/shared/Pagination";
|
||||
import { SearchableSelect } from "@/Components/ui/searchable-select";
|
||||
import { Can } from "@/Components/Permission/Can";
|
||||
|
||||
interface Record {
|
||||
id: string;
|
||||
@@ -135,13 +136,15 @@ export default function AccountingReport({ records, summary, filters }: PageProp
|
||||
<p className="text-gray-500 mt-1">彙整採購支出與各項公用事業費用</p>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
onClick={handleExport}
|
||||
variant="outline"
|
||||
className="button-outlined-primary gap-2"
|
||||
>
|
||||
<Download className="h-4 w-4" /> 匯出 CSV 報表
|
||||
</Button>
|
||||
<Can permission="accounting.export">
|
||||
<Button
|
||||
onClick={handleExport}
|
||||
variant="outline"
|
||||
className="button-outlined-primary gap-2"
|
||||
>
|
||||
<Download className="h-4 w-4" /> 匯出 CSV 報表
|
||||
</Button>
|
||||
</Can>
|
||||
</div>
|
||||
|
||||
{/* Filters with Quick Date Range */}
|
||||
@@ -224,7 +227,7 @@ export default function AccountingReport({ records, summary, filters }: PageProp
|
||||
onClick={handleFilter}
|
||||
className="button-filled-primary h-9 px-6 gap-2"
|
||||
>
|
||||
<Filter className="h-4 w-4" /> 篩選
|
||||
<Filter className="h-4 w-4" /> 查詢
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user