coolify/resources/views/livewire/team/invitations.blade.php

72 lines
3.9 KiB
PHP
Raw Normal View History

2023-06-12 12:00:01 +02:00
<div>
@if ($invitations->count() > 0)
<h2 class="pb-2">Pending Invitations</h2>
<div class="flex flex-col">
<div class="flex flex-col">
<div class="overflow-x-auto">
<div class="inline-block min-w-full">
<div class="overflow-hidden">
2024-03-28 12:30:06 +01:00
<table class="min-w-full">
<thead>
2024-03-21 12:44:32 +01:00
<tr>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Email
</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">
Via</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Role</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Invitation Link
</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Actions
</th>
</tr>
</thead>
2024-03-28 12:30:06 +01:00
<tbody>
@foreach ($invitations as $invite)
2024-03-28 12:30:06 +01:00
<tr>
<td class="px-5 py-4 text-sm whitespace-nowrap">{{ $invite->email }}</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">{{ $invite->via }}</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">{{ $invite->role }}</td>
<td class="px-5 py-4 text-sm whitespace-nowrap" x-data="checkProtocol">
<template x-if="isHttps">
<div class="flex gap-2">
<x-forms.input id="null" type="password"
value="{{ $invite->link }}" />
<x-forms.button
x-on:click="copyToClipboard('{{ $invite->link }}')">Copy
Invitation
Link</x-forms.button>
</div>
</template>
<template x-if="!isHttps">
<x-forms.input id="null" type="password"
value="{{ $invite->link }}" />
</template>
</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">
<x-forms.button
wire:click.prevent='deleteInvitation({{ $invite->id }})'>Revoke
Invitation
</x-forms.button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
2023-06-12 12:00:01 +02:00
</div>
@endif
</div>
2023-12-13 14:44:11 +01:00
@script
<script>
Alpine.data('checkProtocol', () => {
return {
isHttps: window.location.protocol === 'https:'
}
})
</script>
@endscript