first commit
This commit is contained in:
139
views/lineup.pug
Normal file
139
views/lineup.pug
Normal file
@@ -0,0 +1,139 @@
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
title #{event.formattedTitle}
|
||||
link(rel='stylesheet' href='/css/bootstrap.min.css')
|
||||
link(rel='stylesheet' href='/font/bootstrap-icons.min.css')
|
||||
link(rel='stylesheet' href='/css/teamsnap-ui.css')
|
||||
|
||||
body.bg-light
|
||||
.container
|
||||
div(style="max-width: 455px")
|
||||
.Panel
|
||||
.panel-header
|
||||
.Panel-title #{event.formattedTitle}
|
||||
.Panel-body
|
||||
.Panel-row
|
||||
p.text-muted.mb-2 #{event.startDate}
|
||||
p #{event.locationName}
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard-check.me-1
|
||||
span Starting Lineup
|
||||
.Panel-row.Grid.Grid--fit.fw-bold.text-center.u-padXs
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
if event_lineup_entries.map((lue)=>lue.label).includes(pos)
|
||||
.Grid-cell.text-success
|
||||
|#{pos}
|
||||
else
|
||||
.Grid-cell.text-danger
|
||||
|#{pos}
|
||||
each lineup_entry, i in event_lineup_entries_offense
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
|#{i+1}
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if lineup_entry.availabilityStatusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{lineup_entry.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option(selected=lineup_entry.label==pos) #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard-minus.me-1
|
||||
span Starting Lineup (Position Only)
|
||||
each lineup_entry, i in event_lineup_entries
|
||||
if lineup_entry.label.includes("[PO]")
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
|#{i+1}
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if lineup_entry.availabilityStatusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{lineup_entry.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option(selected=lineup_entry.label==pos) #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard.me-1
|
||||
span Bench
|
||||
each availability, i in availabilities.filter((a)=>a.eventId==event_id && !context.event_lineup_entries.map((lue)=>lue.memberId).includes(a.memberId) && !a.member.isNonPlayer && a.statusCode!=0 && a.statusCode!==null)
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if availability.statusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if availability.statusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if availability.statusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{availability.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard-x.me-1
|
||||
span Out
|
||||
each availability, i in availabilities.filter((a)=>a.eventId==event_id && !context.event_lineup_entries.map((lue)=>lue.memberId).includes(a.memberId) && !a.member.isNonPlayer && (a.statusCode==0 || a.statusCode===null))
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if availability.statusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if availability.statusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if availability.statusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{availability.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
|
||||
Reference in New Issue
Block a user