Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrobo committed Mar 10, 2024
1 parent 5eb7f97 commit 86fd639
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion process.env
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ LIMITER_MAX=50

# ENV
# STG or PROD
ENVIRONMENT=PROD
ENVIRONMENT=PROD
NODE_ENV=production
9 changes: 3 additions & 6 deletions public/javascripts/admin/competition.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ app.controller("CompetitionAdminController", ['$scope', '$http', function ($scop
window.location = path
}
$http.get("/api/competitions/" + competitionId).then(function (response) {
$scope.competition = response.data
$scope.competition = response.data;
$scope.leagues = response.data.leagues;
})

$http.get("/api/competitions/leagues").then(function (response) {
$scope.leagues = response.data;
});

$scope.leagueImage = function (league) {
switch (league.id) {
switch (league.league) {
case 'LineNL':
return "LineNL";
case 'MazeNL':
Expand Down
4 changes: 2 additions & 2 deletions views/admin/competition.pug
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ block content
img.card-img-top(ng-src="/images/leagues/{{leagueImage(league)}}.png" style="width:100%; height:auto;")
.card-body(style="z-index: 2;")
h3.card-title {{league.name}}
button(ng-disabled="league.type == 'simulation'" ng-click="go('/admin/' + competitionId + '/' + league.id + '/maps')" class='btn btn-dark btn-lg btn-block' style="margin-bottom:10px;")
button(ng-disabled="league.type == 'simulation'" ng-click="go('/admin/' + competitionId + '/' + league.league + '/maps')" class='btn btn-dark btn-lg btn-block' style="margin-bottom:10px;")
i.fas.fa-ruler-combined.fa-2x
br
span {{"admin.competition.maps" | translate}}
button(ng-click="go('/admin/' + competitionId + '/' + league.id + '/games')" class='btn btn-dark btn-lg btn-block' style="margin-bottom:10px;")
button(ng-click="go('/admin/' + competitionId + '/' + league.league + '/games')" class='btn btn-dark btn-lg btn-block' style="margin-bottom:10px;")
i.fas.fa-clipboard-list.fa-2x
br
span {{"admin.competition.runs" | translate}}
Expand Down

0 comments on commit 86fd639

Please sign in to comment.