Merge pull request 'Updated label and validation logics' (#547) 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: #547
This commit was merged in pull request #547.
This commit is contained in:
@@ -27,11 +27,11 @@ class MachineExporter extends Exporter
|
|||||||
ExportColumn::make('line.name')
|
ExportColumn::make('line.name')
|
||||||
->label('LINE NAME'),
|
->label('LINE NAME'),
|
||||||
ExportColumn::make('name')
|
ExportColumn::make('name')
|
||||||
->label('MACHINE NAME'),
|
->label('DESCRIPTION'),
|
||||||
ExportColumn::make('work_center')
|
ExportColumn::make('work_center')
|
||||||
->label('WORK CENTER'),
|
->label('WORK CENTER'),
|
||||||
ExportColumn::make('workGroupMaster.name')
|
ExportColumn::make('workGroupMaster.name')
|
||||||
->label('WORK GROUP CENTER'),
|
->label('GROUP WORK CENTER'),
|
||||||
ExportColumn::make('created_at')
|
ExportColumn::make('created_at')
|
||||||
->label('CREATED AT'),
|
->label('CREATED AT'),
|
||||||
ExportColumn::make('updated_at')
|
ExportColumn::make('updated_at')
|
||||||
|
|||||||
@@ -21,36 +21,36 @@ class MachineImporter extends Importer
|
|||||||
return [
|
return [
|
||||||
ImportColumn::make('name')
|
ImportColumn::make('name')
|
||||||
->requiredMapping()
|
->requiredMapping()
|
||||||
->exampleHeader('Machine Name')
|
->exampleHeader('DESCRIPTION')
|
||||||
->example(['1600251'])
|
->example(['1600251'])
|
||||||
->label('Machine Name')
|
->label('DESCRIPTION')
|
||||||
->rules(['required']),
|
->rules(['required']),
|
||||||
ImportColumn::make('work_center')
|
ImportColumn::make('work_center')
|
||||||
->requiredMapping()
|
->requiredMapping()
|
||||||
->exampleHeader('Work Center')
|
->exampleHeader('WORK CENTER')
|
||||||
->example('RMGCE001')
|
->example('RMGCE001')
|
||||||
->label('Work Center')
|
->label('WORK CENTER')
|
||||||
->rules(['required']),
|
->rules(['required']),
|
||||||
ImportColumn::make('workGroupMaster')
|
ImportColumn::make('workGroupMaster')
|
||||||
->requiredMapping()
|
->requiredMapping()
|
||||||
->relationship(resolveUsing: 'name')
|
->relationship(resolveUsing: 'name')
|
||||||
->exampleHeader('Work Group Center')
|
->exampleHeader('GROUP WORK CENTER')
|
||||||
->example(['RMGCGABC'])
|
->example(['RMGCGABC'])
|
||||||
->label('Work Group Center')
|
->label('GROUP WORK CENTER')
|
||||||
->rules(['required']),
|
->rules(['required']),
|
||||||
ImportColumn::make('line')
|
ImportColumn::make('line')
|
||||||
->requiredMapping()
|
->requiredMapping()
|
||||||
->relationship(resolveUsing: 'name')
|
->relationship(resolveUsing: 'name')
|
||||||
->exampleHeader('Line Name')
|
->exampleHeader('LINE NAME')
|
||||||
->example(['4 inch pump line'])
|
->example(['4 inch pump line'])
|
||||||
->label('Line Name')
|
->label('LINE NAME')
|
||||||
->rules(['required']),
|
->rules(['required']),
|
||||||
ImportColumn::make('plant')
|
ImportColumn::make('plant')
|
||||||
->requiredMapping()
|
->requiredMapping()
|
||||||
->relationship(resolveUsing: 'code')
|
->relationship(resolveUsing: 'code')
|
||||||
->exampleHeader('Plant Code')
|
->exampleHeader('PLANT CODE')
|
||||||
->example(['1000'])
|
->example(['1000'])
|
||||||
->label('Plant Code')
|
->label('PLANT CODE')
|
||||||
->rules(['required']),
|
->rules(['required']),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -61,18 +61,27 @@ class MachineImporter extends Importer
|
|||||||
$plantCod = $this->data['plant'];
|
$plantCod = $this->data['plant'];
|
||||||
$plant = null;
|
$plant = null;
|
||||||
$line = null;
|
$line = null;
|
||||||
|
$lineNam = $this->data['line'];
|
||||||
$machine = $this->data['name'];
|
$machine = $this->data['name'];
|
||||||
$workCenter = $this->data['work_center'];
|
$workCenter = $this->data['work_center'];
|
||||||
$groupWorkCenter = WorkGroupMaster::where('name', $this->data['workGroupMaster'])->first();
|
$workGroupCenter = $this->data['workGroupMaster'];
|
||||||
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
|
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
|
||||||
$warnMsg[] = 'Invalid plant code found';
|
$warnMsg[] = 'Invalid plant code found';
|
||||||
|
} elseif (Str::length($lineNam) <= 0) {
|
||||||
|
$warnMsg[] = "Line name can't be empty!";
|
||||||
|
} elseif (Str::length($machine) <= 0) {
|
||||||
|
$warnMsg[] = "Description can't be empty!";
|
||||||
|
} elseif (Str::length($workCenter) <= 0) {
|
||||||
|
$warnMsg[] = "Work center can't be empty!";
|
||||||
|
} elseif (Str::length($workGroupCenter) <= 0) {
|
||||||
|
$warnMsg[] = "Group work center can't be empty!";
|
||||||
} else {
|
} else {
|
||||||
$plant = Plant::where('code', $plantCod)->first();
|
$plant = Plant::where('code', $plantCod)->first();
|
||||||
if (! $plant) {
|
if (! $plant) {
|
||||||
$warnMsg[] = 'Plant not found!';
|
$warnMsg[] = 'Plant not found!';
|
||||||
} else {
|
} else {
|
||||||
$groupWorkCenter = WorkGroupMaster::where('name', $this->data['workGroupMaster'])->where('plant_id', $plant->id)->first();
|
$groupWorkCenter = WorkGroupMaster::where('name', $workGroupCenter)->where('plant_id', $plant->id)->first();
|
||||||
$line = Line::where('name', $this->data['line'])->where('plant_id', $plant->id)->first();
|
$line = Line::where('name', $lineNam)->where('plant_id', $plant->id)->first();
|
||||||
if ($line) {
|
if ($line) {
|
||||||
$grpWrkCnr = $line->no_of_operation;
|
$grpWrkCnr = $line->no_of_operation;
|
||||||
if (! $grpWrkCnr || $grpWrkCnr < 1) {// Str::length($grpWrkCnr) < 1)
|
if (! $grpWrkCnr || $grpWrkCnr < 1) {// Str::length($grpWrkCnr) < 1)
|
||||||
@@ -106,10 +115,6 @@ class MachineImporter extends Importer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Str::length($machine) <= 0) {
|
|
||||||
$warnMsg[] = 'Machine name not found!';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($warnMsg)) {
|
if (! empty($warnMsg)) {
|
||||||
throw new RowImportFailedException(implode(', ', $warnMsg));
|
throw new RowImportFailedException(implode(', ', $warnMsg));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ use App\Models\Plant;
|
|||||||
use App\Models\WorkGroupMaster;
|
use App\Models\WorkGroupMaster;
|
||||||
use Filament\Facades\Filament;
|
use Filament\Facades\Filament;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
|
use Filament\Forms\Components\Section;
|
||||||
use Filament\Forms\Form;
|
use Filament\Forms\Form;
|
||||||
use Filament\Forms\Get;
|
use Filament\Forms\Get;
|
||||||
use Filament\Resources\Resource;
|
use Filament\Resources\Resource;
|
||||||
@@ -37,147 +38,156 @@ class MachineResource extends Resource
|
|||||||
{
|
{
|
||||||
return $form
|
return $form
|
||||||
->schema([
|
->schema([
|
||||||
Forms\Components\Select::make('plant_id')
|
Section::make('')
|
||||||
->label('Plant')
|
->schema([
|
||||||
->relationship('plant', 'name')
|
Forms\Components\Select::make('plant_id')
|
||||||
->required()
|
->label('Plant Name')
|
||||||
->reactive()
|
->relationship('plant', 'name')
|
||||||
->options(function (callable $get) {
|
->required()
|
||||||
$userHas = Filament::auth()->user()->plant_id;
|
->columnSpan(1)
|
||||||
|
->reactive()
|
||||||
|
->options(function (callable $get) {
|
||||||
|
$userHas = Filament::auth()->user()->plant_id;
|
||||||
|
|
||||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->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::orderBy('code')->pluck('name', 'id')->toArray();
|
||||||
})
|
})
|
||||||
->default(function () {
|
->default(function () {
|
||||||
return optional(Machine::latest()->first())->plant_id;
|
return optional(Machine::latest()->first())->plant_id;
|
||||||
})
|
})
|
||||||
->disabled(fn (Get $get) => ! empty($get('id')))
|
->disabled(fn (Get $get) => ! empty($get('id')))
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||||
$plantId = $get('plant_id');
|
$plantId = $get('plant_id');
|
||||||
if (! $plantId) {
|
if (! $plantId) {
|
||||||
$set('mPlantError', 'Please select a plant first.');
|
$set('mPlantError', 'Please select a plant first.');
|
||||||
$set('line_id', null);
|
$set('line_id', null);
|
||||||
$set('work_group_master_id', null);
|
$set('work_group_master_id', null);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$set('mPlantError', null);
|
$set('mPlantError', null);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
->extraAttributes(fn ($get) => [
|
->extraAttributes(fn ($get) => [
|
||||||
'class' => $get('mPlantError') ? 'border-red-500' : '',
|
'class' => $get('mPlantError') ? 'border-red-500' : '',
|
||||||
|
])
|
||||||
|
->hint(fn ($get) => $get('mPlantError') ? $get('mPlantError') : null)
|
||||||
|
->hintColor('danger'),
|
||||||
|
Forms\Components\Select::make('line_id')
|
||||||
|
->label('Line Name')
|
||||||
|
->relationship('line', 'name')
|
||||||
|
->required()
|
||||||
|
->columnSpan(1)
|
||||||
|
->reactive()
|
||||||
|
->options(function (callable $get) {
|
||||||
|
if (! $get('plant_id')) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return Line::where('plant_id', $get('plant_id'))->where('no_of_operation', '>', 0)->pluck('name', 'id')->toArray();
|
||||||
|
})
|
||||||
|
->default(function () {
|
||||||
|
return optional(Machine::latest()->first())->line_id;
|
||||||
|
})
|
||||||
|
->disabled(fn (Get $get) => ! empty($get('id')))
|
||||||
|
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||||
|
$lineId = $get('line_id');
|
||||||
|
if (! $lineId) {
|
||||||
|
$set('mLineError', 'Please select a line first.');
|
||||||
|
$set('work_group_master_id', null);
|
||||||
|
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
// $grpWrkCnr = Line::find($lineId)->group_work_center;
|
||||||
|
// if (!$grpWrkCnr || Str::length($grpWrkCnr) < 1)
|
||||||
|
// {
|
||||||
|
// $set('mLineError', 'Please select a group work center line.');
|
||||||
|
// $set('line_id', null);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
$set('mLineError', null);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->extraAttributes(fn ($get) => [
|
||||||
|
'class' => $get('mLineError') ? 'border-red-500' : '',
|
||||||
|
])
|
||||||
|
->hint(fn ($get) => $get('mLineError') ? $get('mLineError') : null)
|
||||||
|
->hintColor('danger'),
|
||||||
|
Forms\Components\Select::make('work_group_master_id')
|
||||||
|
->label('Group Work Center')
|
||||||
|
->relationship('workGroupMaster', 'name')
|
||||||
|
->required()
|
||||||
|
->columnSpan(1)
|
||||||
|
->reactive()
|
||||||
|
->options(function (callable $get) {
|
||||||
|
if (! $get('plant_id') || ! $get('line_id')) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$line = Line::find($get('line_id'));
|
||||||
|
$workGroupIds = [];
|
||||||
|
for ($i = 1; $i <= $line->no_of_operation; $i++) {
|
||||||
|
$column = "work_group{$i}_id";
|
||||||
|
if (! empty($line->$column)) {
|
||||||
|
$workGroupIds[] = $line->$column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return WorkGroupMaster::where('plant_id', $get('plant_id'))->whereIn('id', $workGroupIds)->pluck('name', 'id')->toArray();
|
||||||
|
})
|
||||||
|
->default(function () {
|
||||||
|
return optional(Machine::latest()->first())->work_group_master_id;
|
||||||
|
})
|
||||||
|
->disabled(fn (Get $get) => ! empty($get('id')))
|
||||||
|
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||||
|
$lineId = $get('line_id');
|
||||||
|
if (! $lineId) {
|
||||||
|
$set('mGroupWorkError', 'Please select a line first.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
// $grpWrkCnr = Line::find($lineId)->group_work_center;
|
||||||
|
// if (!$grpWrkCnr || Str::length($grpWrkCnr) < 1)
|
||||||
|
// {
|
||||||
|
// $set('mGroupWorkError', 'Please select a group work center line.');
|
||||||
|
// $set('line_id', null);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
$set('mGroupWorkError', null);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->extraAttributes(fn ($get) => [
|
||||||
|
'class' => $get('mGroupWorkError') ? 'border-red-500' : '',
|
||||||
|
])
|
||||||
|
->hint(fn ($get) => $get('mGroupWorkError') ? $get('mGroupWorkError') : null)
|
||||||
|
->hintColor('danger'),
|
||||||
|
Forms\Components\TextInput::make('work_center')
|
||||||
|
->label('Work Center')
|
||||||
|
->minLength(6)
|
||||||
|
->placeholder('Scan the valid Work Center')
|
||||||
|
->columnSpan(1)
|
||||||
|
->required()
|
||||||
|
->rule(function (callable $get) {
|
||||||
|
return Rule::unique('machines', 'work_center')
|
||||||
|
->where('plant_id', $get('plant_id'))
|
||||||
|
->ignore($get('id')); // Ignore current record during updates
|
||||||
|
}),
|
||||||
|
Forms\Components\TextInput::make('name')
|
||||||
|
->label('Description')
|
||||||
|
->minLength(5)
|
||||||
|
->placeholder('Scan the valid Description')
|
||||||
|
->columnSpan(['default' => 1, 'sm' => 2])
|
||||||
|
->required()
|
||||||
|
->rule(function (callable $get) {
|
||||||
|
return Rule::unique('machines', 'name')
|
||||||
|
// ->where('line_id', $get('line_id'))
|
||||||
|
->where('plant_id', $get('plant_id'))
|
||||||
|
->ignore($get('id')); // Ignore current record during updates
|
||||||
|
}),
|
||||||
|
Forms\Components\TextInput::make('id')
|
||||||
|
->hidden()
|
||||||
|
->readOnly(),
|
||||||
])
|
])
|
||||||
->hint(fn ($get) => $get('mPlantError') ? $get('mPlantError') : null)
|
->columns(['default' => 1, 'sm' => 2]),
|
||||||
->hintColor('danger'),
|
|
||||||
Forms\Components\Select::make('line_id')
|
|
||||||
->label('Line')
|
|
||||||
->relationship('line', 'name')
|
|
||||||
->required()
|
|
||||||
->reactive()
|
|
||||||
->options(function (callable $get) {
|
|
||||||
if (! $get('plant_id')) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
return Line::where('plant_id', $get('plant_id'))->where('no_of_operation', '>', 0)->pluck('name', 'id')->toArray();
|
|
||||||
})
|
|
||||||
->default(function () {
|
|
||||||
return optional(Machine::latest()->first())->line_id;
|
|
||||||
})
|
|
||||||
->disabled(fn (Get $get) => ! empty($get('id')))
|
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
|
||||||
$lineId = $get('line_id');
|
|
||||||
if (! $lineId) {
|
|
||||||
$set('mLineError', 'Please select a line first.');
|
|
||||||
$set('work_group_master_id', null);
|
|
||||||
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
// $grpWrkCnr = Line::find($lineId)->group_work_center;
|
|
||||||
// if (!$grpWrkCnr || Str::length($grpWrkCnr) < 1)
|
|
||||||
// {
|
|
||||||
// $set('mLineError', 'Please select a group work center line.');
|
|
||||||
// $set('line_id', null);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
$set('mLineError', null);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
->extraAttributes(fn ($get) => [
|
|
||||||
'class' => $get('mLineError') ? 'border-red-500' : '',
|
|
||||||
])
|
|
||||||
->hint(fn ($get) => $get('mLineError') ? $get('mLineError') : null)
|
|
||||||
->hintColor('danger'),
|
|
||||||
Forms\Components\Select::make('work_group_master_id')
|
|
||||||
->label('Group Work Center')
|
|
||||||
->relationship('workGroupMaster', 'name')
|
|
||||||
->required()
|
|
||||||
->reactive()
|
|
||||||
->options(function (callable $get) {
|
|
||||||
if (! $get('plant_id') || ! $get('line_id')) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$line = Line::find($get('line_id'));
|
|
||||||
$workGroupIds = [];
|
|
||||||
for ($i = 1; $i <= $line->no_of_operation; $i++) {
|
|
||||||
$column = "work_group{$i}_id";
|
|
||||||
if (! empty($line->$column)) {
|
|
||||||
$workGroupIds[] = $line->$column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return WorkGroupMaster::where('plant_id', $get('plant_id'))->whereIn('id', $workGroupIds)->pluck('name', 'id')->toArray();
|
|
||||||
})
|
|
||||||
->default(function () {
|
|
||||||
return optional(Machine::latest()->first())->work_group_master_id;
|
|
||||||
})
|
|
||||||
->disabled(fn (Get $get) => ! empty($get('id')))
|
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
|
||||||
$lineId = $get('line_id');
|
|
||||||
if (! $lineId) {
|
|
||||||
$set('mGroupWorkError', 'Please select a line first.');
|
|
||||||
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
// $grpWrkCnr = Line::find($lineId)->group_work_center;
|
|
||||||
// if (!$grpWrkCnr || Str::length($grpWrkCnr) < 1)
|
|
||||||
// {
|
|
||||||
// $set('mGroupWorkError', 'Please select a group work center line.');
|
|
||||||
// $set('line_id', null);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
$set('mGroupWorkError', null);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
->extraAttributes(fn ($get) => [
|
|
||||||
'class' => $get('mGroupWorkError') ? 'border-red-500' : '',
|
|
||||||
])
|
|
||||||
->hint(fn ($get) => $get('mGroupWorkError') ? $get('mGroupWorkError') : null)
|
|
||||||
->hintColor('danger'),
|
|
||||||
Forms\Components\TextInput::make('name')
|
|
||||||
->label('Name')
|
|
||||||
->minLength(5)
|
|
||||||
->placeholder('Scan the valid Machine Name')
|
|
||||||
->required()
|
|
||||||
->rule(function (callable $get) {
|
|
||||||
return Rule::unique('machines', 'name')
|
|
||||||
// ->where('line_id', $get('line_id'))
|
|
||||||
->where('plant_id', $get('plant_id'))
|
|
||||||
->ignore($get('id')); // Ignore current record during updates
|
|
||||||
}),
|
|
||||||
Forms\Components\TextInput::make('work_center')
|
|
||||||
->label('Work Center')
|
|
||||||
->minLength(6)
|
|
||||||
->placeholder('Scan the valid Work Center')
|
|
||||||
->required()
|
|
||||||
->rule(function (callable $get) {
|
|
||||||
return Rule::unique('machines', 'work_center')
|
|
||||||
->where('plant_id', $get('plant_id'))
|
|
||||||
->ignore($get('id')); // Ignore current record during updates
|
|
||||||
}),
|
|
||||||
Forms\Components\TextInput::make('id')
|
|
||||||
->hidden()
|
|
||||||
->readOnly(),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,15 +205,15 @@ class MachineResource extends Resource
|
|||||||
return ($currentPage - 1) * $perPage + $rowLoop->iteration;
|
return ($currentPage - 1) * $perPage + $rowLoop->iteration;
|
||||||
}),
|
}),
|
||||||
Tables\Columns\TextColumn::make('plant.name')
|
Tables\Columns\TextColumn::make('plant.name')
|
||||||
->label('Plant')
|
->label('Plant Name')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable(),
|
->searchable(),
|
||||||
Tables\Columns\TextColumn::make('line.name')
|
Tables\Columns\TextColumn::make('line.name')
|
||||||
->label('Line')
|
->label('Line Name')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable(),
|
->searchable(),
|
||||||
Tables\Columns\TextColumn::make('name')
|
Tables\Columns\TextColumn::make('name')
|
||||||
->label('Name')
|
->label('Description')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable(),
|
->searchable(),
|
||||||
Tables\Columns\TextColumn::make('work_center')
|
Tables\Columns\TextColumn::make('work_center')
|
||||||
@@ -212,7 +222,7 @@ class MachineResource extends Resource
|
|||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('workGroupMaster.name')
|
Tables\Columns\TextColumn::make('workGroupMaster.name')
|
||||||
->label('Work Group Center')
|
->label('Group Work Center')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|||||||
@@ -97,6 +97,9 @@ class WorkGroupMasterResource extends Resource
|
|||||||
->columnSpan(['default' => 1, 'sm' => 3]),
|
->columnSpan(['default' => 1, 'sm' => 3]),
|
||||||
Forms\Components\Hidden::make('created_by')
|
Forms\Components\Hidden::make('created_by')
|
||||||
->default(Filament::auth()->user()?->name),
|
->default(Filament::auth()->user()?->name),
|
||||||
|
Forms\Components\TextInput::make('id')
|
||||||
|
->hidden()
|
||||||
|
->readOnly(),
|
||||||
])
|
])
|
||||||
->columns(['default' => 1, 'sm' => 3]),
|
->columns(['default' => 1, 'sm' => 3]),
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user