diff --git a/app/Filament/Exports/ParticipantExporter.php b/app/Filament/Exports/ParticipantExporter.php new file mode 100644 index 0000000..7e7daaa --- /dev/null +++ b/app/Filament/Exports/ParticipantExporter.php @@ -0,0 +1,43 @@ +successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.'; + + if ($failedRowsCount = $export->getFailedRowsCount()) { + $body .= ' ' . Number::format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.'; + } + + return $body; + } +} diff --git a/database/migrations/2025_11_02_175258_create_notifications_table.php b/database/migrations/2025_11_02_175258_create_notifications_table.php new file mode 100644 index 0000000..d738032 --- /dev/null +++ b/database/migrations/2025_11_02_175258_create_notifications_table.php @@ -0,0 +1,31 @@ +uuid('id')->primary(); + $table->string('type'); + $table->morphs('notifiable'); + $table->text('data'); + $table->timestamp('read_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('notifications'); + } +}; diff --git a/database/migrations/2025_11_02_175259_create_imports_table.php b/database/migrations/2025_11_02_175259_create_imports_table.php new file mode 100644 index 0000000..1d9c09d --- /dev/null +++ b/database/migrations/2025_11_02_175259_create_imports_table.php @@ -0,0 +1,35 @@ +id(); + $table->timestamp('completed_at')->nullable(); + $table->string('file_name'); + $table->string('file_path'); + $table->string('importer'); + $table->unsignedInteger('processed_rows')->default(0); + $table->unsignedInteger('total_rows'); + $table->unsignedInteger('successful_rows')->default(0); + $table->foreignId('user_id')->constrained()->cascadeOnDelete(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('imports'); + } +}; diff --git a/database/migrations/2025_11_02_175300_create_exports_table.php b/database/migrations/2025_11_02_175300_create_exports_table.php new file mode 100644 index 0000000..6a87ac3 --- /dev/null +++ b/database/migrations/2025_11_02_175300_create_exports_table.php @@ -0,0 +1,35 @@ +id(); + $table->timestamp('completed_at')->nullable(); + $table->string('file_disk'); + $table->string('file_name')->nullable(); + $table->string('exporter'); + $table->unsignedInteger('processed_rows')->default(0); + $table->unsignedInteger('total_rows'); + $table->unsignedInteger('successful_rows')->default(0); + $table->foreignId('user_id')->constrained()->cascadeOnDelete(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('exports'); + } +}; diff --git a/database/migrations/2025_11_02_175301_create_failed_import_rows_table.php b/database/migrations/2025_11_02_175301_create_failed_import_rows_table.php new file mode 100644 index 0000000..2f77805 --- /dev/null +++ b/database/migrations/2025_11_02_175301_create_failed_import_rows_table.php @@ -0,0 +1,30 @@ +id(); + $table->json('data'); + $table->foreignId('import_id')->constrained()->cascadeOnDelete(); + $table->text('validation_error')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('failed_import_rows'); + } +};