@extends('layouts.app') @section('title', __( 'user.add_user' )) @section('content')

@lang( 'user.add_user' )

@if (!empty($video) && auth()->user()->can('edu_videos.view')) @include('video.video_button', ['fileName' => $video ]) @endif
@php $enabled_user_modules = (array)(!empty(session('business.enabled_user_modules')) ? session('business.enabled_user_modules') : []); @endphp {!! Form::open(['url' => action([\App\Http\Controllers\ManageUserController::class, 'store']), 'method' => 'post', 'id' => 'user_add_form' ]) !!}
@component('components.widget')
{!! Form::label('surname', __( 'business.prefix' ) . ':') !!} {!! Form::text('surname', null, ['class' => 'form-control', 'placeholder' => __( 'business.prefix_placeholder' ) ]); !!}
{!! Form::label('first_name', __( 'business.first_name' ) . ':*') !!} {!! Form::text('first_name', null, ['class' => 'form-control', 'required', 'placeholder' => __( 'business.first_name' ) ]); !!}
{!! Form::label('last_name', __( 'business.last_name' ) . ':') !!} {!! Form::text('last_name', null, ['class' => 'form-control', 'placeholder' => __( 'business.last_name' ) ]); !!}
{!! Form::label('email', __( 'business.email' ) . ':*') !!} {!! Form::text('email', null, ['class' => 'form-control', 'required', 'placeholder' => __( 'business.email' ) ]); !!}

@show_tooltip(__('lang_v1.tooltip_enable_user_active'))


@show_tooltip(__('lang_v1.is_sales_user'))

@show_tooltip(__('lang_v1.tooltip_is_enable_service_staff_pin'))
{!! Form::label('service_staff_pin', __( 'lang_v1.staff_pin' ) . ':') !!} {!! Form::password('service_staff_pin', ['class' => 'form-control', 'required' => true, 'placeholder' => __( 'lang_v1.staff_pin' ) ]); !!}
@endcomponent
@component('components.widget', ['title' => __('lang_v1.roles_and_permissions')])
{!! Form::label('username', __( 'business.username' ) . ':') !!} @if(!empty($username_ext))
{!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => __( 'business.username' ) ]); !!} {{$username_ext}}

@else {!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => __( 'business.username' ) ]); !!} @endif

@lang('lang_v1.username_help')

{!! Form::label('password', __( 'business.password' ) . ':*') !!} {!! Form::password('password', ['class' => 'form-control', 'required', 'placeholder' => __( 'business.password' ) ]); !!}
{!! Form::label('confirm_password', __( 'business.confirm_password' ) . ':*') !!} {!! Form::password('confirm_password', ['class' => 'form-control', 'required', 'placeholder' => __( 'business.confirm_password' ) ]); !!}
{!! Form::label('role', __( 'user.role' ) . ':*') !!} @show_tooltip(__('lang_v1.admin_role_location_permission_help')) {!! Form::select('role', $roles, null, ['class' => 'form-control select2']); !!}

@lang( 'role.access_locations' ) @show_tooltip(__('tooltip.access_locations_permission'))

@show_tooltip(__('tooltip.all_location_permission'))
@foreach($locations as $location)
@endforeach
@endcomponent
@component('components.widget', ['title' => __('lang_v1.roles_of_show_products')])
{!! Form::label('category', __( 'category.categories' ) . ':*') !!} @show_tooltip(__('lang_v1.products_by_categories')) {!! Form::select('category[]', $categories, null, ['class' => 'form-control select2' , 'multiple' , 'id' => 'categories_select']); !!}
{!! Form::label('brand', __( 'brand.brands' ) . ':*') !!} @show_tooltip(__('lang_v1.products_by_brands')) {!! Form::select('brand[]', $brands, null, ['class' => 'form-control select2' , 'multiple' , 'id' => 'brands_select']); !!}
@endcomponent
@component('components.widget', ['title' => __('lang_v1.show_accounts_permissions')])
{!! Form::label('accounts', __( 'lang_v1.accounts' ) . ':*') !!} @show_tooltip(__('lang_v1.show_accounts_by_permissions')) {!! Form::select('accounts[]', $accounts, null, [ 'class' => 'form-control select2', 'multiple', 'id' => 'accounts_select' ]) !!}
{!! Form::label('defult_account', __( 'lang_v1.defult_account' ) . ':*') !!} @show_tooltip(__('lang_v1.show_the_defult_acconut')) {!! Form::select('defult_account', [null => 'لا أحد'] + $accounts->toArray(), null, [ 'class' => 'form-control select2', 'id' => 'defult_account_select' ]) !!}
@endcomponent
@component('components.widget', ['title' => __('sale.sells')])
{!! Form::label('cmmsn_percent', __( 'lang_v1.cmmsn_percent' ) . ':') !!} @show_tooltip(__('lang_v1.commsn_percent_help')) {!! Form::text('cmmsn_percent', null, ['class' => 'form-control input_number', 'placeholder' => __( 'lang_v1.cmmsn_percent' ) ]); !!}
{!! Form::label('max_sales_discount_percent', __( 'lang_v1.max_sales_discount_percent' ) . ':') !!} @show_tooltip(__('lang_v1.max_sales_discount_percent_help')) {!! Form::text('max_sales_discount_percent', null, ['class' => 'form-control input_number', 'placeholder' => __( 'lang_v1.max_sales_discount_percent' ) ]); !!}

@show_tooltip(__('lang_v1.allow_selected_contacts_tooltip'))
{!! Form::label('invoice_layout_id', __('lang_v1.invoice_layout_for_pos') . ':') !!} @show_tooltip(__('tooltip.invoice_layout')) {!! Form::select('invoice_layout_id', $invoice_layouts, null, ['class' => 'form-control', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('user_allowed_contacts', __('lang_v1.selected_contacts') . ':') !!}
{!! Form::select('selected_contact_ids[]', [], null, ['class' => 'form-control select2', 'multiple', 'style' => 'width: 100%;', 'id' => 'user_allowed_contacts' ]); !!}
@endcomponent
@if(in_array('enable_more_info_section', $enabled_user_modules)) @include('user.edit_profile_form_part') @endif @if(!empty($form_partials)) @foreach($form_partials as $partial) {!! $partial !!} @endforeach @endif
{!! Form::close() !!} @include('video.video_modal') @stop @section('javascript') @endsection