| @@ -165,10 +165,9 @@ function onCalculate() { | |||||
| method: "post", | method: "post", | ||||
| data: $('#form-risk').serializeArray(), | data: $('#form-risk').serializeArray(), | ||||
| success: function (data) { | success: function (data) { | ||||
| console.log(data); | |||||
| $('#resInspection').text(data['recCycleInspection']); | $('#resInspection').text(data['recCycleInspection']); | ||||
| $('#resMaintenance').text(data['recCycleMaintenance']); | $('#resMaintenance').text(data['recCycleMaintenance']); | ||||
| $('#resPercentage').text((data['costDiffCurRecPercentage'] * 100) + " %"); | |||||
| $('#resPercentage').text((parseFloat(data['costDiffCurRecPercentage']) * 100) + " %"); | |||||
| let costDiff = data['costDiffCurCycleRecCycle']; | let costDiff = data['costDiffCurCycleRecCycle']; | ||||
| let roundedCostDiff = parseFloat(costDiff).toFixed(2); | let roundedCostDiff = parseFloat(costDiff).toFixed(2); | ||||
| $('#resEuro').text(roundedCostDiff.replace(/\./g, ",") + " €"); | $('#resEuro').text(roundedCostDiff.replace(/\./g, ",") + " €"); | ||||
| @@ -38,7 +38,7 @@ textarea:-ms-input-placeholder { | |||||
| width: 80vw; | width: 80vw; | ||||
| max-width: 1280px; | max-width: 1280px; | ||||
| padding: 3rem 0; | padding: 3rem 0; | ||||
| min-height: 600px; | |||||
| min-height: calc(100vh - 68px - 104px); | |||||
| } | } | ||||
| h1 { | h1 { | ||||
| @@ -149,7 +149,6 @@ class UserController extends AbstractController | |||||
| $worksheet->setFailureDamage(Utils::$riskCosts[$params['costs']][0]); | $worksheet->setFailureDamage(Utils::$riskCosts[$params['costs']][0]); | ||||
| $worksheet->setMaintenanceAdvantage($params['maintenance']); | $worksheet->setMaintenanceAdvantage($params['maintenance']); | ||||
| $worksheet->setInspectionAdvantage($params['inspection']); | $worksheet->setInspectionAdvantage($params['inspection']); | ||||
| $worksheet->setCheckAdvantage($params['check']); | |||||
| $worksheet->setUserCycleMonths($params['cycle']); | $worksheet->setUserCycleMonths($params['cycle']); | ||||
| $worksheet->setBandwidth($benchmark->getBandwidth()); | $worksheet->setBandwidth($benchmark->getBandwidth()); | ||||
| $worksheet->setRecMaintenanceCycleMonths($calculation['recCycleMaintenance']); | $worksheet->setRecMaintenanceCycleMonths($calculation['recCycleMaintenance']); | ||||
| @@ -59,11 +59,6 @@ class UserWorksheet | |||||
| */ | */ | ||||
| protected $inspectionAdvantage; | protected $inspectionAdvantage; | ||||
| /** | |||||
| * @ORM\Column(type="boolean", nullable=true) | |||||
| */ | |||||
| protected $checkAdvantage; | |||||
| /** | /** | ||||
| * @ORM\Column(type="smallint", nullable=false, options={"unsigned" = true}) | * @ORM\Column(type="smallint", nullable=false, options={"unsigned" = true}) | ||||
| */ | */ | ||||
| @@ -226,22 +221,6 @@ class UserWorksheet | |||||
| $this->inspectionAdvantage = $inspectionAdvantage; | $this->inspectionAdvantage = $inspectionAdvantage; | ||||
| } | } | ||||
| /** | |||||
| * @return mixed | |||||
| */ | |||||
| public function getCheckAdvantage() | |||||
| { | |||||
| return $this->checkAdvantage; | |||||
| } | |||||
| /** | |||||
| * @param mixed $checkAdvantage | |||||
| */ | |||||
| public function setCheckAdvantage($checkAdvantage): void | |||||
| { | |||||
| $this->checkAdvantage = $checkAdvantage; | |||||
| } | |||||
| /** | /** | ||||
| * @return mixed | * @return mixed | ||||
| */ | */ | ||||
| @@ -30,7 +30,7 @@ class CalculatorService | |||||
| $riskFactor = Utils::$riskPoints[$riskPoints]['factor']; | $riskFactor = Utils::$riskPoints[$riskPoints]['factor']; | ||||
| $recCycleMaintenance = $asset->getCycleMonthsMax(); | $recCycleMaintenance = $asset->getCycleMonthsMax(); | ||||
| if ((int)($params['maintenance']) === 1 || ((int)$params['check']) === 0 ) { | |||||
| if ((int)($params['maintenance']) === 1) { | |||||
| $recCycleMaintenance = (int) ($asset->getCycleMonthsMax() * $riskFactor); | $recCycleMaintenance = (int) ($asset->getCycleMonthsMax() * $riskFactor); | ||||
| if ($recCycleMaintenance < $asset->getCycleMonthsMin()) { | if ($recCycleMaintenance < $asset->getCycleMonthsMin()) { | ||||
| $recCycleMaintenance = $asset->getCycleMonthsMin(); | $recCycleMaintenance = $asset->getCycleMonthsMin(); | ||||
| @@ -3,6 +3,9 @@ | |||||
| {% block title %}MPP-Tool{% endblock %} | {% block title %}MPP-Tool{% endblock %} | ||||
| {% block body %} | {% block body %} | ||||
| <div class="mini-nav"> | |||||
| <a href="{{ path('start') }}">Zurück zur Übersicht</a> | |||||
| </div> | |||||
| <h1>MPP-Tool</h1> | <h1>MPP-Tool</h1> | ||||
| <p id="instruction">Bitte füllen sie alle Felder aus, um eine Risikoanalyse zu erstellen.</p> | <p id="instruction">Bitte füllen sie alle Felder aus, um eine Risikoanalyse zu erstellen.</p> | ||||
| <form method="post" id="form-risk" class="form form--catalogue"> | <form method="post" id="form-risk" class="form form--catalogue"> | ||||
| @@ -61,15 +64,6 @@ | |||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="col-box"> | |||||
| <div class="form-fields"> | |||||
| <label for="check">Genügt eine einfache Sichtkontrolle im Rahmen des regelmäßigen Rundgangs?</label> | |||||
| <select name="check" id="check"> | |||||
| <option value="0">Nein</option> | |||||
| <option value="1">Ja</option> | |||||
| </select> | |||||
| </div> | |||||
| </div> | |||||
| </div> | </div> | ||||
| <h2>Zyklus und Bandbreite</h2> | <h2>Zyklus und Bandbreite</h2> | ||||
| <div class="row-box"> | <div class="row-box"> | ||||
| @@ -22,10 +22,6 @@ | |||||
| <td><span>Kann durch eine Inspektion der Zustand der Anlage erkannt werden?</span></td> | <td><span>Kann durch eine Inspektion der Zustand der Anlage erkannt werden?</span></td> | ||||
| <td>{% if worksheet.inspectionAdvantage == 1 %}Ja{% else %}nein{% endif %}</td> | <td>{% if worksheet.inspectionAdvantage == 1 %}Ja{% else %}nein{% endif %}</td> | ||||
| </tr> | </tr> | ||||
| <tr> | |||||
| <td><span>Genügt eine einfache Sichtkontrolle im Rahmen des regelmäßigen Rundgangs?</span></td> | |||||
| <td>{% if worksheet.checkAdvantage == 1 %}Ja{% else %}nein{% endif %}</td> | |||||
| </tr> | |||||
| </table> | </table> | ||||
| <h3>Zyklus und Bandbreite</h3> | <h3>Zyklus und Bandbreite</h3> | ||||