0
I have a grid with a cleaning list to be done. Initially all buttons are green with the text "Start Cleaning". When I start a cleaning, this button is blue and the text changes to "Continue Cleaning".
Perfect, this is already working. I would like, as long as there is an open cleaning, that the other buttons are disabled, and turn back on only after the open cleaning is completed.
The idea is not to allow the user to start a cleaning without finishing the one that is open. Below the snippet of my code that is inside a foreach:
<tr style="background-color:<?php echo $corFundoSujoAgendado?>;color: <?php echo $corQuartoSujoAgendado; ?>">
<td><center><?php echo $quartos["quarto"]; ?></center></td>
<td><center><?php echo date("d/m/Y H:i",strtotime($quartos["solicitado_em"])); ?></center></td>
<td>
<center>
<?php if (count($limpezaEmAbertoPorIDLimpeza) > 0) {?>
<a class='ui button fluid blue iniciarLimpeza' href="javascript:exibirLimpezaParaIniciar(<?php echo $idLimpezaQuartoSujoAgendado; ?>);" ><span class="iniciar">Continuar limpeza</span>
 
</a>
<?php } else { ?>
<a class='ui button fluid green iniciarLimpeza' href="javascript:exibirLimpezaParaIniciar(<?php echo $idLimpezaQuartoSujoAgendado; ?>);" ><span class="iniciar">Iniciar Limpeza</span>
 
</a>
<?php } ?>
</center>
</td>
The code snippet that you put of example in the question is broken, please fix it. If possible also provide the HTML code of these buttons.
– Mauricio Cantú
hehehe, I can’t find the option to edit the question.. I’m new to the site...
– Vinicius Avanzi