Files
benchcoach/views/events.pug
2023-08-17 06:51:08 -05:00

38 lines
1.8 KiB
Plaintext

html
head
meta(charset='utf-8')
meta(name='viewport' content='width=device-width, initial-scale=1')
title BenchCoach - Teams
link(rel='stylesheet' href='/css/bootstrap.min.css')
link(rel='stylesheet' href='/css/teamsnap-ui.css')
body
.container
.Panel
.Panel-header
.Panel-title Schedule
.Panel-body
each event in events
- var availabilitySummary = availabilitySummaries.find((a)=>a.eventId==event.id)
.Panel-row
a(class="event list-group-item" href=`/${team_id}/event/${event.id}`)
h4 #{event.formattedTitle}
p.small
| #{event.startDate.toLocaleDateString("en-us",{weekday: "short", day: "numeric",month: "short"})}
| #{event.startDate.toLocaleTimeString("en-us",{hour: "numeric", minute: "2-digit"})}
p #{event.locationName}
.progress
div(class="progress-bar bg-success fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerGoingCount/team.playerMemberCount)*100).toString() + "%"}`)
|#{availabilitySummary.playerGoingCount}
div(class="progress-bar bg-info fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerMaybeCount/team.playerMemberCount)*100).toString() + "%"}`)
|#{availabilitySummary.playerMaybeCount}
div(class="progress-bar bg-danger fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerNotGoingCount/team.playerMemberCount)*100).toString() + "%"}`)
|#{availabilitySummary.playerNotGoingCount}
div(class="progress-bar text-secondary fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerUnknownCount/team.playerMemberCount)*100).toString() + "%"};
background-color: var(--bs-gray-200)`)
|#{availabilitySummary.playerUnknownCount}