Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<img alt="complete img" src="/assets/images/courses/complete.svg" />

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@
class="action__button"
(click)="onSubmitAnswer()"
>
{{ isLastTask() ? "завершить тест" : "следующее задание" }}
{{
isLastTask()
? "завершить урок"
: currentTask()?.answerType === null
? "отправить задание"
: "отправить ответ"
}}
</app-button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@

&__body,
&__content {
flex-grow: 1;
min-height: 358px;
padding: 24px;
background-color: var(--light-white);
Expand All @@ -113,14 +112,16 @@
}

&__body {
max-width: 422px;
flex: 1;

&--hasContent {
max-width: 333px;
}
}

&__content {
max-width: 350px;

&--hasContent {
min-width: 333px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@

&__header,
&__content {
flex-grow: 1;
min-height: 358px;
padding: 24px;
background: var(--light-white);
border: 0.5px solid var(--medium-grey-for-outline);
border-radius: var(--rounded-lg);
}

&__header {
flex: 1;
}

&__content {
min-width: 333px;
max-width: 350px;
padding: 12px 24px;

::ng-deep {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@

&__body,
&__content {
flex-grow: 1;
min-height: 358px;
padding: 24px;
background-color: var(--light-white);
Expand All @@ -119,7 +118,7 @@
}

&__body {
max-width: 422px;
flex: 1;

&--hasContent {
display: flex;
Expand All @@ -143,6 +142,8 @@
}

&__content {
max-width: 350px;

&--hasContent {
min-width: 333px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@

&__header,
&__content {
flex-grow: 1;
min-height: 358px;
padding: 24px;
background: var(--light-white);
border: 0.5px solid var(--medium-grey-for-outline);
border-radius: var(--rounded-lg);
}

&__header {
flex: 1;
}

&__content {
min-width: 333px;
max-width: 350px;
padding: 12px 24px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<div class="course">
<div class="course__cover">
<app-avatar [size]="68" [url]="course.avatarUrl"></app-avatar>
<img src="assets\icons\svg\rocket.svg" class="course__rocket" />
<app-button
customTypographyClass="text-body-10"
[color]="isMember() ? 'primary' : isSubs() ? 'red' : 'green'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@
участники
</app-button>
</a>
} @else { @if (info().courseId || queryCourseId()) {
<a
class="info__contacts"
[routerLink]="'/office/courses/' + (info().courseId || queryCourseId())"
>
<app-button appearance="outline" size="medium" customTypographyClass="text-body-12">
перейти в курс
</app-button>
</a>
} @else {
<a class="info__contacts">
<app-button
Expand All @@ -193,7 +202,7 @@
информация с ссылок
</app-button>
</a>
} }
} } }

<app-modal
[open]="isAssignProjectToProgramModalOpen()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export class DeatilComponent implements OnInit, OnDestroy {
profile?: User;
profileProjects = signal<User["projects"]>([]);
listType: "project" | "program" | "profile" = "project";
queryCourseId = signal<number | null>(null);

// Переменная для подсказок
isTooltipVisible = false;
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class Program {
isUserManager!: boolean;
isUserMember!: boolean;
publishProjectsAfterFinish!: boolean;
courseId!: number | null;

static default(): Program {
return {
Expand Down Expand Up @@ -86,6 +87,7 @@ export class Program {
isUserMember: false,
isUserManager: false,
publishProjectsAfterFinish: false,
courseId: null,
};
}
}
Expand Down
Loading