feat: validate user availability
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
<div class="flex flex-col sm:flex-row items-start sm:items-center gap-4 w-full sm:w-auto">
|
||||
<div class="flex items-center gap-2">
|
||||
|
||||
|
||||
|
||||
|
||||
<button
|
||||
class="px-6 py-2.5 bg-green-600 text-white text-sm font-medium hover:bg-green-700 transition-colors"
|
||||
class="px-6 py-2.5 bg-green-600 text-white text-sm font-medium hover:bg-green-700 transition-colors rounded-lg"
|
||||
onclick="window.location.href='/addresses/upload-csv'"
|
||||
>
|
||||
<i class="fas fa-file-import mr-2"></i>Import Data
|
||||
@@ -39,7 +39,7 @@
|
||||
<option value="100" {{if eq .Pagination.PageSize 100}}selected{{end}}>100</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<button
|
||||
onclick="goToPage({{.Pagination.PreviousPage}})"
|
||||
@@ -67,7 +67,7 @@
|
||||
<!-- Table Container -->
|
||||
<div class="flex-1 p-4 md:p-6 overflow-auto">
|
||||
<div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden">
|
||||
|
||||
|
||||
<!-- Desktop Table -->
|
||||
<div class="hidden lg:block overflow-x-auto">
|
||||
<table class="w-full min-w-full">
|
||||
@@ -141,8 +141,9 @@
|
||||
<button
|
||||
class="px-3 py-1 bg-gray-100 text-gray-500 text-sm rounded-md cursor-not-allowed"
|
||||
disabled
|
||||
hidden
|
||||
>
|
||||
Assigned
|
||||
<i class="fa-solid fa-plus text-orange-400"></i>
|
||||
</button>
|
||||
<form action="/remove_assigned_address" method="POST" class="inline-block">
|
||||
<input type="hidden" name="address_id" value="{{ .AddressID }}" />
|
||||
@@ -151,16 +152,17 @@
|
||||
type="submit"
|
||||
class="text-red-400 hover:text-red-600 p-1"
|
||||
title="Remove assignment"
|
||||
|
||||
>
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
{{ else }}
|
||||
<button
|
||||
class="px-3 py-1 bg-blue-500 text-white text-sm rounded-md hover:bg-blue-600 transition-colors"
|
||||
class="px-3 py-1 bg-blue-100 text-white text-sm rounded-md hover:bg-blue-600 transition-colors"
|
||||
onclick="openAssignModal({{ .AddressID }}, '{{ .Address }}')"
|
||||
>
|
||||
Assign
|
||||
<i class="fa-solid fa-plus text-blue-500"></i>
|
||||
</button>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user