diff --git a/resources/views/customers/update.blade.php b/resources/views/customers/update.blade.php
new file mode 100644
index 0000000..6055bd1
--- /dev/null
+++ b/resources/views/customers/update.blade.php
@@ -0,0 +1,23 @@
+@extends('layouts.app')
+
+@section('title_full', $customer->getFullName(true).' - '.__('Customer Profile'))
+@section('body_class', 'sidebar-no-height')
+
+@section('body_attrs')@parent data-customer_id="{{ $customer->id }}"@endsection
+
+@section('sidebar')
+
+ @include('customers/profile_menu')
+ @include('customers/profile_snippet')
+
+@endsection
+
+@section('content')
+ @include('customers/profile_tabs')
+ @include('freescout-restricted-customers::customers/partials/edit_form')
+@endsection
+
+@section('javascript')
+ @parent
+ multiInputInit();
+@endsection
diff --git a/src/Http/Controllers/CustomersController.php b/src/Http/Controllers/CustomersController.php
index 8a59737..eb1bd11 100644
--- a/src/Http/Controllers/CustomersController.php
+++ b/src/Http/Controllers/CustomersController.php
@@ -22,6 +22,11 @@ class CustomersController extends BaseCustomersController {
// instead of overriding the whole method here.
$customer = Customer::findOrFail($id);
+ // Get the list of Mailboxes the current User has access to.
+ $mailboxes = auth()
+ ->user()
+ ->mailboxesCanView();
+
$customer_emails = $customer->emails;
if (count($customer_emails)) {
foreach ($customer_emails as $row) {
@@ -31,7 +36,11 @@ class CustomersController extends BaseCustomersController {
$emails = [''];
}
- return view('customers/update', ['customer' => $customer, 'emails' => $emails]);
+ return view('freescout-restricted-customers::customers/update', [
+ 'customer' => $customer,
+ 'mailboxes' => $mailboxes,
+ 'emails' => $emails,
+ ]);
}
/**