{{-- * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - http://codecanyon.net/licenses/standard --}} @extends('layouts.master') @php $fflDealers ??= []; $preferredDealers ??= []; @endphp @section('content') @includeFirst([config('larapen.core.customizedViewPath') . 'common.spacer', 'common.spacer'])
@includeFirst([ config('larapen.core.customizedViewPath') . 'account.inc.sidebar', 'account.inc.sidebar', ])
@include('flash::message') @if (isset($errors) && $errors->any())
{{ t('oops_an_error_has_occurred') }}
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
{{-- Preferred Dealer --}}

{{ 'Search And Select Preferred Dealer.' }}

{{ 'View Your Preferred Dealers' }}
{{-- ffl_dealers --}}
{{-- Search by License Name --}} {{-- Search by Business Name --}} {{-- Search by Distance in miles --}} {{-- Search by License Number --}}
{{ '-' }} {{ '-' }} {{ '-' }}
{{-- button --}} @if (request()->hasAny(['license_name', 'business_name', 'lic_regn', 'lic_dist', 'lic_seqn'])) {{ 'Clear' }} @endif
@if (count($preferredDealers) > 2) {{ 'You can only select a maximum of 3 dealers!' }} @endif
    @forelse ($fflDealers as $key => $fflDealer) @php $dealerLicense = $fflDealer?->license_number; $dealerId = $fflDealer?->id; $isSelected = in_array($dealerLicense, $preferredDealers); $isDisabled = $isSelected || count($preferredDealers) > 2; $values = array_filter([ $fflDealer?->license_name, $fflDealer?->business_name, $dealerLicense, $fflDealer?->premise_street, trim( "{$fflDealer?->premise_city} {$fflDealer?->premise_state} {$fflDealer?->premise_zip_code}", ), $fflDealer?->voice_phone, $fflDealer?->away_distance, ]); @endphp {!! implode(',
    ', $values) !!}
    @if ($isSelected) {{ 'Selected' }} @endif
    @empty
  • {{ 'No dealers found.' }}
  • @endforelse

{{ 'Disclaimer: ' }} {{ "Please ensure your selected FFL Dealer's License is Valid via [" }} {{ 'FFL EZ Check' }} {{ '] prior to saving your selection.' }}

@endsection @section('after_scripts') @endsection