created form for rental costs similar to flex structures
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
<!-- SRP Admin -->
|
||||
@include('layouts.admin.sidebarmenu.srp')
|
||||
<!-- End SRP Admin -->
|
||||
<!-- System Rental Admin -->
|
||||
@include('layouts.admin.sidebarmenu.rentalsystem')
|
||||
<!-- End System Rental Admin -->
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<!-- System Rentals -->
|
||||
@if(auth()->user()->hasRole('Admin'))
|
||||
<li class="nav-item has-treeview">
|
||||
<a href="#" class="nav-link">
|
||||
<i class="nav-icon fas fa-tachometer-alt"></i>
|
||||
<p>
|
||||
System Rental<br>
|
||||
<i class="right fas fa-angle-left"></i>
|
||||
</p>
|
||||
</a>
|
||||
<ul class="nav nav-treeview">
|
||||
<li class="nav-item">
|
||||
<a href="/system/rental/display" class="nav-link">
|
||||
<i class="far fa-circle nav-icon"></i>
|
||||
<p>Display</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/system/rental/add" class="nav-link">
|
||||
<i class="far fa-circle nav-icon"></i>
|
||||
<p>Add</p>
|
||||
</a>
|
||||
</li>
|
||||
</u>
|
||||
</li>
|
||||
@endif
|
||||
<!-- End System Rentals -->
|
||||
31
resources/views/rental/add.blade.php
Normal file
31
resources/views/rental/add.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
@extends('layouts.admn.b4')
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>New Rental Contract</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{!! Form::open(['action' => 'SystemRentals\RentalAdminController@addRentalSystem', 'method' => 'POST']) !!}
|
||||
<div class="form-group">
|
||||
{{ Form::label('contact_name', 'Contact Name') }}
|
||||
{{ Form::text('contact_name', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('corporation_name', 'Corporation Name') }}
|
||||
{{ Form::text('corporation_name', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('system', 'System') }}
|
||||
{{ Form::text('system', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('rental_cost', 'Rental Cost') }}
|
||||
{{ Form::text('rental_cost', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
{{ Form::submit('Add Rental', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
56
resources/views/rental/list.blade.php
Normal file
56
resources/views/rental/list.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@extends('layouts.admin.b4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2>Rental Systems</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table clas="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>Contact</th>
|
||||
<th>Corporation</th>
|
||||
<th>System</th>
|
||||
<th>Cost</th>
|
||||
<th>Paid Until</th>
|
||||
<th>Update</th>
|
||||
<th>Remove?</th>
|
||||
<th> </th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($rentals as $rental)
|
||||
<tr>
|
||||
<td>{{ $rental->contact_name }}</td>
|
||||
<td>{{ $rental->corporation_name }}</td>
|
||||
<td>{{ $rental->system }}</td>
|
||||
<td>{{ number_format($rental->rental_cost, "2", ".", ",") }}</td>
|
||||
<td>{{ $rental->paid_until }}</td>
|
||||
<td>
|
||||
{!! Form::open(['action' => 'SystemRentals\RentalAdminController@updateRentalSystem', 'method' => 'POST']) !!}
|
||||
{{ Form::date('paid_until', \Carbon\Carbon::now()->endOfMonth(), ['class' => 'form-control']) }}
|
||||
{{ Form::hidden('contact_id', $rental->contact_id) }}
|
||||
{{ Form::hidden('corporation_id', $rental->corporation_id) }}
|
||||
{{ Form::hidden('system_id', $rental->system_id) }}
|
||||
{{ Form::submit('Update', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::open(['action' => 'SystemRentals\RentalAdminController@removeRentalSystem', 'method' => 'POST']) !!}
|
||||
{{ Form::radio('remove', 'Yes', false, ['class' => 'form-control']) }}
|
||||
{{ Form::hidden('contact_id', $rental->contact_id) }}
|
||||
{{ Form::hidden('corporation_id', $rental->corporation_id) }}
|
||||
{{ Form::hidden('system_id', $rental->system_id) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::submit('Remove', ['class' => 'btn btn-danger']) }}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user