diff --git a/app/Http/Controllers/ChallengeController.php b/app/Http/Controllers/ChallengeController.php index eca6adb6..6afb3e3d 100644 --- a/app/Http/Controllers/ChallengeController.php +++ b/app/Http/Controllers/ChallengeController.php @@ -121,7 +121,7 @@ public function index(Request $request) { ) * 100) - COALESCE((select participation_rate from historical_challenge_pages where year = ? -- and historical_challenge_pages.organization_name = A.organization_name and historical_challenge_pages.business_unit_code = A.business_unit_code - ),0) desc + ),0) SQL; @@ -147,7 +147,7 @@ public function index(Request $request) { and D1.as_of_date <= ? ) and eligible_employee_count >= 5 - order by participation_rate desc, abs(change_rate) desc; + order by participation_rate desc, abs(change_rate); SQL; $challenges = DB::select($sql, $parameters); @@ -170,7 +170,7 @@ public function index(Request $request) { from historical_challenge_pages, (SELECT @row_number:=0) AS temp where year = ? and donors >= 5 - order by participation_rate desc, abs(`change`) desc; + order by participation_rate desc, abs(`change`); SQL; $challenges = DB::select($sql, $parameters); diff --git a/resources/views/challenge/index.blade.php b/resources/views/challenge/index.blade.php index 57567e2a..aaac4c99 100644 --- a/resources/views/challenge/index.blade.php +++ b/resources/views/challenge/index.blade.php @@ -1,13 +1,5 @@ -@php - function ordinal($number) { - $ends = array('th','st','nd','rd','th','th','th','th','th','th'); - if ((($number % 100) >= 11) && (($number%100) <= 13)) - return $number. 'th'; - else - return $number. $ends[$number % 10]; - } -@endphp @extends('adminlte::page') + @section('content_header')

Challenge

@@ -26,8 +18,8 @@ function ordinal($number) { If you have questions about PECSF statistics, send us an e-mail at PECSF@gov.bc.ca.
@endsection -@section('content') +@section('content')
@@ -216,6 +208,10 @@ function addCommas(nStr) serverSide: true, select: true, paging: false, + "initComplete": function(settings, json) { + min_height = $(".wrapper").height(); + $(".main-sidebar").css('min-height', min_height); + }, ajax: { url: '{!! route('challenge.index') !!}', data: function (data) {