lasthourcloud/resources/views/livewire/team/delete.blade.php

54 lines
2.3 KiB
PHP
Raw Normal View History

2023-07-28 11:31:47 +00:00
<div>
<x-modal yesOrNo modalId="deleteTeam" modalTitle="Delete Team">
<x-slot:modalBody>
<p>This team be deleted. It is not reversible. <br>Please think again.</p>
</x-slot:modalBody>
</x-modal>
2023-08-09 14:47:24 +00:00
<h2>Danger Zone</h2>
2023-06-16 13:56:25 +00:00
<div class="pb-4">Woah. I hope you know what are you doing.</div>
<h4 class="pb-4">Delete Team</h4>
@if (session('currentTeam.id') === 0)
<div>This is the default team. You can't delete it.</div>
@elseif(auth()->user()->teams()->get()->count() === 1)
<div>You can't delete your last team.</div>
2023-08-22 15:44:49 +00:00
@elseif(currentTeam()->subscription &&
currentTeam()->subscription?->lemon_status !== 'cancelled')
2023-08-30 16:23:55 +00:00
<div>Please cancel your subscription before delete this team (Manage My Subscription).</div>
2023-06-16 13:56:25 +00:00
@else
2023-08-22 15:44:49 +00:00
@if (currentTeam()->isEmpty())
2023-06-16 13:56:25 +00:00
<div class="pb-4">This will delete your team. Beware! There is no coming back!</div>
2023-07-28 11:31:47 +00:00
<x-forms.button isError isModal modalId="deleteTeam">
2023-06-16 13:56:25 +00:00
Delete
</x-forms.button>
@else
<div>
<div class="pb-4">You need to delete the following resources to be able to delete the team:</div>
<h4 class="pb-4">Projects:</h4>
<ul class="pl-8 list-disc">
2023-08-22 15:44:49 +00:00
@foreach (currentTeam()->projects as $resource)
2023-06-16 13:56:25 +00:00
<li>{{ $resource->name }}</li>
@endforeach
</ul>
<h4 class="py-4">Servers:</h4>
<ul class="pl-8 list-disc">
2023-08-22 15:44:49 +00:00
@foreach (currentTeam()->servers as $resource)
2023-06-16 13:56:25 +00:00
<li>{{ $resource->name }}</li>
@endforeach
</ul>
<h4 class="py-4">Private Keys:</h4>
<ul class="pl-8 list-disc">
2023-08-22 15:44:49 +00:00
@foreach (currentTeam()->privateKeys as $resource)
2023-06-16 13:56:25 +00:00
<li>{{ $resource->name }}</li>
@endforeach
</ul>
<h4 class="py-4">Sources:</h4>
<ul class="pl-8 list-disc">
2023-08-22 15:44:49 +00:00
@foreach (currentTeam()->sources() as $resource)
2023-06-16 13:56:25 +00:00
<li>{{ $resource->name }}</li>
@endforeach
</ul>
2023-08-11 15:31:53 +00:00
@endif
@endif
2023-06-16 13:56:25 +00:00
2023-08-11 15:31:53 +00:00
</div>