<?php

// NEW RandD routes(BEGIN)
// first page
Route::get('/setad-province/all', 'SetadProvinceController@index');
Route::get('/statics', 'NewRandDCtrl@statics');  
Route::get('/homepage', 'ResearchDevController@homepage');
Route::get('/interface_members', 'ResearchDevController@interfaceMembers');
Route::get('/research_members', 'ResearchDevController@researchMembers');
Route::get('/committee_projects', 'NewRandDCtrl@homepage');  
Route::get('/search', 'NewRandDCtrl@search');

// RAND FIRST
Route::prefix('projects')->group(function () {
    Route::get('/all', 'ResearchDevController@index'); 
    Route::post('/update/{id}', 'ResearchDevController@update');
    Route::post('/delete/{id}', 'ResearchDevController@destroy');
    Route::post('/processRegistration/{id}', 'ResearchDevController@processRegistration'); //
    Route::post('/add', 'ResearchDevController@store'); 
});

//RANDD SECOND
Route::prefix('proposed_projects')->group(function () {
    Route::get('/all', 'NewRandDCtrl@index'); 
    Route::post('/edit/{newRandD}', 'NewRandDCtrl@edit');
    Route::post('/add', 'NewRandDCtrl@store');
    Route::post('/delete/{id}', 'NewRandDCtrl@destroy');
    
    Route::post('/voting/start/{id}', 'Api\RandDVoting\AdminVoterController@startVoting');
    Route::post('/voting/end/{id}', 'Api\RandDVoting\AdminVoterController@endVoting');
    Route::get('/voting/result/{id}', 'Api\RandDVoting\VoterController@showResult');
    Route::get('/voting/result', 'Api\RandDVoting\VoterController@showUserPaper');
    Route::post('/reject/{newRandD}', 'NewRandDCtrl@reject');
});

