feat: Add phone number field to companies table, migration, and Filament forms/resources.
This commit is contained in:
parent
779154f972
commit
dfef159634
@ -62,6 +62,7 @@ public function handle()
|
||||
'user_id' => $user->id,
|
||||
'name' => $legacy->name,
|
||||
'email' => $legacy->email,
|
||||
'phone_number' => $legacy->phone_number,
|
||||
'address' => $legacy->address,
|
||||
'director_name' => $legacy->director,
|
||||
'director_nik' => $legacy->nick_director,
|
||||
|
||||
@ -193,6 +193,13 @@ public static function form(Schema $schema): Schema
|
||||
->required()
|
||||
->maxLength(100),
|
||||
|
||||
TextInput::make('director_name')
|
||||
->label('Nama Direktur')
|
||||
->placeholder('John Doe')
|
||||
->autocomplete(false)
|
||||
->required()
|
||||
->maxLength(150),
|
||||
|
||||
TextInput::make('email')
|
||||
->label('Alamat Surel')
|
||||
->placeholder('johndoe@example.com')
|
||||
@ -200,20 +207,19 @@ public static function form(Schema $schema): Schema
|
||||
->required()
|
||||
->maxLength(254),
|
||||
|
||||
TextInput::make('phone_number')
|
||||
->label('Nomor Telepon')
|
||||
->placeholder('08xx xxxx xxxx')
|
||||
->autocomplete(false)
|
||||
->maxLength(20)
|
||||
->tel(),
|
||||
|
||||
Textarea::make('address')
|
||||
->label('Alamat')
|
||||
->placeholder('Jl. Kebontoro, Jakarta Pusat')
|
||||
->autocomplete(false)
|
||||
->required()
|
||||
->columnSpanFull(),
|
||||
|
||||
TextInput::make('director_name')
|
||||
->label('Nama Direktur')
|
||||
->placeholder('John Doe')
|
||||
->autocomplete(false)
|
||||
->required()
|
||||
->maxLength(150)
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columns(2)
|
||||
->columnSpan(2),
|
||||
|
||||
@ -80,6 +80,9 @@ public static function infolist(Schema $schema): Schema
|
||||
TextEntry::make('company.email')
|
||||
->label('Email'),
|
||||
|
||||
TextEntry::make('company.phone_number')
|
||||
->label('Nomor Telepon'),
|
||||
|
||||
TextEntry::make('company.address')
|
||||
->label('Alamat'),
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ public function up(): void
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name', 100)->index();
|
||||
$table->string('email', 254)->index();
|
||||
$table->string('phone_number', 20)->nullable();
|
||||
$table->text('address');
|
||||
$table->string('director_name', 150);
|
||||
$table->string('director_nik', 16);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user