addition API BV
This commit is contained in:
@@ -73,8 +73,6 @@
|
||||
<div class="page-content">
|
||||
<?php include('top_stat_widget.php'); ?>
|
||||
|
||||
|
||||
|
||||
<div class="card radius-10">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
@@ -96,7 +94,8 @@
|
||||
<th><?= htmlspecialchars($rowheader, ENT_QUOTES, 'UTF-8'); ?></th>
|
||||
<th><?= htmlspecialchars($columnheader, ENT_QUOTES, 'UTF-8'); ?></th>
|
||||
<th><?= htmlspecialchars($desctemplate, ENT_QUOTES, 'UTF-8'); ?></th>
|
||||
<th><?= htmlspecialchars($desttable, ENT_QUOTES, 'UTF-8'); ?></th>
|
||||
<th>Client Name</th>
|
||||
<th>Status</th> <!-- Aggiunta colonna Status -->
|
||||
<th><?= htmlspecialchars($action, ENT_QUOTES, 'UTF-8'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -121,13 +120,11 @@
|
||||
</div>
|
||||
<!--end wrapper-->
|
||||
|
||||
|
||||
<!-- search modal -->
|
||||
<?php //include('include/searchmodal.php');
|
||||
?>
|
||||
<!-- end search modal -->
|
||||
|
||||
|
||||
<!--start switcher-->
|
||||
<?php //include('include/themeswitcher.php');
|
||||
?>
|
||||
@@ -143,6 +140,10 @@
|
||||
serverSide: false,
|
||||
ajax: 'load_templates.php',
|
||||
columns: [{
|
||||
data: 'id', // ID del template
|
||||
title: "ID"
|
||||
},
|
||||
{
|
||||
data: 'name', // Nome del template
|
||||
title: "Template Name"
|
||||
},
|
||||
@@ -167,8 +168,13 @@
|
||||
defaultContent: 'No description'
|
||||
},
|
||||
{
|
||||
data: 'target_table', // Tabella di destinazione
|
||||
title: "Target Table"
|
||||
data: null, // Nuova colonna per Client Name e ID
|
||||
title: "Client Name",
|
||||
render: function(data, type, row) {
|
||||
const clientName = row.clientname || "No client";
|
||||
const clientId = row.idclient || "N/A";
|
||||
return `${clientName} (ID: ${clientId})`;
|
||||
}
|
||||
},
|
||||
{
|
||||
data: 'status', // Stato con Toggle Switch
|
||||
@@ -178,11 +184,11 @@
|
||||
render: function(status, type, row) {
|
||||
let checked = (status === "active") ? "checked" : "";
|
||||
return `
|
||||
<label class="switch">
|
||||
<input type="checkbox" class="toggle-status" data-id="${row.id}" ${checked}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
`;
|
||||
<label class="switch">
|
||||
<input type="checkbox" class="toggle-status" data-id="${row.id}" ${checked}>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
`;
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -192,35 +198,32 @@
|
||||
title: "Actions",
|
||||
render: function(data) {
|
||||
return `
|
||||
<div class="d-flex">
|
||||
<a href="edit_template_xls.php?id=${data}" class="btn btn-sm btn-primary me-1">
|
||||
<i class="bx bx-edit-alt"></i>
|
||||
</a>
|
||||
<a href="mapping_template_xls.php?id=${data}" class="btn btn-sm btn-success me-1">
|
||||
<i class="bx bx-link-alt"></i>
|
||||
</a>
|
||||
<button class="btn btn-sm btn-danger" onclick="confirmDelete(${data})">
|
||||
<i class="bx bx-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
<div class="d-flex">
|
||||
<a href="edit_template_xls.php?id=${data}" class="btn btn-sm btn-primary me-1">
|
||||
<i class="bx bx-edit-alt"></i>
|
||||
</a>
|
||||
<a href="mapping_template_xls.php?id=${data}" class="btn btn-sm btn-success me-1">
|
||||
<i class="bx bx-link-alt"></i>
|
||||
</a>
|
||||
<button class="btn btn-sm btn-danger" onclick="confirmDelete(${data})">
|
||||
<i class="bx bx-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
],
|
||||
dom: '<"card-header border-bottom p-3"<"d-flex align-items-center"<"card-title mb-0 flex-grow-1"f>>>rt<"card-footer border-top p-3"<"d-flex align-items-center"<"me-auto"l><"d-flex gap-2"ip>>>',
|
||||
lengthMenu: [10, 25, 50, 100],
|
||||
language: {
|
||||
url: "//cdn.datatables.net/plug-ins/1.13.6/i18n/Italian.json",
|
||||
search: "Cerca:",
|
||||
lengthMenu: "Mostra _MENU_ elementi",
|
||||
info: "Visualizzando da _START_ a _END_ di _TOTAL_ elementi",
|
||||
paginate: {
|
||||
first: "<?= $langdatatables['paginate_first'] ?>",
|
||||
last: "<?= $langdatatables['paginate_last'] ?>",
|
||||
next: "<?= $langdatatables['paginate_next'] ?>",
|
||||
previous: "<?= $langdatatables['paginate_previous'] ?>"
|
||||
first: "<?= isset($langdatatables['paginate_first']) ? $langdatatables['paginate_first'] : 'Primo' ?>",
|
||||
last: "<?= isset($langdatatables['paginate_last']) ? $langdatatables['paginate_last'] : 'Ultimo' ?>",
|
||||
next: "<?= isset($langdatatables['paginate_next']) ? $langdatatables['paginate_next'] : 'Successivo' ?>",
|
||||
previous: "<?= isset($langdatatables['paginate_previous']) ? $langdatatables['paginate_previous'] : 'Precedente' ?>"
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -243,7 +246,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(document).on("change", ".toggle-status", function() {
|
||||
let templateId = $(this).data("id");
|
||||
let newStatus = $(this).is(":checked") ? "active" : "inactive";
|
||||
|
||||
Reference in New Issue
Block a user