Add files via upload

This commit is contained in:
Tomáš Dvořák
2025-05-23 09:30:12 +02:00
committed by GitHub
parent a364ce33a0
commit 6850de022b
+39 -11
View File
@@ -55,17 +55,22 @@
</div> </div>
</div> </div>
<!-- Filter Buttons --> <!-- Switcher -->
<div class="mb-6 flex flex-wrap gap-2"> <div class="flex items-center justify-center mb-8">
<button onclick="filterByTable('all')" class="filter-btn active" data-filter="all"> <div class="inline-flex rounded-md shadow-sm" role="group">
Všechny kontakty <button
</button> id="showMainContacts"
<button onclick="filterByTable(1)" class="filter-btn" data-filter="1"> class="px-4 py-2 text-sm font-medium rounded-l-lg border border-gray-200 bg-blue-600 text-white focus:z-10 focus:ring-2 focus:ring-blue-500"
Tabulka 1 onclick="showContacts('main')">
</button> Hlavní kontakty
<button onclick="filterByTable(2)" class="filter-btn" data-filter="2"> </button>
Tabulka 2 <button
</button> id="showInternalContacts"
class="px-4 py-2 text-sm font-medium rounded-r-md border border-gray-200 bg-gray-100 text-gray-700 hover:bg-gray-200 focus:z-10 focus:ring-2 focus:ring-blue-500"
onclick="showContacts('internal')">
Interní kontakty
</button>
</div>
</div> </div>
<!-- Loading State --> <!-- Loading State -->
@@ -296,6 +301,29 @@
</div>`; </div>`;
} }
function showContacts(type) {
const mainDiv = document.getElementById('contacts');
const internalDiv = document.getElementById('internal-contacts');
const mainBtn = document.getElementById('showMainContacts');
const internalBtn = document.getElementById('showInternalContacts');
if (type === 'main') {
mainDiv.classList.remove('hidden');
internalDiv.classList.add('hidden');
mainBtn.classList.add('bg-blue-600', 'text-white');
mainBtn.classList.remove('bg-gray-100', 'text-gray-700');
internalBtn.classList.remove('bg-blue-600', 'text-white');
internalBtn.classList.add('bg-gray-100', 'text-gray-700');
} else {
mainDiv.classList.add('hidden');
internalDiv.classList.remove('hidden');
mainBtn.classList.remove('bg-blue-600', 'text-white');
mainBtn.classList.add('bg-gray-100', 'text-gray-700');
internalBtn.classList.add('bg-blue-600', 'text-white');
internalBtn.classList.remove('bg-gray-100', 'text-gray-700');
}
}
async function reloadContacts() { async function reloadContacts() {
const btn = document.getElementById('reloadBtn'); const btn = document.getElementById('reloadBtn');
const originalText = btn.innerHTML; const originalText = btn.innerHTML;