fix(v3.4.6): fix reservation cascade, remove calendar mocks, strip auto meet links, friendly dates, dynamic building floors and career filter
This commit is contained in:
@@ -30,13 +30,24 @@ class Classroom(db.Model):
|
||||
|
||||
@property
|
||||
def floor_display(self):
|
||||
"""Formato amigable para el piso: PB, Planta Baja, Piso X"""
|
||||
"""Formato amigable y dinámico para el piso: PB, EP, Subsuelo, Piso X"""
|
||||
if self.is_virtual:
|
||||
return 'Campus Virtual'
|
||||
f = str(self.floor).strip() if self.floor is not None else ''
|
||||
if f in ['0', 'PB', 'pb', 'Planta Baja', 'planta baja']:
|
||||
return 'Planta Baja'
|
||||
if f.lower().startswith('piso') or '°' in f:
|
||||
if not f:
|
||||
return 'Planta Baja (PB)'
|
||||
f_lower = f.lower()
|
||||
if f in ['0', 'PB', 'pb'] or 'planta baja' in f_lower:
|
||||
return 'Planta Baja (PB)'
|
||||
if f in ['EP', 'ep'] or 'entrepiso' in f_lower:
|
||||
return 'Entrepiso (EP)'
|
||||
if f in ['SS', 'ss'] or 'subsuelo' in f_lower:
|
||||
return f if 'subsuelo' in f_lower else 'Subsuelo (SS)'
|
||||
if f_lower.startswith('piso') or f_lower.startswith('planta') or f_lower.startswith('nivel') or '°' in f:
|
||||
return f
|
||||
return f"Piso {f}"
|
||||
if f.isdigit():
|
||||
return f"Piso {f}"
|
||||
return f
|
||||
|
||||
@property
|
||||
def is_virtual(self):
|
||||
|
||||
Reference in New Issue
Block a user