@@ -850,15 +850,34 @@
schedule.then((response) => {
if (response.data) {
- this.scheduleOptions = _.orderBy(response.data.results.map((schedule) => {
- var now = new Date();
- now.setDate(now.getDate() + (schedule.weekday + (7 - now.getDay())) % 7);
- return {
- title: `${schedule.title} (${this.weekdays[schedule.weekday]}, ${moment(now).format("D MMM")})`,
+ let schedule = [];
+ response.data.results.forEach((item) => {
+ schedule[item.weekday] = item.title;
+ });
+
+ console.log('schedule', schedule);
+
+ let options = [];
+
+ for(let i=-7;i<=10;i++) {
+ let now = new Date();
+ now.setDate(now.getDate() + i);
+
+ let weekday = now.getDay() || 7;
+
+
+ console.log('data', i, now.getDay(), weekday, now, moment(now).format("D MMM"));
+
+ options.push({
+ title: `${schedule[weekday]} (${this.weekdays[weekday]}, ${moment(now).format("D MMM")})`,
value: moment(now).format('YYYY-MM-DD')
- }
- }), (item)=>{return moment(item.value)});
+ });
+ }
+
+ console.log('options',options);
+
+ this.scheduleOptions = _.orderBy(options, (item)=>{return moment(item.value)});
}
this.updateCategory();
});
diff --git a/web/src/components/LessonRedactor.vue b/web/src/components/LessonRedactor.vue
index c43a0242..cbc433d4 100644
--- a/web/src/components/LessonRedactor.vue
+++ b/web/src/components/LessonRedactor.vue
@@ -21,7 +21,7 @@
diff --git a/web/src/components/inputs/LilSelect.vue b/web/src/components/inputs/LilSelect.vue
index 6845fece..7fd19d60 100644
--- a/web/src/components/inputs/LilSelect.vue
+++ b/web/src/components/inputs/LilSelect.vue
@@ -4,7 +4,7 @@
{{ selectedTitle }}
-
diff --git a/web/src/sass/_common.sass b/web/src/sass/_common.sass
index fae1cb73..cc6f3fa7 100755
--- a/web/src/sass/_common.sass
+++ b/web/src/sass/_common.sass
@@ -2658,6 +2658,17 @@ a.grey-link
&__content
margin-bottom: 30px
color: #191919
+ &__video_frame
+ width: 640px
+ height: 360px
+ +m
+ width: 100%
+ &__chat_frame
+ width: 600px
+ height: 600px
+ +m
+ width: 100%
+
.lessons
&__subtitle