v.1.3.0 update travel reimbursement added

This commit is contained in:
2026-07-08 23:42:13 +02:00
parent e3dfc3431d
commit 3eae1e6862
7 changed files with 350 additions and 6 deletions

View File

@@ -0,0 +1,57 @@
# DELETE Travel reimbursement
This API call deletes a Travel reimbursement.
#### Location
```
/api/v1/office/travel-reimburse/
```
#### Permissions required
`office-travel-reimburse` RW
#### Body parameters
| Parameter | Type | Required | Description |
| -------------- | ---- | -------- | --------------------------------- |
| reimburse_uuid | uuid | yes | Unique id of the Travel reimburse |
### Example Body (json)
```json
{
"reimburse_uuid": "e0a60eba-52f6-11f1-8bcc-bc2411125ba4",
}
```
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/office/travel-reimburse/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $json_payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'X-HTTP-Method-Override: DELETE'
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
```
### Example Response
```json
"Travel reimburse removed."
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -0,0 +1,76 @@
# GET Travel reimbursement
This will get travel reimbursement entries from the database.
#### Location
```
/api/v1/office/travel-reimburse/
```
#### Permissions required
`office-travel-reimburse` RO
#### Body parameters
| Parameter | Type | Required | Description |
| ---------------------- | ------ | -------- | ------------------------- |
| builder[0][between][0] | string | no | Get between `travel_date` |
| builder[0][between][1] | date | no | For example 2026-06-01 |
| builder[0][between][2] | date | no | For example 2026-06-25 |
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no | |
### Example Body (json)
None.
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/office/travel-reimburse/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURL INFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
```
### Example Response
```json
[
{
"reimburse_uuid":"1c0b5323-6d79-11f1-8c62-bc2411125ba4",
"user_uuid":"5219edbb-512d-11f1-8bac-bc2411125ba4",
"departure_postcode":"3448BT",
"destination_postcode":"3433AA",
"travel_distance":56,
"travel_date":"2026-06-21",
"travel_description":null,
"company_uuid":null,
"company_name":null
},
{
"reimburse_uuid":"85d5db8a-6d79-11f1-8c62-bc2411125ba4",
"user_uuid":"5219edbb-512d-11f1-8bac-bc2411125ba4",
"departure_postcode":"3448BT",
"destination_postcode":"3433AA",
"travel_distance":56,
"travel_date":"2026-06-21",
"travel_description":null,
"company_uuid":null,
"company_name":null
}
]
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -0,0 +1,68 @@
# POST Travel reimbursement
This API call adds a entry for the travel reimbursement
#### Location
```
/api/v1/office/travel-reimburse/
```
#### Permissions required
`office-travel-reimburse` RW
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| user_uuid | uuid | yes | Unique id of the user to add the reimbursement to |
| departure_postcode | string | yes | Postcode of the departure point |
| destination_postcode | string | yes | Postcode of the destination point |
| travel_date | date | yes | The date of the travel (YYYY-MM-DD) |
| travel_distance | integer | yes | The travel distance |
| travel_description | string | no | Description of the travel |
| company_uuid | uuid | yes, if customers module enabled | *Only when the Customers modules is enabled* The company uuid that the travel is linked to. Set the home/work travel company in system settings |
| company_name | string | yes, if customers module disabled | *Only when the Customers module is disabled* The that the travel is linked to. Set the home/work travel company in system settings |
### Example Body (json)
```json
{
"user_uuid": "5219edbb-512d-11f1-8bac-bc2411125ba4",
"departure_postcode": "3448BT",
"destination_postcode": "3433AA",
"travel_date": "2026-06-21",
"travel_distance": "56",
"travel_description": "Example description",
"company_uuid": "0f6a9c83-809b-4d54-8b16-a8197ac64ab4"
}
```
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/office/travel-reimburse/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $json_payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
```
### Example Response
```json
"Travel reimburse added."
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -0,0 +1,72 @@
# PUT Travel reimbursement
This PUT modifies an existing reimbursement item.
#### Location
```
/api/v1/office/travel-reimburse/
```
#### Permissions required
`office-travel-reimburse` RW
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------- | ------- | -------- | -------------------------------------------------------------- |
| reimburse_uuid | uuid | yes | Unique id of the reimburse to edit |
| departure_postcode | string | yes | Postcode of the departure point |
| destination_postcode | string | yes | Postcode of the destination point |
| travel_date | date | yes | The date of the travel (YYYY-MM-DD) |
| travel_distance | integer | yes | The travel distance |
| travel_description | string | no | Description of the travel |
| company_uuid | uuid | no | The company uuid if the travel is linked to a certain company. |
### Example Body (json)
```json
{
"reimburse_uuid": "1c0b5323-6d79-11f1-8c62-bc2411125ba4",
"user_uuid": "5219edbb-512d-11f1-8bac-bc2411125ba4",
"departure_postcode": "3448BT",
"destination_postcode": "3433AA",
"travel_date": "2026-06-21",
"travel_distance": "56",
"travel_description": "Example description",
"company_uuid": "0f6a9c83-809b-4d54-8b16-a8197ac64ab4"
}
```
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/office/travel-reimburse/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $json_payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'X-HTTP-Method-Override: PUT'
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
```
### Example Response
```json
"Module enabled successfully."
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

@@ -0,0 +1,67 @@
# PUT Global travel reimbursements settings
This PUT call configures the global Sentri settings for the Travel reimbursement in the office module.
#### Location
```
/api/v1/office/travel-reimburse/configure/
```
#### Permissions required
`admin-portalsettings` RW
#### Body parameters
| Parameter | Type | Required | Description |
| -------------------------------------------- | ------ | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| office_travelreimburse_cents_homework_incl | int | yes | The cents per km for home/work travel with taxes included. |
| office_travelreimburse_cents_homework_excl | int | yes | The cents per km for home/work travel with taxes excluded. |
| office_travelreimburse_cents_business_incl | int | yes | The cents per km for business travel with taxes included. |
| office_travelreimburse_cents_business_excl | int | yes | The cents per km for business travel with taxes excluded. |
| office_travelreimburse_howework_company_uuid | uuid | yes, if customers module enabled | *Only when the Customers modules is enabled* The company uuid that the travel is linked to. Set the home/work travel company in system settings |
| office_travelreimburse_howework_company_name | string | yes, if customers module disabled | *Only when the Customers module is disabled* The that the travel is linked to. Set the home/work travel company in system settings |
### Example Body (json)
```json
{
"portal_uuid": "effda0c0-0830-11f0-9300-7e99ed98b725",
"office_travelreimburse_cents_homework_incl": 23,
"office_travelreimburse_cents_homework_excl": 23,
"office_travelreimburse_cents_business_incl": 23,
"office_travelreimburse_cents_business_excl": 23,
office_travelreimburse_howework_company_uuid: "0f6a9c83-809b-4d54-8b16-a8197ac64ab4"
}
```
### Example Request
```php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/office/travel-reimburse/configure/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $json_payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'X-HTTP-Method-Override: PUT'
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
```
### Example Response
```json
"portal settings updated successfully."
```
#### Known errors or issues.
None are known at the time
If you do encounter issues and get an http code in return, check the response codes on this page.

View File

View File

@@ -1,15 +1,19 @@
# Release notes
## v.1.3
`to be announced`
### Changes
- Rename the servers module to Inventory so it supports other things as well.
- Added CSP headers to PHP code
`08-07-2026`
### Features
- Hypervisor overview.
- Network devices overview.
- Travel reimbursement feature added.
### Fixes
- [b4f3553f1e](https://gitea.mooij.me/meteo/Sentri/commit/b4f3553f1eeedb7ea47686b49e66acd6fccfe145) Disabling MFA in userprofile does not hide button correctly.
- [97963b34aa](https://gitea.mooij.me/meteo/Sentri/commit/97963b34aa138c9dbfca8d0a2d8f326e96adb925) Update different composer packages.
- [68c9e00afb](https://gitea.mooij.me/meteo/Sentri/commit/68c9e00afb79ba2c63e0ecb9970a6f04b04e6e7a) cloudDistributor not set when creating Inserve subscription licenses.
- [94f349597d](https://gitea.mooij.me/meteo/Sentri/commit/94f349597d97f480aa2713589508baf46428ad80) Changed /systemconfig/ page to /portal-management/.
- [b31185c2e9](https://gitea.mooij.me/meteo/Sentri/commit/b31185c2e92945fa06ca223d6b0ac95b5cd1180d) Login without username/password now shows error on login page.
- [f94bafb25d](https://gitea.mooij.me/meteo/Sentri/commit/f94bafb25dd1ba17ba59b5114a9b0dff6d687f8c) Server overview wont hide last modify column.
- [fa3515625b](https://gitea.mooij.me/meteo/Sentri/commit/fa3515625b7ff5e80e3737c5feb5fbcd7a2b6cbe) No response toast anymore when saving something
## v.1.2.4
`21-06-2026`