Merge pull request 'ranjith-dev' (#939) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #939
This commit was merged in pull request #939.
This commit is contained in:
@@ -41,6 +41,8 @@ class PanelBoxValidationResource extends Resource
|
|||||||
|
|
||||||
public $data = [];
|
public $data = [];
|
||||||
|
|
||||||
|
// public bool $showChecklist = false;
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
@@ -237,6 +239,10 @@ class PanelBoxValidationResource extends Resource
|
|||||||
$set('pqLineError', null);
|
$set('pqLineError', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(!$state){
|
||||||
|
// $set('serial_exists', false);
|
||||||
|
// }
|
||||||
|
|
||||||
$pOrder = $get('production_order');
|
$pOrder = $get('production_order');
|
||||||
if (! $pOrder) {
|
if (! $pOrder) {
|
||||||
$set('prodOrdError', "Production Order can't be empty.");
|
$set('prodOrdError', "Production Order can't be empty.");
|
||||||
@@ -560,9 +566,11 @@ class PanelBoxValidationResource extends Resource
|
|||||||
->danger()
|
->danger()
|
||||||
->send();
|
->send();
|
||||||
$set('item_id', null);
|
$set('item_id', null);
|
||||||
|
// $set('serial_exists', false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$supplier = $parts[0];
|
$supplier = $parts[0];
|
||||||
$panelBoxCode = $parts[1];
|
$panelBoxCode = $parts[1];
|
||||||
$panelBoxSerialNo = implode('/', array_slice($parts, 2));
|
$panelBoxSerialNo = implode('/', array_slice($parts, 2));
|
||||||
@@ -660,6 +668,7 @@ class PanelBoxValidationResource extends Resource
|
|||||||
->danger()
|
->danger()
|
||||||
->send();
|
->send();
|
||||||
$set('item_id', null);
|
$set('item_id', null);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$existQuanInPanel = PanelBoxValidation::where('plant_id', $plantId)->where('production_order', $pOrder)->where('inspection_lot_number', $inspecLotNo)->where('sticker_master_id', $sticker->id)->count();
|
$existQuanInPanel = PanelBoxValidation::where('plant_id', $plantId)->where('production_order', $pOrder)->where('inspection_lot_number', $inspecLotNo)->where('sticker_master_id', $sticker->id)->count();
|
||||||
@@ -784,7 +793,13 @@ class PanelBoxValidationResource extends Resource
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$serialExists = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->exists();
|
$serialExists = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->first();
|
||||||
|
|
||||||
|
// if ($serialExists) {
|
||||||
|
// $set('serial_exists', true);
|
||||||
|
// } else {
|
||||||
|
// $set('serial_exists', false);
|
||||||
|
// }
|
||||||
|
|
||||||
if ($serialExists && ! $get('id')) {
|
if ($serialExists && ! $get('id')) {
|
||||||
$set('validationError', 'Serial number already exists in panel box validation.');
|
$set('validationError', 'Serial number already exists in panel box validation.');
|
||||||
|
|||||||
@@ -3982,7 +3982,7 @@ class CharacteristicsController extends Controller
|
|||||||
$headerAuth = $request->header('Authorization');
|
$headerAuth = $request->header('Authorization');
|
||||||
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
|
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
|
||||||
|
|
||||||
if ($headerAuth !== $expectedToken) {
|
if ($headerAuth != $expectedToken) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status_code' => 'ERROR',
|
'status_code' => 'ERROR',
|
||||||
'status_description' => 'Invalid authorization token!',
|
'status_description' => 'Invalid authorization token!',
|
||||||
@@ -4236,7 +4236,7 @@ class CharacteristicsController extends Controller
|
|||||||
$headerAuth = $request->header('Authorization');
|
$headerAuth = $request->header('Authorization');
|
||||||
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
|
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
|
||||||
|
|
||||||
if ($headerAuth !== $expectedToken) {
|
if ($headerAuth != $expectedToken) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status_code' => 'ERROR',
|
'status_code' => 'ERROR',
|
||||||
'status_description' => 'Invalid authorization token!',
|
'status_description' => 'Invalid authorization token!',
|
||||||
@@ -5315,7 +5315,7 @@ class CharacteristicsController extends Controller
|
|||||||
$headerAuth = $request->header('Authorization');
|
$headerAuth = $request->header('Authorization');
|
||||||
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
|
$expectedToken = 'Bearer '.$expectedUser.':'.$expectedPw;
|
||||||
|
|
||||||
if ($headerAuth !== $expectedToken) {
|
if ($headerAuth != $expectedToken) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status_code' => 'ERROR',
|
'status_code' => 'ERROR',
|
||||||
'status_description' => 'Invalid authorization token!',
|
'status_description' => 'Invalid authorization token!',
|
||||||
|
|||||||
Reference in New Issue
Block a user