2021-12-22 23:06:58 +01:00
|
|
|
<div id="list" class="table-responsive mt-4">
|
|
|
|
<table *ngIf="sourceType === 'list'" id="table" class="table table-striped table-bordered dt-responsive nowrap">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Nome</th>
|
|
|
|
<th>Disponibile</th>
|
|
|
|
<th>Autista</th>
|
|
|
|
<th>Chiama</th>
|
|
|
|
<th>Scrivi</th>
|
|
|
|
<th>Interventi</th>
|
|
|
|
<th>Minuti disponibilità</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="table_body">
|
|
|
|
<tr *ngFor="let row of data">
|
|
|
|
<td>
|
2021-12-24 18:07:24 +01:00
|
|
|
<img alt="red helmet" src="./assets/img/red_helmet.png" width="20px" *ngIf="row.chief">
|
|
|
|
<img alt="red helmet" src="./assets/img/black_helmet.png" width="20px" *ngIf="!row.chief">
|
2021-12-27 14:43:01 +01:00
|
|
|
<ng-container *ngIf="(getTime() - row.online_time) < 30"><u>{{ row.name }}</u></ng-container>
|
|
|
|
<ng-container *ngIf="(getTime() - row.online_time) > 30">{{ row.name }}</ng-container>
|
2021-12-22 23:06:58 +01:00
|
|
|
</td>
|
2021-12-24 15:21:22 +01:00
|
|
|
<td (click)="changeAvailability.emit({user: row.id, newState: row.available ? 0 : 1})">
|
2021-12-22 23:06:58 +01:00
|
|
|
<i class="fa fa-check" style="color:green" *ngIf="row.available"></i>
|
|
|
|
<i class="fa fa-times" style="color:red" *ngIf="!row.available"></i>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-12-24 18:07:24 +01:00
|
|
|
<img alt="driver" src="./assets/img/wheel.png" width="20px" *ngIf="row.driver">
|
2021-12-22 23:06:58 +01:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="tel:{{row.phone_number}}"><i class="fa fa-phone"></i></a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a target="_blank" href="https://wa.me/{{row.phone_number}}?text=Allerta%20in%20corso.%20Mettiti%20in%20contatto%20al%20più%20presto%20con%20me."><i class="fab fa-whatsapp"></i></a>
|
|
|
|
</td>
|
|
|
|
<td>{{ row.services }}</td>
|
|
|
|
<td>{{ row.availability_minutes }}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<table *ngIf="sourceType === 'logs'" id="table" class="table table-striped table-bordered dt-responsive nowrap">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Azione</th>
|
|
|
|
<th>Interessato</th>
|
|
|
|
<th>Fatto da</th>
|
|
|
|
<th>Data e ora</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="table_body">
|
|
|
|
<tr *ngFor="let row of data">
|
|
|
|
<td>{{ row.action }}</td>
|
|
|
|
<td>{{ row.changed }}</td>
|
|
|
|
<td>{{ row.editor }}</td>
|
|
|
|
<td>{{ row.timestamp | date: 'MM/dd/yyyy HH:mm' }}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<table *ngIf="sourceType === 'services'" id="table" class="table table-striped table-bordered dt-responsive nowrap">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Data</th>
|
|
|
|
<th>Codice</th>
|
|
|
|
<th>Tempo inizio</th>
|
|
|
|
<th>Tempo fine</th>
|
|
|
|
<th>Caposquadra</th>
|
|
|
|
<th>Autisti</th>
|
|
|
|
<th>Altre persone</th>
|
|
|
|
<th>Luogo</th>
|
|
|
|
<th>Note</th>
|
|
|
|
<th>Tipo</th>
|
|
|
|
<th>Modifica</th>
|
|
|
|
<th>Rimuovi</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="table_body">
|
|
|
|
<tr *ngFor="let row of data">
|
|
|
|
<td>{{ row.date | date: 'MM/dd/yyyy HH:mm' }}</td>
|
|
|
|
<td>{{ row.code }}</td>
|
|
|
|
<td>{{ row.beginning }}</td>
|
|
|
|
<td>{{ row.end }}</td>
|
|
|
|
<td>{{ row.chief }}</td>
|
|
|
|
<td>{{ row.drivers }}</td>
|
|
|
|
<td>{{ row.crew }}</td>
|
|
|
|
<td>{{ row.place }}</td>
|
|
|
|
<td>{{ row.notes }}</td>
|
|
|
|
<td>{{ row.type }}</td>
|
|
|
|
<td><i class="fa fa-edit"></i></td>
|
|
|
|
<td><i class="fa fa-trash"></i></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<table *ngIf="sourceType === 'trainings'" id="table" class="table table-striped table-bordered dt-responsive nowrap">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Data</th>
|
|
|
|
<th>Nome</th>
|
|
|
|
<th>Tempo inizio</th>
|
|
|
|
<th>Tempo fine</th>
|
|
|
|
<th>Caposquadra</th>
|
|
|
|
<th>Altre persone</th>
|
|
|
|
<th>Luogo</th>
|
|
|
|
<th>Note</th>
|
|
|
|
<th>Modifica</th>
|
|
|
|
<th>Rimuovi</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="table_body">
|
|
|
|
<tr *ngFor="let row of data">
|
|
|
|
<td>{{ row.date | date: 'MM/dd/yyyy HH:mm' }}</td>
|
|
|
|
<td>{{ row.name }}</td>
|
|
|
|
<td>{{ row.beginning }}</td>
|
|
|
|
<td>{{ row.end }}</td>
|
|
|
|
<td>{{ row.chief }}</td>
|
|
|
|
<td>{{ row.crew }}</td>
|
|
|
|
<td>{{ row.place }}</td>
|
|
|
|
<td>{{ row.notes }}</td>
|
|
|
|
<td><i class="fa fa-edit"></i></td>
|
|
|
|
<td><i class="fa fa-trash"></i></td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|