Refactor views to use new layout structure and update routes for administrator pages
- Changed view extends from "admin.main" to "administrator.layout.master" across multiple files. - Updated route names in admin.php and administrator.php to reflect new structure for user, order, invoice, and other management functionalities. - Adjusted view includes to point to the new directory structure for blocks and components. - Ensured all permission checks remain intact while refactoring the views.
This commit is contained in:
@@ -57,7 +57,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = 'View All Customer';
|
||||
|
||||
return view('admin.customer.index', compact('customers', 'title'));
|
||||
return view('administrator.pages.customer.index', compact('customers', 'title'));
|
||||
}
|
||||
|
||||
//Validate userid
|
||||
@@ -122,7 +122,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view("admin.customer.info", compact('customer', 'title', 'userid'));
|
||||
return view("administrator.pages.customer.info", compact('customer', 'title', 'userid'));
|
||||
}
|
||||
|
||||
protected function validateUserid()
|
||||
@@ -157,7 +157,7 @@ class CustomerController extends Controller
|
||||
}
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
return view("admin.customer.profile", compact('customer', 'title', 'userid'));
|
||||
return view("administrator.pages.customer.profile", compact('customer', 'title', 'userid'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,7 +309,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
return view(
|
||||
'admin.customer.product',
|
||||
'administrator.pages.customer.product',
|
||||
compact(
|
||||
'title',
|
||||
'userid',
|
||||
@@ -430,7 +430,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.domain', compact('userid', 'title', 'domains'));
|
||||
return view('administrator.pages.customer.domain', compact('userid', 'title', 'domains'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -463,7 +463,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.invoice', compact('userid', 'title', 'invoices'));
|
||||
return view('administrator.pages.customer.invoice', compact('userid', 'title', 'invoices'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -492,7 +492,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.transaction', compact('userid', 'title', 'transactions'));
|
||||
return view('administrator.pages.customer.transaction', compact('userid', 'title', 'transactions'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -526,7 +526,7 @@ class CustomerController extends Controller
|
||||
return view("emails.render", compact('title', 'template'));
|
||||
}
|
||||
}
|
||||
return view('admin.customer.mail', compact('userid', 'title', 'emails'));
|
||||
return view('administrator.pages.customer.mail', compact('userid', 'title', 'emails'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -552,7 +552,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.log', compact('userid', 'title', 'logs'));
|
||||
return view('administrator.pages.customer.log', compact('userid', 'title', 'logs'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -589,7 +589,7 @@ class CustomerController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.customer.add', ['title' => 'Thêm Customer']);
|
||||
return view('administrator.pages.customer.add', ['title' => 'Thêm Customer']);
|
||||
}
|
||||
|
||||
|
||||
@@ -661,7 +661,7 @@ class CustomerController extends Controller
|
||||
return redirect()->route('customer.index')->withErrors('No data found for this user');
|
||||
}
|
||||
$title = "Add Pay for Customer";
|
||||
return view('admin.customer.addPay', compact('title', 'userid'));
|
||||
return view('administrator.pages.customer.addPay', compact('title', 'userid'));
|
||||
}
|
||||
|
||||
public function addPayStore(AddPayRequest $request)
|
||||
|
||||
Reference in New Issue
Block a user