Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
cb162b4e
Commit
cb162b4e
authored
Jun 18, 2020
by
Muhammad Usman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
profile tasks bar ui fixes
parent
e30ca484
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
profile-tasks.component.html
...-web/dashboard/profile-tasks/profile-tasks.component.html
+2
-2
profile-tasks.component.scss
...-web/dashboard/profile-tasks/profile-tasks.component.scss
+5
-0
profile-tasks.component.ts
...er-web/dashboard/profile-tasks/profile-tasks.component.ts
+12
-3
No files found.
frontend/angular/src/app/components/my-career-web/dashboard/profile-tasks/profile-tasks.component.html
View file @
cb162b4e
<div
class=
"right-sidebar"
>
<div
class=
"user-profile"
>
<i
class=
"fa fa-bell"
*
ngIf=
"!isMobileView"
></i>
<div
class=
"user-profile-avatar-wrapper"
[
ngStyle
]="{
backgroundImage:
avatarBorder
}"
>
<div
class=
"user-profile-avatar-wrapper"
[
ngStyle
]="{
backgroundImage:
avatarBorder
,
backgroundColor:
backgroundColor
}"
>
<div
class=
"user-profile-avatar"
>
<img
src=
"assets/my-career-web/svgs/avatar.svg"
alt=
""
>
</div>
</div>
<div
class=
"user-profile-label"
>
Profile {{careerProfile.CompletedPercentage || 0}}% complete
</div>
<div
class=
"user-profile-label"
>
Profile {{careerProfile.CompletedPercentage || 0}}% complete
<i
class=
"fa fa-trophy"
*
ngIf=
"careerProfile.CompletedPercentage"
></i>
</div>
<hr
style=
"border-bottom: 1px solid #E0E0E0; margin: 24px 0;"
>
...
...
frontend/angular/src/app/components/my-career-web/dashboard/profile-tasks/profile-tasks.component.scss
View file @
cb162b4e
...
...
@@ -42,6 +42,11 @@
&
-label
{
margin-top
:
18px
;
text-align
:
center
;
.fa-trophy
{
margin-left
:
10px
;
color
:
#F3B924
;
}
}
&
-name
,
&
-role
,
&
-label
{
...
...
frontend/angular/src/app/components/my-career-web/dashboard/profile-tasks/profile-tasks.component.ts
View file @
cb162b4e
...
...
@@ -14,6 +14,7 @@ export class ProfileTasksComponent extends BaseComponent {
careerProfile
=
new
CareerProfileModel
();
avatarBorder
=
'linear-gradient(90deg, transparent 50%, #EAECEE 50%), linear-gradient(90deg, #EAECEE 50%, transparent 50%)'
;
backgroundColor
=
'#1469A2'
;
constructor
(
private
ps
:
PersonalDetailsService
,
...
...
@@ -28,13 +29,21 @@ export class ProfileTasksComponent extends BaseComponent {
.
subscribe
(
profile
=>
{
this
.
careerProfile
=
this
.
us
.
cloneObject
(
profile
);
this
.
setProfileCompletion
();
})
})
;
}
setProfileCompletion
():
void
{
const
percentage
=
(
this
.
careerProfile
.
CompletedPercentage
||
0
)
*
3.6
;
const
degree
=
percentage
<=
180
?
90
+
percentage
:
percentage
-
90
;
this
.
avatarBorder
=
`linear-gradient(
${
degree
}
deg, transparent 50%, #EAECEE 50%), linear-gradient(90deg, #EAECEE 50%, transparent 50%)`
;
for
(
let
i
=
0
;
i
<=
percentage
;
i
++
)
{
if
(
percentage
===
360
)
{
this
.
backgroundColor
=
'#1DBA3C'
;
this
.
avatarBorder
=
`linear-gradient(
${
90
+
percentage
}
deg, transparent 50%, #1DBA3C 50%),linear-gradient(90deg, #1DBA3C 50%, transparent 50%)`
;
}
else
if
(
percentage
<=
180
){
this
.
avatarBorder
=
`linear-gradient(
${
90
+
percentage
}
deg, transparent 50%, #EAECEE 50%),linear-gradient(90deg, #EAECEE 50%, transparent 50%)`
;
}
else
{
this
.
avatarBorder
=
`linear-gradient(
${
percentage
-
90
}
deg, transparent 50%, #1469A2 50%),linear-gradient(90deg, #EAECEE 50%, transparent 50%)`
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment