Yakıt Fişlerinin Mal Sorumlusuna iletilmemesi sorunu giderildi.
This commit is contained in:
@@ -47,7 +47,15 @@
|
||||
error = '';
|
||||
|
||||
try {
|
||||
const url = `/api/fuel-slips?manager_id=${user.id}&status=approved`;
|
||||
const params = new URLSearchParams({ status: 'approved' });
|
||||
if (user.unit_id) {
|
||||
params.set('unit_id', user.unit_id);
|
||||
} else if (user.id) {
|
||||
params.set('manager_id', user.id);
|
||||
} else {
|
||||
throw new Error('Kullanıcı bilgilerinde eksik alan var.');
|
||||
}
|
||||
const url = `/api/fuel-slips?${params.toString()}`;
|
||||
const response = await fetch(url);
|
||||
|
||||
if (response.ok) {
|
||||
@@ -599,4 +607,4 @@
|
||||
max-height: 2000px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user