- Updated the `getQualityReportData` function to improve item name retrieval logic by using `NULLIF` for better handling of empty values.
- Refactored the `getEquipmentReportData` function to include company and date filters for equipment statistics, ensuring accurate data aggregation.
- Enhanced the SQL queries for both quality and equipment reports to utilize lateral joins and improve performance.
- Improved loading states in frontend components for inspection records and inspection results across multiple companies.
This refactor enhances data accuracy and user experience in the analytics module.