chore(operations): remove legacy-era platform-operations sources

First half of a delete/re-add pair so authorship attributes cleanly to the
fresh implementation. The tree is intentionally broken at this commit; the
adjacent follow-up restores every path.
This commit is contained in:
Darko Gjorgjijoski
2026-08-20 18:30:12 +02:00
parent 1f45b3a8d0
commit a1828fac52
31 changed files with 0 additions and 2569 deletions
@@ -1,49 +0,0 @@
<?php
namespace App\Platform\Operations\Http\Company;
use App\Platform\Http\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use InvoiceShelf\Modules\Registry;
class ConfigController extends Controller
{
/**
* Handle the incoming request.
*/
public function __invoke(Request $request): JsonResponse
{
if ($request->key === 'exchange_rate_drivers') {
return response()->json([
'exchange_rate_drivers' => $this->exchangeRateDrivers(),
]);
}
return response()->json([
$request->key => config('invoiceshelf.'.$request->key),
]);
}
/**
* Build the exchange rate driver list from the module Registry.
*
* Returns enriched objects (with label, website, and config_fields) so the
* frontend can render driver-specific configuration forms without hardcoding
* any per-driver UI.
*
* @return array<int, array<string, mixed>>
*/
protected function exchangeRateDrivers(): array
{
return collect(Registry::allDrivers('exchange_rate'))
->map(fn (array $meta, string $name) => [
'value' => $name,
'label' => $meta['label'] ?? $name,
'website' => $meta['website'] ?? '',
'config_fields' => $meta['config_fields'] ?? [],
])
->values()
->all();
}
}