interim fix for drop downs, BROKEN FIX, interinm fix

This commit is contained in:
Mark Gregory
2026-07-07 12:38:13 +01:00
parent a12372963a
commit 12c1470319
10 changed files with 251 additions and 83 deletions
+13 -50
View File
@@ -86,11 +86,11 @@
name="country_id"
data-wms-select2
data-placeholder="Search and select country"
class="mt-2 w-full"
class="w-full"
>
<option value="">Search and select country</option>
@foreach ($countries as $country)
<option value="{{ $country->id }}" @selected((int) old('country_id') === $country->id)>
<option value=""></option>
@foreach($countries as $country)
<option value="{{ $country->id }}" @selected(old('country_id') == $country->id)>
{{ $country->display_name ?: $country->common_name ?: $country->name }}
</option>
@endforeach
@@ -127,23 +127,10 @@
<td class="p-4 font-semibold text-zinc-900 dark:text-white">
{{ $company->name }}
</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">
{{ $company->users_count }}
</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">
{{ $company->divisions_count }}
</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">
{{ $company->warehouses_count }}
</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">
{{ $company->license_keys_count }}
</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">{{ $company->users_count }}</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">{{ $company->divisions_count ?? 0 }}</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">{{ $company->warehouses_count }}</td>
<td class="p-4 text-zinc-700 dark:text-zinc-300">{{ $company->license_keys_count }}</td>
<td class="p-4">
<span class="inline-flex rounded-full px-2.5 py-1 text-xs font-semibold
@if ($company->is_system_company)
@@ -157,38 +144,16 @@
{{ $company->is_system_company ? 'System' : ucfirst($company->status) }}
</span>
</td>
<td class="p-4">
<div class="flex justify-end gap-2">
<a
href="{{ route('platform.companies.show', $company) }}"
class="rounded-lg border border-zinc-300 px-3 py-1.5 text-xs font-semibold text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-800"
>
View
</a>
<a
href="{{ route('platform.companies.edit', $company) }}"
class="rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-blue-700"
>
Edit
</a>
<a href="{{ route('platform.companies.show', $company) }}" class="rounded-lg border border-zinc-300 px-3 py-1.5 text-xs font-semibold text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-800">View</a>
<a href="{{ route('platform.companies.edit', $company) }}" class="rounded-lg bg-blue-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-blue-700">Edit</a>
@unless ($company->is_system_company)
<form
method="POST"
action="{{ route('platform.companies.destroy', $company) }}"
onsubmit="return confirm('Delete this company? This cannot be undone.');"
>
<form method="POST" action="{{ route('platform.companies.destroy', $company) }}" onsubmit="return confirm('Delete this company? This cannot be undone.');">
@csrf
@method('DELETE')
<button
type="submit"
class="rounded-lg bg-red-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-red-700"
>
Delete
</button>
<button type="submit" class="rounded-lg bg-red-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-red-700">Delete</button>
</form>
@endunless
</div>
@@ -196,9 +161,7 @@
</tr>
@empty
<tr>
<td colspan="7" class="p-8 text-center text-zinc-500 dark:text-zinc-400">
No companies found.
</td>
<td colspan="7" class="p-8 text-center text-zinc-500 dark:text-zinc-400">No companies found.</td>
</tr>
@endforelse
</tbody>