feat: display payload reception timestamp on client details page for debugging
This commit is contained in:
@@ -80,7 +80,8 @@ const formatRow = (row) => ({
|
|||||||
ID_Produto: row.produto_id,
|
ID_Produto: row.produto_id,
|
||||||
Descricao_Produto: row.produto_descricao,
|
Descricao_Produto: row.produto_descricao,
|
||||||
Quantidade: row.quantidade,
|
Quantidade: row.quantidade,
|
||||||
Valor_Unitario: parseFloat(row.valor_unitario)
|
Valor_Unitario: parseFloat(row.valor_unitario),
|
||||||
|
Recebido_Em: row.created_at
|
||||||
});
|
});
|
||||||
|
|
||||||
// GET data (for the frontend)
|
// GET data (for the frontend)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { useParams, Link, useOutletContext } from 'react-router-dom';
|
import { useParams, Link, useOutletContext } from 'react-router-dom';
|
||||||
import { ArrowLeft, User, Tag, Package, DollarSign } from 'lucide-react';
|
import { ArrowLeft, User, Tag, Package, DollarSign, Clock } from 'lucide-react';
|
||||||
import type { OrderData } from '../types';
|
import type { OrderData } from '../types';
|
||||||
|
|
||||||
const ClientDetails = () => {
|
const ClientDetails = () => {
|
||||||
@@ -113,6 +113,14 @@ const ClientDetails = () => {
|
|||||||
<Tag className="w-3 h-3 text-zinc-400 dark:text-dark-muted" />
|
<Tag className="w-3 h-3 text-zinc-400 dark:text-dark-muted" />
|
||||||
<span className="text-[10px] font-bold text-zinc-400 dark:text-dark-muted">ID: {order.ID_Produto}</span>
|
<span className="text-[10px] font-bold text-zinc-400 dark:text-dark-muted">ID: {order.ID_Produto}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{order.Recebido_Em && (
|
||||||
|
<div className="flex items-center gap-1 ml-2">
|
||||||
|
<Clock className="w-3 h-3 text-zinc-400 dark:text-dark-muted" />
|
||||||
|
<span className="text-[10px] font-bold text-zinc-400 dark:text-dark-muted">
|
||||||
|
Recebido: {new Date(order.Recebido_Em).toLocaleString('pt-BR')}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<h3 className="text-sm font-bold text-zinc-900 dark:text-dark-text truncate mb-1">{order.Descricao_Produto}</h3>
|
<h3 className="text-sm font-bold text-zinc-900 dark:text-dark-text truncate mb-1">{order.Descricao_Produto}</h3>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export interface OrderData {
|
|||||||
Descricao_Produto: string;
|
Descricao_Produto: string;
|
||||||
Quantidade: number;
|
Quantidade: number;
|
||||||
Valor_Unitario: number;
|
Valor_Unitario: number;
|
||||||
|
Recebido_Em?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DateRange {
|
export interface DateRange {
|
||||||
|
|||||||
Reference in New Issue
Block a user