[add] Basic endpoint for workday data
This commit is contained in:
parent
f864e74247
commit
03cbcce59f
@ -815,6 +815,10 @@ class EmployeeApplication{
|
|||||||
return $results[0]['contractType'];
|
return $results[0]['contractType'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDataWorkDayByDateAndCode($date, $code){
|
||||||
|
return array('status' => 'success', 'message' => 'Successfully did the thing.');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the worked days for an employee and determines how much they're
|
* Gets all the worked days for an employee and determines how much they're
|
||||||
* getting paid
|
* getting paid
|
||||||
|
@ -112,3 +112,12 @@ $app->get('/api/employee/salary/{code}', function (Request $request, Response $r
|
|||||||
->withHeader('Content-Type', 'application/json')
|
->withHeader('Content-Type', 'application/json')
|
||||||
->write(json_encode($this->employeeApplication->calculateSalaryByCode($code)));
|
->write(json_encode($this->employeeApplication->calculateSalaryByCode($code)));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$app->get('/api/employee/salary/date/{date}/code/{code}', function (Request $request, Response $response, array $args) {
|
||||||
|
$date = $args['date'];
|
||||||
|
$code = $args['code'];
|
||||||
|
|
||||||
|
return $response->withStatus(200)
|
||||||
|
->withHeader('Content-Type', 'application/json')
|
||||||
|
->write(json_encode($this->employeeApplication->getDataWorkDayByDateAndCode($date, $code)));
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user