From aa0f4740b2ed67e3bc76bb3896eaa513a9dc6621 Mon Sep 17 00:00:00 2001 From: Awakich Date: Wed, 5 Nov 2025 17:15:05 +0300 Subject: [PATCH 01/12] fix feed-filter & pagination, design in about, rate projetcs in program, errors in edit with modal, add empty placeholder in profile --- .../src/consts/filters/feed-filter.const.ts | 2 +- .../shared/webinar/webinar.component.html | 4 +- .../news-card/news-card.component.html | 2 +- .../src/app/office/feed/feed.component.ts | 2 +- .../src/app/office/feed/feed.resolver.ts | 2 +- .../feed/filter/feed-filter.component.ts | 14 +++---- .../open-vacancy/open-vacancy.component.html | 2 +- .../profile/detail/main/main.component.html | 42 +++++++++++++------ .../profile/detail/main/main.component.scss | 15 +++++++ .../profile/detail/main/main.component.ts | 26 ++++++++---- .../office/profile/edit/edit.component.html | 30 ++++++------- .../app/office/profile/edit/edit.component.ts | 6 ++- .../shared/news-card/news-card.component.html | 2 +- .../rating-card/rating-card.component.html | 6 +-- .../projects/detail/info/info.component.html | 11 +++-- .../vacancies/detail/info/info.component.html | 8 ++-- 16 files changed, 111 insertions(+), 63 deletions(-) diff --git a/projects/core/src/consts/filters/feed-filter.const.ts b/projects/core/src/consts/filters/feed-filter.const.ts index cfb85b78f..8c62b63de 100644 --- a/projects/core/src/consts/filters/feed-filter.const.ts +++ b/projects/core/src/consts/filters/feed-filter.const.ts @@ -4,7 +4,7 @@ export const feedFilter = [ { id: 1, name: "новости проектов", - value: "projects", + value: "project", icon: "projects", }, { diff --git a/projects/skills/src/app/webinars/shared/webinar/webinar.component.html b/projects/skills/src/app/webinars/shared/webinar/webinar.component.html index d74ad4fbb..307c63c4a 100644 --- a/projects/skills/src/app/webinars/shared/webinar/webinar.component.html +++ b/projects/skills/src/app/webinars/shared/webinar/webinar.component.html @@ -12,10 +12,10 @@

{{ webinar.title }}

>

@if (descriptionExpandable) {
- {{ readFullDescription ? "Скрыть" : "Читать полностью" }} + {{ readFullDescription ? "скрыть" : "подробнее" }}
} diff --git a/projects/social_platform/src/app/office/features/news-card/news-card.component.html b/projects/social_platform/src/app/office/features/news-card/news-card.component.html index 9f9da3ba7..1a20e7c81 100644 --- a/projects/social_platform/src/app/office/features/news-card/news-card.component.html +++ b/projects/social_platform/src/app/office/features/news-card/news-card.component.html @@ -63,7 +63,7 @@ class="read-more text-body-10" (click)="onExpandNewsText(newsTextEl?.nativeElement, 'expanded', readMore)" > - {{ readMore ? "скрыть" : "читать полностью" }} + {{ readMore ? "скрыть" : "подробнее" }} } @if (!editMode) { diff --git a/projects/social_platform/src/app/office/feed/feed.component.ts b/projects/social_platform/src/app/office/feed/feed.component.ts index 0ade50883..0dc4e9128 100644 --- a/projects/social_platform/src/app/office/feed/feed.component.ts +++ b/projects/social_platform/src/app/office/feed/feed.component.ts @@ -77,7 +77,7 @@ export class FeedComponent implements OnInit, AfterViewInit, OnDestroy { this.totalItemsCount.set(0); this.feedPage.set(0); - return this.onFetch(0, this.perFetchTake(), includes ?? ["vacancy", "projects", "news"]); + return this.onFetch(0, this.perFetchTake(), includes ?? ["vacancy", "project", "news"]); }) ) .subscribe(feed => { diff --git a/projects/social_platform/src/app/office/feed/feed.resolver.ts b/projects/social_platform/src/app/office/feed/feed.resolver.ts index 91640b8db..8f4529270 100644 --- a/projects/social_platform/src/app/office/feed/feed.resolver.ts +++ b/projects/social_platform/src/app/office/feed/feed.resolver.ts @@ -29,6 +29,6 @@ export const FeedResolver: ResolveFn> = route => { return feedService.getFeed( 0, 20, - route.queryParams["includes"] ?? ["vacancy", "news", "projects"] + route.queryParams["includes"] ?? ["vacancy", "news", "project"] ); }; diff --git a/projects/social_platform/src/app/office/feed/filter/feed-filter.component.ts b/projects/social_platform/src/app/office/feed/filter/feed-filter.component.ts index 32d0ae57d..fa2020263 100644 --- a/projects/social_platform/src/app/office/feed/filter/feed-filter.component.ts +++ b/projects/social_platform/src/app/office/feed/filter/feed-filter.component.ts @@ -149,25 +149,25 @@ export class FeedFilterComponent implements OnInit, OnDestroy { */ setFilter(keyword: string): void { this.includedFilters.update(included => { - if (keyword.startsWith("projects/")) { + if (keyword.startsWith("project/")) { // Если уже активен этот же вложенный фильтр - сбрасываем к "projects" if (included === keyword) { - return "projects"; + return "project"; } return keyword; } // Если кликнули на "projects" - if (keyword === "projects") { - if (included.startsWith("projects/")) { - return "projects"; + if (keyword === "project") { + if (included.startsWith("project/")) { + return "project"; } - if (included === "projects") { + if (included === "project") { return ""; } - return "projects"; + return "project"; } if (included === keyword) { diff --git a/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.html b/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.html index 0d839a34a..98f6f5c91 100644 --- a/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.html +++ b/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.html @@ -75,7 +75,7 @@

{{ vacancy.role }}

class="read-more text-body-10" (click)="onExpandDescription(descEl, 'expanded', readFullDescription)" > - {{ readFullDescription ? "cкрыть" : "читать полностью" }} + {{ readFullDescription ? "скрыть" : "подробнее" }} } diff --git a/projects/social_platform/src/app/office/profile/detail/main/main.component.html b/projects/social_platform/src/app/office/profile/detail/main/main.component.html index 91845a197..fed9c5805 100644 --- a/projects/social_platform/src/app/office/profile/detail/main/main.component.html +++ b/projects/social_platform/src/app/office/profile/detail/main/main.component.html @@ -16,11 +16,12 @@

метаданные

{{ (user.birthday | yearsFromBirthday) ?? "не указан" }}

+ @if (user.city) {
  • {{ user.city ?? "не указан" }}

  • - + } @if (user.speciality) {
  • @@ -31,9 +32,11 @@

    метаданные

    }}

  • + } + @if (user.userLanguages.length > 0) {

    языки

    @@ -49,8 +52,7 @@

    языки

    }
    - - @if (user.programs.length; as programsLength) { + } @if (user.programs.length; as programsLength) {
      @for (p of user.programs.slice(0, 3); track p.id) { @@ -83,7 +85,7 @@

      языки

      @if (programsLength > 3) {
      - {{ readAllPrograms ? "Скрыть" : "Читать полностью" }} + {{ readAllPrograms ? "скрыть" : "подробнее" }}
      }
    @@ -92,13 +94,13 @@

    языки

    @if (loggedUserId) {
    + @if (user.aboutMe; as about) {

    обо мне

    - @if (user.aboutMe; as about) {

    @if (descriptionExpandable) { @@ -106,13 +108,12 @@

    обо мне

    class="read-more text-body-10" (click)="onExpandDescription(descEl, 'expanded', readFullDescription)" > - {{ readFullDescription ? "Скрыть" : "Читать полностью" }} + {{ readFullDescription ? "скрыть" : "подробнее" }}
    }
    - }
    - + } @if (user.skills.length || user.achievements.length) {
    @for (directionItem of directions; track $index) { обо мне > }
    - + } @if (isProfileEmpty) { @if (loggedUserId === user.id) { +
    + +

    + заполните профиль и начните пользоваться PROCOLLAB +

    + заполнить +
    + } } @else {
    @if (loggedUserId === user.id) { @@ -146,6 +161,7 @@

    обо мне

    }
    + }
    } @@ -186,7 +202,7 @@

    контакты

    @if (linksLength > 3) {
    - {{ readAllLinks ? "Скрыть" : "Читать полностью" }} + {{ readAllLinks ? "скрыть" : "подробнее" }}
    } @@ -242,7 +258,7 @@

    образование

    @if (educationLength > 3) {
    - {{ readAllEducation ? "Скрыть" : "Читать полностью" }} + {{ readAllEducation ? "скрыть" : "подробнее" }}
    } @@ -316,7 +332,7 @@

    работа

    class="read-more text-body-10" (click)="readAllWorkExperience = !readAllWorkExperience" > - {{ readAllWorkExperience ? "Скрыть" : "Читать полностью" }} + {{ readAllWorkExperience ? "скрыть" : "подробнее" }} } @@ -367,7 +383,7 @@

    проекты

    @if (projectsLength > 3) {
    - {{ readAllProjects ? "Скрыть" : "Читать полностью" }} + {{ readAllProjects ? "скрыть" : "подробнее" }}
    } diff --git a/projects/social_platform/src/app/office/profile/detail/main/main.component.scss b/projects/social_platform/src/app/office/profile/detail/main/main.component.scss index 6f5c6b430..3684ef670 100644 --- a/projects/social_platform/src/app/office/profile/detail/main/main.component.scss +++ b/projects/social_platform/src/app/office/profile/detail/main/main.component.scss @@ -104,6 +104,21 @@ align-items: center; margin-top: 14px; } + + &__empty { + display: flex; + flex-direction: column; + gap: 24px; + align-items: center; + + &--text { + color: var(--grey-for-text); + } + + i { + color: var(--grey-for-text); + } + } } .info { diff --git a/projects/social_platform/src/app/office/profile/detail/main/main.component.ts b/projects/social_platform/src/app/office/profile/detail/main/main.component.ts index 73e137696..19d60148e 100644 --- a/projects/social_platform/src/app/office/profile/detail/main/main.component.ts +++ b/projects/social_platform/src/app/office/profile/detail/main/main.component.ts @@ -26,7 +26,7 @@ import { YearsFromBirthdayPipe, } from "projects/core"; import { UserLinksPipe } from "@core/pipes/user-links.pipe"; -import { IconComponent } from "@ui/components"; +import { IconComponent, ButtonComponent } from "@ui/components"; import { TagComponent } from "@ui/components/tag/tag.component"; import { AsyncPipe, CommonModule, NgTemplateOutlet } from "@angular/common"; import { ProfileService } from "@auth/services/profile.service"; @@ -81,17 +81,20 @@ import { DirectionItem, directionItemBuilder } from "@utils/helpers/directionIte NewsCardComponent, NewsFormComponent, ProjectDirectionCard, + ButtonComponent, ], changeDetection: ChangeDetectionStrategy.OnPush, }) export class ProfileMainComponent implements OnInit, AfterViewInit, OnDestroy { private readonly route = inject(ActivatedRoute); + private readonly authService = inject(AuthService); private readonly profileNewsService = inject(ProfileNewsService); private readonly profileDataService = inject(ProfileDataService); private readonly cdRef = inject(ChangeDetectorRef); user?: User; loggedUserId?: number; + isProfileEmpty?: boolean; directions: DirectionItem[] = []; @@ -119,14 +122,19 @@ export class ProfileMainComponent implements OnInit, AfterViewInit, OnDestroy { }, }); - const profileIdDataSub$ = this.profileDataService - .getProfileId() - .pipe(filter(userId => !!userId)) - .subscribe({ - next: profileId => { - this.loggedUserId = profileId; - }, - }); + const profileIdDataSub$ = this.authService.profile.subscribe({ + next: user => { + this.loggedUserId = user?.id; + }, + }); + + this.isProfileEmpty = !( + this.user?.firstName && + this.user?.lastName && + this.user?.email && + this.user?.avatar && + this.user?.birthday + ); const route$ = this.route.params .pipe( diff --git a/projects/social_platform/src/app/office/profile/edit/edit.component.html b/projects/social_platform/src/app/office/profile/edit/edit.component.html index b75efc90a..074551209 100644 --- a/projects/social_platform/src/app/office/profile/edit/edit.component.html +++ b/projects/social_platform/src/app/office/profile/edit/edit.component.html @@ -84,21 +84,23 @@

    редактирование профиля

    @if (profileForm.get("avatar"); as avatar) { -
    +
    - - @if (avatar | controlError: "required") { -
    - {{ errorMessage.EMPTY_AVATAR }} -
    - } -
    +
    + + @if (avatar | controlError: "required") { +
    + {{ errorMessage.EMPTY_AVATAR }} +
    + } +
    +
    } @if (profileForm.get("coverImageAddress"); as coverImageAddress) {
    } @if (!editMode) { @@ -82,7 +82,7 @@ [disabled]="showConfirmedState" [appearance]="showConfirmedState ? 'outline' : 'inline'" [style.opacity]="showConfirmedState ? '0.5' : '1'" - (click)="showRatingForm ? confirmLoading() : null" + (click)="showRatingForm ? confirmRateProject() : null" > {{ showRatingForm ? "оценить проект" : "проект оценен" }} diff --git a/projects/social_platform/src/app/office/projects/detail/info/info.component.html b/projects/social_platform/src/app/office/projects/detail/info/info.component.html index 6e9235d99..efa0ba7ca 100644 --- a/projects/social_platform/src/app/office/projects/detail/info/info.component.html +++ b/projects/social_platform/src/app/office/projects/detail/info/info.component.html @@ -65,10 +65,10 @@

    о проекте

    @if (descriptionExpandable) {
    - {{ readFullDescription ? "Скрыть" : "Читать полностью" }} + {{ readFullDescription ? "скрыть" : "подробнее" }}
    } @@ -196,8 +196,11 @@

    достижения

    } } @if (project.achievements.length > 3) { -
    - {{ readAllAchievements ? "Скрыть" : "Читать полностью" }} +
    + {{ readAllAchievements ? "скрыть" : "подробнее" }}
    }
    diff --git a/projects/social_platform/src/app/office/vacancies/detail/info/info.component.html b/projects/social_platform/src/app/office/vacancies/detail/info/info.component.html index 6a0d60ce0..f4b12eed9 100644 --- a/projects/social_platform/src/app/office/vacancies/detail/info/info.component.html +++ b/projects/social_platform/src/app/office/vacancies/detail/info/info.component.html @@ -14,10 +14,10 @@

    @if (descriptionExpandable) {
    - {{ readFullDescription ? "Скрыть" : "Читать полностью" }} + {{ readFullDescription ? "скрыть" : "подробнее" }}
    } @@ -52,8 +52,8 @@ } } @if (skillsLength > 8) { -
    - {{ readFullSkills ? "Скрыть" : "Читать полностью" }} +
    + {{ readFullSkills ? "скрыть" : "подробнее" }}
    }
    From aef7bedc36e80ac7654679eae185ba0f154182c7 Mon Sep 17 00:00:00 2001 From: Awakich Date: Wed, 5 Nov 2025 18:57:49 +0300 Subject: [PATCH 02/12] fix trajectories & tasks in skills app, invites in dashboard, partner_program in project model --- projects/skills/src/app/app.component.scss | 1 + .../src/app/profile/profile.component.ts | 3 ++- .../info-block/info-block.component.html | 4 ++-- .../shared/task-card/task-card.component.html | 2 +- .../app/task/subtask/subtask.component.html | 18 ++++++++++-------- .../app/task/subtask/subtask.component.scss | 6 +++++- projects/skills/src/styles/_colors.scss | 9 +++++---- projects/skills/src/styles/_rounded.scss | 1 + .../info-card/info-card.component.html | 6 +++--- .../info-card/info-card.component.scss | 10 +++++++++- .../app/office/feed/models/feed-item.model.ts | 5 +++++ .../src/app/office/models/project.model.ts | 2 -- .../src/app/office/office.component.html | 1 + .../project-additional-step.component.html | 2 +- .../office/projects/projects.component.html | 4 ++-- .../app/office/projects/projects.component.ts | 12 ++++++++---- .../app/ui/components/bar/bar.component.scss | 4 ++++ 17 files changed, 60 insertions(+), 30 deletions(-) diff --git a/projects/skills/src/app/app.component.scss b/projects/skills/src/app/app.component.scss index 02e36e5f5..056326355 100644 --- a/projects/skills/src/app/app.component.scss +++ b/projects/skills/src/app/app.component.scss @@ -4,6 +4,7 @@ .app { display: flex; height: 100%; + padding: 20px; background-color: var(--light-gray); &__wrapper { diff --git a/projects/skills/src/app/profile/profile.component.ts b/projects/skills/src/app/profile/profile.component.ts index 031905722..1cb0df6c6 100644 --- a/projects/skills/src/app/profile/profile.component.ts +++ b/projects/skills/src/app/profile/profile.component.ts @@ -7,6 +7,7 @@ import { InfoBlockComponent } from "./shared/info-block/info-block.component"; import { toSignal } from "@angular/core/rxjs-interop"; import { map } from "rxjs"; import { BarComponent } from "@ui/components"; +import { BarNewComponent } from "@ui/components/bar-new/bar.component"; /** * Основной компонент профиля пользователя @@ -20,7 +21,7 @@ import { BarComponent } from "@ui/components"; @Component({ selector: "app-profile", standalone: true, - imports: [CommonModule, RouterOutlet, InfoBlockComponent, BarComponent], + imports: [CommonModule, RouterOutlet, InfoBlockComponent, BarComponent, BarNewComponent], templateUrl: "./profile.component.html", styleUrl: "./profile.component.scss", }) diff --git a/projects/skills/src/app/profile/shared/info-block/info-block.component.html b/projects/skills/src/app/profile/shared/info-block/info-block.component.html index 86bddefb7..0cef2c8a4 100644 --- a/projects/skills/src/app/profile/shared/info-block/info-block.component.html +++ b/projects/skills/src/app/profile/shared/info-block/info-block.component.html @@ -41,8 +41,8 @@

    {{ userData.firstName }} {{ userData.lastName }}

    {{ userData.points }} {{ userData.points | pluralize: ["балл", "балла", "баллов"] }} - Вернуться на procollab.ruвернуться на procollab.ru diff --git a/projects/skills/src/app/shared/task-card/task-card.component.html b/projects/skills/src/app/shared/task-card/task-card.component.html index d56ad592d..4b5ed00e4 100644 --- a/projects/skills/src/app/shared/task-card/task-card.component.html +++ b/projects/skills/src/app/shared/task-card/task-card.component.html @@ -15,7 +15,7 @@

    {{ task.name }}

    @if (!status?.isDone) { - + } @else { diff --git a/projects/skills/src/app/task/subtask/subtask.component.html b/projects/skills/src/app/task/subtask/subtask.component.html index e21b147a6..f30dd70e7 100644 --- a/projects/skills/src/app/task/subtask/subtask.component.html +++ b/projects/skills/src/app/task/subtask/subtask.component.html @@ -38,7 +38,7 @@ } } Продолжитьпродолжить wave
    @@ -75,7 +75,7 @@ } } Продолжитьпродолжить wave @@ -122,7 +122,7 @@ } } Продолжитьпродолжить wave @@ -169,7 +169,7 @@ } } Продолжитьпродолжить wave @@ -216,7 +216,7 @@ } } Продолжитьпродолжить wave @@ -226,13 +226,15 @@ }
    + продолжить +
    - Вышла неточность... +

    вышла неточность...

    +
    - Всё верно! Так держать +

    всё верно! так держать

    - Продолжить
    } diff --git a/projects/skills/src/app/task/subtask/subtask.component.scss b/projects/skills/src/app/task/subtask/subtask.component.scss index 89c9bb739..3de61dbdb 100644 --- a/projects/skills/src/app/task/subtask/subtask.component.scss +++ b/projects/skills/src/app/task/subtask/subtask.component.scss @@ -16,6 +16,7 @@ .action { position: relative; + margin-top: 20px; &__button { position: relative; @@ -30,12 +31,15 @@ left: 0; display: flex; justify-content: center; - padding: 15px 10px 0; + padding: 12px 12px 35px 12px; border-radius: var(--rounded-xl); transition: all 0.2s; transform: translateY(0%); + display: none; + text-align: center; &--open { + display: block; transform: translateY(-80%); } } diff --git a/projects/skills/src/styles/_colors.scss b/projects/skills/src/styles/_colors.scss index 4e52a6ba6..7f152d421 100644 --- a/projects/skills/src/styles/_colors.scss +++ b/projects/skills/src/styles/_colors.scss @@ -17,6 +17,7 @@ // GRAY --white: #fafafa; + --light-white: #ffffff; --black: #333; --dark-grey: #e7e7e7; --gray: #d3d3d3; @@ -27,9 +28,9 @@ --grey-for-text: #a59fb9; // FUNCTIONAL - --green: #88c9a1; - --light-green: #97ecb8; - --red: #d48a9e; + --green: #92E3A9; + --light-green: #E3F8E9; + --red: rgba(242, 66, 72, 0.5); + --light-red: #FFD2D2; --red-dark: #{color.adjust(#d48a9e, $blackness: 10%)}; - --light-red: #e8a5b7; } diff --git a/projects/skills/src/styles/_rounded.scss b/projects/skills/src/styles/_rounded.scss index 1ea5819a8..b2602fac5 100644 --- a/projects/skills/src/styles/_rounded.scss +++ b/projects/skills/src/styles/_rounded.scss @@ -5,4 +5,5 @@ --rounded-md: 5px; --rounded-lg: 8px; --rounded-xl: 15px; + --rounded-xxl: 45px; } diff --git a/projects/social_platform/src/app/office/features/info-card/info-card.component.html b/projects/social_platform/src/app/office/features/info-card/info-card.component.html index 27884d4b2..787c6607b 100644 --- a/projects/social_platform/src/app/office/features/info-card/info-card.component.html +++ b/projects/social_platform/src/app/office/features/info-card/info-card.component.html @@ -77,7 +77,7 @@ - @if (type === 'projects') { @if (info.name) { @if(info.name.length > 12) { + @if (type === 'projects' || type === 'invite') { @if (info.name) { @if(info.name.length > 12) {

    {{ info.name.slice(0, 12) }}...

    } @else {

    {{ info.name }}

    @@ -138,7 +138,7 @@ проект - @if (info.partnerProgramId) { + @if (info.partnerProgram) {
    -

    проект привязан к программе

    +

    проект привязан к программе {{ info.partnerProgram.name }}

    } } diff --git a/projects/social_platform/src/app/office/features/info-card/info-card.component.scss b/projects/social_platform/src/app/office/features/info-card/info-card.component.scss index 9bb411c62..fa065a8b7 100644 --- a/projects/social_platform/src/app/office/features/info-card/info-card.component.scss +++ b/projects/social_platform/src/app/office/features/info-card/info-card.component.scss @@ -59,7 +59,7 @@ &--project-partner { position: absolute; - top: 67%; + top: 63%; left: 30%; padding: 3px 5px; border: 0.5px solid var(--medium-grey-for-outline); @@ -152,6 +152,14 @@ } } + &__invite-actions { + display: flex; + flex-direction: column; + gap: 3px; + align-items: center; + justify-content: center; + } + &__user { margin-bottom: 2px; color: var(--grey-for-text); diff --git a/projects/social_platform/src/app/office/feed/models/feed-item.model.ts b/projects/social_platform/src/app/office/feed/models/feed-item.model.ts index 0c1af9bc8..14dd6cbeb 100644 --- a/projects/social_platform/src/app/office/feed/models/feed-item.model.ts +++ b/projects/social_platform/src/app/office/feed/models/feed-item.model.ts @@ -2,6 +2,7 @@ import { FeedNews } from "@office/projects/models/project-news.model"; import { Vacancy } from "@models/vacancy.model"; +import { Program } from "@office/program/models/program.model"; /** * МОДЕЛИ ДАННЫХ ДЛЯ ЭЛЕМЕНТОВ ЛЕНТЫ @@ -36,6 +37,10 @@ export interface FeedProject { imageAddress: string; viewsCount: number; leader: number; + partnerProgram: { + id: Program["id"]; + name: Program["name"]; + } | null; } /** diff --git a/projects/social_platform/src/app/office/models/project.model.ts b/projects/social_platform/src/app/office/models/project.model.ts index eead36f68..0fe689d4f 100644 --- a/projects/social_platform/src/app/office/models/project.model.ts +++ b/projects/social_platform/src/app/office/models/project.model.ts @@ -58,7 +58,6 @@ export class Project { leader!: number; leaderInfo?: { firstName: string; lastName: string }; partnerProgramsTags?: string[]; - partnerProgramId!: number | null; partnerProgram!: PartnerProgramInfo | null; vacancies!: Vacancy[]; isCompany!: boolean; @@ -83,7 +82,6 @@ export class Project { industry: 0, viewsCount: 0, links: [], - partnerProgramId: null, partnerProgram: null, cover: null, coverImageAddress: null, diff --git a/projects/social_platform/src/app/office/office.component.html b/projects/social_platform/src/app/office/office.component.html index 9fd78ca19..8d0c98b96 100644 --- a/projects/social_platform/src/app/office/office.component.html +++ b/projects/social_platform/src/app/office/office.component.html @@ -18,6 +18,7 @@ class="office__sidebar" logoSrc="/assets/images/shared/logo.svg" [navItems]="navItems" + style="align-self: flex-start" >

    Платформа создана компанией ООО «Молодежный форсайт»

    diff --git a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html index d39967ea9..49068310e 100644 --- a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html +++ b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html @@ -4,7 +4,7 @@
    @if (partnerProgramFields.length) { @for (field of partnerProgramFields; track field.id) { - +
    @switch (field.fieldType) { @case ("text") { @if (additionalForm.get(field.name); as control) { diff --git a/projects/social_platform/src/app/office/projects/projects.component.html b/projects/social_platform/src/app/office/projects/projects.component.html index bba538ea1..ede266c82 100644 --- a/projects/social_platform/src/app/office/projects/projects.component.html +++ b/projects/social_platform/src/app/office/projects/projects.component.html @@ -74,8 +74,8 @@
      @for (invite of myInvites; track invite.id) { diff --git a/projects/social_platform/src/app/office/projects/projects.component.ts b/projects/social_platform/src/app/office/projects/projects.component.ts index 695b53239..7243d9616 100644 --- a/projects/social_platform/src/app/office/projects/projects.component.ts +++ b/projects/social_platform/src/app/office/projects/projects.component.ts @@ -67,6 +67,7 @@ export class ProjectsComponent implements OnInit, OnDestroy { this.route.data.pipe(map(r => r["data"])).subscribe({ next: invites => { + this.allInvites = inviteToProjectMapper(invites); this.myInvites = inviteToProjectMapper(invites.slice(0, 1)); }, }); @@ -102,8 +103,7 @@ export class ProjectsComponent implements OnInit, OnDestroy { searchForm: FormGroup; myInvites: Project[] = []; - - subscriptions$: Subscription[] = []; + private allInvites: Project[] = []; isMy = location.href.includes("/my"); isAll = location.href.includes("/all"); @@ -113,6 +113,8 @@ export class ProjectsComponent implements OnInit, OnDestroy { isFilterOpen = false; + subscriptions$: Subscription[] = []; + private swipeStartY = 0; private swipeThreshold = 50; private isSwiping = false; @@ -151,8 +153,10 @@ export class ProjectsComponent implements OnInit, OnDestroy { this.renderer.setStyle(this.filterBody.nativeElement, "transform", "translateY(0)"); } - acceptOrRejectInvite(): void { - this.myInvites = []; + acceptOrRejectInvite(inviteId: number): void { + this.allInvites = this.allInvites.filter(invite => invite.inviteId !== inviteId); + + this.myInvites = this.allInvites.slice(0, 1); } closeFilter(): void { diff --git a/projects/social_platform/src/app/ui/components/bar/bar.component.scss b/projects/social_platform/src/app/ui/components/bar/bar.component.scss index e2b4c3190..15a85c9fb 100644 --- a/projects/social_platform/src/app/ui/components/bar/bar.component.scss +++ b/projects/social_platform/src/app/ui/components/bar/bar.component.scss @@ -79,4 +79,8 @@ } } } + + &__back { + margin-top: 45px; + } } From b52d882419369bf8ecd0aa647f84c375d3c5d708 Mon Sep 17 00:00:00 2001 From: Awakich Date: Wed, 5 Nov 2025 18:58:40 +0300 Subject: [PATCH 03/12] add styles for tasks, colors in skills-app --- .../skills/src/app/task/subtask/subtask.component.scss | 6 +++--- projects/skills/src/styles/_colors.scss | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/skills/src/app/task/subtask/subtask.component.scss b/projects/skills/src/app/task/subtask/subtask.component.scss index 3de61dbdb..efbd9d8cb 100644 --- a/projects/skills/src/app/task/subtask/subtask.component.scss +++ b/projects/skills/src/app/task/subtask/subtask.component.scss @@ -30,13 +30,13 @@ bottom: 0; left: 0; display: flex; + display: none; justify-content: center; - padding: 12px 12px 35px 12px; + padding: 12px 12px 35px; + text-align: center; border-radius: var(--rounded-xl); transition: all 0.2s; transform: translateY(0%); - display: none; - text-align: center; &--open { display: block; diff --git a/projects/skills/src/styles/_colors.scss b/projects/skills/src/styles/_colors.scss index 7f152d421..c30eec8b2 100644 --- a/projects/skills/src/styles/_colors.scss +++ b/projects/skills/src/styles/_colors.scss @@ -17,7 +17,7 @@ // GRAY --white: #fafafa; - --light-white: #ffffff; + --light-white: #fff; --black: #333; --dark-grey: #e7e7e7; --gray: #d3d3d3; @@ -28,9 +28,9 @@ --grey-for-text: #a59fb9; // FUNCTIONAL - --green: #92E3A9; - --light-green: #E3F8E9; - --red: rgba(242, 66, 72, 0.5); - --light-red: #FFD2D2; + --green: #92e3a9; + --light-green: #e3f8e9; + --red: rgb(242 66 72 / 50%); + --light-red: #ffd2d2; --red-dark: #{color.adjust(#d48a9e, $blackness: 10%)}; } From 17d60557f65c550e1e11687b5257144abf296ab3 Mon Sep 17 00:00:00 2001 From: Awakich Date: Thu, 6 Nov 2025 13:49:09 +0300 Subject: [PATCH 04/12] fix invites service, add filter in programs all page & fix programs service, & add phone_number mask in profile edit --- .../office/profile/edit/edit.component.html | 1 + .../app/office/profile/edit/edit.component.ts | 12 ++- .../app/office/program/main/main.component.ts | 88 ++++++++++++++----- .../program/services/program.service.ts | 25 ++++-- .../src/app/office/services/invite.service.ts | 13 +-- .../ui/components/input/input.component.scss | 2 +- 6 files changed, 99 insertions(+), 42 deletions(-) diff --git a/projects/social_platform/src/app/office/profile/edit/edit.component.html b/projects/social_platform/src/app/office/profile/edit/edit.component.html index 074551209..230c6d60e 100644 --- a/projects/social_platform/src/app/office/profile/edit/edit.component.html +++ b/projects/social_platform/src/app/office/profile/edit/edit.component.html @@ -323,6 +323,7 @@

      редактирование профиля

      { @@ -1065,7 +1069,7 @@ export class ProfileEditComponent implements OnInit, OnDestroy, AfterViewInit { } }); - const mainFieldsValid = ["firstName", "lastName", "birthday", "speciality"].every( + const mainFieldsValid = ["firstName", "lastName", "birthday", "speciality", "city"].every( name => this.profileForm.get(name)?.valid ); diff --git a/projects/social_platform/src/app/office/program/main/main.component.ts b/projects/social_platform/src/app/office/program/main/main.component.ts index 5f479ff4e..7d14e73d3 100644 --- a/projects/social_platform/src/app/office/program/main/main.component.ts +++ b/projects/social_platform/src/app/office/program/main/main.component.ts @@ -1,8 +1,16 @@ /** @format */ -import { Component, OnDestroy, OnInit, signal } from "@angular/core"; -import { ActivatedRoute, RouterLink } from "@angular/router"; -import { map, Subscription } from "rxjs"; +import { ChangeDetectorRef, Component, inject, OnDestroy, OnInit, signal } from "@angular/core"; +import { ActivatedRoute, Params, Router, RouterLink } from "@angular/router"; +import { + combineLatest, + concatMap, + distinctUntilChanged, + map, + of, + Subscription, + switchMap, +} from "rxjs"; import { Program } from "@office/program/models/program.model"; import { NavService } from "@office/services/nav.service"; import Fuse from "fuse.js"; @@ -10,6 +18,8 @@ import { CheckboxComponent, SelectComponent } from "@ui/components"; import { generateOptionsList } from "@utils/generate-options-list"; import { ClickOutsideModule } from "ng-click-outside"; import { ProgramCardComponent } from "../shared/program-card/program-card.component"; +import { HttpParams } from "@angular/common/http"; +import { ProgramService } from "../services/program.service"; /** * Главный компонент списка программ @@ -59,13 +69,18 @@ import { ProgramCardComponent } from "../shared/program-card/program-card.compon ], }) export class ProgramMainComponent implements OnInit, OnDestroy { - constructor(private readonly route: ActivatedRoute, private readonly navService: NavService) {} + private readonly navService = inject(NavService); + private readonly route = inject(ActivatedRoute); + private readonly router = inject(Router); + private readonly programService = inject(ProgramService); + private readonly cdref = inject(ChangeDetectorRef); programCount = 0; programs: Program[] = []; searchedPrograms: Program[] = []; subscriptions$: Subscription[] = []; + isPparticipating = signal(false); readonly programOptionsFilter = generateOptionsList(4, "strings", [ "все", @@ -77,32 +92,65 @@ export class ProgramMainComponent implements OnInit, OnDestroy { ngOnInit(): void { this.navService.setNavTitle("Программы"); - const querySearch$ = this.route.queryParams.pipe(map(q => q["search"])).subscribe(search => { - const fuse = new Fuse(this.programs, { - keys: ["name"], - }); + const combined$ = combineLatest([ + this.route.queryParams.pipe( + map(q => ({ filter: this.buildFilterQuery(q), search: q["search"] || "" })), + distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)) + ), + ]) + .pipe( + switchMap(([{ filter, search }]) => { + this.isPparticipating.set(filter["participating"] === "true"); - this.searchedPrograms = search ? fuse.search(search).map(el => el.item) : this.programs; - }); + return this.programService + .getAll(0, 20, new HttpParams({ fromObject: filter })) + .pipe(map(response => ({ response, search }))); + }) + ) + .subscribe(({ response, search }) => { + this.programCount = response.count; + this.programs = response.results ?? []; - querySearch$ && this.subscriptions$.push(querySearch$); + if (search) { + const fuse = new Fuse(this.programs, { + keys: ["name"], + threshold: 0.3, + }); + this.searchedPrograms = fuse.search(search).map(el => el.item); + } else { + this.searchedPrograms = this.programs; + } - const programs$ = this.route.data.pipe(map(r => r["data"])).subscribe(programs => { - this.programCount = programs.count; - this.programs = programs.results ?? []; - this.searchedPrograms = programs.results ?? []; - }); + this.cdref.detectChanges(); + }); - programs$ && this.subscriptions$.push(programs$); + this.subscriptions$.push(combined$); } - isPparticipating = signal(false); + private buildFilterQuery(q: Params): Record { + const reqQuery: Record = {}; + + if (q["participating"]) { + reqQuery["participating"] = q["participating"]; + } + + return reqQuery; + } /** - * Переключает состояние чекбокса + * Переключает состояние чекбокса "участвую" */ onTogglePparticipating(): void { - this.isPparticipating.set(!this.isPparticipating()); + const newValue = !this.isPparticipating(); + this.isPparticipating.set(newValue); + + this.router.navigate([], { + queryParams: { + participating: newValue ? "true" : null, + }, + relativeTo: this.route, + queryParamsHandling: "merge", + }); } ngOnDestroy(): void { diff --git a/projects/social_platform/src/app/office/program/services/program.service.ts b/projects/social_platform/src/app/office/program/services/program.service.ts index ce11970d7..f5e79ed12 100644 --- a/projects/social_platform/src/app/office/program/services/program.service.ts +++ b/projects/social_platform/src/app/office/program/services/program.service.ts @@ -2,10 +2,10 @@ import { Injectable } from "@angular/core"; import { ApiService } from "projects/core"; -import { BehaviorSubject, map, Observable, tap } from "rxjs"; +import { map, Observable } from "rxjs"; import { HttpParams } from "@angular/common/http"; import { ProgramCreate } from "@office/program/models/program-create.model"; -import { Program, ProgramDataSchema, ProgramTag } from "@office/program/models/program.model"; +import { Program, ProgramDataSchema } from "@office/program/models/program.model"; import { Project } from "@models/project.model"; import { ApiPagination } from "@models/api-pagination.model"; import { User } from "@auth/models/user.model"; @@ -49,11 +49,22 @@ export class ProgramService { constructor(private readonly apiService: ApiService) {} - getAll(skip: number, take: number): Observable> { - return this.apiService.get( - `${this.PROGRAMS_URL}/`, - new HttpParams({ fromObject: { limit: take, offset: skip } }) - ); + getAll(skip: number, take: number, params?: HttpParams): Observable> { + let httpParams = new HttpParams(); + + httpParams.set("limit", take); + httpParams.set("offset", skip); + + if (params) { + params.keys().forEach(key => { + const value = params.get(key); + if (value !== null) { + httpParams = httpParams.set(key, value); + } + }); + } + + return this.apiService.get(`${this.PROGRAMS_URL}/`, httpParams); } getOne(programId: number): Observable { diff --git a/projects/social_platform/src/app/office/services/invite.service.ts b/projects/social_platform/src/app/office/services/invite.service.ts index 18cecee3a..787186781 100644 --- a/projects/social_platform/src/app/office/services/invite.service.ts +++ b/projects/social_platform/src/app/office/services/invite.service.ts @@ -99,16 +99,9 @@ export class InviteService { * @returns Observable - массив приглашений, адресованных текущему пользователю */ getMy(): Observable { - return this.authService.profile.pipe( - take(1), - concatMap(profile => - this.apiService.get( - `${this.INVITES_URL}/`, - new HttpParams({ fromObject: { user_id: profile.id } }) - ) - ), - map(invites => plainToInstance(Invite, invites)) - ); + return this.apiService + .get(`${this.INVITES_URL}/`) + .pipe(map(invites => plainToInstance(Invite, invites))); } /** diff --git a/projects/social_platform/src/app/ui/components/input/input.component.scss b/projects/social_platform/src/app/ui/components/input/input.component.scss index c970ca070..7a8fd0951 100644 --- a/projects/social_platform/src/app/ui/components/input/input.component.scss +++ b/projects/social_platform/src/app/ui/components/input/input.component.scss @@ -47,7 +47,7 @@ } &--error { - border-color: var(--red); + border: 0.5px solid var(--red); } @include typography.body-10; From a148198af9a9b9d17e416573651cd0d54f663ed5 Mon Sep 17 00:00:00 2001 From: Awakich Date: Fri, 7 Nov 2025 13:40:20 +0300 Subject: [PATCH 05/12] fix rating-card redoRating & additoinal step info if no additional fields --- .../features/detail/detail.component.ts | 2 +- .../rating-card/rating-card.component.html | 43 +++++++++++++------ .../rating-card/rating-card.component.scss | 8 ++++ .../rating-card/rating-card.component.ts | 39 ++++++++++++++--- .../office/projects/edit/edit.component.html | 1 + .../office/projects/edit/edit.component.ts | 2 + .../project-additional-step.component.html | 11 ++++- .../project-additional-step.component.scss | 2 +- .../project-additional-step.component.ts | 2 + 9 files changed, 87 insertions(+), 23 deletions(-) diff --git a/projects/social_platform/src/app/office/features/detail/detail.component.ts b/projects/social_platform/src/app/office/features/detail/detail.component.ts index b7b8f25d8..d274a2e55 100644 --- a/projects/social_platform/src/app/office/features/detail/detail.component.ts +++ b/projects/social_platform/src/app/office/features/detail/detail.component.ts @@ -152,7 +152,7 @@ export class DeatilComponent implements OnInit, OnDestroy { get isUserExpert() { const type = this.userType(); - return type !== undefined && type !== 1; + return type !== undefined && type === 3; } // Методы для управления состоянием ошибок через сервис diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html index 30a866191..06f344870 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html @@ -79,15 +79,21 @@ size="big" [loader]="submitLoading() || confirmLoading()" [color]="showRatedWithEdit ? 'green' : 'primary'" - [disabled]="showConfirmedState" - [appearance]="showConfirmedState ? 'outline' : 'inline'" + [disabled]="programDateFinished()" + [appearance]="programDateFinished() ? 'outline' : 'inline'" [style.opacity]="showConfirmedState ? '0.5' : '1'" (click)="showRatingForm ? confirmRateProject() : null" > - {{ showRatingForm ? "оценить проект" : "проект оценен" }} + {{ + programDateFinished() + ? "проект оценен" + : showRatingForm + ? "оценить проект" + : "проект оценен" + }} - @if (showRatedWithEdit) { + @if (showRatedWithEdit && !programDateFinished()) {
    - - подтверждаю - +
    + + подтверждаю + + + + исправить оценку + +
    diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss index 3a5755d5e..bd130c2fc 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss @@ -191,4 +191,12 @@ color: var(--dark-grey); text-align: center; } + + &__buttons { + display: flex; + flex-direction: column; + gap: 10px; + align-items: center; + justify-content: center; + } } diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts index 58f936dfe..9b4cd0275 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts @@ -19,7 +19,16 @@ import { CommonModule } from "@angular/common"; import { ProjectRate } from "@office/program/models/project-rate"; import { ControlErrorPipe, ParseBreaksPipe, ParseLinksPipe } from "projects/core"; import { expandElement } from "@utils/expand-element"; -import { debounceTime, finalize, fromEvent, map, Observable, Subscription } from "rxjs"; +import { + debounceTime, + filter, + finalize, + fromEvent, + map, + Observable, + Subscription, + tap, +} from "rxjs"; import { BreakpointObserver } from "@angular/cdk/layout"; import { IndustryService } from "@office/services/industry.service"; import { ProjectRatingComponent } from "@office/features/project-rating/project-rating.component"; @@ -28,6 +37,7 @@ import { ProjectRatingService } from "@office/program/services/project-rating.se import { RouterLink } from "@angular/router"; import { TagComponent } from "@ui/components/tag/tag.component"; import { ModalComponent } from "@ui/components/modal/modal.component"; +import { ProgramDataService } from "@office/program/services/program-data.service"; /** * Компонент карточки оценки проекта @@ -92,6 +102,7 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { constructor( public industryService: IndustryService, private projectRatingService: ProjectRatingService, + private readonly programDataService: ProgramDataService, private breakpointObserver: BreakpointObserver, private cdRef: ChangeDetectorRef ) {} @@ -128,6 +139,8 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { isProjectCriterias = signal(0); + programDateFinished = signal(false); + desktopMode$: Observable = this.breakpointObserver .observe("(min-width: 920px)") .pipe(map(result => result.matches)); @@ -140,6 +153,19 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { this.projectConfirmed.set(isScored); this.projectRated.set(isScored); } + + const program$ = this.programDataService.program$ + .pipe( + filter(program => !!program), + tap(program => { + if (program && program.datetimeFinished) { + this.programDateFinished.set(Date.now() > Date.parse(program.datetimeFinished)); + } + }) + ) + .subscribe(); + + this.subscriptions$().push(program$); } ngAfterViewInit(): void { @@ -198,13 +224,12 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { } redoRating(): void { - if (!this.projectConfirmed()) { - this.projectRated.set(false); - } + this.projectRated.set(false); + this.projectConfirmed.set(false); } get canEdit(): boolean { - return !this.projectConfirmed(); + return !this.programDateFinished(); } get showRatingForm(): boolean { @@ -212,10 +237,10 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { } get showRatedWithEdit(): boolean { - return this.projectRated() && !this.projectConfirmed(); + return (this.projectRated() || this.projectConfirmed()) && this.canEdit; } get showConfirmedState(): boolean { - return this.projectConfirmed(); + return this.projectConfirmed() && !this.canEdit; } } diff --git a/projects/social_platform/src/app/office/projects/edit/edit.component.html b/projects/social_platform/src/app/office/projects/edit/edit.component.html index 7fe9a7a38..7d93b91ef 100644 --- a/projects/social_platform/src/app/office/projects/edit/edit.component.html +++ b/projects/social_platform/src/app/office/projects/edit/edit.component.html @@ -76,6 +76,7 @@

    редактировать проект

    } diff --git a/projects/social_platform/src/app/office/projects/edit/edit.component.ts b/projects/social_platform/src/app/office/projects/edit/edit.component.ts index f6e1ac806..82a33c29d 100644 --- a/projects/social_platform/src/app/office/projects/edit/edit.component.ts +++ b/projects/social_platform/src/app/office/projects/edit/edit.component.ts @@ -214,6 +214,7 @@ export class ProjectEditComponent implements OnInit, AfterViewInit, OnDestroy { // Маркер того является ли проект привязанный к конкурсной программе isCompetitive = false; + isProjectAssignToProgram = false; // Маркер что проект привязан isProjectBoundToProgram = false; @@ -660,6 +661,7 @@ export class ProjectEditComponent implements OnInit, AfterViewInit, OnDestroy { if (project.partnerProgram) { this.isCompetitive = project.partnerProgram.canSubmit; + this.isProjectAssignToProgram = !!project.partnerProgram.programId; this.projectAdditionalService.initializeAdditionalForm( project.partnerProgram?.programFields, diff --git a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html index 49068310e..aefe48a85 100644 --- a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html +++ b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.html @@ -92,7 +92,14 @@ } } - } } @else { + } } @else { @if (isProjectAssignToProgram) { +
    +

    + проект привязан к программе, но дополнительных полей для заполнения нет +

    + +
    + } @else {

    пока ты не участвуешь ни в одной программе

    @@ -112,7 +119,7 @@
    - } + } } diff --git a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.scss b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.scss index 6092cd72f..66a80cc31 100644 --- a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.scss +++ b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.scss @@ -95,7 +95,7 @@ } @include responsive.apply-desktop { - width: 60%; + width: 70%; ::ng-deep { app-input { diff --git a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.ts b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.ts index aba9d8d48..e4e0486a3 100644 --- a/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.ts +++ b/projects/social_platform/src/app/office/projects/edit/shared/project-additional-step/project-additional-step.component.ts @@ -47,6 +47,8 @@ export class ProjectAdditionalStepComponent implements OnInit { readonly errorMessage = ErrorMessage; + @Input() isProjectAssignToProgram?: boolean; + ngOnInit(): void { // Инициализация уже должна быть выполнена в родительском компоненте this.cdRef.detectChanges(); From d13d87c60060c02c9f422e14097056b55715036b Mon Sep 17 00:00:00 2001 From: Awakich Date: Fri, 7 Nov 2025 15:48:07 +0300 Subject: [PATCH 06/12] add draft icon in info-card, & assigned button in program detail --- .../features/detail/detail.component.html | 13 +++++--- .../features/detail/detail.component.ts | 9 +++--- .../info-card/info-card.component.html | 30 +++++++++++++++---- .../info-card/info-card.component.scss | 1 + .../features/info-card/info-card.component.ts | 2 ++ 5 files changed, 41 insertions(+), 14 deletions(-) diff --git a/projects/social_platform/src/app/office/features/detail/detail.component.html b/projects/social_platform/src/app/office/features/detail/detail.component.html index d354d0abc..56e54c261 100644 --- a/projects/social_platform/src/app/office/features/detail/detail.component.html +++ b/projects/social_platform/src/app/office/features/detail/detail.component.html @@ -101,12 +101,13 @@ } } @if (isUserMember && !isUserManager && !isUserExpert) { - подать проект + {{ isProjectAssigned ? "вы подали проект" : "подать проект" }} } @if ((isUserManager || isUserExpert) && isUserMember) { @@ -235,7 +236,11 @@

    - {{ project.name }} + {{ + project.name.length > 20 + ? project.name.slice(0, 16) + "..." + : project.name + }}

    project.leader === this.profile?.id); + } + // Методы для управления состоянием ошибок через сервис setAssignProjectToProgramError(error: { non_field_errors: string[] }): void { this.projectAdditionalService.setAssignProjectToProgramError(error); @@ -414,6 +418,7 @@ export class DeatilComponent implements OnInit, OnDestroy { const profileDataSub$ = this.authService.profile.pipe(filter(user => !!user)).subscribe({ next: user => { this.userType.set(user!.userType); + this.profile = user; this.cdRef.detectChanges(); }, }); @@ -444,10 +449,6 @@ export class DeatilComponent implements OnInit, OnDestroy { this.isInProfileInfo(); - this.skillsProfileService.getSubscriptionData().subscribe(r => { - this.isSubscriptionActive.set(r.isSubscribed); - }); - this.subscriptions.push(profileDataSub$); } } diff --git a/projects/social_platform/src/app/office/features/info-card/info-card.component.html b/projects/social_platform/src/app/office/features/info-card/info-card.component.html index 787c6607b..825877664 100644 --- a/projects/social_platform/src/app/office/features/info-card/info-card.component.html +++ b/projects/social_platform/src/app/office/features/info-card/info-card.component.html @@ -129,6 +129,21 @@
    @if (type === 'projects') {
    + @if (info.partnerProgram || info.draft) { @if (info.partnerProgram && info.draft) { +
    + +
    + + @if (programProjectHovered) { +
    +

    проект привязан к программе {{ info.partnerProgram.name }}

    +
    + } } + - @if (info.partnerProgram) {
    - +
    - @if (programProjectHovered) { + @if (iconHovered) {
    -

    проект привязан к программе {{ info.partnerProgram.name }}

    +

    + @if (info.draft) { проект пока еще не опубликовали. } @else { проект привязан к программе + {{ info.partnerProgram.name }} + } +

    } }
    diff --git a/projects/social_platform/src/app/office/features/info-card/info-card.component.scss b/projects/social_platform/src/app/office/features/info-card/info-card.component.scss index fa065a8b7..cd0182d85 100644 --- a/projects/social_platform/src/app/office/features/info-card/info-card.component.scss +++ b/projects/social_platform/src/app/office/features/info-card/info-card.component.scss @@ -62,6 +62,7 @@ top: 63%; left: 30%; padding: 3px 5px; + background-color: var(--light-white); border: 0.5px solid var(--medium-grey-for-outline); border-radius: var(--rounded-lg); diff --git a/projects/social_platform/src/app/office/features/info-card/info-card.component.ts b/projects/social_platform/src/app/office/features/info-card/info-card.component.ts index ce67d9a95..18b26462b 100644 --- a/projects/social_platform/src/app/office/features/info-card/info-card.component.ts +++ b/projects/social_platform/src/app/office/features/info-card/info-card.component.ts @@ -58,6 +58,8 @@ export class InfoCardComponent implements OnInit { haveBadge = this.calculateHaveBadge(); programProjectHovered = false; + iconHovered = false; + draftProjectHovered = false; ngOnInit(): void {} From c14a29e876a6fc30a7afc83253d10fce932970b0 Mon Sep 17 00:00:00 2001 From: Awakich Date: Fri, 7 Nov 2025 18:53:08 +0300 Subject: [PATCH 07/12] fix rate modal with project info & criterias --- .../project-rating.component.html | 35 ++++++++++++++++++- .../project-rating.component.scss | 2 +- .../project-rating.component.ts | 18 ++++++++++ .../rating-card/rating-card.component.html | 25 ++++++++++--- .../rating-card/rating-card.component.scss | 19 ++++++---- 5 files changed, 85 insertions(+), 14 deletions(-) diff --git a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html index 78cbe6da0..25e137101 100644 --- a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html +++ b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html @@ -29,6 +29,39 @@ placeholder="Небольшой комментарий, если необходимо" >
    - } } + } } +
    +
    + @for (criterion of criteria; track $index) { @if (criterion.type === "int") { +
    + + +
    + } @if (criterion.type === "bool") { +
    + + +
    + } } +
    +
    + @for (criterion of criteria; track $index) { @if (criterion.type === "str") { +
    + +
    + } } +
    +
    diff --git a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.scss b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.scss index 61443cced..732df24ce 100644 --- a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.scss +++ b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.scss @@ -35,7 +35,7 @@ app-textarea { ::ng-deep .field__input { min-height: 66px !important; - color: var(--dark-grey); + color: var(--grey-for-text) !important; background-color: transparent; border-color: var(--grey-button); diff --git a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.ts b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.ts index b7fb1ff1e..c47be1253 100644 --- a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.ts +++ b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.ts @@ -88,6 +88,20 @@ export class ProjectRatingComponent implements OnDestroy, ControlValueAccessor, return this._criteria(); } + @Input() + set disabled(value: boolean) { + this._disabled = value; + if (this.form) { + value ? this.form.disable() : this.form.enable(); + } + } + + get disabled(): boolean { + return this._disabled; + } + + private _disabled = false; + /** Сигнал для хранения критериев оценки */ _criteria = signal([]); @@ -183,6 +197,10 @@ export class ProjectRatingComponent implements OnDestroy, ControlValueAccessor, }); this.form = new FormGroup(formGroupControls); + + if (this.disabled) { + this.form.disable(); + } } /** diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html index 06f344870..a2aa7e218 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html @@ -63,7 +63,11 @@

    оценка проекта

    - + @if (form | controlError: "required"; as error) {
    {{ error }} @@ -114,7 +118,19 @@

    подтвердите оценку

    - + +
    + +

    {{ project.name }}

    +
    +
    + +
    +
    @@ -123,7 +139,6 @@ class="cancel__button" customTypographyClass="text-body-12" (click)="confirmRateProject()" - style="width: 100%" > подтверждаю @@ -131,11 +146,11 @@ - исправить оценку + изменить оценку
    diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss index bd130c2fc..fda8ed511 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss @@ -170,11 +170,6 @@ width: 350px; max-height: calc(100vh - 40px); - i { - padding: 36px 0; - color: var(--green); - } - &__top { display: flex; flex-direction: column; @@ -182,6 +177,17 @@ margin-bottom: 10px; } + &__project { + display: flex; + align-items: center; + gap: 8px; + margin: 20px 0px; + } + + &__criterias { + margin-bottom: 20px; + } + &__title { text-align: center; } @@ -194,8 +200,7 @@ &__buttons { display: flex; - flex-direction: column; - gap: 10px; + gap: 20px; align-items: center; justify-content: center; } From 6f14027509852b325f92bd6940fa06b1aa1e1340 Mon Sep 17 00:00:00 2001 From: Awakich Date: Fri, 7 Nov 2025 18:54:39 +0300 Subject: [PATCH 08/12] add styles for rate modal --- .../program/shared/rating-card/rating-card.component.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss index fda8ed511..5fe7d8abc 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.scss @@ -179,9 +179,9 @@ &__project { display: flex; - align-items: center; gap: 8px; - margin: 20px 0px; + align-items: center; + margin: 20px 0; } &__criterias { From 765d77a00df6ab6d9a23655703d8ed62e760a5f3 Mon Sep 17 00:00:00 2001 From: Awakich Date: Mon, 10 Nov 2025 10:35:31 +0300 Subject: [PATCH 09/12] fix rating of program by expert id --- .../app/office/program/models/project-rate.ts | 2 ++ .../rating-card/rating-card.component.ts | 26 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/projects/social_platform/src/app/office/program/models/project-rate.ts b/projects/social_platform/src/app/office/program/models/project-rate.ts index a679a43d1..733dcff57 100644 --- a/projects/social_platform/src/app/office/program/models/project-rate.ts +++ b/projects/social_platform/src/app/office/program/models/project-rate.ts @@ -20,6 +20,7 @@ import { ProjectRatingCriterion } from "./project-rating-criterion"; // Assuming * @param {number} industry - ID отрасли проекта * @param {ProjectRatingCriterion[]} criterias - Массив критериев для оценки * @param {boolean} isScored - Флаг, указывающий, оценен ли проект текущим пользователем + * @private {number | null} scoredExpertId - Флаг, что оценил */ export interface ProjectRate { id: number; @@ -33,4 +34,5 @@ export interface ProjectRate { industry: number; criterias: ProjectRatingCriterion[]; scored: boolean; + scoredExpertId: number | null; } diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts index 9b4cd0275..ef729eae2 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts @@ -38,6 +38,8 @@ import { RouterLink } from "@angular/router"; import { TagComponent } from "@ui/components/tag/tag.component"; import { ModalComponent } from "@ui/components/modal/modal.component"; import { ProgramDataService } from "@office/program/services/program-data.service"; +import { AuthService } from "@auth/services"; +import { User } from "@auth/models/user.model"; /** * Компонент карточки оценки проекта @@ -103,6 +105,7 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { public industryService: IndustryService, private projectRatingService: ProjectRatingService, private readonly programDataService: ProgramDataService, + private readonly authService: AuthService, private breakpointObserver: BreakpointObserver, private cdRef: ChangeDetectorRef ) {} @@ -122,6 +125,8 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { _currentIndex = signal(0); _projects = signal([]); + profile = signal(null); + form = new FormControl(); submitLoading = signal(false); @@ -166,6 +171,14 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { .subscribe(); this.subscriptions$().push(program$); + + const profileId$ = this.authService.profile.subscribe({ + next: profile => { + this.profile.set(profile); + }, + }); + + this.subscriptions$().push(profileId$); } ngAfterViewInit(): void { @@ -232,12 +245,23 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { return !this.programDateFinished(); } + get isCurrentUserExpert(): boolean { + const currentProfile = this.profile(); + const project = this.project; + + if (!currentProfile || !project) return false; + + return project.scored && project.scoredExpertId === currentProfile.id; + } + get showRatingForm(): boolean { return !this.projectRated() && this.canEdit; } get showRatedWithEdit(): boolean { - return (this.projectRated() || this.projectConfirmed()) && this.canEdit; + return ( + (this.projectRated() || this.projectConfirmed()) && this.canEdit && this.isCurrentUserExpert + ); } get showConfirmedState(): boolean { From 84778499754fc821c8fdd1ac66970e432ee531fb Mon Sep 17 00:00:00 2001 From: Awakich Date: Mon, 10 Nov 2025 17:24:03 +0300 Subject: [PATCH 10/12] fix edit button & expert ui --- .../project-rating.component.html | 35 +------------------ .../rating-card/rating-card.component.html | 10 +++--- .../rating-card/rating-card.component.ts | 31 +++++++++------- 3 files changed, 26 insertions(+), 50 deletions(-) diff --git a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html index 25e137101..78cbe6da0 100644 --- a/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html +++ b/projects/social_platform/src/app/office/features/project-rating/project-rating.component.html @@ -29,39 +29,6 @@ placeholder="Небольшой комментарий, если необходимо" >
    - } } -
    -
    - @for (criterion of criteria; track $index) { @if (criterion.type === "int") { -
    - - -
    - } @if (criterion.type === "bool") { -
    - - -
    - } } -
    -
    - @for (criterion of criteria; track $index) { @if (criterion.type === "str") { -
    - -
    - } } -
    -
    + } } diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html index a2aa7e218..468da9a4f 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.html @@ -75,18 +75,18 @@ } - @if (showRatingForm || showRatedWithEdit || showConfirmedState) { + @if (showRatingForm || showRatedStatus || showConfirmedState) {
    {{ programDateFinished() @@ -97,7 +97,7 @@ }} - @if (showRatedWithEdit && !programDateFinished()) { + @if (showEditButton) {
    + @if (showConfirmRateModal()) { + }
    diff --git a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts index ef729eae2..f89eaa0d3 100644 --- a/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts +++ b/projects/social_platform/src/app/office/program/shared/rating-card/rating-card.component.ts @@ -142,6 +142,8 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { showConfirmRateModal = signal(false); + locallyRatedByCurrentUser = signal(false); + isProjectCriterias = signal(0); programDateFinished = signal(false); @@ -225,13 +227,10 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { .pipe(finalize(() => this.submitLoading.set(false))) .subscribe({ next: () => { - if (this.showConfirmRateModal()) { - this.projectConfirmed.set(true); - this.showConfirmRateModal.set(false); - } else { - this.projectRated.set(true); - this.showConfirmRateModal.set(true); - } + this.locallyRatedByCurrentUser.set(true); + this.projectRated.set(true); + this.projectConfirmed.set(true); + this.showConfirmRateModal.set(false); }, }); } @@ -239,6 +238,7 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { redoRating(): void { this.projectRated.set(false); this.projectConfirmed.set(false); + this.locallyRatedByCurrentUser.set(false); } get canEdit(): boolean { @@ -251,17 +251,24 @@ export class RatingCardComponent implements OnInit, AfterViewInit, OnDestroy { if (!currentProfile || !project) return false; - return project.scored && project.scoredExpertId === currentProfile.id; + const isExpertFromBackend = + !!project.scoredExpertId && project.scoredExpertId === currentProfile.id; + + const isExpertLocally = this.locallyRatedByCurrentUser(); + + return isExpertFromBackend || isExpertLocally; } get showRatingForm(): boolean { return !this.projectRated() && this.canEdit; } - get showRatedWithEdit(): boolean { - return ( - (this.projectRated() || this.projectConfirmed()) && this.canEdit && this.isCurrentUserExpert - ); + get showRatedStatus(): boolean { + return this.projectRated() || this.projectConfirmed(); + } + + get showEditButton(): boolean { + return this.showRatedStatus && this.canEdit && this.isCurrentUserExpert; } get showConfirmedState(): boolean { From fec6a97a3ed025f1d2f7f55d720a6b61cb60b0b3 Mon Sep 17 00:00:00 2001 From: Awakich Date: Tue, 11 Nov 2025 00:08:50 +0300 Subject: [PATCH 11/12] add delete collaborator from project for leader --- .../info-card/info-card.component.html | 22 +++++++- .../features/info-card/info-card.component.ts | 11 ++-- .../detail/services/project-data.service.ts | 8 +++ .../projects/detail/team/team.component.html | 8 ++- .../projects/detail/team/team.component.ts | 50 +++++++++++++++++-- 5 files changed, 90 insertions(+), 9 deletions(-) diff --git a/projects/social_platform/src/app/office/features/info-card/info-card.component.html b/projects/social_platform/src/app/office/features/info-card/info-card.component.html index 825877664..63ceeefde 100644 --- a/projects/social_platform/src/app/office/features/info-card/info-card.component.html +++ b/projects/social_platform/src/app/office/features/info-card/info-card.component.html @@ -171,7 +171,25 @@
    } }
    - } @else if (type === 'members') { + } @else if (type === 'members') { @if (leaderId !== info?.userId) { +
    + выдать роль + удалить +
    + } @else { профиль - } @else { + } } @else {
    (); @Output() onRejectingInvite = new EventEmitter(); @Output() onCreate = new EventEmitter(); + @Output() onRemoveCollaborator = new EventEmitter(); // Состояние компонента isUnsubscribeModalOpen = false; @@ -61,7 +64,9 @@ export class InfoCardComponent implements OnInit { iconHovered = false; draftProjectHovered = false; - ngOnInit(): void {} + removeCollaboratorFromProject(userId: number): void { + this.onRemoveCollaborator.emit(userId); + } /** * Определяет, нужно ли показывать информацию о проекте diff --git a/projects/social_platform/src/app/office/projects/detail/services/project-data.service.ts b/projects/social_platform/src/app/office/projects/detail/services/project-data.service.ts index 8fa8d6701..94bd854bc 100644 --- a/projects/social_platform/src/app/office/projects/detail/services/project-data.service.ts +++ b/projects/social_platform/src/app/office/projects/detail/services/project-data.service.ts @@ -28,4 +28,12 @@ export class ProjectDataService { filter(vacancies => !!vacancies) ); } + + getProjectLeaderId() { + return this.project$.pipe(map(project => project?.leader)); + } + + getProjectId() { + return this.project$.pipe(map(project => project?.id)); + } } diff --git a/projects/social_platform/src/app/office/projects/detail/team/team.component.html b/projects/social_platform/src/app/office/projects/detail/team/team.component.html index a0ea62bda..63e2fc80e 100644 --- a/projects/social_platform/src/app/office/projects/detail/team/team.component.html +++ b/projects/social_platform/src/app/office/projects/detail/team/team.component.html @@ -3,7 +3,13 @@ @if(team) { @if (team.length) {
    @for (collaborator of team; track $index) { - + }
    } } diff --git a/projects/social_platform/src/app/office/projects/detail/team/team.component.ts b/projects/social_platform/src/app/office/projects/detail/team/team.component.ts index 7c8ce5784..896071959 100644 --- a/projects/social_platform/src/app/office/projects/detail/team/team.component.ts +++ b/projects/social_platform/src/app/office/projects/detail/team/team.component.ts @@ -1,12 +1,14 @@ /** @format */ import { CommonModule } from "@angular/common"; -import { Component, inject, OnDestroy, OnInit } from "@angular/core"; +import { Component, inject, OnDestroy, OnInit, signal } from "@angular/core"; import { IconComponent } from "@uilib"; import { ProjectDataService } from "../services/project-data.service"; import { InfoCardComponent } from "@office/features/info-card/info-card.component"; import { Subscription } from "rxjs"; import { Project } from "@office/models/project.model"; +import { ProjectService } from "@office/services/project.service"; +import { AuthService } from "@auth/services"; /** * Компонент страницы команды в деательной информации о проекте @@ -19,11 +21,15 @@ import { Project } from "@office/models/project.model"; standalone: true, }) export class ProjectTeamComponent implements OnInit, OnDestroy { - // сервис для работы с данными детальной информации проекта private readonly projectDataService = inject(ProjectDataService); + private readonly projectService = inject(ProjectService); + private readonly authService = inject(AuthService); // массив пользователей в команде team?: Project["collaborators"]; + projectId = signal(0); + loggedUserId = signal(0); + leaderId = signal(0); // массив подписок subscriptions: Subscription[] = []; @@ -37,10 +43,48 @@ export class ProjectTeamComponent implements OnInit, OnDestroy { }); teamSub$ && this.subscriptions.push(teamSub$); + + const projectId$ = this.projectDataService.getProjectId().subscribe({ + next: projectId => { + if (projectId) { + this.projectId.set(projectId); + } + }, + }); + + if (location.href.includes("/team")) { + const leaderId$ = this.projectDataService.getProjectLeaderId().subscribe({ + next: leaderId => { + if (leaderId) { + this.leaderId.set(leaderId); + } + }, + }); + + const currentProfileId$ = this.authService.profile.subscribe({ + next: profile => { + if (profile) { + this.loggedUserId.set(profile.id); + } + }, + }); + + this.subscriptions.push(leaderId$, currentProfileId$); + } + + this.subscriptions.push(projectId$); } ngOnDestroy(): void { - // отписка от поток, которые не нужны this.subscriptions.forEach($ => $.unsubscribe()); } + + removeCollaboratorFromProject(userId: number): void { + const index = this.team?.findIndex(p => p.userId === userId); + if (index !== -1) { + this.team?.splice(index!, 1); + } + + this.projectService.removeColloborator(this.projectId(), userId).subscribe(); + } } From 2b568593db28f431e48528a4066704ceea667290 Mon Sep 17 00:00:00 2001 From: Awakich Date: Tue, 11 Nov 2025 00:15:21 +0300 Subject: [PATCH 12/12] fix ui for leader in other projects --- .../src/app/office/features/info-card/info-card.component.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/social_platform/src/app/office/features/info-card/info-card.component.html b/projects/social_platform/src/app/office/features/info-card/info-card.component.html index 63ceeefde..3b9e44ad3 100644 --- a/projects/social_platform/src/app/office/features/info-card/info-card.component.html +++ b/projects/social_platform/src/app/office/features/info-card/info-card.component.html @@ -171,7 +171,8 @@
    } } - } @else if (type === 'members') { @if (leaderId !== info?.userId) { + } @else if (type === 'members') { @if (leaderId === loggedUserId && loggedUserId !== + info?.userId) {