Equipment is kész.
This commit is contained in:
@@ -7,13 +7,16 @@
|
||||
|
||||
<div class="card shadow p-4">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-primary float-right">Új elem hozzáadása</button>
|
||||
<button id="newEquipmentBtn" class="btn btn-primary float-right new-btn" data-bs-toggle="tooltip" data-bs-placement="top" title="Új berendezés">
|
||||
<i class="bi bi-plus-square"></i>
|
||||
</button>
|
||||
</div>
|
||||
<table id="tbEquipmentsPage" class="table table-bordered table-hover table-sm" style="width:100%">
|
||||
<thead class="table-primary">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Short Name</th>
|
||||
<th>Equipment Number</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -21,6 +24,7 @@
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Short Name</th>
|
||||
<th>Equipment Number</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@@ -38,6 +42,7 @@
|
||||
columns: [
|
||||
{ data: "id" },
|
||||
{ data: "shortName" },
|
||||
{ data: "equipmentNumber" },
|
||||
{ data: null, render: function (data, type, row) {
|
||||
return renderActionButtons(row.id);
|
||||
}}
|
||||
@@ -48,9 +53,9 @@
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"targets": 2,
|
||||
"targets": 3,
|
||||
"className": "text-center",
|
||||
"width": "10"
|
||||
"width": "10%"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -58,6 +63,11 @@
|
||||
language: { url: '//cdn.datatables.net/plug-ins/2.2.2/i18n/hu.json',}
|
||||
});
|
||||
|
||||
$('#newEquipmentBtn').on('click', function ()
|
||||
{
|
||||
window.location.href = `@Url.Page("/BaseStock/Equipments/EquipmentEditPage")?id=0`;
|
||||
});
|
||||
|
||||
$('#tbEquipmentsPage').on('click', '.edit-btn', function ()
|
||||
{
|
||||
const row = table.row($(this).closest('tr')).data();
|
||||
|
||||
Reference in New Issue
Block a user