From 05e99d4e206050bf60fa08d00a43d7954b8729f5 Mon Sep 17 00:00:00 2001 From: f4ilji Date: Wed, 4 Dec 2024 01:03:59 +0500 Subject: [PATCH] Changes --- .../Components/Forms/UserDetailForm.php | 5 +- ..._add_two_factor_columns_to_users_table.php | 46 ------------ database/seeders/DatabaseSeeder.php | 74 +++++++++---------- .../Persons/Blocks/PublicationBlock.vue | 4 +- resources/js/Pages/Client/Persons/Show.vue | 8 +- 5 files changed, 44 insertions(+), 93 deletions(-) delete mode 100644 database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php diff --git a/app/Filament/Components/Forms/UserDetailForm.php b/app/Filament/Components/Forms/UserDetailForm.php index 2b37e94..19aac0b 100644 --- a/app/Filament/Components/Forms/UserDetailForm.php +++ b/app/Filament/Components/Forms/UserDetailForm.php @@ -109,10 +109,7 @@ class UserDetailForm ->schema([ Forms\Components\Repeater::make('attendedConferences')->schema([ Forms\Components\TextInput::make('item')->label('')->string()->required() - ])->label('Участие в конференциях')->defaultItems(0), - Forms\Components\Repeater::make('participationScienceProjects')->schema([ - Forms\Components\TextInput::make('item')->label('')->string()->required() - ])->label('Участие в научных проектах')->defaultItems(0), + ])->label('Участие в выставках, конференциях, проектах')->defaultItems(0), Forms\Components\Repeater::make('publications')->schema([ Forms\Components\TextInput::make('category_publication')->label('Категория публикаций')->string()->required(), Forms\Components\Repeater::make('publication')->schema([ diff --git a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php deleted file mode 100644 index b490e24..0000000 --- a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php +++ /dev/null @@ -1,46 +0,0 @@ -text('two_factor_secret') - ->after('password') - ->nullable(); - - $table->text('two_factor_recovery_codes') - ->after('two_factor_secret') - ->nullable(); - - if (Fortify::confirmsTwoFactorAuthentication()) { - $table->timestamp('two_factor_confirmed_at') - ->after('two_factor_recovery_codes') - ->nullable(); - } - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn(array_merge([ - 'two_factor_secret', - 'two_factor_recovery_codes', - ], Fortify::confirmsTwoFactorAuthentication() ? [ - 'two_factor_confirmed_at', - ] : [])); - }); - } -}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 3227c7a..3bc5014 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -31,43 +31,43 @@ class DatabaseSeeder extends Seeder 'slug' => 'failj', 'password' => "$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi", ]); - User::factory()->count(50)->has(UserDetail::factory())->create(); - EventCategory::factory()->count(10)->create(); - Category::factory()->count(80)->create(); - Post::factory()->count(1000)->create(); - Event::factory()->count(200)->create(); - Faculty::factory()->count(6)->create(); - Department::factory()->count(12)->create(); - - for ($i = 0; $i < 20; $i++) { - DB::table('workers_departments')->insert([ - 'user_id' => User::inRandomOrder()->first()->id, - 'department_id' => Department::inRandomOrder()->first()->id, - 'position' => $faker->word, - 'created_at' => now(), - 'updated_at' => now(), - ]); - } - - for ($i = 0; $i < 20; $i++) { - DB::table('workers_faculties')->insert([ - 'user_id' => User::inRandomOrder()->first()->id, - 'faculty_id' => Faculty::inRandomOrder()->first()->id, - 'position' => $faker->word, - 'created_at' => now(), - 'updated_at' => now(), - ]); - } - - for ($i = 0; $i < 30; $i++) { - DB::table('teachers_departments')->insert([ - 'user_id' => User::inRandomOrder()->first()->id, - 'department_id' => Department::inRandomOrder()->first()->id, - 'teaching_position' => $faker->word, - 'created_at' => now(), - 'updated_at' => now(), - ]); - } +// User::factory()->count(50)->has(UserDetail::factory())->create(); +// EventCategory::factory()->count(10)->create(); +// Category::factory()->count(80)->create(); +// Post::factory()->count(1000)->create(); +// Event::factory()->count(200)->create(); +// Faculty::factory()->count(6)->create(); +// Department::factory()->count(12)->create(); +// +// for ($i = 0; $i < 20; $i++) { +// DB::table('workers_departments')->insert([ +// 'user_id' => User::inRandomOrder()->first()->id, +// 'department_id' => Department::inRandomOrder()->first()->id, +// 'position' => $faker->word, +// 'created_at' => now(), +// 'updated_at' => now(), +// ]); +// } +// +// for ($i = 0; $i < 20; $i++) { +// DB::table('workers_faculties')->insert([ +// 'user_id' => User::inRandomOrder()->first()->id, +// 'faculty_id' => Faculty::inRandomOrder()->first()->id, +// 'position' => $faker->word, +// 'created_at' => now(), +// 'updated_at' => now(), +// ]); +// } +// +// for ($i = 0; $i < 30; $i++) { +// DB::table('teachers_departments')->insert([ +// 'user_id' => User::inRandomOrder()->first()->id, +// 'department_id' => Department::inRandomOrder()->first()->id, +// 'teaching_position' => $faker->word, +// 'created_at' => now(), +// 'updated_at' => now(), +// ]); +// } // $this->call([RolesSeeder::class]); // $users = [ // [ diff --git a/resources/js/Components/BuilderUi/Persons/Blocks/PublicationBlock.vue b/resources/js/Components/BuilderUi/Persons/Blocks/PublicationBlock.vue index 056cbf4..d8bc871 100644 --- a/resources/js/Components/BuilderUi/Persons/Blocks/PublicationBlock.vue +++ b/resources/js/Components/BuilderUi/Persons/Blocks/PublicationBlock.vue @@ -1,9 +1,9 @@