diff --git a/app/Filament/Resources/QualityValidationResource.php b/app/Filament/Resources/QualityValidationResource.php index 8e9db0c..93efbf5 100644 --- a/app/Filament/Resources/QualityValidationResource.php +++ b/app/Filament/Resources/QualityValidationResource.php @@ -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();