@extends('backend.header')
@section('index-content')
<?php
function convertToUnicodeNumber($input) {
    
    $standard_numsets = array("0","1","2","3","4","5","6","7","8","9");
    $devanagari_numsets = array("०","१","२","३","४","५","६","७","८","९");
    
    return str_replace($standard_numsets, $devanagari_numsets, $input);
  }
?>

<div class="row">
    <div class="col-sm-8 offset-sm-2">
        <h1 class="display-3"> Survey Form</h1>
 
        @if ($errors->any())
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
        <br /> 
        @endif
        <form method="post" action="{{ route('backend.dic_update', $survey->id) }}">
            @method('PATCH') 
            @csrf
            <div class="form-group">
 
                <label for="stock_name">LED Light No:</label>
                <input type="text" class="form-control" name="" value="{{  $survey_info->stock_name }}" />
            </div>
 
            <div class="form-group">
                <label for="ticket">Switching Point No :</label>
                <input type="text" class="form-control" name="switch_point" value="{{  $survey_info->switch_point }}" />
            </div>
 
            <div class="form-group">
                <label for="value">Pole No:</label>
                <input type="text" class="form-control" name="pole_num" value="{{ $survey_info->pole_num }}" />
            </div>
            <div class="form-group">
 
                <label for="stock_name">Location/Area:</label>
                <input type="text" class="form-control" name="location" value="{{  $survey_info->location}}" />
            </div>
 
            <div class="form-group">
										<!-- <label class="col-sm-1 control-label">चर्तु:सिमा</label> -->
											<label class="col-sm-3 control-label"> LED Wattage: 
											<span class="required">*</span></label>
											<div class="col-sm-9">
											<input type="checkbox" name="led_wattage1" value="18 W" style="height:35px; width:20px; vertical-align: middle;"> 18 W
												<input type="checkbox" name="led_wattage2" value="35 W" style="height:35px; width:20px; vertical-align: middle;margin-left:30px;"> 35 W
												<input type="checkbox" name="led_wattage3" value="70 W" style="height:35px; width:20px; vertical-align: middle;"> 70 W
												<input type="checkbox" name="led_wattage4" value="110 W" style="height:35px; width:20px; vertical-align: middle;"> 110 W
												<input type="checkbox" name="led_wattage5" value="190 W" style="height:35px; width:20px; vertical-align: middle;"> 190 W

											</div>
 
            <div class="form-group">
                <label for="value">Cable used:</label>
                <input type="text" class="form-control" name="value" value="{{ $survey_info->value }}" />
            </div>
             <div class="form-group">
											<label class="col-sm-3 control-label">Arms & Clamps Required:
											<span class="required">*</span></label>
											<div class="col-sm-9">
												<input type="radio" style="height:35px; width:20px; vertical-align: middle;" value="Yes" name="arms" class="armscondition"> Yes
												<input type="radio" style="height:35px; width:20px; vertical-align: middle;margin-left:30px;" value="No" name="arms" class="armscondition"> No

												
											</div>
											
										</div>
										<div id="maindiv" style="display:none">
										<div class="form-group">
											<label class="col-sm-1 control-label">25mm Dia 1.2mt
											<span class="required">*</span></label>
											<div class="col-sm-3">
											<input type="text" name="type1" class="form-control" required>
												@error('type1')
												<font size="3" color="red">{{$message}}</font>
												@enderror	
												
											</div>
											<label class="col-sm-1 control-label">37mm Dia 1.2mt
											<span class="required">*</span></label>
											<div class="col-sm-3">
											<input type="text" name="type2" class="form-control" required>
												@error('type2')
												<font size="3" color="red">{{$message}}</font>
												@enderror	
												
											</div>
											<label class="col-sm-1 control-label">45mm Dia 1.2mt
											<span class="required">*</span></label>
											<div class="col-sm-3">
											<input type="text" name="type3" class="form-control" required>
												@error('type3')
												<font size="3" color="red">{{$message}}</font>
												@enderror	
												
											</div>
            <div class="form-group">
 
                <label for="reducer_used">Reducer Used:</label>
                <input type="text" class="form-control" name="reducer_used" value="{{  $survey_info->reducer_used }}" />
            </div>
 
            <div class="form-group">
                <label for="minimast_clamp_used">Minimast Clamp Used:</label>
                <input type="text" class="form-control" name="minimast_clamp_used" value="{{  $survey_info->minimast_clamp_used }}" />
            </div>
 
            <div class="form-group">
                <label for="value">Old Fixture:</label>
                <input type="text" class="form-control" name="type_of_fixtures" value="{{ $survey_info->type_of_fixtures }}" />
            </div>
            <div class="form-group">
 
                <label for="stock_name">Old Fixture Wattage:</label>
                <input type="text" class="form-control" name="fixture_wattage" value="{{  $survey_info->stock_name }}" />
            </div>
 
            <div class="form-group">
                <label for="remark_data"> Remarks:</label>
                <input type="text" class="form-control" name="remark_data" value="{{  $survey_info->remark_data }}" />
            </div>

            <button type="submit" class="btn btn-primary">Update</button>
        </form>
    </div>
</div>
@endsection
