Skip to content

Commit a3ed2a1

Browse files
committed
add course navigation from program page & update lesson button texts
1 parent e457292 commit a3ed2a1

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

projects/social_platform/src/app/office/courses/lesson/complete/complete.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<img alt="complete img" src="/assets/images/courses/complete.svg" />
66

77
<div class="complete__text">
8-
<p class="text-body-12-bold">поздравялем!</p>
8+
<p class="text-body-12-bold">поздравляем!</p>
99
<p class="text-body-12">урок пройден</p>
1010
</div>
1111

projects/social_platform/src/app/office/courses/lesson/lesson.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@
8989
class="action__button"
9090
(click)="onSubmitAnswer()"
9191
>
92-
{{ isLastTask() ? "завершить тест" : "следующее задание" }}
92+
{{
93+
isLastTask()
94+
? "завершить урок"
95+
: currentTask()?.answerType === null
96+
? "отправить задание"
97+
: "отправить ответ"
98+
}}
9399
</app-button>
94100
</div>
95101
</div>

projects/social_platform/src/app/office/features/detail/detail.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@
181181
участники
182182
</app-button>
183183
</a>
184+
} @else { @if (info().courseId) {
185+
<a class="info__contacts" [routerLink]="'/office/courses/' + info().courseId">
186+
<app-button appearance="outline" size="medium" customTypographyClass="text-body-12">
187+
перейти в курс
188+
</app-button>
189+
</a>
184190
} @else {
185191
<a class="info__contacts">
186192
<app-button
@@ -193,7 +199,7 @@
193199
информация с ссылок
194200
</app-button>
195201
</a>
196-
} }
202+
} } }
197203

198204
<app-modal
199205
[open]="isAssignProjectToProgramModalOpen()"

projects/social_platform/src/app/office/program/models/program.model.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export class Program {
5858
isUserManager!: boolean;
5959
isUserMember!: boolean;
6060
publishProjectsAfterFinish!: boolean;
61+
courseId!: number | null;
6162

6263
static default(): Program {
6364
return {
@@ -86,6 +87,7 @@ export class Program {
8687
isUserMember: false,
8788
isUserManager: false,
8889
publishProjectsAfterFinish: false,
90+
courseId: null,
8991
};
9092
}
9193
}

0 commit comments

Comments
 (0)