Danger Zone
Woah. I hope you know what are you doing.
Delete Team
@if (session('currentTeam.id') === 0)
This is the default team. You can't delete it.
@elseif(auth()->user()->teams()->get()->count() === 1 || auth()->user()->currentTeam()->personal_team)
You can't delete your last / personal team.
@elseif(currentTeam()->subscription && currentTeam()->subscription?->lemon_status !== 'cancelled')
Please cancel your subscription
here before delete this team.
@else
@if (currentTeam()->isEmpty())
This will delete your team. Beware! There is no coming back!
This team be deleted. It is not reversible.
Please think again.
@else
You need to delete the following resources to be able to delete the team:
@if (currentTeam()->projects()->count() > 0)
Projects:
@foreach (currentTeam()->projects as $resource)
- {{ $resource->name }}
@endforeach
@endif
@if (currentTeam()->servers()->count() > 0)
Servers:
@foreach (currentTeam()->servers as $resource)
- {{ $resource->name }}
@endforeach
@endif
@if (currentTeam()->privateKeys()->count() > 0)
Private Keys:
@foreach (currentTeam()->privateKeys as $resource)
- {{ $resource->name }}
@endforeach
@endif
@if (currentTeam()->sources()->count() > 0)
Sources:
@foreach (currentTeam()->sources() as $resource)
- {{ $resource->name }}
@endforeach
@endif
@endif
@endif