Masters and Transaction changes
This commit is contained in:
@@ -19,6 +19,8 @@ class PlantResource extends Resource
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Master Entries';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
@@ -27,17 +29,19 @@ class PlantResource extends Resource
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('code')
|
||||
->required()
|
||||
->unique()
|
||||
->minValue(1000)
|
||||
->numeric(),
|
||||
->unique(ignoreRecord: true)
|
||||
->numeric()
|
||||
->minValue(1000),
|
||||
Forms\Components\Select::make('company_id')
|
||||
->relationship('company', 'name')
|
||||
->required(),
|
||||
Forms\Components\TextInput::make('name')
|
||||
->required()
|
||||
->unique(ignoreRecord: true)
|
||||
->columnSpanFull(),
|
||||
Forms\Components\Textarea::make('address')
|
||||
->required()
|
||||
->unique(ignoreRecord: true)
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columns(2),
|
||||
@@ -55,8 +59,9 @@ class PlantResource extends Resource
|
||||
Tables\Columns\TextColumn::make('code')
|
||||
->numeric()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('name')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('company.name')
|
||||
->numeric()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->dateTime()
|
||||
|
||||
Reference in New Issue
Block a user