2023-06-12 10:00:01 +00:00
|
|
|
<div>
|
|
|
|
@if ($invitations->count() > 0)
|
|
|
|
<h4 class="pb-2">Pending Invitations</h4>
|
|
|
|
<div class="overflow-x-auto">
|
2023-06-12 19:12:07 +00:00
|
|
|
<table>
|
2023-06-12 10:00:01 +00:00
|
|
|
<thead>
|
2023-08-08 09:51:36 +00:00
|
|
|
<tr>
|
2023-08-11 18:19:42 +00:00
|
|
|
<th>Email</th>
|
|
|
|
<th>Via</th>
|
|
|
|
<th>Role</th>
|
|
|
|
<th>Invitation Link</th>
|
|
|
|
<th>Actions</th>
|
2023-08-08 09:51:36 +00:00
|
|
|
</tr>
|
2023-08-11 18:19:42 +00:00
|
|
|
</thead>
|
|
|
|
<tbody x-data>
|
|
|
|
@foreach ($invitations as $invite)
|
|
|
|
<tr>
|
|
|
|
<td>{{ $invite->email }}</td>
|
|
|
|
<td>{{ $invite->via }}</td>
|
|
|
|
<td>{{ $invite->role }}</td>
|
2023-12-13 13:44:11 +00:00
|
|
|
<td class="flex gap-2" x-data="checkProtocol">
|
|
|
|
<template x-if="isHttps">
|
|
|
|
<x-forms.button x-on:click="copyToClipboard('{{ $invite->link }}')">Copy Invitation
|
|
|
|
Link</x-forms.button>
|
|
|
|
</template>
|
|
|
|
<x-forms.input id="null" type="password" value="{{ $invite->link }}" />
|
2023-08-11 18:19:42 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<x-forms.button wire:click.prevent='deleteInvitation({{ $invite->id }})'>Revoke
|
|
|
|
Invitation
|
|
|
|
</x-forms.button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2023-06-12 10:00:01 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2023-12-13 13:44:11 +00:00
|
|
|
|
|
|
|
@script
|
|
|
|
<script>
|
|
|
|
Alpine.data('checkProtocol', () => {
|
|
|
|
return {
|
|
|
|
isHttps: window.location.protocol === 'https:'
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
@endscript
|