<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

// Route::get('/', function () {
//     //return view('welcome');
//     return view('Home.index');
// });

Route::get('/myaccount', function () {
    //return view('welcome');
    return view('Home.myaccount');
});

Route::get('/support', function () {
    //return view('welcome');
    return view('Home.support');
});



Route::get('/trackorder', function () {
    //return view('welcome');
    return view('Home.trackorder');
});

Route::get('/myoffers', function () {
    //return view('welcome');
    return view('Home.myoffers');
});

Route::get('/notifications', function () {
    //return view('welcome');
    return view('Home.notifications');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
Route::get('/roles', 'PermissionController@Permission');
Route::group(['middleware' => 'role:developer'], function() {

    Route::get('/admin', function() {
 
    //    return 'Welcome Admin';
       
    });
 
 });

 Route::resource('/Product','ProductController');
 Route::resource('/ServiceType','ServiceTypeController');
 Route::resource('/ProductService','ProductServiceController');
 Route::resource('/Designation','DesignationController');
 Route::resource('/Employee','EmployeeController');
 Route::resource('/PromotionPackage','PromotionPackageController');
 Route::resource('/Order','OrderController');
 Route::resource('/Status','StatusController');
 Route::resource('/Duration','DurationController');
 Route::resource('/','HomeController');
 Route::resource('/OrderProduct','OrderProductController');
 Route::resource('/AddressType','AddressTypeController');
 Route::resource('/Profile','PersonalInformationController');
 Route::resource('/Company','CompanyDetailsController');
 Route::resource('/Invoice','InvoiceController');
 Route::resource('/Booking','BookingController');
 Route::resource('/SupportDepartment','SupportDepartmentController');
 Route::resource('/SupportTeam','SupportTeamController');
 Route::resource('/Godown','GodownController');
 Route::resource('/Rack','RackController');
 Route::resource('/ProductPropertySettings','ProductPropertySettingsController');



 Route::get('/ProductServices','OrderController@ProductServices');
 Route::get('/DeliveryManager','DeliveryManagerController@EmployeeOrder')->name('EmployeeOrder');
 Route::get('/DeliveryBoyDashboard','DeliveryBoyController@dashboard')->name('dashboard');
 Route::get('/OrderDetails/{Order}','DeliveryManagerController@OrderDetails')->name('OrderDetails.View');
 Route::get('/DeliveryDetails/{Order}','DeliveryBoyController@DeliveryDetails')->name('DeliveryDetails.View');
 Route::get('/ProcessIndex','ProcessMangerController@ProcessIndex')->name('ProcessIndex');
 Route::get('/ProcessDetails/{Order}','ProcessMangerController@ProcessDetails')->name('ProcessDetails.view');
 Route::get('/returnOrders','DeliveryManagerController@returnOrders')->name('returnOrders');
 Route::get('/returnDetails/{Order}','DeliveryManagerController@returnDetails')->name('returnDetails.View');
 Route::get('/pickupDetails/{Order}','DeliveryManagerController@pickupDetails')->name('pickupDetails.View');
 Route::get('/myorders','HomeController@myorders')->name('myorders');
 Route::get('/trackorders','HomeController@trackorders')->name('trackorders');
 Route::get('/mypreviousorders','HomeController@mypreviousorders')->name('mypreviousorders');
 
 Route::get('/productDetails/{order}','HomeController@productDetails')->name('productDetails');
 Route::get('/DetailsView/{order}','HomeController@DetailsView')->name('DetailsView');
 Route::get('/OrderList','OrderListController@orderlist')->name('orderlist');
 Route::get('/OrderListView/{Order}','OrderListController@orderlistview')->name('orderlistview');
 Route::get('/searchGroups','OrderListController@searchGroups')->name('searchGroups');
 Route::get('/selectGroups','OrderListController@selectGroups')->name('selectGroups');
 Route::get('/reports','ReportController@reports')->name('reports');
 Route::get('/detailsview/{Order}','ReportController@detailsview')->name('detailsview');
 Route::get('/selectReports','ReportController@selectReports')->name('selectReports');
 Route::get('/editprofile','UserController@editprofile')->name('editprofile');

 Route::post('/cancelorder/{Order}','HomeController@cancelorder')->name('cancelorder');
 Route::post('/upload','UserController@UploadAvatar');
 Route::post('/searchReports','ReportController@searchReports')->name('searchReports');
 Route::post('/processComplete','ProcessMangerController@processComplete')->name('processComplete.complete');
 Route::post('/orderComplete/{OrderDelivery}','DeliveryBoyController@orderComplete')->name('orderComplete.complete');
 Route::post('/acceptOrder/{Order}/accept','DeliveryManagerController@acceptOrder')->name('acceptOrder');
 Route::post('/placeOrder','OrderController@placedOrder');
 Route::post('/acceptOrder/{Order}/accept','DeliveryManagerController@acceptOrder')->name('acceptOrder');
 Route::post('/orderDispatch/{Order}/accept','DeliveryManagerController@orderDispatch')->name('orderDispatch');
 Route::post('/Reupdate/{Order}','OrderController@Reupdate')->name('Reupdate');

 Route::delete('/Reorderdestroy/{OrderProduct}','OrderProductController@Reorderdestroy')->name('Reorderdestroy');

 Route::get('/DmReports','DmReportController@index')->name('DmReports');
 Route::post('/DmSearchResults','DmReportController@searchResults')->name('DmSearchResults');
 Route::get('/DmDetailsView/{Order}','DmReportController@detailsview')->name('DmDetailsView');

 Route::get('/PmReports','PmReportController@index')->name('PmReports');
 Route::get('/PmDetailsView/{Order}','PmReportController@detailsview')->name('PmDetailsView');
 Route::post('/PmSearchResults','PmReportController@searchResults')->name('PmSearchResults');

 Route::get('/DboyReports','DboyReportController@index')->name('DboyReports');
 Route::get('/DboyDetailsView/{Order}','DboyReportController@detailsview')->name('DboyDetailsView');
 Route::post('/DboySearchResults','DboyReportController@searchResults')->name('DboySearchResults');

 Route::post('/singlePrint','ReportController@singlePrint')->name('singlePrint');
 Route::post('/DmSinglePrint','DmReportController@singlePrint')->name('DmSinglePrint');
 Route::post('/PmSinglePrint','PmReportController@singlePrint')->name('PmSinglePrint');
 Route::post('/DboySinglePrint','DboyReportController@singlePrint')->name('DboySinglePrint');

 Route::get('/detailReport','ReportController@detailReport')->name('detailReport');
 Route::get('/DmDetailReport','DmReportController@detailReport')->name('DmDetailReport');
 Route::get('/PmDetailReport','PmReportController@detailReport')->name('PmDetailReport');
 Route::get('/DboyDetailReport','DboyReportController@detailReport')->name('DboyDetailReport');

 Route::get('/ReportSelectGroups','ReportController@ReportSelectGroups')->name('ReportSelectGroups'); 
 Route::post('/detailPrint','ReportController@detailPrint')->name('detailPrint');

 Route::get('/DmReportSelectGroups','DmReportController@ReportSelectGroups')->name('DmReportSelectGroups');
 Route::post('/DmDetailPrint','DmReportController@detailPrint')->name('DmDetailPrint');

 Route::get('/PmReportSelectGroups','PmReportController@ReportSelectGroups')->name('PmReportSelectGroups');
 Route::post('/PmDetailPrint','PmReportController@detailPrint')->name('PmDetailPrint');

 Route::get('/DboyReportSelectGroups','DboyReportController@ReportSelectGroups')->name('DboyReportSelectGroups');
 Route::post('/DboyDetailPrint','DboyReportController@detailPrint')->name('DboyDetailPrint');

 Route::get('/CustomerReport','CustomerSearchController@CustomerReport')->name('CustomerReport');
 Route::get('/SearchingCustomer','CustomerSearchController@SearchingCustomer')->name('SearchingCustomer');
 Route::post('/CustomerSearchPrint','CustomerSearchController@CustomerSearchPrint')->name('CustomerSearchPrint');

 Route::get('/InvoicePrint/{Order}','InvoiceController@InvoicePrint')->name('InvoicePrint');

 Route::post('/ticketUpdate/{Booking}','SupportTeamController@ticketUpdate')->name('ticketUpdate');
 Route::post('/sendmail','SupportTeamController@sendmail')->name('sendmail');

 Route::post('/sendbasicemail','MailController@basic_email')->name('sendbasicemail');
 Route::get('/sendhtmlemail','MailController@html_email');
 Route::get('/sendattachmentemail','MailController@attachment_email');

 Route::get('/selecetRack','DeliveryManagerController@selecetRack')->name('selecetRack');

 Route::get('/ServiceRegistration','ServiceRegistrationController@Index')->name('ServiceRegistration');
 Route::post('/UserUpdated','ServiceRegistrationController@UserUpdated')->name('UserUpdated');
 Route::get('/SelectUser','ServiceRegistrationController@SelectUser')->name('SelectUser');
 Route::post('/UserSelected','ServiceRegistrationController@UserSelected')->name('UserSelected');
 Route::post('/adminOrder','ServiceRegistrationController@adminOrder');
 Route::post('/ServiceListupdate/{order}','ServiceRegistrationController@ServiceListupdate')->name('ServiceListupdate');

 Route::get('/ServiceDone','ServiceRegistrationController@ServiceDone')->name('ServiceDone');


 Route::get('/searchMobile','OrderListController@searchMobile')->name('searchMobile');
 Route::get('/searchByID','OrderListController@searchByID')->name('searchByID');

 Route::get('/AddNew','GodownController@AddNew')->name('AddNew');
 Route::get('/Select/Godown/{Godown}','GodownController@SelectGodown')->name('SelectGodown');
 Route::get('/RackDetails','GodownController@RackDetails')->name('RackDetails');
 
 Route::get('/searchUser','CustomerSearchController@searchUser')->name('searchUser');

 Route::get('/PropertyDetails','ProductPropertySettingsController@PropertyDetails')->name('PropertyDetails');
 Route::get('/ProductProperty','ProductPropertySettingsController@ProductProperty')->name('ProductProperty');

 Route::get('/ServiceListdestroy/{OrderProduct}','OrderProductController@ServiceListdestroy')->name('ServiceListdestroy');



 
