Added operator_id on update to capacitor scanning

This commit is contained in:
dhanabalan
2025-04-28 00:47:14 +05:30
parent 550792372a
commit cbbf35eec9

View File

@@ -5,6 +5,7 @@ namespace App\Livewire;
use App\Filament\Resources\InvoiceValidationResource\Pages\CreateInvoiceValidation; use App\Filament\Resources\InvoiceValidationResource\Pages\CreateInvoiceValidation;
use App\Models\InvoiceValidation; use App\Models\InvoiceValidation;
use App\Models\StickerMaster; use App\Models\StickerMaster;
use Filament\Facades\Filament;
use Filament\Notifications\Notification; use Filament\Notifications\Notification;
use Livewire\Component; use Livewire\Component;
@@ -183,6 +184,9 @@ class InvoiceDataTable extends Component
public function processCapacitorInput() public function processCapacitorInput()
{ {
$user = Filament::auth()->user();
$operatorName = $user->name;
if (!$this->capacitorInput) { if (!$this->capacitorInput) {
return; return;
} }
@@ -269,6 +273,7 @@ class InvoiceDataTable extends Component
'panel_box_serial_number' => $serialNumber, 'panel_box_serial_number' => $serialNumber,
'capacitor_scanned_status' => 1, 'capacitor_scanned_status' => 1,
'scanned_status' => 'Scanned', 'scanned_status' => 'Scanned',
'operator_id'=> $operatorName,
]); ]);
} }
else else
@@ -278,6 +283,7 @@ class InvoiceDataTable extends Component
'panel_box_item_code' => $itemCode, 'panel_box_item_code' => $itemCode,
'panel_box_serial_number' => $serialNumber, 'panel_box_serial_number' => $serialNumber,
'capacitor_scanned_status' => 1, 'capacitor_scanned_status' => 1,
'operator_id'=> $operatorName,
]); ]);
} }
} }
@@ -289,6 +295,7 @@ class InvoiceDataTable extends Component
'panel_box_serial_number' => $serialNumber, 'panel_box_serial_number' => $serialNumber,
'capacitor_scanned_status' => 1, 'capacitor_scanned_status' => 1,
'scanned_status' => 'Scanned', 'scanned_status' => 'Scanned',
'operator_id'=> $operatorName,
]); ]);
} }