mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +00:00
refactor(FE-208): rename PurchaseRequestForm to PurchaseRequisitionsForm and update related components
This commit is contained in:
@@ -149,9 +149,12 @@ const PurchaseTable = () => {
|
||||
cell: (props) => props.row.original.supplier.name,
|
||||
},
|
||||
{
|
||||
accessorKey: 'created_user',
|
||||
accessorKey: 'created_by',
|
||||
header: 'Nama Pengaju',
|
||||
cell: (props) => props.row.original.created_user.name,
|
||||
cell: (props) => {
|
||||
const purchase = props.row.original;
|
||||
return purchase.created_user?.name || `User ID: ${purchase.created_by}`;
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'po_date',
|
||||
@@ -172,8 +175,9 @@ const PurchaseTable = () => {
|
||||
{
|
||||
header: 'Aging',
|
||||
cell: (props) => {
|
||||
if (!props.row.original.po_date) return '-';
|
||||
const poDate = new Date(props.row.original.po_date);
|
||||
const purchase = props.row.original;
|
||||
if (!purchase.po_date) return '-';
|
||||
const poDate = new Date(purchase.po_date);
|
||||
const today = new Date();
|
||||
const diffTime = Math.abs(today.getTime() - poDate.getTime());
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
||||
Reference in New Issue
Block a user