mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
Resturlaubstage, Mehrarbeitsstunden und Urlaubsanspruch pro Jahr
entfernt. Diese können bei Mitarbeitern jetzt nicht mehr verwaltet werden
This commit is contained in:
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Resturlaub extends APIv1_Controller
|
||||
{
|
||||
/**
|
||||
* Resturlaub API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model ResturlaubModel
|
||||
$this->load->model('ressource/resturlaub_model', 'ResturlaubModel');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getResturlaub()
|
||||
{
|
||||
$resturlaubID = $this->get('resturlaub_id');
|
||||
|
||||
if (isset($resturlaubID))
|
||||
{
|
||||
$result = $this->ResturlaubModel->load($resturlaubID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postResturlaub()
|
||||
{
|
||||
if ($this->_validate($this->post()))
|
||||
{
|
||||
if (isset($this->post()['resturlaub_id']))
|
||||
{
|
||||
$result = $this->ResturlaubModel->update($this->post()['resturlaub_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->ResturlaubModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($resturlaub = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user