Implement compliance exports and retention overrides
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Enums\DataExportScope;
|
||||
use App\Models\DataExport;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -45,6 +46,7 @@ class ProfileController extends Controller
|
||||
->all();
|
||||
|
||||
$recentExports = $user->dataExports()
|
||||
->where('scope', DataExportScope::USER->value)
|
||||
->latest()
|
||||
->limit(5)
|
||||
->get()
|
||||
@@ -61,6 +63,7 @@ class ProfileController extends Controller
|
||||
]);
|
||||
|
||||
$pendingExport = $user->dataExports()
|
||||
->where('scope', DataExportScope::USER->value)
|
||||
->whereIn('status', [
|
||||
DataExport::STATUS_PENDING,
|
||||
DataExport::STATUS_PROCESSING,
|
||||
@@ -68,6 +71,7 @@ class ProfileController extends Controller
|
||||
->exists();
|
||||
|
||||
$lastReadyExport = $user->dataExports()
|
||||
->where('scope', DataExportScope::USER->value)
|
||||
->where('status', DataExport::STATUS_READY)
|
||||
->latest('created_at')
|
||||
->first();
|
||||
|
||||
Reference in New Issue
Block a user