優化公共事業費操作紀錄與新增操作紀錄規範 Skill
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 54s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-21 11:46:16 +08:00
parent b3299618ce
commit 7eed761861
8 changed files with 262 additions and 14 deletions

View File

@@ -101,6 +101,10 @@ const fieldLabels: Record<string, string> = {
invoice_date: '發票日期',
invoice_amount: '發票金額',
last_price: '供貨價格',
// Utility Fee fields
transaction_date: '費用日期',
category: '費用類別',
amount: '金額',
};
// Purchase Order Status Map
@@ -325,7 +329,18 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P
<TableBody>
{filteredKeys.some(key => !isSnapshotField(key)) ? (
filteredKeys
.filter(key => !isSnapshotField(key))
.filter(key => {
if (isSnapshotField(key)) return false;
// 如果是更新事件,僅顯示有變動的欄位
if (activity.event === 'updated') {
const oldValue = old[key];
const newValue = attributes[key];
return JSON.stringify(oldValue) !== JSON.stringify(newValue);
}
return true;
})
.map((key) => {
const oldValue = old[key];
const newValue = attributes[key];

View File

@@ -63,7 +63,7 @@ export default function LogTable({
// Try to find a name in snapshot, attributes or old values
// Priority: snapshot > specific name fields > generic name > code > ID
const nameParams = ['po_number', 'name', 'code', 'product_name', 'warehouse_name', 'category_name', 'base_unit_name', 'title'];
const nameParams = ['po_number', 'name', 'code', 'product_name', 'warehouse_name', 'category_name', 'base_unit_name', 'title', 'category'];
let subjectName = '';
// Special handling for Inventory: show "Warehouse - Product"