<div class="main-content">
        <div class="container-fluid">
          <div class="col-md-12">
            <div class="card">
                <div class="card-header card-header-green">
                    <h4 class="card-title ">Usuarios Repartidores</h4>
                    <p class="card-category">Maestro de repartidores ERP</p>
                </div>
                <div class="card-body">
                    <div class="row">                    
                        <div class="col-md-12 sys-actions">
                            <button mat-raised-button class="create" (click)="addUser()">Agregar</button>
                        </div>
                    </div>
                    <div class="table-responsive">
                        <table class="table table-hover table-bordered">
                            <thead>
                                <th>Avatar</th>
                                <th>RUT</th>
                                <th>Nombre</th>
                                <th>Email</th>
                                <th>Ult. Conexión</th>
                                <th>Opciones</th>
                            </thead>
                            <tbody>
                                <tr *ngIf="users.length == 0">
                                    <td colspan="6">No existen registros disponibles</td>
                                </tr>
                                <tr *ngFor="let user of users; let i = index;">
                                    <td><img src="{{user.avatar == '' ? '/assets/img/default.png' : user.avatar}}" class="erp-avatar" /></td>
                                    <td>{{user.card_code | rut }}</td>
                                    <td>{{user.first_name}} {{user.last_name}}</td>
                                    <td>{{user.email}}</td>
                                    <td>{{user.seen_at | date:'dd/MM/yyyy HH:mm'}}</td>
                                    <td>
                                        <button mat-stroked-button color="primary" (click)="editUser(i)">Editar</button>
                                        <button mat-stroked-button color="warn" (click)="deleteUser(i)">Eliminar</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>        
          </div>
        </div>
      </div>
      