Merge pull request 'ranjith-dev' (#705) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #705
This commit was merged in pull request #705.
This commit is contained in:
@@ -267,6 +267,9 @@ class SerialValidationResource extends Resource
|
|||||||
Tables\Columns\TextColumn::make('scanned_status')
|
Tables\Columns\TextColumn::make('scanned_status')
|
||||||
->label('Scanned Status')
|
->label('Scanned Status')
|
||||||
->alignCenter(),
|
->alignCenter(),
|
||||||
|
Tables\Columns\TextColumn::make('panel_box_code')
|
||||||
|
->label('Panel Box Code')
|
||||||
|
->alignCenter(),
|
||||||
Tables\Columns\TextColumn::make('panel_box_supplier')
|
Tables\Columns\TextColumn::make('panel_box_supplier')
|
||||||
->label('Panel Box Supplier')
|
->label('Panel Box Supplier')
|
||||||
->alignCenter(),
|
->alignCenter(),
|
||||||
@@ -296,12 +299,25 @@ class SerialValidationResource extends Resource
|
|||||||
->dateTime()
|
->dateTime()
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('created_by')
|
||||||
|
->label('Created By')
|
||||||
|
->alignCenter()
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('operator_id')
|
||||||
|
->label('Operator ID')
|
||||||
|
->alignCenter()
|
||||||
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('updated_at')
|
Tables\Columns\TextColumn::make('updated_at')
|
||||||
->label('Updated At')
|
->label('Updated At')
|
||||||
->dateTime()
|
->dateTime()
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->sortable()
|
->sortable()
|
||||||
->toggleable(isToggledHiddenByDefault: true),
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
Tables\Columns\TextColumn::make('updated_by')
|
||||||
|
->label('Updated By')
|
||||||
|
->alignCenter()
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
Tables\Columns\TextColumn::make('deleted_at')
|
Tables\Columns\TextColumn::make('deleted_at')
|
||||||
->label('Deleted At')
|
->label('Deleted At')
|
||||||
->dateTime()
|
->dateTime()
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
|
|
||||||
class SerialValidation extends Model
|
class SerialValidation extends Model
|
||||||
{
|
{
|
||||||
use Prunable;
|
// use Prunable;
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
@@ -30,6 +30,9 @@ class SerialValidation extends Model
|
|||||||
'batch_number',
|
'batch_number',
|
||||||
'quantity',
|
'quantity',
|
||||||
'operator_id',
|
'operator_id',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
'panel_box_code',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function plant(): BelongsTo
|
public function plant(): BelongsTo
|
||||||
@@ -47,8 +50,8 @@ class SerialValidation extends Model
|
|||||||
return $this->belongsTo(StickerMaster::class, 'sticker_master_id');
|
return $this->belongsTo(StickerMaster::class, 'sticker_master_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function prunable(): Builder
|
// public function prunable(): Builder
|
||||||
{
|
// {
|
||||||
return static::where('created_at', '<=', now()->subMonthsNoOverflow(6));
|
// return static::where('created_at', '<=', now()->subMonthsNoOverflow(6));
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$sql1 = <<<'SQL'
|
||||||
|
ALTER TABLE serial_validations
|
||||||
|
ADD COLUMN panel_box_code TEXT DEFAULT NULL
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql1);
|
||||||
|
|
||||||
|
$sql2 = <<<'SQL'
|
||||||
|
ALTER TABLE serial_validations
|
||||||
|
ADD COLUMN created_by TEXT DEFAULT NULL
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql2);
|
||||||
|
|
||||||
|
$sql3 = <<<'SQL'
|
||||||
|
ALTER TABLE serial_validations
|
||||||
|
ADD COLUMN updated_by TEXT DEFAULT NULL
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
DB::statement($sql3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
// Schema::table('serial_validations', function (Blueprint $table) {
|
||||||
|
// //
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user