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
+29 -1
View File
@@ -23,7 +23,8 @@ class Cat extends Model
'jadwal_vaksin', 'jadwal_obat_cacing', 'jadwal_obat_kutu',
'jadwal_grooming', 'induk_jantan_id', 'induk_betina_id',
'lokasi_kandang', 'pic_id', 'berat_badan',
'pedigree','sertifikat_ped_file', 'microchip', 'status', 'kode_ems','treatment_status'
'pedigree','sertifikat_ped_file', 'microchip', 'status', 'kode_ems','treatment_status',
'cattery_status','adopted_at','adoption_notes'
];
/**
@@ -69,6 +70,7 @@ class Cat extends Model
'registry' => 'array', // Otomatis mengurus JSON di DB
'berat_badan' => 'decimal:2',
'berat_terakhir' => 'decimal:2',
'adopted_at' => 'date',
];
}
@@ -241,4 +243,30 @@ public function scopeHealthy($query)
{
return $query->where('treatment_status', 2);
}
public function scopeActiveInCattery($query)
{
return $query->where(function ($q) {
$q->whereNull('cattery_status')->orWhere('cattery_status', 'active');
});
}
public function scopeAdopted($query)
{
return $query->where('cattery_status', 'adopted');
}
public function scopeExternalParents($query)
{
return $query->where('cattery_status', 'external_parent');
}
public function getCatteryStatusLabelAttribute(): string
{
return match ($this->cattery_status ?: 'active') {
'adopted' => 'Teradopsi',
'external_parent' => 'Induk eksternal',
default => 'Aktif di cattery',
};
}
}