Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2022-04-07 12:14:47 +02:00
parent 19dcd01143
commit 084e384aaa
3 changed files with 104 additions and 7 deletions

View File

@@ -2420,11 +2420,11 @@ class PlannedSessionStep(models.Model):
targetvalue = models.IntegerField(default=0)
targettype = models.TextField(default='',max_length=200, blank=True, null=True,
choices=targettypes)
customtargetvaluelow = models.IntegerField(default=0)
customtargetvaluehigh = models.IntegerField(default=0)
targetvaluelow = models.IntegerField(default=0)
targetvaluehigh = models.IntegerField(default=0)
intensity = models.TextField(default='',max_length=200, blank=True, null=True,
choices=intensitytypes)
notes = models.TextField(default='',max_length=200, blank=True, null=True)
description = models.TextField(default='',max_length=200, blank=True, null=True)
color = models.TextField(default='#ddd',max_length=200)
def save(self, *args, **kwargs):
@@ -2437,6 +2437,19 @@ class PlannedSessionStep(models.Model):
super(PlannedSessionStep, self).save(*args, **kwargs)
def asdict(self):
d = {
'wkt_step_name': self.name,
'durationType': self.durationtype,
'durationValue': self.durationvalue,
'targetValue': self.targetvalue,
'description': self.description,
'stepId': self.pk,
'intensity': self.intensity,
}
return d
class StepEditorForm(ModelForm):
class Meta:
model = PlannedSessionStep