Overview
The Dashboard is your central hub for monitoring all activity and statistics across the Grupo Mecsa CMS. It provides real-time insights into content, clients, projects, contacts, and HR operations.The dashboard automatically adapts based on your user role, showing only the metrics and sections you have permission to view.
Key Features
Real-time Statistics
Track counts for content, clients, projects, contacts, vacancies, and employees
Role-Based Views
See only the data relevant to your role (Admin, RRHH, Proyecto, Comercial)
Recent Activity
View the latest contacts, projects, and job vacancies
Quick Actions
Access frequently-used modules directly from the dashboard
Dashboard Statistics
The dashboard fetches and displays counts from multiple tables:dashboard.php
Displayed Metrics
For All Users
| Metric | Description | Table |
|---|---|---|
| Content | Total published content items | contenido |
| Clients | Total registered clients | clientes |
| Projects | Total active and completed projects | Proyectos |
| Contacts | Total contact form submissions | contactos |
For HR Users
| Metric | Description | Table |
|---|---|---|
| Vacancies | Open job positions | vacantes |
| Employees | Current employee count | empleados |
Recent Activity Feeds
The dashboard displays recent records from key tables:dashboard.php
Recent Contacts
Displays the 5 most recent contact form submissions with:- Contact name and email
- Submission date
- Quick action buttons
Recent Projects
Shows the 5 latest projects with:- Project name
- Associated client
- Creation date
- Link to project details
Recent Vacancies (HR Only)
Lists the 5 newest job postings with:- Position title
- Creation date
- Status (Active/Inactive)
Role-Based Access
The dashboard respects role permissions set inresolve_user.php:
dashboard.php
Admin Users
- See all metrics and statistics
- Access all recent activity feeds
- Can navigate to any module
HR Users
- See HR-specific metrics (vacancies, employees)
- Access employee and recruitment data
- Limited access to client/project data
Project Users
- Focus on projects and client relationships
- Limited HR access
User Interface
Welcome Card
The dashboard greets users by name and displays:- Current time
- Role-specific mini statistics
- Quick access to relevant modules
dashboard.php
Statistics Grid
Metrics are displayed in a responsive grid layout:- Large screens: 4 columns
- Tablets: 2 columns
- Mobile: 1 column
Quick Actions
From the dashboard, users can quickly navigate to:Content
Manage website content
Clients
View client directory
Projects
Track project status
Contacts
Review inquiries
Employees
HR management
Email Builder
Create campaigns
Technical Details
Data Fetching
All dashboard data is fetched on page load using Supabase REST API:- Authentication: Requires valid session token
- Schema: Queries
cmsschema by default - Performance: Lightweight queries using
select=idfor counts - Ordering: Recent records sorted by
created_at.desc
Session Requirements
dashboard.php
Best Practices
The dashboard is read-only. Use the quick action links to manage records in their respective modules.
Next Steps
Clients
Learn about client management
Projects
Explore project tracking