Added laser_part_validation1, laser_part_validation2 column and clear fields while plant change in resource file and display material type like Individual, Bundle, Quantity instead of 1, 2, 3 in view report
This commit is contained in:
@@ -48,11 +48,17 @@ class StickerMasterResource extends Resource
|
||||
$set('item_id', null) & //when plant changed remove all the data which is in text input box
|
||||
$set('item_description', null) &
|
||||
$set('item_error', null) &
|
||||
$set('panel_box_code', null) &
|
||||
$set('load_rate', null) &
|
||||
$set('bundle_quantity', null) &
|
||||
$set('material_type', null) &
|
||||
$set('part_validation1', null) &
|
||||
$set('part_validation2', null) &
|
||||
$set('part_validation3', null) &
|
||||
$set('part_validation4', null) &
|
||||
$set('part_validation5', null) &
|
||||
$set('laser_part_validation1', null) &
|
||||
$set('laser_part_validation2', null) &
|
||||
$set('serial_number_motor', false) &
|
||||
$set('serial_number_pump', false) &
|
||||
$set('serial_number_pumpset', false) &
|
||||
@@ -169,6 +175,12 @@ class StickerMasterResource extends Resource
|
||||
Forms\Components\TextInput::make('part_validation5')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('laser_part_validation1')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('laser_part_validation2')
|
||||
->nullable(),
|
||||
|
||||
Forms\Components\TextInput::make('panel_box_code')
|
||||
->label('Panel Box Code')
|
||||
->readOnly(fn (callable $get) => $get('material_type'))
|
||||
@@ -509,6 +521,12 @@ class StickerMasterResource extends Resource
|
||||
Tables\Columns\TextColumn::make('part_validation5')
|
||||
->label('Part Validation 5')
|
||||
->alignCenter(),
|
||||
Tables\Columns\TextColumn::make('laser_part_validation1')
|
||||
->label('Laser Part Validation 1')
|
||||
->alignCenter(),
|
||||
Tables\Columns\TextColumn::make('laser_part_validation2')
|
||||
->label('Laser Part Validation 2')
|
||||
->alignCenter(),
|
||||
Tables\Columns\TextColumn::make('panel_box_code')
|
||||
->label('Panel Box Code')
|
||||
->alignCenter(),
|
||||
@@ -521,7 +539,18 @@ class StickerMasterResource extends Resource
|
||||
->alignCenter(),
|
||||
Tables\Columns\TextColumn::make('material_type')
|
||||
->label('Material Type')
|
||||
->alignCenter(),
|
||||
->alignCenter()
|
||||
->formatStateUsing(function ($state) {
|
||||
if (is_null($state) || $state === '') {
|
||||
return '';
|
||||
}
|
||||
return match ($state) {
|
||||
1 => 'Individual',
|
||||
2 => 'Bundle',
|
||||
3 => 'Quantity',
|
||||
default => '',
|
||||
};
|
||||
}),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->label('Created At')
|
||||
->dateTime()
|
||||
|
||||
Reference in New Issue
Block a user