Skip to content

Commit

Permalink
fix error datatable
Browse files Browse the repository at this point in the history
  • Loading branch information
karenyov committed Apr 11, 2023
1 parent 9f24d0e commit 78dbf32
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/components/tables/DebtsAllTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,18 @@ export default function DebtsAllTable({ userId }: Props) {
},
{
name: "Data Vencimento",
selector: (row: DebtDTO) => new Date(row.dueDate).toLocaleDateString(),
selector: (row: DebtDTO) => (
<Tag
size="md"
variant="solid"
borderRadius="full"
colorScheme={
row.status == "Aguardando Pagamento" ? "orange" : "green"
}
>
{new Date(row.dueDate).toLocaleDateString()}
</Tag>
),
},
{
name: "Data Pagamento",
Expand Down
13 changes: 12 additions & 1 deletion src/pages/debt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,18 @@ export default function Debt() {
{
name: "Dt. Vencimento",
width: "150px",
selector: (row: DebtDTO) => new Date(row.dueDate).toLocaleDateString(),
selector: (row: DebtDTO) => (
<Tag
size="md"
variant="solid"
borderRadius="full"
colorScheme={
row.status == "Aguardando Pagamento" ? "orange" : "green"
}
>
{new Date(row.dueDate).toLocaleDateString()}
</Tag>
),
},
{
name: "Dt. Pagamento",
Expand Down

0 comments on commit 78dbf32

Please sign in to comment.