-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upravene zarovania #376
Upravene zarovania #376
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
who_can_participate, | ||
description, | ||
upcoming_or_current_event, | ||
competition_type, | ||
history_events, | ||
}, | ||
}) => { | ||
|
@@ -48,11 +48,20 @@ | |
|
||
return ( | ||
<Stack gap={3}> | ||
{who_can_participate && <Typography variant="body1">Súťaž je určená pre {who_can_participate}</Typography>} | ||
{who_can_participate && ( | ||
<Typography variant="body1"> | ||
Súťaž je určená pre {who_can_participate}.{description && ` ${description}`} | ||
</Typography> | ||
)} | ||
|
||
{description && <Typography variant="body1">{description}</Typography>} | ||
|
||
<Stack alignSelf="center"> | ||
<Stack | ||
direction="row" | ||
sx={{ | ||
mt: 0.5, | ||
justifyContent: 'end', | ||
alignItems: 'end', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. basically staci:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Použil som to prvé |
||
}} | ||
> | ||
<Link variant="button2" href={rulesLink}> | ||
Pravidlá | ||
</Link> | ||
|
@@ -73,23 +82,23 @@ | |
</Typography> | ||
)} | ||
{upcoming_or_current_event.publication_set.length > 0 && ( | ||
<Stack alignSelf="center"> | ||
<Stack direction="row" sx={{justifyContent: 'end', alignItems: 'end'}}> | ||
kovacspe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Link variant="button2" href={`/api/${upcoming_or_current_event.publication_set[0].file}`}> | ||
Pozvánka | ||
</Link> | ||
</Stack> | ||
)} | ||
{upcoming_or_current_event.registration_link && ( | ||
<> | ||
<Typography variant="body1">{upcoming_or_current_event.registration_link.additional_info}</Typography> | ||
<Typography variant="body1"> | ||
<b>Registrácia prebieha do:</b> {formatDateTime(upcoming_or_current_event.registration_link.end)} | ||
</Typography> | ||
<Stack alignSelf="center"> | ||
<Stack direction="row" sx={{justifyContent: 'end', alignItems: 'end'}}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. takisto aj tu:
|
||
<Link variant="button2" href={upcoming_or_current_event.registration_link.url}> | ||
Registračný formulár | ||
</Link> | ||
</Stack> | ||
<Typography variant="body1">{upcoming_or_current_event.registration_link.additional_info}</Typography> | ||
</> | ||
)} | ||
</Stack> | ||
|
@@ -99,36 +108,33 @@ | |
</Typography> | ||
)} | ||
</Stack> | ||
|
||
<Stack> | ||
<Typography variant="h2">Archív</Typography> | ||
{/* TODO: asi zjednotit styly, neriesit with/without publications */} | ||
{competition_type?.name === 'Tábor' ? ( | ||
kovacspe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Stack gap={1}> | ||
{history_events.map((event) => ( | ||
<Typography key={event.id} variant="h3" component="span"> | ||
{name + ' '} {event.school_year} | ||
|
||
<Stack gap={1}> | ||
{history_events.map((event) => ( | ||
<Stack | ||
key={event.id} | ||
direction="row" | ||
sx={{ | ||
justifyContent: 'space-between', | ||
alignItems: 'end', | ||
kovacspe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}} | ||
> | ||
<Typography variant="h3" component="span"> | ||
{name} {event.school_year} | ||
</Typography> | ||
))} | ||
</Stack> | ||
) : ( | ||
<Stack gap={1}> | ||
{history_events.map((event) => ( | ||
<Stack key={event.id} direction="row" gap={20}> | ||
<Typography variant="h3" component="span"> | ||
{name} {event.school_year} | ||
</Typography> | ||
<Stack direction="row" gap={2}> | ||
{event.publication_set.map((publication) => ( | ||
<Link variant="button2" key={publication.id} href={`/api/${publication.file}`}> | ||
{publication.name} | ||
</Link> | ||
))} | ||
</Stack> | ||
<Stack direction="row" gap={2}> | ||
{event.publication_set.map((publication) => ( | ||
<Link variant="button2" key={publication.id} href={`/api/${publication.file}`}> | ||
{publication.name} | ||
</Link> | ||
))} | ||
</Stack> | ||
))} | ||
</Stack> | ||
)} | ||
</Stack> | ||
))} | ||
</Stack> | ||
</Stack> | ||
</Stack> | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description nedava zmysel bez who_can_participate? len sa pytam, ty vies, preco si menil