@role('doctor') {{Form::hidden('doctorRole',getLogInUser()->hasRole('doctor'),['id' => 'doctorRole'])}} {{ Form::hidden('doctor_id', getLogInUser()->doctor->id ,['id' => 'adminAppointmentDoctorId']) }} {{ Form::hidden('status',\App\Models\Appointment::BOOKED) }} @else
{{ Form::label('Doctor',__('messages.doctor.doctor').':' ,['class' => 'form-label required']) }} {{ Form::select('doctor_id', $data['doctors'], null,['class' => 'io-select2 form-select', 'id' => 'adminAppointmentDoctorId', 'data-control'=>"select2", 'required','placeholder' => __('messages.doctor.doctor')]) }}
@endrole
{{ Form::label('Date',__('messages.appointment.date').':' ,['class' => 'form-label required']) }} {{ Form::text('date', null,['class' => 'form-control date','placeholder' => __('messages.appointment.date'), 'id'=>'appointmentDate', 'required','autocomplete'=>'off']) }}
@role('patient') {{Form::hidden('patient_id',getLogInUser()->patient->id,['id' => 'patientRole'])}} {{ Form::hidden('status',\App\Models\Appointment::BOOKED) }} @else
{{ Form::label('Service',__('messages.appointment.service').':' ,['class' => 'form-label required']) }} {{ Form::select('service_id', $data['services'], null,['class' => 'io-select2 form-select', 'data-control'=>"select2", 'id'=> 'appointmentServiceId','placeholder' => __('messages.appointment.service'),'required']) }}
{{ Form::hidden('status',\App\Models\Appointment::BOOKED) }}
{{ Form::label('Patient',__('messages.appointment.patient').':' ,['class' => 'form-label required']) }} {{ Form::select('patient_id', $data['patients'], null,['class' => 'io-select2 form-select', 'data-control'=>"select2",'placeholder' => __('messages.appointment.patient')]) }}
@endrole @php $styleCss = 'style'; @endphp
{{ Form::label('Available Slots',__('messages.appointment.available_slot').':' ,['class' => 'form-label required']) }}
{{__('messages.appointment.booked')}} {{__('messages.appointment.available')}}
{{ Form::hidden('from_time', null,['id'=>'timeSlot',]) }} {{ Form::hidden('to_time', null,['id'=>'toTime',]) }}
{{__('messages.appointment.no_slot_found')}} {{__('messages.doctors_scheduled_time_ended_for_today__')}}
{{ Form::label('Description',__('messages.appointment.description').':' ,['class' => 'form-label']) }} {{ Form::textarea('description', null, ['class'=> 'form-control','rows'=> 10,'placeholder'=>__('messages.appointment.description') ])}}
@role('patient')
{{ Form::label('Service',__('messages.appointment.service').':' ,['class' => 'form-label required']) }} {{ Form::select('service_id', [], null,['class' => 'io-select2 form-select', 'data-control'=>"select2", 'id'=> 'appointmentServiceId','placeholder' => __('messages.common.select_service'),'required']) }}
@endrole
{{ Form::label('Payment Type',__('messages.appointment.payment_method').':' ,['class' => 'form-label required']) }} {{ Form::select('payment_type', getAllPaymentStatus(), null,['class' => 'io-select2 form-select', 'data-control'=>"select2",'placeholder' => __('messages.appointment.payment_method')]) }}
{{ Form::label('Charge',__('messages.appointment.charge').':' ,['class' => 'form-label required']) }}
{{ Form::text('charge', null,['class' => 'form-control','placeholder' => 'Select Date', 'id'=>'chargeId', 'required', 'placeholder' => __('messages.appointment.charge'),'readonly']) }}
@if(!getLogInUser()->hasRole('patient'))
{{ Form::label('Add Fees',__('messages.appointment.extra_fees').':' ,['class' => 'form-label']) }}
{{ Form::text('add_fees',null,['class' => 'form-control', 'id' => 'addFees', 'onkeyup' => 'if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,"")', 'placeholder' => __('messages.appointment.extra_fees'),'step'=>'any']) }}
{{ Form::label('Total Payable Amount',__('messages.appointment.total_payable_amount').':' ,['class' => 'form-label required']) }}
{{ Form::text('payable_amount', null,['class' => 'form-control','placeholder' => 'Total Payable Amount', 'id'=>'payableAmount', 'required', 'placeholder' => __('messages.appointment.total_payable_amount'), 'readonly']) }}
@endif @if(getLogInUser()->hasRole('patient'))
{{ Form::label('Total Payable Amount',__('messages.appointment.total_payable_amount').':' ,['class' => 'form-label required']) }}
{{ Form::text('payable_amount', null,['class' => 'form-control','placeholder' => 'Total Payable Amount', 'id'=>'payableAmount', 'required', 'placeholder' => __('messages.appointment.total_payable_amount'), 'readonly']) }}
@endif
{{ Form::button(__('messages.common.save'),['type' => 'submit','class' => 'btn btn-primary me-2 submitAppointmentBtn' ]) }}   {{__('messages.common.discard')}}