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
2 changes: 1 addition & 1 deletion projects/core/src/consts/filters/feed-filter.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const feedFilter = [
{
id: 1,
name: "новости проектов",
value: "projects",
value: "project",
icon: "projects",
},
{
Expand Down
1 change: 1 addition & 0 deletions projects/skills/src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.app {
display: flex;
height: 100%;
padding: 20px;
background-color: var(--light-gray);

&__wrapper {
Expand Down
3 changes: 2 additions & 1 deletion projects/skills/src/app/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

/**
* Основной компонент профиля пользователя
Expand All @@ -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",
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ <h1 class="info__title">{{ userData.firstName }} {{ userData.lastName }}</h1>
{{ userData.points }} {{ userData.points | pluralize: ["балл", "балла", "баллов"] }}
</div>
<a href="https://app.procollab.ru/office" class="info__return">
<app-button customTypographyClass="text-body-14" size="big"
>Вернуться на procollab.ru</app-button
<app-button customTypographyClass="text-body-12" size="big"
>вернуться на procollab.ru</app-button
>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h4 class="task__title text-body-bold-18">{{ task.name }}</h4>
</div>
<div class="task__right">
@if (!status?.isDone) {
<app-button class="task__button">
<app-button class="task__button" customTypographyClass="text-body-12" type="icon">
<i appIcon icon="arrow-no-body" appSquare="20"></i>
</app-button>
} @else {
Expand Down
18 changes: 10 additions & 8 deletions projects/skills/src/app/task/subtask/subtask.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
} }

<app-button size="big" (click)="onCloseModal()" [color]="'primary'" style="width: 100%"
>Продолжить</app-button
>продолжить</app-button
>
<img alt="wave" src="assets/images/task/wave_cropped.svg" class="cancel__wave" />
</div>
Expand Down Expand Up @@ -75,7 +75,7 @@
} }

<app-button size="big" (click)="onCloseModal()" [color]="'primary'" style="width: 100%"
>Продолжить</app-button
>продолжить</app-button
>
<img alt="wave" src="assets/images/task/wave_cropped.svg" class="cancel__wave" />
</div>
Expand Down Expand Up @@ -122,7 +122,7 @@
} }

<app-button size="big" (click)="onCloseModal()" [color]="'primary'" style="width: 100%"
>Продолжить</app-button
>продолжить</app-button
>
<img alt="wave" src="assets/images/task/wave_cropped.svg" class="cancel__wave" />
</div>
Expand Down Expand Up @@ -169,7 +169,7 @@
} }

<app-button size="big" (click)="onCloseModal()" [color]="'primary'" style="width: 100%"
>Продолжить</app-button
>продолжить</app-button
>
<img alt="wave" src="assets/images/task/wave_cropped.svg" class="cancel__wave" />
</div>
Expand Down Expand Up @@ -216,7 +216,7 @@
} }

<app-button size="big" (click)="onCloseModal()" [color]="'primary'" style="width: 100%"
>Продолжить</app-button
>продолжить</app-button
>
<img alt="wave" src="assets/images/task/wave_cropped.svg" class="cancel__wave" />
</div>
Expand All @@ -226,13 +226,15 @@
}

<div class="action">
<app-button size="big" class="action__button" (click)="onNext()">продолжить</app-button>

<div class="action__error action__badge" [class.action__badge--open]="anyError()">
Вышла неточность...
<p class="text-body-12">вышла неточность...</p>
</div>

<div class="action__success action__badge" [class.action__badge--open]="success()">
Всё верно! Так держать
<p class="text-body-12">всё верно! так держать</p>
</div>
<app-button size="big" class="action__button" (click)="onNext()">Продолжить</app-button>
</div>
</div>
}
6 changes: 5 additions & 1 deletion projects/skills/src/app/task/subtask/subtask.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

.action {
position: relative;
margin-top: 20px;

&__button {
position: relative;
Expand All @@ -29,13 +30,16 @@
bottom: 0;
left: 0;
display: flex;
display: none;
justify-content: center;
padding: 15px 10px 0;
padding: 12px 12px 35px;
text-align: center;
border-radius: var(--rounded-xl);
transition: all 0.2s;
transform: translateY(0%);

&--open {
display: block;
transform: translateY(-80%);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ <h3 class="text-heading-3">{{ webinar.title }}</h3>
></p>
@if (descriptionExpandable) {
<div
class="read-more"
class="read-more text-body-10"
(click)="onExpandDescription(descEl, 'expanded', readFullDescription)"
>
{{ readFullDescription ? "Скрыть" : "Читать полностью" }}
{{ readFullDescription ? "скрыть" : "подробнее" }}
</div>
}
</div>
Expand Down
9 changes: 5 additions & 4 deletions projects/skills/src/styles/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

// GRAY
--white: #fafafa;
--light-white: #fff;
--black: #333;
--dark-grey: #e7e7e7;
--gray: #d3d3d3;
Expand All @@ -27,9 +28,9 @@
--grey-for-text: #a59fb9;

// FUNCTIONAL
--green: #88c9a1;
--light-green: #97ecb8;
--red: #d48a9e;
--green: #92e3a9;
--light-green: #e3f8e9;
--red: rgb(242 66 72 / 50%);
--light-red: #ffd2d2;
--red-dark: #{color.adjust(#d48a9e, $blackness: 10%)};
--light-red: #e8a5b7;
}
1 change: 1 addition & 0 deletions projects/skills/src/styles/_rounded.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
--rounded-md: 5px;
--rounded-lg: 8px;
--rounded-xl: 15px;
--rounded-xxl: 45px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@
} } @if (isUserMember && !isUserManager && !isUserExpert) {
<app-button
size="medium"
[style.opacity]="registerDateExpired ? '0.5' : '1'"
[disabled]="!!registerDateExpired"
[style.opacity]="registerDateExpired || isProjectAssigned ? '0.5' : '1'"
[disabled]="!!registerDateExpired || isProjectAssigned"
[appearance]="isProjectAssigned ? 'outline' : 'inline'"
(click)="toggleSubmitProjectModal()"
customTypographyClass="text-body-12 bar__add-project"
>
<span>подать проект</span>
<span>{{ isProjectAssigned ? "вы подали проект" : "подать проект" }}</span>
<i appIcon icon="plus" appSquare="10"></i>
</app-button>
} @if ((isUserManager || isUserExpert) && isUserMember) {
Expand Down Expand Up @@ -235,7 +236,11 @@
<div class="project__item--info">
<app-avatar [url]="project.imageAddress" [size]="40"></app-avatar>
<p class="text-body-12">
{{ project.name }}
{{
project.name.length > 20
? project.name.slice(0, 16) + "..."
: project.name
}}
</p>
</div>
<app-input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ export class DeatilComponent implements OnInit, OnDestroy {

get isUserExpert() {
const type = this.userType();
return type !== undefined && type !== 1;
return type !== undefined && type === 3;
}

get isProjectAssigned() {
return !!this.memberProjects.find(project => project.leader === this.profile?.id);
}

// Методы для управления состоянием ошибок через сервис
Expand Down Expand Up @@ -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();
},
});
Expand Down Expand Up @@ -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$);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</ng-template>

<ng-template #regularCardHeader>
@if (type === 'projects') { @if (info.name) { @if(info.name.length > 12) {
@if (type === 'projects' || type === 'invite') { @if (info.name) { @if(info.name.length > 12) {
<p class="text-body-12 card__name">{{ info.name.slice(0, 12) }}...</p>
} @else {
<p class="text-body-12 card__name">{{ info.name }}</p>
Expand Down Expand Up @@ -129,6 +129,21 @@
<div class="card__info">
@if (type === 'projects') {
<div class="card__info--program">
@if (info.partnerProgram || info.draft) { @if (info.partnerProgram && info.draft) {
<div
class="card__info--program-icon"
(mouseenter)="programProjectHovered = true"
(mouseleave)="programProjectHovered = false"
>
<i appIcon icon="program" appSquare="8"></i>
</div>

@if (programProjectHovered) {
<div class="card__info--project-partner">
<p class="text-body-6">проект привязан к программе {{ info.partnerProgram.name }}</p>
</div>
} }

<app-button
[routerLink]="'/office/projects/' + info?.id"
customTypographyClass="text-body-6"
Expand All @@ -138,22 +153,44 @@
проект
</app-button>

@if (info.partnerProgramId) {
<div
class="card__info--program-icon"
(mouseenter)="programProjectHovered = true"
(mouseleave)="programProjectHovered = false"
(mouseenter)="iconHovered = true"
(mouseleave)="iconHovered = false"
>
<i appIcon icon="program" appSquare="8"></i>
<i appIcon [icon]="info.draft ? 'box' : 'program'" appSquare="8"></i>
</div>

@if (programProjectHovered) {
@if (iconHovered) {
<div class="card__info--project-partner">
<p class="text-body-6">проект привязан к программе</p>
<p class="text-body-6">
@if (info.draft) { проект пока еще не опубликовали. } @else { проект привязан к программе
{{ info.partnerProgram.name }}
}
</p>
</div>
} }
</div>
} @else if (type === 'members') {
} @else if (type === 'members') { @if (leaderId === loggedUserId && loggedUserId !==
info?.userId) {
<div class="card__info--program">
<app-button
customTypographyClass="text-body-6"
size="extra-small"
[disabled]="true"
style="opacity: 0.5"
>выдать роль</app-button
>
<app-button
customTypographyClass="text-body-6"
size="extra-small"
color="red"
appearance="outline"
(click)="removeCollaboratorFromProject(info?.userId)"
>удалить</app-button
>
</div>
} @else {
<app-button
[routerLink]="'/office/profile/' + info?.userId"
customTypographyClass="text-body-6"
Expand All @@ -162,7 +199,7 @@
>
профиль
</app-button>
} @else {
} } @else {
<div class="card__invite-actions">
<app-button
(click)="onAcceptInvite($event, info?.inviteId!)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@

&--project-partner {
position: absolute;
top: 67%;
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);

Expand Down Expand Up @@ -152,6 +153,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);
Expand Down
Loading
Loading