From a3ed2a121d780e76612626f1112f75e45e567b1b Mon Sep 17 00:00:00 2001 From: Awakich Date: Wed, 18 Mar 2026 15:33:52 +0300 Subject: [PATCH 1/4] add course navigation from program page & update lesson button texts --- .../courses/lesson/complete/complete.component.html | 2 +- .../src/app/office/courses/lesson/lesson.component.html | 8 +++++++- .../src/app/office/features/detail/detail.component.html | 8 +++++++- .../src/app/office/program/models/program.model.ts | 2 ++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/projects/social_platform/src/app/office/courses/lesson/complete/complete.component.html b/projects/social_platform/src/app/office/courses/lesson/complete/complete.component.html index b17df2859..90ba15b2b 100644 --- a/projects/social_platform/src/app/office/courses/lesson/complete/complete.component.html +++ b/projects/social_platform/src/app/office/courses/lesson/complete/complete.component.html @@ -5,7 +5,7 @@ complete img
-

поздравялем!

+

поздравляем!

урок пройден

diff --git a/projects/social_platform/src/app/office/courses/lesson/lesson.component.html b/projects/social_platform/src/app/office/courses/lesson/lesson.component.html index 7afe4c7cf..ff5acc41f 100644 --- a/projects/social_platform/src/app/office/courses/lesson/lesson.component.html +++ b/projects/social_platform/src/app/office/courses/lesson/lesson.component.html @@ -89,7 +89,13 @@ class="action__button" (click)="onSubmitAnswer()" > - {{ isLastTask() ? "завершить тест" : "следующее задание" }} + {{ + isLastTask() + ? "завершить урок" + : currentTask()?.answerType === null + ? "отправить задание" + : "отправить ответ" + }} diff --git a/projects/social_platform/src/app/office/features/detail/detail.component.html b/projects/social_platform/src/app/office/features/detail/detail.component.html index 31198ab12..12f199f82 100644 --- a/projects/social_platform/src/app/office/features/detail/detail.component.html +++ b/projects/social_platform/src/app/office/features/detail/detail.component.html @@ -181,6 +181,12 @@ участники + } @else { @if (info().courseId) { + + + перейти в курс + + } @else { - } } + } } } Date: Wed, 18 Mar 2026 18:02:57 +0300 Subject: [PATCH 2/4] limit answer column width to 350px & let task body stretch --- .../lesson/shared/exclude-task/exclude-task.component.scss | 5 +++-- .../lesson/shared/file-task/file-task.component.scss | 6 +++++- .../radio-select-task/radio-select-task.component.scss | 5 +++-- .../lesson/shared/write-task/write-task.component.scss | 6 +++++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/projects/social_platform/src/app/office/courses/lesson/shared/exclude-task/exclude-task.component.scss b/projects/social_platform/src/app/office/courses/lesson/shared/exclude-task/exclude-task.component.scss index 19a2d08ee..8366c8d14 100644 --- a/projects/social_platform/src/app/office/courses/lesson/shared/exclude-task/exclude-task.component.scss +++ b/projects/social_platform/src/app/office/courses/lesson/shared/exclude-task/exclude-task.component.scss @@ -104,7 +104,6 @@ &__body, &__content { - flex-grow: 1; min-height: 358px; padding: 24px; background-color: var(--light-white); @@ -113,7 +112,7 @@ } &__body { - max-width: 422px; + flex: 1; &--hasContent { max-width: 333px; @@ -121,6 +120,8 @@ } &__content { + max-width: 350px; + &--hasContent { min-width: 333px; } diff --git a/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss b/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss index 2c0c303a1..fc9c1a125 100644 --- a/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss +++ b/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss @@ -14,7 +14,6 @@ &__header, &__content { - flex-grow: 1; min-height: 358px; padding: 24px; background: var(--light-white); @@ -22,7 +21,12 @@ border-radius: var(--rounded-lg); } + &__header { + flex: 1; + } + &__content { + max-width: 350px; min-width: 333px; padding: 12px 24px; diff --git a/projects/social_platform/src/app/office/courses/lesson/shared/radio-select-task/radio-select-task.component.scss b/projects/social_platform/src/app/office/courses/lesson/shared/radio-select-task/radio-select-task.component.scss index aa208fa30..a2b1ddda0 100644 --- a/projects/social_platform/src/app/office/courses/lesson/shared/radio-select-task/radio-select-task.component.scss +++ b/projects/social_platform/src/app/office/courses/lesson/shared/radio-select-task/radio-select-task.component.scss @@ -110,7 +110,6 @@ &__body, &__content { - flex-grow: 1; min-height: 358px; padding: 24px; background-color: var(--light-white); @@ -119,7 +118,7 @@ } &__body { - max-width: 422px; + flex: 1; &--hasContent { display: flex; @@ -143,6 +142,8 @@ } &__content { + max-width: 350px; + &--hasContent { min-width: 333px; } diff --git a/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss b/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss index 8bb140892..906013aca 100644 --- a/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss +++ b/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss @@ -13,7 +13,6 @@ &__header, &__content { - flex-grow: 1; min-height: 358px; padding: 24px; background: var(--light-white); @@ -21,7 +20,12 @@ border-radius: var(--rounded-lg); } + &__header { + flex: 1; + } + &__content { + max-width: 350px; min-width: 333px; padding: 12px 24px; } From 1fe0c04c11a145741561c287bc57f0bd72f71edd Mon Sep 17 00:00:00 2001 From: Awakich Date: Wed, 18 Mar 2026 18:05:33 +0300 Subject: [PATCH 3/4] fix css property ordering in task components --- .../courses/lesson/shared/file-task/file-task.component.scss | 2 +- .../courses/lesson/shared/write-task/write-task.component.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss b/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss index fc9c1a125..3ef36bfd3 100644 --- a/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss +++ b/projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss @@ -26,8 +26,8 @@ } &__content { - max-width: 350px; min-width: 333px; + max-width: 350px; padding: 12px 24px; ::ng-deep { diff --git a/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss b/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss index 906013aca..22c824532 100644 --- a/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss +++ b/projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss @@ -25,8 +25,8 @@ } &__content { - max-width: 350px; min-width: 333px; + max-width: 350px; padding: 12px 24px; } From d69e73bfcb0d487a6101bc6ea0bff4f253682dc2 Mon Sep 17 00:00:00 2001 From: Awakich Date: Thu, 19 Mar 2026 13:52:12 +0300 Subject: [PATCH 4/4] pass courseId as query param when navigating from course to program page --- .../app/office/courses/detail/course-detail.component.ts | 4 +++- .../app/office/courses/shared/course/course.component.html | 1 - .../src/app/office/features/detail/detail.component.html | 7 +++++-- .../src/app/office/features/detail/detail.component.ts | 7 +++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/projects/social_platform/src/app/office/courses/detail/course-detail.component.ts b/projects/social_platform/src/app/office/courses/detail/course-detail.component.ts index b66e3a03b..8bd12453a 100644 --- a/projects/social_platform/src/app/office/courses/detail/course-detail.component.ts +++ b/projects/social_platform/src/app/office/courses/detail/course-detail.component.ts @@ -77,6 +77,8 @@ export class CourseDetailComponent implements OnInit { } redirectToProgram(): void { - this.router.navigateByUrl(`/office/program/${this.course()?.partnerProgramId}`); + this.router.navigate([`/office/program/${this.course()?.partnerProgramId}`], { + queryParams: { courseId: this.course()?.id }, + }); } } diff --git a/projects/social_platform/src/app/office/courses/shared/course/course.component.html b/projects/social_platform/src/app/office/courses/shared/course/course.component.html index cfee7e26a..d596d0c0a 100644 --- a/projects/social_platform/src/app/office/courses/shared/course/course.component.html +++ b/projects/social_platform/src/app/office/courses/shared/course/course.component.html @@ -4,7 +4,6 @@