some more fine tuning
This commit is contained in:
@@ -2401,7 +2401,8 @@ class PlannedSessionStep(models.Model):
|
||||
|
||||
durationtypes = (
|
||||
("Distance", "Distance"),
|
||||
("Time", "Time")
|
||||
("Time", "Time"),
|
||||
('RepeatUntilStepsCmplt','Repeat previous blocks n times')
|
||||
)
|
||||
|
||||
targettypes = (
|
||||
@@ -2414,16 +2415,20 @@ class PlannedSessionStep(models.Model):
|
||||
manager = models.ForeignKey(User, null=True, on_delete=models.CASCADE)
|
||||
name = models.TextField(default='',max_length=200, blank=True, null=True)
|
||||
type = models.TextField(default='',max_length=200, blank=True, null=True)
|
||||
durationvalue = models.FloatField(default=0)
|
||||
durationtype = models.TextField(default='',max_length=200, blank=True, null=True,
|
||||
choices=durationtypes)
|
||||
targetvalue = models.IntegerField(default=0)
|
||||
durationvalue = models.FloatField(default=0, verbose_name="Duration Value")
|
||||
durationtype = models.TextField(default='Time',max_length=200,
|
||||
choices=durationtypes,
|
||||
verbose_name='Duration Type')
|
||||
targetvalue = models.IntegerField(default=0, verbose_name="Target Value")
|
||||
targettype = models.TextField(default='',max_length=200, blank=True, null=True,
|
||||
choices=targettypes)
|
||||
targetvaluelow = models.IntegerField(default=0)
|
||||
targetvaluehigh = models.IntegerField(default=0)
|
||||
choices=targettypes, verbose_name="Target Type")
|
||||
targetvaluelow = models.IntegerField(default=0,
|
||||
verbose_name="Target Value Low")
|
||||
targetvaluehigh = models.IntegerField(default=0,
|
||||
verbose_name="Target Value High")
|
||||
intensity = models.TextField(default='',max_length=200, blank=True, null=True,
|
||||
choices=intensitytypes)
|
||||
choices=intensitytypes,
|
||||
verbose_name = "Intensity")
|
||||
description = models.TextField(default='',max_length=200, blank=True, null=True)
|
||||
color = models.TextField(default='#ddd',max_length=200)
|
||||
|
||||
@@ -2434,6 +2439,8 @@ class PlannedSessionStep(models.Model):
|
||||
self.color = '#90ee90'
|
||||
elif self.intensity == "Rest":
|
||||
self.color = 'add8e6'
|
||||
if self.durationtype == 'RepeatUntilStepsCmplt':
|
||||
self.color = 'ffffa7'
|
||||
|
||||
self.durationvalue = int(self.durationvalue)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user