@extends('layouts.app') @section('content') @php $consumer_cats = ['LT'=>'LT', 'HT'=>'HT']; @endphp @php $phase_cats = ['Single'=>'Single', 'Three'=>'Three']; @endphp @php $confirm = ['Yes'=>'Yes', 'No'=>'No']; @endphp @php $project_cats = ['OnGrid'=>'OnGrid', 'OffGrid'=>'OffGrid','Hybrid'=> 'Hybrid']; @endphp @php $entity_cats = ['Residential'=>'Residential', 'Commercial'=>'Commercial','Industrial'=>'Industrial','NGO'=>'NGO','Utility'=>'Utility']; @endphp @php $total_roof = []; for ($i = 1; $i <= 10; $i++) { $total_roof["Roof $i"] = "Roof $i"; } @endphp
{{ isset($lead_id) ? 'Edit Lead Details' : 'Add New Lead' }}
{{ Form::open(['id' => 'dataForm']) }} {{ Form::hidden('lead_id', '', ['id' => 'lead_id']) }}
@csrf

Basic Details

{{ Form::text('title', $title ?? 'Site', ['class' => 'form-control', 'id' => 'title', 'readonly' => true]) }}
{{ Form::select('stage_id_fk', $stages, '', ['class' => 'standardSelect form-control', 'title' => 'Select Stage', 'data-live-search' => 'true', 'id' => 'stage_id_fk', 'data-dropup-auto' => 'false', 'data-size' => '5']) }}
{{--
{{ Form::select('source_id_fk', $sources, '', ['class' => 'standardSelect form-control', 'title' => 'Select Source', 'data-live-search' => 'true', 'id' => 'source_id_fk', 'data-dropup-auto' => 'false', 'data-size' => '5']) }}
--}}

Customer Details

{{ Form::text('site_name', '', ['class' => 'form-control', 'id' => 'site_name']) }}
{{--
{{ Form::text('last_name', '', ['class' => 'form-control', 'id' => 'last_name']) }}
{{ Form::text('company', '', ['class' => 'form-control', 'id' => 'company']) }}
--}}
{{ Form::text('gstin', '', ['class' => 'form-control', 'id' => 'gstin', 'maxlength' => '15']) }}
{{--
{{ Form::text('phone', '', [ 'class' => 'form-control', 'id' => 'phone', 'maxlength' => '10', 'inputmode' => 'numeric', 'pattern' => '\d{10}', 'title' => 'Phone number must be 10 numeric digits', 'oninput' => "this.value = this.value.replace(/[^0-9]/g, '')", ]) }} @error('phone') {{ $message }} @enderror
--}} {{--
{{ Form::text('email', '', [ 'class' => 'form-control', 'id' => 'email', 'pattern' => '[a-zA-Z0-9._%+-]+@gmail\.com', 'required' => true, 'title' => 'Email must be a valid Gmail address (e.g., example@gmail.com)', ]) }} @error('email') {{ $message }} @enderror
--}}
{{ Form::select('state_id', ['' => 'Select State'] + $states, '', ['class' => 'standardSelect form-control', 'title' => 'Select State', 'id' => 'state_id']) }}
{{ Form::text('city', '', ['class' => 'form-control', 'id' => 'city']) }}
{{ Form::text('address', '', ['class' => 'form-control', 'id' => 'address']) }}
{{ Form::text('location', '', ['class' => 'form-control', 'id' => 'location']) }}
{{--
{{ Form::text('latitude', '', [ 'class' => 'form-control', 'id' => 'latitude', 'placeholder' => 'Enter Latitude', 'pattern' => '^-?([1-8]?[0-9](\\.\\d+)?|90(\\.0+)?)$', 'title' => 'Please enter a valid latitude value (-90 to 90)', 'oninput' => "this.value = this.value.replace(/[^0-9.-]/g, '')" ]) }}
{{ Form::text('longitude', '', [ 'class' => 'form-control', 'id' => 'longitude', 'placeholder' => 'Enter Longitude', 'pattern' => '^-?((1[0-7][0-9]|[1-9]?[0-9])(\\.\\d+)?|180(\\.0+)?)$', 'title' => 'Please enter a valid longitude value (-180 to 180)', 'oninput' => "this.value = this.value.replace(/[^0-9.-]/g, '')" ]) }}
--}}

General Information

{{--
{{ Form::text('institute', '', ['class' => 'form-control', 'id' => 'institute']) }}
--}}
{{ Form::select('entity_id', ['' => 'Select Entity'] + $entity_cats, '', ['class' => 'standardSelect form-control', 'id' => 'entity_id']) }}
{{-- business units --}}

Energy Details

{{ Form::text('load', '', ['class' => 'form-control', 'id' => 'load']) }}
{{ Form::select('consumer_cats_id', ['' => 'Select Category'] + $consumer_cats, '', ['class' => 'standardSelect form-control', 'id' => 'consumer_cats_id']) }}
{{ Form::select('phase_cats_id', ['' => 'Select Phase'] + $phase_cats, '', ['class' => 'standardSelect form-control', 'id' => 'phase_cats_id']) }}
{{ Form::text('sys_volt', '', [ 'class' => 'form-control', 'id' => 'sys_volt', 'inputmode' => 'numeric', 'pattern' => '\d*', 'oninput' => "this.value = this.value.replace(/[^0-9]/g, '')", ]) }} @error('sys_volt') {{ $message }} @enderror
{{ Form::select('spare_feeder', ['' => 'Select Option', '1' => 'Yes', '0' => 'No'], '', ['class' => 'standardSelect form-control', 'id' => 'spare_feeder']) }}
{{ Form::select('separate_panel', ['' => 'Select Option', '1' => 'Yes', '0' => 'No'], '', ['class' => 'standardSelect form-control', 'id' => 'separate_panel']) }}
{{ Form::text('dist_inv_room', '', [ 'class' => 'form-control', 'id' => 'dist_inv_room', 'inputmode' => 'numeric', 'pattern' => '\\d*', 'oninput' => "this.value = this.value.replace(/[^0-9.]/g, '')", ]) }}
{{ Form::text('dist_met_fed', '', [ 'class' => 'form-control', 'id' => 'dist_met_fed', 'inputmode' => 'numeric', 'pattern' => '\\d*', 'oninput' => "this.value = this.value.replace(/[^0-9.]/g, '')", ]) }}

DG Details

{{ Form::text('op_hours', '', [ 'class' => 'form-control', 'id' => 'op_hours', 'inputmode' => 'numeric', 'pattern' => '\d*', 'oninput' => "this.value = this.value.replace(/[^0-9]/g, '')", ]) }} @error('op_hours') {{ $message }} @enderror
{{ Form::text('avg_dg', '', [ 'class' => 'form-control', 'id' => 'avg_dg', 'inputmode' => 'numeric', 'pattern' => '\d*', 'oninput' => "this.value = this.value.replace(/[^0-9]/g, '')", ]) }} @error('avg_dg') {{ $message }} @enderror
{{ Form::text('dg_rating', '', [ 'class' => 'form-control', 'id' => 'dg_rating', 'inputmode' => 'numeric', 'pattern' => '\d*', 'oninput' => "this.value = this.value.replace(/[^0-9]/g, '')", ]) }} @error('dg_rating') {{ $message }} @enderror
{{ Form::select('dg_sync', ['' => 'YES or NO'] + $confirm, '', ['class' => 'standardSelect form-control', 'id' => 'dg_sync']) }}
{{ Form::textarea('remarks', '', ['class' => 'form-control', 'id' => 'remarks', 'rows' => 4]) }}
@stop @section('scripting') @endsection