Skip to content

Commit 6d41ce9

Browse files
authored
Merge pull request #261 from PROCOLLAB-github/features-backlog
backlog fixes
2 parents 07cc6ea + 21c19cb commit 6d41ce9

25 files changed

Lines changed: 276 additions & 44 deletions

File tree

projects/core/src/consts/lists/education-info-list.const.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ export const educationUserLevel = [
4444
value: "Высшее образование – аспирантура",
4545
label: "высшее образование – аспирантура",
4646
},
47+
// {
48+
// id: 5,
49+
// value: "Дополнительное профессиональное образования",
50+
// label: "дополнительное профессиональное образования"
51+
// },
4752
];

projects/social_platform/src/app/office/courses/detail/course-detail.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ export class CourseDetailComponent implements OnInit {
7777
}
7878

7979
redirectToProgram(): void {
80-
this.router.navigate([`/office/program/${this.course()?.partnerProgramId}`], {
81-
queryParams: { courseId: this.course()?.id },
82-
});
80+
this.router.navigateByUrl(`/office/program/${this.course()?.partnerProgramId}`);
8381
}
8482
}

projects/social_platform/src/app/office/courses/lesson/shared/exclude-task/exclude-task.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
display: block;
3030
align-self: center;
3131
width: 100%;
32-
max-width: 295px;
32+
max-width: 395px;
3333
height: 223px;
3434
aspect-ratio: 16 / 9;
3535
border: 0;
@@ -82,6 +82,8 @@
8282
}
8383

8484
.read-more {
85+
align-items: start;
86+
align-self: self-start;
8587
margin-top: 12px;
8688
color: var(--accent);
8789
cursor: pointer;

projects/social_platform/src/app/office/courses/lesson/shared/file-task/file-task.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
display: block;
106106
align-self: center;
107107
width: 100%;
108-
max-width: 295px;
108+
max-width: 395px;
109109
height: 223px;
110110
aspect-ratio: 16 / 9;
111111
border: 0;
@@ -155,6 +155,8 @@
155155
}
156156

157157
.read-more {
158+
align-items: start;
159+
align-self: self-start;
158160
margin-top: 12px;
159161
color: var(--accent);
160162
cursor: pointer;

projects/social_platform/src/app/office/courses/lesson/shared/radio-select-task/radio-select-task.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
}
3434

3535
.read-more {
36+
align-items: start;
37+
align-self: self-start;
3638
margin-top: 12px;
3739
color: var(--accent);
3840
cursor: pointer;
@@ -132,7 +134,7 @@
132134
display: block;
133135
align-self: center;
134136
width: 100%;
135-
max-width: 295px;
137+
max-width: 395px;
136138
height: 223px;
137139
aspect-ratio: 16 / 9;
138140
border: 0;

projects/social_platform/src/app/office/courses/lesson/shared/video-task/info-task.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
display: block;
1818
align-self: center;
1919
width: 100%;
20-
max-width: 295px;
20+
max-width: 395px;
2121
height: 223px;
2222
aspect-ratio: 16 / 9;
2323
border: 0;
@@ -75,6 +75,8 @@
7575
}
7676

7777
.read-more {
78+
align-items: start;
79+
align-self: self-start;
7880
margin-top: 12px;
7981
color: var(--accent);
8082
cursor: pointer;

projects/social_platform/src/app/office/courses/lesson/shared/write-task/write-task.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
display: block;
5050
align-self: center;
5151
width: 100%;
52-
max-width: 295px;
52+
max-width: 395px;
5353
height: 223px;
5454
aspect-ratio: 16 / 9;
5555
border: 0;
@@ -63,6 +63,8 @@
6363
}
6464

6565
.read-more {
66+
align-items: start;
67+
align-self: self-start;
6668
margin-top: 12px;
6769
color: var(--accent);
6870
cursor: pointer;

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,8 @@
181181
участники
182182
</app-button>
183183
</a>
184-
} @else { @if (info().courseId || queryCourseId()) {
185-
<a
186-
class="info__contacts"
187-
[routerLink]="'/office/courses/' + (info().courseId || queryCourseId())"
188-
>
184+
} @else { @if (info().courses?.length) {
185+
<a class="info__contacts" [routerLink]="'/office/courses/' + info().courses[0].id">
189186
<app-button appearance="outline" size="medium" customTypographyClass="text-body-12">
190187
перейти в курс
191188
</app-button>

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export class DeatilComponent implements OnInit, OnDestroy {
8080
profile?: User;
8181
profileProjects = signal<User["projects"]>([]);
8282
listType: "project" | "program" | "profile" = "project";
83-
queryCourseId = signal<number | null>(null);
8483

8584
// Переменная для подсказок
8685
isTooltipVisible = false;
@@ -159,12 +158,6 @@ export class DeatilComponent implements OnInit, OnDestroy {
159158
this.listType = data["listType"];
160159
});
161160

162-
const queryParamsSub$ = this.route.queryParams.subscribe(params => {
163-
const courseId = params["courseId"];
164-
this.queryCourseId.set(courseId ? +courseId : null);
165-
});
166-
this.subscriptions.push(queryParamsSub$);
167-
168161
this.initializeBackPath();
169162

170163
this.updatePageStates();

projects/social_platform/src/app/office/features/news-card/news-card.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { FileService } from "@core/services/file.service";
2525
import { nanoid } from "nanoid";
2626
import { expandElement } from "@utils/expand-element";
2727
import { FileModel } from "@models/file.model";
28-
import { forkJoin, noop, Observable, tap } from "rxjs";
28+
import { catchError, forkJoin, noop, Observable, of, tap } from "rxjs";
2929
import { ButtonComponent, IconComponent } from "@ui/components";
3030
import { FileItemComponent } from "@ui/components/file-item/file-item.component";
3131
import { FileUploadItemComponent } from "@ui/components/file-upload-item/file-upload-item.component";
@@ -279,6 +279,11 @@ export class NewsCardComponent implements OnInit {
279279
fileObj.src = file.url;
280280
fileObj.loading = false;
281281
fileObj.tempFile = null;
282+
}),
283+
catchError(() => {
284+
fileObj.loading = false;
285+
fileObj.error = true;
286+
return of(null);
282287
})
283288
)
284289
);
@@ -301,6 +306,11 @@ export class NewsCardComponent implements OnInit {
301306
fileObj.loading = false;
302307
fileObj.src = file.url;
303308
fileObj.tempFile = null;
309+
}),
310+
catchError(() => {
311+
fileObj.loading = false;
312+
fileObj.error = "Ошибка загрузки";
313+
return of(null);
304314
})
305315
)
306316
);

0 commit comments

Comments
 (0)