Skip to content

Commit

Permalink
Merge pull request #14516 from snipe/fixes/fixed_sorting_on_last_chec…
Browse files Browse the repository at this point in the history
…kin_assets_api

Fixes/fixed sorting on last checkin assets api
  • Loading branch information
snipe committed Mar 27, 2024
2 parents cf8cb85 + 0d3d172 commit e5800a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function index(Request $request, $audit = null)
'serial',
'model_number',
'last_checkout',
'last_checkin',
'notes',
'expected_checkin',
'order_number',
Expand Down
3 changes: 3 additions & 0 deletions app/Models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public function declinedCheckout(User $declinedBy, $signature)
'company_id' => 'nullable|integer|exists:companies,id',
'warranty_months' => 'nullable|numeric|digits_between:0,240',
'last_checkout' => 'nullable|date_format:Y-m-d H:i:s',
'last_checkin' => 'nullable|date_format:Y-m-d H:i:s',
'expected_checkin' => 'nullable|date',
'last_audit_date' => 'nullable|date_format:Y-m-d H:i:s',
'next_audit_date' => 'nullable|date|after:last_audit_date',
Expand Down Expand Up @@ -169,6 +170,8 @@ public function declinedCheckout(User $declinedBy, $signature)
'expected_checkin',
'next_audit_date',
'last_audit_date',
'last_checkin',
'last_checkout',
'asset_eol_date',
];

Expand Down

0 comments on commit e5800a2

Please sign in to comment.