log barang teknisi satu halaman
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
|
||||
## TODO Baru - Catch-up penyusutan multi-bulan
|
||||
|
||||
- [ ] Refactor logic depreciation_asset agar memproses multi-bulan (catch-up)
|
||||
- [ ] Terapkan loop per bulan dari bulan setelah tanggal patokan sampai bulan berjalan
|
||||
- [ ] Pertahankan idempotent check per bulan berdasarkan asset_mutations
|
||||
- [ ] Generate mutasi + jurnal per bulan yang eligible
|
||||
- [ ] Update nilai buku & akumulasi penyusutan asset setelah proses loop
|
||||
- [ ] Tambahkan detail response per bulan (processed/skipped reason)
|
||||
- [ ] Validasi syntax PHP untuk Cronjob.php
|
||||
- [x] Refactor logic depreciation_asset agar memproses multi-bulan (catch-up)
|
||||
- [x] Terapkan loop per bulan dari bulan setelah tanggal patokan sampai bulan berjalan
|
||||
- [x] Pertahankan idempotent check per bulan berdasarkan asset_mutations
|
||||
- [x] Generate mutasi + jurnal per bulan yang eligible
|
||||
- [x] Update nilai buku & akumulasi penyusutan asset setelah proses loop
|
||||
- [x] Tambahkan detail response per bulan (processed/skipped reason)
|
||||
- [x] Validasi syntax PHP untuk Cronjob.php
|
||||
|
||||
@@ -60,3 +60,6 @@ $route['iclock/cdata'] = 'AttendanceWebhook/cdata';
|
||||
$route['dbcompare/sql'] = 'Dbcompare/sql';
|
||||
$route['dbcompare/sql_download'] = 'Dbcompare/sql_download';
|
||||
|
||||
// teknisi log barang
|
||||
$route['teknisi/log_barang'] = 'teknisi/log_barang';
|
||||
|
||||
|
||||
@@ -464,4 +464,15 @@ class Teknisi extends CI_Controller {
|
||||
|
||||
echo json_encode(['data' => $result]);
|
||||
}
|
||||
|
||||
public function log_barang()
|
||||
{
|
||||
$data = [
|
||||
"active_menu" => "peralatan_teknisi",
|
||||
];
|
||||
|
||||
$this->load->view('partials/header', $data);
|
||||
$this->load->view('peralatan_teknisi/log_barang', $data);
|
||||
$this->load->view('partials/footer');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,9 +203,9 @@ body {
|
||||
<small class="text-muted">Kelola barang bawaan, pengembalian, dan transfer antar teknisi</small>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-warning" id="btnLogBarang">
|
||||
<a href="<?= base_url('teknisi/log_barang'); ?>" class="btn btn-warning" id="btnLogBarang">
|
||||
<i class="bi bi-journal-text me-1"></i> Log Barang Teknisi
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -570,40 +570,6 @@ body {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Log Barang Teknisi -->
|
||||
<div class="modal fade tech-modal" id="modalLogBarang" tabindex="-1" data-bs-backdrop="static">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="bi bi-journal-text me-2"></i> Log Barang Teknisi</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-tech table-striped w-100" id="tblLogBarang">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama Teknisi</th>
|
||||
<th>Kode Barang</th>
|
||||
<th>Barcode</th>
|
||||
<th>Nama Barang</th>
|
||||
<th>Tanggal Dibawa</th>
|
||||
<th>Tanggal Kembali</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Tutup</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let kembalikanData = [];
|
||||
let dibawaData = [];
|
||||
@@ -1316,57 +1282,5 @@ $(function(){
|
||||
$(this).data('original-text', $(this).html());
|
||||
});
|
||||
|
||||
// =============================================================
|
||||
// LOG BARANG TEKNISI
|
||||
// =============================================================
|
||||
let tblLogBarang;
|
||||
|
||||
$('#btnLogBarang').click(function(){
|
||||
$('#modalLogBarang').modal('show');
|
||||
});
|
||||
|
||||
$('#modalLogBarang').on('shown.bs.modal', function(){
|
||||
if (tblLogBarang) {
|
||||
tblLogBarang.ajax.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
tblLogBarang = $('#tblLogBarang').DataTable({
|
||||
processing: true,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: "<?= base_url('teknisi/get_log_data'); ?>",
|
||||
dataSrc: 'data'
|
||||
},
|
||||
columns: [
|
||||
{ data: 0 },
|
||||
{ data: 1 },
|
||||
{ data: 2 },
|
||||
{ data: 3 },
|
||||
{ data: 4 },
|
||||
{ data: 5 },
|
||||
{ data: 6 },
|
||||
{ data: 7 }
|
||||
],
|
||||
responsive: true,
|
||||
searching: true,
|
||||
paging: true,
|
||||
ordering: true,
|
||||
info: true,
|
||||
language: {
|
||||
search: "Cari:",
|
||||
lengthMenu: "Tampilkan _MENU_ data",
|
||||
info: "Menampilkan _START_ - _END_ dari _TOTAL_ data",
|
||||
zeroRecords: "Tidak ada data",
|
||||
paginate: {
|
||||
first: "Awal",
|
||||
last: "Akhir",
|
||||
next: "»",
|
||||
previous: "«"
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.4.1/css/responsive.bootstrap5.min.css">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--tech-primary: #ff9800;
|
||||
--tech-primary-light: #fff3e0;
|
||||
--tech-primary-dark: #ff9800;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #f5f7fb;
|
||||
}
|
||||
|
||||
.tech-card {
|
||||
border: none;
|
||||
border-radius: 14px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.tech-card .card-header-custom {
|
||||
background: linear-gradient(135deg, var(--tech-primary), var(--tech-primary-dark));
|
||||
color: #fff;
|
||||
padding: 14px 20px;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.tech-card .card-body {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.table-tech thead th {
|
||||
background: #f8f9fa;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .4px;
|
||||
color: #495057;
|
||||
border-bottom: 2px solid #ffcc80;
|
||||
padding: 10px 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.table-tech tbody td {
|
||||
padding: 8px;
|
||||
vertical-align: middle;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.table-tech td .badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 65px;
|
||||
padding: 0.35em 0.65em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.table-tech tbody tr:hover {
|
||||
background: #fff3e0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container-fluid px-3 mt-3">
|
||||
|
||||
<div class="d-flex align-items-center gap-2 mb-3">
|
||||
<div class="bg-warning text-white p-2 rounded-3 d-flex align-items-center justify-content-center" style="width:38px;height:38px;">
|
||||
<i class="bi bi-journal-text fs-5"></i>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<h5 class="mb-0 fw-bold" style="color:#1a1a2e;">Log Barang Teknisi</h5>
|
||||
<small class="text-muted">Riwayat barang yang pernah dibawa oleh teknisi</small>
|
||||
</div>
|
||||
<div>
|
||||
<a href="<?= base_url('teknisi'); ?>" class="btn btn-secondary">
|
||||
<i class="bi bi-arrow-left me-1"></i> Kembali
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card tech-card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-tech table-striped w-100" id="tblLogBarang">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Nama Teknisi</th>
|
||||
<th>Kode Barang</th>
|
||||
<th>Barcode</th>
|
||||
<th>Nama Barang</th>
|
||||
<th>Tanggal Dibawa</th>
|
||||
<th>Tanggal Kembali</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$('#tblLogBarang').DataTable({
|
||||
processing: true,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: "<?= base_url('teknisi/get_log_data'); ?>",
|
||||
dataSrc: 'data'
|
||||
},
|
||||
columns: [
|
||||
{ data: 0 },
|
||||
{ data: 1 },
|
||||
{ data: 2 },
|
||||
{ data: 3 },
|
||||
{ data: 4 },
|
||||
{ data: 5 },
|
||||
{ data: 6 },
|
||||
{ data: 7 }
|
||||
],
|
||||
pageLength: 25,
|
||||
lengthMenu: [
|
||||
[25, 50, 100, -1],
|
||||
[25, 50, 100, 'All']
|
||||
],
|
||||
responsive: true,
|
||||
searching: true,
|
||||
paging: true,
|
||||
ordering: true,
|
||||
info: true,
|
||||
language: {
|
||||
search: "Cari:",
|
||||
lengthMenu: "Tampilkan _MENU_ data",
|
||||
info: "Menampilkan _START_ - _END_ dari _TOTAL_ data",
|
||||
zeroRecords: "Tidak ada data",
|
||||
paginate: {
|
||||
first: "Awal",
|
||||
last: "Akhir",
|
||||
next: "»",
|
||||
previous: "«"
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user