updated motor and pump scanning logic

This commit is contained in:
dhanabalan
2025-04-10 20:24:04 +05:30
parent 57c3a876bd
commit 2ccad83e67
6 changed files with 177 additions and 40 deletions

View File

@@ -20,6 +20,7 @@ use Filament\Notifications\Notification;
use Filament\Tables\Actions\Action;
use Illuminate\Support\Facades\Storage;
use Maatwebsite\Excel\Facades\Excel;
use Livewire\Livewire; // Ensure this is imported
class InvoiceValidationResource extends Resource
{
@@ -29,6 +30,9 @@ class InvoiceValidationResource extends Resource
protected static ?string $navigationGroup = 'Invoice';
public $invoiceNumber;
public static function form(Form $form): Form
{
@@ -55,8 +59,13 @@ class InvoiceValidationResource extends Resource
'x-on:keydown.enter.prevent' => '$wire.processInvoice(value)',
]),
Forms\Components\TextInput::make('serial_number')
->reactive()
Forms\Components\TextInput::make('serial_number')
->extraAttributes([
'x-data' => '{ value: "" }',
'x-model' => 'value',
'wire:keydown.enter.prevent' => 'processSerialNumber(value)', // Using wire:keydown
])
->columnSpan(1),
Forms\Components\TextInput::make('total_quantity')
@@ -68,12 +77,9 @@ class InvoiceValidationResource extends Resource
])
->columns(5),
]);
}
public static function table(Table $table): Table
{
return $table