Merge branch 'fix/tarifa-maquina-form' into 'main'

fix js in tarifa new form

See merge request jjimenez/safekat!489
This commit is contained in:
Alvaro
2025-01-22 23:51:58 +00:00
2 changed files with 24 additions and 21 deletions

View File

@ -71,7 +71,7 @@
</h2> </h2>
<div id="accordionTipTarifaMaquina" class="accordion-collapse collapse show" data-bs-parent="#accordionTarifaMaquinas"> <div id="accordionTipTarifaMaquina" class="accordion-collapse collapse show" data-bs-parent="#accordionTarifaMaquinas">
<div class="accordion-body"> <div class="accordion-body">
<?= view("themes/vuexy/components/forms/tarifa_maquinas",["id" => "tarifa_maquina_component","tarifaId" => $tarifaManipuladoEntity->id ]) ?> <?= view("themes/vuexy/components/forms/tarifa_maquinas",["id" => "tarifa_maquina_component","tarifaId" => $tarifaManipuladoEntity?->id ]) ?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -24,26 +24,29 @@ class TarifaMaquina {
} }
init() { init() {
// this.btnNewTarifaMaquina.prop("disabled",true) if (this.tarifaId) {
this.selectMaquinaTarea.init()
this.selectTarifaMaquina.init() // this.btnNewTarifaMaquina.prop("disabled",true)
this.datatable = this.datatableItem.DataTable({ this.selectMaquinaTarea.init()
processing: true, this.selectTarifaMaquina.init()
layout: { this.datatable = this.datatableItem.DataTable({
topStart: 'pageLength', processing: true,
topEnd: 'search', layout: {
bottomStart: 'info', topStart: 'pageLength',
bottomEnd: 'paging' topEnd: 'search',
}, bottomStart: 'info',
serverSide: true, bottomEnd: 'paging'
pageLength: 25, },
language: { serverSide: true,
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json" pageLength: 25,
}, language: {
columns: this.datatableColumns, url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
ajax: `/tarifas/maquinas/${this.type}/datatable/${this.tarifaId}` },
}); columns: this.datatableColumns,
this.events(); ajax: `/tarifas/maquinas/${this.type}/datatable/${this.tarifaId}`
});
this.events();
}
} }
events() { events() {
this.btnNewTarifaMaquina.on("click", this.handleNewTarifaMaquina.bind(this)); this.btnNewTarifaMaquina.on("click", this.handleNewTarifaMaquina.bind(this));