Skip to content

Commit

Permalink
[Lesson] fixes pdf export of chapters
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Mar 23, 2021
1 parent c3c7a21 commit 0c73a8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const LessonMenu = props => {
label: trans('export-pdf', {}, 'actions'),
group: trans('transfer'),
onClick: props.autoClose,
callback: () => props.downloadChapterPdf(chapter.id)
callback: () => props.downloadChapterPdf(props.lesson.id, chapter.id)
}, {
name: 'delete',
type: CALLBACK_BUTTON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const LessonMenu = withRouter(
canExport: selectors.canExport(state)
}),
(dispatch) => ({
downloadChapterPdf(chapterId) {
return dispatch(actions.downloadChapterPdf(chapterId))
downloadChapterPdf(lessonId, chapterId) {
return dispatch(actions.downloadChapterPdf(lessonId, chapterId))
},
delete: (lessonId, chapterSlug, chapterTitle, history, path) => {
dispatch(modalActions.showModal(MODAL_LESSON_CHAPTER_DELETE, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ actions.downloadLessonPdf = (lessonId) => ({
}
})

actions.downloadChapterPdf = (chapterId) => ({
actions.downloadChapterPdf = (lessonId, chapterId) => ({
[API_REQUEST]: {
url: ['icap_lesson_chapter_export_pdf', {chapter: chapterId}],
url: ['icap_lesson_chapter_export_pdf', {lessonId: lessonId, chapter: chapterId}],
request: {
method: 'GET'
}
Expand Down

0 comments on commit 0c73a8a

Please sign in to comment.