Skip to content

Commit 9e84092

Browse files
committed
add send cv check subscription
1 parent e8c4942 commit 9e84092

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import { ProfileService } from "@auth/services/profile.service";
4040
import { ModalComponent } from "@ui/components/modal/modal.component";
4141
import { AvatarComponent } from "../../../../ui/components/avatar/avatar.component";
4242
import { Skill } from "@office/models/skill";
43-
import { ProfileService as SkillsProfileService } from "projects/skills/src/app/profile/services/profile.service";
4443

4544
@Component({
4645
selector: "app-profile-main",
@@ -71,7 +70,6 @@ export class ProfileMainComponent implements OnInit, AfterViewInit, OnDestroy {
7170
private readonly authService: AuthService,
7271
private readonly profileNewsService: ProfileNewsService,
7372
private readonly profileApproveSkillService: ProfileService,
74-
private readonly profileSkillsService: SkillsProfileService,
7573
private readonly cdRef: ChangeDetectorRef
7674
) {}
7775

@@ -81,8 +79,6 @@ export class ProfileMainComponent implements OnInit, AfterViewInit, OnDestroy {
8179
loggedUserId: Observable<number> = this.authService.profile.pipe(map(user => user.id));
8280

8381
ngOnInit(): void {
84-
this.profileSkillsService.getSubscriptionData().subscribe(r => console.log(r));
85-
8682
const route$ = this.route.params
8783
.pipe(
8884
map(r => r["id"]),

projects/social_platform/src/app/office/profile/detail/profile-detail.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ <h2 class="info__name">{{ user.firstName }} {{ user.lastName }}</h2>
9191
</a>
9292
} @else {
9393
<div class="profile__btns">
94-
<!-- <a class="profile__cv">
94+
<a class="profile__cv">
9595
@if(isSubscriptionActive()){
9696
<app-button
9797
(click)="sendCVEmail()"
@@ -101,7 +101,7 @@ <h2 class="info__name">{{ user.firstName }} {{ user.lastName }}</h2>
101101
Скачать CV
102102
</app-button>
103103
}
104-
</a> -->
104+
</a>
105105

106106
<a
107107
class="profile__edit"
@@ -161,13 +161,13 @@ <h2 class="info__name">{{ user.firstName }} {{ user.lastName }}</h2>
161161

162162
<app-modal [open]="isProfileFill" (openChange)="isProfileFill = !isProfileFill">
163163
<div class="cancel">
164+
<img
165+
alt="profile unfill image"
166+
class="cancel__image"
167+
src="/assets/images/profile/profile-unfill.png"
168+
/>
164169
<div class="cancel__top">
165170
<i (click)="isProfileFill = false" appIcon icon="cross" class="cancel__cross"></i>
166-
<img
167-
alt="profile unfill image"
168-
class="cancel__image"
169-
src="/assets/images/profile/profile-unfill.png"
170-
/>
171171
<p class="cancel__title text-heading-4">
172172
Заполни все поля, чтобы использовать Procollab на максимум
173173
</p>

projects/social_platform/src/app/office/profile/detail/profile-detail.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { BackComponent } from "@uilib";
1515
import { AsyncPipe, CommonModule } from "@angular/common";
1616
import { ModalComponent } from "@ui/components/modal/modal.component";
1717
import { calculateProfileProgress } from "@utils/calculateProgress";
18+
import { ProfileService as SkillsProfileService } from "projects/skills/src/app/profile/services/profile.service";
1819

1920
@Component({
2021
selector: "app-profile-detail",
@@ -43,6 +44,7 @@ export class ProfileDetailComponent implements OnInit {
4344
public readonly authService: AuthService,
4445
public readonly subscriptionPlansService: SubscriptionPlansService,
4546
public readonly chatService: ChatService,
47+
public readonly skillsProfileService: SkillsProfileService,
4648
public readonly breakpointObserver: BreakpointObserver
4749
) {}
4850

@@ -67,6 +69,10 @@ export class ProfileDetailComponent implements OnInit {
6769
ngOnInit(): void {
6870
this.navService.setNavTitle("Профиль");
6971

72+
this.skillsProfileService.getSubscriptionData().subscribe(r => {
73+
this.isSubscriptionActive.set(r.isSubscribed);
74+
});
75+
7076
this.user$.subscribe(r => {
7177
this.isProfileFill =
7278
r.progress! < 100 ? (this.isProfileFill = true) : (this.isProfileFill = false);

0 commit comments

Comments
 (0)