{{-- @dump($dom) --}} @php $table_id = isset($table_id) ? $table_id : uniqid(); //rand(1,100); $documents = $documents ?? App\Models\Document::all(); $dom = $dom ?? 'tip'; $all = strpos($dom, 'f'); $hide_column = isset($hide_column) ? $hide_column : []; $hide_button = isset($hide_button) ? $hide_button : []; $hide_document = isset($hide_document) ? $hide_document : []; @endphp
@if(!in_array('folder', $hide_column)) @endif @if(!in_array('type', $hide_column)) @endif @if(!in_array('action', $hide_column)) @endif @foreach ($documents as $row) @php if(in_array($row->type, $hide_document)) continue; @endphp @if(!in_array('folder', $hide_column)) @endif @if(!in_array('type', $hide_column)) @endif {{-- --}} @if(!in_array('action', $hide_column)) @endif @endforeach
MappaTipusNév Leírás
@php if(isset($row->process)) { $process = $row->process->process_number ?? $row->process->id; $path = str_replace('{process_number}', $process, $row->path).'/'.$row->name; $path = explode('/', $path); $path_text = isset($path[count($path)-3]) ? $path[count($path)-3] : $path[1]; } else { $path_text = str_replace('document/', '', $row->path); } @endphp
{{ mb_substr($path_text ?? '', 0, 10) }}...
@if($row->cancellation_at) (Lemondott) @endif {{ $row->type_lang }}{{ $row->name }} @php // $process = $row->process->process_number ?? $row->process->id; // $path = str_replace('{process_number}', $process, $row->path).'/'.$row->name; // echo ''.'
'.__($row->name) .'
'.'
'; echo ''.'
'.__($row->name) .'
'.'
'; @endphp
{{ mb_substr($row->description ?? '', 0, 10) }}...
{{-- str_replace('App\Models\\', '', $row->target_type) --}} @if( App\Models\Document::types()[$row->type]['actions']['edit'] ) @endif @if( App\Models\Document::types()[$row->type]['actions']['create'] ) @endif @if( App\Models\Document::types()[$row->type]['actions']['delete'] ) @endif
@if(isset($types))
@can('create-document') @if(!in_array('document_migration', $hide_button)) {{-- Dokumentumok átemelése --}} {{-- Ha nincs other_offers vagy az other_offers között nincs olyan amiben van fájl, akkor legyen disabled a gomb --}} @php $other_offers = $offer->process->offers->whereNotIn('id', $offer->id); //$survey = App\Models\Survey::where('offer_id', $offer->id); //dump($survey->get()); $migrate_files_disabled = true; if(isset($other_offers) && $other_offers->count() > 0) { $has_documents = false; foreach ($other_offers as $other_offer) { if($other_offer->documents->count() > 0 || $other_offer->surveys()->count() > 0) { //felmérés mozgatása $has_documents = true; break; } } $has_documents ? $migrate_files_disabled = true : $migrate_files_disabled = false; } else { $migrate_files_disabled = false; } @endphp @endif {{-- Új dokumentum --}} @if(!in_array('document_upload', $hide_button)) @endif @endcan
@endif @push('scripts') @endpush