mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-23 06:24:03 +00:00
customer support interface
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
$primaryEmployee = $employees->first();
|
||||
$identification = $company->documents->whereIn('document_type', \App\Classes\ValueObjects\Constants\DocumentType::IDENTIFICATION_DOCUMENTS)->first()
|
||||
@endphp
|
||||
<section id="customer-account">
|
||||
<section id="customer-account" class="m-b-50">
|
||||
<h3>Customer Account</h3>
|
||||
<p>Marking: <span><a href="{{route('customer.profile', $company->reference)}}" target="_blank">{{$company->reference}}</a></span></p>
|
||||
<p>Account Type: <span>{{$company->type === 1 ? 'Business' : 'Personal'}}</span></p>
|
||||
@@ -44,71 +44,74 @@
|
||||
<p>Phone: <span>{{$company->contacts->pluck('phone')->implode(', ')}}</span></p>
|
||||
<p>Registration Date: <span>{{$company->created_at->format('d-m-Y')}}</span></p>
|
||||
</section>
|
||||
<section id="customer-verification">
|
||||
<section id="customer-verification" class="m-b-50">
|
||||
<h3>Customer Verification</h3>
|
||||
<p>Email Verification Status: <span>{{ $primaryEmployee->status === 2 ? 'Verified' : 'Pending Verification'}}</span></p>
|
||||
<p>Identification Verification Status: <span>{{$identification ? ($identification->status === 2 ? 'Verified' : 'Pending Verification') : 'Not Submitted'}}</span></p>
|
||||
</section>
|
||||
@if(!$booking)
|
||||
@php
|
||||
$bookings = $company->bookings()->whereIn('status', [2, 3])->get();
|
||||
@endphp
|
||||
<section>
|
||||
@foreach($bookings as $booking)
|
||||
@php
|
||||
$payments = $booking->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::PAYMENT)->get();
|
||||
$purchaseOrder = $booking->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::PURCHASE_ORDER)->first();
|
||||
@endphp
|
||||
<section>
|
||||
<h3>Booking Reference: {{$booking->marking}}</h3>
|
||||
<p>Amount: <span>{{$booking->fix_amount.' '.$booking->fixedCurrency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$booking->status === 3 ? 'Complete' : 'In Progress'}}</span></p>
|
||||
<p>Purchase Order Status: <span>{{$purchaseOrder ? ($purchaseOrder->status === 3 ? 'Approved' : ($purchaseOrder->status === 1 ? 'Pending Approval' : 'Incomplete Submission')) : 'Pending Submission'}}</span></p>
|
||||
@if($payments)<p>Payment History:</p>@endif
|
||||
@foreach($payments as $payment)
|
||||
@php
|
||||
$bill = $payment->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::BILL)->first();
|
||||
$transferProof = null;
|
||||
$status = 'Pending Submission';
|
||||
<section>
|
||||
<h3>Customer Bookings</h3>
|
||||
@php
|
||||
$bookings = $company->bookings()->whereIn('status', [2, 3])->get();
|
||||
@endphp
|
||||
<section>
|
||||
@foreach($bookings as $booking)
|
||||
@php
|
||||
$payments = $booking->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::PAYMENT)->get();
|
||||
$purchaseOrder = $booking->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::PURCHASE_ORDER)->first();
|
||||
@endphp
|
||||
<section class="m-b-50">
|
||||
<p>Booking Reference: {{$booking->marking}}</p>
|
||||
<p>Amount: <span>{{$booking->fix_amount.' '.$booking->fixedCurrency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$booking->status === 3 ? 'Complete' : 'In Progress'}}</span></p>
|
||||
<p>Purchase Order Status: <span>{{$purchaseOrder ? ($purchaseOrder->status === 3 ? 'Approved' : ($purchaseOrder->status === 1 ? 'Pending Approval' : 'Incomplete Submission')) : 'Pending Submission'}}</span></p>
|
||||
@if($payments)<p>Payment History:</p>@endif
|
||||
@foreach($payments as $payment)
|
||||
@php
|
||||
$bill = $payment->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::BILL)->first();
|
||||
$transferProof = null;
|
||||
$status = 'Pending Submission';
|
||||
|
||||
if($payment->status === 1) {
|
||||
$status = 'Pending Approval';
|
||||
}
|
||||
|
||||
if($payment->status === 2) {
|
||||
$status = 'Pending Confirmation';
|
||||
}
|
||||
|
||||
if(in_array($payment->status, [4, 5])) {
|
||||
$status = 'Rejected/Failed Payment';
|
||||
}
|
||||
|
||||
if($bill) {
|
||||
if($bill->status === 1) {
|
||||
$status = 'Pending Transfer Proof';
|
||||
if($payment->status === 1) {
|
||||
$status = 'Pending Approval';
|
||||
}
|
||||
|
||||
if(in_array($bill->status, [2, 3])) {
|
||||
$status = 'Transfer Complete';
|
||||
$transferProof = $bill->documents()->first();
|
||||
if($payment->status === 2) {
|
||||
$status = 'Pending Confirmation';
|
||||
}
|
||||
}
|
||||
|
||||
@endphp
|
||||
<section class="m-b-15">
|
||||
<p>Amount: <span>{{$payment->original_amount.' '.$payment->original_currency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$status}}</span></p>
|
||||
<p>Payment Date: <span>{{$payment->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($bill)
|
||||
<p>Supplier: <span>{{$bill->issuerCompany->name}}</span></p>
|
||||
<p>Supplier Order Date: <span>{{$bill->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($transferProof)<p>Transfer Proof Upload Date: <span>{{$transferProof->created_at->format('d-m-Y')}}</span></p>@endif
|
||||
@endif
|
||||
</section>
|
||||
@endforeach
|
||||
</section>
|
||||
@endforeach
|
||||
</section>
|
||||
if(in_array($payment->status, [4, 5])) {
|
||||
$status = 'Rejected/Failed Payment';
|
||||
}
|
||||
|
||||
if($bill) {
|
||||
if($bill->status === 1) {
|
||||
$status = 'Pending Transfer Proof';
|
||||
}
|
||||
|
||||
if(in_array($bill->status, [2, 3])) {
|
||||
$status = 'Transfer Complete';
|
||||
$transferProof = $bill->documents()->first();
|
||||
}
|
||||
}
|
||||
|
||||
@endphp
|
||||
<section class="m-b-35">
|
||||
<p>Amount: <span>{{$payment->original_amount.' '.$payment->original_currency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$status}}</span></p>
|
||||
<p>Payment Date: <span>{{$payment->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($bill)
|
||||
<p>Supplier: <span>{{$bill->issuerCompany->name}}</span></p>
|
||||
<p>Supplier Order Date: <span>{{$bill->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($transferProof)<p>Transfer Proof Upload Date: <span>{{$transferProof->created_at->format('d-m-Y')}}</span></p>@endif
|
||||
@endif
|
||||
</section>
|
||||
@endforeach
|
||||
</section>
|
||||
@endforeach
|
||||
</section>
|
||||
</section>
|
||||
@endif
|
||||
@endif
|
||||
@if($booking)
|
||||
@@ -117,7 +120,7 @@
|
||||
$purchaseOrder = $booking->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::PURCHASE_ORDER)->first();
|
||||
@endphp
|
||||
<section>
|
||||
<h3>Booking Reference: {{$booking->marking}}</h3>
|
||||
<p>Booking Reference: {{$booking->marking}}</p>
|
||||
<p>Amount: <span>{{$booking->fix_amount.' '.$booking->fixedCurrency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$booking->status === 3 ? 'Complete' : 'In Progress'}}</span></p>
|
||||
<p>Purchase Order Status: <span>{{$purchaseOrder ? ($purchaseOrder->status === 3 ? 'Approved' : ($purchaseOrder->status === 1 ? 'Pending Approval' : 'Incomplete Submission')) : 'Pending Submission'}}</span></p>
|
||||
@@ -153,7 +156,7 @@
|
||||
}
|
||||
|
||||
@endphp
|
||||
<section class="m-b-15">
|
||||
<section class="m-b-35">
|
||||
<p>Amount: <span>{{$payment->original_amount.' '.$payment->original_currency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$status}}</span></p>
|
||||
<p>Payment Date: <span>{{$payment->created_at->format('d-m-Y')}}</span></p>
|
||||
|
||||
Reference in New Issue
Block a user