wip settings tab

This commit is contained in:
guillaume91 2024-05-23 17:06:52 +02:00
parent b57e86ed0a
commit d5cb702ec5
13 changed files with 11 additions and 759 deletions

View file

@ -1,58 +0,0 @@
<div>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">Downloads</h1>
<p class="mt-2 text-sm text-gray-700">
</p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
<x-button
class="block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Create Download
</x-button>
</div>
</div>
<div class="mt-8 flow-root">
<div class="overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="animate-pulse">
<div class="inline-block min-w-full py-2 align-middle">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Name
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
File
</th>
<th scope="col"
class="px-3 py-3.5 text-right text-sm font-semibold text-gray-900 sm:pr-8 lg:pr-8">
Status
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
@foreach (range(0, 5) as $i)
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>

View file

@ -1,74 +0,0 @@
<div
{{-- @if($project->hasPendingDownload())--}}
{{-- wire:poll.1s=""--}}
{{-- @endif--}}
>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">Downloads</h1>
<p class="mt-2 text-sm text-gray-700">
@if ($project->hasPendingDownload())
Pending downloads for this project: {{ $project->downloads()->statusPending()->count() }}
@endif
</p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
<x-button wire:click="openDownloadModal"
class="rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
{{ __('Create Download') }}
</x-button>
</div>
</div>
<div class="mt-8 flow-root">
<div class="relative">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Name
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
File
</th>
<th scope="col"
class="px-3 py-3.5 text-right pr-4 sm:pr-8 lg:pr-8 text-sm font-semibold text-gray-900">
Status
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
@foreach($downloads as $download)
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{{ $download->name }}</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
{{ $download->path }}
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8">
<x-badge :status="$download->status"></x-badge>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="pt-4 flex justify-between items-center">
<div class="text-gray-700 text-sm">
Results: {{ \Illuminate\Support\Number::format($downloads->total()) }}
</div>
{{ $downloads->links('livewire.pagination') }}
</div>
</div>
{{-- <div wire:loading class="absolute inset-0 bg-white opacity-75"></div>--}}
</div>
</div>
</div>
<x-download-create-modal :manager="$this"/>
</div>

View file

@ -1,68 +0,0 @@
<div>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">{{ __('Mailing') }}</h1>
<p class="mt-2 text-sm text-gray-700"></p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
</div>
</div>
<div class="mt-8 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle mb-10">
<div class="relative">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Id
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">@lang('Subject')</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">@lang('Status')</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">#</th>
<th scope="col"
class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">@lang('Attachment')
</th>
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-0">
<span class="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white text-gray-700">
@foreach (range(0, 5) as $i)
<tr>
<td class="whitespace-nowrap p-3 text-sm">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap p-3 text-sm">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap p-3 text-sm">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap p-3 text-sm">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap p-3 text-sm">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,133 +0,0 @@
<div>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">{{ __('Mailing') }}</h1>
<p class="mt-2 text-sm text-gray-700"></p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
</div>
</div>
<div class="mt-8 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle mb-10">
<div class="relative">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Id
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">@lang('Subject')</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">@lang('Status')</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">#</th>
<th scope="col"
class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">@lang('Attachment')
</th>
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-0">
<span class="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
@foreach($mailings as $mail)
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{{ $mail->id }}</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{ $mail->subject }}</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<x-badge :status="$mail->status"></x-badge>
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{ $mail->recipients()->count() }}</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{ $mail->attachments()->pluck('name')->join( ', ') }}</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0">
<button type="button" wire:click="showMailingDetailsModal({{ $mail->id }})"
class="text-indigo-600 hover:text-indigo-900">Show
</button>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="absolute inset-0 bg-white opacity-75" wire:loading></div>
</div>
</div>
<div class="pt-4 flex justify-between items-center">
<div class="text-gray-700 text-sm">
Results: {{ \Illuminate\Support\Number::format($mailings->total()) }}
</div>
{{ $mailings->links('livewire.pagination') }}
</div>
<x-modal wire:model.live="mailingDetailsModal">
<x-form-modal submit="saveProject">
<x-slot name="title">
{{ __('Mailing') }}
</x-slot>
<x-slot name="description">
<x-label for="created_at" value="{{ __('Created') }}"/>
<x-label id="created_at"
value="{{ \Carbon\Carbon::parse($formData['created_at'])->format('Y-m-d H:i') }}"/>
</x-slot>
<x-slot name="form">
<div class="col-span-6">
<x-label for="recipients" value="{{ __('Recipients') }}"/>
@foreach($formData['recipients'] as $key => $recipient)
<div class="col-span-6 sm:col-span-4">
<x-label class="inline-block" for="recipients"
value="{{ $recipient['name'] }}"/>
<x-label class="inline-block" for="recipients"
value="<{{ $recipient['email'] }}>"/>
</div>
@endforeach
</div>
<div class="col-span-6">
<x-label for="subject" value="{{ __('Subject') }}"/>
<x-input id="subject" type="text" class="mt-1 block w-full" disabled
wire:model="formData.subject"/>
</div>
<div class="col-span-6">
<x-label for="message" value="{{ __('Message') }}"/>
<textarea
id="message"
type="text"
class="mt-1 block w-full"
wire:model="formData.message"
disabled
></textarea>
</div>
@empty($formData['attachments'])
<div class="col-span-6">
<x-label for="message" value="{{ __('Attachment') }}"/>
<x-label class="inline-block" for=""
value="{{ __('No attachments where send with this message.') }}"/>
</div>
@else
@foreach($formData['attachments'] as $key => $attachment)
<div class="col-span-6">
<x-label class="inline-block" for="recipients"
value="{{ $attachment['name'] }}"/>
</div>
@endforeach
@endempty
</x-slot>
<x-slot name="actions">
<x-secondary-button class="mr-3"
type="button"
wire:click="closeMailingDetailsModal"
>
{{ __('Close') }}
</x-secondary-button>
</x-slot>
</x-form-modal>
</x-modal>
</div>

View file

@ -1,6 +1,7 @@
<div class="flex flex-col w-fit bg-white gap-2 p-6 rounded-lg shadow"> <div class="flex flex-col w-fit bg-white p-6 rounded-lg shadow divide-y divide-solid">
<a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white px-4 py-2 rounded-lg {{!($activeTab == 'downloads') ?: 'bg-indigo-600 text-white'}}" href="{{route('project.show',[$projectName,'downloads'])}}">Downloads</a> <a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white hover:rounded-lg hover:border-0 px-4 py-4 {{!($activeTab == 'downloads') ?: 'rounded-lg bg-indigo-600 text-white border-0'}}" href="{{route('project.show',[$projectName,'downloads'])}}">Downloads</a>
<a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white px-4 py-2 rounded-lg {{!($activeTab == 'mosaics') ?: 'bg-indigo-600 text-white'}}" href="{{route('project.show',[$projectName,'mosaics'])}}">Mosaics</a> <a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white hover:rounded-lg hover:border-0 px-4 py-4 {{!($activeTab == 'mosaics') ?: 'rounded-lg bg-indigo-600 text-white border-0'}}" href="{{route('project.show',[$projectName,'mosaics'])}}">Mosaics</a>
<a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white px-4 py-2 rounded-lg {{!($activeTab == 'reports') ?: 'bg-indigo-600 text-white'}}" href="{{route('project.show',[$projectName,'reports'])}}">Reports</a> <a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white hover:rounded-lg hover:border-0 px-4 py-4 {{!($activeTab == 'reports') ?: 'rounded-lg bg-indigo-600 text-white border-0'}}" href="{{route('project.show',[$projectName,'reports'])}}">Reports</a>
<a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white px-4 py-2 rounded-lg {{!($activeTab == 'mailings') ?: 'bg-indigo-600 text-white' }}" href="{{route('project.show',[$projectName,'mailings'])}}">Mailings</a> <a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white hover:rounded-lg hover:border-0 px-4 py-4 {{!($activeTab == 'mailings') ?: 'rounded-lg bg-indigo-600 text-white border-0'}}" href="{{route('project.show',[$projectName,'mailings'])}}">Mailings</a>
<a class="text-center uppercase tracking-widest font-semibold text-sm hover:bg-indigo-500 hover:text-white hover:rounded-lg hover:border-0 px-4 py-4 {{!($activeTab == 'settings') ?: 'rounded-lg bg-indigo-600 text-white border-0'}}" href="{{route('project.show',[$projectName,'settings'])}}">Settings</a>
</div> </div>

View file

@ -1,58 +0,0 @@
<div>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">Mosaics</h1>
<p class="mt-2 text-sm text-gray-700">
</p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
<x-button
class="block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Create Mosaic
</x-button>
</div>
</div>
<div class="mt-8 flow-root">
<div class="overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="animate-pulse">
<div class="inline-block min-w-full py-2 align-middle">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Name
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
Year-Week
</th>
<th scope="col"
class="px-3 py-3.5 text-right text-sm font-semibold text-gray-900 sm:pr-8 lg:pr-8">
Status
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
@foreach (range(0, 5) as $i)
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>

View file

@ -1,72 +0,0 @@
<div
@if($project->hasPendingMosaic())
wire:poll.1s=""
@endif
>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">Mosaics</h1>
<p class="mt-2 text-sm text-gray-700">
@if ($project->hasPendingDownload())
Pending mosaics for this project: {{ $project->mosaics()->statusPending()->count() }}
@endif
</p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
<x-button wire:click="openCreateMosiacsModal"
class="block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Create Mosaic
</x-button>
</div>
</div>
<div class="mt-8 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="relative">
<div class="inline-block min-w-full py-2 align-middle">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Name
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
Year-Week
</th>
<th scope="col"
class="px-3 py-3.5 text-right text-sm font-semibold text-gray-900 sm:pr-8 lg:pr-8">
Status
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
@foreach($mosaics as $mosaic)
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{{ $mosaic->name }}</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
{{ $mosaic->year }}-{{ $mosaic->week}}
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8">
<x-badge :status="$mosaic->status"></x-badge>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="pt-4 flex justify-between items-center">
<div class="text-gray-700 text-sm">
Results: {{ \Illuminate\Support\Number::format($mosaics->total()) }}
</div>
{{ $mosaics->links('livewire.pagination') }}
</div>
<div class="absolute inset-0 bg-white opacity-75" wire:loading></div>
</div>
</div>
</div>
</div>
<x-mosaic-create-modal :manager="$this"/>
</div>

View file

@ -1,63 +0,0 @@
<div>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">Reports</h1>
<p class="mt-2 text-sm text-gray-700">
</p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
<x-button
class="block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Create Report
</x-button>
</div>
</div>
<div class="mt-8 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="animate-pulse">
<div class="inline-block min-w-full py-2 align-middle">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
Created At
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Name
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
Status
</th>
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6 lg:pr-8">
<span class="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
@foreach (range(0, 5) as $i)
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8">
<div class="w-full bg-gray-200 rounded-lg">&nbsp;</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>

View file

@ -1,58 +0,0 @@
<div>
<div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full">
<h1 class="text-base font-semibold leading-6 text-gray-900">Reports</h1>
<p class="mt-2 text-sm text-gray-700"></p>
</div>
<div class="mt-4 sm:mt-0 sm:flex sm:justify-between w-full">
<x-search></x-search>
<x-button wire:click="openCreateReportModal"
class="block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
Create Report
</x-button>
</div>
</div>
<div class="mt-8 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="relative">
<div class="inline-block min-w-full py-2 align-middle mb-10">
<table class="min-w-full divide-y divide-gray-300">
<thead>
<tr>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
Created At
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg:pl-8">
Name
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
Status
</th>
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6 lg:pr-8">
<span class="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
@foreach($reports as $report)
<livewire:projects.report-row :$report :key="$report->id"/>
@endforeach
</tbody>
</table>
</div>
<div class="pt-4 flex justify-between items-center">
<div class="text-gray-700 text-sm">
Results: {{ \Illuminate\Support\Number::format($reports->total()) }}
</div>
{{ $reports->links('livewire.pagination') }}
</div>
<div class="absolute inset-0 bg-white opacity-75" wire:loading></div>
</div>
</div>
</div>
</div>
<x-report-manager-properties-modal :reportManager="$this"/>
</div>

View file

@ -1,168 +0,0 @@
<tr>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
{{ $report->created_at->diffForHumans() }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8">{{ $report->name }}</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
@if($report->status == \App\Enums\Status::Pending)
<x-badge status="pending" wire:poll.1s=""></x-badge>
@else
<x-badge :status="$report->status"></x-badge>
@endif
</td>
<td class="py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 lg:pr-8 flex justify-end">
<x-menu>
<x-menu.button>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"/>
</svg>
</x-menu.button>
<x-menu.items>
<x-menu.close>
<x-menu.item wire:click="download">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round"
d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0-3-3m3 3 3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"/>
</svg>
Download
</x-menu.item>
</x-menu.close>
<x-dialog>
<x-dialog.open>
<x-menu.close>
<x-menu.item>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor" class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round"
d="M9 3.75H6.912a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H15M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859M12 3v8.25m0 0-3-3m3 3 3-3"/>
</svg>
Create Mail
</x-menu.item>
</x-menu.close>
</x-dialog.open>
<x-dialog.panel wire:model="createMailingModal">
<form wire:submit="createMailing" class="flex flex-col gap-4">
<h2 class="text-3xl font-bold mb-1">@lang('Create report email')</h2>
<hr class="w-[75%]">
<label class="flex flex-col gap-2">
@lang('Recipients')
@foreach($mailingForm->recipients as $recipient)
<span
class="inline-flex items-center gap-x-1.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round"
d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"/>
</svg>
[{{ $recipient['name'] }}] {{ $recipient['email'] }}
</span>
@endforeach
</label>
<label class="flex flex-col gap-2">
@lang('Subject')
<input autofocus wire:model="mailingForm.subject"
class="px-3 py-2 border font-normal rounded-lg border-slate-300 read-only:opacity-50 read-only:cursor-not-allowed">
@error('mailingForm.subject')
<div class="text-sm text-red-500 font-normal">{{ $message }}</div>@enderror
</label>
<label class="flex flex-col gap-2">
@lang('Content')
<textarea wire:model="mailingForm.message" rows="5"
class="px-3 py-2 border font-normal rounded-lg border-slate-300 read-only:opacity-50 read-only:cursor-not-allowed"></textarea>
@error('mailingForm.message')
<div class="text-sm text-red-500 font-normal">{{ $message }}</div>@enderror
</label>
<label class="flex flex-col gap-2">
@lang('Report')
<span
class="inline-flex items-center gap-x-1.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round"
d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"/>
</svg>
{{ $report->name }}
</span>
</label>
<x-dialog.footer>
<x-dialog.close>
<button type="button"
class="text-center rounded-xl bg-slate-300 text-slate-800 px-6 py-2 font-semibold">
Cancel
</button>
</x-dialog.close>
<x-dialog.close>
<button type="submit"
class="text-center rounded-xl bg-blue-500 text-white px-6 py-2 font-semibold disabled:cursor-not-allowed disabled:opacity-50">
Save
</button>
</x-dialog.close>
</x-dialog.footer>
</form>
</x-dialog.panel>
</x-dialog>
<x-dialog>
<x-dialog.open>
<x-menu.item>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
class="w-4 h-4">
<path fill-rule="evenodd"
d="M8.75 1A2.75 2.75 0 006 3.75v.443c-.795.077-1.584.176-2.365.298a.75.75 0 10.23 1.482l.149-.022.841 10.518A2.75 2.75 0 007.596 19h4.807a2.75 2.75 0 002.742-2.53l.841-10.52.149.023a.75.75 0 00.23-1.482A41.03 41.03 0 0014 4.193V3.75A2.75 2.75 0 0011.25 1h-2.5zM10 4c.84 0 1.673.025 2.5.075V3.75c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.325C8.327 4.025 9.16 4 10 4zM8.58 7.72a.75.75 0 00-1.5.06l.3 7.5a.75.75 0 101.5-.06l-.3-7.5zm4.34.06a.75.75 0 10-1.5-.06l-.3 7.5a.75.75 0 101.5.06l.3-7.5z"
clip-rule="evenodd"/>
</svg>
Delete
</x-menu.item>
</x-dialog.open>
<x-dialog.panel>
<div class="flex flex-col gap-6">
<h2 class="font-semibold text-3xl">Are you sure you?</h2>
<h2 class="text-lg text-slate-700">This operation is permanent and can not be reversed.</h2>
<x-dialog.footer>
<x-dialog.close>
<button type="button"
class="text-center rounded-xl bg-slate-300 text-slate-800 px-6 py-2 font-semibold">
Cancel
</button>
</x-dialog.close>
<x-dialog.close>
<button wire:click="$parent.deleteReport('{{ $report->id }}')" type="button"
class="text-center rounded-xl bg-red-500 text-white px-6 py-2 font-semibold disabled:cursor-not-allowed disabled:opacity-50">
Delete
</button>
</x-dialog.close>
</x-dialog.footer>
</div>
</x-dialog.panel>
</x-dialog>
</x-menu.items>
</x-menu>
</td>
</tr>

View file

@ -1,7 +1,7 @@
<div> <div>
<div class="px-4 sm:px-6 lg:px-8"> <div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center"> <div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full"> <div class="w-full flex justify-between my-4">
<h1 class="text-base font-semibold leading-6 text-gray-900">{{ __('Mailing') }}</h1> <h1 class="text-base font-semibold leading-6 text-gray-900">{{ __('Mailing') }}</h1>
<p class="mt-2 text-sm text-gray-700"></p> <p class="mt-2 text-sm text-gray-700"></p>
</div> </div>

View file

@ -1,7 +1,7 @@
<div> <div>
<div class="px-4 sm:px-6 lg:px-8"> <div class="px-4 sm:px-6 lg:px-8">
<div class="sm:flex sm:flex-col sm:items-center"> <div class="sm:flex sm:flex-col sm:items-center">
<div class="w-full"> <div class="w-full flex justify-between my-4">
<h1 class="text-base font-semibold leading-6 text-gray-900">Reports</h1> <h1 class="text-base font-semibold leading-6 text-gray-900">Reports</h1>
<p class="mt-2 text-sm text-gray-700"></p> <p class="mt-2 text-sm text-gray-700"></p>
</div> </div>

View file

@ -20,6 +20,9 @@
@case('mailings') @case('mailings')
<livewire:projects.tabs.mailings :project="$project"></livewire:projects.tabs.mailings> <livewire:projects.tabs.mailings :project="$project"></livewire:projects.tabs.mailings>
@break @break
@case('settings')
<livewire:projects.tabs.settings :project="$project"></livewire:projects.tabs.settings>
@break
@default @default
<div class="flex w-full h-screen justify-center items-center"> Menu Component not found.</div> <div class="flex w-full h-screen justify-center items-center"> Menu Component not found.</div>
@endswitch @endswitch