You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
topnotch_website/resources/views/partials/customers/show-contacts.blade.php

52 lines
2.2 KiB
PHTML

3 months ago
<div class="tab-pane {{$tab == 'contacts' ? 'active' : ''}}" id="contacts" role="tabpanel"
aria-labelledby="contacts-tab">
<div class="row justify-content-center mb-3">
<div class="col-9">
<div class="d-flex flex-row-reverse gap-2">
{{-- <button class="btn btn-sm btn-danger" title="Remove a contact..."--}}
{{-- data-bs-toggle="modal" data-bs-target="#deleteContactModal">--}}
{{-- <x-bi-trash-fill/>--}}
{{-- Delete contact--}}
{{-- </button>--}}
<div class="mx-auto"></div>
<button class="btn btn-sm btn-primary" title="Create new contact..."
data-bs-toggle="modal" data-bs-target="#createContactModal">
<x-bi-person-plus-fill/>
New contact
</button>
</div>
</div>
</div>
@if(sizeof($contacts) !== 0)
<div class="row justify-content-center">
<div class="col-9">
<table class="table table-hover table-striped">
<thead>
<tr class="border-bottom border-black">
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Phone</th>
<th scope="col">Notes</th>
</tr>
</thead>
<tbody>
@foreach ($contacts as $contact)
<tr>
<td>{{ $contact->first_name . ' ' . $contact->last_name }}</td>
<td><a href="mailto:{{$contact->email}}">{{ $contact->email }}</a></td>
<td>{{ $contact->phone }}</td>
<td>{{ $contact->notes }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@else()
No contacts registered for this customer.
@endif()
</div>