From 5f47cfc22628c8331994e98c843bce723fe9d35f Mon Sep 17 00:00:00 2001 From: Vitaly Baev Date: Thu, 15 Feb 2018 12:38:25 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/CourseRedactor.vue | 1 + web/src/js/modules/api.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/components/CourseRedactor.vue b/web/src/components/CourseRedactor.vue index 2f2fd7fb..cfc3a4f9 100644 --- a/web/src/components/CourseRedactor.vue +++ b/web/src/components/CourseRedactor.vue @@ -268,6 +268,7 @@ ROLE_ADMIN: ROLE_ADMIN, course: { title: '', + status: null, category: null, categorySelect: null, duration: 1, diff --git a/web/src/js/modules/api.js b/web/src/js/modules/api.js index 22ec85d8..2cfc5385 100644 --- a/web/src/js/modules/api.js +++ b/web/src/js/modules/api.js @@ -64,6 +64,7 @@ export const api = { const courseJson = { title: courseObject.title, + status: courseObject.status, author: courseObject.author ? courseObject.author : null, short_description: courseObject.short_description, category: courseObject.category, @@ -238,7 +239,7 @@ export const api = { return { id: courseJSON.id, title: courseJSON.title, - author: courseJSON.author, + status: courseJSON.status, short_description: courseJSON.short_description, category: courseJSON.category && courseJSON.category.id ? courseJSON.category.id : courseJSON.category, author: courseJSON.author && courseJSON.author.id ? courseJSON.author.id : courseJSON.author, From 2296c159e46999fff6dd0297e795401fc4e138ff Mon Sep 17 00:00:00 2001 From: Vitaly Baev Date: Thu, 15 Feb 2018 18:22:32 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=9D=D0=B5=20=D0=BE=D0=B1=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D1=8F=D1=82=D1=8C=20=D0=BA=D0=B0=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D1=81=D0=BE=D1=85=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/CourseRedactor.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/components/CourseRedactor.vue b/web/src/components/CourseRedactor.vue index cfc3a4f9..d26b1aa1 100644 --- a/web/src/components/CourseRedactor.vue +++ b/web/src/components/CourseRedactor.vue @@ -540,7 +540,11 @@ document.getElementById('course-redactor__saving-status').innerText = ''; }, 2000); this.courseSyncHook = true; - this.course = api.convertCourseJson(response.data); + const courseData = api.convertCourseJson(response.data); + if (this.course.coverImage) { + courseData.coverImage = this.course.coverImage; + } + this.course = courseData; this.$nextTick(() => { this.courseSyncHook = false; })