Administrator Guide
This guide provides comprehensive instructions for administrators managing Portal Ciudadano Manta’s content and citizen engagement features.Admin Panel Overview
Accessing the Admin Panel
Administrators can access the panel at/admin or /admin/panel.
Navigate to Admin Panel
/admin if you have admin privilegesAdmin Dashboard Features
The admin panel (AdminPanel.vue) displays:
Total Surveys
Active Surveys
Total Reports
Pending Reports
Quick Actions
- Surveys Management
- News Management
- Reports Management
/admin/encuestas- Create new surveys
- Edit existing surveys
- Activate/deactivate surveys
- View response analytics
- Set location targeting
Managing Surveys
Creating a New Survey
Navigate to/admin/encuestas and click Nueva Encuesta.
Basic Information
- Título: Survey title (clear and concise)
- Descripción: Detailed explanation of survey purpose
- Tipo: Select survey type
opcion_multiple- Multiple Choicecalificacion- Rating Scale (1-5)abierta- Open Response
Configure Options (Multiple Choice Only)
- Add at least 2 options
- Each option should be clear and mutually exclusive
- Maximum recommended: 6-8 options for usability
Set Geographic Targeting
- Global Survey
- Parish-Level
- Neighborhood-Level
Set Timeline
- Fecha Inicio: Start date (defaults to creation date)
- Fecha Fin: End date (when survey closes)
Activate Survey
- Check Activa checkbox to make survey visible to citizens
- Inactive surveys are hidden from citizen view but saved as drafts
Survey Location Logic
Understanding Survey Visibility Rules
Understanding Survey Visibility Rules
Encuestas.vue:218-252):Editing Existing Surveys
Update Fields
- Survey type (cannot change after creation)
- Options (if responses already submitted)
Viewing Survey Results
The admin panel displays:- Total response count
- Response breakdown by option (multiple choice)
- Average rating (rating surveys)
- Individual responses (open-ended)
- Response timestamps
- Respondent location data (anonymized)
Managing News
Publishing News Articles
Navigate to/admin/noticias to manage municipal communications.
Create News Article
- Título: Headline (concise and descriptive)
- Contenido: Full article text (supports line breaks)
- Ámbito: Geographic scope
Set Geographic Scope
- Nacional
- Provincial
- Cantonal
- Parroquial
- Barrio
Add Featured Image (Optional)
- Upload image for article preview
- Recommended size: 1200x630px (Open Graph standard)
- Supported formats: JPG, PNG
- Images stored in Supabase Storage
News Filtering Logic
News visibility is determined byámbito and location fields:
Editing News Articles
Update Published News
Update Published News
- Find article in news management list
- Click edit icon
- Modify content (all fields editable)
- Save changes - updates immediately
- Consider notification: Major changes may warrant new article
Managing Citizen Reports
Reports Dashboard
Access at/admin/reportes to view all citizen-submitted problem reports.
View All Reports
Update Status
Respond to Citizens
Report Status Workflow
Reports follow a defined lifecycle:Pendiente (Pending)
- Report just submitted by citizen
- Awaiting administrator review
- Action: Review report details and assign
En Revisión (Under Review)
- Report is being evaluated
- Checking legitimacy and scope
- Action: Validate report, assess resources needed
En Proceso (In Progress)
- Work has started on the issue
- Municipal teams assigned
- Action: Monitor progress, update citizen
Resuelto (Resolved)
- Issue has been fixed
- Set
fecha_resolucionto current date - Action: Add resolution notes, close report
Reviewing Individual Reports
Each report contains:Report Information Fields
Report Information Fields
categoria: Problem type (alumbrado, baches, etc.)descripcion: Citizen’s description (includes título + descripción)prioridad: Urgency level set by citizenimagen_url: Photo evidence (if provided)
ubicacion_parroquia: Parishubicacion_barrio: Neighborhoodubicacion_direccion: Street addressubicacion_lat/ubicacion_lng: GPS coordinates
- Reporter name and email (from
usuariostable) - Contact phone (if provided)
- Submission timestamp
estado: Current statusrespuesta_admin: Your response to citizenfecha_resolucion: Date resolved (if applicable)created_at: Submission date
Responding to Reports
Add Administrator Response
respuesta_admin field, provide:- Acknowledgment of report
- Expected timeline for resolution
- Additional information needed (if any)
- Final resolution notes (when closing)
Set Resolution Date (if resolved)
- Set
fecha_resolucionto current date - Provide resolution details in
respuesta_admin
Report Priority Guidelines
Urgente (Urgent)
Urgente (Urgent)
- Immediate safety hazards
- Exposed electrical wires
- Major water main breaks
- Structural collapse risks
- Severe traffic hazards
Alta (High)
Alta (High)
- Significant infrastructure issues
- Multiple citizens affected
- Service disruptions (water, sewage)
- Major potholes on primary roads
- Public safety concerns
Media (Medium)
Media (Medium)
- Standard maintenance issues
- Single street light outages
- Minor road damage
- Park maintenance
- Localized problems
Baja (Low)
Baja (Low)
- Cosmetic issues
- Non-urgent beautification
- Minor signage
- Suggestions for improvement
Generating PDF Reports
Administrators can export comprehensive reports:Wait for Generation
useReportePDF composable:- Fetches all reports from database
- Formats data with statistics
- Generates professional PDF
- Summary statistics by status
- Category breakdown
- Priority distribution
- Recent reports with details
- Charts and visualizations
User Management
Administrator Privileges
Users withtipo: 'administrador' have access to:
- Full admin panel at
/admin - All management routes (
/admin/*) - CRUD operations on surveys, news, reports
- View all citizen data
- Generate system reports
- Preview citizen dashboard (special banner shown)
Viewing Citizen Dashboard as Admin
Administrators can preview citizen experience:Special Preview Mode
“👁️ Modo Previsualización: Estás viendo el portal como lo vería un ciudadano”(“Preview Mode: You’re viewing the portal as a citizen would”)
Dashboard.vue:19-105) helps administrators understand the citizen experience without needing a separate account.Best Practices for Administrators
Survey Management
Survey Design
Survey Design
- Clear, unambiguous questions
- Reasonable number of options (4-6 for multiple choice)
- Appropriate survey type for data needed
- Realistic timeframes (2-4 weeks typical)
- Leading questions
- Too many open-ended questions (response fatigue)
- Overlapping answer choices
- Very short deadlines (<1 week)
Location Targeting
Location Targeting
- Use global surveys for city-wide topics
- Parish-level for infrastructure planning
- Neighborhood-level for very localized issues
- Budget priorities → Global
- New park location → Parish-level
- Street paving order → Neighborhood-level
Response Analysis
Response Analysis
- Review responses regularly (weekly recommended)
- Look for patterns across demographics
- Compare responses across locations
- Use data to inform municipal decisions
- Share results with community (publish as news)
News Publishing
- Accurate, fact-checked information
- Professional tone and formatting
- High-quality images with proper attribution
- Correct geographic scope to avoid spam
- Regular updates (aim for 2-3 articles/week)
- Mix of topics (events, services, alerts)
Report Management
Response Time Guidelines
Response Time Guidelines
- Initial response within 48 hours for all reports
- Update status even if resolution takes time
- Set realistic expectations in responses
- Change status as work progresses
- Don’t leave reports in “Pendiente” >1 week
- Use “En Proceso” to show active work
Communication with Citizens
Communication with Citizens
- Acknowledge receipt and thank reporter
- Explain what will be done
- Provide estimated timeline
- Use formal but friendly tone
- Sign with department/name
Handling Rejections
Handling Rejections
- Always explain why in
respuesta_admin - Common reasons:
- Duplicate report (reference original)
- Outside municipal jurisdiction
- Insufficient information
- Not a valid issue
- Offer alternative action if possible
- Be respectful and constructive
System Administration
Database Access
Administrators work with these Supabase tables:- encuestas
- noticias
- reportes
- usuarios
id(UUID)titulo,descripciontipo(opcion_multiple | calificacion | abierta)opciones(JSONB array)parroquia_destino,barrio_destinoactiva(boolean)fecha_inicio,fecha_fin
Authentication & Authorization
Security is implemented through:Row Level Security (RLS)
Row Level Security (RLS)
- Citizens can only read their own reports
- Admins have full CRUD access
- Surveys/news follow similar patterns
Route Guards
Route Guards
router/index.ts:186-234):- Checks
authStore.isAdministrador() - Redirects non-admins to citizen dashboard
- Validates on every navigation
Analytics and Reporting
Dashboard Statistics
The admin panel shows real-time counts:Key Metrics to Monitor
Engagement
- Survey response rates
- Average response time
- User participation trends
- Geographic distribution
Service Quality
- Report resolution time by priority
- Pending report backlog
- Citizen satisfaction (from surveys)
- Repeat reports (same issue)
Content Performance
- News article views
- Most engaged neighborhoods
- Survey completion rates
- Peak usage times
System Health
- Active user count
- New registrations
- Platform errors
- Response times
Troubleshooting Admin Issues
Can't access admin panel
Can't access admin panel
- User
tipofield in database = ‘administrador’ - Account is
activo = true - Logged in with correct credentials
- Browser cache cleared
- No JavaScript errors in console
Surveys not appearing for citizens
Surveys not appearing for citizens
- Survey not marked as
activa = true - Location targeting too specific
- End date (
fecha_fin) has passed - Citizens don’t have location set in profile
- Create test survey with no location
- Verify it appears for all users
- Check browser console for filtering errors
PDF generation fails
PDF generation fails
- Check browser allows downloads
- Verify reports exist in database
- Check console for JavaScript errors
- Try with smaller date range
- Ensure
useReportePDFcomposable loaded
Report status not updating
Report status not updating
- Database connection active
- RLS policies allow admin updates
- No validation errors on save
respuesta_adminnot exceeding text limit- Refresh page after save to confirm
Security Best Practices
- Citizens’ personal data is protected by RLS
- Only access data necessary for your role
- Don’t export citizen data unnecessarily
- Follow GDPR/data privacy regulations
- Report security concerns immediately
Training and Support
For New Administrators
System Orientation
- Review this guide completely
- Explore admin panel interface
- Test all features in staging environment
Hands-On Training
- Create test survey (mark inactive)
- Publish test news article
- Process sample citizen report
- Generate PDF report
Shadow Experienced Admin
- Observe report processing workflow
- Learn response templates
- Understand escalation procedures
Getting Technical Support
System Administration Contact
- Database access problems
- Permission configuration
- System errors or bugs
- Feature requests
Appendix: Database Schema Reference
Complete Table Structures
encuestas Table
encuestas Table
reportes Table
reportes Table
Last Updated: Based on Portal Ciudadano Manta v1.0.0
Platform Standards: ISO 9241-11 (Usability), ISO 9241-210 (Human-Centered Design)
