1 Commits

Author SHA1 Message Date
2a3946e956 Update dependency laravel/framework to v12
Some checks failed
renovate/artifacts Artifact file update failure
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / review (pull_request) Failing after 38s
Laravel Pint / pint (pull_request) Failing after 1m26s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Laravel Larastan / larastan (pull_request) Failing after 1m39s
2025-11-30 00:00:58 +00:00
7 changed files with 27 additions and 68 deletions

View File

@@ -50,7 +50,7 @@ class AlertMailRuleResource extends Resource
'InvoiceValidation' => 'InvoiceValidation',
'InvoiceDataReport' => 'InvoiceDataReport',
'ProductionQuantities' => 'ProductionQuantities',
'QualityValidation' => 'QualityValidation',
//'Calibration' => 'Calibration',
]),
Forms\Components\Select::make('rule_name')
->label('Rule Name')
@@ -60,7 +60,7 @@ class AlertMailRuleResource extends Resource
'MaterialInvoiceMail' => 'Material Invoice Mail',
'ProductionMail' => 'Production Mail',
'InvoiceDataMail' => 'Invoice Data Mail',
'QualityMail' => 'Quality Mail',
//'CalibrationMail' => 'Calibration Mail',
])
->required(),
Forms\Components\TextInput::make('email')

View File

@@ -3265,8 +3265,6 @@ class CreateInvoiceValidation extends CreateRecord
return;
}
$invalidPackage = false;
$hasMotorQr = $record->stickerMasterRelation->tube_sticker_motor ?? null;
$hasPumpQr = $record->stickerMasterRelation->tube_sticker_pump ?? null;
$hasPumpSetQr = $record->stickerMasterRelation->tube_sticker_pumpset ?? null;
@@ -3276,18 +3274,17 @@ class CreateInvoiceValidation extends CreateRecord
$hasMotorQr = $record->stickerMasterRelation->pack_slip_motor ?? null;
$hasPumpQr = $record->stickerMasterRelation->pack_slip_pump ?? null;
$hasPumpSetQr = $record->stickerMasterRelation->pack_slip_pumpset ?? null;
} else {
if (! $hasPumpSetQr && ! $hasPumpQr) {
$hasPumpQr = $record->stickerMasterRelation->pack_slip_pump ?? null;
}
} elseif (! $hasPumpSetQr && ! $hasPumpQr) {
$hasPumpQr = $record->stickerMasterRelation->pack_slip_pump ?? null;
}
$hasTubeMotorQr = $record->stickerMasterRelation->tube_sticker_motor ?? null;
$hasPackMotorQr = $record->stickerMasterRelation->pack_slip_motor ?? null;
$hasTubePumpSetQr = $record->stickerMasterRelation->tube_sticker_pumpset ?? null;
$hasPackPumpSetQr = $record->stickerMasterRelation->pack_slip_pumpset ?? null;
if ($hasTubeMotorQr != $hasPackMotorQr || $hasTubePumpSetQr != $hasPackPumpSetQr) {
$invalidPackage = true;
}
$invalidPackage = false;
$hasTubeMotorQr = $record->stickerMasterRelation->tube_sticker_motor ?? null;
$hasPackMotorQr = $record->stickerMasterRelation->pack_slip_motor ?? null;
$hasTubePumpSetQr = $record->stickerMasterRelation->tube_sticker_pumpset ?? null;
$hasPackPumpSetQr = $record->stickerMasterRelation->pack_slip_pumpset ?? null;
if ($hasTubeMotorQr != $hasPackMotorQr || $hasTubePumpSetQr != $hasPackPumpSetQr) {
$invalidPackage = true;
}
$hadMotorQr = $record->motor_scanned_status ?? null;

View File

@@ -237,6 +237,9 @@ class ItemResource extends Resource
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
// ->filters([
// Tables\Filters\TrashedFilter::make(),
// ])
->filters([
Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters')
@@ -248,11 +251,11 @@ class ItemResource extends Resource
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->orderBy('code')->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('code', null);
$set('item_id', null);
$set('operator_id', null);
}),
Select::make('code')
@@ -297,7 +300,7 @@ class ItemResource extends Resource
// Hide all records initially if no filters are applied
if (
empty($data['Plant']) &&
empty($data['code']) &&
empty($data['item_id']) &&
empty($data['description']) &&
empty($data['uom']) &&
empty($data['category']) &&
@@ -311,8 +314,8 @@ class ItemResource extends Resource
$query->where('plant_id', $data['Plant']);
}
if (! empty($data['code'])) {
$query->where('id', $data['code']);
if (! empty($data['item_id'])) {
$query->where('item_id', $data['item_id']);
}
if (! empty($data['description'])) {
@@ -334,6 +337,7 @@ class ItemResource extends Resource
if (! empty($data['created_to'])) {
$query->where('created_at', '<=', $data['created_to']);
}
})
->indicateUsing(function (array $data) {
$indicators = [];
@@ -342,8 +346,8 @@ class ItemResource extends Resource
$indicators[] = 'Plant: '.Plant::where('id', $data['Plant'])->value('name');
}
if (! empty($data['code'])) {
$indicators[] = 'Item Code: '.Item::where('id', $data['code'])->value('code');
if (! empty($data['item_id'])) {
$indicators[] = 'Item Code: '.$data['item_id'];
}
if (! empty($data['description'])) {
@@ -617,10 +621,10 @@ class ItemResource extends Resource
}),
// ->maxRows(100000),
ExportAction::make()
// ->columnMapping(true)
// ->columnMapping(true)
->label('Export Items')
->color('warning')
// ->fileName("Items Report " . date('Y-m-d H:i:s'))
// ->fileName("Items Report " . date('Y-m-d H:i:s'))
->exporter(ItemExporter::class)
->visible(function () {
return Filament::auth()->user()->can('view export item');

View File

@@ -601,7 +601,7 @@ class StickerMasterResource extends Resource
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->orderBy('code')->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get): void {

View File

@@ -13,7 +13,7 @@
"filament/filament": "^3.3",
"intervention/image": "^3.11",
"irazasyed/telegram-bot-sdk": "^3.15",
"laravel/framework": "^11.31",
"laravel/framework": "^12.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"league/flysystem-sftp-v3": "^3.30",

View File

@@ -213,8 +213,6 @@ return [
'user_model' => \App\Models\User::class,
'user_model_class' => \App\Models\User::class,
'policies_namespace' => 'App\Policies',
],
];

View File

@@ -1,40 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$sql = <<<'SQL'
CREATE TABLE sticker_printings (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
plant_id BIGINT NOT NULL,
reference_number TEXT DEFAULT NULL,
serial_number TEXT DEFAULT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
created_by TEXT DEFAULT NULL,
updated_by TEXT DEFAULT NULL,
deleted_at TIMESTAMP,
FOREIGN KEY (plant_id) REFERENCES plants (id)
);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sticker_printings');
}
};