Compare commits
43 Commits
dhana-dev
...
d1663ae58a
| Author | SHA1 | Date | |
|---|---|---|---|
| d1663ae58a | |||
| deb46cdda2 | |||
| 002bdc597d | |||
| a406d1b58a | |||
| 58d0b9f0ae | |||
| c0d8ca7b1e | |||
| f31ab62ec0 | |||
| 4285a31f94 | |||
| 0c9228bfec | |||
| 58b45c849d | |||
| 61a2e7ffad | |||
| 3779cf3e3b | |||
| acf955dd94 | |||
| 0de49f14ce | |||
| 0473ca33cf | |||
| 8a01033459 | |||
| 0555f9faff | |||
| 8cbbaa4845 | |||
| cb6b201648 | |||
| c3089a147c | |||
| 45f0e39f73 | |||
| fe1e1b9918 | |||
| e20915ca82 | |||
| 58e6cbfac0 | |||
| 1ace049687 | |||
| e5e85a8eea | |||
| 555802ab35 | |||
| 587b743f12 | |||
| 42555d4a81 | |||
| fd1e554076 | |||
| 022654f192 | |||
| 55f1088fda | |||
| f9233f44d8 | |||
| e0fec6b07c | |||
| 6bda9c1459 | |||
| 39bdd3df57 | |||
| 5bcf0703d9 | |||
| 80e522b7e6 | |||
| ee101f80ea | |||
| 37a99d03c1 | |||
| 5fdced003a | |||
| 0b0bb90efb | |||
| 32ce6da2c1 |
@@ -109,7 +109,6 @@ class ProcessOrderResource extends Resource
|
|||||||
->afterStateHydrated(function ($component, $state, Get $get, Set $set) {
|
->afterStateHydrated(function ($component, $state, Get $get, Set $set) {
|
||||||
$itemId = $get('item_id');
|
$itemId = $get('item_id');
|
||||||
if ($get('id')) {
|
if ($get('id')) {
|
||||||
|
|
||||||
$item = \App\Models\Item::where('id', $itemId)->first()?->description;
|
$item = \App\Models\Item::where('id', $itemId)->first()?->description;
|
||||||
if ($item) {
|
if ($item) {
|
||||||
$set('item_description', $item);
|
$set('item_description', $item);
|
||||||
@@ -123,7 +122,6 @@ class ProcessOrderResource extends Resource
|
|||||||
->hidden()
|
->hidden()
|
||||||
->readOnly(),
|
->readOnly(),
|
||||||
// ->readOnly(true),
|
// ->readOnly(true),
|
||||||
|
|
||||||
Forms\Components\TextInput::make('process_order')
|
Forms\Components\TextInput::make('process_order')
|
||||||
->label('Process Order')
|
->label('Process Order')
|
||||||
->reactive()
|
->reactive()
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ use SimpleSoftwareIO\QrCode\Facades\QrCode;
|
|||||||
use Filament\Facades\Filament;
|
use Filament\Facades\Filament;
|
||||||
use App\Models\StickerPrinting;
|
use App\Models\StickerPrinting;
|
||||||
use Filament\Notifications\Notification;
|
use Filament\Notifications\Notification;
|
||||||
use Str;
|
|
||||||
|
|
||||||
|
|
||||||
class CreateStickerPrinting extends CreateRecord
|
class CreateStickerPrinting extends CreateRecord
|
||||||
@@ -95,11 +94,6 @@ class CreateStickerPrinting extends CreateRecord
|
|||||||
->body("Serial number should conatin minimum 9 digits '$serial'.")
|
->body("Serial number should conatin minimum 9 digits '$serial'.")
|
||||||
->warning()
|
->warning()
|
||||||
->send();
|
->send();
|
||||||
$this->form->fill([
|
|
||||||
'plant_id' => $plant,
|
|
||||||
'reference_number' => $ref,
|
|
||||||
'serial_number' => '',
|
|
||||||
]);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(!ctype_alnum($serial)) {
|
else if(!ctype_alnum($serial)) {
|
||||||
@@ -108,11 +102,6 @@ class CreateStickerPrinting extends CreateRecord
|
|||||||
->body("Serial number should be alphanumeric '$serial'.")
|
->body("Serial number should be alphanumeric '$serial'.")
|
||||||
->warning()
|
->warning()
|
||||||
->send();
|
->send();
|
||||||
$this->form->fill([
|
|
||||||
'plant_id' => $plant,
|
|
||||||
'reference_number' => $ref,
|
|
||||||
'serial_number' => '',
|
|
||||||
]);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$extractedSerialNumber = $matches['serial_number'];
|
$extractedSerialNumber = $matches['serial_number'];
|
||||||
@@ -135,8 +124,8 @@ class CreateStickerPrinting extends CreateRecord
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($plant == null || trim($plant) == '' || $ref == null || trim($ref) == '' || $sNumber == null || trim($sNumber) == '')
|
|
||||||
{
|
if(empty($this->plantId) || empty($ref) || empty($this->serial_number)) {
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Unknown: Incomplete Data!')
|
->title('Unknown: Incomplete Data!')
|
||||||
->body("Please ensure Plant, Reference Number, and Serial Number are provided.")
|
->body("Please ensure Plant, Reference Number, and Serial Number are provided.")
|
||||||
@@ -169,16 +158,16 @@ class CreateStickerPrinting extends CreateRecord
|
|||||||
}
|
}
|
||||||
|
|
||||||
StickerPrinting::create([
|
StickerPrinting::create([
|
||||||
'plant_id' => $plant,
|
'plant_id' => $this->plantId,
|
||||||
'reference_number' => $ref,
|
'reference_number' => $ref,
|
||||||
'serial_number' => $sNumber,
|
'serial_number' => $this->serial_number,
|
||||||
'created_by' => Filament::auth()->user()->name,
|
'created_by' => Filament::auth()->user()->name,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->dispatch('addStickerToList', $plant, $ref, $sNumber);
|
$this->dispatch('addStickerToList', $this->plantId, $ref, $this->serial_number);
|
||||||
|
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
'plant_id' => $plant,
|
'plant_id' => $this->plantId,
|
||||||
'reference_number' => $ref,
|
'reference_number' => $ref,
|
||||||
'serial_number' => '',
|
'serial_number' => '',
|
||||||
]);
|
]);
|
||||||
@@ -234,7 +223,6 @@ class CreateStickerPrinting extends CreateRecord
|
|||||||
// Send data to Pdf view
|
// Send data to Pdf view
|
||||||
$pdf = PDF::loadView('pdf.qrcode', [
|
$pdf = PDF::loadView('pdf.qrcode', [
|
||||||
'qrCode' => $qrCode,
|
'qrCode' => $qrCode,
|
||||||
'referenceNumber' => $refNumber,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return response()->streamDownload(function () use ($pdf) {
|
return response()->streamDownload(function () use ($pdf) {
|
||||||
|
|||||||
@@ -36,8 +36,7 @@
|
|||||||
style="height: 385px;"
|
style="height: 385px;"
|
||||||
>
|
>
|
||||||
<table class="table-auto w-full border-collapse border">
|
<table class="table-auto w-full border-collapse border">
|
||||||
{{-- <thead class="bg-gray-100"> --}}
|
<thead class="bg-gray-100">
|
||||||
<thead class="bg-gray-100 text-xs">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="border p-2">No</th>
|
<th class="border p-2">No</th>
|
||||||
<th class="border p-2">Reference No</th>
|
<th class="border p-2">Reference No</th>
|
||||||
@@ -45,8 +44,7 @@
|
|||||||
<th class="border p-2">Created By</th>
|
<th class="border p-2">Created By</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
{{-- <tbody> --}}
|
<tbody>
|
||||||
<tbody class="text-xs">
|
|
||||||
@forelse($records as $index => $record)
|
@forelse($records as $index => $record)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="border p-2 text-center">{{ $index + 1 }}</td>
|
<td class="border p-2 text-center">{{ $index + 1 }}</td>
|
||||||
|
|||||||
@@ -16,36 +16,6 @@
|
|||||||
</html> --}}
|
</html> --}}
|
||||||
|
|
||||||
|
|
||||||
{{-- <!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<style>
|
|
||||||
@page {
|
|
||||||
margin: 0;
|
|
||||||
size: 100mm 100mm;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
width: 100mm;
|
|
||||||
height: 100mm;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
width: 100mm;
|
|
||||||
height: 100mm;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<img src="data:image/png;base64,{{ $qrCode }}" />
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html> --}}
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -60,33 +30,19 @@
|
|||||||
width: 100mm;
|
width: 100mm;
|
||||||
height: 100mm;
|
height: 100mm;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
|
||||||
font-size: 12px;
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
width: 90mm; /* QR CODE REDUCED TO FIT TEXT */
|
width: 100mm;
|
||||||
height: 90mm;
|
height: 100mm;
|
||||||
}
|
|
||||||
.ref-text {
|
|
||||||
margin-top: 3mm;
|
|
||||||
font-size: 16px; /* Increased Font Size */
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="ref-text">
|
|
||||||
{{ $referenceNumber }}
|
|
||||||
</div>
|
|
||||||
<img src="data:image/png;base64,{{ $qrCode }}" />
|
<img src="data:image/png;base64,{{ $qrCode }}" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user