@extends('layouts.app') @section('content') @php $consumer_cats = [1=>'LT', 2=>'HT']; @endphp @php $phase_cats = [1=>'Single', 3=>'Three']; @endphp @php $confirm = [1=>'Yes', 0=>'No']; @endphp @php $project_cats = [1=>'OnGrid', 2=>'OffGrid',3=> 'Hybrid']; @endphp @php $entity_cats = [1=>'Residential', 2=>'Commercial',3=>'Industrial',4=>'NGO',5=>'Utility']; @endphp @php $total_roof = []; for ($i = 1; $i <= 10; $i++) { $total_roof["Roof $i"]="Roof $i" ; } @endphp
{{ isset($lead_id) ? 'Edit Site Details' : 'Add New Site' }}
@csrf @if(isset($lead)) @endif

Basic Details

{{ Form::text('title', $title ?? 'Site', ['class' => 'form-control', 'id' => 'title', 'readonly' => true]) }}

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, $lead->state_id ?? '', ['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']) }}

Energy Details

{{ Form::text('load', '', ['class' => 'form-control', 'id' => 'load']) }}
{{ Form::select('consumer_id', ['' => 'Select Category'] + $consumer_cats, $lead->consumer_id ?? '', ['class' => 'standardSelect form-control', 'id' => 'consumer_id']) }}
{{ Form::select('phase_id', ['' => 'Select Phase'] + $phase_cats, $lead->phase_id ?? '', ['class' => 'standardSelect form-control', 'id' => 'phase_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', 'Yes' => 'Yes', 'No' => 'No'], $lead->spare_feeder ?? '', ['class' => 'standardSelect form-control', 'id' => 'spare_feeder']) }}
{{ Form::select('separate_panel', ['' => 'Select Option', 'Yes' => 'Yes', 'No' => 'No'], $lead->separate_panel ?? '', ['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, $lead->dg_sync ?? '', ['class' => 'standardSelect form-control', 'id' => 'dg_sync']) }}

Other Details

{!! Form::select('status', $statuses, $lead->status ?? '', [ 'class' => 'standardSelect form-control', 'title' => 'Select Status', 'data-live-search' => 'true', 'id' => 'status', 'data-dropup-auto' => 'false', 'data-size' => '5', ]) !!}
@stop @section('scripting') @endsection