50 lines
2.6 KiB
PHP
50 lines
2.6 KiB
PHP
<?php
|
|
// phpcs:ignoreFile
|
|
declare(strict_types=1);
|
|
|
|
include __DIR__ . '/../../items.php';
|
|
require_once __DIR__ . '/module-helpers.php';
|
|
|
|
$syrupOverflow = module_numeric($value['Syrup Overflow Lvl'] ?? null) ?? 0.0;
|
|
$syrupRcvr = module_numeric($value['Syrup RCVR'] ?? null) ?? 0.0;
|
|
$totalSyrup = ($syrupOverflow * 0.82569) + ($syrupRcvr * 0.17431);
|
|
|
|
$tanks = [
|
|
['label' => 'Juice Tank 1', 'value' => module_numeric($value['Juice Tank1'] ?? null)],
|
|
['label' => 'Juice Tank 2', 'value' => module_numeric($value['Juice Tank2'] ?? null)],
|
|
['label' => 'Syrup Receiver', 'value' => module_numeric($value['Syrup RCVR'] ?? null)],
|
|
['label' => 'Syrup Overflow', 'value' => module_numeric($value['Syrup Overflow Lvl'] ?? null)],
|
|
['label' => 'Total Syrup', 'value' => module_numeric($totalSyrup)],
|
|
['label' => 'A1 Receiver', 'value' => module_numeric($value['A1 RCVR'] ?? null)],
|
|
['label' => 'A1 Overflow', 'value' => module_numeric($value['A1 Molasses Overflow Lvl'] ?? null)],
|
|
['label' => 'A2 Receiver', 'value' => module_numeric($value['A2 RCVR'] ?? null)],
|
|
['label' => 'A2 Overflow', 'value' => module_numeric($value['A2 Molasses Overflow Lvl'] ?? null)],
|
|
['label' => 'B Receiver', 'value' => module_numeric($value['B RCVR'] ?? null)],
|
|
['label' => 'B Overflow', 'value' => module_numeric($value['B Molasses Overflow Lvl'] ?? null)],
|
|
['label' => 'Flash Tank', 'value' => module_numeric($value['FlashTankLVL'] ?? null)],
|
|
['label' => 'Condensate Water', 'value' => module_numeric($value['CondensateWater'] ?? null)],
|
|
['label' => 'Sweet Water', 'value' => module_numeric($value['SweetwaterTank'] ?? null)],
|
|
['label' => 'Cold Water Injection', 'value' => module_numeric($value['Cold Water Injection LVL'] ?? null)],
|
|
];
|
|
?>
|
|
|
|
<section class="module-card module-card--tight">
|
|
<div class="module-heading">
|
|
<h2 class="module-heading__title">Tank Levels (Vertical)</h2>
|
|
<span class="module-heading__meta">Quick scan of tank headspace</span>
|
|
</div>
|
|
|
|
<div class="module-vertical-grid">
|
|
<?php foreach ($tanks as $tank) : ?>
|
|
<?php $percent = module_clamp_percent($tank['value']); ?>
|
|
<div class="module-vertical">
|
|
<div class="module-vertical__bar">
|
|
<div class="module-vertical__fill" style="height: <?php echo number_format($percent, 2); ?>%;"></div>
|
|
</div>
|
|
<div class="module-vertical__value"><?php echo module_number($tank['value'], 0); ?>%</div>
|
|
<div class="module-vertical__label"><?php echo module_html($tank['label']); ?></div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</section>
|