feat: Add A-Z filter for clients/suppliers in Telegram bot
- Add A-Z alphabetical filter keyboard for clients and suppliers lists (same pattern as company selection, without emoji) - Increase clients/suppliers list pagination from 10 to 20 items per page - Remove emoji from company A-Z filter button for consistency - Add 6 new callback handlers: clients_alpha_menu, clients_alpha:LETTER, clients_alpha_page:PAGE:LETTER, and supplier equivalents - Dashboard service and models updates - Telegram bot: email handlers, auth, DB operations, internal API improvements - Frontend: dashboard cards updates (CashFlow, Clienti, Furnizori, Treasury) - Frontend: SolduriCompactCard and CollapsibleCard improvements - DashboardView enhancements - start.sh and run-with-restart.sh script updates - IIS web.config and service worker updates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
24
index.html
24
index.html
@@ -8,8 +8,9 @@
|
||||
<!-- BUILD_TIMESTAMP placeholder for cache busting -->
|
||||
<meta name="build-time" content="BUILD_TIMESTAMP" />
|
||||
<!-- PWA Support -->
|
||||
<link rel="manifest" href="/roa2web/manifest.json" />
|
||||
<link rel="manifest" href="%BASE_URL%manifest.json" />
|
||||
<meta name="theme-color" content="#2563eb" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<meta name="apple-mobile-web-app-title" content="ROA2WEB" />
|
||||
@@ -27,8 +28,25 @@
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/roa2web/sw.js')
|
||||
.then(reg => console.log('[PWA] Service Worker registered:', reg.scope))
|
||||
const swBase = document.querySelector('link[rel="manifest"]')
|
||||
?.getAttribute('href')?.replace('manifest.json', '') || '/';
|
||||
navigator.serviceWorker.register(swBase + 'sw.js')
|
||||
.then(reg => {
|
||||
console.log('[PWA] Service Worker registered:', reg.scope);
|
||||
|
||||
// Auto-reload when a new SW takes control (picks up new deploy)
|
||||
navigator.serviceWorker.addEventListener('controllerchange', () => {
|
||||
console.log('[PWA] New Service Worker active - reloading for fresh version');
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
// Check for SW updates each time user returns to the tab (handles PWA on mobile)
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
reg.update();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('[PWA] Service Worker registration failed:', err));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user