-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from vaimee/refactor-organization
Refactor Organization Service
- Loading branch information
Showing
24 changed files
with
487 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +0,0 @@ | ||
.certificateCardBlock { | ||
position: relative; | ||
} | ||
.certificateCardBlock .mat-icon { | ||
width: 60px; | ||
height: 60px; | ||
line-height: 60px; | ||
font-size: 40px; | ||
background: #f9f9f9; | ||
border-radius: 50%; | ||
text-align: center; | ||
} | ||
.certificateCardBlock .certificatesItemIcon { | ||
position: absolute; | ||
top: 10px; | ||
right: 10px; | ||
} | ||
.certificateCardBlock .certificatesItemIcon .mat-icon { | ||
width: 30px; | ||
height: 30px; | ||
font-size: 20px; | ||
background: #f9f9f9; | ||
border-radius: 50%; | ||
line-height: 30px; | ||
text-align: center; | ||
} | ||
|
||
@media (min-width: 768px) and (max-width: 1024px) { | ||
.certificateCardBlock .cards .d-flex { | ||
display: block !important; | ||
} | ||
} | ||
35 changes: 14 additions & 21 deletions
35
frontend/src/app/modules/profiles/components/certificates/certificates.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,15 @@ | ||
<div class="certificateCardBlock p-4 bg-white skill-min-height"> | ||
<h2 class="d-flex justify-content-between align-items-center mb-3">Certificates</h2> | ||
<ng-container *ngIf="certificates.length > 0; else noCertificates"> | ||
<mat-card | ||
class="border p-3 cards bg-dark text-white rounded-3 mb-3 border-0" | ||
*ngFor="let certificate of certificates"> | ||
<div class="d-flex align-items-center"> | ||
<div class="flex-shrink-0"> | ||
<mat-icon class="text-dark">{{ certificate?.image }}</mat-icon> | ||
</div> | ||
<div class="flex-grow-1 ms-3"> | ||
<h6>{{ certificate?.name }}</h6> | ||
<small class="text-Light text-end d-block">{{ certificate?.date | date }} </small> | ||
</div> | ||
</div> | ||
<div class="certificatesItemIcon"> | ||
<mat-icon class="text-black">{{ certificate?.image }}</mat-icon> | ||
</div> | ||
</mat-card> | ||
<ng-container *ngIf="certificates$ | async as certificates"> | ||
<ng-container *ngIf="certificates.length > 0"> | ||
<div class="mt-4 bg-white p-4"> | ||
<h2 class="mb-3">Certificates</h2> | ||
<mat-list> | ||
<mat-list-item *ngFor="let certificate of certificates"> | ||
<img class="round-image" matListItemAvatar src="{{ certificate.image }}" alt="{{ certificate.name }} icon" /> | ||
<span matListItemTitle>{{ certificate.name }}</span> | ||
<p matListItemLine>{{ certificate.description }}</p> | ||
</mat-list-item> | ||
</mat-list> | ||
<ng-template #noCertificates> No certificates found </ng-template> | ||
</div> | ||
</ng-container> | ||
<ng-template #noCertificates> No certificates found </ng-template> | ||
</div> | ||
</ng-container> |
15 changes: 12 additions & 3 deletions
15
frontend/src/app/modules/profiles/components/certificates/certificates.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Observable, toArray } from 'rxjs'; | ||
|
||
import { Component, Input, OnInit } from '@angular/core'; | ||
|
||
import { Certificate } from '@shared/interfaces'; | ||
import { ProfileService } from '@shared/services/profile.service'; | ||
|
||
@Component({ | ||
selector: 'app-certificates', | ||
templateUrl: './certificates.component.html', | ||
styleUrls: ['./certificates.component.css'], | ||
}) | ||
export class CertificatesComponent { | ||
@Input() certificates!: Array<Certificate>; | ||
export class CertificatesComponent implements OnInit { | ||
@Input() profileId!: number; | ||
certificates$!: Observable<Certificate[]>; | ||
|
||
constructor(private profileService: ProfileService) {} | ||
ngOnInit(): void { | ||
this.certificates$ = this.profileService.getCertificates(this.profileId).pipe(toArray()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.