wip
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Modules\SberPaymentOrder\Models\SberPaymentOrderItem;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
@@ -25,6 +26,16 @@ class SendSberToSystem implements ShouldQueue
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
//
|
||||
$orderItem = SberPaymentOrderItem::query()
|
||||
->where('paid', true)
|
||||
->where('synced_with_system', false)
|
||||
->whereDate('created_at', '>', '2025-09-05')
|
||||
->first();
|
||||
|
||||
if (! $orderItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,6 @@ trait NovaSberPaymentOrderAuth
|
||||
return;
|
||||
}
|
||||
|
||||
// if ($user->isMe() || $user->isSuperAdmin()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
/** @var SberPaymentOrder $resource */
|
||||
$resource = $this->resource;
|
||||
if ($resource->user_id == auth()->id()) {
|
||||
@@ -47,15 +43,7 @@ trait NovaSberPaymentOrderAuth
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isSystemUser()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($user->isMe() || $user->isSuperAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/** View */
|
||||
@@ -67,10 +55,6 @@ trait NovaSberPaymentOrderAuth
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user->isMe() || $user->isSuperAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var SberPaymentOrder $resource */
|
||||
$resource = $this->resource;
|
||||
if ($resource->user_id == auth()->id()) {
|
||||
@@ -89,10 +73,6 @@ trait NovaSberPaymentOrderAuth
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($user->isMe() || $user->isSuperAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -101,9 +81,6 @@ trait NovaSberPaymentOrderAuth
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
if ($user->isMe()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user->isSystemUser()) {
|
||||
return;
|
||||
@@ -127,10 +104,6 @@ trait NovaSberPaymentOrderAuth
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($user->isMe() || $user->isSuperAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -143,10 +116,6 @@ trait NovaSberPaymentOrderAuth
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user->isMe() || $user->isSuperAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new AuthorizationException;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,10 @@ return new class extends PulseMigration
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::dropIfExists('pulse_values');
|
||||
Schema::dropIfExists('pulse_entries');
|
||||
Schema::dropIfExists('pulse_aggregates');
|
||||
|
||||
Schema::create('pulse_values', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('timestamp');
|
||||
|
||||
Reference in New Issue
Block a user