123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <div class="section">
- <div class="row">
- <div class="small-12 columns">
- <h2><i class="fa fa-file"></i> Week Report</h2>
- </div>
- </div>
- <div class="row">
- <div class="small-6 push-3 columns">
- <?php echo $this->form; ?>
- </div>
- <div class="small-12 columns">
- <?php
- if(count($this->report) > 0)
- {
- echo "
- <div class='row'>
- <div class='small-6 columns'>
- <h3>".$this->account['firstName']." ".$this->account['lastName']." (";
- if($this->account['type'] == "part")
- {
- echo "Part time";
- }
- else
- {
- echo "Full Time";
- }
- echo")</h3>
- </div>
- <div class='small-6 columns'>
- <a class='button secondary radius right' href='".$this->link(array('reports','weekly'))."'>Back</a>
- </div>
- </div>
- <table width=\"100%\">
- <thead>
- <tr>
- <th width='50%'>Week</th>
- <th width='50%'>Hours Worked</th>
- </tr>
- </thead>
- <tbody>
- ";
- $i = 0;
- foreach($this->report as $entry)
- {
- if($entry['hoursWorked'] !== null)
- {
- echo "
- <tr>
- <td>
- <b>Week:</b> ".$entry['week']." <br>
- <b>Start:</b> ".$entry['start']['dayName'].", ".$entry['start']['month']." ".$entry['start']['day']." ".$entry['start']['year']." <br>
- <b>End:</b> ".$entry['end']['dayName'].", ".$entry['end']['month']." ".$entry['end']['day']." ".$entry['end']['year']."
- </td>
- <td>";
- if($this->account['type'] == "part")
- {
- if($entry['hoursWorked'] >= 18 AND $entry['hoursWorked'] <= 20)
- {
- echo "
- <span class='orange'>
- <p>WARNING: Approaching weekly limit of 20 hours.</p>
- <i class='fa fa-warning'></i> ".$entry['hoursWorked']."
- </span>
- ";
- }
- elseif($entry['hoursWorked'] >= 21)
- {
- echo "
- <span class='red'>
- <p>Warning: Exceeded weekly limit of 20 hours.</p>
- <i class='fa fa-warning'></i> ".$entry['hoursWorked']."
- </span>
- ";
- }
- else
- {
- echo $entry['hoursWorked'];
- }
- }
- else
- {
- echo $entry['hoursWorked'];
- }
- echo "</td>
- </tr>
- ";
- $i++;
- }
- }
- if($i == 0)
- {
- echo "
- <tr>
- <td colspan='2'>
- <div class='text-center'>User hasn't submitted any time entries for ".$this->year.".</div>
- </td>
- </tr>
- ";
- }
- echo "
- </tbody>
- </table>
- ";
- }
- ?>
- </div>
- </div>
- </div>
|