@extends('layouts.app_settings') @section('title', __( 'user.edit_user' )) @section("css") @stop @section('offcanvas-title',__('lang_v1.instructions')) @section('offcanvas-end') @stop @section('content')
{!! Form::open(['url' => action([\App\Http\Controllers\ManageUserController::class, 'update'], [$user->id]), 'method' => 'PUT', 'id' => 'user_edit_form' ]) !!}
@component('components.widget', ['class' => 'card'])
{!! Form::label('surname', __( 'business.prefix' ) . ':') !!} {!! Form::text('surname', $user->surname, ['class' => 'form-control', 'placeholder' => __( 'business.prefix_placeholder' ) ]); !!}
{!! Form::label('first_name', __( 'business.first_name' ) ) !!} {!! Form::text('first_name', $user->first_name, ['class' => 'form-control', 'placeholder' => __( 'business.first_name' ) ]); !!}
{!! Form::label('last_name', __( 'business.last_name' ) . ':') !!} {!! Form::text('last_name', $user->last_name, ['class' => 'form-control', 'placeholder' => __( 'business.last_name' ) ]); !!}
@show_tooltip(__('lang_v1.tooltip_enable_user_active'))
{!! Form::select('role', $roles, !empty($user->roles->first()->id) ? $user->roles->first()->id : null, ['class' => 'form-control select2', 'style' => 'width: 100%;']); !!} {!! Form::label('role', __( 'user.role' ) . ':*') !!} @show_tooltip(__('lang_v1.admin_role_location_permission_help'))
@lang( 'role.access_locations' ) @show_tooltip(__('tooltip.access_locations_permission'))
@show_tooltip(__('tooltip.all_location_permission'))
@foreach($locations as $location)
@endforeach

@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','placeholder' => __( 'lang_v1.staff_pin' ) ]); !!}
@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', !empty($user->cmmsn_percent) ? @num_format($user->cmmsn_percent) : 0, ['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', !is_null($user->max_sales_discount_percent) ? @num_format($user->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('user_allowed_contacts', __('lang_v1.selected_contacts') . ':') !!}
{!! Form::select('selected_contact_ids[]', $contact_access, array_keys($contact_access), ['class' => 'form-control select2', 'multiple', 'style' => 'width: 100%;', 'id' => 'user_allowed_contacts' ]); !!}
@endcomponent
{!! Form::close() !!} @stop @section('javascript') @endsection