@extends('layout.app') @php $checkRole = checkRoleAlready(); @endphp @section('_style') @endsection @section('content')

{{$title}}


@if (isset($customer)) {!! Form::model($customer, array('url' => url('customers/'.$customer->id), 'method' => 'put', 'files'=> true, 'id'=>'fvalidate','autocomplete'=>'off')) !!} @else {!! Form::open(array('url' => route('customers.store'), 'method' => 'post', 'files'=> true, 'id'=>'fvalidate','autocomplete'=>'off')) !!} @endif
{!! Form::label('full_name', 'Tên KH', array('class' => 'control-label')) !!} {!! Form::text('full_name', null, array('class' => 'form-control')) !!} {{ $errors->first('full_name', ':message') }}
{!! Form::label('phone', 'Số điện thoại', array('class' => 'control-label')) !!} {!! Form::text('phone', null, array('id' => 'phone','class' => 'form-control')) !!} {{ $errors->first('phone', ':message') }}
@if (isset($customer))
{!! Form::label('membership', 'Mã thành viên (MEMBERSHIP)') !!} {!! Form::text('membership', null, array('id' => 'membership','maxLength'=>9,'class' => 'form-control')) !!} {{ $errors->first('membership', ':message') }}
{!! Form::label('fb_name', 'Tên Facebook') !!} {!! Form::text('fb_name', null, array('id' => 'fb_name','class' => 'form-control')) !!} {{ $errors->first('fb_name', ':message') }}
@endif
{!! Form::label('birthday', 'Ngày sinh') !!}
{!! Form::text('birthday', null, array('class' => 'form-control fc-datepicker')) !!}
{{ $errors->first('birthday', ':message') }}
{!! Form::label('description', 'Mô tả') !!} {!! Form::text('description', null, array('id' => 'description','class' => 'form-control')) !!} {{ $errors->first('description', ':message') }}
{!! Form::label('gender', 'Giới tính', array('class' => 'control-label')) !!} {!! 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('genitive_id', 'Nhóm tính cách') !!}--}} {{--{!! Form::select('genitive_id',$genitives, null, array('class' => 'form-control select2', 'placeholder' => 'Chọn nhóm tính cách')) !!}--}} {{--{{ $errors->first('genitive_id', ':message') }}--}} {{--
--}} {{--
--}} @if(empty($checkRole))
{!! Form::label('branch_id', 'Chi nhánh',['class'=>'required']) !!} {!! Form::select('branch_id',$branchs, null, array('class' => 'form-control select2', 'placeholder' => 'Tất cả chi nhánh')) !!} {{ $errors->first('branch_id', ':message') }}
@else @endif
{!! Form::label('telesales_id', 'Người phụ trách', array('class' => 'control-label required')) !!} {{ $errors->first('telesales_id', ':message') }}
{!! Form::label('status_id', 'Trạng thái', array('class' => 'control-label')) !!} {!! Form::select('status_id', $status, @$customer->status_id, array('class' => 'form-control select2')) !!} {{ $errors->first('status_id', ':message') }}
{!! Form::label('facebook', 'Link Facebook') !!} {!! Form::text('facebook', null, array('id' => 'facebook','class' => 'form-control')) !!} {{ $errors->first('facebook', ':message') }}
{!! Form::label('group_id', 'Nhóm khách hàng', array('class' => 'required control-label')) !!} @if(isset($customer)) @else {!! Form::select('group_id[]', $group, null, array('class' => 'form-control select2', 'multiple' => 'multiple', 'data-placeholder'=> "Chọn nhóm khách hàng" )) !!} {{ $errors->first('group_id', ':message') }} @endif
{!! Form::label('source_id', 'Nguồn khách hàng', array('class' => 'required control-label')) !!} {!! Form::select('source_id', $source, @$customer->source_id, array('class' => 'form-control select2', 'placeholder' => 'Nguồn khách hàng')) !!} {{ $errors->first('source_id', ':message') }}
{!! Form::label('avatar', 'Ảnh đại diện') !!}
@if (isset($customer)) image @endif
{{ Form::close() }}
@endsection @section('_script') @endsection