<meta name="viewport" content="width=device-width, initial-scale=1">
<div style="margin-top: 100px; margin-bottom: 400px">
    <table *ngIf="currentUser.is_admin" class="popuptext" id="usersPop">
        <tr>Users</tr>
        <tr>
            <th>Id</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Company</th>
            <th>Username</th>
            <th>Password</th>
            <th>Is Admin</th>
            <th>Email Address</th>
            <th>Site</th>
            <th>Approve</th>
            <th>Change Admin</th>
            <th>Delete</th>
        </tr>
        <tr *ngFor="let user of users">
            <td>{{user.id}}</td>
            <td>{{user.first_name}}</td>
            <td>{{user.last_name}}</td>
            <td>{{user.company}}</td>
            <td>{{user.username}}</td>
            <td>{{user.password}}</td>
            <td>{{user.is_admin}}</td>
            <td>{{user.email_address}}</td>
            <td>{{user.site}}</td>
            <td *ngIf="!user.approved"><a (click)="approveUser(user)" class="text-danger">Approve</a></td>
            <td *ngIf="user.approved" disabled>Approved</td>
            <td *ngIf="!user.is_admin"><a (click)="changeAdminForUser(user)" class="text-danger">set Admin</a></td>
            <td *ngIf="user.is_admin"><a (click)="changeAdminForUser(user)" class="text-danger">remove Admin</a></td>
            <td><a (click)="deleteUser(user.id)" class="text-danger">Delete</a></td>
        </tr>
    </table>

<!--    <br><br>-->
<!--    <table *ngIf="currentUser.is_admin" class="popuptext" id="companiesPop">-->
<!--        <tr>Companies List</tr>-->
<!--        <tr>-->
<!--            <th>id</th>-->
<!--            <th>Company Name</th>-->
<!--            <th>Address</th>-->
<!--            <th>Phone Number</th>-->
<!--            <th>Description</th>-->
<!--            <th>Delete</th>-->
<!--            <th>Edit</th>-->
<!--        </tr>-->
<!--        <tr *ngFor="let company of companies">-->
<!--            <td>{{company.id}}</td>-->
<!--            <td>{{company.name}}</td>-->
<!--            <td>{{company.address}}</td>-->
<!--            <td>{{company.phoneNumber}}</td>-->
<!--            <td>{{company.descriptions}}</td>-->
<!--            <td><a (click)="deleteCompany(company.id)" class="text-danger">Delete</a></td>-->
<!--            <td><a (click)="loadCompany(company)" class="text-danger">Edit</a></td>-->
<!--        </tr>-->
<!--    </table>-->
<!--    <a routerLink="/companies" class="text-danger">Add Company</a>-->
</div>