<?php

/*
|--------------------------------------------------------------------------
| 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('index');
});
Route::get('/register', function () {
    return view('register');
});
//Route::get('/dashboard', function () {
//    return view('dashboard');
//});


Route::group(['namespace' => 'Admin'], function () {
    Route::post('/save-register', 'AdminController@store');
    Route::get('/send-feedback-sms', 'AdminController@sendFeedbackMail');
    Route::get('/login', 'AdminController@login');


    Route::get('/dashboard', 'AdminController@dashboardView');
    Route::get('/document-view/{id}', 'AdminController@dashboardDocView');

//    customer details views
    Route::get('/create-customer', 'PostController@createCustomer');
    Route::post('/add-customer', 'PostController@addCustomer');
    Route::get('/show-customer-lists', 'PostController@showCustomer');
    Route::get('/filter-customer', 'ViewController@filterCustomer');
    Route::get('/customer-category-filter', 'ViewController@filterCustomerCategory');
    Route::get('/customer-company-filter', 'ViewController@filterCustomerCompany');
    Route::post('/add-company-lists', 'PostController@addCompany');
    Route::get('/get-company-lists', 'ViewController@getCompany');
    Route::get('/get-customer/{id}', 'ViewController@getCustomer');
    Route::post('/update-customer', 'PostController@updateCustomer');
    Route::get('/customer-hidden/{id}', 'PostController@customerHidden');
    Route::get('/customer-delete/{id}', 'PostController@customerDelete');

    //    customer document details views
    Route::get('/create-document', 'ViewController@createDocument');
    Route::get('/get-customer-id/{id}', 'ViewController@getCustomerId');
    Route::post('/add-documents', 'PostController@addDocumentByCustomer');
    Route::get('/show-documents-lists', 'PostController@showDocuments');
    Route::get('/get-doc-imgs/{id}', 'ViewController@getImage');
    Route::get('/document-gallery/{doc_id}/{customer_id}/{category}', 'ViewController@getDocumentGallery');
    Route::get('/select-doc-list-id', 'PostController@getDocumentList');
    Route::get('/document-delete/{id}', 'PostController@DocumentDelete');
    Route::post('/add-photos', 'PostController@uplodePhotos');
    Route::get('/get-document-list/{doc_id}', 'ViewController@getDocuments');
    Route::post('/update-docs', 'PostController@updateDocs');
    Route::post('/update-document-lists', 'PostController@updateDocumentList');
    Route::get('/document-view-delete/{id}', 'PostController@docViewDelete');


//    editor view

    Route::get('/text-editor', 'ViewController@editorView');
    Route::post('/save-text-editor', 'PostController@saveTextEditor');
    Route::get('/get-filter-title-content/{id}', 'ViewController@getFilterEditor');

//    report view
    Route::get('/show-documents-list/report', 'PostController@showDocumentReport');
    Route::get('/report/date-filter', 'PostController@getDateFilter');


//    calender view
    Route::get('/show-calender', 'ViewController@showCalender');

});

Route::group(['namespace' => 'Auth'], function () {
    Route::get('/logout', 'LoginController@logout');
});