優化公共事業費操作紀錄與新增操作紀錄規範 Skill
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user