Keluarga

@if ($user->gender_id == 1) @else @endif
Ayah @can ('edit', $currentUser) @if (request('action') == 'set_father') {{ Form::open(['route' => ['family-actions.set-father', $user->id]]) }} {!! FormField::select('set_father_id', $malePersonList, ['label' => false, 'value' => $user->father_id, 'placeholder' => 'Pilih dari Laki-laki Terdaftar']) !!}
{{ Form::text('set_father', null, ['class' => 'form-control input-sm', 'placeholder' => 'Input Nama Baru...']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_father_button']) }} {{ link_to_route('users.show', 'Batal', [$user->id], ['class' => 'btn btn-default btn-sm']) }}
{{ Form::close() }} @else @if ($user->father_id) {{ $user->father->profileLink() }} @endif
{{ link_to_route('users.show', 'Set Ayah', [$user->id, 'action' => 'set_father'], ['class' => 'btn btn-link btn-xs']) }}
@endif @else @if ($user->father_id) {{ $user->father->profileLink() }} @endif @endcan
Ibu @can ('edit', $currentUser) @if (request('action') == 'set_mother') {{ Form::open(['route' => ['family-actions.set-mother', $user->id]]) }} {!! FormField::select('set_mother_id', $femalePersonList, ['label' => false, 'value' => $user->mother_id, 'placeholder' => 'Pilih dari Laki-laki Terdaftar']) !!}
{{ Form::text('set_mother', null, ['class' => 'form-control input-sm', 'placeholder' => 'Input Nama Baru...']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_mother_button']) }} {{ link_to_route('users.show', 'Batal', [$user->id], ['class' => 'btn btn-default btn-sm']) }}
{{ Form::close() }} @else @if ($user->mother_id) {{ $user->mother->profileLink() }} @endif
{{ link_to_route('users.show', 'Set Ibu', [$user->id, 'action' => 'set_mother'], ['class' => 'btn btn-link btn-xs']) }}
@endif @else @if ($user->mother_id) {{ $user->mother->profileLink() }} @endif @endcan
Orang Tua @can ('edit', $currentUser)
@if (request('action') == 'set_parent') {{ link_to_route('users.show', 'Batal', [$user->id], ['class' => 'btn btn-default btn-xs']) }} @else {{ link_to_route('users.show', 'Set Orang Tua', [$user->id, 'action' => 'set_parent'], ['class' => 'btn btn-link btn-xs']) }} @endif
@endcan @if ($user->parent) {{ $user->parent->husband->name }} & {{ $user->parent->wife->name }} @endif @can('edit', $currentUser) @if (request('action') == 'set_parent') {{ Form::open(['route' => ['family-actions.set-parent', $user->id]]) }} {!! FormField::select('set_parent_id', $allMariageList, ['label' => false, 'value' => $user->parent_id, 'placeholder' => 'Pilih Pasangan Pernikahan']) !!} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_parent_button']) }} {{ Form::close() }} @endif @endcan
Isteri @can ('edit', $currentUser)
@if (request('action') == 'add_spouse') {{ link_to_route('users.show', 'Batal', [$user->id], ['class' => 'btn btn-default btn-xs']) }} @else {{ link_to_route('users.show', 'Tambah Isteri', [$user->id, 'action' => 'add_spouse'], ['class' => 'btn btn-link btn-xs']) }} @endif
@endcan @if ($user->wifes->isEmpty() == false)
    @foreach($user->wifes as $wife)
  • {{ $wife->profileLink() }}
  • @endforeach
@endif @can('edit', $currentUser) @if (request('action') == 'add_spouse')
{{ Form::open(['route' => ['family-actions.add-wife', $user->id]]) }} {!! FormField::select('set_wife_id', $femalePersonList, ['label' => false, 'placeholder' => 'Pilih dari Wanita Terdaftar']) !!}
{{ Form::text('set_wife', null, ['class' => 'form-control input-sm', 'placeholder' => 'Input Nama Baru...']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_wife_button']) }}
{{ Form::close() }}
@endif @endcan
Suami @can ('edit', $currentUser)
@if (request('action') == 'add_spouse') {{ link_to_route('users.show', 'Batal', [$user->id], ['class' => 'btn btn-default btn-xs']) }} @else {{ link_to_route('users.show', 'Tambah Suami', [$user->id, 'action' => 'add_spouse'], ['class' => 'btn btn-success btn-xs']) }} @endif
@endcan @if ($user->husbands->isEmpty() == false)
    @foreach($user->husbands as $husband)
  • {{ $husband->profileLink() }}
  • @endforeach
@endif @can('edit', $currentUser) @if (request('action') == 'add_spouse')
{{ Form::open(['route' => ['family-actions.add-husband', $user->id]]) }} {!! FormField::select('set_husband_id', $malePersonList, ['label' => false, 'placeholder' => 'Pilih dari Laki-Laki Terdaftar']) !!}
{{ Form::text('set_husband', null, ['class' => 'form-control input-sm', 'placeholder' => 'Input Nama Baru...']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_husband_button']) }}
{{ Form::close() }}
@endif @endcan