Skip to main content
This guide will walk you through accessing the system, navigating the interface, creating your first permit, and reviewing permit applications.

Prerequisites

Before you begin, ensure you have:
  • A valid username and password provided by your system administrator
  • Access to the system URL (default port: 4000)
  • A modern web browser with JavaScript enabled
JavaScript must be enabled in your browser to use this application. Contact the Technology and Systems Directorate if you need assistance.

Step 1: Access the system

Authenticate with your credentials to access the permit management interface.

Login process

  1. Navigate to the system URL in your web browser
  2. Enter your username (indicator)
  3. Enter your password (minimum 6 characters)
  4. Click Iniciar to log in
1

Navigate to login page

Open your browser and go to the system URL. You’ll see the login form:
  • Nombre de Usuario: Your user indicator (letters only, 3-51 characters)
  • Contraseña: Your password (6-30 characters)
2

Submit credentials

The system validates your credentials using bcrypt password verification:
// Login endpoint: /usuarios/login
router.post('/login', async (req, res) => {
  const { indicador, password } = req.body;
  
  await pool.query('SELECT * FROM usuarios WHERE username=?', 
    [indicador], async (err, result) => {
      if (bcrypt.compareSync(password, result[0].password)) {
        req.session.usuario = {
          nombre: result[0].nombre,
          apellido: result[0].apellido,
          tipo_usuario: result[0].tipo_usuario,
          indicador: result[0].username
        };
        res.send({ success: 'Logged in successfully' });
      }
    });
});
3

Access granted

After successful authentication, you’ll be redirected to the home dashboard showing the three permit modules.

Step 2: Navigate the interface

Understand the main sections of the system and how to navigate between permit types.

Main dashboard

After logging in, you’ll see three main modules:

Venta de Bebidas Alcohólicas

Manage permits for alcoholic beverage sales

Eventos Especiales

Manage permits for special events

Publicidad y Propaganda

Manage permits for advertising and propaganda
The top navigation bar provides quick access to:
  • Inicio: Return to the main dashboard
  • Venta de Bebidas Alcohólicas: Alcoholic beverages permits
  • Eventos Especiales: Special events permits
  • Publicidad y Propaganda: Advertising permits
  • Opciones: Dropdown menu with:
    • Usuarios: User management (Administrators/Developers only)
    • Cambio de Contraseña: Change your password
    • Cerrar Sesión: Log out of the system
The user management option is only visible to users with Administrator or Developer roles.

Step 3: Create your first permit

Walk through creating a new advertising permit application.
  1. From the dashboard, click Publicidad y Propaganda
  2. You’ll see a list of existing permits with their status
  3. Click Nuevo Permiso to create a new application

Fill out the permit form

1

Enter permit dates

Specify the permit validity period:
  • Habilitación: Start date for the permit
  • Vencimiento: Expiration date
  • Horario: Time schedule for the permitted activity
2

Add applicant information

Enter the details of the person requesting the permit:
  • Nombre: First name
  • Apellido: Last name
  • Cédula: ID document number
  • Teléfono: Phone number
  • Habitación: Address/location
  • Sector Permisado: Permitted area/sector
3

Specify advertising materials

Indicate the quantities of each advertising type:
  • Volantes (flyers)
  • Afiches (posters)
  • Pendones (banners)
  • Habladores (shelf talkers)
  • Stands
  • Calcomanías (stickers)
  • Banderolas (flags)
  • Otros (other - with description)
4

Upload payment receipt

Attach the payment verification document:
// File upload handling with Multer
const storageProyect = multer.diskStorage({
  destination: path.join(__dirname, '../public/server-files/temps/'),
  filename: (req, file, funcion) => {
    funcion(null, file.fieldname + '_de_pago_' + Date.now() + 
      file.originalname.substr(file.originalname.lastIndexOf('.')));
  }
});

const uploadProyect = multer({
  storage: storageProyect
}).single('comprobante');
5

Submit the application

Click Guardar to create the permit. The system will:
  • Generate a unique permit code (format: YYYY-XXX)
  • Store all information in the database
  • Notify all connected clients via Socket.io
  • Return you to the permits list with your new permit visible
// Permit creation endpoint: POST /publicidad_y_propaganda/add
router.post('/add', uploadProyect, async (req, res) => {
  // Generate next permit code
  let lastPermiso = fecha.getFullYear() + '-' + adaptNum(counter);
  
  // Insert permit into database
  await pool.query(
    'INSERT INTO permisos_publicidad (...) VALUES(...)',
    values,
    (error, resultado) => {
      res.send({
        success: 'Permit registered successfully',
        permiso: lastPermiso
      });
    }
  );
});

Step 4: Review and approve permits

Learn how to review pending permits and approve them for issuance.

View permit details

  1. From the permits list, click on any permit to view its details
  2. Review all submitted information:
    • Applicant details
    • Permit dates and schedule
    • Advertising materials requested
    • Payment receipt (if uploaded)

Approve a permit

1

Verify information

Ensure all required information is present and accurate:
  • Payment receipt is valid
  • Dates are within acceptable range
  • Applicant information is complete
2

Upload approved permit document

Attach the official approved permit document (PDF or image):
// Approval endpoint: POST /publicidad_y_propaganda/aprobate
router.post('/aprobate', uploadAprobate, async (req, res) => {
  await pool.query(
    'UPDATE permisos_publicidad SET permiso_autorizado=?, emitido=1 WHERE id=?',
    [req.file.filename, req.body.permiso],
    (err, result) => {
      res.send({
        success: 'Permit approved successfully',
        permiso: req.body.permiso
      });
    }
  );
});
3

Submit approval

Click Aprobar to mark the permit as issued. The system will:
  • Update the permit status to “Emitido” (Issued)
  • Notify all connected users in real-time
  • Make the approved document available for download

Cancel a permit (if needed)

If a permit cannot be approved:
  1. Click Cancelar on the permit details
  2. Enter an observation explaining the reason
  3. Submit the cancellation
// Cancellation endpoint: POST /publicidad_y_propaganda/cancel
router.post('/cancel', upload.none(), async (req, res) => {
  await pool.query(
    'UPDATE permisos_publicidad SET cancelado=?, observacion=? WHERE id=?',
    [1, req.body.observacion, req.body.permiso],
    (err, result) => {
      res.send({
        success: 'Permit cancellation recorded',
        permiso: req.body.permiso
      });
    }
  );
});

Real-time updates

All permit actions trigger real-time updates across all connected clients:
// Client receives new permit notification
socket.on('publicidad:nuevo-permiso', (data) => {
  // Update UI with new permit information
  addPermitToList(data);
});

// Client receives approval notification
socket.on('publicidad:aprobate-permiso', (data) => {
  // Update permit status in UI
  updatePermitStatus(data.permiso, 'approved');
});

Next steps

Now that you’ve completed the quickstart:
  • Explore the other permit types (Beverages and Events)
  • Generate PDF reports for approved permits
  • Learn about user management (Administrators only)
  • Configure system settings and preferences
Each permit type (Beverages, Events, Advertising) follows a similar workflow with type-specific fields and requirements.

Need help?

If you encounter issues:
  • Check that JavaScript is enabled in your browser
  • Verify your user role has permission for the action
  • Contact your system administrator
  • Access the help documentation via Opciones > Ayuda

Build docs developers (and LLMs) love