Skip to content

Commit

Permalink
feat: show dates on travel requisitions
Browse files Browse the repository at this point in the history
featr: show requisition type on user reports
  • Loading branch information
im-machakata committed Apr 6, 2024
1 parent c6487dc commit 729d36c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
10 changes: 10 additions & 0 deletions app/Views/forms/travel-and-subsistency.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@
<small class="text-body-secondary">Last Updated: <?= $requisition->UpdatedAt->humanize() ?></small>
</p>
</div>
<div class="card-footer border-dark">
<div class="row">
<div class="col-lg-6">
From: <?= $requisition->OutFrom ? $requisition->OutFrom->toLocalizedString('MMM d, yyyy') : 'N/A' ?>
</div>
<div class="col-lg-6">
To: <?= $requisition->OutTo ? $requisition->OutTo->toLocalizedString('MMM d, yyyy') : 'N/A' ?>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?= $pager ? $pager->links() : '' ?>
Expand Down
16 changes: 15 additions & 1 deletion app/Views/forms/user-reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<div class="card border-0 my-3">
<div class="card-header bg-dark border-dark text-white">
<div class="d-flex">
<div class="flex-fill">
<div class="flex-fill fw-bold">
Amount: $<?= number_format($requisition->Amount, 2) ?> USD
</div>
<div class="float-end">
Expand All @@ -74,6 +74,20 @@
<small class="text-body-secondary">Last Updated: <?= $requisition->UpdatedAt->humanize() ?></small>
</p>
</div>
<div class="card-footer border-dark">
<div class="row">
<div class="col-lg-4">
<small>From: <?= $requisition->OutFrom ? $requisition->OutFrom->toLocalizedString('MMM d, yyyy') : 'N/A' ?>
</small>
</div>
<div class="col-lg-4">
<small>To: <?= $requisition->OutTo ? $requisition->OutTo->toLocalizedString('MMM d, yyyy') : 'N/A' ?></small>
</div>
<div class="col-lg-4">
<small>Type: <?= str_replace('_', ' ', $requisition->Type) ?></small>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?= $pager ? $pager->links() : '' ?>
Expand Down

0 comments on commit 729d36c

Please sign in to comment.