%PDF- %PDF-
Direktori : /var/www/html/hrsys/api/routes/api/ |
Current File : /var/www/html/hrsys/api/routes/api/v1.php |
<?php use Illuminate\Support\Facades\Route; Route::get('test', 'AuthController@test') ->name('api.v1.test'); Route::post('check', 'AuthController@check') ->name('api.v1.check'); Route::post('login', 'AuthController@login') ->name('api.v1.login'); Route::post('resetPassword', 'AuthController@resetPassword') ->name('api.v1.resetPassword'); Route::group(['middleware' => ['auth:api']], function () { Route::get('me', 'AuthController@me') ->name('api.v1.me'); Route::post('updateProfile', 'AuthController@updateProfile') ->name('api.v1.updateProfile'); Route::post('changePassword', 'AuthController@changePassword') ->name('api.v1.changePassword'); Route::post('uploadAvatar', 'AuthController@uploadAvatar') ->name('api.v1.uploadAvatar'); Route::get('getMonthData', 'AuthController@getMonthData') ->name('api.v1.getMonthData'); Route::get('performance', 'AuthController@performance') ->name('api.v1.performance'); Route::get('days', 'DaysController@index') ->name('api.v1.days'); Route::get('holidays', 'HolidaysController@index') ->name('api.v1.holidays.index'); Route::resource('clients', 'ClientsController') ->only([ 'index', 'show', 'store', 'update', 'destroy', ]); Route::resource('ptos', 'PtosController') ->only([ 'index', 'show', 'store', 'update', 'destroy', ]); Route::post('ptos/{pto}/actions/request', 'PtosController@request') ->name('api.v1.ptos.actions.request'); Route::get('projects/actions/currencies', 'ProjectsController@currencies') ->name('api.v1.projects.actions.currencies'); Route::resource('timecards', 'TimecardsController') ->only([ 'index', 'show', 'store', 'update', 'destroy', ]); Route::get('notifications', 'NotificationsController@index') ->name('api.v1.notifications.index'); Route::get('notifications/actions/getBadge', 'NotificationsController@getBadge') ->name('api.v1.notifications.getBadge'); Route::put('notifications/{notification}/actions/markAsRead', 'NotificationsController@markAsRead') ->name('api.v1.notifications.actions.markAsRead'); Route::put('notifications/actions/markAllAsRead', 'NotificationsController@markAllAsRead') ->name('api.v1.notifications.actions.markAllAsRead'); Route::get('users/{user}/actions/getProjects', 'UsersController@getProjects') ->name('api.v1.users.actions.getProjects'); Route::group(['middleware' => ["role:ADMIN|HR"]], function () { Route::resource('workingDays', 'WorkingDaysController') ->only([ 'index', 'show', 'store', 'update', 'destroy', ]); Route::resource('users', 'UsersController') ->only([ 'index', 'show', 'store', 'update', ]); Route::get('users/actions/getRoles', 'UsersController@getRoles') ->name('api.v1.users.actions.getRoles'); Route::get('users/actions/downloadExcelExample', 'UsersController@downloadExcelExample') ->name('api.v1.users.actions.downloadExcelExample'); Route::post('users/actions/import', 'UsersController@import') ->name('api.v1.users.actions.import'); Route::delete('users/{user}/actions/disable', 'UsersController@disable') ->name('api.v1.users.actions.disable'); Route::put('users/{user}/actions/enable', 'UsersController@enable') ->name('api.v1.users.actions.enable'); Route::get('users/{user}/actions/getConfigurations', 'UsersController@getConfigurations') ->name('api.v1.users.actions.getConfigurations'); Route::put('users/{user}/actions/updateConfigurations', 'UsersController@updateConfigurations') ->name('api.v1.users.actions.updateConfigurations'); Route::get('users/{user}/actions/getPerformance', 'UsersController@getPerformance') ->name('api.v1.users.actions.getPerformance'); Route::get('users/{user}/actions/getPtoLogs', 'UsersController@getPtoLogs') ->name('api.v1.users.actions.getPtoLogs'); Route::resource('configurations', 'ConfigurationsController') ->only([ 'index', 'update', ]); Route::post('holidays', 'HolidaysController@store') ->name('api.v1.holidays.store'); Route::get('holidays/actions/downloadExcelExample', 'HolidaysController@downloadExcelExample') ->name('api.v1.holidays.actions.downloadExcelExample'); Route::post('holidays/actions/import', 'HolidaysController@import') ->name('api.v1.holidays.actions.import'); Route::post('ptos/{pto}/actions/approve', 'PtosController@approve') ->name('api.v1.ptos.actions.approve'); Route::post('ptos/{pto}/actions/reject', 'PtosController@reject') ->name('api.v1.ptos.actions.reject'); Route::get('ptos/actions/getAll', 'PtosController@getAll') ->name('api.v1.ptos.actions.getAll'); }); Route::group(['middleware' => ['role:ADMIN|MANAGER']], function () { Route::get('timecards/actions/toApprove', 'TimecardsController@toApprove') ->name('api.v1.timecards.actions.toApprove'); Route::get('timecards/actions/export', 'TimecardsController@export') ->name('api.v1.timecards.actions.export'); Route::post('timecards/{timecard}/actions/approve', 'TimecardsController@approve') ->name('api.v1.timecards.actions.approve'); Route::post('timecards/actions/bulkApprove', 'TimecardsController@bulkApprove') ->name('api.v1.timecards.actions.bulkApprove'); Route::post('timecards/actions/bulkUnApprove', 'TimecardsController@bulkUnApprove') ->name('api.v1.timecards.actions.bulkUnApprove'); Route::post('timecards/actions/approveAll', 'TimecardsController@approveAll') ->name('api.v1.timecards.actions.approveAll'); Route::resource('projects', 'ProjectsController') ->only([ 'index', 'show', 'store', 'update', 'destroy', ]); Route::get('projects/actions/getManagers', 'ProjectsController@getManagers') ->name('api.v1.projects.actions.getManagers'); Route::get('projects/{project}/actions/getUsers', 'ProjectsController@getUsers') ->name('api.v1.projects.actions.getUsers'); Route::post('projects/{project}/actions/addUser/{user}', 'ProjectsController@addUser') ->name('api.v1.projects.actions.addUser'); Route::post('projects/{project}/actions/bulkAddUsers', 'ProjectsController@bulkAddUsers') ->name('api.v1.projects.actions.bulkAddUsers'); Route::delete('projects/{project}/actions/removeUser/{user}', 'ProjectsController@removeUser') ->name('api.v1.projects.actions.removeUser'); Route::get('projects/{project}/actions/performance', 'ProjectsController@performance') ->name('api.v1.projects.actions.performance'); }); Route::group(['middleware' => ['role:ADMIN|FINANCE']], function () { Route::resource('payments', 'PaymentsController') ->only([ 'index', 'store', 'destroy', ]); Route::get('payments/actions/getMonthly', 'PaymentsController@getMonthly') ->name('api.v1.payments.actions.getMonthly'); Route::get('payments/actions/awaitingPayment', 'PaymentsController@awaitingPayment') ->name('api.v1.payments.actions.awaitingPayment'); Route::get('payments/actions/getProject/{project}', 'PaymentsController@getProject') ->name('api.v1.payments.actions.getProject'); Route::post('payments/{payment}/actions/paymentReceived', 'PaymentsController@paymentReceived') ->name('api.v1.payments.actions.paymentReceived'); Route::resource('maintenancePayments', 'MaintenancePaymentsController') ->only([ 'index', 'show', 'store', 'update', ]); Route::get('maintenancePayments/{payment}/actions/getTransactions', 'MaintenancePaymentsController@getTransactions') ->name('api.v1.maintenancePayments.actions.getTransactions'); Route::post('maintenancePayments/{payment}/actions/paymentReceived', 'MaintenancePaymentsController@paymentReceived') ->name('api.v1.maintenancePayments.actions.paymentReceived'); Route::delete('maintenancePayments/{payment}/actions/cancel', 'MaintenancePaymentsController@cancel') ->name('api.v1.maintenancePayments.actions.cancel'); }); Route::get('projects/actions/mine', 'ProjectsController@myProjects') ->name('api.v1.projects.actions.myProjects'); });