Add client name column
This commit is contained in:
parent
4436ab2b30
commit
c06d2f7951
@ -13,5 +13,6 @@
|
|||||||
"Machine": "Machine",
|
"Machine": "Machine",
|
||||||
"Tested On": "Tested On",
|
"Tested On": "Tested On",
|
||||||
"Capacity": "Capacity",
|
"Capacity": "Capacity",
|
||||||
"Last Event": "Last Event"
|
"Last Event": "Last Event",
|
||||||
|
"Client": "Client"
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,8 @@ WHERE date=(SELECT MAX(s2.date)
|
|||||||
WHERE machines.machineid = s2.machineid
|
WHERE machines.machineid = s2.machineid
|
||||||
)
|
)
|
||||||
OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid)")->fetchAll();
|
OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid)")->fetchAll();
|
||||||
|
|
||||||
|
$clients = Clients::getAll();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@ -37,10 +39,11 @@ OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid)
|
|||||||
<th data-priority="0"></th>
|
<th data-priority="0"></th>
|
||||||
<th data-priority="1"><?php $Strings->get('Actions'); ?></th>
|
<th data-priority="1"><?php $Strings->get('Actions'); ?></th>
|
||||||
<th data-priority="3"><i class="fas fa-desktop hidden-sm"></i> <?php $Strings->get('ID'); ?></th>
|
<th data-priority="3"><i class="fas fa-desktop hidden-sm"></i> <?php $Strings->get('ID'); ?></th>
|
||||||
|
<th data-priority="2"><i class="fas fa-user hidden-sm"></i> <?php $Strings->get('Client'); ?></th>
|
||||||
<th data-priority="4"><i class="fas fa-hdd hidden-sm"></i> <?php $Strings->get('OS/Software'); ?></th>
|
<th data-priority="4"><i class="fas fa-hdd hidden-sm"></i> <?php $Strings->get('OS/Software'); ?></th>
|
||||||
<th data-priority="2"><i class="fas fa-hashtag hidden-sm"></i> <?php $Strings->get('Model'); ?></th>
|
<th data-priority="2"><i class="fas fa-hashtag hidden-sm"></i> <?php $Strings->get('Model'); ?></th>
|
||||||
<th data-priority="1"><i class="fas fa-calendar hidden-sm"></i> <?php $Strings->get('Last Event'); ?></th>
|
<th data-priority="1"><i class="fas fa-calendar hidden-sm"></i> <?php $Strings->get('Last Event'); ?></th>
|
||||||
<th data-priority="2"><i class="fas fa-barcode hidden-sm"></i> <?php $Strings->get('Serial'); ?></th>
|
<th data-priority="3"><i class="fas fa-barcode hidden-sm"></i> <?php $Strings->get('Serial'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -61,6 +64,14 @@ OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid)
|
|||||||
<a class="btn btn-info btn-sm" href="app.php?page=viewmachine&id=<?php echo $m['machineid']; ?>"><i class="fas fa-eye"></i> <?php $Strings->get("View"); ?></a>
|
<a class="btn btn-info btn-sm" href="app.php?page=viewmachine&id=<?php echo $m['machineid']; ?>"><i class="fas fa-eye"></i> <?php $Strings->get("View"); ?></a>
|
||||||
</td>
|
</td>
|
||||||
<td><a href="./app.php?page=viewmachine&id=<?php echo $m['machineid']; ?>"><?php echo $m['machineid']; ?></a></td>
|
<td><a href="./app.php?page=viewmachine&id=<?php echo $m['machineid']; ?>"><?php echo $m['machineid']; ?></a></td>
|
||||||
|
<td><?php
|
||||||
|
foreach ($clients as $c) {
|
||||||
|
if ($c->getID() == $m['clientid']) {
|
||||||
|
echo $c->getName();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?></td>
|
||||||
<td><?php echo $m['os']; ?></td>
|
<td><?php echo $m['os']; ?></td>
|
||||||
<td><?php echo $m['model']; ?></td>
|
<td><?php echo $m['model']; ?></td>
|
||||||
<td><span class="d-none"><?php echo $m['eventdate']; ?></span><?php echo empty($m['eventdate']) ? "-" : $m["eventname"] . " " . date($SETTINGS["datetime_format"], strtotime($m['eventdate'])); ?></td>
|
<td><span class="d-none"><?php echo $m['eventdate']; ?></span><?php echo empty($m['eventdate']) ? "-" : $m["eventname"] . " " . date($SETTINGS["datetime_format"], strtotime($m['eventdate'])); ?></td>
|
||||||
@ -75,10 +86,11 @@ OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid)
|
|||||||
<th data-priority="0"></th>
|
<th data-priority="0"></th>
|
||||||
<th data-priority="1"><?php $Strings->get('Actions'); ?></th>
|
<th data-priority="1"><?php $Strings->get('Actions'); ?></th>
|
||||||
<th data-priority="3"><i class="fas fa-desktop hidden-sm"></i> <?php $Strings->get('ID'); ?></th>
|
<th data-priority="3"><i class="fas fa-desktop hidden-sm"></i> <?php $Strings->get('ID'); ?></th>
|
||||||
|
<th data-priority="2"><i class="fas fa-user hidden-sm"></i> <?php $Strings->get('Client'); ?></th>
|
||||||
<th data-priority="4"><i class="fas fa-hdd hidden-sm"></i> <?php $Strings->get('OS/Software'); ?></th>
|
<th data-priority="4"><i class="fas fa-hdd hidden-sm"></i> <?php $Strings->get('OS/Software'); ?></th>
|
||||||
<th data-priority="2"><i class="fas fa-hashtag hidden-sm"></i> <?php $Strings->get('Model'); ?></th>
|
<th data-priority="2"><i class="fas fa-hashtag hidden-sm"></i> <?php $Strings->get('Model'); ?></th>
|
||||||
<th data-priority="1"><i class="fas fa-calendar hidden-sm"></i> <?php $Strings->get('Last Event'); ?></th>
|
<th data-priority="1"><i class="fas fa-calendar hidden-sm"></i> <?php $Strings->get('Last Event'); ?></th>
|
||||||
<th data-priority="2"><i class="fas fa-barcode hidden-sm"></i> <?php $Strings->get('Serial'); ?></th>
|
<th data-priority="3"><i class="fas fa-barcode hidden-sm"></i> <?php $Strings->get('Serial'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
Loading…
x
Reference in New Issue
Block a user