moon testing

This commit is contained in:
2020-06-05 04:53:25 -05:00
parent a54c8ed9a4
commit 9a56ffb829
3 changed files with 21 additions and 0 deletions

View File

@@ -259,6 +259,20 @@ class MoonsController extends Controller
} }
//Get the color correct for the table //Get the color correct for the table
if($moon->rental_type == 'In Alliance' || $moon->rental_type == 'Out of Alliance') {
if($rentalTemp->diffInDays($today) < 3 && $today < $rentalTemp ) {
$color = 'table-danger';
} else if($today > $rentalTemp) {
$color = 'table-primary';
} else if($today < $rentalTemp) {
$color = 'table-danger';
}
} else if($moon->rental_type == 'Alliance') {
$color = 'table-info';
} else {
$color = 'table-primary';
}
/*
if($moon->rental_type != 'Alliance') { if($moon->rental_type != 'Alliance') {
if($rentalTemp->diffInDays($today) < 3) { if($rentalTemp->diffInDays($today) < 3) {
$color = 'table-warning'; $color = 'table-warning';
@@ -270,6 +284,7 @@ class MoonsController extends Controller
} else { } else {
$color = 'table-info'; $color = 'table-info';
} }
*/
//Add the data to the html array to be passed to the view //Add the data to the html array to be passed to the view

View File

@@ -61,6 +61,9 @@
<tr class="table-warning"> <tr class="table-warning">
<td>Moon Rent Due</td> <td>Moon Rent Due</td>
</tr> </tr>
<tr class="table-info">
<td>Alliance Use</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@@ -59,6 +59,9 @@
<tr class="table-warning"> <tr class="table-warning">
<td>Moon Rent Due</td> <td>Moon Rent Due</td>
</tr> </tr>
<tr class="table-info">
<td>Alliance Use</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>