corregido el error de que añadía el tiempo desde la parada a la finalización en la tarea del maquinista. También se cambia el label del boton continuar dependiendo si la tarea está pendiente o pausada

This commit is contained in:
2025-06-09 21:21:13 +02:00
parent 808bcd3847
commit 0bcd9899ef
7 changed files with 31 additions and 3 deletions

View File

@ -15,8 +15,11 @@ class MaquinistaTareaView {
this.inputClick = $('.ot-tarea-click')
this.btnPrintLabels = this.item.find('#btn-print-labels')
this.btnFicharEmbalaje = this.item.find('#btn-fichar-embalaje')
this.lang = {};
}
init() {
async init() {
const res = await fetch("/translate/lang/Produccion");
this.lang = await res.json();
this.actionButtons.on('click', this.eventActionButton.bind(this))
this.btnDelay.on('click', this.delayEventActionButton.bind(this))
this.btnDeleteProgress.on('click', this.handleDeleteTareaProgress.bind(this))
@ -183,6 +186,12 @@ class MaquinistaTareaView {
showBasedOnStatus(status) {
if (['P', 'S'].includes(status)) {
if(status == 'P') {
this.btnPlay.html(`<span class="ti ti-player-play ti-lg"></span>` + this.lang.maquinista.init_tarea);
}
else{
this.btnPlay.html(`<span class="ti ti-player-play ti-lg"></span>` + this.lang.maquinista.play_tarea);
}
this.enableButtons()
this.showPlay()
}