user logs

This commit is contained in:
Pringgosutono
2025-10-16 11:59:06 +07:00
parent 18897186e0
commit fbbcf86509
17 changed files with 355 additions and 8 deletions

View File

@ -437,6 +437,11 @@
</div>
</div>
</div>
<div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="mdlUserLogs" aria-labelledby="mdlUserLogsLabel" aria-hidden="true">
<!-- ajax -->
</div>
@endsection
@section('customjs')
@ -635,10 +640,14 @@
// <span class="icon ion-eye fz-16"></span>
// </a>
let action = `
<a href="#" class="text-decoration-none me-1 btnEdtUser" data-bs-toggle="tooltip"
<a href="#" class="text-decoration-none me-2 btnEdtUser" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="Edit">
<span class="icon ion-eye fz-16"></span>
</a>
<a href="#" class="text-decoration-none me-2 btnLogUser" data-bs-toggle="tooltip" data-id="${row.id}"
data-bs-placement="bottom" title="Logs">
<span class="icon ion-android-laptop fz-16"></span>
</a>
`;
// <a href="#" class="text-decoration-none text-danger btnDelUser"
// data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
@ -877,6 +886,26 @@
}
UUpdate.passDataToView(resp.data);
});
$('#tUsers').on('click', '.btnLogUser', async function(e) {
// let uid = $(e.target).closest('tr').find('td[data-id]').data('id');
// UUpdate.clearInput();
// let resp = await UUpdate.reqData({
// uid
// });
// if (resp.type != 'success') {
// Helper.toast('User Not Found', 'just now', 'please try again');
// return false;
// }
// UUpdate.passDataToView(resp.data);
e.preventDefault();
const id = $(this).data('id');
$('#mdlUserLogs').empty().load("{{ route('view_user_logs') }}", `id=${id}`, () => {
$('#mdlUserLogs').modal('show')
})
});
$('#updtUserModal').on('shown.bs.modal', function() {
// initiate select2 if there
});