From 322008e6d2e659777d1b06d20e5de5c7df65c54b Mon Sep 17 00:00:00 2001 From: Awakich Date: Thu, 20 Nov 2025 12:18:07 +0300 Subject: [PATCH 1/3] fix deadline field in project & design issues for program & feed --- .../auth/set-password/set-password.component.scss | 8 ++++++++ .../office/features/detail/detail.component.ts | 4 +++- .../features/info-card/info-card.component.html | 11 ++++++++++- .../shared/new-project/new-project.component.html | 4 +++- .../shared/new-project/new-project.component.scss | 3 +++ .../stage-zero/stage-zero.component.scss | 8 -------- .../app/office/profile/edit/edit.component.scss | 7 +++---- .../src/app/office/profile/edit/edit.component.ts | 10 +++++----- .../detail/register/register.component.html | 2 +- .../edit/services/project-form.service.ts | 8 ++++---- .../project-achievement-step.component.scss | 8 -------- .../project-achievement-step.component.ts | 2 -- .../project-additional-step.component.scss | 8 -------- .../project-main-step.component.html | 1 + .../project-main-step.component.scss | 8 -------- .../project-main-step.component.ts | 11 +---------- .../project-partner-resources-step.component.scss | 8 -------- .../project-team-step.component.scss | 8 -------- .../project-vacancy-step.component.scss | 8 -------- .../vacancies/detail/info/info.component.scss | 8 -------- .../shared/filter/vacancy-filter.component.html | 2 +- .../app/ui/components/input/input.component.ts | 15 +++++++-------- projects/social_platform/src/styles/_global.scss | 6 +++++- 23 files changed, 55 insertions(+), 103 deletions(-) diff --git a/projects/social_platform/src/app/auth/set-password/set-password.component.scss b/projects/social_platform/src/app/auth/set-password/set-password.component.scss index 31146576f..f007f8881 100644 --- a/projects/social_platform/src/app/auth/set-password/set-password.component.scss +++ b/projects/social_platform/src/app/auth/set-password/set-password.component.scss @@ -3,3 +3,11 @@ margin-bottom: 24px; } } + +.error { + color: var(--red) !important; + + i { + color: var(--red) !important; + } +} 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 961be05ce..28199868a 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 @@ -157,7 +157,9 @@ export class DeatilComponent implements OnInit, OnDestroy { } get isProjectAssigned() { - return !!this.memberProjects.find(project => project.leader === this.profile?.id); + return !!this.memberProjects.find( + project => project.leader === this.profile?.id && project.partnerProgram + ); } // Методы для управления состоянием ошибок через сервис 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 3b9e44ad3..1be60a295 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 @@ -169,7 +169,16 @@ }

- } } + } } @else { + + проект + + } } @else if (type === 'members') { @if (leaderId === loggedUserId && loggedUserId !== info?.userId) { diff --git a/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.html b/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.html index f6b9db800..3a29b8c34 100644 --- a/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.html +++ b/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.html @@ -11,7 +11,9 @@
-

{{ feedItem.name }}

+

+ {{ feedItem.name.length > 30 ? feedItem.name.slice(0, 26) + "..." : feedItem.name }} +

diff --git a/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss b/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss index c74734080..14d720517 100644 --- a/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss +++ b/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss @@ -56,6 +56,9 @@ &__description { margin-top: 7px; + white-space: wrap; + overflow-wrap: anywhere; + word-break: break-word; color: var(--white); } } diff --git a/projects/social_platform/src/app/office/onboarding/stage-zero/stage-zero.component.scss b/projects/social_platform/src/app/office/onboarding/stage-zero/stage-zero.component.scss index b6d6fb1c4..d483f9f3b 100644 --- a/projects/social_platform/src/app/office/onboarding/stage-zero/stage-zero.component.scss +++ b/projects/social_platform/src/app/office/onboarding/stage-zero/stage-zero.component.scss @@ -192,11 +192,3 @@ i { text-align: center; } } - -.error { - color: var(--red) !important; - - i { - color: var(--red) !important; - } -} diff --git a/projects/social_platform/src/app/office/profile/edit/edit.component.scss b/projects/social_platform/src/app/office/profile/edit/edit.component.scss index 6431da64e..a2c18c98c 100644 --- a/projects/social_platform/src/app/office/profile/edit/edit.component.scss +++ b/projects/social_platform/src/app/office/profile/edit/edit.component.scss @@ -296,6 +296,9 @@ &__text { color: var(--grey-for-text); + white-space: wrap; + overflow-wrap: anywhere; + word-break: break-word; } } @@ -378,7 +381,3 @@ text-align: center; } } - -.error { - color: var(--red) !important; -} diff --git a/projects/social_platform/src/app/office/profile/edit/edit.component.ts b/projects/social_platform/src/app/office/profile/edit/edit.component.ts index 7d9289e6d..ef14a51dc 100644 --- a/projects/social_platform/src/app/office/profile/edit/edit.component.ts +++ b/projects/social_platform/src/app/office/profile/edit/edit.component.ts @@ -132,7 +132,7 @@ export class ProfileEditComponent implements OnInit, OnDestroy, AfterViewInit { organizationName: ["", Validators.max(100)], entryYear: [null], completionYear: [null], - description: [null, Validators.max(1000)], + description: [null, Validators.max(400)], educationLevel: [null], educationStatus: [""], isMospolytechStudent: [false], @@ -155,17 +155,17 @@ export class ProfileEditComponent implements OnInit, OnDestroy, AfterViewInit { achievements: this.fb.array([]), // work - organization: ["", Validators.max(100)], + organization: ["", Validators.maxLength(50)], entryYearWork: [null], completionYearWork: [null], - descriptionWork: [null, Validators.max(1000)], + descriptionWork: [null, Validators.maxLength(400)], jobPosition: [""], // skills speciality: ["", [Validators.required]], skills: [[]], avatar: [""], - aboutMe: [""], + aboutMe: ["", Validators.maxLength(300)], typeSpecific: this.fb.group({}), }); } @@ -419,7 +419,7 @@ export class ProfileEditComponent implements OnInit, OnDestroy, AfterViewInit { | "settings"; } - readonly yearListEducation = generateOptionsList(55, "years"); + readonly yearListEducation = generateOptionsList(55, "years").reverse(); readonly educationStatusList = educationUserType; diff --git a/projects/social_platform/src/app/office/program/detail/register/register.component.html b/projects/social_platform/src/app/office/program/detail/register/register.component.html index e39dbf3f9..c62d1039a 100644 --- a/projects/social_platform/src/app/office/program/detail/register/register.component.html +++ b/projects/social_platform/src/app/office/program/detail/register/register.component.html @@ -18,7 +18,7 @@ } } - Зарегистрироваться в программе + Зарегистрироваться в программе }
diff --git a/projects/social_platform/src/app/office/projects/edit/services/project-form.service.ts b/projects/social_platform/src/app/office/projects/edit/services/project-form.service.ts index d500e168e..1c6c6afb0 100644 --- a/projects/social_platform/src/app/office/projects/edit/services/project-form.service.ts +++ b/projects/social_platform/src/app/office/projects/edit/services/project-form.service.ts @@ -47,12 +47,12 @@ export class ProjectFormService { links: this.fb.array([]), link: ["", Validators.pattern(/^(https?:\/\/)/)], industryId: [undefined, [Validators.required]], - description: ["", [Validators.required]], + description: ["", [Validators.required, Validators.maxLength(800)]], presentationAddress: ["", [Validators.required]], coverImageAddress: ["", [Validators.required]], - actuality: ["", [Validators.maxLength(1000)]], - targetAudience: ["", [Validators.required, Validators.maxLength(500)]], - problem: ["", [Validators.required, Validators.maxLength(1000)]], + actuality: ["", [Validators.maxLength(400)]], + targetAudience: ["", [Validators.required, Validators.maxLength(400)]], + problem: ["", [Validators.required, Validators.maxLength(400)]], partnerProgramId: [null], achievements: this.fb.array([]), title: [""], diff --git a/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.scss b/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.scss index 29e19d720..d0aa0cbd9 100644 --- a/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.scss +++ b/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.scss @@ -72,11 +72,3 @@ } } } - -.error { - i { - color: var(--red) !important; - } - - color: var(--red) !important; -} diff --git a/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.ts b/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.ts index 96b708afd..feea7d422 100644 --- a/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.ts +++ b/projects/social_platform/src/app/office/projects/edit/shared/project-achievement-step/project-achievement-step.component.ts @@ -4,7 +4,6 @@ import { CommonModule } from "@angular/common"; import { Component, inject, Input } from "@angular/core"; import { FormArray, FormBuilder, FormGroup, ReactiveFormsModule, Validators } from "@angular/forms"; import { InputComponent, ButtonComponent } from "@ui/components"; -import { LinkCardComponent } from "@office/shared/link-card/link-card.component"; import { ControlErrorPipe } from "@corelib"; import { ErrorMessage } from "@error/models/error-message"; import { ProjectFormService } from "../../services/project-form.service"; @@ -22,7 +21,6 @@ import { IconComponent } from "@uilib"; InputComponent, ButtonComponent, IconComponent, - LinkCardComponent, ControlErrorPipe, ], }) 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 66a80cc31..031a78a4e 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 @@ -160,11 +160,3 @@ display: block; } } - -.error { - i { - color: var(--red) !important; - } - - color: var(--red) !important; -} diff --git a/projects/social_platform/src/app/office/projects/edit/shared/project-main-step/project-main-step.component.html b/projects/social_platform/src/app/office/projects/edit/shared/project-main-step/project-main-step.component.html index adc83a0d1..6072a5c6f 100644 --- a/projects/social_platform/src/app/office/projects/edit/shared/project-main-step/project-main-step.component.html +++ b/projects/social_platform/src/app/office/projects/edit/shared/project-main-step/project-main-step.component.html @@ -191,6 +191,7 @@
заработная плата -
  • +
  • с зарплатой
  • diff --git a/projects/social_platform/src/app/ui/components/input/input.component.ts b/projects/social_platform/src/app/ui/components/input/input.component.ts index 2681f5506..1d6eb26fe 100644 --- a/projects/social_platform/src/app/ui/components/input/input.component.ts +++ b/projects/social_platform/src/app/ui/components/input/input.component.ts @@ -81,11 +81,11 @@ export class InputComponent implements ControlValueAccessor { onDateChange(event: any): void { if (this.type === "date" && event.value) { const date = event.value as Date; - // Форматируем дату в нужный формат (например, DD.MM.YY) - const day = String(date.getDate()).padStart(2, "0"); + + const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, "0"); - const year = String(date.getFullYear()).slice(-2); - const formattedDate = `${day}.${month}.${year}`; + const day = String(date.getDate()).padStart(2, "0"); + const formattedDate = `${year}-${month}-${day}`; this.value = formattedDate; this.onChange(formattedDate); @@ -118,12 +118,11 @@ export class InputComponent implements ControlValueAccessor { get dateValue(): Date | null { if (!this.value || this.type !== "date") return null; - // Парсим дату из формата DD.MM.YY и преобразуем дату - const parts = this.value.split("."); + const parts = this.value.split("-"); if (parts.length === 3) { - const day = parseInt(parts[0], 10); + const year = parseInt(parts[0], 10); const month = parseInt(parts[1], 10) - 1; - const year = parseInt(parts[2], 10) + 2000; + const day = parseInt(parts[2], 10); return new Date(year, month, day); } diff --git a/projects/social_platform/src/styles/_global.scss b/projects/social_platform/src/styles/_global.scss index 177a2932d..19ab90417 100644 --- a/projects/social_platform/src/styles/_global.scss +++ b/projects/social_platform/src/styles/_global.scss @@ -80,7 +80,11 @@ label.field-label { display: block; gap: 10px; margin-top: 6px; - color: var(--red); + color: var(--red) !important; + + i { + color: var(--red) !important; + } p { &:not(:last-child) { From b86a65f83775a3af7f09b4ec7e4eb10429561070 Mon Sep 17 00:00:00 2001 From: Awakich Date: Thu, 20 Nov 2025 12:18:54 +0300 Subject: [PATCH 2/3] add styles --- .../feed/shared/new-project/new-project.component.scss | 6 +++--- .../src/app/office/profile/edit/edit.component.scss | 4 ++-- projects/social_platform/src/styles/_global.scss | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss b/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss index 14d720517..72abb7cf1 100644 --- a/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss +++ b/projects/social_platform/src/app/office/feed/shared/new-project/new-project.component.scss @@ -56,9 +56,9 @@ &__description { margin-top: 7px; - white-space: wrap; - overflow-wrap: anywhere; - word-break: break-word; color: var(--white); + word-break: break-word; + overflow-wrap: anywhere; + white-space: wrap; } } diff --git a/projects/social_platform/src/app/office/profile/edit/edit.component.scss b/projects/social_platform/src/app/office/profile/edit/edit.component.scss index a2c18c98c..38e578910 100644 --- a/projects/social_platform/src/app/office/profile/edit/edit.component.scss +++ b/projects/social_platform/src/app/office/profile/edit/edit.component.scss @@ -296,9 +296,9 @@ &__text { color: var(--grey-for-text); - white-space: wrap; - overflow-wrap: anywhere; word-break: break-word; + overflow-wrap: anywhere; + white-space: wrap; } } diff --git a/projects/social_platform/src/styles/_global.scss b/projects/social_platform/src/styles/_global.scss index 19ab90417..e29a38145 100644 --- a/projects/social_platform/src/styles/_global.scss +++ b/projects/social_platform/src/styles/_global.scss @@ -83,7 +83,7 @@ label.field-label { color: var(--red) !important; i { - color: var(--red) !important; + color: var(--red) !important; } p { From 2c1cf2d3642da378d758c9f36839c0b96b054d6f Mon Sep 17 00:00:00 2001 From: Awakich Date: Sat, 22 Nov 2025 12:50:36 +0300 Subject: [PATCH 3/3] fix length in feed card components --- .../office/features/news-card/news-card.component.html | 6 ++++-- .../office/features/news-card/news-card.component.ts | 9 ++++++++- .../shared/open-vacancy/open-vacancy.component.html | 10 +++++++--- .../shared/open-vacancy/open-vacancy.component.scss | 5 +++-- 4 files changed, 22 insertions(+), 8 deletions(-) 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 1a20e7c81..73cc100e2 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 @@ -7,7 +7,9 @@ [src]="feedItem.imageAddress || placeholderUrl" [alt]="feedItem.name" /> -

    {{ feedItem.name }}

    +

    + {{ feedItem.name.length > 30 ? feedItem.name.slice(0, 26) + "..." : feedItem.name }} +

    @if (isOwner) {
    @@ -28,7 +30,7 @@ @if (feedItem.text) {
    @if (!editMode) { -

    +

    } @else { @if (editForm.get("text"); as text) { } } diff --git a/projects/social_platform/src/app/office/features/news-card/news-card.component.ts b/projects/social_platform/src/app/office/features/news-card/news-card.component.ts index c93428b3a..2480f958e 100644 --- a/projects/social_platform/src/app/office/features/news-card/news-card.component.ts +++ b/projects/social_platform/src/app/office/features/news-card/news-card.component.ts @@ -14,7 +14,13 @@ import { FeedNews } from "@office/projects/models/project-news.model"; import { SnackbarService } from "@ui/services/snackbar.service"; import { ActivatedRoute, RouterLink } from "@angular/router"; import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from "@angular/forms"; -import { DayjsPipe, FormControlPipe, ParseLinksPipe, ValidationService } from "projects/core"; +import { + DayjsPipe, + FormControlPipe, + ParseBreaksPipe, + ParseLinksPipe, + ValidationService, +} from "projects/core"; import { FileService } from "@core/services/file.service"; import { nanoid } from "nanoid"; import { expandElement } from "@utils/expand-element"; @@ -50,6 +56,7 @@ import { ImgCardComponent } from "@office/shared/img-card/img-card.component"; DayjsPipe, FormControlPipe, ParseLinksPipe, + ParseBreaksPipe, CarouselComponent, ImgCardComponent, ], 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 98f6f5c91..95c555e90 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 @@ -17,7 +17,9 @@ alt="newsItem.name" > -

    {{ project.name }}

    +

    + {{ project.name.length > 30 ? project.name.slice(0, 26) + "..." : project.name }} +

    @if (industryService.industries | async; as industries) { @if (industryService.getIndustry(industries, project.industry); as industry) { @@ -29,7 +31,9 @@ } @if (feedItem; as vacancy) {
    -

    {{ vacancy.role }}

    +

    + {{ vacancy.role.length > 30 ? vacancy.role.slice(0, 26) + "..." : vacancy.role }} +

    {{ vacancy.datetimeCreated | dayjs: "format":"DD MM YY" }}

    @@ -57,7 +61,7 @@

    {{ vacancy.role }}

    } @if (skillsLength > 8) {
    - {{ readFullSkills ? "cкрыть" : "xитать полностью" }} + {{ readFullSkills ? "cкрыть" : "подробнее" }}
    } }
    diff --git a/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.scss b/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.scss index 57ae20c5f..b83b39471 100644 --- a/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.scss +++ b/projects/social_platform/src/app/office/feed/shared/open-vacancy/open-vacancy.component.scss @@ -57,8 +57,9 @@ } &__description { - overflow-wrap: break-word; - white-space: pre-wrap; + word-break: break-word; + overflow-wrap: anywhere; + white-space: wrap; } &__project {