5.1 KiB
5.1 KiB
Repair Log User Guide
What is the Repair Log Module?
The Repair Log module tracks and manages repair activities and maintenance records. This module helps monitor repair work, track repair history, and ensure proper repair documentation and management.
Getting Started
To access Repair Log:
- Login to the system
- Click on QC in the main menu
- Select Repair Log from the submenu
Key Features
Primary Functions
- Repair Tracking: Track repair activities and progress
- History Management: Manage repair history and records
- Documentation: Maintain repair documentation
- Status Monitoring: Monitor repair status and completion
Secondary Functions
- Report Generation: Generate repair reports and analytics
- Cost Tracking: Track repair costs and expenses
- Resource Management: Manage repair resources and materials
- Quality Control: Monitor repair quality and standards
How to Use
Managing Repair Logs
- Click "Add Repair" button
- Select item for repair
- Enter repair details and requirements
- Assign repair personnel
- Set repair schedule and timeline
- Track repair progress
- Document repair completion
Repair Management
- Review repair requirements and scope
- Assign repair personnel and resources
- Monitor repair progress and status
- Track repair costs and materials
- Document repair completion
Repair Categories
- Equipment Repairs: Equipment maintenance and repair
- Component Repairs: Component repair and replacement
- System Repairs: System maintenance and repair
- Emergency Repairs: Emergency repair activities
Best Practices
Usage Guidelines
- ✅ Document repair activities promptly
- ✅ Track repair progress accurately
- ✅ Monitor repair quality and standards
- ✅ Maintain comprehensive repair records
Quality Assurance
- ✅ Verify repair documentation accuracy
- ✅ Ensure proper repair procedures
- ✅ Monitor repair effectiveness
- ✅ Regular review of repair processes
Troubleshooting
Common Issues
- Log not saving: Check all required fields are completed
- Progress tracking errors: Verify repair status and updates
- Documentation issues: Check document upload and format
Getting Help
- Contact the QC department for technical support
- Consult repair log procedures and guidelines
- Check repair data and documentation
Repair Log Data Sync (@guide)
The resources/views/admin-ajax/repair-log.blade.php view keeps the repair_logs table aligned with real-time weld information and exposes the data as JSON:
- Source scan: Loads all records from
weld_logsand iterates every registered log type (log_test_types()). - Filtering logic: Keeps only joints whose
{type}_resultvalue is neithernull, blank, nor"Accept / Годен", ensuring problem joints stay on the follow-up list. The unique key isiso_number + no_of_the_joint_as_per_as_built_survey. - Record preparation: Clones the weld row, refreshes
created_at/updated_at, drops the originalid, and marksrepair_statusasDonewhen all log results equal"Accept / Годен". - Upsert behaviour: Uses
updateOrInsertonrepair_logswith the joint identity (ISO + joint number) to maintain a single row per joint. - Cleanup and caching: After syncing, filters out stale rows, serialises the active set via
json_encode_tr, stores it insetting('repairLogs'), and prints the same JSON for consumers.
When extending the module:
- Add new log types by updating
log_test_types(). - Keep field names consistent with
weld_logsschema so the upsert patch stays valid. - Leverage the cached
repairLogssetting instead of querying the table when you only need the filtered dataset.
Repair Log Veri Senkronizasyonu (Türkçe Özet)
resources/views/admin-ajax/repair-log.blade.php görünümü repair_logs tablosunu kaynak kayıtlardaki kaynak (weld) verileriyle eşleştirip JSON olarak dışa aktarır:
- Kaynak taraması:
weld_logstablosundaki tüm kayıtları velog_test_types()çıktısındaki türleri dolaşır. - Filtreleme mantığı:
{type}_resultalanı boş,nullya da"Accept / Годен"olmayan eklemleri listede tutar; benzersiz anahtar ISO numarası ile birleştirilen eklem numarasıdır. - Kayıt hazırlığı: Kaynağın bir kopyasını oluşturur,
created_at/updated_atdeğerlerini günceller,idalanını kaldırır; tüm sonuçlar"Accept / Годен"iserepair_status = "Done"olarak işaretler. - Upsert davranışı: Her eklem için (ISO + eklem numarası)
updateOrInsertçağırarakrepair_logstablosunda tekil kaydı korur. - Temizlik ve önbellek: Senkron sonrası geçersiz kayıtları ayıklar,
json_encode_trile serileştirir,setting('repairLogs')anahtarına yazar ve aynı JSON çıktısını döndürür.
Modülü genişletirken:
- Yeni test türleri için
log_test_types()fonksiyonunu güncelleyin. weld_logsşemasıyla alan uyumuna dikkat edin ki upsert işlemi sorunsuz çalışsın.- Sadece filtrelenmiş veri gerekiyorsa tabloyu tekrar sorgulamak yerine
repairLogsayarını kullanın.