/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $report_dates = ReportDate::lists('petsa', 'id');
     $saving_graduate = SavingGraduate::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($saving_graduate->subsector->id)->lists('name', 'id');
     return view('tviadmin.saving_graduates.edit', compact('saving_graduate', 'sectors', 'subsectors', 'report_dates'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $report_dates = ReportDate::lists('petsa', 'id');
     $job_placement_graduate = JobPlacementGraduate::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($job_placement_graduate->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($job_placement_graduate->occupation->id)->lists('name', 'id');
     return view('tviadmin.job_placement_graduates.edit', compact('job_placement_graduate', 'sectors', 'subsectors', 'occupations', 'report_dates'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $report_dates = ReportDate::lists('petsa', 'id');
     $dropout_shortterm = DropoutShortTermTrainee::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($dropout_shortterm->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($dropout_shortterm->occupation->id)->lists('name', 'id');
     return view('tviadmin.dropout_short_term.edit', compact('dropout_shortterm', 'sectors', 'subsectors', 'occupations', 'report_dates'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $user = Auth::user();
     $report_dates = ReportDate::lists('petsa', 'id');
     $industry_extension1 = IndustryExtension1::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($industry_extension1->subsector->id)->lists('name', 'id');
     return view('tviadmin.industry_extension1s.edit', array('industry_extension1' => $industry_extension1, 'report_dates' => $report_dates, 'sectors' => $sectors, 'subsectors' => $subsectors));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $report_dates = ReportDate::lists('petsa', 'id');
     $cooperative_training_transferee = CooperativeTrainingTransferee::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($cooperative_training_transferee->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($cooperative_training_transferee->occupation->id)->lists('name', 'id');
     return view('tviadmin.cooperative_training_transferees.edit', compact('cooperative_training_transferee', 'sectors', 'subsectors', 'occupations', 'report_dates'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $report_dates = ReportDate::lists('petsa', 'id');
     $assessment_transferee = AssessmentTransferee::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($assessment_transferee->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($assessment_transferee->occupation->id)->lists('name', 'id');
     return view('tviadmin.assessment_transferees.edit', compact('assessment_transferee', 'sectors', 'subsectors', 'occupations', 'report_dates'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $user = Auth::user();
     $report_dates = ReportDate::lists('petsa', 'id');
     $graduate = Graduate::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($graduate->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($graduate->occupation->id)->lists('name', 'id');
     return view('tviadmin.graduates.edit', compact('graduate', 'sectors', 'subsectors', 'occupations', 'report_dates'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $user = Auth::user();
     $report_dates = ReportDate::lists('petsa', 'id');
     $assessment = Assessment::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($assessment->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($assessment->occupation->id)->lists('name', 'id');
     return view('tviadmin.assessments.edit', array('assessment' => $assessment, 'report_dates' => $report_dates, 'sectors' => $sectors, 'subsectors' => $subsectors, 'occupations' => $occupations));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $user = Auth::user();
     $report_dates = ReportDate::lists('petsa', 'id');
     $formal_training = FormalTraining::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($formal_training->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($formal_training->occupation->id)->lists('name', 'id');
     return view('tviadmin.formal_trainings.edit', array('formal_training' => $formal_training, 'report_dates' => $report_dates, 'sectors' => $sectors, 'subsectors' => $subsectors, 'occupations' => $occupations));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $user = Auth::user();
     $report_dates = ReportDate::lists('petsa', 'id');
     $short_term_training = ShortTermTraining::findOrFail($id);
     $sectors = Sector::all()->lists('name', 'id');
     $subsectors = Subsector::findOrFail($short_term_training->occupation->subsector->id)->lists('name', 'id');
     $occupations = Occupation::findOrFail($short_term_training->occupation->id)->lists('name', 'id');
     $competencies = Occupation::findOrFail($short_term_training->occupation->id)->competencies()->lists('name', 'id');
     return view('tviadmin.short_term_trainings.edit', array('short_term_training' => $short_term_training, 'report_dates' => $report_dates, 'sectors' => $sectors, 'subsectors' => $subsectors, 'occupations' => $occupations, 'competencies' => $competencies));
 }
 public function subsectors()
 {
     $sub_sectors = Subsector::whereIn('id', Occupation::select('subsector_id')->whereIn('id', Trainer::select('occupation_id')->where('report_date_id', $this->report_date_id)->where('institution_id', $this->institution_id)->distinct()->lists('occupation_id'))->distinct()->lists('subsector_id'))->get();
     return $sub_sectors;
 }
Example #12
0
Route::filter('tvi', function () {
    if (!Auth::check() || !Auth::user()->isTVIAdmin()) {
        /*return App::abort(404);*/
        return redirect('/auth/login');
    }
});
Route::group(array('middleware' => 'auth'), function () {
    Route::get('load-sub-sectors', function () {
        $input = Input::get('option');
        $sector = \App\Sector::find($input);
        $subsectors = $sector->subsectors()->where('active', true)->orderBy('name', 'asc');
        return Response::make($subsectors->get(['id', 'name']));
    });
    Route::get('load-occupations', function () {
        $input = Input::get('option');
        $subsector = \App\Subsector::find($input);
        $occupations = $subsector->occupations()->where('active', true)->orderBy('name', 'asc');
        return Response::make($occupations->get(['id', 'name']));
    });
    Route::get('load-competencies', function () {
        $input = Input::get('option');
        $occupation = \App\Occupation::find($input);
        $competencies = $occupation->competencies()->where('active', true)->orderBy('name', 'asc');
        return Response::make($competencies->get(['id', 'name']));
    });
});
// RTA Admin routes...
Route::group(array('before' => 'rta', 'middleware' => 'auth'), function () {
    // Institutions
    Route::get('rta-institutions', 'RTA\\RTAController@institutions');
    Route::get('rta-institutions/{id}', 'RTA\\RTAController@school_profile');
Example #13
0
<?php

$sectors = \App\Sector::orderBy('name', 'asc')->get();
?>

<div class="col-md-8 col-md-offset-2">

@if($submitButtonText=='Update')

    <?php 
$subsectors = \App\Sector::find($sector_id)->subsectors->sortBy('name')->lists('name', 'id');
$occupations = \App\Subsector::find($subsector_id)->occupations->sortBy('name')->lists('name', 'id');
?>

    <div class="form-group">
            {!! Form::label('name', 'Competency Name : ') !!}
            {!! Form::text('name', null, ['placeholder' => 'Competency Name',
                                          'class' => 'form-control',
                                          'value' => '{{ old("name") }}']) !!}
        </div>

        <div class="form-group">
            {!! Form::label('code', 'Competency Code : ') !!}
            {!! Form::text('code', null, ['placeholder' => 'Competency Code',
                                          'class' => 'form-control',
                                          'value' => '{{ old("code") }}']) !!}
        </div>

        <div class="form-group">
            {!! Form::label('active', 'Is Active? : ') !!}
            {!! Form::select('active', array('1' => 'True',
Example #14
0
 public function for_print_rpt1_non_gov_drop_grad($id)
 {
     $user = Auth::user();
     $region = Region::findOrFail($user->region_id);
     $report_date = ReportDate::findOrFail($id);
     $rpt1 = new RTAReport1NonGovernment($report_date->id, $user->region_id);
     // get occupations
     $occupations = Occupation::whereIn('id', DropoutGraduate::select('occupation_id')->where('report_date_id', $id)->whereIn('institution_id', Institution::select('id')->where('region_id', $region->id)->where('ownership', '!=', 'Public')->lists('id'))->lists('occupation_id'))->orderBy('name')->get();
     // get sectors
     $sectors = Sector::whereIn('id', Subsector::select('sector_id')->whereIn('id', $occupations->lists('subsector_id'))->get())->get();
     // get subsectors
     $subsectors = Subsector::whereIn('id', $occupations->lists('subsector_id'))->get();
     return view('rtaadmin.print_rpt1nongov_7', compact('rpt1', 'region', 'report_date', 'sectors', 'subsectors', 'occupations'));
 }
 public function delete($id)
 {
     $subsector = Subsector::findOrFail($id);
     return view('sysadmin.subsectors.delete', compact('subsector'));
 }