@extends('layout.app') @section('_style') @endsection @section('content')
@if (isset($user)) {!! Form::model($user, array('url' => url('users/'.$user->id), 'method' => 'put', 'files'=> true,'id'=>'fvalidate')) !!} @else {!! Form::open(array('url' => route('users.store'), 'method' => 'post', 'files'=> true,'id'=>'fvalidate')) !!} @endif
{!! Form::label('full_name', 'Tên người dùng', array('class' => ' required')) !!} {!! Form::text('full_name', null, array('class' => 'form-control')) !!} {{ $errors->first('full_name', ':message') }}
{!! Form::label('phone', 'Số điện thoại', array('class' => ' required')) !!} {!! Form::number('phone', null, array('id' => 'phone','class' => 'form-control')) !!} {{ $errors->first('phone', ':message') }}
{!! Form::label('name_display', 'Tên xuất báo cáo', array('class' => '')) !!} {!! Form::text('name_display', null, array('class' => 'form-control')) !!} {{ $errors->first('branch_id', ':message') }}
{!! Form::label('branch_id', 'Chi nhánh') !!} {{ $errors->first('branch_id', ':message') }}
{{--
--}} {{--
--}} {{--{!! Form::label('email', 'Email', array('class' => ' required')) !!}--}} {{--{!! Form::email('email', null, array('id' => 'email', 'class' => 'form-control')) !!}--}} {{--{{ $errors->first('email', ':message') }}--}} {{--
--}} {{--
--}}
{!! Form::label('password', 'Mật khẩu', array('class' => ' required')) !!} {{ $errors->first('password', ':message') }}
{!! Form::label('confirm_password', 'Nhập lại mật khẩu', array('class' => ' required')) !!} {{ $errors->first('confirm_password', ':message') }}
{!! Form::label('gender', 'Giới tính', array('class' => ' required')) !!} {!! Form::select('gender',[0 => 'Nữ', 1 => 'Nam'], null, array('class' => 'form-control select2', 'placeholder' => 'Chọn giới tính')) !!} {{ $errors->first('gender', ':message') }}
{!! Form::label('', 'Mã máy tổng đài (nếu có)') !!} department_id!=\App\Constants\UserConstant::ADMIN ?'disabled':'name=caller_number'}} > {{ $errors->first('caller_number', ':message') }}
{!! Form::label('', 'Mã NV') !!} {{ $errors->first('code', ':message') }}
{!! Form::label('', 'Mã chấm công (nếu có)') !!} {{ $errors->first('approval_code', ':message') }}
@if(\Illuminate\Support\Facades\Auth::user()->department_id==\App\Constants\UserConstant::ADMIN)
{!! Form::label('department_id', 'Phòng ban', array('class' => ' required')) !!} {!! Form::select('department_id', $departments, null, array('id'=>'departments','class' => 'form-control select2', 'placeholder' => 'Phòng ban')) !!} {{ $errors->first('branch_id', ':message') }}
{!! Form::label('role', 'Quyền', array('class' => ' required')) !!} {{ $errors->first('role', ':message') }}
@endif
{!! Form::label('location_id', 'Chọn cụm', array('class' => '')) !!} {{ $errors->first('branch_id', ':message') }}
{!! Form::label('avatar', 'Ảnh đại diện', array('class' => ' required')) !!}
@if (isset($user)) image @endif
{{ Form::close() }}
@endsection @section('_script') @endsection