INNER CODE UNIT · Python
company_selected
infobyte/emploleaks · emploleaks.py:682
def company_selected(func):
def wrapper(*args, **kwargs):
if args[0].company_name == '' and args[0].company_id == None:
log.warning(f"You need to select a company with the '{Style.BRIGHT}{Fore.WHITE}select_company{Style.RESET_ALL}' command")
return
func(*args)
return wrapper
def _generate_html_report(self, filename, use_ai=False):
"""Generate a modular dashboard HTML report with tabs for each data category."""
cur = self.local_conn.cursor()
esc = self._html_escape
cur.execute("""
SELECT e.employee_id, e.name, e.title, e.profile_photo_url, e.department
FROM employees e WHERE e.company_id = ? ORDER BY e.name
""", (self.company_id,))
employees = cur.fetchall()