@extends('admin.layouts.main') @section('title') @if ($edit) Edit Branch User @else Add Branch User @endif @endsection @section('content') @include('admin.common.sidebar') {{ @trans('kua_client_user.directory') }} {{-- Corrected route here --}} {{ @trans('kua_client_user.client_users') }} @if ($edit) {{ @trans('kua_client_user.edit_client_user') }} @else {{ @trans('kua_client_user.add_client_user') }} @endif @csrf @if ($id) {{ @trans('kua_client_user.edit_client_user') }} @else {{ @trans('kua_client_user.add_client_user') }} @endif {{ @trans('kua_client_user.first_name') }} * @if ($errors->has('first_name')) {{ $errors->first('first_name') }} @endif {{ @trans('kua_client_user.last_name') }} * @if ($errors->has('last_name')) {{ $errors->first('last_name') }} @endif {{ @trans('kua_client_user.email') }} * @if ($errors->has('email')) {{ $errors->first('email') }} @endif {{ @trans('kua_client_user.mobile') }} * @if ($errors->has('mobile')) {{ $errors->first('mobile') }} @endif {{ @trans('kua_client_user.client') }} * {{ @trans('kua_client_user.select_client') }} @foreach ($clientsList as $client) @if ($id) company_id == $client->id) selected="selected" @endif> {{ $client->name }} @else {{ $client->name }} @endif @endforeach @if ($errors->has('departments')) {{ $errors->first('departments') }} @endif {{ @trans('kua_client_user.client_branch') }} * {{ @trans('kua_client_user.select_client_branch') }} @if(isset($branchList) && (is_array($branchList) ? count($branchList) > 0 : !$branchList->isEmpty())) @foreach ($branchList as $branch) client_branch_id) && $clientUserDetail->client_branch_id == $branch['id']) || old('client_branch_id') == $branch['id']) selected @endif> {{ $branch['name'] }} @endforeach @endif @if ($errors->has('client_branch_id')) {{ $errors->first('client_branch_id') }} @endif {{ @trans('kua_client_user.cancel') }} @endsection @push('pageJs') {!! JsValidator::formRequest('App\Http\Requests\Client_user\StoreClientUser', '#storeClientUserForm') !!} @endpush