feat: add AgentNodeIndexController for node listing and remove settlement_cycle field from AgentProfile logic
This commit is contained in:
@@ -7,7 +7,6 @@ use App\Models\AgentNode;
|
||||
use App\Models\AgentProfile;
|
||||
use App\Support\AdminAgentScope;
|
||||
use App\Support\AgentOverdueGuard;
|
||||
use App\Support\AgentSettlementCycle;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
@@ -86,9 +85,6 @@ final class AgentProfileService
|
||||
'credit_limit' => $creditLimit,
|
||||
'rebate_limit' => $rebateLimit,
|
||||
'default_player_rebate' => $defaultRebate,
|
||||
'settlement_cycle' => AgentSettlementCycle::normalize(
|
||||
$payload['settlement_cycle'] ?? $profile->settlement_cycle ?? 'weekly',
|
||||
),
|
||||
'can_grant_extra_rebate' => (bool) ($payload['can_grant_extra_rebate'] ?? $profile->can_grant_extra_rebate ?? false),
|
||||
'can_create_child_agent' => (bool) ($payload['can_create_child_agent'] ?? ($isNew ? false : $profile->can_create_child_agent)),
|
||||
'can_create_player' => (bool) ($payload['can_create_player'] ?? ($isNew ? true : $profile->can_create_player ?? true)),
|
||||
@@ -126,7 +122,6 @@ final class AgentProfileService
|
||||
'available_credit' => $available,
|
||||
'rebate_limit' => round((float) $profile->rebate_limit * 100, 4),
|
||||
'default_player_rebate' => round((float) $profile->default_player_rebate * 100, 4),
|
||||
'settlement_cycle' => AgentSettlementCycle::normalize($profile->settlement_cycle),
|
||||
'can_grant_extra_rebate' => (bool) $profile->can_grant_extra_rebate,
|
||||
'can_create_child_agent' => (bool) $profile->can_create_child_agent,
|
||||
'can_create_player' => (bool) $profile->can_create_player,
|
||||
|
||||
Reference in New Issue
Block a user