diff --git a/app/Filament/App/Resources/FamilyResource.php b/app/Filament/App/Resources/FamilyResource.php index 35910a88c..78f743bf6 100644 --- a/app/Filament/App/Resources/FamilyResource.php +++ b/app/Filament/App/Resources/FamilyResource.php @@ -3,9 +3,12 @@ namespace App\Filament\App\Resources; use Override; +use Filament\Forms\Components\Section; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; use Filament\Tables\Columns\TextColumn; +use Filament\Tables\Columns\IconColumn; use Filament\Actions\EditAction; use Filament\Actions\BulkActionGroup; use Filament\Actions\DeleteBulkAction; @@ -38,23 +41,48 @@ public static function form(Schema $schema): Schema { return $schema ->components([ - Textarea::make('description') - ->maxLength(65535) - ->columnSpanFull(), - TextInput::make('is_active') - ->numeric(), - TextInput::make('type_id') - ->numeric(), - TextInput::make('husband_id') - ->numeric(), - TextInput::make('wife_id') - ->numeric(), - TextInput::make('chan') - ->maxLength(255), - TextInput::make('nchi') - ->maxLength(255), - TextInput::make('rin') - ->maxLength(255), + Section::make('Family Members') + ->description('Identify the husband and wife in this family unit') + ->icon('heroicon-o-users') + ->columns(2) + ->schema([ + TextInput::make('husband_id') + ->label('Husband ID') + ->numeric(), + TextInput::make('wife_id') + ->label('Wife ID') + ->numeric(), + TextInput::make('nchi') + ->label('Number of Children') + ->maxLength(255), + TextInput::make('type_id') + ->label('Family Type') + ->numeric(), + Toggle::make('is_active') + ->label('Active') + ->default(true), + ]), + + Section::make('Notes') + ->icon('heroicon-o-document-text') + ->schema([ + Textarea::make('description') + ->maxLength(65535) + ->columnSpanFull(), + ]), + + Section::make('Record References') + ->icon('heroicon-o-hashtag') + ->columns(2) + ->collapsed() + ->schema([ + TextInput::make('chan') + ->label('Change Date') + ->maxLength(255), + TextInput::make('rin') + ->label('RIN') + ->maxLength(255), + ]), ]); } @@ -63,39 +91,37 @@ public static function table(Table $table): Table { return $table ->columns([ - TextColumn::make('is_active') - ->numeric() - ->sortable(), - TextColumn::make('type_id') - ->numeric() + TextColumn::make('id') + ->label('ID') ->sortable(), TextColumn::make('husband_id') + ->label('Husband ID') ->numeric() ->sortable(), TextColumn::make('wife_id') + ->label('Wife ID') ->numeric() ->sortable(), + TextColumn::make('nchi') + ->label('Children') + ->searchable(), + IconColumn::make('is_active') + ->label('Active') + ->boolean(), TextColumn::make('created_at') - ->dateTime() + ->label('Created') + ->since() ->sortable() ->toggleable(isToggledHiddenByDefault: true), TextColumn::make('updated_at') - ->dateTime() + ->label('Updated') + ->since() ->sortable() ->toggleable(isToggledHiddenByDefault: true), - TextColumn::make('deleted_at') - ->dateTime() - ->sortable() - ->toggleable(isToggledHiddenByDefault: true), - TextColumn::make('chan') - ->searchable(), - TextColumn::make('nchi') - ->searchable(), - TextColumn::make('rin') - ->searchable(), ]) ->filters([ - // + Tables\Filters\TernaryFilter::make('is_active') + ->label('Active'), ]) ->recordActions([ EditAction::make(), diff --git a/app/Filament/App/Resources/PersonResource.php b/app/Filament/App/Resources/PersonResource.php index c2400b0d2..470919ed2 100644 --- a/app/Filament/App/Resources/PersonResource.php +++ b/app/Filament/App/Resources/PersonResource.php @@ -6,6 +6,8 @@ use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Select; use Filament\Forms\Components\DateTimePicker; +use Filament\Forms\Components\Section; +use Filament\Forms\Components\Grid; use Filament\Tables\Columns\TextColumn; use Filament\Actions\EditAction; use Filament\Actions\BulkActionGroup; @@ -46,36 +48,65 @@ public static function form(Schema $schema): Schema { return $schema ->components([ - TextInput::make('givn')->label('First Name'), - TextInput::make('surn')->label('Last Name'), - Select::make('sex') - ->options([ - 'M' => 'Male', - 'F' => 'Female', - ]) - ->label('Sex'), - TextInput::make('child_in_family_id')->label('Child In Family ID'), - TextInput::make('description')->label('Description'), - TextInput::make('titl')->label('Title'), - TextInput::make('name')->label('Name'), - TextInput::make('appellative')->label('Appellative'), - TextInput::make('email')->label('Email'), - TextInput::make('phone')->label('Phone'), - DateTimePicker::make('birthday')->label('Birthday'), - DateTimePicker::make('deathday')->label('Deathday'), - FileUpload::make('photo_url') - ->image() - ->label('Profile Photo') - ->directory('people') - ->disk('public'), - DateTimePicker::make('burial_day')->label('Burial Day'), - TextInput::make('bank')->label('Bank'), - TextInput::make('bank_account')->label('Bank Account'), - TextInput::make('chan')->label('Chan'), - TextInput::make('rin')->label('Rin'), - TextInput::make('resn')->label('Resn'), - TextInput::make('rfn')->label('Rfn'), - TextInput::make('afn')->label('Afn'), + Section::make('Basic Information') + ->description('Core identity and personal details') + ->icon('heroicon-o-user') + ->columns(2) + ->schema([ + FileUpload::make('photo_url') + ->image() + ->label('Profile Photo') + ->directory('persons') + ->disk('public') + ->columnSpanFull(), + TextInput::make('givn')->label('First Name'), + TextInput::make('surn')->label('Last Name'), + TextInput::make('titl')->label('Title'), + TextInput::make('appellative')->label('Appellative'), + TextInput::make('name')->label('Full Name'), + Select::make('sex') + ->options([ + 'M' => 'Male', + 'F' => 'Female', + ]) + ->label('Sex'), + TextInput::make('description')->label('Description')->columnSpanFull(), + ]), + + Section::make('Vital Records') + ->description('Birth, death, and burial information') + ->icon('heroicon-o-calendar') + ->columns(2) + ->schema([ + DateTimePicker::make('birthday')->label('Date of Birth'), + DateTimePicker::make('deathday')->label('Date of Death'), + DateTimePicker::make('burial_day')->label('Burial Date'), + TextInput::make('child_in_family_id')->label('Child in Family ID'), + ]), + + Section::make('Contact Information') + ->description('Email and phone details') + ->icon('heroicon-o-envelope') + ->columns(2) + ->schema([ + TextInput::make('email')->label('Email')->email(), + TextInput::make('phone')->label('Phone'), + ]), + + Section::make('Record References') + ->description('Genealogy record identifiers and metadata') + ->icon('heroicon-o-document-text') + ->columns(3) + ->collapsed() + ->schema([ + TextInput::make('rin')->label('RIN'), + TextInput::make('rfn')->label('RFN'), + TextInput::make('afn')->label('AFN'), + TextInput::make('resn')->label('Restriction'), + TextInput::make('chan')->label('Change Date'), + TextInput::make('bank')->label('Bank'), + TextInput::make('bank_account')->label('Bank Account'), + ]), ]); } @@ -84,33 +115,27 @@ public static function table(Table $table): Table { return $table ->columns([ - TextColumn::make('givn')->label('First Name'), - TextColumn::make('surn')->label('Last Name'), - TextColumn::make('sex')->label('Sex'), - TextColumn::make('child_in_family_id')->label('Child In Family ID'), - TextColumn::make('description')->label('Description'), - TextColumn::make('titl')->label('Title'), - TextColumn::make('name')->label('Name'), - TextColumn::make('appellative')->label('Appellative'), - TextColumn::make('email')->label('Email'), - TextColumn::make('phone')->label('Phone'), - TextColumn::make('birthday')->label('Birthday'), - TextColumn::make('deathday')->label('Deathday'), - ImageColumn::make('photo_url')->label('Photo')->disk('public')->height(40)->width(40), - TextColumn::make('burial_day')->label('Burial Day'), - TextColumn::make('bank')->label('Bank'), - TextColumn::make('bank_account')->label('Bank Account'), - TextColumn::make('chan')->label('Chan'), - TextColumn::make('rin')->label('Rin'), - TextColumn::make('resn')->label('Resn'), - TextColumn::make('rfn')->label('Rfn'), - TextColumn::make('afn')->label('Afn'), - TextColumn::make('created_at')->label('Created At')->sortable(), - TextColumn::make('updated_at')->label('Updated At')->sortable(), - + ImageColumn::make('photo_url')->label('Photo')->disk('public')->height(40)->width(40)->circular(), + TextColumn::make('givn')->label('First Name')->searchable()->sortable(), + TextColumn::make('surn')->label('Last Name')->searchable()->sortable(), + TextColumn::make('sex')->label('Sex')->badge() + ->color(fn (string $state): string => match ($state) { + 'M' => 'info', + 'F' => 'danger', + default => 'gray', + }), + TextColumn::make('birthday')->label('Born')->date('Y')->sortable(), + TextColumn::make('deathday')->label('Died')->date('Y')->sortable(), + TextColumn::make('email')->label('Email')->toggleable(isToggledHiddenByDefault: true), + TextColumn::make('phone')->label('Phone')->toggleable(isToggledHiddenByDefault: true), + TextColumn::make('created_at')->label('Added')->since()->sortable()->toggleable(isToggledHiddenByDefault: true), ]) ->filters([ - // + Tables\Filters\SelectFilter::make('sex') + ->options([ + 'M' => 'Male', + 'F' => 'Female', + ]), ]) ->recordActions([ EditAction::make(), diff --git a/resources/css/site.css b/resources/css/site.css index 323d5fff9..0dd20f8a3 100644 --- a/resources/css/site.css +++ b/resources/css/site.css @@ -1,177 +1,32 @@ -body { -background-image: url('/build/images/main-hero.png'); -color: #FFFFFF; -} - -div { -color: #FFFFFF; -} - -footer -{ -@apply text-white bg-green-900; +footer { + @apply text-white bg-green-900; } .navbar-nav { -@apply text-white shadow-md; + @apply text-white shadow-md; } -/* Custom styles extracted from tailwind.css */ .btn { @apply px-4 py-2 bg-blue-500 text-white font-semibold rounded-lg shadow-md hover:bg-blue-700; } + .form-input { @apply border-2 border-gray-300 p-3 rounded-lg focus:outline-none focus:border-blue-500 bg-white text-gray-900; } -.container { - @apply max-w-6xl mx-auto px-4 sm:px-6 lg:px-8; - @apply max-w-6xl mx-auto px-4 sm:px-6 lg:px-8; - @media (max-width: 768px) { - max-width: 100%; - } -} - .manage-section { - @apply bg-green-800 text-white shadow-md overflow-hidden; - } - - .card, card { - @apply bg-green-800 text-white rounded-lg shadow-md overflow-hidden; - } - .card-header, card-header { - @apply text-white font-bold py-2 px-4 bg-green-800; - } - .card-body, card-body { - @apply p-4 bg-green-800; - } -.sm\:container { - @apply max-w-xl; -} -.md\:container { - @apply max-w-2xl; -} -.lg\:container { - @apply max-w-4xl; -} -.xl\:container { - @apply max-w-6xl; -} - .form-input { - padding: 10px; - } -@media (max-width: 768px) { - .btn { - font-size: 14px; - } -} -.form-input { - @apply border-2 border-gray-300 p-3 rounded-lg focus:outline-none focus:border-blue-500; -} -.container { - @apply max-w-6xl mx-auto px-4 sm:px-6 lg:px-8; -} - .card { - @apply bg-green-800 text-white rounded-lg shadow-md overflow-hidden; - } - .card-header { - @apply bg-green-800 text-white font-bold py-2 px-4; - } - .card-body { - @apply p-4 bg-green-800; - }.sm\:container { - @apply max-w-xl; -} -.md\:container { - @apply max-w-2xl; -} -.lg\:container { - @apply max-w-4xl; -} -.xl\:container { - @apply max-w-6xl; -} -/* Responsive adjustments using Tailwind's responsive prefixes */ -.sm\:container { - @apply max-w-xl; -} -.md\:container { - @apply max-w-2xl; -} -.lg\:container { -} -.xl\:container { - @apply max-w-6xl; -} -.sm\:container { - @apply max-w-xl; -} -.md\:container { - @apply max-w-2xl; -} -.lg\:container { - @apply max-w-4xl; -} -.xl\:container { - @apply max-w-6xl; -} -/* Responsive adjustments using Tailwind's responsive prefixes */ -.sm\:container { - @apply max-w-xl; -} -.md\:container { - @apply max-w-2xl; -} -.lg\:container { - @apply max-w-4xl; -} -.xl\:container { - @apply max-w-6xl; -} -.card-body { - @apply p-4 bg-green-800 opacity-75; - @media (max-width: 768px) { - padding: 20px; - } -} -.sm\:container { - @apply max-w-xl; -} -.md\:container { - @apply max-w-2xl; -} -.lg\:container { - @apply max-w-4xl; -} -.xl\:container { - @apply max-w-6xl; +.manage-section { + @apply bg-green-800 text-white shadow-md overflow-hidden; } + .card { - @apply bg-green-800 rounded-lg shadow-md overflow-hidden; + @apply bg-green-800 text-white rounded-lg shadow-md overflow-hidden; } + .card-header { @apply bg-green-800 text-white font-bold py-2 px-4; } -@media (max-width: 768px) { - .card-header { - } -} -@media (max-width: 768px) { - .card-body { - - padding: 20px; - } -} -/* Responsive adjustments using Tailwind's responsive prefixes */ -.sm\:container { - @apply max-w-xl; -} -.md\:container { - @apply max-w-2xl; -} -.lg\:container { - @apply max-w-4xl; -} -.xl\:container { - @apply max-w-6xl; + +.card-body { + @apply p-4 bg-green-800; } \ No newline at end of file diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 0d5aae8b9..204ad5d0e 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,44 +1,74 @@ @extends('layouts.home') @section('content') -
-
-
- {{ __('Please sign in to access the admin panel.') }} -
+
+
+

Welcome back

+

Sign in to continue building your family tree

+
-
- @csrf +
+
+ + @csrf -
- - -
+
+
+ + + @error('email') +

{{ $message }}

+ @enderror +
-
- - -
+
+
+ + + Forgot password? + +
+ + @error('password') +

{{ $message }}

+ @enderror +
-
- -
+
+ + +
-
- -
+ +
+ +
- Forgot password? - +
+

+ Don't have an account? + + Start free today + +

+
@endsection \ No newline at end of file diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index ea7b29e96..52ce9f04b 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,43 +1,89 @@ @extends('layouts.home') @section('content') -
- -
-
- @csrf - {{-- --}} - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - {{ __('Already registered?') }} - +
+
+

Create your account

+

Start building your family tree for free

+
+ +
+
+ + @csrf + +
+
+ + + @error('name') +

{{ $message }}

+ @enderror +
+ +
+ + + @error('email') +

{{ $message }}

+ @enderror +
- - {{ __('Register') }} - -
- +
+ + + @error('password') +

{{ $message }}

+ @enderror +
+ +
+ + +
+ + +
+ +
+ +
+

+ Already have an account? + + Sign in + +

+
+ +

+ By creating an account, you agree to our + Terms of Service + and + Privacy Policy. +

@endsection \ No newline at end of file diff --git a/resources/views/components/footer.blade.php b/resources/views/components/footer.blade.php index e813920c6..5366e42a3 100644 --- a/resources/views/components/footer.blade.php +++ b/resources/views/components/footer.blade.php @@ -1,35 +1,26 @@ @php $settings = app(\App\Settings\GeneralSettings::class); @endphp -