Skip to content
Permalink
361f1f2641
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
63 lines (56 sloc) 2.11 KB
<div class="row mt-4">
<div class="col-md-8 mx-auto">
<h3 class="float-start">My schedules</h3>
<div style="clear: both"></div>
<?php
$schedules = engineer::schedules($account['id']);
?>
<div class="card">
<?php
if ($schedules) {
?>
<table class="table table-hover table-striped card-body mb-0">
<thead>
<tr>
<th>Aircraft</th>
<th>Task</th>
<th>Date added</th>
</tr>
</thead>
<tbody>
<?php
foreach ($schedules as $schedule) {
$date = new DateTime($schedule['createdAt']);
$id = $schedule['id'];
$engineer_id = $schedule['engineer_id'];
$aircraft_id = $schedule['aircraft_id'];
$engineer = $schedule['name'];
$aircraft = $schedule['company'];
$task = $schedule['task'];
?>
<tr>
<td>
<strong><?= $aircraft; ?></strong>
<br>
<small><?= $schedule['aircraft_type'].' - '. $schedule['number'] ?></small>
</td>
<td><?= $task ?></td>
<td><?= $date->format("F d, Y"); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}else {
?>
<div class="alert alert-info alert-custom alert-dismissible" style="text-align: center; margin-bottom: 0; width: 100%;">
<p style="margin-bottom: 0;">No schedule has been added</p>
</div>
<?php
}
?>
</div>
</div>
</div>