mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Resuelto el problema del add filtrando crear el datatable cuando es un edit solamente
This commit is contained in:
@ -14,9 +14,15 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
|
||||
|
||||
const SORTABLE = [
|
||||
0 => "t1.nombre",
|
||||
1 => "t1.papel_generico_id",
|
||||
2 => "t1.gramaje",
|
||||
3 => "t2.nombre",
|
||||
1 => "t2.nombre",
|
||||
2 => "t1.bn",
|
||||
3 => "t1.gramaje",
|
||||
4 => "t1.color",
|
||||
5 => "t1.cubierta",
|
||||
6 => "t1.sobrecubierta",
|
||||
7 => "t1.rotativa",
|
||||
8 => "t1.isActivo",
|
||||
|
||||
|
||||
/*1 => "t1.id",
|
||||
2 => "t1.papel_generico_id",
|
||||
|
||||
@ -26,8 +26,8 @@
|
||||
</form>
|
||||
</div><!-- //.card -->
|
||||
|
||||
<?php if(str_contains($formAction,'edit')): ?>
|
||||
<?php if($papelImpresion->rotativa == true): ?>
|
||||
|
||||
<?php if(str_contains($formAction,'edit') && $papelImpresion->rotativa == true): ?>
|
||||
<div class="accordion mt-3" id="accordionTipologias">
|
||||
<?php else: ?>
|
||||
<div class="accordion mt-3" id="accordionTipologias" style="display:none">
|
||||
@ -64,8 +64,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- //.accordion -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<div class="accordion mt-3" id="accordionMaquinas">
|
||||
@ -214,6 +212,9 @@
|
||||
</div>`;
|
||||
};
|
||||
|
||||
if(url_parts[url_parts.length-2] == 'edit'){
|
||||
|
||||
|
||||
theTable = $('#tableOfPapelimpresiontipologias').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
@ -253,7 +254,7 @@
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
// Add new tipología
|
||||
$('#newTipologia').on("click", function(e) {
|
||||
if ($('#tableOfPapelimpresiontipologias').DataTable().data().count() >= 3){
|
||||
|
||||
@ -89,7 +89,7 @@
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [3, 4, 5, 6, 7, lastColNr] //JJO añadidas bool cols
|
||||
targets: [lastColNr] //JJO añadidas bool cols
|
||||
}
|
||||
],
|
||||
columns : [
|
||||
|
||||
Reference in New Issue
Block a user