Skip to content

Commit a03ca24

Browse files
committed
fix specs-group and onboarding & button for expert
1 parent 217a7eb commit a03ca24

7 files changed

Lines changed: 45 additions & 23 deletions

File tree

projects/social_platform/src/app/auth/register/register.component.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,11 @@
9090
color: var(--dark-grey);
9191
cursor: pointer;
9292
}
93+
94+
.error {
95+
color: var(--red) !important;
96+
97+
i {
98+
color: var(--red) !important;
99+
}
100+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
зарегистрироваться
9898
</app-button>
9999
</a>
100-
} } @else if (isUserMember && !isUserManager && isUserExpert) {
100+
} } @else if (isUserMember && !isUserManager && !isUserExpert) {
101101
<app-button
102102
size="medium"
103103
[style.opacity]="registerDateExpired ? '0.5' : '1'"
@@ -108,7 +108,7 @@
108108
<span>подать проект</span>
109109
<i appIcon icon="plus" appSquare="10"></i>
110110
</app-button>
111-
} @else if (isUserManager) { @if (isUserMember) {
111+
} @else if (isUserManager || isUserExpert) { @if (isUserMember) {
112112
<a [routerLink]="'/office/program/' + info().id + '/projects-rating'">
113113
<app-button
114114
[appearance]="isProjectsRatingPage ? 'inline' : 'outline'"

projects/social_platform/src/app/office/onboarding/stage-zero/stage-zero.component.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@
6262
}
6363

6464
&__buttons {
65-
position: sticky;
66-
right: 100%;
65+
position: fixed;
66+
right: 5%;
6767
bottom: 3%;
6868
display: flex;
6969
flex-direction: column;
7070
gap: 10px;
71-
width: 100%;
72-
margin-left: 280%;
71+
width: 30%;
7372
}
7473
}
7574

projects/social_platform/src/app/office/profile/edit/edit.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,11 +1048,14 @@ <h4 class="text-heading-4">более специальностей</h4>
10481048
<div class="modal__content">
10491049
<div class="modal__specs-groups">
10501050
<ul>
1051-
@for (specsGroup of nestedSpecs$ | async; track specsGroup.id) {
1051+
@for (specsGroup of (nestedSpecs$ | async)?.slice(0, 7); track specsGroup.id) {
10521052
<li>
10531053
<app-specializations-group
10541054
[title]="specsGroup.name"
10551055
[options]="specsGroup.specializations"
1056+
[hasOpenGroups]="hasOpenSpecializationsGroups()"
1057+
[disabled]="isSpecializationGroupDisabled(specsGroup.name)"
1058+
(groupToggled)="onSpecializationsGroupToggled($event, specsGroup.name)"
10561059
(selectOption)="onSelectSpec($event)"
10571060
></app-specializations-group>
10581061
</li>

projects/social_platform/src/app/office/profile/edit/edit.component.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,33 @@ export class ProfileEditComponent implements OnInit, OnDestroy, AfterViewInit {
519519
profileFormSubmitting = false;
520520
profileForm: FormGroup;
521521

522+
// Для управления открытыми группами специализаций
523+
openSpecializationGroup: string | null = null;
524+
525+
/**
526+
* Проверяет, есть ли открытые группы специализаций
527+
*/
528+
hasOpenSpecializationsGroups(): boolean {
529+
return this.openSpecializationGroup !== null;
530+
}
531+
532+
/**
533+
* Проверяет, должна ли группа специализаций быть отключена
534+
* @param groupName - название группы для проверки
535+
*/
536+
isSpecializationGroupDisabled(groupName: string): boolean {
537+
return this.openSpecializationGroup !== null && this.openSpecializationGroup !== groupName;
538+
}
539+
540+
/**
541+
* Обработчик переключения группы специализаций
542+
* @param isOpen - флаг открытия/закрытия группы
543+
* @param groupName - название группы
544+
*/
545+
onSpecializationsGroupToggled(isOpen: boolean, groupName: string): void {
546+
this.openSpecializationGroup = isOpen ? groupName : null;
547+
}
548+
522549
/**
523550
* Добавление записи об достижении
524551
* Валидирует форму и добавляет новую запись в массив достижений

projects/social_platform/src/app/office/program/detail/shared/news-card/news-card.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
&__left {
168168
display: flex;
169169
align-items: center;
170+
gap: 5px;
170171
}
171172

172173
&__item {

projects/social_platform/src/app/office/projects/list/list.component.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -255,22 +255,6 @@ export class ProjectsListComponent implements OnInit, AfterViewInit, OnDestroy {
255255

256256
private previousReqQuery: Record<string, any> = {};
257257

258-
// deleteProject(projectId: number): void {
259-
// if (!confirm("Вы точно хотите удалить проект?")) {
260-
// return;
261-
// }
262-
263-
// this.projectService.remove(projectId).subscribe(() => {
264-
// this.projectService.projectsCount.next({
265-
// ...this.projectService.projectsCount.getValue(),
266-
// my: this.projectService.projectsCount.getValue().my - 1,
267-
// });
268-
269-
// const index = this.projects.findIndex(project => project.id === projectId);
270-
// this.projects.splice(index, 1);
271-
// });
272-
// }
273-
274258
onAcceptInvite(event: number): void {
275259
this.sliceInvitesArray(event);
276260
}

0 commit comments

Comments
 (0)