@extends('layouts.app', ['pageTitle' => 'Finance Contacts', 'pageSubtitle' => 'Suppliers, customers, employees and other finance parties'])
@section('content')
<div class="card"><h3 class="section-title">Add Contact</h3><form method="POST" action="{{ route('admin.contacts.store') }}" class="form-grid">@csrf
<div class="field"><label>Type</label><select name="type"><option value="supplier">Supplier</option><option value="customer">Customer</option><option value="employee">Employee</option><option value="other">Other</option></select></div><div class="field"><label>Name</label><input name="name" required></div><div class="field"><label>Email</label><input type="email" name="email"></div><div class="field"><label>Phone</label><input name="phone"></div><div class="field"><label>Tax Number</label><input name="tax_number"></div><div class="field"><label>Address</label><input name="address"></div><div><button class="btn" type="submit">Save Contact</button></div></form></div>
<div class="card"><h3 class="section-title">Contacts</h3><div class="table-wrap"><table><thead><tr><th>Type</th><th>Name</th><th>Email</th><th>Phone</th><th>Tax No</th><th>Status</th></tr></thead><tbody>@foreach($contacts as $c)<tr><td><span class="badge blue">{{ $c->type }}</span></td><td>{{ $c->name }}</td><td>{{ $c->email }}</td><td>{{ $c->phone }}</td><td>{{ $c->tax_number }}</td><td>{{ $c->status }}</td></tr>@endforeach</tbody></table></div></div>
@endsection
