diff --git a/app/Filament/Pages/AboutPageSettings.php b/app/Filament/Pages/AboutPageSettings.php index f127eea..97a6893 100644 --- a/app/Filament/Pages/AboutPageSettings.php +++ b/app/Filament/Pages/AboutPageSettings.php @@ -71,10 +71,12 @@ class AboutPageSettings extends SettingsPage ->disk('public') ->directory('about-us') ->required(), - TextInput::make('our_story_video_source') - ->label('Video Source URL') - ->url() - ->maxLength(255) + FileUpload::make('our_story_video_source') + ->label('Video Source File') + ->acceptedFileTypes(['video/mp4', 'video/webm', 'video/ogg']) + ->maxSize(102400) // 100MB + ->disk('public') + ->directory('about-us-videos') ->required(), ]), @@ -160,49 +162,6 @@ class AboutPageSettings extends SettingsPage ->collapsible(), ]), - Section::make('Our Management Section') - ->description("Manage the 'Our Management' team details on the About Us page.") - ->icon('heroicon-o-briefcase') - ->schema([ - TextInput::make('our_management_title') - ->label('Title') - ->required() - ->maxLength(100), - Textarea::make('our_management_subtitle') - ->label('Subtitle') - ->rows(2) - ->maxLength(255) - ->required(), - Repeater::make('our_management_team') - ->label('Team Members') - ->schema([ - FileUpload::make('image') - ->label('Image') - ->image() - ->maxSize(2048) - ->disk('public') - ->directory('about-us-team') - ->required(), - TextInput::make('name') - ->label('Name') - ->required() - ->maxLength(100), - TextInput::make('title') - ->label('Title/Position') - ->required() - ->maxLength(100), - Textarea::make('description') - ->label('Description') - ->rows(3) - ->maxLength(255) - ->required(), - ]) - ->minItems(1) - ->columns(1) - ->reorderable() - ->collapsible(), - ]), - Section::make('Our Facilities Section') ->description("Manage the 'Our Facilities' details on the About Us page.") ->icon('heroicon-o-building-library') diff --git a/app/Filament/Resources/TeamMemberResource.php b/app/Filament/Resources/TeamMemberResource.php new file mode 100644 index 0000000..21e80a8 --- /dev/null +++ b/app/Filament/Resources/TeamMemberResource.php @@ -0,0 +1,94 @@ +schema([ + TextInput::make('name') + ->required() + ->maxLength(255), + TextInput::make('title') + ->required() + ->maxLength(255), + Textarea::make('description') + ->required() + ->rows(5) + ->maxLength(65535), + FileUpload::make('image') + ->image() + ->directory('team-members') + ->maxSize(2048) // 2MB + ->required(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + TextColumn::make('name') + ->searchable() + ->sortable(), + TextColumn::make('title') + ->searchable() + ->sortable(), + ImageColumn::make('image'), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListTeamMembers::route('/'), + 'create' => Pages\CreateTeamMember::route('/create'), + 'edit' => Pages\EditTeamMember::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/TeamMemberResource/Pages/CreateTeamMember.php b/app/Filament/Resources/TeamMemberResource/Pages/CreateTeamMember.php new file mode 100644 index 0000000..d199d5f --- /dev/null +++ b/app/Filament/Resources/TeamMemberResource/Pages/CreateTeamMember.php @@ -0,0 +1,12 @@ +id(); + $table->string('name'); + $table->string('title'); + $table->text('description'); + $table->string('image'); // Store path to image + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('team_members'); + } +}; diff --git a/resources/views/web/pages/about/index.blade.php b/resources/views/web/pages/about/index.blade.php index dca0f12..8bef5a7 100644 --- a/resources/views/web/pages/about/index.blade.php +++ b/resources/views/web/pages/about/index.blade.php @@ -426,27 +426,27 @@ body {
-

{{ $aboutSettings->our_management_title }}

-

{{ $aboutSettings->our_management_subtitle }}

+

Our Management

+

Meet the leadership team driving our vision forward

- @foreach ($aboutSettings->our_management_team as $member) + @foreach (App\Models\TeamMember::all() as $member)
{{ $member['name'] }}
-

{{ $member['name'] }}

-

{{ $member['title'] }}

-

{{ $member['description'] }}

+

{{ $member->name }}

+

{{ $member->title }}

+

{{ $member->description }}

@endforeach @@ -524,7 +524,7 @@ body {

{{ $location['description'] }}

@foreach ($location['tags'] as $tag) - {{ $tag['value'] }} + {{ $tag }} @endforeach
@@ -537,203 +537,4 @@ body { - - -
-
-
-
-
- Our Mission -

Dedicated to Delivering Value and Excellence

-
-
-
-
-
-
-
- -
-

Project Planning

-

Ensuring every detail is considered designing

-
-
-
-
-
- -
-

Labor Preparation

-

We take pride in our quality craftsmanship

-
-
-
-
-
-
-
-
-
- - -
-
-
-
-
- image -
-
-
-
-
- About Our Company -

Trusted Partner in Construction and Design

-
-
-

Building Trust
Since 1989

-
-

Our journey began with a commitment to excellence, and that commitment remains at the core of our operations today. We’ve grown from a small local business into a trusted partner for both residential and commercial.

- -
-
-
-
-
- - -
-
-
-
-
-
- -
-
-
-
-
- -
- - -
-
-
-
-
- Industry Certifications -

Our Key Achievements Over the Years

-
-
-
-
- image -
-
-
-
-
-
-
-

678+

- Complete Projects -
-
-

120+

- Team Members -
-
-

635+

- Client Reviews -
-
-

89+

- Winning Awards -
-
-
-
-
-
- - -
-
-
-
-
- Meet Our Experts -

Dedicated Professionals

-
-
-
-
-
-
- image -
-
Alan Dosan
- Lead Architect -
-
-
-
-
- image -
-
Sarah Johnson
- General Laborer -
-
-
-
-
- image -
-
Derya Kurtulus
- Safety Inspector -
-
-
-
-
- image -
-
Steve Rhodes
- Civil Engineer -
-
-
-
-
-
- @stop