Added mail trigegr lofic agisnt Quality validation

This commit is contained in:
dhanabalan
2025-11-24 10:50:02 +05:30
parent 6c928e16ea
commit 39a2fed9a8

View File

@@ -2301,6 +2301,8 @@ class QualityValidationResource extends Resource
$fileName = $expectedValue . ".png"; // or .jpg based on your file
$fullPath = storage_path("app/private/uploads/PartValidation/{$plantCodePart1}/{$fileName}");
// dd($fullPath);
// // Generate URL through custom route
// $imageUrl = route('part.validation.image', [
// 'plant' => $plantCodePart1,
@@ -2312,7 +2314,6 @@ class QualityValidationResource extends Resource
'filename' => $fileName
]);
} else {
// URL for default placeholder image in public/images
$imageUrl = asset("images/not_found.png");
}
@@ -2326,9 +2327,8 @@ class QualityValidationResource extends Resource
->hint(fn ($get) => $get('part_validation1_error'))
->hintColor('danger'),
Forms\Components\Hidden::make('part_validation1_error_image')
->default(null)
->dehydrated(false),
Forms\Components\Hidden::make('part_validation1_error_image'),
Forms\Components\View::make('components.part-validation1-error-icon')
->visible(fn ($get) => $get('part_validation1_error') != null)
@@ -2718,8 +2718,8 @@ class QualityValidationResource extends Resource
$mPlantName = Plant::where('id', $plantId)->value('name');
$emails = AlertMailRule::where('plant', $plantId)
->where('module', 'InvoiceValidation')
->where('rule_name', 'InvoiceMail')
->where('module', 'QualityValidation')
->where('rule_name', 'QualityMail')
->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
->pluck('email')
->toArray();