@extends('layouts/contentLayoutMaster') @section('title', 'Job') @section('vendor-style') @endsection @section('page-style') {{-- Page Css files --}} @endsection @section('content')
@php $groups = App\Models\JobGroup::pluck('name', 'id')->all(); $subjects = App\Models\JobSubject::pluck('name', 'id')->all(); $types = App\Models\JobType::pluck('name', 'id')->all(); @endphp

Job Details

Request Info
Reference Info
Date Info
@include('content.partial.form-message')

Activities & Actions     @can('Subsystem - Jobs - Edit') Add Activity @endcan

@php $i = 0; @endphp @foreach( $job_activities as $job_activity ) @php $i++; @endphp
{{ $i }} {{ $job_activity->description }} Dead line: {{ $job_activity->start_date }}
{{ $job_activity->end_date }}

Next Follow: {{ $job_activity->next_follow_date }}
Progress: {{ number_format( $job_activity->progress_percent, 2 ) }}

Importance: {{ number_format( $job_activity->weight, 2 ) }}
Priority: {{ $job_activity->jobType->name }}

Status: {{ $job_activity->confirm ? "Confirm" : "UnConfirm" }}
Attachment: @php $files = App\Models\JobFile::where('for', '=', 'activity')->where('for_id', '=', $job_activity->id)->get(); @endphp @foreach( $files as $file ) {{ $file->name }} @can('Subsystem - Jobs - Edit')
@csrf @method('delete')
@endcan @endforeach
User: @php $users = App\Models\JobUser::where('activity_id', '=', $job_activity->id)->get(); @endphp @foreach( $users as $user ) {{ $user->user->name }} @can('Subsystem - Jobs - Edit')
@csrf @method('delete')
@endcan @endforeach
Action: @can('Subsystem - Jobs - Edit') @endcan   @can('Subsystem - Jobs - Edit') @endcan   @can('Subsystem - Jobs - Edit') @endcan   @can('Subsystem - Jobs - Edit')
@csrf @method('delete')
@endcan
@can('Subsystem - Jobs - User View') @if( !$job_activity->confirm && $job_activity->jobUsers->where('user_id', '=', auth()->user()->id)->first() ) Add Action @endif @endcan
@php $actions = App\Models\JobAction::where('activity_id', '=', $job_activity->id)->orderBy('updated_at', 'asc')->get(); $j = 0; @endphp @foreach( $actions as $action ) @php $j++; @endphp @endforeach
Row Action Date Performer Action Attachment Remark
{{ $j }} {{ $action->updated_at }} {{ $action->user->name }} {!! $action->action !!} @php $files = App\Models\JobFile::where('for', '=', 'action')->where('for_id', '=', $action->id)->get(); @endphp @foreach( $files as $file ) {{ $file->name }} @can('Subsystem - Jobs - User View') @if( !$job_activity->confirm && $action->user_id == auth()->user()->id )
@csrf @method('delete')
@endif @endcan @endforeach
@can('Subsystem - Jobs - User View') @if( !$job_activity->confirm && $action->user_id == auth()->user()->id ) @endif @endcan   @can('Subsystem - Jobs - User View') @if( !$job_activity->confirm && $action->user_id == auth()->user()->id )
@csrf @method('delete')
@endif @endcan
@endforeach
@can('Subsystem - Jobs - Follow')

Follows     Add Follow

@php $follows = App\Models\JobFollow::where('job_id', '=', $job->id)->orderBy('updated_at', 'asc')->get(); $k = 0; @endphp @foreach( $follows as $follow ) @php $k++; @endphp @endforeach
Row Follow Datetime Follower Follow Action
{{ $k }} {{ $follow->updated_at }} {{ $follow->user->name }} {!! $follow->follow !!} @can('Subsystem - Jobs - Follow') @if( $follow->user_id == auth()->user()->id )
@csrf @method('delete')
@endif @endcan
@endcan
@endsection @section('vendor-script') @endsection @section('page-script') @endsection