- add matomo tracking code in views\layouts\app.blade.php
- delete old unused views in views\rdr\borrow\*** - composer updates
This commit is contained in:
parent
19e2d7ea95
commit
3b3481d18c
6 changed files with 47 additions and 173 deletions
|
@ -1,74 +0,0 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h1 class="title">Borrow</h1>
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
{!! Form::open(['route' => 'borrow.post']) !!}
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::label('student_id', 'Student..') !!}
|
||||
|
||||
<!--third parameter is default option
|
||||
name of select is 'student_id'
|
||||
second parameter is the associative array -->
|
||||
{!! Form::select('person_id', $persons, null, ['id' => 'person_id', 'class' => 'form-control']) !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::label('project', 'Project..') !!}
|
||||
<!--{!! Form::select('project', $categories, null, ['id' => 'project', 'class' => 'form-control']) !!} -->
|
||||
<select id="project" name="project" class="form-control" >
|
||||
|
||||
@foreach($categories as $project)
|
||||
<option value="{{ $project->id }}" >{{ $project->name }}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::label('book_id', 'Book..') !!}
|
||||
<!--{!! Form::select('book_id', [], null, ['id' => 'book_id', 'class' => 'form-control']) !!} -->
|
||||
<select id="book_id" name="book_id" class="form-control">
|
||||
<option>-- Choice The Book --</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::submit('Borrow', ['class' => 'btn btn-primary form-control']) !!}
|
||||
</div>
|
||||
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#project').on('change', function(e){
|
||||
console.log(e);
|
||||
var project_id = e.target.value;
|
||||
//ajax
|
||||
$.get('api/dropdown/borrow/' + project_id, function(data){
|
||||
|
||||
//if success data
|
||||
$('#book_id').empty();
|
||||
$.each(data, function(index, booksObj){
|
||||
|
||||
$('#book_id').append('<option value="' +booksObj.id+ '">' +booksObj.title+ '</option>');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
|
@ -1,40 +0,0 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h1 class="title">Histori</h1>
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
|
||||
<thead>
|
||||
|
||||
<th>Student</th>
|
||||
<th>Book</th>
|
||||
<th>Borrowed At</th>
|
||||
<th>Returned At</th>
|
||||
<th>Fines</th>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($transactions as $transaction)
|
||||
|
||||
<tr>
|
||||
<td>{{ $transaction->student->last_name }}</td>
|
||||
<td>{{ $transaction->book->title }}</td>
|
||||
<td>{{ date('d-M-y', $transaction->borrowed_at) }}</td>
|
||||
<td>{{ date('d-M-y', $transaction->returned_at) }}</td>
|
||||
<td>{{ $transaction->fines }}</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -1,41 +0,0 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h1 class="title">Bericht</h1>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
|
||||
<thead>
|
||||
|
||||
<th>Person</th>
|
||||
<th>Book</th>
|
||||
<th>Borrowed At</th>
|
||||
<th colspan="2"><center>What You Gonna Do</center></th>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($transactions as $transaction)
|
||||
|
||||
<tr>
|
||||
|
||||
<td>{{ $transaction->student->last_name }}</td>
|
||||
<td>{{ $transaction->book->title }}</td>
|
||||
<td>{{ date('d-M-y', $transaction->borrowed_at) }}</td>
|
||||
<td><a href="{{ route('borrow.pengembalian', $transaction->id) }}"><span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span> return</a></td>
|
||||
<td><a href="{{ route('borrow.perpanjang', $transaction->id) }}"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span> extend borrow time</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@stop
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue