diff --git a/app/Mail/PanelBoxReportMail.php b/app/Mail/PanelBoxReportMail.php new file mode 100644 index 0000000..5b5bbc9 --- /dev/null +++ b/app/Mail/PanelBoxReportMail.php @@ -0,0 +1,71 @@ +records = $records; + $this->plantId = $plantId; + $this->machineId = $machineId; + $this->plantName = $plantName; + $this->machineName = $machineName; + } + + /** + * Get the message envelope. + */ + public function envelope(): Envelope + { + return new Envelope( + subject: 'Panel Box Inspection Report Mail', + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + $greeting = 'Dear Sir'; + return new Content( + view: 'mail.panel-box-report', + with: [ + 'company' => 'CRI Digital Manufacturing Solutions', + 'greeting' => $greeting, + 'wishes' => 'Thanks & Regards,
CRI Digital Manufacturing Solutions', + ], + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + return []; + } +} diff --git a/resources/views/mail/panel-box-report.blade.php b/resources/views/mail/panel-box-report.blade.php new file mode 100644 index 0000000..b4111f5 --- /dev/null +++ b/resources/views/mail/panel-box-report.blade.php @@ -0,0 +1,323 @@ + + + + + + + + + + +
+ +
+ + {{-- HEADER --}} +
+
+ Panel Box Inspection Report +
+ +
+ NOT OK Serial Number Report +
+
+ + + {{-- PLANT / MACHINE INFORMATION --}} +
+ + + + + + + + + + + +
+
Plant
+
+ {{ $plantName }} +
+
+
Machine
+
+ {{ $machineName }} +
+
+
Report Date
+
+ {{ now()->format('d M Y') }} +
+
+ +
+ + + {{-- SUMMARY --}} +
+ +
+ NOT OK Inspections +
+ +
+ {{ $records->count() }} +
+ +
+ Panel box serial numbers requiring attention +
+ +
+ + + {{-- SERIAL NUMBER LIST --}} +
+ +
+ NOT OK Serial Numbers +
+ + + + + + + + + + + + + + @foreach($records as $index => $record) + + + + + + + + + + + + @endforeach + + + +
S.NoSerial NumberStatus
+ {{ $index + 1 }} + + + {{ $record->serial_number }} + + + + NOT OK + +
+ +
+ + + {{-- FOOTER --}} + + +
+ +
+ + +