moon rental update for admin

This commit is contained in:
2019-04-29 02:54:44 -05:00
parent 9733a89ab8
commit 5229abcb23
2 changed files with 11 additions and 0 deletions

View File

@@ -200,6 +200,14 @@ class MoonsAdminController extends Controller
//Set the paid as yes or no for the check box in the blade template
$paid = $moon->Paid;
//We need the contact information in character name format for the view
$contact = MoonRent::where([
'System' => $moon->System,
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
'RentalEnd' => $moon->RentalEnd,
])->get(['Contact']);
//Set the color for the table
if($rentalTemp->diffInDays($today) < 3 ) {
$color = 'table-warning';
@@ -219,6 +227,7 @@ class MoonsAdminController extends Controller
'RentalEnd' => $rentalEnd,
'RowColor' => $color,
'Paid' => $paid,
'Contact' => $contact,
]);
}

View File

@@ -10,6 +10,7 @@
<th>Rental Price</th>
<th>Ally Rental Price</th>
<th>Renter</th>
<th>Contact</th>
<th>Rental End</th>
<th>Paid?</th>
<th>Mark Paid</th>
@@ -22,6 +23,7 @@
<td>{{ $row['AlliancePrice'] }}</td>
<td>{{ $row['OutOfAlliancePrice'] }}</td>
<td>{{ $row['Renter'] }}</td>
<td>{{ $row['Contact'] }}</td>
<td>{{ $row['RentalEnd'] }}</td>
@if($row['Paid'] == 'Yes')
<td>Yes</td>