Skip to content
This repository was archived by the owner on Jul 6, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MatSelectModule } from '@angular/material/select';
import { MatChipsModule } from '@angular/material/chips';
import { MatMenuModule } from '@angular/material/menu';
import { MatIconModule } from '@angular/material/icon';
import { MatCheckboxModule } from '@angular/material';
import { MatCheckboxModule, MatSliderModule } from '@angular/material';

// Import serivces
import { AuthService } from './services/auth.service';
Expand Down Expand Up @@ -166,7 +166,8 @@ import { ResetPasswordConfirmComponent } from './components/auth/reset-password-
MatIconModule,
MatTableModule,
MatDividerModule,
MatCheckboxModule
MatCheckboxModule,
MatSliderModule
],
providers: [
AuthService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,5 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit {
() => {}
);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
</div>
</div>
<br>
<div class="row settings-section">
<span class="fw-regular col-lg-3">Precision Value:</span>
<mat-slider class="col-lg-9" thumbLabel [displayWith]="formatLabel" min="1.2" max="2" step="0.1" value="1.5"></mat-slider>
</div>
<div class="row settings-section">
<div class="col-lg-3 col-md-4 col-sm-3 col-xs-3">
<span class="fw-regular">Banned emails Ids:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@
.error-message {
color: $highlight;
}

mat-slider {
width: 500px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ export class ChallengesettingsComponent implements OnInit {
removable = true;
addOnBlur = true;


/**
* Leaderboard precision value
*/
leaderbord_decimal_precision_value = 2;

/**
* Input to edit the banned participants emails
*/
Expand Down Expand Up @@ -152,4 +158,22 @@ export class ChallengesettingsComponent implements OnInit {
() => {}
);
}

/**
* getPrecisionValue
*/
public getPrecisionValue(num) {
if (num === '') {
return '1.2-2';
} else {
return '1.' + num + '-' + num;
}
}

/**
* Precision slider value
*/
formatLabel(value: number) {
return value;
}
}