Updated plant load logic on report filter
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 3m17s
Laravel Larastan / larastan (pull_request) Failing after 4m13s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 3m17s
Laravel Larastan / larastan (pull_request) Failing after 4m13s
This commit is contained in:
@@ -444,7 +444,7 @@ class CharacteristicValueResource extends Resource
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
if ($userHas && strlen($userHas) > 0) {
|
||||
Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
} else {
|
||||
return Plant::whereHas('characteristicValues', function ($query) {
|
||||
$query->whereNotNull('id');
|
||||
|
||||
@@ -626,7 +626,6 @@ class InvoiceInTransitResource extends Resource
|
||||
->body('Invoice in transit upload failed!')
|
||||
->success()
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1206,7 +1206,7 @@ class InvoiceValidationResource extends Resource
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
if ($userHas && strlen($userHas) > 0) {
|
||||
Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
} else {
|
||||
return Plant::whereHas('invoiceValidations', function ($query) {
|
||||
$query->whereNotNull('id');
|
||||
|
||||
@@ -787,7 +787,7 @@ class ProcessOrderResource extends Resource
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
if ($userHas && strlen($userHas) > 0) {
|
||||
Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
} else {
|
||||
return Plant::whereHas('processOrders', function ($query) {
|
||||
$query->whereNotNull('id');
|
||||
|
||||
@@ -433,7 +433,7 @@ class ProductCharacteristicsMasterResource extends Resource
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
if ($userHas && strlen($userHas) > 0) {
|
||||
Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
} else {
|
||||
return Plant::whereHas('productCharacteristicsMasters', function ($query) {
|
||||
$query->whereNotNull('id');
|
||||
|
||||
@@ -3030,7 +3030,7 @@ class QualityValidationResource extends Resource
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
if ($userHas && strlen($userHas) > 0) {
|
||||
Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
return Plant::where('id', $userHas)->pluck('name', 'id')->toArray();
|
||||
} else {
|
||||
return Plant::whereHas('qualityValidations', function ($query) {
|
||||
$query->whereNotNull('id');
|
||||
|
||||
Reference in New Issue
Block a user