@extends('layouts.master') @push('css') @endpush @section('content')
@if ($akses['create'])
Tambah user
@endif

@if (Session::has('message'))
{{ Session::get('message.text') }}
@endif {!! Form::open(['url' => url()->current(), 'method' => 'GET']) !!}
{!! Form::text('cari', Request::get('cari'), ['class' => 'form-control', 'placeholder' => 'Cari...']) !!}
{!! Form::close() !!}
@foreach ($user as $usr) @endforeach
No Nama Email Role - Departemen / Perusahaan Jabatan Foto TTD Action
{{ $loop->iteration + $user->firstItem() - 1 }} {{ $usr->name }} {{ $usr->email }}
    @if ($usr->myRole()->exists()) @foreach ($usr->myRole as $role)
  • {{-- {{$role->role->name}} | {{ @$usr->divisis()->where('user_role_id',$role->id)->first()->divisi->name ?? "-" }} --}} {{ $role->role->name }} | @foreach ($usr->divisis()->has('divisi')->where('user_role_id', $role->id)->get() as $item) {{ @$item->divisi->name ?? 'Data Di Hapus' }} | @endforeach
      @foreach ($usr->perusahaans()->where('user_role_id', $role->id)->get() as $item)
    • {{ @$item->perusahaan->name ?? 'Data Di Hapus' }}
    • @endforeach
  • @endforeach @endif
{{ $usr->jabatan }} @if (!is_null($usr->ttd)) @endif {!! Form::open(['route' => ['user.destroy', $usr->id], 'method' => 'DELETE']) !!} @if ($akses['edit']) @endif @if ($usr->id != 1) @if ($usr->hasRole('superadmin')) @if ($count_superadmin > 1) @if ($akses['delete']) @endif @endif @else @if ($akses['delete']) @endif @endif @endif {!! Form::close() !!}
{!! $user->links() !!}
@endsection @push('js') @endpush