Wijzigingen nav opmerking Peter 24-12-2018
This commit is contained in:
@@ -68,11 +68,19 @@ class EmployeeHoursController extends MY_Controller {
|
||||
|
||||
$employeehourID = Projecthour::saveProjecthour( $employeehourID, $data );
|
||||
}
|
||||
elseif ( $hourType == 'OFFERS' )
|
||||
{
|
||||
unset( $data['employee_id'] );
|
||||
$data['hourtype_id'] = $data['hourtype_id'] - 8;
|
||||
|
||||
$employeehourID = Projecthour::saveProjecthour( $employeehourID, $data );
|
||||
}
|
||||
else
|
||||
{
|
||||
$employeehourID = Employeehour::saveEmployeehour( $employeehourID, $data );
|
||||
}
|
||||
|
||||
|
||||
$this->json( ['employeehourID' => $employeehourID] );
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,15 @@ class OffersController extends MY_Controller {
|
||||
|
||||
}
|
||||
|
||||
public function getAllOffers( $projectID, $archive = 'F' )
|
||||
public function getAllOffers()
|
||||
{
|
||||
$offers = Offer::getAllOffers( $projectID, $archive );
|
||||
$projectID = $this->clean_input( 'projectID' );
|
||||
$archive = $this->clean_input( 'archive' );
|
||||
$search = $this->clean_input( 'search' );
|
||||
$order = $this->clean_input( 'order' );
|
||||
$direction = $this->clean_input( 'direction' );
|
||||
|
||||
$offers = Offer::getAllOffers( $projectID, $archive, $search, $order, $direction );
|
||||
|
||||
$this->json( $offers );
|
||||
}
|
||||
|
||||
@@ -27,9 +27,14 @@ class ProjectsController extends MY_Controller {
|
||||
|
||||
}
|
||||
|
||||
public function getAllProjects( $archive = 'F' )
|
||||
public function getAllProjects( )
|
||||
{
|
||||
$projects = Project::getAllProjects( $archive );
|
||||
$archive = $this->clean_input( 'archive' );
|
||||
$search = $this->clean_input( 'search' );
|
||||
$order = $this->clean_input( 'order' );
|
||||
$direction = $this->clean_input( 'direction' );
|
||||
|
||||
$projects = Project::getAllProjects( $archive, $search, $order, $direction );
|
||||
|
||||
$this->json( $projects );
|
||||
}
|
||||
@@ -359,4 +364,6 @@ class ProjectsController extends MY_Controller {
|
||||
$this->json( ['result' => TRUE] );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user