Skip to content

Commit

Permalink
Merge pull request #155 from partio-scout/feature/show-participant-fi…
Browse files Browse the repository at this point in the history
…elds-when-empty

Feature/show participant fields when empty
  • Loading branch information
googol authored Jul 20, 2016
2 parents 76acdf1 + 79ecb01 commit bc6c3c2
Showing 1 changed file with 35 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,6 @@ export function getParticipantDetailsPage(participantStore, participantActions)

const allergyNames = _.map(allergies, row => row.name);

const familyCampDetails = (program, naps) =>
<Panel header="Perheleiri">
<dl>
{ program ? <dt>Ohjelma</dt> : '' }
{ program ? <dd>{ program }</dd> : '' }
{ naps ? <dt>Päiväunet</dt> : '' }
{ naps ? <dd>{ naps }</dd> : '' }
</dl>
</Panel>;

return (
<div>
<Row>
Expand All @@ -130,56 +120,62 @@ export function getParticipantDetailsPage(participantStore, participantActions)
<Panel header="Yhteystiedot">
<dl>
<dt>Puhelin</dt>
<dd>{ phoneNumber }</dd>
<dd>{ phoneNumber || '–' }</dd>
<dt>Sähköposti</dt>
<dd>{ email }</dd>
{ guardianOne || guardianTwo ? <dt>Huoltajat</dt> : '' }
{ guardianOne ? <dd>{ guardianOne }</dd> : '' }
{ guardianTwo ? <dd>{ guardianTwo }</dd> : '' }
{ homeCity ? <dt>Kotikunta</dt> : '' }
{ homeCity ? <dd>{ homeCity }</dd> : '' }
<dd>{ email || '–' }</dd>
<dt>Huoltajat</dt>
<dd>{ guardianOne || '–' }</dd>
<dd>{ guardianTwo || '–' }</dd>
<dt>Kotikunta</dt>
<dd>{ homeCity || '–' }</dd>
</dl>
</Panel>
<Panel header="Laskutustiedot">
<dl>
<dt>Laskutettu</dt>
<dd>{ formattedBilledDate || '–' }</dd>
<dt>Maksettu</dt>
<dd>{ formattedPaidDate || '–' }</dd>
</dl>
</Panel>
{ familyCampProgramInfo || childNaps ? familyCampDetails(familyCampProgramInfo, childNaps) : '' }
<Panel header="Pesti">
{ staffPosition || staffPositionInGenerator ? '' : <p>Ei pestiä</p> }
<dl>
{ staffPosition ? <dt>Pesti</dt> : '' }
{ staffPosition ? <dd>{ staffPosition }</dd> : '' }
{ staffPositionInGenerator ? <dt>Pestitieto kehittimestä</dt> : '' }
{ staffPositionInGenerator ? <dd>{ staffPositionInGenerator }</dd> : '' }
<dt>Pesti</dt>
<dd>{ staffPosition || '–' }</dd>
<dt>Pestitieto kehittimestä</dt>
<dd>{ staffPositionInGenerator || '–' }</dd>
</dl>
</Panel>
<Panel header="Osallistujan tiedot">
<dl>
<dt>Partionimi</dt>
<dd>{ nickname || '' }</dd>
<dd>{ nickname || '' }</dd>
<dt>Ikäkausi</dt>
<dd>{ ageGroup }</dd>
{ swimmingSkill ? <dt>Uimataito</dt> : '' }
{ swimmingSkill ? <dd>{ swimmingSkill }</dd> : '' }
<dd>{ ageGroup || '–' }</dd>
<dt>Uimataito</dt>
<dd>{ swimmingSkill || '–' }</dd>
<dt>Lippukunta</dt>
<dd>{ localGroup }</dd>
<dd>{ localGroup || '–' }</dd>
<dt>Maa</dt>
<dd>{ country }</dd>
<dd>{ country || '–' }</dd>
<dt>Leirilippukunta</dt>
<dd>{ campGroup }</dd>
<dd>{ campGroup || '–' }</dd>
<dt>Kylä</dt>
<dd>{ village }</dd>
<dd>{ village || '–' }</dd>
<dt>Alaleiri</dt>
<dd>{ subCamp }</dd>
<dd>{ subCamp || '–' }</dd>
<dt>Virvatuli</dt>
<dd>{ willOfTheWisp ? willOfTheWisp : '–' }</dd>
<dd>{ willOfTheWisp || '–' }</dd>
<dt>Virvatuliaalto</dt>
<dd>{ willOfTheWispWave ? willOfTheWispWave : '–' }</dd>
<dd>{ willOfTheWispWave || '–' }</dd>
</dl>
</Panel>
<Panel header="Laskutustiedot">
<Panel header="Perheleiri">
<dl>
<dt>Laskutettu</dt>
<dd>{ formattedBilledDate }</dd>
<dt>Maksettu</dt>
<dd>{ formattedPaidDate }</dd>
<dt>Ohjelma</dt>
<dd>{ familyCampProgramInfo || '–' }</dd>
<dt>Päiväunet</dt>
<dd>{ childNaps || '–' }</dd>
</dl>
</Panel>
</Col>
Expand Down

0 comments on commit bc6c3c2

Please sign in to comment.