@extends('layouts.app') @section('title', __('dashboard.sidebar_raw_materials')) @section('page_heading', __('dashboard.sidebar_raw_materials')) @section('content') @php $currentState = $state ?? request('state', 'active'); @endphp
{{ __('dashboard.sidebar_raw_materials') }} {{ number_format($materials->total()) }}
@foreach(['active' => __('dashboard.status_active'), 'trashed' => __('dashboard.status_deleted'), 'all' => __('dashboard.all')] as $val => $lbl) {{ $lbl }} @endforeach
@can('create raw materials') {{ __('dashboard.purchase_request') }} {{ __('dashboard.add_new_material') }} @endcan
@if($materials->isEmpty())
@include('layouts.partials.index-empty-state',['icon'=>'fa-solid fa-box','title'=>__('dashboard.no_materials_found'),'message'=>''])
@else
@foreach(['#',__('dashboard.name'),__('dashboard.unit_of_measure'),__('dashboard.current_stock'),'تكلفة الوحدة'] as $h) @endforeach @foreach($materials as $m) @endforeach
{{ $h }}{{ __('dashboard.actions') }}
{{ $loop->iteration }}
{{ $m->name }}
@if($m->trashed()){{ __('dashboard.deleted') }}@endif
{{ $m->unitOfMeasure->name }} {{ $m->stock }} {{ number_format((float)$m->unit_cost, 2) }} @if($m->trashed())
@csrf
@else
@can('view raw materials'){{ __('dashboard.history') }}@endcan @can('edit raw materials'){{ __('dashboard.edit') }}@endcan @can('delete raw materials')
@csrf @method('DELETE')
@endcan
@endif
{{ $materials->appends(request()->query())->links() }}
@endif
@endsection