72 lines
3.4 KiB
PHP
72 lines
3.4 KiB
PHP
@extends('layouts.app')
|
|
@section('title', __('advancedplanning::lang.capacity_resources'))
|
|
@section('content')
|
|
@include('advancedplanning::layouts.nav')
|
|
@php $util = app(\Modules\AdvancedPlanning\Utils\AdvancedPlanningUtil::class); @endphp
|
|
<section class="content-header">
|
|
<h1>@lang('advancedplanning::lang.capacity_resources')</h1>
|
|
</section>
|
|
<section class="content">
|
|
@if(session('status'))
|
|
<div class="alert alert-{{ session('status.success') ? 'success' : 'warning' }} alert-dismissible">
|
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
{{ session('status.msg') }}
|
|
</div>
|
|
@endif
|
|
|
|
<div class="box box-primary">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">@lang('advancedplanning::lang.capacity_resources')</h3>
|
|
<div class="box-tools">
|
|
@can('ap.resources.manage')
|
|
<form action="{{ action([\Modules\AdvancedPlanning\Http\Controllers\CapacityResourceController::class, 'sync']) }}" method="POST" style="display:inline;">
|
|
@csrf
|
|
<button type="submit" class="btn btn-info btn-sm">
|
|
<i class="fa fa-refresh"></i> @lang('advancedplanning::lang.sync_from_ie')
|
|
</button>
|
|
</form>
|
|
<a href="{{ action([\Modules\AdvancedPlanning\Http\Controllers\CapacityResourceController::class, 'create']) }}" class="btn btn-primary btn-sm">
|
|
<i class="fa fa-plus"></i> @lang('advancedplanning::lang.add_resource')
|
|
</a>
|
|
@endcan
|
|
</div>
|
|
</div>
|
|
<div class="box-body table-responsive">
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('advancedplanning::lang.name')</th>
|
|
<th>@lang('advancedplanning::lang.type')</th>
|
|
<th>@lang('advancedplanning::lang.daily_capacity')</th>
|
|
<th>@lang('advancedplanning::lang.efficiency')</th>
|
|
<th>@lang('advancedplanning::lang.effective_capacity')</th>
|
|
<th>@lang('advancedplanning::lang.active')</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($resources as $resource)
|
|
<tr>
|
|
<td>{{ $resource->name }}</td>
|
|
<td>{{ $util->resourceTypeLabel($resource->resource_type) }}</td>
|
|
<td>{{ number_format($resource->daily_capacity_hours, 2) }}</td>
|
|
<td>{{ number_format($resource->efficiency_pct, 1) }}%</td>
|
|
<td>{{ number_format($resource->effectiveDailyHours(), 2) }}</td>
|
|
<td>
|
|
@if($resource->is_active)
|
|
<span class="label label-success">@lang('advancedplanning::lang.yes')</span>
|
|
@else
|
|
<span class="label label-default">@lang('advancedplanning::lang.no')</span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="6" class="text-center">@lang('advancedplanning::lang.no_records')</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
{{ $resources->links() }}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|