@extends('layouts.app') @section('title', trans('project.features') . ' | ' . $project->name) @section('content') @include('projects.partials.breadcrumb',['title' => trans('project.features')])

{!! html_link_to_route('features.create', trans('feature.create'), [$project->id], ['class' => 'btn btn-primary','icon' => 'plus']) !!} {!! html_link_to_route('features.add-from-other-project', trans('feature.add_from_other_project'), [$project->id], ['class' => 'btn btn-primary','icon' => 'plus']) !!}
{{ $project->name }} {{ trans('project.features') }}

@include('projects.partials.nav-tabs') @foreach($features->groupBy('type_id') as $key => $groupedFeatures)
{!! link_to_route('projects.features-export', trans('project.features_export_html'), [$project->id, 'html', 'feature_type' => $key], ['class' => '','target' => '_blank']) !!} | {!! link_to_route('projects.features-export', trans('project.features_export_excel'), [$project->id, 'excel', 'feature_type' => $key], ['class' => '']) !!} | {!! link_to_route('projects.features-export', trans('project.features_export_progress_excel'), [$project->id, 'excel-progress', 'feature_type' => $key], ['class' => '']) !!}

{{ $key == 1 ? 'Daftar Fitur' : 'Fitur Tambahan' }}

{{-- --}} @forelse($groupedFeatures as $key => $feature) @php $no = 1 + $key; $feature->progress = $feature->tasks->avg('progress'); @endphp progress <= 50 ? 'style="background-color: #faebcc"' : '' !!}> {{-- --}} @empty @endforelse
{{ trans('app.table_no') }} {{ trans('feature.name') }} {{ trans('feature.tasks_count') }} {{ trans('feature.progress') }} {{ trans('feature.price') }}{{ trans('feature.worker') }}{{ trans('app.action') }}
{{ $no }} {{ $feature->name }} @if ($feature->tasks->isEmpty() == false)
    @foreach($feature->tasks as $task)
  • {{ $task->name }}
  • @endforeach
@endif
{{ $feature->tasks_count = $feature->tasks->count() }} {{ formatDecimal($feature->progress) }} % {{ formatRp($feature->price) }}{{ $feature->worker->name }} {!! html_link_to_route('features.show', '',[$feature->id],['icon' => 'search', 'title' => 'Lihat ' . trans('feature.show'), 'class' => 'btn btn-info btn-xs','id' => 'show-feature-' . $feature->id]) !!} {!! html_link_to_route('features.edit', '',[$feature->id],['icon' => 'edit', 'title' => trans('feature.edit'), 'class' => 'btn btn-warning btn-xs']) !!}
{{ trans('feature.empty') }}
Total {{ $groupedFeatures->sum('tasks_count') }} {{ formatDecimal($groupedFeatures->sum('progress') / $groupedFeatures->count()) }} % ({{ formatDecimal($project->getFeatureOveralProgress()) }} %) {{ formatRp($groupedFeatures->sum('price')) }}
@endforeach @endsection @section('ext_js') {!! Html::script(url('assets/js/plugins/jquery-ui.min.js')) !!} @endsection @section('script') @endsection