Private
Public Access
1
0

demo of drag/drop and JS to capture the new order

This commit is contained in:
Sander Roosendaal
2022-04-05 12:07:42 +02:00
parent 61884d9a00
commit 5ba43564f8
6 changed files with 153 additions and 2 deletions

View File

@@ -2959,6 +2959,40 @@ def rower_create_trainingplan(request, id=0):
'old_targets': old_targets,
})
@user_passes_test(can_plan, login_url="/rowers/paidplans",
message="This functionality requires a Coach or Self-Coach plan",
redirect_field_name=None)
def stepeditor(request, id=0):
step1 = PlannedSessionStep(
manager = request.user,
name = "Warming Up",
intensity = "Warmup",
durationtype = "Time",
durationvalue = 60000,
)
step2 = PlannedSessionStep(
manager = request.user,
name = "Steady",
intensity = "Active",
durationtype = "Time",
durationvalue = 180000,
)
step3 = PlannedSessionStep(
manager = request.user,
name = "Cooling Down",
intensity = "Cooldown",
durationtype = "Time",
durationvalue = 60000,
)
steps = [step1,step2,step3]
return render(request, 'stepeditor.html',
{
'steps':steps,
})
@user_passes_test(can_plan, login_url="/rowers/paidplans",
message="This functionality requires a Coach or Self-Coach plan",

View File

@@ -151,7 +151,8 @@ from rowers.models import (
PlannedSessionComment, CoachRequest, CoachOffer,
VideoAnalysis, ShareKey,
StandardCollection, CourseStandard,
VirtualRaceFollower, TombStone, InstantPlan
VirtualRaceFollower, TombStone, InstantPlan,
PlannedSessionStep,
)
from rowers.models import (
RowerPowerForm, RowerHRZonesForm, RowerForm, RowerCPForm, GraphImage, AdvancedWorkoutForm,