@extends('layouts.app') @section('content')
Profile : {{ $currentUser->name ?: $currentUser->nickname }}
Nama Panggilan {{ $currentUser->nickname }}
Nama {{ $currentUser->profileLink() }}
Jenis Kelamin {{ $currentUser->gender }}
Ayah @if ($currentUser->father_id) {{ $currentUser->father->profileLink() }} @else {{ Form::open(['route' => ['family-actions.set-father', $currentUser->id]]) }} {!! FormField::select('set_father_id', $malePersonList, ['label' => false]) !!}
{{ Form::text('set_father', null, ['class' => 'form-control input-sm']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_father_button']) }}
{{ Form::close() }} @endif
Ibu @if ($currentUser->mother_id) {{ $currentUser->mother->profileLink() }} @else {{ Form::open(['route' => ['family-actions.set-mother', $currentUser->id]]) }} {!! FormField::select('set_mother_id', $femalePersonList, ['label' => false]) !!}
{{ Form::text('set_mother', null, ['class' => 'form-control input-sm']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_mother_button']) }}
{{ Form::close() }} @endif
Keluarga
@if ($currentUser->gender_id == 1) @else @endif
Isteri @if ($currentUser->wifes->isEmpty() == false)
    @foreach($currentUser->wifes as $wife)
  • {{ $wife->profileLink() }}
  • @endforeach
@else {{ Form::open(['route' => ['family-actions.add-wife', $currentUser->id]]) }} {!! FormField::select('set_wife_id', $femalePersonList, ['label' => false]) !!}
{{ Form::text('set_wife', null, ['class' => 'form-control input-sm']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_wife_button']) }}
{{ Form::close() }} @endif
Suami @if ($currentUser->husbands->isEmpty() == false)
    @foreach($currentUser->husbands as $husband)
  • {{ $husband->profileLink() }}
  • @endforeach
@else {{ Form::open(['route' => ['family-actions.add-husband', $currentUser->id]]) }} {!! FormField::select('set_husband_id', $malePersonList, ['label' => false]) !!}
{{ Form::text('set_husband', null, ['class' => 'form-control input-sm']) }} {{ Form::submit('update', ['class' => 'btn btn-info btn-sm', 'id' => 'set_husband_button']) }}
{{ Form::close() }} @endif
Anak-Anak
    @foreach($currentUser->childs as $child)
  • {{ $child->profileLink() }} ({{ $child->gender }})
  • @endforeach
  • {{ Form::open(['route' => ['family-actions.add-child', $currentUser->id]]) }}
    {!! FormField::text('add_child_name', ['label' => 'Nama Anak']) !!}
    {!! FormField::radios('add_child_gender_id', [1 => 'Laki-laki', 2 => 'Perempuan'], ['label' => 'Jenis Kelamin Anak']) !!}
    {!! FormField::select('add_child_parent_id', $usersMariageList, ['label' => 'Dari Pernikahan']) !!}
    {{ Form::submit('Tambah Anak', ['class' => 'btn btn-success btn-sm']) }} {{ Form::close() }}
@if (count($errors) > 0)
@endif
@endsection