lighthouse improvements

This commit is contained in:
Dennis Eichhorn 2023-09-26 20:49:44 +00:00
parent 54a300ec0c
commit b63644a08a

View File

@ -199,11 +199,13 @@ final class BackendController extends Controller
*/
public function viewSupplierManagementSupplierProfile(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$head = $response->data['Content']->head;
$head = $response->data['Content']->head;
$nonce = $this->app->appSettings->getOption('script-nonce');
$head->addAsset(AssetType::CSS, 'Resources/chartjs/Chartjs/chart.css');
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/Chartjs/chart.js');
$head->addAsset(AssetType::JSLATE, 'Resources/OpenLayers/OpenLayers.js');
$head->addAsset(AssetType::JSLATE, 'Modules/ClientManagement/Controller.js', ['type' => 'module']);
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/Chartjs/chart.js', ['nonce' => $nonce]);
$head->addAsset(AssetType::JSLATE, 'Resources/OpenLayers/OpenLayers.js', ['nonce' => $nonce]);
$head->addAsset(AssetType::JSLATE, 'Modules/ClientManagement/Controller.js', ['nonce' => $nonce, 'type' => 'module']);
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/SupplierManagement/Theme/Backend/supplier-profile');