<?php


Auth::routes();

Route::get('/', 'HomeController@index')->name('dashboard');
Route::get('/home', 'HomeController@index')->name('dashboard');
Route::get('/dashboard', 'HomeController@index')->name('dashboard');
Route::get('about', 'HomeController@index');

Route::resource('roles', 'RoleController');

Route::resource('modules', 'ModuleController');

Route::get('/module/step1/{id?}', 'ModuleController@getStep1')->name('modules.create');
Route::get('/module/step2/{tablename?}', 'ModuleController@getStep2')->name('modules.create');
Route::get('/getJoinFields/{tablename?}', 'ModuleController@getJoinFields');
Route::get('/module/step3/{tablename?}', 'ModuleController@getStep3')->name('modules.create');

Route::post('/step1', 'ModuleController@postStep1');
Route::post('/step2', 'ModuleController@postStep2');
Route::post('/step3', 'ModuleController@postStep3');


Route::resource('users', 'UserController');

Route::resource('permissions', 'PermissionController');

//Route::resource('profile', 'UserController');

Route::get('user/profile', 'UserController@profile')->name('users.profile');
//Route::patch('users/profile-update/{id}', 'UserController@profileUpdate')->name('users.profile-update');

Route::resource('languages', 'LanguageController');

Route::resource('pages', 'PageController');

Route::resource('contactus', 'ContactUsController');

Route::resource('notifications', 'NotificationController');

Route::resource('menus', 'MenuController');

//Menu #TODO need to be fixed
Route::get('statusChange/{id}', 'MenuController@statusChange');

Route::get('statusChangePay/{id}', 'PaymentController@statusChangePay');

Route::post('updateChannelPosition', 'MenuController@update_channel_position')->name('channels');
Route::resource('settings', 'SettingController');

Route::resource('email-templates', 'EmailTemplateController');

Route::resource('leads', 'LeadController');

Route::resource('lead-statuses', 'LeadStatusController');

Route::resource('teams', 'TeamController');

Route::resource('websites', 'WebsiteController');

Route::resource('lead-histories', 'LeadHistoryController');

Route::resource('invoices', 'InvoiceController');

Route::resource('payments', 'PaymentController');

Route::get('payments-update/{id?}', 'PaymentController@updateStatus');

Route::resource('currency-rates', 'CurrencyRateController');

Route::resource('units', 'UnitController');

Route::get('/extras/{month?}', 'HomeController@extraHome')->name('extraIndex');

Route::get('/extrasnew', 'HomeController@extraHomeNew')->name('extraIndexNew');

Route::resource('orders', 'OrderController');

Route::resource('production-teams', 'ProductionTeamController');

Route::resource('production-teams', 'ProductionTeamController');

Route::resource('customers', 'CustomerController');

Route::resource('oldcustomers', 'OldcustomerController');

Route::resource('threads', 'ThreadController');

Route::resource('qa-leads', 'QaLeadController');