Skip to content

Commit

Permalink
Merge pull request #79 from konsept-ch/fix-contracts
Browse files Browse the repository at this point in the history
fix contract
  • Loading branch information
firepolo authored Dec 4, 2023
2 parents ec3986f + eff07c9 commit 17452a4
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions src/components/ContractModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,30 @@ export const ContractModal = ({ closeModal, selectedCourse, isVisible, refetchEv
{selectedCourse?.user.name}
</p>
<div className="my-4 contract-sessions">
{selectedCourse?.sessions.map((session) => (
<>
<strong className="py-1">{session.name.split('|')[2].trim()}</strong>
<div className="contract-events">
{session.events.map((event) => (
<>
<span className="py-1 border-top">{event.date}</span>
<span className="py-1 border-top text-center">
{event.locationName}
</span>
<span className="py-1 border-top">
{event.startTime} - {event.endTime}
</span>
<span className="py-1 border-top text-end">{event.fees}</span>
</>
))}
</div>
</>
))}
{selectedCourse?.sessions.map((session) => {
const splitted = session.name.split('|')
return (
<>
<strong className="py-1">
{splitted.length > 2 ? splitted[2].trim() : session.name}
</strong>
<div className="contract-events">
{session.events.map((event) => (
<>
<span className="py-1 border-top">{event.date}</span>
<span className="py-1 border-top text-center">
{event.locationName}
</span>
<span className="py-1 border-top">
{event.startTime} - {event.endTime}
</span>
<span className="py-1 border-top text-end">{event.fees}</span>
</>
))}
</div>
</>
)
})}
</div>
</div>
</Row>
Expand Down

0 comments on commit 17452a4

Please sign in to comment.