Skip to content
Snippets Groups Projects
Commit 61d8bf76 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

fix(dashboard-card): don't show date for draft status

parent c0018973
No related branches found
No related tags found
1 merge request!10Sprint #12
...@@ -44,6 +44,7 @@ const DashboardCard = ({ ...@@ -44,6 +44,7 @@ const DashboardCard = ({
const customId = project.customId || project.id.split('-')[0] const customId = project.customId || project.id.split('-')[0]
const hasFiles = files ? Object.values(files).some(f => f.length > 0) : false const hasFiles = files ? Object.values(files).some(f => f.length > 0) : false
const journalIssueType = parseJournalIssue(journal, metadata) const journalIssueType = parseJournalIssue(journal, metadata)
const submittedDate = get(version, 'submitted')
const manuscriptMeta = `${type} - ${ const manuscriptMeta = `${type} - ${
journalIssueType ? journalIssueType.label : 'N/A' journalIssueType ? journalIssueType.label : 'N/A'
}` }`
...@@ -101,16 +102,15 @@ const DashboardCard = ({ ...@@ -101,16 +102,15 @@ const DashboardCard = ({
<Bottom> <Bottom>
<LeftDetails flex={3}> <LeftDetails flex={3}>
<Status>{mapStatusToLabel(project)}</Status> <Status>{mapStatusToLabel(project)}</Status>
<DateParser {submittedDate && (
durationThreshold={0} <DateParser durationThreshold={0} timestamp={submittedDate}>
timestamp={get(version, 'submitted')} {(timestamp, daysAgo) => (
> <DateField>
{(timestamp, daysAgo) => ( {timestamp} ({daysAgo} ago)
<DateField> </DateField>
{timestamp} ({daysAgo} ago) )}
</DateField> </DateParser>
)} )}
</DateParser>
</LeftDetails> </LeftDetails>
<RightDetails flex={4}> <RightDetails flex={4}>
<ManuscriptType title={manuscriptMeta}> <ManuscriptType title={manuscriptMeta}>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment