<form action="{{ route('admin.access.employees.store-update', $user->id) }}" method="POST" enctype="multipart/form-data">
    @csrf
    <div class="row">
        <div class="form-group">
            <label>@lang('Name')</label>
            <input type="text" class="form-control" name="name"
                value="{{ old('name', isset($user) ? $user->name : '') }}" required>
        </div>

        <div class="form-group">
            <label>@lang('Username')</label>
            <input type="text" class="form-control" name="username"
                value="{{ old('username', isset($user) ? $user->username : '') }}" required>
        </div>

        <div class="form-group">
            <label>@lang('Email')</label>
            <input type="email" class="form-control" name="email"
                value="{{ old('email', isset($user) ? $user->email : '') }}" required>
        </div>

        <div class="form-group">
            <label>@lang('Mobile')</label>
            <div class="input-group">
                <span class="input-group-text">+91</span>
                <input type="text" class="form-control" name="mobile"
                    value="{{ old('mobile', isset($user) ? $user->mobile : '') }}" required>
            </div>
        </div>

        <div class="form-group">
            <div class="image-upload">
                <div class="thumb">
                    <div class="avatar-preview d-flex justify-content-center">
                        <div class="profilePicPreview"
                            style="background-image: url({{ getImage(getFilePath('adminProfile') . '/' . $user->image, getFileSize('adminProfile')) }}); height: 250px; width: 250px;">
                            <button type="button" class="remove-image"><i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <div class="avatar-edit">
                        <input type="file" class="profilePicUpload" name="image" id="profilePicUpload1"
                            accept=".png, .jpg, .jpeg" style="display: none;">
                        <label for="profilePicUpload1" class="bg--success mt-2">@lang('Upload Image')</label>
                        <small class="mt-2  ">@lang('Supported files'): <b>@lang('jpeg'), @lang('jpg').</b>
                            @lang('Image will be resized into 400x400px') </small>
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label>@lang('Password')</label>
            <input type="text" class="form-control" name="pass_code"
                required value="{{ $user->pass_code }}">
        </div>
    </div>
    <div class="form-group">
        <button type="submit" class="btn btn--primary w-100">@lang('Submit')</button>
    </div>
</form>
