This commit is contained in:
Andras Bacsai
2023-06-12 12:00:01 +02:00
parent b097842d01
commit a97d22b81b
36 changed files with 364 additions and 202 deletions

View File

@@ -8,8 +8,6 @@
</div>
<div class="pt-2 pb-4 text-sm">SMTP settings for password reset, invitation, etc.</div>
<div class="flex items-end gap-2">
<x-forms.input required id="settings.extra_attributes.smtp_recipients"
helper="Email list to send the all notifications to, separated by comma." label="Recipient(s)" />
<x-forms.input id="settings.extra_attributes.smtp_test_recipients" label="Test Recipient(s)"
helper="Email list to send a test email to, separated by comma." />
<x-forms.button wire:click='test_email'>

View File

@@ -1,5 +1,5 @@
<div class="w-64 -mt-9">
<x-forms.select wire:model="selectedTeamId" class="pr-0 select-xs ">
<x-forms.select wire:model="selectedTeamId">
<option value="default" disabled selected>Switch team</option>
@foreach (auth()->user()->teams as $team)
<option value="{{ $team->id }}">{{ $team->name }}</option>

View File

@@ -0,0 +1,36 @@
<div>
@if ($invitations->count() > 0)
<h4 class="pb-2">Pending Invitations</h4>
<div class="overflow-x-auto">
<table class="table">
<thead>
<tr class="font-bold text-white uppercase border-coolgray-200">
<th>Email</th>
<th>Via</th>
<th>Role</th>
<th>Invitation Link</th>
<th>Actions</th>
</tr>
</thead>
<tbody x-data>
@foreach ($invitations as $invite)
<tr class="border-coolgray-200">
<td>{{ $invite->email }}</td>
<td>{{ $invite->via }}</td>
<td>{{ $invite->role }}</td>
<td x-on:click="copyToClipboard('{{ $invite->link }}')">
<x-forms.button>Copy Invitation Link</x-forms.button>
</td>
<td>
<x-forms.button wire:click.prevent='deleteInvitation({{ $invite->id }})'>Revoke
Invitation</x-forms.button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>

View File

@@ -1,6 +1,13 @@
<div>
<form wire:submit.prevent='inviteByLink' class="flex items-center gap-2">
<x-forms.input id="email" type="email" name="email" placeholder="Email" />
<x-forms.button type="submit">Invite with link</x-forms.button>
<x-forms.select id="role" name="role">
<option value="admin">Admin</option>
<option value="member">Member</option>
</x-forms.select>
<x-forms.button type="submit">Generate Invitation Link</x-forms.button>
@if (is_transactional_emails_active())
<x-forms.button wire:click.prevent='viaEmail'>Send Invitation Email</x-forms.button>
@endif
</form>
</div>

View File

@@ -9,9 +9,9 @@
@if ($member->id !== auth()->user()->id)
@if (data_get($member, 'pivot.role') !== 'owner')
@if (data_get($member, 'pivot.role') !== 'admin')
<x-forms.button wire:click="makeAdmin">Make admin</x-forms.button>
<x-forms.button wire:click="makeAdmin">Convert to Admin</x-forms.button>
@else
<x-forms.button wire:click="makeReadonly">Make readonly</x-forms.button>
<x-forms.button wire:click="makeReadonly">Convert to Member</x-forms.button>
@endif
<x-forms.button wire:click="remove">Remove</x-forms.button>
@else