Commit e1382a8b by Aan Choesni Herlingga

bug fix team

parent b661a232
......@@ -16,7 +16,7 @@ class PersonController extends Controller
$pick = Setting::where('name_setting', 'team')->first();
$listTeam = null;
$listTeam = [];
if ($pick) {
$listTeam = $this->listTeam($pick->value_setting);
}
......
......@@ -78,18 +78,20 @@ class PersonController extends Controller
{
$pick = Setting::where('name_setting', 'team')->first();
$listTeam = null;
$listTeam = [];
if ($pick) {
$listTeam = $this->listTeam($pick->value_setting);
}
$team = [];
if ($listTeam) {
if ($name == 'lecturer') {
$team = $listTeam[1];
} elseif ($name == 'academic-staff') {
$team = $listTeam[0];
}
}
return $team;
}
......
......@@ -29,7 +29,7 @@
<div class="form-group @if ($errors->has('value_setting')) has-error @endif">
<label class="col-md-2 control-label">@lang('label.name') @lang('feature.setting')</label>
<div class="col-md-10">
{{ Form::select('value_setting', $unit, $pick->value_setting, ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'value_setting', 'placeholder' => app('translator')->getFromJson('feature.category'), 'required']) }}
{{ Form::select('value_setting', $unit, $pick ? $pick->value_setting : null, ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'value_setting', 'placeholder' => app('translator')->getFromJson('feature.category'), 'required']) }}
@if ($errors->has('value_setting'))
<label id="login-error" class="error" for="login">{{$errors->first('value_setting')}}</label>
@endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment