This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
487e37f9
Commit
487e37f9
authored
3 years ago
by
Daniel Rainer
Browse files
Options
Downloads
Patches
Plain Diff
Remove "possibly undefined" issues from achievements component
parent
61965783
Branches
Branches containing commit
2 merge requests
!91
Bringing JHipster7.6.0 to production
,
!88
Integrating Update to JHipster 7.6.0 back to Development
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/webapp/app/account/achievements.component.html
+34
-31
34 additions, 31 deletions
src/main/webapp/app/account/achievements.component.html
with
34 additions
and
31 deletions
src/main/webapp/app/account/achievements.component.html
+
34
−
31
View file @
487e37f9
...
...
@@ -4,7 +4,7 @@
<h3>
{{ 'achievements.toComplete' | translate}}
</h3>
<p></p>
<ul
class=
"list-group"
*ngIf=
"statistics"
>
<li
*ngIf=
"statistics
?
.views > config.views[1] && statistics
?
.views <= config.views[2]"
<li
*ngIf=
"statistics
.views && statistics
.views > config.views[1] && statistics.views <= config.views[2]"
class=
"list-group-item justify-content-between align-items-center"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -14,7 +14,7 @@
<div
class=
"col-9"
>
<div
class=
"row"
>
<div
class=
"col-11"
>
<ngb-progressbar
type=
"success"
[value]=
"statistics
?
.views / config.views[2] * 100"
<ngb-progressbar
type=
"success"
[value]=
"statistics.views / config.views[2] * 100"
[striped]=
"true"
>
{{statistics?.views}}
</ngb-progressbar>
</div>
...
...
@@ -26,7 +26,7 @@
</div>
</div>
</li>
<li
*ngIf=
"statistics
?
.views > config.views[0] && statistics
?
.views <= config.views[1]"
<li
*ngIf=
"statistics
.views && statistics
.views > config.views[0] && statistics.views <= config.views[1]"
class=
"list-group-item justify-content-between align-items-center"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -36,8 +36,8 @@
<div
class=
"col-9"
>
<div
class=
"row"
>
<div
class=
"col-11"
>
<ngb-progressbar
type=
"success"
[value]=
"statistics
?
.views / config.views[1] * 100"
[striped]=
"true"
>
{{statistics
?
.views}}
<ngb-progressbar
type=
"success"
[value]=
"statistics.views / config.views[1] * 100"
[striped]=
"true"
>
{{statistics.views}}
</ngb-progressbar>
</div>
<div
class=
"col-1"
>
...
...
@@ -48,7 +48,7 @@
</div>
</div>
</li>
<li
*ngIf=
"statistics
?
.views <= config.views[0]"
<li
*ngIf=
"statistics
.views && statistics
.views <= config.views[0]"
class=
"list-group-item justify-content-between align-items-center"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -58,8 +58,8 @@
<div
class=
"col-9"
>
<div
class=
"row"
>
<div
class=
"col-11"
>
<ngb-progressbar
type=
"success"
[value]=
"statistics
?
.views / config.views[0] * 100"
[striped]=
"true"
>
{{statistics
?
.views}}
<ngb-progressbar
type=
"success"
[value]=
"statistics.views / config.views[0] * 100"
[striped]=
"true"
>
{{statistics.views}}
</ngb-progressbar>
</div>
<div
class=
"col-1"
>
...
...
@@ -70,7 +70,7 @@
</div>
</div>
</li>
<li
*ngIf=
"statistics
?
.downloads > config.downloads[1] && statistics
?
.downloads <= config.downloads[2]"
<li
*ngIf=
"statistics
.downloads && statistics
.downloads > config.downloads[1] && statistics.downloads <= config.downloads[2]"
class=
"list-group-item justify-content-between align-items-center"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -81,8 +81,8 @@
<div
class=
"row"
>
<div
class=
"col-11"
>
<ngb-progressbar
type=
"success"
[value]=
"statistics
?
.downloads / config.downloads[2] * 100"
[striped]=
"true"
>
{{statistics
?
.downloads}}
[value]=
"statistics.downloads / config.downloads[2] * 100"
[striped]=
"true"
>
{{statistics.downloads}}
</ngb-progressbar>
</div>
<div
class=
"col-1"
>
...
...
@@ -93,7 +93,7 @@
</div>
</div>
</li>
<li
*ngIf=
"statistics
?
.downloads > config.downloads[0] && statistics
?
.downloads <= config.downloads[1]"
<li
*ngIf=
"statistics
.downloads && statistics
.downloads > config.downloads[0] && statistics.downloads <= config.downloads[1]"
class=
"list-group-item justify-content-between align-items-center"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -104,8 +104,8 @@
<div
class=
"row"
>
<div
class=
"col-11"
>
<ngb-progressbar
type=
"success"
[value]=
"statistics
?
.downloads / config.downloads[1] * 100"
[striped]=
"true"
>
{{statistics
?
.downloads}}
[value]=
"statistics.downloads / config.downloads[1] * 100"
[striped]=
"true"
>
{{statistics.downloads}}
</ngb-progressbar>
</div>
<div
class=
"col-1"
>
...
...
@@ -117,7 +117,7 @@
</div>
</div>
</li>
<li
*ngIf=
"statistics
?
.downloads <= config.downloads[0]"
<li
*ngIf=
"statistics
.downloads && statistics
.downloads <= config.downloads[0]"
class=
"list-group-item justify-content-between align-items-center"
>
<div
class=
"container"
>
<div
class=
"row"
>
...
...
@@ -128,8 +128,8 @@
<div
class=
"row"
>
<div
class=
"col-11"
>
<ngb-progressbar
type=
"success"
[value]=
"statistics
?
.downloads / config.downloads[0] * 100"
[striped]=
"true"
>
{{statistics
?
.downloads}}
[value]=
"statistics.downloads / config.downloads[0] * 100"
[striped]=
"true"
>
{{statistics.downloads}}
</ngb-progressbar>
</div>
<div
class=
"col-1"
>
...
...
@@ -142,7 +142,9 @@
</div>
</li>
</ul>
<div
*ngIf=
"statistics?.downloads > config.downloads[2] && statistics?.views > config.views[2]"
>
{{ 'achievements.finished' | translate}}
</div>
<div
*ngIf=
"statistics.downloads && statistics.downloads > config.downloads[2] && statistics.views && statistics.views > config.views[2]"
>
{{ 'achievements.finished' | translate}}
</div>
<p></p>
<h3>
{{ 'achievements.completed' | translate}}
</h3>
...
...
@@ -151,22 +153,21 @@
<div
class=
" justify-content-between align-items-center"
>
<fa-icon
*ngIf=
"statistics
?
.views > config.views[0] || statistics
?
.downloads > config.downloads[0]"
<fa-icon
*ngIf=
"
(
statistics
.views && statistics
.views > config.views[0]
)
||
(
statistics
.downloads && statistics
.downloads > config.downloads[0]
)
"
[ngbTooltip]=
"helpViewsBronze"
icon=
"trophy"
class=
"bronzeiconcolor big-icon"
></fa-icon>
<ng-template
#helpViewsBronze
>
Bronce achievements
</ng-template>
<ng-template
#helpViewsBronze
>
Bronze achievements
</ng-template>
<div
class=
"justify-content-between align-items-center"
>
<div
class=
"badge"
*ngIf=
"statistics
?
.views > config.views[0]"
>
<div
class=
"badge"
*ngIf=
"statistics
.views && statistics
.views > config.views[0]"
>
{{ 'achievements.moreThan' | translate}} {{config.views[0]}} {{ 'achievements.views' |
translate}}
</div>
<br>
<div
class=
"badge"
*ngIf=
"statistics
?
.downloads > config.downloads[0]"
>
<div
class=
"badge"
*ngIf=
"statistics
.downloads && statistics
.downloads > config.downloads[0]"
>
{{ 'achievements.moreThan' | translate}} {{config.downloads[0]}} {{ 'achievements.downloads' |
translate}}
</div>
...
...
@@ -177,21 +178,21 @@
<div
class=
"justify-content-between align-items-center"
>
<fa-icon
*ngIf=
"statistics
?
.views > config.views[1] || statistics
?
.downloads > config.downloads[1]"
<fa-icon
*ngIf=
"
(
statistics
.views && statistics
.views > config.views[1]
)
||
(
statistics
.downloads && statistics
.downloads > config.downloads[1]
)
"
[ngbTooltip]=
"helpViewsSilver"
icon=
"trophy"
class=
"silvericoncolor big-icon"
></fa-icon>
<ng-template
#helpViewsSilver
>
Silver Achievements
</ng-template>
<div
class=
"justify-content-between align-items-center"
>
<div
class=
"badge"
*ngIf=
"statistics
?
.views > config.views[1]"
>
<div
class=
"badge"
*ngIf=
"statistics
.views && statistics
.views > config.views[1]"
>
{{ 'achievements.moreThan' | translate}} {{config.views[1]}} {{ 'achievements.views' |
translate}}
</div>
<br>
<div
class=
"badge"
*ngIf=
"statistics
?
.downloads > config.downloads[1]"
>
<div
class=
"badge"
*ngIf=
"statistics
.downloads && statistics
.downloads > config.downloads[1]"
>
{{ 'achievements.moreThan' | translate}} {{config.downloads[1]}} {{ 'achievements.downloads' |
translate}}
</div>
...
...
@@ -205,21 +206,21 @@
<div
class=
" justify-content-between align-items-center"
>
<fa-icon
*ngIf=
"statistics
?
.views > config.views[2] || statistics
?
.downloads > config.downloads[2]"
<fa-icon
*ngIf=
"
(
statistics
.views && statistics
.views > config.views[2]
)
||
(
statistics
.downloads && statistics
.downloads > config.downloads[2]
)
"
[ngbTooltip]=
"helpViewsGold"
icon=
"trophy"
class=
"goldiconcolor big-icon"
></fa-icon>
<ng-template
#helpViewsGold
>
Gold Achievements
</ng-template>
<div
class=
"justify-content-between align-items-center"
>
<div
class=
"badge"
*ngIf=
"statistics
?
.views > config.views[2]"
>
<div
class=
"badge"
*ngIf=
"statistics
.views && statistics
.views > config.views[2]"
>
{{ 'achievements.moreThan' | translate}} {{config.views[2]}} {{ 'achievements.views' |
translate}}
</div>
<br>
<div
class=
"badge"
*ngIf=
"statistics
?
.downloads > config.downloads[2]"
>
<div
class=
"badge"
*ngIf=
"statistics
.downloads && statistics
.downloads > config.downloads[2]"
>
{{ 'achievements.moreThan' | translate}} {{config.downloads[2]}} {{ 'achievements.downloads' |
translate}}
</div>
...
...
@@ -228,5 +229,7 @@
</div>
</div>
<div
*ngIf=
"statistics?.downloads < config.downloads[0] && statistics?.views < config.views[0]"
>
{{ 'achievements.none' | translate}}
</div>
</div>
\ No newline at end of file
<div
*ngIf=
"(!statistics.downloads || statistics.downloads < config.downloads[0]) && (!statistics.views || statistics.views < config.views[0])"
>
{{ 'achievements.none' | translate}}
</div>
</div>
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment