Skip to content

Commit 4b4e91f

Browse files
authored
Merge pull request #267 from PROCOLLAB-github/fixes
Fixes
2 parents 4944af6 + b2bee4d commit 4b4e91f

36 files changed

Lines changed: 286 additions & 141 deletions

.github/workflows/deploy-dev.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# @format
2+
3+
name: Deploy to dev-stage
4+
5+
on:
6+
push:
7+
branches: [dev]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js 18.x
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18.13
18+
cache: "npm"
19+
cache-dependency-path: package-lock.json
20+
- run: npm ci
21+
- run: npm run format:check
22+
- run: npm run lint:ts
23+
- run: npm run build:pr
24+
- name: Deploy to dev-stage
25+
uses: burnett01/rsync-deployments@5.2.1
26+
with:
27+
switches: -avzr --delete
28+
path: dist/social_platform/
29+
remote_path: /home/front/app
30+
remote_user: front
31+
remote_key: ${{ secrets.DEPLOY_KEY_FRONT_DEV }}
32+
remote_host: dev.procollab.ru

.github/workflows/pull_request.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@
267267
<app-checkbox [(checked)]="registerAgreement"></app-checkbox>
268268
<span (click)="registerAgreement = !registerAgreement">
269269
я прочитал соглашение и даю согласие на
270-
<a href="/assets/downloads/auth/shared/Политика_обработки_перс_данных_2022.docx" download
271-
>обработку персональных данных</a
270+
<span class="register__policy-link" (click)="downloadPolicy($event)"
271+
>обработку персональных данных</span
272272
>
273273
</span>
274274
</div>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
.register {
77
height: 100vh;
88

9+
&__policy-link {
10+
color: var(--accent);
11+
cursor: pointer;
12+
}
13+
914
&__agreement {
1015
display: flex;
1116
align-items: center;

projects/social_platform/src/app/auth/register/register.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ export class RegisterComponent implements OnInit {
107107
}
108108
}
109109

110+
downloadPolicy(event: Event): void {
111+
event.stopPropagation();
112+
const link = document.createElement("a");
113+
link.href = "/assets/downloads/auth/shared/privacy_policy_2022.docx";
114+
link.download = "Политика обработки персональных данных 2022.docx";
115+
link.click();
116+
}
117+
110118
onSendForm(): void {
111119
if (!this.validationService.getFormValidation(this.registerForm)) {
112120
return;

projects/social_platform/src/app/office/courses/detail/course-detail.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class CourseDetailComponent implements OnInit {
6868
}
6969

7070
get isMobile(): boolean {
71-
return this.appWidth < 920;
71+
return this.appWidth < 1000;
7272
}
7373

7474
get showCover(): boolean {

projects/social_platform/src/app/office/courses/detail/info/info.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<main class="trajectory">
55
<section class="course__main">
66
<div class="course__details">
7-
@if (appWidth > 920) {
7+
@if (appWidth > 1000) {
88
<div class="course__left">
99
<aside class="course__aside">
1010
<app-soon-card
@@ -34,7 +34,7 @@
3434
</div>
3535
</section>
3636

37-
@if (appWidth > 920) {
37+
@if (appWidth > 1000) {
3838
<div class="course__right">
3939
<app-course-about [description]="courseDetail()!.description"></app-course-about>
4040
</div>

projects/social_platform/src/app/office/courses/lesson/lesson.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
@if (lessonInfo()) {
44
<div class="task">
5-
<div class="task__wrapper" [class.task__wrapper--mobile]="appWidth < 920">
6-
@if (appWidth >= 920) {
5+
<div class="task__wrapper" [class.task__wrapper--mobile]="appWidth < 1000">
6+
@if (appWidth >= 1000) {
77
<div class="task__tasks">
88
<p class="task__name text-bold-body-14">модуль {{ lessonInfo()?.moduleOrder }}</p>
99
<p class="task__lesson text-body-12">урок {{ lessonOrder() }}</p>

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@if (info()) {
66
<div class="info detail__section detail__info">
77
<div class="info__cover" [class.info__cover--program]="listType === 'program'">
8-
@if (appWidth > 920) {
8+
@if (appWidth > 1000) {
99
<img
1010
class="info__cover"
1111
[class.info__cover--program]="listType === 'program'"
@@ -24,7 +24,7 @@
2424
(click)="redirectDetailInfo()"
2525
[class.info__avatar--program]="listType === 'program'"
2626
[style.width]="
27-
appWidth < 920
27+
appWidth < 1000
2828
? '105px'
2929
: listType === 'project' || listType === 'profile'
3030
? '110px'
@@ -41,7 +41,7 @@
4141
[onlineBadgeBorder]="0"
4242
[onlineBadgeOffset]="8"
4343
[size]="
44-
appWidth < 920 ? 105 : listType === 'project' || listType === 'profile' ? 110 : 123
44+
appWidth < 1000 ? 105 : listType === 'project' || listType === 'profile' ? 110 : 123
4545
"
4646
[isOnline]="cache[info().id] !== undefined ? cache[info().id] : info().isOnline"
4747
></app-avatar>
@@ -74,7 +74,7 @@
7474

7575
<ng-template #programTpl>
7676
@if (userType() !== undefined) { @if ((isProjectsPage || isProjectsRatingPage) && appWidth
77-
< 920) {
77+
< 1000) {
7878
<a [routerLink]="'/office/program/' + info().id">
7979
<app-button
8080
appearance="outline"
@@ -134,7 +134,7 @@
134134
</a>
135135
} } @if (isUserMember && !isUserManager && !isUserExpert) {
136136
<app-button
137-
[size]="appWidth > 920 ? 'medium' : 'big'"
137+
[size]="appWidth > 1000 ? 'medium' : 'big'"
138138
[disabled]="!!submissionProjectDateExpired || isProjectAssigned"
139139
[appearance]="isProjectAssigned ? 'outline' : 'inline'"
140140
(click)="isProjectAssigned ? null : addNewProject()"
@@ -146,8 +146,8 @@
146146
} @if ((isUserManager || isUserExpert) && isUserMember) {
147147
<a [routerLink]="'/office/program/' + info().id + '/projects-rating'">
148148
<app-button
149-
[appearance]="isProjectsRatingPage || appWidth < 920 ? 'inline' : 'outline'"
150-
[size]="appWidth > 920 ? 'medium' : 'big'"
149+
[appearance]="isProjectsRatingPage || appWidth < 1000 ? 'inline' : 'outline'"
150+
[size]="appWidth > 1000 ? 'medium' : 'big'"
151151
customTypographyClass="text-body-12"
152152
>
153153
оценка проектов
@@ -160,18 +160,18 @@
160160
<app-button
161161
[disabled]="isUserManager"
162162
appearance="outline"
163-
[size]="appWidth > 920 ? 'medium' : 'small'"
163+
[size]="appWidth > 1000 ? 'medium' : 'small'"
164164
customTypographyClass="text-body-12"
165165
>
166-
@if (appWidth > 920) {
166+
@if (appWidth > 1000) {
167167
<span>{{
168168
info().name.includes("Технолидеры Будущего")
169169
? "Каталог лучших стартапов 2022/23"
170170
: isUserManager
171171
? "аналитика"
172172
: "положение"
173173
}}</span>
174-
} @if (isUserManager && appWidth > 920) {
174+
} @if (isUserManager && appWidth > 1000) {
175175
<app-tooltip
176176
[text]="'Скоро здесь будет аналитика по включенности участников и проектов'"
177177
[isVisible]="isTooltipVisible"
@@ -185,16 +185,16 @@
185185
<i
186186
appIcon
187187
class="info__presentation-icon"
188-
[icon]="appWidth > 920 ? 'arrow-down' : 'file'"
189-
[appSquare]="appWidth > 920 ? '8' : '12'"
188+
[icon]="appWidth > 1000 ? 'arrow-down' : 'file'"
189+
[appSquare]="appWidth > 1000 ? '8' : '12'"
190190
></i>
191191
}
192192
</app-button>
193193
</a>
194194

195-
@if (appWidth > 920) {
195+
@if (appWidth > 1000) {
196196
<div class="info__divider"></div>
197-
} @if (appWidth < 920) {
197+
} @if (appWidth < 1000) {
198198
<app-button
199199
appearance="outline"
200200
size="small"
@@ -205,7 +205,7 @@
205205
>
206206
<i appIcon icon="phone" appSquare="12"></i>
207207
</app-button>
208-
} @if (isUserManager || (isUserExpert && appWidth > 920)) {
208+
} @if (isUserManager || (isUserExpert && appWidth > 1000)) {
209209
<a [routerLink]="'/office/program/' + info().id + '/projects'">
210210
<app-button
211211
[appearance]="isProjectsPage ? 'inline' : 'outline'"
@@ -216,7 +216,7 @@
216216
проекты-участники
217217
</app-button>
218218
</a>
219-
} @if (!isUserManager && !isUserExpert && appWidth > 920) {
219+
} @if (!isUserManager && !isUserExpert && appWidth > 1000) {
220220
<a class="info__more">
221221
<app-button
222222
appearance="outline"
@@ -227,7 +227,7 @@
227227
узнать подробнее
228228
</app-button>
229229
</a>
230-
} @if (isUserManager || (isUserExpert && appWidth > 920)) {
230+
} @if (isUserManager || (isUserExpert && appWidth > 1000)) {
231231
<a [routerLink]="'/office/program/' + info().id + '/members'" class="info__members">
232232
<app-button
233233
[appearance]="isMembersPage ? 'inline' : 'outline'"
@@ -238,7 +238,7 @@
238238
участники
239239
</app-button>
240240
</a>
241-
} @if (appWidth < 920) {
241+
} @if (appWidth < 1000) {
242242
<app-button
243243
appearance="outline"
244244
size="big"
@@ -259,10 +259,10 @@
259259
"
260260
appearance="outline"
261261
[disabled]="!info().courses?.length"
262-
[size]="appWidth > 920 ? 'medium' : 'big'"
262+
[size]="appWidth > 1000 ? 'medium' : 'big'"
263263
customTypographyClass="text-body-12"
264264
>
265-
{{ appWidth > 920 ? "перейти в курс" : "курс" }}
265+
{{ appWidth > 1000 ? "перейти в курс" : "курс" }}
266266
</app-button>
267267
}
268268

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

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,16 @@ export class DeatilComponent implements OnInit, OnDestroy {
539539
.subscribe({
540540
next: user => {
541541
this.info.set(user);
542-
this.isProfileFill =
543-
user.progress! < 100 ? (this.isProfileFill = true) : (this.isProfileFill = false);
542+
if (
543+
user.id !== undefined &&
544+
user.progress! < 100 &&
545+
!this.hasSeenProfileFillModal(user.id)
546+
) {
547+
this.isProfileFill = true;
548+
this.markSeenProfileFillModal(user.id);
549+
} else {
550+
this.isProfileFill = false;
551+
}
544552
},
545553
});
546554

@@ -556,6 +564,26 @@ export class DeatilComponent implements OnInit, OnDestroy {
556564
}
557565
}
558566

567+
private getProfileFillSeenKey(userId: number): string {
568+
return `profile_${userId}_fill_modal_seen`;
569+
}
570+
571+
private hasSeenProfileFillModal(userId: number): boolean {
572+
try {
573+
return !!localStorage.getItem(this.getProfileFillSeenKey(userId));
574+
} catch (e) {
575+
return false;
576+
}
577+
}
578+
579+
private markSeenProfileFillModal(userId: number): void {
580+
try {
581+
localStorage.setItem(this.getProfileFillSeenKey(userId), "1");
582+
} catch (e) {
583+
// ignore storage errors
584+
}
585+
}
586+
559587
private isInProfileInfo(): void {
560588
const profileInfoSub$ = this.authService.profile.subscribe({
561589
next: profile => {

0 commit comments

Comments
 (0)