completing new colors
This commit is contained in:
@@ -226,6 +226,7 @@ cratiocolors = {
|
||||
'over target': "purple",
|
||||
'way over target': "violet",
|
||||
'missed': "black",
|
||||
'not assigned': "",
|
||||
'not done': "white",
|
||||
}
|
||||
|
||||
@@ -312,9 +313,11 @@ def is_session_complete_ws(ws,ps):
|
||||
|
||||
return ratio,'partial',completiondate
|
||||
else:
|
||||
thevalue = 0
|
||||
for key,value in cratios.iteritems():
|
||||
if ratio>value:
|
||||
if ratio>value and value>thevalue:
|
||||
verdict = key
|
||||
thevalue = value
|
||||
|
||||
completiondate = ws.reverse()[0].date
|
||||
return ratio,verdict,completiondate
|
||||
|
||||
@@ -505,8 +505,8 @@ def add_workout_from_data(user,importid,data,strokedata,
|
||||
except KeyError:
|
||||
power = 2.8*velo**3
|
||||
|
||||
if power.std() == 0 and power.mean() == 0:
|
||||
power = 2.8*velo**3
|
||||
#if power.std() == 0 and power.mean() == 0:
|
||||
# power = 2.8*velo**3
|
||||
|
||||
# save csv
|
||||
# Create data frame with all necessary data to write to csv
|
||||
|
||||
@@ -48,11 +48,13 @@
|
||||
<td>
|
||||
{% if ps.sessiontype != 'race' %}
|
||||
<a class="{{ sessioncolor|lookup:ps.id }} dot"
|
||||
title="{{ completeness|lookup:ps.id }}"
|
||||
href="/rowers/sessions/manage/session/{{ ps.id }}/user/{{ rower.user.id }}/?when={{ timeperiod }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a
|
||||
class="{{ sessioncolor|lookup:ps.id }} dot"
|
||||
title="{{ completeness|lookup:ps.id }}"
|
||||
href="/rowers/virtualevent/{{ ps.id }}/submit"> </a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
@@ -58,20 +58,12 @@
|
||||
</td>
|
||||
{% for r in rowers %}
|
||||
<td>
|
||||
{% if thedict|lookup:'results'|lookup:r.id == 'completed' %}
|
||||
<a class="green dot"
|
||||
{% if thedict|lookup:'results'|lookup:r.id != 'not assigned' %}
|
||||
<a class="{{ thedict|lookup:'color'|lookup:r.id }} dot"
|
||||
title="{{ thedict|lookup:'results'|lookup:r.id }}"
|
||||
href="{% url 'plannedsession_view' id=thedict|lookup:"id" userid=r.user.id %}"> </a>
|
||||
{% elif thedict|lookup:'results'|lookup:r.id == 'partial' %}
|
||||
<a class="orange dot"
|
||||
href="{% url 'plannedsession_view' id=thedict|lookup:"id" userid=r.user.id %}"> </a>
|
||||
{% elif thedict|lookup:'results'|lookup:r.id == 'not done' %}
|
||||
<a class="white dot"
|
||||
href="/rowers/sessions/manage/session/{{ thedict|lookup:"id" }}/user/{{ r.user.id }}/?when={{ timeperiod }}"> </a>
|
||||
{% elif thedict|lookup:'results'|lookup:r.id == 'not assigned' %}
|
||||
|
||||
{% else %}
|
||||
<a class="red dot"
|
||||
href="/rowers/sessions/manage/session/{{ thedict|lookup:"id" }}/user/{{ r.user.id }}/?when={{ timeperiod }}"> </a>
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
@@ -14760,14 +14760,17 @@ def plannedsessions_coach_view(request,
|
||||
|
||||
for ps in sps:
|
||||
rowerstatus = {}
|
||||
rowercolor = {}
|
||||
for r in rowers:
|
||||
ratio, status,completiondate = is_session_complete(r,ps)
|
||||
rowerstatus[r.id] = status
|
||||
rowercolor[r.id] = cratiocolors[status]
|
||||
sessiondict = {
|
||||
'id': ps.id,
|
||||
'results':rowerstatus,
|
||||
'name': ps.name,
|
||||
'startdate': ps.startdate,
|
||||
'color': rowercolor,
|
||||
'preferreddate': ps.preferreddate,
|
||||
'enddate': ps.enddate,
|
||||
}
|
||||
|
||||
@@ -389,6 +389,62 @@ th.rotate > div > span {
|
||||
color: #a9c08c;
|
||||
}
|
||||
|
||||
.lightgreen {
|
||||
background: #e2f0da;
|
||||
color: #fdffc;
|
||||
border: solid 1px #b2bfaa;
|
||||
}
|
||||
|
||||
.lightgreen:active {
|
||||
color: #f5faf2;
|
||||
}
|
||||
|
||||
.lightgreen:hover {
|
||||
background: #b2bfaa;
|
||||
}
|
||||
|
||||
.mediumgreen {
|
||||
background: #aad090;
|
||||
color: #fafff7;
|
||||
border: solid 1px #8db374;
|
||||
}
|
||||
|
||||
.mediumgreen:active {
|
||||
color: #d8e6cf;
|
||||
}
|
||||
|
||||
.mediumgreen:hover {
|
||||
background: #8db374;
|
||||
}
|
||||
|
||||
.purple {
|
||||
background: #8c1ec1;
|
||||
color: #e9ddf0;
|
||||
border: solid 1px #6b0f99;
|
||||
}
|
||||
|
||||
.purple:active {
|
||||
color: #cfa160;
|
||||
}
|
||||
|
||||
.purple:hover {
|
||||
background: #6b0f99;
|
||||
}
|
||||
|
||||
.violet {
|
||||
background: #c20d60;
|
||||
color: #f0dae5;
|
||||
border: solid 1px #99034e;
|
||||
}
|
||||
|
||||
.violet:active {
|
||||
color: #e595bd;
|
||||
}
|
||||
|
||||
.violet:hover {
|
||||
background: #99034e;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #fae7e9;
|
||||
border: solid 1px #27aae2;
|
||||
@@ -799,21 +855,6 @@ th.rotate > div > span {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.lightgreen {
|
||||
background: #e2f0da;
|
||||
}
|
||||
|
||||
.mediumgreen {
|
||||
background: #aad090;
|
||||
}
|
||||
|
||||
.purple {
|
||||
background: #8c1ec1;
|
||||
}
|
||||
|
||||
.violet {
|
||||
background: #c20d60;
|
||||
}
|
||||
|
||||
|
||||
/* blue */
|
||||
|
||||
Reference in New Issue
Block a user