updated layout and volunteer

change the ui and now able to remove assigned addresses from volunteer
This commit is contained in:
Mann Patel
2025-08-28 00:15:10 -06:00
parent d7f6c794b4
commit 9dd24e71e7
20 changed files with 302 additions and 536 deletions

View File

@@ -24,21 +24,26 @@
</h3>
<p class="text-gray-600">{{ .User.Email }}</p>
<div class="flex items-center mt-2 space-x-4">
<span class="text-gray-600">User Role:</span>
<span
class="inline-flex items-center px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 border border-blue-200"
>
<i class="fas fa-user-check mr-1"></i>
Active User
</span>
<span class="text-gray-600">Signup Code:</span>
<span class="font-mono text-gray-900">{{ .User.AdminCode }}</span>
<span class="text-gray-600">User ID:</span>
<span class="font-mono text-gray-900">{{ .User.UserID }}</span>
<span class="text-gray-600">Role:</span>
<span class="text-gray-900">
{{ if eq .User.RoleID 1 }}Admin {{ else if eq .User.RoleID 2
}}Team Leader {{ else }}Volunteer {{ end }}
</span>
<span class="text-gray-600">User ID:</span>
<span
class="inline-flex items-center px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 border border-blue-200"
>
<i class="fas fa-user-check mr-1"></i>
{{ .User.UserID }}</span
>
{{if eq .User.RoleID 1}}
<span class="text-gray-600">Signup Code:</span>
<span class="font-mono text-gray-900">{{.User.AdminCode }} </span>
{{end}}
</div>
</div>
</div>
@@ -152,99 +157,6 @@
</div>
</form>
</div>
<!-- Configuration Settings Section -->
<div class="border-t border-gray-200 pt-8 mt-8">
<h3 class="text-lg font-semibold text-gray-900 mb-6 flex items-center">
<i class="fas fa-cog text-blue-600 mr-3"></i>
Configuration Settings
</h3>
<form method="post" action="/profile/settings" id="settingsForm">
<div class="space-y-6">
<!-- Add New Setting -->
<div class="bg-white border border-gray-200 p-6">
<h4 class="text-md font-semibold text-gray-800 mb-4">
Add New Setting
</h4>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4">
<div>
<label class="block text-sm font-semibold text-gray-700 mb-2">
Setting Name
</label>
<input
type="text"
id="newSettingName"
class="w-full px-4 py-3 border border-gray-300 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 bg-white"
placeholder="Enter setting name"
/>
</div>
<div>
<label class="block text-sm font-semibold text-gray-700 mb-2">
Setting Value
</label>
<input
type="text"
id="newSettingValue"
class="w-full px-4 py-3 border border-gray-300 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 bg-white"
placeholder="Enter setting value"
/>
</div>
<div class="flex items-end">
<button
type="button"
onclick="addSetting()"
class="w-full px-6 py-3 bg-green-600 text-white hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 font-medium"
>
<i class="fas fa-plus mr-2"></i>
Add Setting
</button>
</div>
</div>
</div>
<!-- Current Settings -->
<div class="bg-white border border-gray-200 p-6">
<h4 class="text-md font-semibold text-gray-800 mb-4">
Current Settings
</h4>
<div id="settingsList" class="space-y-3">
<!-- Settings will be dynamically added here -->
<div class="text-gray-500 text-sm" id="noSettingsMessage">
No settings configured yet. Add your first setting above.
</div>
</div>
</div>
</div>
<!-- Settings Form Actions -->
<div
class="mt-8 pt-6 border-t border-gray-200 flex justify-between items-center"
>
<div class="flex items-center text-sm text-gray-500">
<i class="fas fa-info-circle text-blue-500 mr-2"></i>
Settings are applied immediately when added or removed
</div>
<div class="flex space-x-3">
<button
type="button"
onclick="clearAllSettings()"
class="px-6 py-2 border border-red-300 text-red-700 bg-white hover:bg-red-50 focus:outline-none focus:ring-2 focus:ring-red-500 font-medium"
>
<i class="fas fa-trash mr-2"></i>
Clear All
</button>
<button
type="submit"
class="px-6 py-2 bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 font-medium"
>
<i class="fas fa-save mr-2"></i>
Save Settings
</button>
</div>
</div>
</form>
</div>
</div>
</div>