moon rental update for admin
This commit is contained in:
@@ -200,6 +200,14 @@ class MoonsAdminController extends Controller
|
|||||||
//Set the paid as yes or no for the check box in the blade template
|
//Set the paid as yes or no for the check box in the blade template
|
||||||
$paid = $moon->Paid;
|
$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
|
//Set the color for the table
|
||||||
if($rentalTemp->diffInDays($today) < 3 ) {
|
if($rentalTemp->diffInDays($today) < 3 ) {
|
||||||
$color = 'table-warning';
|
$color = 'table-warning';
|
||||||
@@ -219,6 +227,7 @@ class MoonsAdminController extends Controller
|
|||||||
'RentalEnd' => $rentalEnd,
|
'RentalEnd' => $rentalEnd,
|
||||||
'RowColor' => $color,
|
'RowColor' => $color,
|
||||||
'Paid' => $paid,
|
'Paid' => $paid,
|
||||||
|
'Contact' => $contact,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<th>Rental Price</th>
|
<th>Rental Price</th>
|
||||||
<th>Ally Rental Price</th>
|
<th>Ally Rental Price</th>
|
||||||
<th>Renter</th>
|
<th>Renter</th>
|
||||||
|
<th>Contact</th>
|
||||||
<th>Rental End</th>
|
<th>Rental End</th>
|
||||||
<th>Paid?</th>
|
<th>Paid?</th>
|
||||||
<th>Mark Paid</th>
|
<th>Mark Paid</th>
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
<td>{{ $row['AlliancePrice'] }}</td>
|
<td>{{ $row['AlliancePrice'] }}</td>
|
||||||
<td>{{ $row['OutOfAlliancePrice'] }}</td>
|
<td>{{ $row['OutOfAlliancePrice'] }}</td>
|
||||||
<td>{{ $row['Renter'] }}</td>
|
<td>{{ $row['Renter'] }}</td>
|
||||||
|
<td>{{ $row['Contact'] }}</td>
|
||||||
<td>{{ $row['RentalEnd'] }}</td>
|
<td>{{ $row['RentalEnd'] }}</td>
|
||||||
@if($row['Paid'] == 'Yes')
|
@if($row['Paid'] == 'Yes')
|
||||||
<td>Yes</td>
|
<td>Yes</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user