Skip to content

Commit

Permalink
Merge pull request #7 from Pearson-Advance/fix/PADV-646
Browse files Browse the repository at this point in the history
Fix: PADV-646 - Default values for first access and last access.
  • Loading branch information
anfbermudezme authored Sep 14, 2023
2 parents 885f544 + 36c825a commit 7d51455
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/features/Students/StudentsTable/columns.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,29 @@ const getColumns = props => [
{
Header: 'Created',
accessor: 'created',
Cell: ({ row }) => new Date(row.values.created).toUTCString(),
Cell: ({ row }) => (
row.values.created
? new Date(row.values.created).toUTCString()
: ''
),
},
{
Header: 'First Access',
accessor: 'first_access',
Cell: ({ row }) => new Date(row.values.first_access).toUTCString(),
Cell: ({ row }) => (
row.values.first_access
? new Date(row.values.first_access).toUTCString()
: ''
),
},
{
Header: 'Last Access',
accessor: 'last_access',
Cell: ({ row }) => new Date(row.values.last_access).toUTCString(),
Cell: ({ row }) => (
row.values.last_access
? new Date(row.values.last_access).toUTCString()
: ''
),
},
{
Header: 'Grade',
Expand Down

0 comments on commit 7d51455

Please sign in to comment.