@extends('layouts.app') @section('content') @php $regex = "([^\\s]+(\\.(?i)(jpe?g|png|pdf|jpg))$)"; $regexPdf = "([^\\s]+(\\.(?i)(pdf))$)"; $pdfIcon = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/PDF_file_icon.svg/833px-PDF_file_icon.svg.png"; $e = ''; @endphp @csrf {{-- @method('PUT') --}} Farmer Details (edit) Farmers Farmer details Personal Details Name Mobile Email Gender gender == 'male')? ' selected="selected"' : '') }}}>Male gender == 'female') ? ' selected="selected"' : '') }}}>Female DOB Landline No Farming Since Farm Size Dairy Area No. of people working in the farm Manager Name Manager's mobile +256 Farmer Id Ideal Yield MCC and DDE MCC Name Select @foreach ($milkCollectionCenters as $milkCollectionCenter) mcc_id == $milkCollectionCenter->id) selected @endif> {{ $milkCollectionCenter->name }} @endforeach Mobile +256 DDE Name Select Mobile +256 Address Country * {!! $errors->first('country_id', ':message') !!} Region * Select Region @foreach($regions as $region) address->region == $region->name)? 'selected' : '' }}>{{@$region->name}} @endforeach {!! $errors->first('region', ':message') !!} District * {{@$farmers->address->district}} {!! $errors->first('district', ':message') !!} County * Select County {{@$farmers->address->county}} {!! $errors->first('county_id', ':message') !!} Sub County * Select Sub County {{@$farmers->address->sub_county}} {!! $errors->first('subCounty_id', ':message') !!} Coordinates Address * {{ @$farmers->address->address }} {!! $errors->first('address', ':message') !!} KYC documents farmerDocuments->profile_pic) target="_blank" @endif id="preview_image_link"> Select ID Proof farmerDocuments) && $farmers->farmerDocuments->doc_name == 'passport')? ' selected="selected"' : '') }}}>Passport farmerDocuments) && $farmers->farmerDocuments->doc_name == 'nic') ? ' selected="selected"' : '') }}}>National Identity Card Choose your file here Max size 5 MB @if (isset($farmers->farmerDocuments) && count($farmers->farmerDocuments->document_files) > 0) @foreach ($farmers->farmerDocuments->document_files as $file) @if($file->file_name == 'Dummy-File-.docx') @continue @else @if (preg_match($regex, $file->file_name)) {{-- --}} @php $icon = preg_match($regexPdf, $file->file_name) ? $pdfIcon : $file->full_url; @endphp {{-- --}} @endif @endif @endforeach @endif Select Address Proof farmerDocuments) && $farmers->farmerDocuments->doc_type == 'utility-bill')? ' selected="selected"' : '') }}}>Utility Bill farmerDocuments) && $farmers->farmerDocuments->doc_type == 'bank-statement') ? ' selected="selected"' : '') }}}>Bank Statement farmerDocuments) && $farmers->farmerDocuments->doc_type == 'lease-agreement') ? ' selected="selected"' : '') }}}>Lease Agreement Choose your file here Max size 5 MB {{-- --}} @if (isset($farmers->farmerDocuments) && count($farmers->farmerDocuments->document_type_files) > 0) @foreach ($farmers->farmerDocuments->document_type_files as $file) @if (preg_match($regex, $file->file_name)) {{-- --}} @php $icon = preg_match($regexPdf, $file->file_name) ? $pdfIcon : $file->full_url; @endphp {{-- --}} @endif @endforeach @endif Farm Cows and Yield @foreach (@$farmerCowDetails as $key => $farmerCowDetail) @if($loop->first) @php $e = 'enable-month'; @endphp @else @php $e = 'disable-month' @endphp @endif @php $month = null; $monthWiseCowDetails = @$farmerCowDetail->getMonthWiseCowDetails(); $monthWiseProduction = @$farmerCowDetail->getMonthWiseProduction(); @endphp {{-- --}} @foreach ($monthArray as $month) month ? 'selected' : '' }}> {{ @$month }} @endforeach {{ @$farmerCowDetail->year }} @php $total_milk_production = @$monthWiseProduction->supplied_to_others + @$monthWiseProduction->self_use + @$monthWiseProduction->supplied_to_pdfl; $monthNumber = \Carbon\Carbon::parse('March')->month; $daysInMonth = \Carbon\Carbon::now()->month($monthNumber)->daysInMonth; // dd($monthWiseProduction); $yeildPerDay = @$monthWiseProduction->yield_per_cow; @endphp Herd Size: {{ @$farmerCowDetail->herd_size }} Milking Cows: {{ @$farmerCowDetail->milking_cows }} Production: {{ @$total_milk_production }} Ltr Yield: {{ round(@$yeildPerDay,2) }} Ltr/day Herd Size Milking Dry Heifer 7-12 mo 6 mo Bull Calf @foreach (@$monthWiseCowDetails as $item) @endforeach Milk Supplied (Ltr.) Supplied to Others (Ltr.) Self use {{-- Total milk production (Ltr.) {{ @$total_milk_production }} Yield (Ltr.) /Cow /Day {{ round(@$yeildPerDay, 2) }} --}} {{-- --}} @if ($loop->first) Remove @endif {{-- @if ($loop->last) @endif --}} @endforeach Improvement Areas @php $impAreaId = request()->get('impAreaId') ? : 1; @endphp @if(!empty($farmersImprovementArea)) @foreach($farmersImprovementArea as $imp_area) {{@$imp_area['name']}} @endforeach @endif @foreach(@$improvementAreaDetail as $key=>$detail) @if(gettype(@$detail) == 'object') @if(@$detail->input_type == 'dropdown') {{@$detail->parameter}} @foreach(@$improvementAreaDetail['dropdown_values'] as $dropDownValue) value) selected @endif>{{ $dropDownValue}} @endforeach @elseif(@$detail->input_type == '') @else {{@$detail->parameter}} @endif @else @continue @endif @endforeach Cancel {{-- Save --}} Save @endsection @section('scripts') @include('setting.partials.address-js') @endsection
Personal Details
MCC and DDE
Address
KYC documents
Farm Cows and Yield
Improvement Areas
{{@$imp_area['name']}}