Resolve comments from Pullrequest
This commit is contained in:
parent
b06fc4bcbf
commit
9911117df5
|
|
@ -18,11 +18,7 @@ onMounted(async () => {
|
|||
|
||||
const allDueDates = courseSessionsStore.allDueDates();
|
||||
const getNextStepLink = (courseSession: CourseSession) => {
|
||||
console.log("courseSession: ", courseSession);
|
||||
|
||||
courseSessionsStore.allCourseSessions.forEach((courseSession) => {
|
||||
console.log("duedates: ", courseSession.duedates);
|
||||
});
|
||||
courseSessionsStore.allCourseSessions.forEach((courseSession) => {});
|
||||
return computed(() => {
|
||||
if (courseSessionsStore.hasCockpit(courseSession)) {
|
||||
return courseSession.cockpit_url;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class EventsConfig(AppConfig):
|
||||
class DueDatesConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "vbv_lernwelt.duedate"
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 3.2.13 on 2023-07-11 09:16
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('duedate', '0007_auto_20230703_1741'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='duedate',
|
||||
name='start',
|
||||
field=models.DateTimeField(blank=True, db_index=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='duedate',
|
||||
name='url',
|
||||
field=models.CharField(blank=True, default='', max_length=1024),
|
||||
),
|
||||
]
|
||||
|
|
@ -10,13 +10,13 @@ from vbv_lernwelt.course.models import CourseSession
|
|||
|
||||
|
||||
class DueDate(models.Model):
|
||||
start = models.DateTimeField(null=True, db_index=True)
|
||||
start = models.DateTimeField(null=True, blank=True, db_index=True)
|
||||
end = models.DateTimeField(db_index=True, null=True)
|
||||
# TODO: Welcher Default Wert ist hier sinnvoll?
|
||||
title = models.CharField(default=_("Termin"), max_length=1024)
|
||||
learning_content_description = models.CharField(default="", max_length=1024)
|
||||
description = models.CharField(default="", max_length=1024)
|
||||
url = models.URLField(default="", blank=True, max_length=1024)
|
||||
url = models.CharField(default="", blank=True, max_length=1024)
|
||||
course_session = models.ForeignKey(
|
||||
"course.CourseSession",
|
||||
on_delete=models.CASCADE,
|
||||
|
|
@ -30,12 +30,12 @@ class DueDate(models.Model):
|
|||
ordering = ["start", "end"]
|
||||
verbose_name = _("Termin")
|
||||
help = (
|
||||
"Set only the end date if you want to create a deadline without a duration."
|
||||
"The end date is mandatory. You can set the start date if you want to have a deadline with a duration."
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
start_str = self.start.strftime("%Y-%m-%d %H:%M") if self.start else ""
|
||||
end_str = self.end.strftime("%Y-%m-%d %H:%M") if self.end else ""
|
||||
start_str = self.start.strftime("%Y-%m-%d %H:%M") if self.start else "-"
|
||||
end_str = self.end.strftime("%Y-%m-%d %H:%M") if self.end else "-"
|
||||
return f"DueDate: {self.title} {start_str} to {end_str}"
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in New Issue