commit compras2 2911
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-29 10:48:22 +02:00
parent 448948a487
commit 7da8d6c87a
64 changed files with 2538 additions and 288 deletions
@@ -11,6 +11,27 @@ use Symfony\Component\HttpFoundation\Response;
final class ExpenseAllocationController extends Controller
{
public function commonShow(Request $request, int $allocation, ExpenseAllocations $service): Response
{
$actor = $request->user('web');
abort_unless($actor instanceof User, 403);
$request->validate(['page' => 'nullable|integer|min:1|max:1000000']);
Inertia::encryptHistory();
$response = Inertia::render('payments/expense-allocation', $service->workspace($actor, $allocation, 'common_allocation'))->toResponse($request);
$response->headers->set('Cache-Control', 'private, no-store, max-age=0');
return $response;
}
public function commonStore(Request $request, int $allocation, ExpenseAllocations $service): Response
{
$actor = $request->user('web');
abort_unless($actor instanceof User, 403);
$service->save($actor, $allocation, $request->all(), 'common_allocation');
return back()->with('success', 'Imputação da despesa por categoria preservada.');
}
public function show(Request $request, ExternalPayment $payment, ExpenseAllocations $service): Response
{
$actor = $request->user('web');