mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-28 17:03:59 +00:00
customer support interface
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
<div class="row">
|
||||
<div class="col bg-white p-t-15 p-b-15">
|
||||
<div class="row no-margin">
|
||||
<div class="col-12">
|
||||
<form method="post" >
|
||||
@csrf
|
||||
<input type="text" name="marking" value="{{$marking}}">
|
||||
<input type="email" name="email" value="{{$email}}">
|
||||
<input type="text" name="booking_reference" value="{{$bookingReference}}">
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{dd($company, $booking)}}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -103,6 +103,44 @@ Route::get('/purchase_orders', function () {
|
||||
return view('pages.purchase_orders');
|
||||
})->name('purchase_orders');
|
||||
|
||||
Route::get('/support', function () {
|
||||
return view('pages.customer_support');
|
||||
})->name('support');
|
||||
|
||||
Route::post('/support', function (Request $request) {
|
||||
|
||||
$marking = $request->input('marking');
|
||||
$email = $request->input('email');
|
||||
$bookingReference = $request->input('bookingReference');
|
||||
|
||||
$company = null;
|
||||
$booking = null;
|
||||
|
||||
if($email) {
|
||||
$company = Company::whereHas('Employees', function($user) use($email) {
|
||||
return $user->where('email', $email);
|
||||
})->first();
|
||||
}
|
||||
|
||||
if($marking) {
|
||||
$company = Company::where('reference', $marking)->first();
|
||||
}
|
||||
|
||||
if($bookingReference) {
|
||||
$booking = Booking::where('marking', $bookingReference)->first();
|
||||
$company = $booking->company;
|
||||
}
|
||||
|
||||
return view('pages.customer_support', [
|
||||
'marking' => $marking,
|
||||
'email' => $email,
|
||||
'bookingReference' => $bookingReference,
|
||||
'company' => $company,
|
||||
'booking' => $booking,
|
||||
]);
|
||||
|
||||
})->name('support');
|
||||
|
||||
Route::get('/online_payment/redirect', 'Billplz\CallbackBillplzController@callback')->name('online_payment.redirect');
|
||||
|
||||
Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');
|
||||
|
||||
Reference in New Issue
Block a user