Skip to content

Commit

Permalink
#2762 [DigiriskStandard] add: dashboard on digirisk standard card
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo David committed Nov 28, 2022
1 parent 89006a2 commit 1615f8e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 233 deletions.
4 changes: 2 additions & 2 deletions class/dashboarddigiriskstats.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ public function load_dashboard($load_risk = 1, $load_task = 1, $load_riskassemen
* @return void
* @throws Exception
*/
public function show_dashboard()
public function show_dashboard($load_risk = 1, $load_task = 1, $load_riskassementdocument = 1, $load_accident = 1, $load_evaluator = 1, $load_digiriskresources = 1)
{
global $conf, $form, $langs, $user;

$WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');

$dashboard_data = $this->load_dashboard();
$dashboard_data = $this->load_dashboard($load_risk, $load_task, $load_riskassementdocument, $load_accident, $load_evaluator, $load_digiriskresources);

print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '" class="dashboard" id="dashBoardForm">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
Expand Down
224 changes: 0 additions & 224 deletions core/boxes/box_riskassessmentdocument.php

This file was deleted.

14 changes: 7 additions & 7 deletions view/digiriskstandard/digiriskstandard_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@

require_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';

require_once './../../class/digiriskstandard.class.php';
require_once './../../core/boxes/box_riskassessmentdocument.php';
require_once './../../lib/digiriskdolibarr_digiriskstandard.lib.php';
require_once './../../lib/digiriskdolibarr_function.lib.php';
require_once __DIR__ . '/../../class/digiriskstandard.class.php';
require_once __DIR__ . '/../../lib/digiriskdolibarr_digiriskstandard.lib.php';
require_once __DIR__ . '/../../lib/digiriskdolibarr_function.lib.php';
require_once __DIR__ . '/../../class/dashboarddigiriskstats.class.php';

global $db, $conf, $langs, $user, $maxwidthmini, $maxheightmini, $maxwidthsmall,$maxheightsmall;

Expand All @@ -50,7 +50,7 @@

// Initialize technical objects
$object = new DigiriskStandard($db);
$box = new box_riskassessmentdocument($db);
$stats = new DashboardDigiriskStats($db);

$object->fetch($conf->global->DIGIRISKDOLIBARR_ACTIVE_STANDARD);

Expand Down Expand Up @@ -93,14 +93,14 @@
print '<div class="fichecenter">';
print '<br>';

$box->loadBox();
$box->showBox();
$stats->show_dashboard(1,1,1,0);

print '<div class="fichecenter">';

print dol_get_fiche_end();
}


// End of page
llxFooter();
$db->close();

0 comments on commit 1615f8e

Please sign in to comment.