Updated alignments and validation logics
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-05-13 17:41:22 +05:30
parent d19b8120e2
commit 6f93f2bd92
10 changed files with 119 additions and 82 deletions

View File

@@ -34,6 +34,8 @@ class SendInvoiceReport extends Command
// $scheduleType = $this->argument('scheduleType');
$plantIdArg = (int) $this->argument('plant'); // can be 0 for all plants
// $mailRules = \App\Models\AlertMailRule::where('module', 'InvoiceValidation')->get()->groupBy('rule_name');
$mailRules = \App\Models\AlertMailRule::where('module', 'InvoiceValidation')->get()->groupBy('rule_name');
// $startDate = now()->setTime(8, 0, 0);

View File

@@ -59,7 +59,6 @@ class ProcessOrderExporter extends Exporter
ExportColumn::make('deleted_at')
->enabledByDefault(false)
->label('DELETED AT'),
];
}

View File

@@ -245,7 +245,6 @@ class CreateProductionOrder extends CreateRecord
} else {
return redirect()->route('production-orders.printpanel', ['production_order' => $pOrder, 'plant_code' => $plantCode]);
}
}
protected function getFormActions(): array

View File

@@ -107,7 +107,7 @@ class PalletPrintController extends Controller
$index = $completedPallets->search($pallet);
$currentPalletNo = ($index != false) ? $index + 1 : 0;
$currentPalletNo = ($index !== false) ? $index + 1 : 0;
$boxLabel = $currentPalletNo.'/'.$totalBoxes;

View File

@@ -4,18 +4,24 @@ namespace App\Mail;
use DateTime;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
// use App\Exports\ProductionExport;
// use Illuminate\Mail\Mailables\Attachment;
// use Maatwebsite\Excel\Facades\Excel;
class ProductionMail extends Mailable
{
use Queueable, SerializesModels;
public $tableData;
public $scheduleType;
// public $excelData;
// public $dates;
/**
* Create a new message instance.
@@ -26,6 +32,14 @@ class ProductionMail extends Mailable
$this->tableData = $tableData ?? [];
}
// public function __construct($scheduleType,$tableData = [],$excelData = [],$dates = [])
// {
// $this->scheduleType = $scheduleType;
// $this->tableData = $tableData;
// $this->excelData = $excelData;
// $this->dates = $dates;
// }
/**
* Get the message envelope.
*/
@@ -52,6 +66,7 @@ class ProductionMail extends Mailable
// ],
// );
// }
public function content(): Content
{
$greeting = "Dear Sir/Madam,<br><br>Kindly find the attached production report status details for the 'Target Quantity' and 'Production Quantity' count,";
@@ -81,15 +96,14 @@ class ProductionMail extends Mailable
return new Content(
view: 'mail.production_report',
with: [
'company' => "CRI Digital Manufacturing Solutions",
'company' => 'CRI Digital Manufacturing Solutions',
'greeting' => $greeting,
'tableData' => $this->tableData,
'wishes' => "Thanks & Regards,<br>CRI Digital Manufacturing Solutions"
'wishes' => 'Thanks & Regards,<br>CRI Digital Manufacturing Solutions',
],
);
}
/**
* Get the attachments for the message.
*
@@ -98,5 +112,19 @@ class ProductionMail extends Mailable
public function attachments(): array
{
return [];
// return [
// Attachment::fromData(
// fn () => Excel::raw(
// new ProductionExport(
// $this->excelData,
// $this->dates
// ),
// \Maatwebsite\Excel\Excel::XLSX
// ),
// 'production_plan_data.xlsx'
// )->withMime(
// 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
// ),
// ];
}
}

View File

@@ -210,7 +210,20 @@ class PermissionSeeder extends Seeder
Permission::updateOrCreate(['name' => 'view import temp class characteristic']);
Permission::updateOrCreate(['name' => 'view export temp class characteristic']);
Permission::updateOrCreate(['name' => 'view import production temp']);
Permission::updateOrCreate(['name' => 'view export production temp']);
Permission::updateOrCreate(['name' => 'view import production orders']);
Permission::updateOrCreate(['name' => 'view export production orders']);
Permission::updateOrCreate(['name' => 'view import transit']);
Permission::updateOrCreate(['name' => 'view export import transit']);
Permission::updateOrCreate(['name' => 'view reprint production order']);
Permission::updateOrCreate(['name' => 'create osp production sticker reprint page']);
Permission::updateOrCreate(['name' => 'view print production order button']);
Permission::updateOrCreate(['name' => 'view save production order button']);
Permission::updateOrCreate(['name' => 'view print panel production order button']);
}
}

View File

@@ -975,22 +975,19 @@ function cameraCapture() {
const detectedText = result.data.text.trim();
console.log("Detected Text:", detectedText);
// -------------------------------------------------------
// SERIAL EXTRACTION LOGIC — SAME AS YOUR ORIGINAL
// -------------------------------------------------------
const serialWithLabelRegex = /Serial\s*No[:\-]?\s*([A-Za-z0-9]+)/i;
const match = detectedText.match(serialWithLabelRegex);
if (match && match[1]) {
// "Serial No: XXXXX"
this.serialNumbers = [match[1].trim()];
console.log("Serial with Label:", this.serialNumbers[0]);
} else {
// Extract first 4 alphanumeric sequences of 4+ chars
}
else
{
const generalNums = detectedText.match(/[A-Za-z0-9]{4,}/g) || [];
this.serialNumbers = generalNums.slice(0, 4);
if (this.serialNumbers.length === 0) {
if (this.serialNumbers.length == 0) {
alert("No serial numbers detected!");
return;
}
@@ -1020,7 +1017,6 @@ function cameraCapture() {
alert("✅ Serial numbers saved to session!");
});
};
} catch (err) {
console.error("OCR verify error:", err);
alert("OCR verify failed:\n" + (err.message || err));

View File

@@ -101,7 +101,7 @@
if (!scanInput) return;
scanInput.addEventListener('keydown', function (event) {
if (event.key === 'Enter') {
if (event.key == 'Enter') {
event.preventDefault();
const value = scanInput.value.trim();

View File

@@ -3,7 +3,8 @@
<div class="bg-white max-h-[80vh] overflow-hidden p-6 rounded-lg shadow-lg pointer-events-auto"
style="width:30vw !important; max-width:none !important;">
@if($records && $records->count())
{{-- @if($records && $records->count()) --}}
@if(!empty($records) && count($records))
<div style="max-height:250px; overflow-y:auto; border:1px solid #ccc;">
{{-- <table class="min-w-full border"> --}}

View File

@@ -106,7 +106,6 @@
-
@endif
</td>
{{-- <td>{{ $row['lr_bl_aw_date'] }}</td> --}}
<td>{{ $row['transit_days'] }}</td>
<td>{{ $row['status'] }}</td>