完善公共事業費用與會計報表權限設定
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 53s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

- 新增 utility_fees 與 accounting 相關權限至 PermissionSeeder
- 更新 RoleController 加入權限群組中文標題映射
- 為會計報表匯出功能加上權限保護
- 前端加入 Can 組件保護按鈕顯示
- 更新權限管理 Skill 文件,補充 UI 顯示設定步驟
This commit is contained in:
2026-01-21 10:55:11 +08:00
parent 9a50bbf887
commit b3299618ce
5 changed files with 52 additions and 9 deletions

View File

@@ -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>