@extends('layouts.main') @section('content') @if($option == "View") @endif {!! Form::model($document, ['url' => 'outgoing/save', 'class' => 'form-horizontal', 'autocomplete' => 'off', 'id' => 'groupForm', 'files' => true]) !!}
@if(Session::has('unauthorize'))
× {{ Session::get('unauthorize') }}
@endif @if(Session::has('update'))
× {{ Session::get('update') }}
@endif @if(Session::has('success'))
× {{ Session::get('success') }}
@endif

{{ $data['page'] }} | {{ $option }} @if($option == 'View' && $document->d_routingfrom == Auth::user()->u_id)| Edit@elseif($option == 'Edit')| View @endif

@if($option == 'View') @if(count($references) > 0)      Reference Outgoing Document(s):
@foreach($references as $reference)      {{ $reference->d_subject }} @endforeach @endif @endif

Attachment Details

{!! Form::hidden('id', $id) !!} {!! Form::hidden('d_option', $option) !!}
@if($option == 'Add' || $option == 'Edit') {!! Form::text('d_subject', null, ['class' => 'form-control input-sm align-form', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_subject', $option == 'View' ? 'readonly' : '']) !!} @else {!! Form::text('d_subject', null, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('d_subject') }}
@if($option == 'Add' || $option == 'Edit') {!! Form::select('dtypes', $dtypes, $option == 'Edit' || $option == 'View' ? $document->dt_id : NULL, ['class' => 'form-control input-sm chosen-select', 'data-validation' => 'required', $option == 'View' ? 'readonly' : '']) !!} @else {!! Form::text('dt_id', $document->dtypes->dt_type, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('dtypes') }}
@if($option == 'Add')
{!! Form::file('d_file[]', ['class' => 'align-form', 'multiple'=>true]) !!}
{{ $errors->first('d_file') }}
@elseif($option == 'View')
@foreach( $files as $file ) @if( $file->da_file != "" ) @if ( is_file($attachment) ) {{ basename($file->da_file) }}
@else File missing.
@endif @else No file uploaded. @endif @endforeach
{{ $errors->first('da_file') }}
@endif
{!! Form::text('d_documentdate', null, ['class' => 'form-control input-sm', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_documentdate', 'id' => 'd_documentdate', 'maxlength' => '10', 'placeholder' => 'Document Date', 'readonly']) !!}
{{ $errors->first('d_documentdate') }}
{!! Form::text('d_datesent', null, ['class' => 'form-control input-sm', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_datesent', 'id' => 'd_datesent', 'maxlength' => '10', 'placeholder' => 'Date Sent', 'readonly']) !!}
{{ $errors->first('d_datesent') }}
@if($option == 'Add' || $option == 'Edit') {!! Form::text('d_addressee', null, ['class' => 'form-control input-sm', 'id' => 'addressee', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#d_addressee']) !!} @else {!! Form::text('d_addressee', null, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('d_addressee') }} *Note: No need to type 'OTHERS'. Just type the name directly.
@if($option == 'Add') {!! Form::text('c_name', null, ['class' => 'form-control input-sm align-form', 'id' => 'company', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#c_name', $option == 'View' ? 'readonly' : '']) !!} @elseif($option == 'Edit') {!! Form::text('c_name', $document->companies->c_name, ['class' => 'form-control input-sm align-form', 'id' => 'company', 'data-validation' => 'required', 'data-validation-error-msg-container' => '#c_name', $option == 'View' ? 'readonly' : '']) !!} @else {!! Form::text('c_id', $document->companies->c_name, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('c_name') }} *Note: No need to type 'OTHERS'. Just type the company name directly.
{{ $errors->first('d_keywords') }}

Routing Details

@if($option == 'Add') {!! Form::text('d_routingslip', $routingslip, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @else {!! Form::text('d_routingslip', null, ['class' => 'form-control input-sm align-form', 'readonly']) !!} @endif
{{ $errors->first('d_routingslip') }}
@if($option == 'View')
{!! Form::text('u_id', $document->user->u_fname." ".$document->user->u_lname, ['class' => 'form-control input-sm align-form', 'readonly']) !!}
@endif @if($option == 'Add')
@endif
@if($option == 'Edit')

File Attachments

{!! Form::file('d_file[]', ['class' => 'align-form', 'multiple'=>true]) !!}
{{ $errors->first('d_file') }}
@if($attachments->isEmpty())
No existing attachment(s) found.
@else @foreach($attachments as $attachment) @endforeach
Filename Date/Time Uploaded
{{ basename($attachment->da_file) }} {{ date('F d, Y h:i A', strtotime($attachment->created_at)) }}
@if($attachments->render()) @endif @endif
@endif

Remarks

@if($option == 'Add' || $option == 'Edit') {!! Form::textarea('d_remarks', NULL, ['class' => 'form-control input-sm', 'size' => '10x5']) !!} @else {!! Form::textarea('d_remarks', NULL, ['class' => 'form-control input-sm', 'size' => '10x5', 'disabled']) !!} @endif
{{ $errors->first('d_remarks') }}
@if($option == 'Add' || $option == 'Edit')
{!! Form::button(' Save', ['class' => 'btn btn-primary btn-sm', 'type' => 'submit', $option == 'View' ? 'disabled' : '']) !!} Cancel
@endif
@if($option == 'View' || $option == 'Edit')

Notification Details


{!! Form::button(' Notify Other Employees', ['class' => 'btn btn-primary btn-sm', 'type' => 'submit']) !!} Back To Outgoing

Tagged Employees

@if($routes->isEmpty())
No tagged employee(s) found.
@else @if($document->d_routingfrom == Auth::user()->u_id) @endif @foreach($routes as $route) @if($document->d_routingfrom == Auth::user()->u_id) @endif @endforeach
Name Date Invited
{{ $route->seen->u_lname }}, {{ $route->seen->u_fname }} {{ date('F d, Y h:i A', strtotime($route->created_at)) }}
@if($routes->render()) @endif @endif
@endif @if($option == 'View')

Comment Thread

@if(count($comments) == 0)

NO COMMENTS

@else
    @endif

Leave A Comment

{!! Form::textarea('comm_text', NULL, ['class' => 'form-control input-sm', 'size' => '10x7']) !!}
{!! Form::button(' Submit Comment', ['class' => 'btn btn-primary btn-sm', 'type' => 'submit']) !!} Cancel
@if(count($seens) != 0)
@foreach($seens as $seen)

Last seen by {{ $seen->seen->u_fname }} on {{ date('F d, Y H:i A', strtotime($seen->updated_at)) }}

@endforeach
@endif
@endif
{!! Form::close() !!} @stop