87 lines
3.9 KiB
PHP
87 lines
3.9 KiB
PHP
@csrf
|
|
|
|
<div class="grid gap-6 md:grid-cols-2">
|
|
<div>
|
|
<label for="name" class="block text-sm font-semibold text-zinc-700 dark:text-zinc-200">Company name</label>
|
|
<input
|
|
id="name"
|
|
name="name"
|
|
value="{{ old('name', $company->name) }}"
|
|
class="mt-2 w-full rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white"
|
|
required
|
|
>
|
|
@error('name')
|
|
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="billing_email" class="block text-sm font-semibold text-zinc-700 dark:text-zinc-200">Billing email</label>
|
|
<input
|
|
id="billing_email"
|
|
type="email"
|
|
name="billing_email"
|
|
value="{{ old('billing_email', $company->billing_email) }}"
|
|
placeholder="billing@example.com"
|
|
class="mt-2 w-full rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white"
|
|
>
|
|
@error('billing_email')
|
|
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div>
|
|
<label for="status" class="block text-sm font-semibold text-zinc-700 dark:text-zinc-200">Status</label>
|
|
<select
|
|
id="status"
|
|
name="status"
|
|
class="mt-2 w-full rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white"
|
|
required
|
|
>
|
|
<option value="active" @selected(old('status', $company->status) === 'active')>Active</option>
|
|
<option value="suspended" @selected(old('status', $company->status) === 'suspended')>Suspended</option>
|
|
<option value="inactive" @selected(old('status', $company->status) === 'inactive')>Inactive</option>
|
|
</select>
|
|
@error('status')
|
|
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="wms-form-field wms-select2-field">
|
|
<label for="country_id" class="block text-sm font-semibold text-zinc-700 dark:text-zinc-200">Country</label>
|
|
<div class="mt-2">
|
|
<select
|
|
id="country_id"
|
|
name="country_id"
|
|
data-wms-select2
|
|
data-placeholder="Search and select country"
|
|
class="wms-country-select w-full"
|
|
>
|
|
<option value="">Search and select country</option>
|
|
@foreach ($countries as $country)
|
|
<option value="{{ $country->id }}" @selected((int) old('country_id', $company->country_id ?? $company->address?->country_id) === $country->id)>
|
|
{{ $country->effective_name ?? $country->name }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<p class="mt-2 text-xs font-medium text-zinc-500 dark:text-zinc-400">Start typing to filter the country list.</p>
|
|
@error('country_id')
|
|
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-8 flex flex-wrap items-center gap-3 border-t border-zinc-200 pt-6 dark:border-zinc-800">
|
|
<button class="inline-flex items-center justify-center rounded-xl bg-green-600 px-5 py-2.5 text-sm font-bold text-white shadow-sm shadow-green-600/20 transition hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 dark:bg-green-500 dark:text-white dark:hover:bg-green-400 dark:focus:ring-offset-zinc-900">
|
|
Save company
|
|
</button>
|
|
|
|
<a
|
|
href="{{ $company->exists ? route('platform.companies.show', $company) : route('platform.companies.index') }}"
|
|
class="rounded-xl border border-zinc-300 px-4 py-2 text-sm font-semibold text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-800"
|
|
>
|
|
Cancel
|
|
</a>
|
|
</div>
|