Skip to content

Commit

Permalink
refactor: show recently "submitted" requisitions only
Browse files Browse the repository at this point in the history
  • Loading branch information
im-machakata committed Apr 6, 2024
1 parent 729d36c commit 27202a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Controllers/Requisition.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function viewUserReportsIndex()

if ($account->Username) {
// populate results
$results = model(ModelsRequisition::class)
$results = $this->requisitions
->filterByUser($account->Username)
->getRequisitions()
->findAll();
Expand All @@ -188,6 +188,7 @@ public function authorizeRequisitionsIndex()
{
self::$VIEW_PARAMS['requisitions'] = $this->requisitions
->select('requisitions.ID AS ReqID, requisitions.UpdatedAt, requisitions.Amount, requisitions.Reason, CONCAT(Name, " ", Surname) AS Names')
->where('Status', 'Submitted')
->getRequisitions()
->getOwners()
->paginate(6);
Expand Down

0 comments on commit 27202a4

Please sign in to comment.