feat: pharmacy hours status and open now filter
Run Tests on Branches / Detect Changes (push) Successful in 17s
Run Tests on Branches / Backend Tests (push) Successful in 2m44s
Run Tests on Branches / Frontend Tests (push) Successful in 1m59s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Run Tests on Branches / Parapharmacy API Tests (push) Has been skipped
Run Tests on Branches / PIP Platform Tests (push) Has been skipped

- Add is_open_now and is_always_open helpers in backend
- Add backend endpoint enrichment with is_open and is_24h fields
- Add client-side getOpenStatus with 24h, opens-at, opens-tomorrow support
- Add open-now filter toggle in PublicView and SearchView
- Add pharmacy no-hours fallback display
- Add sticky pharmacy controls on scroll
- Add admin hours editor with 24h toggle
- Add translations (es/ca) for all hour-related strings
- Add backend tests for hours logic and pharmacy endpoint
- Remove unused backup test files
This commit is contained in:
Antoni Nuñez Romeu
2026-07-27 14:32:05 +02:00
parent d43cbfa44e
commit e3e7d2f60b
18 changed files with 678 additions and 73 deletions
+13
View File
@@ -66,6 +66,17 @@ const ca = {
'pharmacy.notifyWhenArrives': 'Notificar-me quan arribi a aquesta farmàcia',
'pharmacy.notificationsActivatedPharmacy': 'Notificacions activades per a aquesta farmàcia — clic per desactivar',
'pharmacy.notificationsRequired': 'Les notificacions requereixen iOS 16.4+ i aquest lloc instal·lat com a app (Compartir → Afegir a Pantalla d\'Inici).',
'pharmacy.openNow': 'Obert · Tanca a les {{time}}',
'pharmacy.closedAllDay': 'Tancat',
'pharmacy.opensAt': 'Tancat · Obre a les {{time}}',
'pharmacy.opensTomorrow': 'Tancat · Obre demà a les {{time}}',
'pharmacy.opensDay': 'Tancat · Obre el {{day}} a les {{time}}',
'pharmacy.alwaysOpen': 'Obert 24h',
'pharmacy.filterOpenNow': 'Mostrar només obertes ara',
'pharmacy.filterOpenNowActive': 'Només obertes ara',
'pharmacy.badge24h': '24h',
'pharmacy.noHours': 'Sense horari disponible',
'pharmacy.filterNoResults': 'Cap farmàcia oberta ara. Desactiva el filtre per veure-les totes.',
// ProductResults
'product.sinReceta': 'Sense Recepta',
@@ -338,6 +349,8 @@ const ca = {
'admin.pharmacy.apiNotFound': 'L\'app no ha pogut connectar amb l\'API (404). Useu http://localhost:3000 amb frontend i backend actius.',
'admin.pharmacy.geocodificationNotFound': 'Servei de geocodificació no trobat. Actualitzeu el backend i reinicieu-lo.',
'admin.pharmacy.searchFailed': 'Cerca fallida (HTTP',
'admin.pharmacy.alwaysOpen': '24 hores (oberta tot el dia)',
'admin.pharmacy.confirmDisable24h': 'Desactivar 24h? Es descartaran els horaris actuals.',
'admin.pharmacy.dayClosed': 'Marqueu un dia com a Tancat si la farmàcia no obre aquest dia.',
'admin.pharmacy.saveError': 'Error en desar farmàcia',
'admin.pharmacy.radius': 'Radi (m)',