Refactor eviction and rent collection features; migrate logic from Mietobjekt to Mietverhältnis; update localization and UI handlers
This commit is contained in:
@@ -2,27 +2,6 @@
|
||||
|
||||
namespace Espo\Custom\Controllers;
|
||||
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Api\Request;
|
||||
|
||||
class CMietobjekt extends \Espo\Core\Templates\Controllers\Base
|
||||
{
|
||||
/**
|
||||
* POST Action: Initiate eviction lawsuit from Mietobjekt
|
||||
*/
|
||||
public function postActionInitiateEviction(Request $request): array
|
||||
{
|
||||
$data = $request->getParsedBody();
|
||||
|
||||
$id = $data->id ?? null;
|
||||
if (!$id) {
|
||||
throw new BadRequest('No Mietobjekt ID provided');
|
||||
}
|
||||
|
||||
$service = $this->getRecordService();
|
||||
$result = $service->initiateEviction($id);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user