Skip to content

Commit a29f13d

Browse files
committed
add new tooltips & modals for project team, programs, rating, login
1 parent 05b8927 commit a29f13d

14 files changed

Lines changed: 480 additions & 8 deletions

projects/social_platform/src/app/auth/login/login.component.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<div class="login">
44
<div class="login__left">
5-
<!-- Центр -->
65
<div class="login__left-content">
76
<form class="auth" [formGroup]="loginForm" (ngSubmit)="onSubmit()" (keyup.enter)="onSubmit()">
87
<div class="auth__wrapper">
@@ -107,7 +106,6 @@
107106
</form>
108107
</div>
109108

110-
<!-- Низ -->
111109
<div class="login__left-footer">
112110
<div class="tooltip">
113111
<app-tooltip
@@ -119,16 +117,25 @@
119117
@if (isHintLoginVisible()) {
120118
<div class="tooltip__wrapper" (clickOutside)="toggleTooltip()">
121119
<p class="tooltip__text text-body-10">
122-
Если у тебя есть вопросы, напиши в наш телеграм-бот поддержки
120+
Возникли технические сложности или остались вопросы?
121+
</p>
122+
<p class="tooltip__text text-body-10">
123+
Все ответы в нашем боте поддержки
123124
<a href="https://t.me/procollab_bot">{{ "@procollab_bot" }}</a>
124125
</p>
125126

126127
<br />
127128

128129
<p class="tooltip__text text-body-10">
129-
Если не нашел ответ в боте, напиши в техподдержку —
130+
Для уникальных кейсов или нерешаемых сложностей на связи наша техническая поддержка –
130131
<a href="https://t.me/procollab_support">{{ "@procollab_support" }}</a>
131132
</p>
133+
134+
<br />
135+
136+
<p class="tooltip__text text-body-10">
137+
Время работы оператора:  пн-пт, 10:00-19:00 по московскому времени
138+
</p>
132139
</div>
133140
}
134141
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
position: absolute;
9898
bottom: 22px;
9999
left: 38px;
100-
width: 260px;
100+
width: 310px;
101101
padding: 18px 10px 10px 16px;
102102
background-color: var(--white);
103103
border: 0.5px solid var(--grey-for-text);

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

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,59 @@
108108
}
109109
</div>
110110
</div>
111+
} @if (listType !== 'members' && listType !== 'projects') {
112+
<div class="page__tooltip">
113+
<div class="tooltip">
114+
<app-tooltip color="grey" iconSize="40" (show)="isHintExpertsVisible.set(true)"></app-tooltip>
115+
116+
@if (isHintExpertsVisible()) {
117+
<div class="tooltip__wrapper" (mouseleave)="isHintExpertsVisible.set(false)">
118+
<p class="tooltip__text text-body-10">
119+
Нажмите, чтобы открыть подсказку и узнать больше о процессе оценивания проектов
120+
</p>
121+
<p class="tooltip__text text-body-10" (click)="openHintModal($event)">подробнее</p>
122+
</div>
123+
}
124+
</div>
125+
</div>
126+
127+
<app-modal [open]="isHintExpertsModal()" (openChange)="isHintExpertsModal.set(false)">
128+
<div class="cancel">
129+
<div class="cancel__top">
130+
<p class="cancel__title text-body-14">Как выставить оценки проекту</p>
131+
</div>
132+
133+
<div class="cancel__text-block">
134+
<p class="text-body-12">
135+
Перед стартом оценки, <br />
136+
настройте фильтрацию справа – выберите регион или конкретный кейс, а также работы, которые
137+
ранее не были оценены другими экспертами
138+
</p>
139+
140+
<p class="text-body-12">
141+
После изучения материалов участников (описания и презентации проекта), проставьте оценки
142+
по критериям. При необходимости оставьте небольшой комментарий
143+
</p>
144+
145+
<p class="text-body-12">
146+
Для завершения оценивания, нажмите «оценить проект» – ваша оценка сохранилась в системе
147+
</p>
148+
149+
<p class="text-body-12">
150+
Вы можете исправить свою оценку или комментарий – для этого нажмите на иконку карандаша
151+
справа от кнопки «проект оценен». Этот функционал появится после сохранения оценки
152+
</p>
153+
154+
<p class="text-body-12">Благодарим за вашу работу!</p>
155+
</div>
156+
157+
<app-button
158+
customTypographyClass="text-body-12"
159+
size="medium"
160+
(click)="isHintExpertsModal.set(false)"
161+
>спасибо, понятно</app-button
162+
>
163+
</div>
164+
</app-modal>
111165
}
112166
</div>

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

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
}
7676
}
7777
}
78+
79+
&__tooltip {
80+
position: fixed;
81+
right: 20%;
82+
bottom: 2%;
83+
}
7884
}
7985

8086
.filter {
@@ -161,3 +167,85 @@
161167
display: none;
162168
}
163169
}
170+
171+
.tooltip {
172+
position: relative;
173+
display: flex;
174+
align-items: center;
175+
176+
&__wrapper {
177+
position: absolute;
178+
bottom: 22px;
179+
right: 100%;
180+
left: auto;
181+
width: 310px;
182+
padding: 18px 10px 10px 16px;
183+
background-color: var(--white);
184+
border: 0.5px solid var(--grey-for-text);
185+
border-radius: var(--rounded-lg) var(--rounded-lg) 0 var(--rounded-lg);
186+
187+
:last-child {
188+
color: var(--black);
189+
cursor: pointer;
190+
}
191+
}
192+
193+
&__text {
194+
color: var(--grey-for-text);
195+
196+
a {
197+
color: var(--accent);
198+
}
199+
}
200+
}
201+
202+
.cancel {
203+
display: flex;
204+
flex-direction: column;
205+
align-items: center;
206+
justify-content: center;
207+
width: 80%;
208+
max-height: calc(100vh - 40px);
209+
padding: 0px 24px;
210+
overflow-y: auto;
211+
212+
@include responsive.apply-desktop {
213+
width: 605px;
214+
max-width: 100%;
215+
}
216+
217+
&__cross {
218+
position: absolute;
219+
top: 0;
220+
right: 0;
221+
width: 32px;
222+
height: 32px;
223+
cursor: pointer;
224+
225+
@include responsive.apply-desktop {
226+
top: 8px;
227+
right: 8px;
228+
}
229+
}
230+
231+
&__top {
232+
display: flex;
233+
flex-direction: column;
234+
margin-bottom: 10px;
235+
}
236+
237+
&__title {
238+
text-align: center;
239+
}
240+
241+
&__text {
242+
text-align: center;
243+
244+
&-block {
245+
display: flex;
246+
flex-direction: column;
247+
gap: 12px;
248+
margin: 30px 0px;
249+
}
250+
}
251+
}

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ import { tagsFilter } from "projects/core/src/consts/filters/tags-filter.const";
4747
import { ExportFileService } from "@office/services/export-file.service";
4848
import { saveFile } from "@utils/helpers/export-file";
4949
import { ProgramDataService } from "@office/program/services/program-data.service";
50+
import { TooltipComponent } from "@ui/components/tooltip/tooltip.component";
51+
import { ModalComponent } from "@ui/components/modal/modal.component";
5052

5153
@Component({
5254
selector: "app-list",
@@ -62,6 +64,8 @@ import { ProgramDataService } from "@office/program/services/program-data.servic
6264
InfoCardComponent,
6365
ButtonComponent,
6466
IconComponent,
67+
TooltipComponent,
68+
ModalComponent,
6569
],
6670
standalone: true,
6771
})
@@ -114,6 +118,9 @@ export class ProgramListComponent implements OnInit, OnDestroy, AfterViewInit {
114118
readonly ratingOptionsList = tagsFilter;
115119
isFilterOpen = false;
116120

121+
readonly isHintExpertsVisible = signal<boolean>(false);
122+
readonly isHintExpertsModal = signal<boolean>(false);
123+
117124
protected readonly loadingExportProjects = signal<boolean>(false);
118125
protected readonly loadingExportSubmittedProjects = signal<boolean>(false);
119126
protected readonly loadingExportRates = signal<boolean>(false);
@@ -609,6 +616,12 @@ export class ProgramListComponent implements OnInit, OnDestroy, AfterViewInit {
609616
.then(() => console.log("Query change from ProjectsComponent"));
610617
}
611618

619+
openHintModal(event: Event): void {
620+
event.preventDefault();
621+
this.isHintExpertsVisible.set(false);
622+
this.isHintExpertsModal.set(true);
623+
}
624+
612625
private get itemsPerPage(): number {
613626
return this.listType === "rating"
614627
? 10

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,45 @@ <h3 class="links__title text-body-12">материалы</h3>
165165
>
166166
</div>
167167
</app-modal>
168+
169+
<app-modal [open]="registeredProgramModal()" (openChange)="registeredProgramModal.set(false)">
170+
<div class="cancel" style="width: 605px; padding: 0px 24px">
171+
<div class="cancel__top">
172+
<p class="cancel__title text-body-14">поздравляем, с регистрацией на программу! 🎉</p>
173+
</div>
174+
175+
<div class="cancel__text-block">
176+
<p class="text-body-12">
177+
Это закрытая группа программы – доступ к ней есть только у зарегистрированных участников
178+
</p>
179+
180+
<p class="text-body-12">Здесь вы найдете:</p>
181+
182+
<ul class="cancel__text-list">
183+
<li class="text-body-12">
184+
самые актуальные и важные файлы программы (например, Положение)
185+
</li>
186+
<li class="text-body-12">контакты организаторов для связи</li>
187+
<li class="text-body-12">новости программы</li>
188+
</ul>
189+
190+
<p class="text-body-12">
191+
Важно: именно через закрытую группу и кнопку «подать проект» вы отправляете результаты
192+
работы своей команды, когда будете готовы
193+
</p>
194+
195+
<p class="text-body-12">
196+
Будьте внимательны: по истечению дедлайна, определенного организаторами, кнопка становится
197+
не кликабельной 👻
198+
</p>
199+
</div>
200+
201+
<app-button
202+
customTypographyClass="text-body-12"
203+
size="medium"
204+
(click)="registeredProgramModal.set(false)"
205+
>спасибо, понятно</app-button
206+
>
207+
</div>
208+
</app-modal>
168209
}

projects/social_platform/src/app/office/program/detail/main/main.component.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,21 @@
220220
width: 40%;
221221
color: var(--dark-grey);
222222
text-align: center;
223+
224+
&-block {
225+
display: flex;
226+
flex-direction: column;
227+
gap: 12px;
228+
margin: 30px 0px;
229+
}
230+
231+
&-list {
232+
margin-left: 20px;
233+
234+
li {
235+
list-style-type: disc;
236+
}
237+
}
223238
}
224239

225240
&__button {

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export class ProgramDetailMainComponent implements OnInit, OnDestroy {
9898
showProgramModal = signal(false);
9999
showProgramModalErrorMessage = signal<string | null>(null);
100100

101+
registeredProgramModal = signal<boolean>(false);
102+
101103
programId?: number;
102104

103105
subscriptions$ = signal<Subscription[]>([]);
@@ -135,6 +137,13 @@ export class ProgramDetailMainComponent implements OnInit, OnDestroy {
135137
tap(program => {
136138
this.program = program;
137139
this.registerDateExpired = Date.now() > Date.parse(program.datetimeRegistrationEnds);
140+
if (program.isUserMember) {
141+
const seen = this.hasSeenRegisteredProgramModal(program.id);
142+
if (!seen) {
143+
this.registeredProgramModal.set(true);
144+
this.markSeenRegisteredProgramModal(program.id);
145+
}
146+
}
138147
}),
139148
concatMap(program => {
140149
if (program.isUserMember) {
@@ -318,6 +327,24 @@ export class ProgramDetailMainComponent implements OnInit, OnDestroy {
318327
this.descriptionExpandable = descElement.scrollHeight > descElement.clientHeight;
319328
}
320329

330+
private getRegisteredProgramSeenKey(programId: number): string {
331+
return `program_registered_modal_seen_${programId}`;
332+
}
333+
334+
private hasSeenRegisteredProgramModal(programId: number): boolean {
335+
try {
336+
return !!localStorage.getItem(this.getRegisteredProgramSeenKey(programId));
337+
} catch (e) {
338+
return false;
339+
}
340+
}
341+
342+
private markSeenRegisteredProgramModal(programId: number): void {
343+
try {
344+
localStorage.setItem(this.getRegisteredProgramSeenKey(programId), "1");
345+
} catch (e) {}
346+
}
347+
321348
private setupNewsObserver(): void {
322349
const observer = new IntersectionObserver(this.onNewsInVew.bind(this), {
323350
root: document.querySelector(".office__body"),

0 commit comments

Comments
 (0)