Skip to content

Commit 20c7705

Browse files
committed
fix tag padding, redirect in program-member, skills in vacancies & project-vacancy-card, submitProject
1 parent 44f6563 commit 20c7705

6 files changed

Lines changed: 22 additions & 12 deletions

File tree

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ export class DeatilComponent implements OnInit, OnDestroy {
205205
project => project.id === this.selectedProjectId
206206
);
207207

208+
if (!selectedProject) {
209+
this.snackbarService.error("Проект не найден. Попробуйте выбрать другой проект.");
210+
return;
211+
}
212+
208213
this.assignProjectToProgram(selectedProject!);
209214
}
210215

@@ -222,6 +227,11 @@ export class DeatilComponent implements OnInit, OnDestroy {
222227
* Перенаправление её на редактирование "нового" проекта
223228
*/
224229
assignProjectToProgram(project: Project): void {
230+
if (!project || !project.id) {
231+
this.snackbarService.error("Ошибка при выборе проекта");
232+
return;
233+
}
234+
225235
if (this.info().id) {
226236
this.projectService
227237
.assignProjectToProgram(project.id, Number(this.route.snapshot.params["programId"]))
@@ -231,7 +241,7 @@ export class DeatilComponent implements OnInit, OnDestroy {
231241
this.assignProjectToProgramModalMessage.set(r);
232242
this.isAssignProjectToProgramModalOpen.set(true);
233243
this.toggleSubmitProjectModal();
234-
this.selectedProjectId = 0;
244+
this.selectedProjectId = null;
235245
},
236246

237247
error: err => {

projects/social_platform/src/app/office/program/detail/list/list.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@for (listItem of searchedList; track listItem.id) {
2222
<li class="page__item">
2323
@if (listType === 'projects' || listType === 'members') {
24-
<a [routerLink]="[routerLink]">
24+
<a [routerLink]="routerLink(listItem.id)">
2525
<app-info-card
2626
[type]="listType"
2727
[profileId]="listItem.id"
@@ -59,7 +59,7 @@
5959
<div class="filter__controls">
6060
<label class="filter__tags" (click)="setValue($event)">
6161
<app-checkbox [checked]="this.filterForm.get('filterTag')?.value"></app-checkbox>
62-
<p class="text-body-12">проекты без оценки</p>
62+
<p class="text-body-12">проекты с оценкой</p>
6363
</label>
6464
</div>
6565
</form>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ export class ProgramListComponent implements OnInit, OnDestroy, AfterViewInit {
142142
this.listType = data["listType"];
143143
});
144144

145-
console.log(this.listType);
146-
147145
const routeData$ = this.route.data.pipe(map(r => r["data"])).subscribe(data => {
148146
this.listTotalCount = data.count;
149147
this.list = data.results;

projects/social_platform/src/app/office/projects/detail/shared/project-vacancy-card/project-vacancy-card.component.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
>{{ skill.name }}</app-tag
4343
>
4444
} @if (vacancy.requiredSkills.length > 5) {
45-
<p class="vacancy__skill--more">+ {{ vacancy.requiredSkills.length - 5 }}</p>
45+
<p class="vacancy__skill--more text-body-10">+ {{ vacancy.requiredSkills.length - 5 }}</p>
4646
}
4747
</div>
4848

@@ -51,8 +51,11 @@
5151
<div class="text-body-10 about__text">
5252
<p #descEl [innerHTML]="vacancy.description | parseLinks | parseBreaks"></p>
5353
@if (descriptionExpandable) {
54-
<div class="read-more" (click)="onExpandDescription(descEl, 'expanded', readFullDescription)">
55-
{{ readFullDescription ? "Скрыть" : "Подробнее" }}
54+
<div
55+
class="read-more text-body-10"
56+
(click)="onExpandDescription(descEl, 'expanded', readFullDescription)"
57+
>
58+
{{ readFullDescription ? "cкрыть" : "подробнее" }}
5659
</div>
5760
}
5861
</div>

projects/social_platform/src/app/office/projects/detail/shared/project-vacancy-card/project-vacancy-card.component.scss

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

6363
&__skills {
6464
display: flex;
65-
flex-direction: row;
65+
flex-wrap: wrap;
66+
align-items: center;
6667
gap: 2px;
6768
margin-top: 8px;
6869
}
6970

7071
&__skill {
71-
display: inline-flex;
72-
7372
&--more {
7473
color: var(--accent);
7574
}

projects/social_platform/src/app/ui/components/tag/tag.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
display: flex;
55
align-items: center;
66
max-width: 300px;
7-
padding: 3px 20px;
7+
padding: 2px 20px;
88
overflow: hidden;
99
color: var(--accent);
1010
text-overflow: ellipsis;

0 commit comments

Comments
 (0)