Addec crud entries for a company / companies
This commit is contained in:
@@ -1,47 +1,75 @@
|
||||
{{-- Modules/Company/resources/views/companies/_form.blade.php --}}
|
||||
|
||||
@csrf
|
||||
|
||||
<div class="space-y-6">
|
||||
<div class="grid gap-5 md:grid-cols-2">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Name</label>
|
||||
<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-1 w-full rounded-lg border-gray-300"
|
||||
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">{{ $message }}</p> @enderror
|
||||
@error('name')
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Billing email</label>
|
||||
<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) }}"
|
||||
class="mt-1 w-full rounded-lg border-gray-300"
|
||||
required
|
||||
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">{{ $message }}</p> @enderror
|
||||
@error('billing_email')
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Status</label>
|
||||
<select name="status" class="mt-1 w-full rounded-lg border-gray-300" required>
|
||||
<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">{{ $message }}</p> @enderror
|
||||
@error('status')
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<button class="rounded-lg bg-blue-600 px-4 py-2 text-white">
|
||||
Save company
|
||||
</button>
|
||||
|
||||
<a href="{{ route('platform.companies.index') }}" class="text-sm text-gray-600">
|
||||
Cancel
|
||||
</a>
|
||||
<div>
|
||||
<label for="timezone" class="block text-sm font-semibold text-zinc-700 dark:text-zinc-200">Timezone</label>
|
||||
<input
|
||||
id="timezone"
|
||||
name="timezone"
|
||||
value="{{ old('timezone', $company->timezone ?? 'Europe/London') }}"
|
||||
class="mt-2 w-full rounded-xl border-zinc-300 dark:border-zinc-700 dark:bg-zinc-950 dark:text-white"
|
||||
>
|
||||
@error('timezone')
|
||||
<p class="mt-1 text-sm text-red-600 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex flex-wrap items-center gap-3">
|
||||
<button class="rounded-xl bg-zinc-900 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-zinc-700 dark:bg-white dark:text-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>
|
||||
|
||||
Reference in New Issue
Block a user