108 lines
5.3 KiB
PHP
108 lines
5.3 KiB
PHP
<div>
|
|
<x-tab-section>
|
|
<x-slot name="title">Mailing Details</x-slot>
|
|
<x-slot name="description">...</x-slot>
|
|
|
|
<x-slot name="form">
|
|
<div class="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
|
<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-0">
|
|
Id
|
|
</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Created</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Subject</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">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($project->mailings as $mail)
|
|
<tr>
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-0">{{ $mail->id }}</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{ $mail->created_at }} </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">{{ $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>
|
|
|
|
</x-slot>
|
|
|
|
|
|
</x-tab-section>
|
|
<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>
|
|
|