diff --git a/SystemKonkursow/4.2.1/angular/src/app/competition-create/competition-create.component.ts b/SystemKonkursow/4.2.1/angular/src/app/competition-create/competition-create.component.ts index 854c05d..80ff62b 100644 --- a/SystemKonkursow/4.2.1/angular/src/app/competition-create/competition-create.component.ts +++ b/SystemKonkursow/4.2.1/angular/src/app/competition-create/competition-create.component.ts @@ -82,7 +82,6 @@ export class CompetitionCreateComponent extends AppComponentBase implements OnIn } public saveCompetition(): void { - console.log('Save competition'); if ((this.createCompetition.maxClass < this.createCompetition.minClass) || (!this.createCompetition.startDate) diff --git a/SystemKonkursow/4.2.1/angular/src/app/competition-detail/competition-detail.component.ts b/SystemKonkursow/4.2.1/angular/src/app/competition-detail/competition-detail.component.ts index 61e971b..a447c6c 100644 --- a/SystemKonkursow/4.2.1/angular/src/app/competition-detail/competition-detail.component.ts +++ b/SystemKonkursow/4.2.1/angular/src/app/competition-detail/competition-detail.component.ts @@ -54,7 +54,6 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn this.routeSubscription = this.route.params .subscribe(params => { this.competitionId = +params['id']; - console.log('competitionId: ' + this.competitionId); this.getCompetition(); }) @@ -71,13 +70,10 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn this.competition = data[0]; this.competition.questions.forEach((x) => this.shuffleOptions(x.questionOptions)); this.pager.count = this.competition.questions.length; - console.log(this.competition); this.canSolveCompetition = data[1]; - console.log(this.canSolveCompetition); this.ranking = data[2]; - console.log(this.ranking); }); } @@ -97,7 +93,6 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn } public solveCompetition(): void { - console.log('Solve Competition'); this.mode = 'quiz'; } @@ -108,7 +103,6 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn public onSelect(question: QuestionDto, option: QuestionOptionDto) { question.questionOptions.forEach((x) => { if (x.id !== option.id) x.selected = false; }); - console.log(question); } public goTo(index: number) { @@ -131,7 +125,6 @@ export class CompetitionDetailComponent extends AppComponentBase implements OnIn ) points += 1; }); - console.log('Points: ' + points); let rankingPosition = new CreateRankingPositionDto(); rankingPosition.competitionId = this.competitionId; diff --git a/SystemKonkursow/4.2.1/angular/src/app/competitions-list/competitions-list.component.ts b/SystemKonkursow/4.2.1/angular/src/app/competitions-list/competitions-list.component.ts index 9465d0d..44a1e2c 100644 --- a/SystemKonkursow/4.2.1/angular/src/app/competitions-list/competitions-list.component.ts +++ b/SystemKonkursow/4.2.1/angular/src/app/competitions-list/competitions-list.component.ts @@ -67,12 +67,10 @@ export class CompetitionsListComponent extends AppComponentBase implements OnIni return competitionListStream })).subscribe((result: List) => { this.competitionsList = result; - console.log(this.competitionsList); }); } public goToDetail(competition: CompetitionDto): void { - console.log(this.router.url); const route: string = this.router.url + `/competitions/${competition.id}`; //const route: string = `app/competitions/${competition.id}`; this.router.navigate([route]); diff --git a/SystemKonkursow/4.2.1/angular/src/app/home/home.component.css b/SystemKonkursow/4.2.1/angular/src/app/home/home.component.css new file mode 100644 index 0000000..24e5a3e --- /dev/null +++ b/SystemKonkursow/4.2.1/angular/src/app/home/home.component.css @@ -0,0 +1,3 @@ +h2 { + color: #771111; +} \ No newline at end of file diff --git a/SystemKonkursow/4.2.1/angular/src/app/home/home.component.html b/SystemKonkursow/4.2.1/angular/src/app/home/home.component.html index 15c7d80..31edcd7 100644 --- a/SystemKonkursow/4.2.1/angular/src/app/home/home.component.html +++ b/SystemKonkursow/4.2.1/angular/src/app/home/home.component.html @@ -1,310 +1,7 @@ -
+
-
-

MOJE KONKURSY

-
- - -
-
-
-
- playlist_add_check -
-
-
NEW TASKS
-
-
-
-
-
-
-
- help -
-
-
NEW TICKETS
-
-
-
-
-
-
-
- forum -
-
-
NEW COMMENTS
-
-
-
-
-
-
-
- person_add -
-
-
NEW VISITORS
-
-
-
-
-
- - -
-
-
-
-
-
-

CPU USAGE (%)

-
-
-
- REAL TIME - -
-
-
- -
-
-
-
-
-
-
- -
- -
-
-
-
- 12,10,9,6,5,6,10,5,7,5,12,13,7,12,11 -
-
    -
  • - TODAY - 1 200 USERS -
  • -
  • - YESTERDAY - 3 872 USERS -
  • -
  • - LAST WEEK - 26 582 USERS -
  • -
-
-
-
- - -
-
-
-
LATEST SOCIAL TRENDS
-
    -
  • - #socialtrends - - trending_up - -
  • -
  • - #materialdesign - - trending_up - -
  • -
  • #adminbsb
  • -
  • #freeadmintemplate
  • -
  • #bootstraptemplate
  • -
  • - #freehtmltemplate - - trending_up - -
  • -
-
-
-
- - -
-
-
-
ANSWERED TICKETS
-
    -
  • - TODAY - 12 TICKETS -
  • -
  • - YESTERDAY - 15 TICKETS -
  • -
  • - LAST WEEK - 90 TICKETS -
  • -
  • - LAST MONTH - 342 TICKETS -
  • -
  • - LAST YEAR - 4 225 TICKETS -
  • -
  • - ALL - 8 752 TICKETS -
  • -
-
-
-
- -
-
- -
-
-
-

TASK INFOS

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#TaskStatusManagerProgress
1Task ADoingJohn Doe -
-
-
-
2Task BTo DoJohn Doe -
-
-
-
3Task COn HoldJohn Doe -
-
-
-
4Task DWait ApprovelJohn Doe -
-
-
-
5Task E - Suspended - John Doe -
-
-
-
-
-
-
-
- - -
-
-
-

BROWSER USAGE

- -
-
-
-
-
-
- +
+

MOJE KONKURSY

\ No newline at end of file diff --git a/SystemKonkursow/4.2.1/angular/src/app/home/home.component.ts b/SystemKonkursow/4.2.1/angular/src/app/home/home.component.ts index 09bac73..b1deef7 100644 --- a/SystemKonkursow/4.2.1/angular/src/app/home/home.component.ts +++ b/SystemKonkursow/4.2.1/angular/src/app/home/home.component.ts @@ -1,12 +1,13 @@ -import { Component, Injector, AfterViewInit } from '@angular/core'; +import { Component, Injector, OnInit } from '@angular/core'; import { AppComponentBase } from '@shared/app-component-base'; import { appModuleAnimation } from '@shared/animations/routerTransition'; @Component({ templateUrl: './home.component.html', + styleUrls: ['./home.component.css'], animations: [appModuleAnimation()] }) -export class HomeComponent extends AppComponentBase implements AfterViewInit { +export class HomeComponent extends AppComponentBase implements OnInit { constructor( injector: Injector @@ -14,122 +15,7 @@ export class HomeComponent extends AppComponentBase implements AfterViewInit { super(injector); } - ngAfterViewInit(): void { - - $(function () { - //Widgets count - $('.count-to').countTo(); - - //Sales count to - $('.sales-count-to').countTo({ - formatter: function (value, options) { - return '$' + value.toFixed(2).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, ' ').replace('.', ','); - } - }); - - initRealTimeChart(); - initDonutChart(); - initSparkline(); - }); - - var realtime = 'on'; - function initRealTimeChart() { - //Real time ========================================================================================== - var plot = ($ as any).plot('#real_time_chart', [getRandomData()], { - series: { - shadowSize: 0, - color: 'rgb(0, 188, 212)' - }, - grid: { - borderColor: '#f3f3f3', - borderWidth: 1, - tickColor: '#f3f3f3' - }, - lines: { - fill: true - }, - yaxis: { - min: 0, - max: 100 - }, - xaxis: { - min: 0, - max: 100 - } - }); - - function updateRealTime() { - plot.setData([getRandomData()]); - plot.draw(); - - var timeout; - if (realtime === 'on') { - timeout = setTimeout(updateRealTime, 320); - } else { - clearTimeout(timeout); - } - } - - updateRealTime(); - - $('#realtime').on('change', function () { - realtime = (this as any).checked ? 'on' : 'off'; - updateRealTime(); - }); - //==================================================================================================== - } - - function initSparkline() { - $(".sparkline").each(function () { - var $this = $(this); - $this.sparkline('html', $this.data()); - }); - } - - function initDonutChart() { - ((window as any).Morris).Donut({ - element: 'donut_chart', - data: [{ - label: 'Chrome', - value: 37 - }, { - label: 'Firefox', - value: 30 - }, { - label: 'Safari', - value: 18 - }, { - label: 'Opera', - value: 12 - }, - { - label: 'Other', - value: 3 - }], - colors: ['rgb(233, 30, 99)', 'rgb(0, 188, 212)', 'rgb(255, 152, 0)', 'rgb(0, 150, 136)', 'rgb(96, 125, 139)'], - formatter: function (y) { - return y + '%' - } - }); - } - - var data = [], totalPoints = 110; - function getRandomData() { - if (data.length > 0) data = data.slice(1); - - while (data.length < totalPoints) { - var prev = data.length > 0 ? data[data.length - 1] : 50, y = prev + Math.random() * 10 - 5; - if (y < 0) { y = 0; } else if (y > 100) { y = 100; } - - data.push(y); - } - - var res = []; - for (var i = 0; i < data.length; ++i) { - res.push([i, data[i]]); - } - - return res; - } + public ngOnInit(): void { + } } diff --git a/SystemKonkursow/4.2.1/angular/src/app/pipe/filter-classes.pipe.ts b/SystemKonkursow/4.2.1/angular/src/app/pipe/filter-classes.pipe.ts index 04f9dff..1aa8e44 100644 --- a/SystemKonkursow/4.2.1/angular/src/app/pipe/filter-classes.pipe.ts +++ b/SystemKonkursow/4.2.1/angular/src/app/pipe/filter-classes.pipe.ts @@ -6,7 +6,6 @@ import { CompetitionDto } from '@shared/service-proxies/service-proxies'; export class FilterClassesPipe implements PipeTransform { transform(allCompetitions: CompetitionDto[], args?: any) { - console.log(args); let minClass = args[0]; let maxClass = args[1]; return allCompetitions diff --git a/SystemKonkursow/4.2.1/angular/src/shared/service-proxies/service-proxies.ts b/SystemKonkursow/4.2.1/angular/src/shared/service-proxies/service-proxies.ts index d6d5979..6e35199 100644 --- a/SystemKonkursow/4.2.1/angular/src/shared/service-proxies/service-proxies.ts +++ b/SystemKonkursow/4.2.1/angular/src/shared/service-proxies/service-proxies.ts @@ -2671,7 +2671,7 @@ export interface ICreateRankingPositionDto { } export class RankingPositionDto implements IRankingPositionDto { - participantName: number | undefined; + participantName: string | undefined; competitionId: number | undefined; points: number | undefined; id: number | undefined; @@ -2719,7 +2719,7 @@ export class RankingPositionDto implements IRankingPositionDto { } export interface IRankingPositionDto { - participantName: number | undefined; + participantName: string | undefined; competitionId: number | undefined; points: number | undefined; id: number | undefined; diff --git a/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/CompetitionBuilder.cs b/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/CompetitionBuilder.cs index 064f7a9..ce7cd32 100644 --- a/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/CompetitionBuilder.cs +++ b/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/CompetitionBuilder.cs @@ -16,7 +16,7 @@ namespace SystemKonkursow.EntityFrameworkCore.Seed public void Create() { - if (null != _context.CompetitionCategories.FirstOrDefault()) + if (null != _context.Categories.FirstOrDefault()) return; CreateOneCategory("Matematyka"); @@ -45,31 +45,32 @@ namespace SystemKonkursow.EntityFrameworkCore.Seed Name = name }; - var competitions = new List { }; + //var competitions = new List { }; - for (int competitionId = 1; competitionId < CompetitionsNumber; competitionId++) - { - var exampleCompetition = new Domain.Competition - { - CreatorUserId = 3, - Name = name + " : konkurs nr " + competitionId, - StartDate = new DateTime(2019, rnd.Next(1, 4), rnd.Next(1, 29)), - EndDate = new DateTime(2019, rnd.Next(4, 7), rnd.Next(1, 31)), - Description = "Opis konkursu nr " + competitionId + " z kategorii: " + name, - Prize = "Opis nagród dla konkursu nr " + competitionId + " z kategorii: " + name, - MinClass = rnd.Next(1, 5), - MaxClass = rnd.Next(5, 9) - }; + //for (int competitionId = 1; competitionId < CompetitionsNumber; competitionId++) + //{ + // var exampleCompetition = new Domain.Competition + // { + // CreatorUserId = 3, + // Name = name + " : konkurs nr " + competitionId, + // StartDate = new DateTime(2019, rnd.Next(1, 4), rnd.Next(1, 29)), + // EndDate = new DateTime(2019, rnd.Next(4, 7), rnd.Next(1, 31)), + // Description = "Opis konkursu nr " + competitionId + " z kategorii: " + name, + // Prize = "Opis nagród dla konkursu nr " + competitionId + " z kategorii: " + name, + // MinClass = rnd.Next(1, 5), + // MaxClass = rnd.Next(5, 9) + // }; - var exampleCompetitionCategory = new Domain.CompetitionCategory() - { - Category = exampleCategory, - Competition = exampleCompetition - }; + // var exampleCompetitionCategory = new Domain.CompetitionCategory() + // { + // Category = exampleCategory, + // Competition = exampleCompetition + // }; - _context.CompetitionCategories.Add(exampleCompetitionCategory); - } - + // _context.CompetitionCategories.Add(exampleCompetitionCategory); + //} + + _context.Categories.Add(exampleCategory); _context.SaveChanges(); } diff --git a/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/UserBuilder.cs b/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/UserBuilder.cs index 37cc801..0a146f7 100644 --- a/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/UserBuilder.cs +++ b/SystemKonkursow/4.2.1/aspnet-core/src/SystemKonkursow.EntityFrameworkCore/EntityFrameworkCore/Seed/UserBuilder.cs @@ -40,6 +40,7 @@ namespace SystemKonkursow.EntityFrameworkCore.Seed }); CreateUser(new List { participantRole }, "Jerzy", "Nowak", "uczestnik", "uczestnik@example.com", true); + CreateUser(new List { participantRole }, "Piotr", "Lewandowski", "nowy_uczestnik", "nowy_uczestnik@example.com", true); } private Role CreateRole(string roleName, IList permissionList)