@extends('backend.layouts.app') @section('content') {{__('app.customers.title')}} {{$title}} {{__('app.add')}} {{__('app.customers.customer')}} {{__('app.add')}} {{__('app.documents')}} {{$title}} @if (!isset($customer)) {{__('app.step_1')}} {{__('app.basic_details')}} {{__('app.step_2')}} {{__('app.documents')}} @endif @include('backend.layouts.alert') @csrf @if(isset($customer)) @method('PUT') @endif {{-- Name --}} {{__('app.customers.name')}} {{-- Address --}} {{__('app.customers.address')}} {{-- Contact Person (Accounts) --}} {{__('app.customers.contact_person')}} ({{__('app.customers.accounts')}}) {{-- Email (Accounts) --}} {{__('app.customers.email')}} ({{__('app.customers.accounts')}}) {{-- Phone (Accounts) --}} {{__('app.customers.phone')}} ({{__('app.customers.accounts')}}) {{-- Contact Person (Operations) --}} {{__('app.customers.contact_person')}} ({{__('app.customers.operations')}}) {{-- Email (Operations) --}} {{__('app.customers.email')}} ({{__('app.customers.operations')}}) {{-- Phone (Operations) --}} {{__('app.customers.phone')}} ({{__('app.customers.operations')}}) {{__('app.customers.type_of_account')}} Select @foreach ($customerTypes as $customerType) customer_type_id == $customerType->id ? 'selected' : '' }}>{{$customerType->name}} @endforeach @if (isset($customer)) {{__('app.status')}} status_label == 'active' ? 'checked' : '' }}> {{__('app.active')}} status_label == 'inactive' ? 'checked' : '' }}> {{__('app.inactive')}} @endif {{-- Footer Buttons --}} @if (!isset($customer)) {{__('app.documents')}} {{__('app.upload_document')}} {{__('app.documents')}} {{__('app.expiry')}} {{__('app.uploaded_by')}} {{__('app.created_date_time')}} {{__('app.status')}} {{__('app.action')}} @if(isset($customer)) @foreach ($customer->documents as $document) {{$document->mandatoryDocument->name ?? null }} {{$document->expiry_date?->format('m/d/Y')}} {{$document->uploadedBy->name ?? null}} {{$document->uploaded_date_time?->format('m/d/Y, h:i A')}} @php $isExpired = $document->expiry_date ? \Carbon\Carbon::parse($document->expiry_date)->lt(\Carbon\Carbon::today()) : ''; @endphp @if($isExpired)Expired @else Active @endif @if ($document->mandatoryDocument->required == false) @endif @endforeach @endif @if(isset($customerDoc)) @foreach ($customerDoc->documents as $document) {{$document->mandatoryDocument->name ?? null}} {{$document->expiry_date?->format(APP_DATE_FORMAT)}} {{$document->uploadedBy->name ?? null}} {{$document->created_at?->format(APP_DATE_FORMAT.', h:i A')}} @php $isExpired = isset($document->expiry_date) ? \Carbon\Carbon::parse($document->expiry_date)->lt(\Carbon\Carbon::today()) : ''; @endphp @if($isExpired)Expired @else Active @endif @endforeach @endif @endif