chore: stop tracking compiled blade cache

This commit is contained in:
2026-09-23 13:56:51 +07:00
parent 507fc6ccdf
commit edd2f626be
154 changed files with 1149 additions and 12046 deletions
+22 -8
View File
@@ -20,14 +20,14 @@ class DashboardController extends Controller
$selectedStatus = $request->get('status');
$stats = [
'total_cats' => Cat::count(),
'total_cats' => Cat::activeInCattery()->count(),
'total_kittens' => Kitten::count(),
'sick_cats' => Cat::where('treatment_status', 1)->count(),
'total_mating' => Matting::where('status', 'proses')->count(),
'sick_cats' => Cat::activeInCattery()->where('treatment_status', 1)->count(),
'total_mating' => Matting::whereIn('status', ['proses', 'hamil'])->count(),
];
$upcomingBirths = Matting::with(['dam', 'sire'])
->where('status', 'proses')
->whereIn('status', ['proses', 'hamil'])
->whereNotNull('tgl_kawin_awal')
->get()
->map(function ($mating) use ($now) {
@@ -40,19 +40,19 @@ class DashboardController extends Controller
$overdueAlerts = [
'vaccine' => [
'count' => Cat::whereNotNull('jadwal_vaksin')->where('jadwal_vaksin', '<', $now)->count(),
'count' => Cat::activeInCattery()->whereNotNull('jadwal_vaksin')->where('jadwal_vaksin', '<', $now)->count(),
'url' => route('cats.index', ['filter_overdue' => 'vaccine']),
],
'flea' => [
'count' => Cat::whereNotNull('jadwal_obat_kutu')->where('jadwal_obat_kutu', '<', $now)->count(),
'count' => Cat::activeInCattery()->whereNotNull('jadwal_obat_kutu')->where('jadwal_obat_kutu', '<', $now)->count(),
'url' => route('cats.index', ['filter_overdue' => 'flea']),
],
'deworming' => [
'count' => Cat::whereNotNull('jadwal_obat_cacing')->where('jadwal_obat_cacing', '<', $now)->count(),
'count' => Cat::activeInCattery()->whereNotNull('jadwal_obat_cacing')->where('jadwal_obat_cacing', '<', $now)->count(),
'url' => route('cats.index', ['filter_overdue' => 'deworming']),
],
'grooming' => [
'count' => Cat::whereNotNull('jadwal_grooming')->where('jadwal_grooming', '<', $now)->count(),
'count' => Cat::activeInCattery()->whereNotNull('jadwal_grooming')->where('jadwal_grooming', '<', $now)->count(),
'url' => route('cats.index', ['filter_overdue' => 'grooming']),
],
];
@@ -72,6 +72,7 @@ class DashboardController extends Controller
'weight_histories.berat',
'weight_histories.tanggal_timbang'
)
->where(function ($q) { $q->whereNull('cats.cattery_status')->orWhere('cats.cattery_status', 'active'); })
->whereIn('weight_histories.id', function ($query) use ($selectedMonth, $selectedYear) {
$query->select(DB::raw('MAX(id)'))
->from('weight_histories')
@@ -148,6 +149,7 @@ class DashboardController extends Controller
'weight_histories.tanggal_timbang'
)
->whereNull('cats.deleted_at')
->where(function ($q) { $q->whereNull('cats.cattery_status')->orWhere('cats.cattery_status', 'active'); })
->whereDate('weight_histories.tanggal_timbang', '>=', $trendStart->toDateString())
->orderBy('weight_histories.tanggal_timbang')
->orderBy('cats.nama_kucing')
@@ -303,6 +305,16 @@ class DashboardController extends Controller
->sortByDesc('date')
->values();
// Daftar kenaikan/penurunan berat berdasarkan kategori pada periode yang dipilih.
$weightMovements = collect(['Kitten', 'Junior', 'Dewasa'])->mapWithKeys(function ($category) use ($weightLatestTable) {
$rows = $weightLatestTable->where('category', $category)->whereNotNull('change');
return [$category => [
'gainers' => $rows->where('change', '>', 0)->sortByDesc('change')->take(5)->values(),
'losers' => $rows->where('change', '<', 0)->sortBy('change')->take(5)->values(),
]];
});
$weightPeriodLabel = $trendStart->translatedFormat('M Y') . ' – ' . $now->translatedFormat('M Y');
// Inventory
$allExpiringItems = collect();
$lowStock = collect();
@@ -392,6 +404,8 @@ class DashboardController extends Controller
'weightTableCategory',
'weightTrendCategory',
'weightTrendMonths',
'weightMovements',
'weightPeriodLabel',
'lowStock',
'totalLowStock',
'expiringItems',