diff --git a/app/Console/Commands/MigrateCompanyCommand.php b/app/Console/Commands/MigrateCompanyCommand.php index 89e0018..4e2155b 100644 --- a/app/Console/Commands/MigrateCompanyCommand.php +++ b/app/Console/Commands/MigrateCompanyCommand.php @@ -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, diff --git a/app/Filament/Pages/Company.php b/app/Filament/Pages/Company.php index f3e23b8..da349a9 100644 --- a/app/Filament/Pages/Company.php +++ b/app/Filament/Pages/Company.php @@ -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), diff --git a/app/Filament/Resources/Manage/Partners/PartnerResource.php b/app/Filament/Resources/Manage/Partners/PartnerResource.php index 0993308..d035073 100644 --- a/app/Filament/Resources/Manage/Partners/PartnerResource.php +++ b/app/Filament/Resources/Manage/Partners/PartnerResource.php @@ -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'), diff --git a/database/migrations/2025_11_20_041121_create_companies_table.php b/database/migrations/2025_11_20_041121_create_companies_table.php index 9bd0fc1..074e423 100644 --- a/database/migrations/2025_11_20_041121_create_companies_table.php +++ b/database/migrations/2025_11_20_041121_create_companies_table.php @@ -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);