@extends('adminlte::page') @section('title', 'Create and Update Users ' . Config::get('adminlte.title')) @section('content_header')

Users

@stop @section('content') {{--Show message if any--}} @include('layouts.flash-message')

Add or Update

{{ html()->form('POST', route($data->form_action))->attribute('autocomplete', 'off')->acceptsFiles()->open() }} {{ html()->hidden('id')->value($data->id)->id('user_id') }}
Name
{{ html()->text('name')->value($data->name)->class('form-control')->required() }} User name.
Email
{{ html()->email('email')->value($data->email)->class('form-control')->required() }} User email, this email for login.
Mobile Number
{{ html()->text('mobile_number')->value($data->mobile_number)->class('form-control')->required() }} User mobile number.
Password
{{ html()->password('password')->id('password')->class('form-control')->autocomplete('new-password') }} @if($data->page_type === 'update') Leave it blank if you don't want to change @else User password, this password for login. @endif
{{-- image --}}
Image
{{ html()->file('image')->class('custom-file-input')->accept('image/gif, image/jpeg,image/jpg,image/png')->attribute('data-max-width', '800')->attribute('data-max-height', '400') }} Please upload the image (Recommended size: 160px × 160px, max 5MB)
@if ($data->page_type == 'update') @else @endif
{{-- only image has main image, add css class "show" --}}

{{-- delete flag for already uploaded image in the server --}}
{{-- Administrator cannot have shift --}} @if ($data->role != 1)
Shift Time
{{ html()->select('shift_id', $shift)->value($data->shift_id)->id('shift_id')->class('form-control')->required() }} Select Shift time.
@endif
Role
{{ html()->select('role', $role)->value($data->role)->id('role')->class('form-control')->required() }} User role.
Approval Status
{{ html()->select('approval_status', ['approved' => 'Approved', 'pending' => 'Pending', 'rejected' => 'Rejected'])->value($data->approval_status ?? 'approved')->class('form-control')->required() }} Pending users cannot login from the mobile app.
{{ html()->closeModelForm() }}
@stop @section('css') @stop @section('js') @stop