Files
Business-credit-asistant/resources/views/partials/upload_document.blade.php
2026-06-29 13:00:18 +06:00

107 lines
5.4 KiB
PHP

@php
$identity_file = "";
$ssn_file = "";
$state_file = "";
$other_doc_file = "";
$path = '';
$path_ssn ='';
$path_state = '';
$path_other = '';
@endphp
@if (!empty($upload_medias))
@foreach ($upload_medias as $upload_media)
@if ($upload_media->image_type_id == config('constant.IDENTIFICATION_IMAGE_ID'))
@php
$identity_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path ;
$path = getPublicFile($identity_file) ;
$identity_file_model = $upload_media;
@endphp
@endif
@if ($upload_media->image_type_id == config('constant.SSN_IMAGE_ID'))
@php
$ssn_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path ;
$path_ssn = getPublicFile($ssn_file);
$ssn_file_model = $upload_media;
@endphp
@endif
@if ($upload_media->image_type_id == config('constant.STATE_PHOTO_IMAGE_ID'))
@php
$state_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path;
$path_state = getPublicFile($state_file) ;
$state_file_model = $upload_media;
@endphp
@endif
@if ($upload_media->image_type_id == config('constant.MAIL_DOC_IMAGE_ID'))
@php
$other_doc_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path ;
$path_other = getPublicFile($other_doc_file) ;
$other_doc_file_model = $upload_media;
@endphp
@endif
@endforeach
@endif
<div>
<input type="hidden" name="redirect_url" value="{{route('manage.clients')}}">
<input type="hidden" name="ajax_url" value="{{route('process.ajax')}}">
</div>
<div class="row">
<div class="col-md-6 ">
<label class="lbl-file">Please upload document Proof of PHOTO IDENTIFICATION (ie
Drivers License or State Identification Card)</label>
<button type="button" class="btn btn-info btn-xs" id="identity_proof_file_btn" onclick="file_upload(`Drivers License or State Identification Card`,`{{addslashes($path) }}`,`{{config('constant.IDENTIFICATION_IMAGE_ID')}}`,`uploadmedia[identification]`)"> Upload </button>
@if(!empty($identity_file))
<button type="button" class="btn btn-danger btn-xs" onclick="file_delete(`Drivers License or State Identification Card`,`{{$identity_file_model}}`)"> Delete </button>
<div class="text-center" id="identity_proof_doc_id">
<img src="{{getPublicFile($identity_file)}}"
class="img-client"><br>
</div>
@endif
</div>
<div class="col-md-6 ">
<label class="lbl-file">Please upload document Proof of legal Identification
number(s) or document proof current legally acquired Social Security Number
(ie SSN CARD, first page of tax form, passport , green card, etc. )</label>
<button type="button" class="btn btn-info btn-xs" onclick="file_upload(`SSN CARD, first page of tax form, passport , green card, etc.`,`{{addslashes($path_ssn) }}`,`{{config('constant.SSN_IMAGE_ID')}}`,`uploadmedia[ssn]`)"> Upload </button>
@if(!empty($ssn_file))
<button type="button" class="btn btn-danger btn-xs" onclick="file_delete(`SSN CARD, first page of tax form, passport , green card, etc.`,`{{ $ssn_file_model }}`)"> Delete </button>
<div class="text-center" id="ssn_doc_id">
<img src="{{getPublicFile($ssn_file)}}"
class="img-client"><br>
</div>
@endif
</div>
</div>
<div class="row" style="margin-top: 10px">
<div class="col-md-6 ">
<label class="lbl-file">Please upload document proof of address's street number,
street name, City and State/Province/Etc. (such as a current Utility Bill or
First page of a Banking statement</label>
<button type="button" class="btn btn-info btn-xs" onclick="file_upload(`Current Utility Bill or First page of a Banking statement`,`{{addslashes($path_state) }}`,`{{config('constant.STATE_PHOTO_IMAGE_ID')}}`,`uploadmedia[state_photo_id]`)"> Upload </button>
@if(!empty($state_file))
<button type="button" class="btn btn-danger btn-xs" onclick="file_delete(`Current Utility Bill or First page of a Banking statement`,`{{$state_file_model }}`)"> Delete </button>
<div class="text-center" id="state_doc_id">
<img src="{{getPublicFile($state_file)}}"
class="img-client"><br>
</div>
@endif
</div>
<div class="col-md-6">
<label class="lbl-file">Other Document Upload</label>
<button type="button" class="btn btn-info btn-xs" onclick="file_upload(`Other Document Upload`,`{{addslashes($path_other) }}`,`{{config('constant.MAIL_DOC_IMAGE_ID')}}`,`uploadmedia[mail_doc]`)"> Upload </button>
@if(!empty($other_doc_file))
<button type="button" class="btn btn-danger btn-xs" onclick="file_delete(`Other Document Upload`,`{{ $other_doc_file_model }}`)"> Delete </button>
<div class="text-center" id="other_doc_id">
<img src="{{getPublicFile($other_doc_file)}}"
class="img-client"><br>
</div>
@endif
</div>
</div>