@extends('layouts.main') @section('title', 'Okis 3.0 | Neuigkeiten und Aufgaben') @section('content')

Neuigkeiten und Aufgaben

@include('flash_message')
@method('PUT') @csrf @php /* ---------------------------------------------------------------------------------------------- */ $request_model = App\Models\News::where('id', Request::get('news_id'))->where('publisher', auth()->user()->id)->first(); $request_model_target = $request_model ? ($request_model->target === 'all' ? 'all' : ( explode(',' , str_replace(',,', ',' , ltrim($request_model->target, ',') ) ) ) ) : false; $request_model_read = $request_model ? explode(',' , str_replace(',,', ',' , ltrim($request_model->read, ',') ) ) : false; $request_model_confirmed = $request_model ? explode(',' , str_replace(',,', ',' , ltrim($request_model->confirmed, ',') ) ) : false; $request_model_accepted = $request_model ? $request_model->accepted : false; /* ---------------------------------------------------------------------------------------------- */ @endphp @if($request_model) @endif
@php /* ---------------------------------------------------------------- */ $col_name = 'Inhalt'; $db_col = 'text'; /* ---------------------------------------------------------------- */ @endphp
@includeIf('layouts.components.inputs', [ 'input_type' => 'textarea', 'input_id' => $db_col, 'input_name' => $db_col, 'label' => 'Inhalt', 'value' => $request_model->$db_col ?? '', 'text_editor' => true, ])
@php /* ---------------------------------------------------------------- */ $col_name = 'Typ'; $db_col = 'priority'; /* ---------------------------------------------------------------- */ @endphp
@error('{{ $db_col }}')
{{ $message }}
@enderror
@php /* ---------------------------------------------------------------- */ $col_name = 'Wiedervorlage'; $db_col = 'resubmission'; /* ---------------------------------------------------------------- */ @endphp
@error('{{ $db_col }}')
{{ $message }}
@enderror
@php /* ---------------------------------------------------------------- */ $col_name = 'Kunde'; $db_col = 'kuid'; /* ---------------------------------------------------------------- */ @endphp
@error('{{ $db_col }}')
{{ $message }}
@enderror
@php /* ---------------------------------------------------------------- */ $col_name = 'Ziel'; $db_col = 'target[]'; /* ---------------------------------------------------------------- */ @endphp
@foreach ($users as $index => $user) @if ($user->id === 1000)
id, $request_model_target) ? 'checked' : '')) : '' }}>
user()->id, $request_model_target) ? 'checked' : '')) : '' }}>
@endif @endforeach
@foreach ($users as $index => $user) @if($user->id > 1000 && auth()->user()->id !== $user->id)
id, $request_model_target) ? 'checked' : '')) : '' }}>
@endif @endforeach @if (auth()->user()->id !== 1)
@endif
@error('target')
{{ $message }}
@enderror
{{ $col_name }} darf nicht leer sein!
@php /* --------------------------------------------------------------------------- */ $col_name = 'Erstellungsdatum'; $db_col = 'created_at'; /* --------------------------------------------------------------------------- */ @endphp
@if( $request_model )

{{ $col_name }}: {{ $request_model->$db_col }}

@endif
@php /* --------------------------------------------------------------------------- */ $col_name = 'zulätzt aktualisiert'; $db_col = 'updated_at'; /* --------------------------------------------------------------------------- */ @endphp
@if( $request_model )

{{ $col_name }}: {{ $request_model->$db_col }}

@endif
@endsection @section('js-scripts') @endsection