Sfoglia il codice sorgente

fixes and removed sight check advantage

master
Daniel 2 anni fa
parent
commit
4d866e6bae
7 ha cambiato i file con 6 aggiunte e 39 eliminazioni
  1. +1
    -2
      httpdocs/public/assets/js/my-bim-score.js
  2. +1
    -1
      httpdocs/public/assets/scss/components/_basic.scss
  3. +0
    -1
      httpdocs/src/Controller/UserController.php
  4. +0
    -21
      httpdocs/src/Entity/UserWorksheet.php
  5. +1
    -1
      httpdocs/src/Service/CalculatorService.php
  6. +3
    -9
      httpdocs/templates/pages/risk_analysis.html.twig
  7. +0
    -4
      httpdocs/templates/snippets/worksheet-result.html.twig

+ 1
- 2
httpdocs/public/assets/js/my-bim-score.js Vedi File

@@ -165,10 +165,9 @@ function onCalculate() {
method: "post",
data: $('#form-risk').serializeArray(),
success: function (data) {
console.log(data);
$('#resInspection').text(data['recCycleInspection']);
$('#resMaintenance').text(data['recCycleMaintenance']);
$('#resPercentage').text((data['costDiffCurRecPercentage'] * 100) + " %");
$('#resPercentage').text((parseFloat(data['costDiffCurRecPercentage']) * 100) + " %");
let costDiff = data['costDiffCurCycleRecCycle'];
let roundedCostDiff = parseFloat(costDiff).toFixed(2);
$('#resEuro').text(roundedCostDiff.replace(/\./g, ",") + " €");


+ 1
- 1
httpdocs/public/assets/scss/components/_basic.scss Vedi File

@@ -38,7 +38,7 @@ textarea:-ms-input-placeholder {
width: 80vw;
max-width: 1280px;
padding: 3rem 0;
min-height: 600px;
min-height: calc(100vh - 68px - 104px);
}

h1 {


+ 0
- 1
httpdocs/src/Controller/UserController.php Vedi File

@@ -149,7 +149,6 @@ class UserController extends AbstractController
$worksheet->setFailureDamage(Utils::$riskCosts[$params['costs']][0]);
$worksheet->setMaintenanceAdvantage($params['maintenance']);
$worksheet->setInspectionAdvantage($params['inspection']);
$worksheet->setCheckAdvantage($params['check']);
$worksheet->setUserCycleMonths($params['cycle']);
$worksheet->setBandwidth($benchmark->getBandwidth());
$worksheet->setRecMaintenanceCycleMonths($calculation['recCycleMaintenance']);


+ 0
- 21
httpdocs/src/Entity/UserWorksheet.php Vedi File

@@ -59,11 +59,6 @@ class UserWorksheet
*/
protected $inspectionAdvantage;

/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $checkAdvantage;

/**
* @ORM\Column(type="smallint", nullable=false, options={"unsigned" = true})
*/
@@ -226,22 +221,6 @@ class UserWorksheet
$this->inspectionAdvantage = $inspectionAdvantage;
}

/**
* @return mixed
*/
public function getCheckAdvantage()
{
return $this->checkAdvantage;
}

/**
* @param mixed $checkAdvantage
*/
public function setCheckAdvantage($checkAdvantage): void
{
$this->checkAdvantage = $checkAdvantage;
}

/**
* @return mixed
*/


+ 1
- 1
httpdocs/src/Service/CalculatorService.php Vedi File

@@ -30,7 +30,7 @@ class CalculatorService
$riskFactor = Utils::$riskPoints[$riskPoints]['factor'];

$recCycleMaintenance = $asset->getCycleMonthsMax();
if ((int)($params['maintenance']) === 1 || ((int)$params['check']) === 0 ) {
if ((int)($params['maintenance']) === 1) {
$recCycleMaintenance = (int) ($asset->getCycleMonthsMax() * $riskFactor);
if ($recCycleMaintenance < $asset->getCycleMonthsMin()) {
$recCycleMaintenance = $asset->getCycleMonthsMin();


+ 3
- 9
httpdocs/templates/pages/risk_analysis.html.twig Vedi File

@@ -3,6 +3,9 @@
{% block title %}MPP-Tool{% endblock %}

{% block body %}
<div class="mini-nav">
<a href="{{ path('start') }}">Zurück zur Übersicht</a>
</div>
<h1>MPP-Tool</h1>
<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">
@@ -61,15 +64,6 @@
</select>
</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>
<h2>Zyklus und Bandbreite</h2>
<div class="row-box">


+ 0
- 4
httpdocs/templates/snippets/worksheet-result.html.twig Vedi File

@@ -22,10 +22,6 @@
<td><span>Kann durch eine Inspektion der Zustand der Anlage erkannt werden?</span></td>
<td>{% if worksheet.inspectionAdvantage == 1 %}Ja{% else %}nein{% endif %}</td>
</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>

<h3>Zyklus und Bandbreite</h3>


Caricamento…
Annulla
Salva