Updated alignment on controller
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s

This commit is contained in:
dhanabalan
2026-01-28 16:16:11 +05:30
parent 2d3fda57b7
commit b1cdab2900

View File

@@ -2,10 +2,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Filament\Facades\Filament;
use Filament\Notifications\Notification; use Filament\Notifications\Notification;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Mpdf\Mpdf; use Mpdf\Mpdf;
use Mpdf\QrCode\Output; use Mpdf\QrCode\Output;
use Mpdf\QrCode\QrCode; use Mpdf\QrCode\QrCode;
@@ -23,7 +21,7 @@ class PalletController extends Controller
public function downloadReprintQrPdf($palletNo) public function downloadReprintQrPdf($palletNo)
{ {
$qrCode = new QrCode($palletNo); $qrCode = new QrCode($palletNo);
$output = new Output\Png(); $output = new Output\Png;
$qrBinary = $output->output($qrCode, 100); $qrBinary = $output->output($qrCode, 100);
$qrBase64 = base64_encode($qrBinary); $qrBase64 = base64_encode($qrBinary);
@@ -76,7 +74,6 @@ class PalletController extends Controller
// $mpdf->Output('qr-label.pdf', 'I'); // $mpdf->Output('qr-label.pdf', 'I');
} }
public function downloadReprintProcess($plant, $item, $process_order, $coil_number, $name) public function downloadReprintProcess($plant, $item, $process_order, $coil_number, $name)
{ {
// dd($plant,$item,$process_order,$coil_number); // dd($plant,$item,$process_order,$coil_number);
@@ -123,16 +120,13 @@ class PalletController extends Controller
->where('plant_id', $plant) ->where('plant_id', $plant)
->first(); ->first();
if (! $itemAgaPlant) { if (! $itemAgaPlant) {
Notification::make() Notification::make()
->title('Unknown Item') ->title('Unknown Item')
->body("Item not found against plant code $plCode.") ->body("Item not found against plant code $plCode.")
->warning() ->warning()
->send(); ->send();
} } else {
else
{
$itemDescription = $itemAgaPlant->description; $itemDescription = $itemAgaPlant->description;
} }
@@ -142,7 +136,7 @@ class PalletController extends Controller
$qrContent = "{$receivedQuantity}|{$itCode}|{$process_order}-{$coil_number}"; $qrContent = "{$receivedQuantity}|{$itCode}|{$process_order}-{$coil_number}";
$qrCode = new QrCode($qrContent); $qrCode = new QrCode($qrContent);
$output = new Output\Png(); $output = new Output\Png;
$qrBinary = $output->output($qrCode, 100); $qrBinary = $output->output($qrCode, 100);
$qrBase64 = base64_encode($qrBinary); $qrBase64 = base64_encode($qrBinary);
@@ -159,15 +153,14 @@ class PalletController extends Controller
margin: 0; margin: 0;
padding: 0; padding: 0;
width: 60mm; width: 60mm;
height: 30mm;
font-size: 9pt; font-size: 9pt;
font-family: "DejaVu Sans Condensed", "FreeSans", sans-serif; font-family: "DejaVu Sans Condensed", "FreeSans", sans-serif;
} }
.sticker-table { .sticker-table {
width: 60mm; width: 60mm;
height: 30mm;
border-collapse: collapse; border-collapse: collapse;
page-break-inside: avoid;
} }
.text-cell { .text-cell {
@@ -175,16 +168,15 @@ class PalletController extends Controller
vertical-align: top; vertical-align: top;
font-size: 9pt; font-size: 9pt;
padding-left: 2mm; padding-left: 2mm;
padding-top: 6mm; padding-top: 2mm; /* was 6mm ❌ */
font-weight: bold; font-weight: bold;
line-height: 1.1; /* IMPORTANT */
white-space: nowrap; white-space: nowrap;
overflow: hidden; width: 40mm;
text-overflow: ellipsis;
width: 40mm; /* Left side for text */
} }
.qr-cell { .qr-cell {
width: 20mm; /* Right side for QR */ width: 20mm;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
} }
@@ -196,16 +188,15 @@ class PalletController extends Controller
} }
.text-cell b { .text-cell b {
font-size: 12pt; font-size: 10pt; /* was 12pt ❌ */
font-weight: bold; /* bold value, same font size */ font-weight: bold;
} }
img.qr { img.qr {
width: 12mm; width: 12mm;
height: 12mm; height: 12mm;
display: block; display: block;
margin-left: auto; margin: auto;
margin-right: auto;
} }
</style> </style>
</head> </head>
@@ -236,12 +227,13 @@ class PalletController extends Controller
</body> </body>
</html> </html>
'; ';
} }
public function downloadQrPdf($palletNo) public function downloadQrPdf($palletNo)
{ {
$qrCode = new QrCode($palletNo); $qrCode = new QrCode($palletNo);
$output = new Output\Png(); $output = new Output\Png;
$qrBinary = $output->output($qrCode, 100); $qrBinary = $output->output($qrCode, 100);
$qrBase64 = base64_encode($qrBinary); $qrBase64 = base64_encode($qrBinary);