@section('page_title') OSAA - Reimbursements @stop @section('page_sub_title') OSAA State Championship Reimbursements for {{ Session::get('year') }}-{{ substr(intval(Session::get('year')) + 1, 2, 2) }} @stop @section('scripts') @parent @stop @section('jquery_init') if(!window.console) { window.console = { log: $.noop, group: $.noop, groupEnd: $.noop }; } // Success bar $('.success_bar').animate({ 'top' : 32, 'background-color' : 'rgba(176, 255, 190, 1.0)'}, 1600, 'easeOutQuad', function () { $(this).delay(6000).fadeOut(4000); $(this).hover(function () { $(this).stop(true).css('opacity', '1.0'); }, function () { $(this).fadeOut(4000); }) }); var divisions = {{ json_encode($info['team_sport_divisions']) }}; $('#sport').on('change', function() { // Get the selected activity var select = $(this); var activity = $('option:selected', select).val(); // Get this newly selected activity's divisions var options = divisions[activity]; // Get the division select var div_select = $('#division'); // Clear out all options $('option', div_select).remove(); var division_default = ""; @if (Input::has('division')) division_default = "{{ Input::get('division') }}"; @endif @if (Session::has('division')) division_default = "{{ Session::get('division') }}"; @endif console.log(division_default); // Add options from the new list of divisions $.each(options, function(value, text) { var option = $('') .attr('value', value) .html(text); if (division_default == value) { option.attr('selected', 'selected'); } option.appendTo(div_select); }); div_select.focus(); }).change(); /* * Close button */ $('.close_button') .button({'icons':{'primary':'ui-icon-circle-close'}}) .css({'font-size':'9pt'}); /* * Team sports submit button */ $('#team_sports_form .submit_button') .button() .css({'font-size':'9pt'}) .click(function () { // Submit the form $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '250px') .css('height', '180px') .css('text-align', 'center') .css('padding', '0.5em') .position({my : "center center", at : "center center", of : window}) .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front') .html('
Calculating Reimbursements...

Please wait while reimbursements are calculated, this may take a while to process...
'); $(this).parents('form').submit(); }); /* * Team sports missing addresses button */ $('#team_sports_form .missing_button') .button() .css({'font-size':'9pt'}) .click(function () { var button = $(this); button.blur(); $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .attr('data-check', 1) .css('width', '300px') .css('height', '170px') .css('text-align', 'center') .css('padding', '0.5em') .position({my : "center center", at : "center center", of : window}) .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front') .html('
Checking Missing Addresses...

Please wait while the database checks for any missing addresses, this may take a while to process...
'); var form = $(this).parents('form'); var url = form.attr('action'); // Get a form check var jqxhr = $.ajax( { type : 'POST', url : url + '?' + form.serialize() + '&missing=1', dataType : 'html' }) .done(function (data) { $('[data-check]').remove(); $('
') .appendTo('body') .dialog( { draggable : true, resizable : false, height : 280, width : 600, modal : true, title : 'Missing Address Report', open : function () { var dialog_object = $(this); var html = data; dialog_object.html(html); $('.close_button', dialog_object) .button({'icons' : {'secondary' : 'ui-icon-circle-close'}}) .css({'font-size' : '9pt'}) .click(function(event) { event.preventDefault(); dialog_object.dialog('close'); }) .focus(); }, close : function () { var dialog_object = $(this); $(dialog_object).remove(); } }); }) .fail(function (jqXHR, status, error) { var response = jqXHR.responseText; var errorData = $.parseJSON(response); //console.log(errorData); alert("There was an error checking for missing addresses.\n\n" + errorData.error.message + "\n\nThis page will be reloaded."); location.reload(); }); }); /* * Team sports bracket button */ $('#team_sports_form .bracket_button') .button() .css({'font-size':'9pt'}) .click(function () { var button = $(this); var form = $(this).parents('form'); var sport = $('#sport option:selected').val(); sport = sport.toLowerCase(); var division = $('#division option:selected').val(); var url = '{{ url('/activities') }}/' + sport + '/brackets?div=' + division; window.open(url); }); // Team sports view report button $('#team_sports_form .view_button') .button() .css({'font-size':'9pt'}) .click(function () { var button = $(this); var form = $(this).parents('form'); var url = button.attr('data-href'); url += '?' + form.serialize(); window.open(url); }); /* * Individual sports submit button */ $('#individual_sports_form .submit_button') .button() .css({'font-size':'9pt'}) .click(function () { // Submit the form $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '250px') .css('height', '180px') .css('text-align', 'center') .css('padding', '0.5em') .position({my : "center center", at : "center center", of : window}) .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front') .html('
Calculating Reimbursements...

Please wait while reimbursements are calculated, this may take a while to process...
'); $(this).parents('form').submit(); }); // Individual sports view report button $('#individual_sports_form .view_button') .button() .css({'font-size':'9pt'}) .click(function () { var button = $(this); var form = $(this).parents('form'); var url = button.attr('data-href'); url += '?' + form.serialize(); window.open(url); }); /* * Activity sports submit button */ $('#activity_sports_form .submit_button') .button() .css({'font-size':'9pt'}) .click(function () { // Submit the form $('
') .attr('data-check', 1) .addClass('ui-widget-overlay ui-front') .appendTo('body'); $('
').appendTo('body') .css('width', '250px') .css('height', '180px') .css('text-align', 'center') .css('padding', '0.5em') .position({my : "center center", at : "center center", of : window}) .addClass('ui-dialog ui-widget ui-widget-content ui-corner-all ui-front') .html('
Calculating Reimbursements...

Please wait while reimbursements are calculated, this may take a while to process...
'); $(this).parents('form').submit(); }); // Activity sports view report button $('#activity_sports_form .view_button') .button() .css({'font-size':'9pt'}) .click(function () { var button = $(this); var form = $(this).parents('form'); var url = button.attr('data-href'); url += '?' + form.serialize(); window.open(url); }); /* * School summary report button */ $('.school_summary_botton') .button() .css({'font-size':'8pt'}) .click(function () { var button = $(this); var season = button.attr('data-season'); var url = '{{ url('/reimburse/season') }}/' + season + '/school-detail'; window.open(url); }); /* * Season summary report button */ $('.season_summary_botton') .button() .css({'font-size':'8pt','margin-right':'25px'}) .click(function () { var button = $(this); var season = button.attr('data-season'); var url = '{{ url('/reimburse/season') }}/' + season + '/summary?csv=true'; window.open(url); }); /* * Season summary report button (PDF version) */ $('.season_summary_pdf_botton') .button() .css({'font-size':'8pt','margin-right':'25px'}) .click(function () { var button = $(this); var season = button.attr('data-season'); var url = '{{ url('/reimburse/season') }}/' + season + '/summary'; window.open(url); }); @stop @section('page_functions') Close @stop @section('main_content') {{-- Success Bar --}} @if (Session::has('success'))
{{ Session::get('success') }}
@endif {{-- Errors --}} @if (Session::has('errors'))
@foreach ($errors->all() as $error) {{ $error }} @endforeach
@endif

Team Sports

{{ Form::open(array('url' => url('/reimburse/calculate/team'), 'method' => 'POST', 'id' => 'team_sports_form')) }}

Team Sport

{{ Form::label('sport', 'Select', array('style' => 'font-weight: bold;')) }} {{ Form::select('sport', $info['team_sports'], null, array('id' => 'sport')) }}

Division

{{ Form::label('division', 'Select', array('style' => 'font-weight: bold;')) }} {{ Form::select('division', reset($info['team_sport_divisions']), null, array('id' => 'division')) }}

Options



Missing Addresses
View Bracket
Calculate
View Report
{{ Form::close() }}

Individual Sports

{{ Form::open(array('url' => url('/reimburse/calculate/individual'), 'method' => 'POST', 'files' => true, 'id' => 'individual_sports_form')) }}

Individual Sport

{{ Form::label('individual_sport', 'Select', array('style' => 'font-weight: bold;')) }} {{ Form::select('individual_sport', $info['individual_sports'], null, array('id' => 'individual_sport')) }}

File to Upload

{{ Form::label('upload_file', 'Data File', array('style' => 'font-weight: bold;')) }} {{ Form::file('upload_file', array('style' => '')) }}

Options



Calculate
View Report
{{ Form::close() }}

Activities

{{ Form::open(array('url' => url('/reimburse/calculate/activity'), 'method' => 'POST', 'files' => true, 'id' => 'activity_sports_form')) }}

Activity

{{ Form::label('activity_sport', 'Select', array('style' => 'font-weight: bold;')) }} {{ Form::select('activity_sport', $info['activity_sports'], null, array('id' => 'activity_sport')) }}

File to Upload

{{ Form::label('upload_file', 'Data File', array('style' => 'font-weight: bold;')) }} {{ Form::file('upload_file', array('style' => '')) }}

Options



Calculate
View Report


{{ Form::close() }}

Season Information

@foreach (array('F' => 'Fall', 'W' => 'Winter', 'S' => 'Spring') as $season_slug => $season_name)

{{ $season_name }} Status

Summary Report:
CSV
PDF


School Detail Report:
PDF


@foreach ($info['season_activities'][$season_slug] as $activity_slug) @endforeach
Activity 6A 5A 4A 3A 2A 1A
- - 
@endforeach
@stop