Private
Public Access
1
0

better dates

This commit is contained in:
Sander Roosendaal
2020-05-10 17:56:35 +02:00
parent 988da6ded8
commit 24735d4cc0
2 changed files with 26 additions and 4 deletions

View File

@@ -30,7 +30,7 @@
<ul class="main-content">
<li class="grid_2">
<h1>History for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
<h1>History for {{ rower.user.first_name }} {{ rower.user.last_name }} from {{ startdate }} to {{ enddate }}</h1>
</li>
<li class="grid_2">
<a href="/rowers/history/?enddate={{ today|date:"Y-m-d" }}&startdate={{ lastseven|date:"Y-m-d" }}&workouttype={{ workouttype }}">Past 7 days</a>
@@ -143,8 +143,10 @@
<script>
$(function($) {
console.log('loading script for chart');
$.getJSON(window.location.protocol + '//'+window.location.host + '/rowers/history/user/{{ rower.user.id }}/data/?startdate={{ startdate|date:"Y-m-d" }}&{{ enddate|date:"Y-m-d" }}&workouttype={{ workouttype }}', function(json) {
var ed = '{{ senddate|date:"Y-m-d" }}'
console.log('End',ed);
console.log(window.location.protocol + '//'+window.location.host + '/rowers/history/user/{{ rower.user.id }}/data/?startdate={{ sstartdate|date:"Y-m-d" }}&enddate={{ senddate|date:"Y-m-d" }}&workouttype={{ workouttype }}')
$.getJSON(window.location.protocol + '//'+window.location.host + '/rowers/history/user/{{ rower.user.id }}/data/?startdate={{ sstartdate|date:"Y-m-d" }}&enddate={{ senddate|date:"Y-m-d" }}&workouttype={{ workouttype }}', function(json) {
var script = json.script;
var div = json.div;