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/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 @@
-
поздравялем!
+
поздравляем!
урок пройден
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/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..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
@@ -14,7 +14,6 @@
&__header,
&__content {
- flex-grow: 1;
min-height: 358px;
padding: 24px;
background: var(--light-white);
@@ -22,8 +21,13 @@
border-radius: var(--rounded-lg);
}
+ &__header {
+ flex: 1;
+ }
+
&__content {
min-width: 333px;
+ max-width: 350px;
padding: 12px 24px;
::ng-deep {
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..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
@@ -13,7 +13,6 @@
&__header,
&__content {
- flex-grow: 1;
min-height: 358px;
padding: 24px;
background: var(--light-white);
@@ -21,8 +20,13 @@
border-radius: var(--rounded-lg);
}
+ &__header {
+ flex: 1;
+ }
+
&__content {
min-width: 333px;
+ max-width: 350px;
padding: 12px 24px;
}
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 @@
-
+ } @else { @if (info().courseId || queryCourseId()) {
+
+
+ перейти в курс
+
+
} @else {
- } }
+ } } }
([]);
listType: "project" | "program" | "profile" = "project";
+ queryCourseId = signal(null);
// Переменная для подсказок
isTooltipVisible = false;
@@ -158,6 +159,12 @@ export class DeatilComponent implements OnInit, OnDestroy {
this.listType = data["listType"];
});
+ const queryParamsSub$ = this.route.queryParams.subscribe(params => {
+ const courseId = params["courseId"];
+ this.queryCourseId.set(courseId ? +courseId : null);
+ });
+ this.subscriptions.push(queryParamsSub$);
+
this.initializeBackPath();
this.updatePageStates();
diff --git a/projects/social_platform/src/app/office/program/models/program.model.ts b/projects/social_platform/src/app/office/program/models/program.model.ts
index 2ba3be164..6c231e449 100644
--- a/projects/social_platform/src/app/office/program/models/program.model.ts
+++ b/projects/social_platform/src/app/office/program/models/program.model.ts
@@ -58,6 +58,7 @@ export class Program {
isUserManager!: boolean;
isUserMember!: boolean;
publishProjectsAfterFinish!: boolean;
+ courseId!: number | null;
static default(): Program {
return {
@@ -86,6 +87,7 @@ export class Program {
isUserMember: false,
isUserManager: false,
publishProjectsAfterFinish: false,
+ courseId: null,
};
}
}