Browse Source

Update money sign on price form fields

Fixed some code styles on views
Update job progress html export page
pull/6/head
Nafies Luthfi 8 years ago
parent
commit
c80f109995
  1. 1
      resources/lang/id/job.php
  2. 14
      resources/views/invoice-drafts/partials/draft-item-list.blade.php
  3. 14
      resources/views/invoices/partials/item-list.blade.php
  4. 16
      resources/views/jobs/create.blade.php
  5. 16
      resources/views/jobs/edit.blade.php
  6. 2
      resources/views/payments/create.blade.php
  7. 2
      resources/views/payments/edit.blade.php
  8. 14
      resources/views/projects/create.blade.php
  9. 22
      resources/views/projects/edit.blade.php
  10. 8
      resources/views/projects/fees/create.blade.php
  11. 6
      resources/views/projects/jobs/progress-export-html.blade.php
  12. 8
      resources/views/subscriptions/create.blade.php
  13. 22
      resources/views/subscriptions/edit.blade.php

1
resources/lang/id/job.php

@ -6,6 +6,7 @@ return [
'list' => 'Daftar Job',
'additional' => 'Daftar Job Tambahan',
'on_progress' => 'Job on Progress',
'detail' => 'Detail Job',
'search' => 'Cari Job',
'found' => 'Job ditemukan',
'not_found' => 'Job tidak ditemukan',

14
resources/views/invoice-drafts/partials/draft-item-list.blade.php

@ -31,7 +31,12 @@
<td class="col-md-3">
{!! FormField::price(
'amount['.$key.']',
['id' => 'amount-'.$key, 'value' => $item->amount, 'label' => false]
[
'id' => 'amount-'.$key,
'value' => $item->amount,
'label' => false,
'currency' => Option::get('money_sign', 'Rp')
]
) !!}
{{ Form::submit('Update', ['id' => 'update-item-'.$key, 'class' => 'btn btn-success btn-xs pull-right']) }}
</td>
@ -59,7 +64,12 @@
<td colspan="2">
{!! FormField::price(
'new_item_amount',
['id' => 'new_item_amount', 'label' => false, 'placeholder' => trans('invoice.item_amount')]
[
'id' => 'new_item_amount',
'label' => false,
'placeholder' => trans('invoice.item_amount'),
'currency' => Option::get('money_sign', 'Rp')
]
) !!}
{{ Form::submit(trans('invoice.add_item'), ['class' => 'btn btn-primary btn-block']) }}
</td>

14
resources/views/invoices/partials/item-list.blade.php

@ -31,7 +31,12 @@
<td class="col-md-3">
{!! FormField::price(
'amount['.$key.']',
['id' => 'amount-'.$key, 'value' => $item['amount'], 'label' => false]
[
'id' => 'amount-'.$key,
'value' => $item['amount'],
'label' => false,
'currency' => Option::get('money_sign', 'Rp')
]
) !!}
{{ Form::submit('Update', ['id' => 'update-item-'.$key, 'class' => 'btn btn-success btn-xs pull-right']) }}
</td>
@ -59,7 +64,12 @@
<td colspan="2">
{!! FormField::price(
'new_item_amount',
['id' => 'new_item_amount', 'label' => false, 'placeholder' => trans('invoice.item_amount')]
[
'id' => 'new_item_amount',
'label' => false,
'placeholder' => trans('invoice.item_amount'),
'currency' => Option::get('money_sign', 'Rp')
]
) !!}
{{ Form::submit(trans('invoice.add_item'), ['class' => 'btn btn-primary btn-block']) }}
</td>

16
resources/views/jobs/create.blade.php

@ -3,7 +3,7 @@
@section('title', trans('job.create'))
@section('content')
@include('projects.partials.breadcrumb',['title' => trans('job.create')])
@include('projects.partials.breadcrumb', ['title' => trans('job.create')])
<div class="row">
<div class="col-sm-6">
@ -11,24 +11,24 @@
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('job.create') }}</h3></div>
<div class="panel-body">
{!! FormField::text('name',['label'=> trans('job.name')]) !!}
{!! FormField::text('name', ['label' => trans('job.name')]) !!}
<div class="row">
<div class="col-sm-4">
{!! FormField::price('price', ['label'=> trans('job.price')]) !!}
{!! FormField::price('price', ['label' => trans('job.price'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
<div class="col-sm-4">
{!! FormField::select('worker_id', $workers, ['label'=> trans('job.worker'),'value' => 1]) !!}
{!! FormField::select('worker_id', $workers, ['label' => trans('job.worker'), 'value' => 1]) !!}
</div>
<div class="col-sm-4">
{!! FormField::radios('type_id', [1 => 'Project','Tambahan'], ['value' => 1,'label'=> trans('job.type'),'list_style' => 'unstyled']) !!}
{!! FormField::radios('type_id', [1 => 'Project', 'Tambahan'], ['value' => 1, 'label' => trans('job.type'), 'list_style' => 'unstyled']) !!}
</div>
</div>
{!! FormField::textarea('description',['label'=> trans('job.description')]) !!}
{!! FormField::textarea('description', ['label' => trans('job.description')]) !!}
</div>
<div class="panel-footer">
{!! Form::submit(trans('job.create'), ['class'=>'btn btn-primary']) !!}
{!! link_to_route('projects.jobs.index', trans('app.cancel'), [$project->id], ['class'=>'btn btn-default']) !!}
{!! Form::submit(trans('job.create'), ['class' => 'btn btn-primary']) !!}
{!! link_to_route('projects.jobs.index', trans('app.cancel'), [$project->id], ['class' => 'btn btn-default']) !!}
</div>
</div>
{!! Form::close() !!}

16
resources/views/jobs/edit.blade.php

@ -5,31 +5,31 @@
@section('content')
<div class="row"><br>
<div class="col-md-6">
{!! Form::model($job, ['route'=>['jobs.update', $job->id], 'method' => 'patch']) !!}
{!! Form::model($job, ['route' =>['jobs.update', $job->id], 'method' => 'patch']) !!}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ $job->name }} <small>{{ trans('job.edit') }}</small></h3></div>
<div class="panel-body">
{!! FormField::text('name',['label'=> trans('job.name')]) !!}
{!! FormField::text('name', ['label' => trans('job.name')]) !!}
<div class="row">
<div class="col-sm-4">
{!! FormField::price('price', ['label'=> trans('job.price')]) !!}
{!! FormField::price('price', ['label' => trans('job.price'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
<div class="col-sm-4">
{!! FormField::select('worker_id', $workers, ['label'=> trans('job.worker')]) !!}
{!! FormField::select('worker_id', $workers, ['label' => trans('job.worker')]) !!}
</div>
<div class="col-sm-4">
{!! FormField::radios('type_id', [1 => 'Project','Tambahan'], ['value' => 1,'label'=> trans('job.type'),'list_style' => 'unstyled']) !!}
{!! FormField::radios('type_id', [1 => 'Project', 'Tambahan'], ['value' => 1, 'label' => trans('job.type'), 'list_style' => 'unstyled']) !!}
</div>
</div>
{!! FormField::textarea('description',['label'=> trans('job.description')]) !!}
{!! FormField::textarea('description', ['label' => trans('job.description')]) !!}
</div>
<div class="panel-footer">
{!! Form::hidden('project_id', $job->project_id) !!}
{!! Form::submit(trans('job.update'), ['class'=>'btn btn-primary']) !!}
{!! Form::submit(trans('job.update'), ['class' => 'btn btn-primary']) !!}
{!! link_to_route('jobs.show', trans('app.show'), [$job->id], ['class' => 'btn btn-info']) !!}
{!! link_to_route('projects.jobs.index', trans('job.back_to_index'), [$job->project_id], ['class' => 'btn btn-default']) !!}
{!! link_to_route('jobs.delete', trans('job.delete'), [$job->id], ['class'=>'btn btn-danger pull-right']) !!}
{!! link_to_route('jobs.delete', trans('job.delete'), [$job->id], ['class' => 'btn btn-danger pull-right']) !!}
</div>
</div>
{!! Form::close() !!}

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

@ -28,7 +28,7 @@
{!! FormField::text('date', ['label'=> trans('payment.date')]) !!}
</div>
<div class="col-md-6">
{!! FormField::price('amount', ['label'=> trans('payment.amount')]) !!}
{!! FormField::price('amount', ['label'=> trans('payment.amount'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
<div class="row">

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

@ -25,7 +25,7 @@
{!! FormField::text('date', ['label'=> trans('app.date')]) !!}
</div>
<div class="col-md-6">
{!! FormField::price('amount', ['label'=> trans('payment.amount')]) !!}
{!! FormField::price('amount', ['label'=> trans('payment.amount'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
<div class="row">

14
resources/views/projects/create.blade.php

@ -10,11 +10,11 @@
<div class="row">
<div class="col-md-4 col-md-offset-3">
{!! Form::open(['route'=>'projects.store']) !!}
{!! Form::open(['route' => 'projects.store']) !!}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('project.create') }}</h3></div>
<div class="panel-body">
{!! FormField::text('name',['label'=> trans('project.name')]) !!}
{!! FormField::text('name', ['label' => trans('project.name')]) !!}
{!! FormField::select('customer_id', $customers, ['placeholder' => 'Customer Baru']) !!}
<div class="row">
<div class="col-md-6">
@ -26,18 +26,18 @@
</div>
<div class="row">
<div class="col-md-6">
{!! FormField::text('proposal_date',['label'=> trans('project.proposal_date')]) !!}
{!! FormField::text('proposal_date', ['label' => trans('project.proposal_date')]) !!}
</div>
<div class="col-md-6">
{!! FormField::price('proposal_value', ['label'=> trans('project.proposal_value')]) !!}
{!! FormField::price('proposal_value', ['label' => trans('project.proposal_value'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
{!! FormField::textarea('description',['label'=> trans('project.description')]) !!}
{!! FormField::textarea('description', ['label' => trans('project.description')]) !!}
</div>
<div class="panel-footer">
{!! Form::submit(trans('project.create'), ['class'=>'btn btn-primary']) !!}
{!! link_to_route('projects.index', trans('app.cancel'), [], ['class'=>'btn btn-default']) !!}
{!! Form::submit(trans('project.create'), ['class' => 'btn btn-primary']) !!}
{!! link_to_route('projects.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) !!}
</div>
</div>
</div>

22
resources/views/projects/edit.blade.php

@ -4,33 +4,33 @@
@section('content')
@include('projects.partials.breadcrumb',['title' => trans('project.edit')])
@include('projects.partials.breadcrumb', ['title' => trans('project.edit')])
<div class="row">
<div class="col-md-7 col-md-offset-2">
{!! Form::model($project, ['route'=>['projects.update', $project->id], 'method' => 'patch']) !!}
{!! Form::model($project, ['route' =>['projects.update', $project->id], 'method' => 'patch']) !!}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ $project->name }}</h3></div>
<div class="panel-body">
{!! FormField::text('name',['label'=> trans('project.name')]) !!}
{!! FormField::textarea('description',['label'=> trans('project.description'),'rows' => 3]) !!}
{!! FormField::text('name', ['label' => trans('project.name')]) !!}
{!! FormField::textarea('description', ['label' => trans('project.description'),'rows' => 3]) !!}
<div class="row">
<div class="col-md-6">
{!! FormField::text('proposal_date',['label'=> trans('project.proposal_date')]) !!}
{!! FormField::text('proposal_date', ['label' => trans('project.proposal_date')]) !!}
</div>
<div class="col-md-6">
{!! FormField::price('proposal_value', ['label'=> trans('project.proposal_value')]) !!}
{!! FormField::price('proposal_value', ['label' => trans('project.proposal_value'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
<div class="row">
<div class="col-md-3">
{!! FormField::text('start_date',['label'=> trans('project.start_date')]) !!}
{!! FormField::text('start_date', ['label' => trans('project.start_date')]) !!}
</div>
<div class="col-md-3">
{!! FormField::text('end_date',['label'=> trans('project.end_date')]) !!}
{!! FormField::text('end_date', ['label' => trans('project.end_date')]) !!}
</div>
<div class="col-md-6">
{!! FormField::price('project_value', ['label'=> trans('project.project_value')]) !!}
{!! FormField::price('project_value', ['label' => trans('project.project_value'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
<div class="row">
@ -44,10 +44,10 @@
</div>
<div class="panel-footer">
{!! Form::submit(trans('project.update'), ['class'=>'btn btn-primary']) !!}
{!! Form::submit(trans('project.update'), ['class' =>'btn btn-primary']) !!}
{!! link_to_route('projects.show', trans('app.show'), [$project->id], ['class' => 'btn btn-info']) !!}
{!! link_to_route('projects.index', trans('project.back_to_index'), ['status' => $project->status_id], ['class' => 'btn btn-default']) !!}
{!! link_to_route('projects.delete', trans('app.delete'), [$project->id], ['class'=>'btn btn-danger pull-right']) !!}
{!! link_to_route('projects.delete', trans('app.delete'), [$project->id], ['class' =>'btn btn-danger pull-right']) !!}
</div>
</div>
{!! Form::close() !!}

8
resources/views/projects/fees/create.blade.php

@ -35,10 +35,10 @@
) !!}
</div>
<div class="col-md-4">
{!! FormField::text('date',['label'=> trans('payment.date')]) !!}
{!! FormField::text('date', ['label' => trans('payment.date')]) !!}
</div>
<div class="col-md-4">
{!! FormField::price('amount', ['label'=> trans('payment.amount')]) !!}
{!! FormField::price('amount', ['label' => trans('payment.amount'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
<div class="row">
@ -56,8 +56,8 @@
</div>
<div class="panel-footer">
{!! Form::submit(trans('payment.create'), ['class'=>'btn btn-primary']) !!}
{{ link_to_route('projects.payments', trans('app.cancel'), [$project->id], ['class'=>'btn btn-default']) }}
{!! Form::submit(trans('payment.create'), ['class' => 'btn btn-primary']) !!}
{{ link_to_route('projects.payments', trans('app.cancel'), [$project->id], ['class' => 'btn btn-default']) }}
</div>
</div>
{!! Form::close() !!}

6
resources/views/projects/jobs/progress-export-html.blade.php

@ -26,12 +26,12 @@
<th class="text-center">{{ __('job.progress') }}</th>
<th class="text-center">{{ __('project.receiveable_earnings') }}</th>
</tr>
@foreach($jobs->sortByDesc('progress') as $key => $job)
@foreach($jobs as $key => $job)
<tr>
<td class="text-center">{{ 1 + $key }}</td>
<td>{{ $job->name }}</td>
<td class="text-right">{{ formatRp($job->price) }}</td>
<td class="text-center">{{ $job->progress }} %</td>
<td class="text-right">{{ formatDecimal($job->progress) }} %</td>
<td class="text-right">{{ formatRp($job->receiveable_earning) }}</td>
</tr>
@endforeach
@ -40,7 +40,7 @@
<tr>
<th class="text-right" colspan="2">{{ __('app.total') }}</th>
<th class="text-right">{{ formatRp($jobs->sum('price')) }}</th>
<th class="text-center">{{ formatDecimal($project->getJobOveralProgress()) }} %</th>
<th class="text-right">{{ formatDecimal($project->getJobOveralProgress()) }} %</th>
<th class="text-right">{{ formatRp($jobs->sum('receiveable_earning')) }}</th>
</tr>
</tfoot>

8
resources/views/subscriptions/create.blade.php

@ -11,7 +11,7 @@
<div class="row">
<div class="col-md-4">
{!! Form::open(['route'=>'subscriptions.store']) !!}
{!! Form::open(['route' => 'subscriptions.store']) !!}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ trans('subscription.create') }}</h3></div>
<div class="panel-body">
@ -20,7 +20,7 @@
{!! FormField::text('name', ['label' => trans('subscription.name')]) !!}
</div>
<div class="col-sm-6">
{!! FormField::price('price', ['label' => trans('subscription.price')]) !!}
{!! FormField::price('price', ['label' => trans('subscription.price'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
<div class="row">
@ -38,8 +38,8 @@
</div>
<div class="panel-footer">
{!! Form::submit(trans('subscription.create'), ['class'=>'btn btn-primary']) !!}
{!! link_to_route('subscriptions.index', trans('app.cancel'), [], ['class'=>'btn btn-default']) !!}
{!! Form::submit(trans('subscription.create'), ['class' => 'btn btn-primary']) !!}
{!! link_to_route('subscriptions.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) !!}
</div>
</div>
{!! Form::close() !!}

22
resources/views/subscriptions/edit.blade.php

@ -10,37 +10,37 @@
@if (request('action') == null)
<div class="row">
<div class="col-md-6">
{!! Form::model($subscription, ['route'=>['subscriptions.update', $subscription->id], 'method' => 'patch']) !!}
{!! Form::model($subscription, ['route' => ['subscriptions.update', $subscription->id], 'method' => 'patch']) !!}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{{ $pageTitle }}</h3></div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">{!! FormField::radios('type_id', SubscriptionType::toArray(), ['label' => trans('subscription.type'), 'value' => Request::get('type_id')]) !!}</div>
<div class="col-md-6">{!! FormField::radios('status_id', [trans('app.in_active'), trans('app.active')],['label' => trans('app.status')]) !!}</div>
<div class="col-md-6">{!! FormField::radios('status_id', [trans('app.in_active'), trans('app.active')], ['label' => trans('app.status')]) !!}</div>
</div>
<div class="row">
<div class="col-sm-6">
{!! FormField::text('name',['label' => trans('subscription.name')]) !!}
{!! FormField::text('name', ['label' => trans('subscription.name')]) !!}
</div>
<div class="col-sm-6">
{!! FormField::price('price',['label' => trans('subscription.price')]) !!}
{!! FormField::price('price', ['label' => trans('subscription.price'), 'currency' => Option::get('money_sign', 'Rp')]) !!}
</div>
</div>
<div class="row">
<div class="col-sm-6">
{!! FormField::text('start_date',['label' => trans('subscription.start_date')]) !!}
{!! FormField::text('start_date', ['label' => trans('subscription.start_date')]) !!}
</div>
<div class="col-sm-6">
{!! FormField::text('due_date',['label' => trans('subscription.due_date')]) !!}
{!! FormField::text('due_date', ['label' => trans('subscription.due_date')]) !!}
</div>
</div>
{!! FormField::select('project_id', $projects,['label' => trans('subscription.project')]) !!}
{!! FormField::select('vendor_id', $vendors,['label' => trans('subscription.vendor')]) !!}
{!! FormField::textarea('notes',['label' => trans('subscription.notes')]) !!}
{!! FormField::select('project_id', $projects, ['label' => trans('subscription.project')]) !!}
{!! FormField::select('vendor_id', $vendors, ['label' => trans('subscription.vendor')]) !!}
{!! FormField::textarea('notes', ['label' => trans('subscription.notes')]) !!}
</div>
<div class="panel-footer">
{!! Form::submit(trans('subscription.update'), ['class'=>'btn btn-primary']) !!}
{!! Form::submit(trans('subscription.update'), ['class' => 'btn btn-primary']) !!}
</div>
</div>
{!! Form::close() !!}
@ -49,7 +49,7 @@
<legend>@lang('app.action')</legend>
<p>{!! link_to_route('subscriptions.show', trans('subscription.back_to_show'), [$subscription->id], ['class' => 'btn btn-info']) !!}</p>
<p>{!! link_to_route('subscriptions.index', trans('subscription.back_to_index'), [], ['class' => 'btn btn-default']) !!}</p>
<p>{!! link_to_route('subscriptions.edit', trans('subscription.delete'), [$subscription->id, 'action' => 'delete'], ['class'=>'btn btn-danger']) !!}</p>
<p>{!! link_to_route('subscriptions.edit', trans('subscription.delete'), [$subscription->id, 'action' => 'delete'], ['class' => 'btn btn-danger']) !!}</p>
</div>
</div>
@endif

Loading…
Cancel
Save