Browse Source

Update 2016-07-09.19.10

Reformat payment views
pull/1/head
Nafies Luthfi 10 years ago
parent
commit
cae2842786
  1. 9
      resources/views/payments/create.blade.php
  2. 15
      resources/views/payments/delete.blade.php
  3. 18
      resources/views/payments/edit.blade.php
  4. 15
      resources/views/payments/partials/payment-show.blade.php
  5. 16
      resources/views/payments/show.blade.php
  6. 6
      resources/views/projects/payments.blade.php

9
resources/views/payments/create.blade.php

@ -3,7 +3,8 @@
@section('title', trans('payment.create'))
@section('content')
<div class="row"><br>
<div class="row">
<div class="col-md-4">
{!! Form::open(['route'=>'payments.store']) !!}
<div class="panel panel-default">
@ -18,9 +19,9 @@
{!! FormField::price('amount', ['label'=> trans('payment.amount')]) !!}
</div>
</div>
{!! FormField::select('project_id', $projects, ['label'=> trans('payment.project')]) !!}
{!! FormField::select('customer_id', $customers, ['label'=> trans('payment.customer')]) !!}
{!! FormField::textarea('description',['label'=> trans('payment.description')]) !!}
{!! FormField::select('project_id', $projects, ['label'=> trans('payment.project'),'value' => Request::get('project_id')]) !!}
{!! FormField::select('customer_id', $customers, ['label'=> trans('payment.customer'),'value' => Request::get('customer_id')]) !!}
{!! FormField::textarea('description',['label'=> trans('payment.description'),'rows' => 3]) !!}
</div>
<div class="panel-footer">

15
resources/views/payments/delete.blade.php

@ -11,19 +11,8 @@
{!! link_to_route('payments.show', trans('app.cancel'), [$payment->id], ['class' => 'btn btn-default']) !!}
</h1>
<div class="row">
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title">{{ trans('payment.payments') }} Detail</h3></div>
<div class="panel-body">
<table class="table table-condensed">
<tbody>
<tr><th>{{ trans('payment.date') }}</th><td>{{ $payment->date }}</td></tr>
<tr><th>{{ trans('payment.amount') }}</th><td class="text-right">{{ formatRp($payment->amount) }}</td></tr>
<tr><th>{{ trans('payment.description') }}</th><td>{{ $payment->description }}</td></tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-5">
@include('payments.partials.payment-show')
</div>
</div>
@endsection

18
resources/views/payments/edit.blade.php

@ -3,12 +3,14 @@
@section('title', trans('payment.edit'))
@section('content')
<div class="row"><br>
<div class="col-md-4">
@include('payments.partials.breadcrumb',['title' => trans('payment.edit')])
<div class="row">
<div class="col-md-6">
{!! Form::model($payment, ['route'=>['payments.update', $payment->id], 'method' => 'patch']) !!}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('payment.edit') }}</h3></div>
<div class="panel-body">
<div class="panel-body">
{!! FormField::radios('type', ['Pengeluaran','Pemasukan'], ['label'=> trans('payment.type')]) !!}
<div class="row">
<div class="col-md-6">
@ -18,8 +20,14 @@
{!! FormField::text('amount',['label'=> trans('payment.amount'),'addon' => ['before'=>'Rp'],'type' => 'number','class' => 'text-right']) !!}
</div>
</div>
{!! FormField::select('project_id', $projects, ['label'=> trans('payment.project')]) !!}
{!! FormField::select('customer_id', $customers, ['label'=> trans('payment.customer')]) !!}
<div class="row">
<div class="col-sm-6">
{!! FormField::select('project_id', $projects, ['label'=> trans('payment.project')]) !!}
</div>
<div class="col-sm-6">
{!! FormField::select('customer_id', $customers, ['label'=> trans('payment.customer')]) !!}
</div>
</div>
{!! FormField::textarea('description',['label'=> trans('payment.description')]) !!}
</div>

15
resources/views/payments/partials/payment-show.blade.php

@ -0,0 +1,15 @@
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('payment.show') }}</h3></div>
<table class="table table-condensed">
<tbody>
<tr><th>{{ trans('payment.date') }}</th><td>{{ $payment->date }}</td></tr>
<tr><th>{{ trans('payment.amount') }}</th><td class="text-right">{{ $payment->present()->amount }}</td></tr>
<tr><th>{{ trans('payment.description') }}</th><td>{{ $payment->description }}</td></tr>
<tr><th>{{ trans('payment.customer') }}</th><td>{{ $payment->customer->name }}</td></tr>
</tbody>
</table>
<div class="panel-footer">
{!! link_to_route('payments.edit', trans('payment.edit'), [$payment->id], ['class' => 'btn btn-warning']) !!}
{!! link_to_route('payments.index', trans('payment.back_to_index'), [], ['class' => 'btn btn-default']) !!}
</div>
</div>

16
resources/views/payments/show.blade.php

@ -7,21 +7,7 @@
<h1 class="page-header">{{ trans('payment.show') }}</h1>
<div class="row">
<div class="col-md-5">
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('payment.show') }}</h3></div>
<table class="table table-condensed">
<tbody>
<tr><th>{{ trans('payment.date') }}</th><td>{{ $payment->date }}</td></tr>
<tr><th>{{ trans('payment.amount') }}</th><td class="text-right">{{ $payment->present()->amount }}</td></tr>
<tr><th>{{ trans('payment.description') }}</th><td>{{ $payment->description }}</td></tr>
<tr><th>{{ trans('payment.customer') }}</th><td>{{ $payment->customer->name }}</td></tr>
</tbody>
</table>
<div class="panel-footer">
{!! link_to_route('payments.edit', trans('payment.edit'), [$payment->id], ['class' => 'btn btn-warning']) !!}
{!! link_to_route('payments.index', trans('payment.back_to_index'), [], ['class' => 'btn btn-default']) !!}
</div>
</div>
@include('payments.partials.payment-show')
</div>
</div>
@endsection

6
resources/views/projects/payments.blade.php

@ -41,7 +41,11 @@
<th class="text-right">{{ formatRp($total) }}</th>
<th colspan="5"></th>
</tr>
<tr><td colspan="6">{!! html_link_to_route('payments.create', trans('payment.create'), [$project->id], ['class' => 'btn btn-primary','icon' => 'plus']) !!}</td></tr>
<tr>
<td colspan="6">
{!! html_link_to_route('payments.create', trans('payment.create'), ['project_id' => $project->id,'customer_id' => $project->customer_id], ['class' => 'btn btn-primary','icon' => 'plus']) !!}
</td>
</tr>
</tfoot>
</table>
</div>
Loading…
Cancel
Save