Adds the Assignment core object (Order x Employee, date range) with full CRUD, soft-delete/trash integration, and generated API clients. Layers FR-EM-3 conflict checks onto assignment creation: qualification, absence/availability, working-hours approximation, cross-order overlap, and active-contract coverage. Each check's severity (Warning vs. Error) is configurable at runtime via a new AssignmentValidationSettings singleton and admin settings panel, instead of being hardcoded - lets the business tune strictness per check without a redeploy. Adds a live GET /api/assignments/check endpoint so the create-assignment dialog can preview conflicts as the user picks employee/dates, before they hit save, rather than only finding out after submitting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
11 KiB
OmsorgCoreClient\AssignmentsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| apiAssignmentsCheckGet() | GET /api/assignments/check | |
| apiAssignmentsGet() | GET /api/assignments | |
| apiAssignmentsIdDelete() | DELETE /api/assignments/{id} | |
| apiAssignmentsIdGet() | GET /api/assignments/{id} | |
| apiAssignmentsIdPut() | PUT /api/assignments/{id} | |
| apiAssignmentsPost() | POST /api/assignments |
apiAssignmentsCheckGet()
apiAssignmentsCheckGet($order_id, $employee_id, $start_date, $end_date, $exclude_assignment_id): \OmsorgCoreClient\Model\AssignmentConflictResponse[]
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AssignmentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$order_id = 'order_id_example'; // string
$employee_id = 'employee_id_example'; // string
$start_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$end_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$exclude_assignment_id = 'exclude_assignment_id_example'; // string
try {
$result = $apiInstance->apiAssignmentsCheckGet($order_id, $employee_id, $start_date, $end_date, $exclude_assignment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsCheckGet: ', $e->getMessage(), PHP_EOL;
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| order_id | string | [optional] | |
| employee_id | string | [optional] | |
| start_date | \DateTime | [optional] | |
| end_date | \DateTime | [optional] | |
| exclude_assignment_id | string | [optional] |
Return type
\OmsorgCoreClient\Model\AssignmentConflictResponse[]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
text/plain,application/json,text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiAssignmentsGet()
apiAssignmentsGet($order_id, $employee_id, $from_date, $to_date, $page, $page_size): \OmsorgCoreClient\Model\AssignmentResponsePagedResponse
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AssignmentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$order_id = 'order_id_example'; // string
$employee_id = 'employee_id_example'; // string
$from_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$to_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$page = 1; // int
$page_size = 20; // int
try {
$result = $apiInstance->apiAssignmentsGet($order_id, $employee_id, $from_date, $to_date, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsGet: ', $e->getMessage(), PHP_EOL;
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| order_id | string | [optional] | |
| employee_id | string | [optional] | |
| from_date | \DateTime | [optional] | |
| to_date | \DateTime | [optional] | |
| page | int | [optional] [default to 1] | |
| page_size | int | [optional] [default to 20] |
Return type
\OmsorgCoreClient\Model\AssignmentResponsePagedResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
text/plain,application/json,text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiAssignmentsIdDelete()
apiAssignmentsIdDelete($id)
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AssignmentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$apiInstance->apiAssignmentsIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsIdDelete: ', $e->getMessage(), PHP_EOL;
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiAssignmentsIdGet()
apiAssignmentsIdGet($id): \OmsorgCoreClient\Model\AssignmentResponse
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AssignmentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$result = $apiInstance->apiAssignmentsIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsIdGet: ', $e->getMessage(), PHP_EOL;
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string |
Return type
\OmsorgCoreClient\Model\AssignmentResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
text/plain,application/json,text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiAssignmentsIdPut()
apiAssignmentsIdPut($id, $update_assignment_request): \OmsorgCoreClient\Model\AssignmentResponse
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AssignmentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$update_assignment_request = new \OmsorgCoreClient\Model\UpdateAssignmentRequest(); // \OmsorgCoreClient\Model\UpdateAssignmentRequest
try {
$result = $apiInstance->apiAssignmentsIdPut($id, $update_assignment_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsIdPut: ', $e->getMessage(), PHP_EOL;
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | ||
| update_assignment_request | \OmsorgCoreClient\Model\UpdateAssignmentRequest | [optional] |
Return type
\OmsorgCoreClient\Model\AssignmentResponse
Authorization
HTTP request headers
- Content-Type:
application/json,text/json,application/*+json - Accept:
text/plain,application/json,text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiAssignmentsPost()
apiAssignmentsPost($create_assignment_request): \OmsorgCoreClient\Model\AssignmentResponse
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AssignmentsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_assignment_request = new \OmsorgCoreClient\Model\CreateAssignmentRequest(); // \OmsorgCoreClient\Model\CreateAssignmentRequest
try {
$result = $apiInstance->apiAssignmentsPost($create_assignment_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsPost: ', $e->getMessage(), PHP_EOL;
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| create_assignment_request | \OmsorgCoreClient\Model\CreateAssignmentRequest | [optional] |
Return type
\OmsorgCoreClient\Model\AssignmentResponse
Authorization
HTTP request headers
- Content-Type:
application/json,text/json,application/*+json - Accept:
text/plain,application/json,text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]