Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kite Competition Dashboard #15

Merged
merged 28 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a63a78b
feat:add kite competition map feature
Hirushan99 Jun 26, 2024
119ac56
chore: style lint fixes
Hirushan99 Jun 26, 2024
d5bda89
chore: style lint fixes
Hirushan99 Jun 26, 2024
1528fd3
create kite competition leaderboard
Hirushan99 Jul 2, 2024
29dab18
create kite competition leaderboard
Hirushan99 Jul 2, 2024
da08757
create-kite-competition-leaderboard
Hirushan99 Jul 2, 2024
419fb6e
create-kite-competition-dashboard
Hirushan99 Jul 4, 2024
6fe0f40
create-kite-competition-leaderboard
Hirushan99 Jul 5, 2024
aec6d16
create-kite-competition-leaderboard
Hirushan99 Jul 5, 2024
0524531
create-kite-competition-leaderboard
Hirushan99 Jul 5, 2024
1805436
create-kite-competition-leaderboard
Hirushan99 Jul 5, 2024
68ff681
styles: Update leader board styles
chethana-dissanayka Jul 10, 2024
541c1e0
feat: add kite competition dashboard cards
chethana-dissanayka Jul 19, 2024
6b805bf
Fix: fixed card code structure errors
chethana-dissanayka Jul 19, 2024
965d80e
styles: updated styles in pages
chethana-dissanayka Jul 19, 2024
a325630
fix: fix precipitation chart
chethana-dissanayka Jul 20, 2024
7ded7f0
Merge branch 'dev' of github.com:gaveshalabs/weatherkids-data-portal …
lihini Jul 22, 2024
f49f93e
Create kite competition dashboard (#12)
Hirushan99 Jul 22, 2024
90e7037
styles: change map style
chethana-dissanayka Jul 22, 2024
ad40fc1
Merge branch 'create-kite-competition-map' of https://github.com/gave…
chethana-dissanayka Jul 22, 2024
d254012
Feat: add new dashboard card
chethana-dissanayka Jul 28, 2024
b309ea4
Merge branch 'dev' of github.com:gaveshalabs/weatherkids-data-portal …
lihini Jul 28, 2024
b124054
Kite competition Dashboard (#14)
lihini Jul 28, 2024
857bf5e
Merge branch 'main' into dev
chethana-dissanayka Jul 29, 2024
661a66b
feat: add new dashboard card for more details
chethana-dissanayka Jul 29, 2024
3b9ac01
styles: update card styles
chethana-dissanayka Jul 29, 2024
9d93a7c
Merge branch 'dev' into create-kite-competition-map
chethana-dissanayka Jul 29, 2024
18b5c89
Merge pull request #16 from gaveshalabs/create-kite-competition-map
lihini Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*.launch
.settings/
*.sublime-workspace
.vs/

# IDE - VSCode
.vscode/*
Expand Down
1 change: 1 addition & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
}],
"selector-type-case": "lower",
"selector-max-id": 0

}
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",
"tslint.enable": false
"tslint.enable": false,
"cSpell.words": [
"Leaderboard"
]
}
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,6 @@
}
},
"cli": {
"analytics": false
"analytics": "29f70058-d263-4554-a80f-c6f6fc73a030"
}
}
}
101 changes: 101 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"chart.js": "^4.4.1",
"chartjs-adapter-moment": "^1.0.1",
"core-js": "2.5.1",
"echarts": "^5.5.1",
"eva-icons": "^1.1.3",
"firebase": "^9.23.0",
"firebase-tools": "^12.9.1",
Expand All @@ -63,7 +64,9 @@
"leaflet": "^1.9.4",
"moment": "^2.29.4",
"nebular-icons": "1.1.0",
"ng-circle-progress": "^1.7.1",
"ng2-charts": "^5.0.4",
"ngx-echarts": "^18.0.0",
"node-sass": "^8.0.0",
"normalize.css": "6.0.0",
"pace-js": "1.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="best-player-container">
<div class="best-place-div">
<h2><i class="fas fa-crown" style="color: gold;"></i></h2>
</div>
<div (click)="goToPlayerIntroduction(bestPlayer)" style="cursor: pointer;">
<div class="best-img-circle">
<img [src]="getImageUrl(bestPlayer.img_url)">
<!-- <img [src]="bestPlayer.img_url" alt="Best Player Avatar"> -->
</div>
<div class="best-player-details-div">
<span class="best-player-name-span">{{bestPlayer.name}}</span><br />
<br />
<span class="best-player-nickname-span">@{{bestPlayer.city}}</span><br />
<br />
<span class="best-player-kite-height-span">{{bestPlayer.kite_height | number:'1.0-0' }}</span>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.best-player-container{
width: 150px;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 10px ;
}

.best-place-div h6{
color: white;
}

.best-img-circle {
width: 120px;
height: 120px;
border: 5px solid rgb(188, 196, 27);
border-radius: 50%;
overflow: hidden;
display: flex;
background:radial-gradient(var(rgb(188, 196, 27)),transparent,transparent);

}

.best-img-circle img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;

}

.best-player-details-div{
display: flex;
flex-direction: column;
font-size: 20px;
font-weight: bolder;
color: black;
text-align: center;
margin-top: 15px;
line-height: 0.4;
}

.best-player-nickname-span{
display: flex;
flex-direction: column;
font-size: 14px;
font-weight: 100;
color: white;
}

.best-player-name-span{
display: flex;
flex-direction: column;
font-size: 16px;
font-weight: 500;
color: white;
}

.best-player-kite-height-span{
display: flex;
flex-direction: column;
font-size: 16px;
font-weight: bolder;
color: rgb(219, 156, 11);
}

.best-place-div{
margin-bottom: -8px;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BestPlayerComponent } from './best-player.component';

describe('BestPlayerComponent', () => {
let component: BestPlayerComponent;
let fixture: ComponentFixture<BestPlayerComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [BestPlayerComponent],
});
fixture = TestBed.createComponent(BestPlayerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { Player } from '../leaderboard.interface';

@Component({
selector: 'ngx-best-player',
templateUrl: './best-player.component.html',
styleUrls: ['./best-player.component.scss'],
})
export class BestPlayerComponent {
@Input() bestPlayer: Player;

constructor(private router: Router) {}

goToPlayerIntroduction(player: Player) {
this.router.navigate(['/kite/player', player.id ,
{
state: {
player,
},
},
]);
}

getImageUrl(imgUrl: string): string {
// Check if the imgUrl is already in the desired format
if (imgUrl.startsWith('assets/avatars/Avatar_Icons/')) {
return imgUrl;
}

// Extract the filename from the full imgUrl
const filename = imgUrl.substring(imgUrl.lastIndexOf('/') + 1);

// Construct the mock data-like URL
const mockDataUrl = `assets/avatars/Avatar_Icons/${filename}`;

return mockDataUrl;
}

}
Loading
Loading