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