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 ea8fbc8 commit 43a76f1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
13 changes: 11 additions & 2 deletions src/components/tables/DebtsAllTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ export default function DebtsAllTable({ userId }: Props) {
const columns = [
{
name: "Descrição",
selector: (row: DebtDTO) => row.debtDescription,
selector: (row: DebtDTO) => (
<Tag
size="lg"
variant="solid"
borderRadius="full"
colorScheme="secondary"
>
{row.debtDescription}
</Tag>
),
},
{
name: "Valor",
Expand All @@ -68,7 +77,7 @@ export default function DebtsAllTable({ userId }: Props) {
name: "Status",
selector: (row: DebtDTO) => (
<Tag
size="sm"
size="md"
variant="solid"
borderRadius="full"
colorScheme={row.status == "AWAITING_PAYMENT" ? "orange" : "green"}
Expand Down
16 changes: 13 additions & 3 deletions src/pages/debt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,16 @@ export default function Debt() {
const columns = [
{
name: "Descrição",
selector: (row: DebtDTO) => row.debtDescription,
selector: (row: DebtDTO) => (
<Tag
size="lg"
variant="solid"
borderRadius="full"
colorScheme="secondary"
>
{row.debtDescription}
</Tag>
),
},
{
name: "Valor",
Expand All @@ -216,6 +225,7 @@ export default function Debt() {
},
{
name: "Dt. Vencimento",
width: "150px",
selector: (row: DebtDTO) => new Date(row.dueDate).toLocaleDateString(),
},
{
Expand Down Expand Up @@ -246,10 +256,10 @@ export default function Debt() {
},
{
name: "Status",
width: "180px",
width: "200px",
selector: (row: DebtDTO) => (
<Tag
size="sm"
size="md"
variant="solid"
borderRadius="full"
colorScheme={
Expand Down

0 comments on commit 43a76f1

Please sign in to comment.