Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <!--<![endif]-->
- <!-- BEGIN HEAD -->
- <head>
- <meta charset="utf-8"/>
- <title>@yield('title')</title>
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- @include('layouts.partials._css_links')
- <style type="text/css">
- @font-face {
- font-family: 'persian_font';
- src:url("{{asset('public/fonts/aop_font.ttf')}}");
- }
- body, body * {
- font-family: persian_font;
- font-weight: bold;
- background-color:#fff;
- }
- .data-table thead tr.data-row th {
- background: #ddd;
- }
- th,td {
- border: 1px solid #ddd !important;
- }
- .col-md-3 {
- width: 300px;
- }
- thead { display: table-header-group }
- tfoot { display: table-row-group }
- tr { page-break-inside: avoid }
- </style>
- </head>
- <body>
- <div class="page-container">
- <table class="table table-stripped datatable">
- <thead>
- <tr>
- <h4 style="text-align:center;">
- {{$orders['title']}}
- </h4>
- </tr>
- <tr>
- <th>#</th>
- <th>شماره</th>
- <th>تاریخ</th>
- {{-- <th>مدت سپری شده</th> --}}
- {{-- <th>مدت باقیمانده</th> --}}
- <th>استعجالیت</th>
- {{-- <th>وضعیت هدایت</th> --}}
- <th>خلاصه مطلب</th>
- <th>هدایت مقام</th>
- <th style="width:230px;">تعقیب هدایت</th>
- <th>سکتور</th>
- <th>چگونگی</th>
- <th>عملیات</th>
- </tr>
- </thead>
- <tbody>
- @php
- $i=1;
- $not_done ='';
- $in_progress ='';
- $completed ='';
- $copy_not_done ='';
- $copy_in_progress ='';
- $copy_completed ='';
- @endphp
- @foreach($orders as $order)
- @if(gettype($order) == 'string')
- <?php break; ?>
- @endif
- <tr>
- <td>{{$i++}}</td>
- <td>{{$order['number']}}</td>
- <td>{{$order['date']}}</td>
- {{-- <td>{{verta()->parse($order['date'])->subDays(1)->formatDifference()}}</td> --}}
- {{-- <td> --}}
- {{-- @if(isset($order['deadline'])) --}}
- @php
- //$diff = verta()->diffDays(verta()->parse($order['deadline']));
- @endphp
- {{-- @if($diff <= 3)
- <div class="badge badge-danger">{{$diff}} روز</div>
- @elseif($diff <= 7)
- <div class="badge badge-warning">{{$diff}} روز</div>
- @else
- <div class="badge badge-success">{{$diff}} روز</div>
- @endif
- @endif --}}
- {{-- {{isset($order['deadline']) ? verta()->parse($order['deadline'])->subDays(3)->isToday() : ''}} --}}
- {{-- </td> --}}
- <td>
- @if($order['priority']=='emergency')
- <span class="badge badge-danger">عاجل</span>
- @else
- <span class="badge badge-info">عادی</span>
- @endif
- </td>
- {{-- <td> --}}
- {{-- @if($order['status'] == '0')
- <span class="badge badge-danger">اجراء نشده</span>
- @elseif($order['status'] == '1')
- <span class="badge badge-default">در حال اجراء</span>
- @elseif($order['status'] == '2')
- <span class="badge badge-success">اجراء شده</span>
- @endif --}}
- {{-- </td> --}}
- <td>{{$order['summary']}}</td>
- <td>{{$order['order_remark']}}</td>
- <td >
- <ul style="list-style-type: none;padding:0;">
- {{-- @if ($order['recipient_id'] == $request['recipient'] || !$request['recipient']) --}}
- @php
- // original recipient conditions
- $original_sector_based_recipients = null;
- if(isset($request['sector'])) {
- $sector = App\Sector::find($request['sector']);
- $original_sector_based_recipients = ($request['sector'] != null && in_array($order['recipient_id'], $sector->recipients->pluck('id')->toArray()));
- }
- $original_status = ($request['status'] != null && $request['status'] == $order['status']);
- $original_recipients = ($request['recipient'] != null && $order['recipient_id'] == $request['recipient']);
- @endphp
- {{-- sector --}}
- @if($original_sector_based_recipients && $original_status)
- @php
- if($order['status'] == '0') {
- $title = 'اجراء نشده';
- $color_class = 'badge-danger';
- $not_done++;
- }
- else if($order['status'] == '1') {
- $title = 'در حال اجراء';
- $color_class = 'badge-default';
- $in_progress++;
- }
- else if($order['status'] == '2') {
- $title = 'اجراء شده';
- $color_class = 'badge-success';
- $completed++;
- }
- @endphp
- <li style="border-bottom: 1px dashed #ddd;padding-bottom:5px;margin-bottom:5px;">
- <a class="{{$order['status']==2 ? 'isDisabled': ''}} badge badge-{{$order['status'] == '1' ? 'default' : ($order['status'] == '2' ? 'success' : 'danger') }} followup" title="تعقیب هدایت" style="" id="original-{{$order['id']}}-{{$order['recipient']->name_dr}}" data-toggle="modal" href="#responsive">
- {{$order['recipient']->name_dr}} (اصلی)
- <i class="{{$order['status']==2 ? 'fa fa-check': ''}}"></i>
- </a>
- <span style="">{{$order['follow_ups']->count()}}</span>
- </li>
- @elseif($original_recipients && $original_status)
- @php
- if($order['status'] == '0') {
- $title = 'اجراء نشده';
- $color_class = 'badge-danger';
- $not_done++;
- }
- else if($order['status'] == '1') {
- $title = 'در حال اجراء';
- $color_class = 'badge-default';
- $in_progress++;
- }
- else if($order['status'] == '2') {
- $title = 'اجراء شده';
- $color_class = 'badge-success';
- $completed++;
- }
- @endphp
- <li style="border-bottom: 1px dashed #ddd;padding-bottom:5px;margin-bottom:5px;">
- <a class="{{$order['status']==2 ? 'isDisabled': ''}} badge badge-{{$order['status'] == '1' ? 'default' : ($order['status'] == '2' ? 'success' : 'danger') }} followup" title="تعقیب هدایت" style="" id="original-{{$order['id']}}-{{$order['recipient']->name_dr}}" data-toggle="modal" href="#responsive">
- {{$order['recipient']->name_dr}} (اصلی)
- <i class="{{$order['status']==2 ? 'fa fa-check': ''}}"></i>
- </a>
- <span style="">{{$order['follow_ups']->count()}}</span>
- </li>
- @else
- @if($original_sector_based_recipients && !($request['recipient'] || $request['status']))
- @php
- if($order['status'] == '0') {
- $title = 'اجراء نشده';
- $color_class = 'badge-danger';
- $not_done++;
- }
- else if($order['status'] == '1') {
- $title = 'در حال اجراء';
- $color_class = 'badge-default';
- $in_progress++;
- }
- else if($order['status'] == '2') {
- $title = 'اجراء شده';
- $color_class = 'badge-success';
- $completed++;
- }
- @endphp
- <li style="border-bottom: 1px dashed #ddd;padding-bottom:5px;margin-bottom:5px;">
- <a class="{{$order['status']==2 ? 'isDisabled': ''}} badge badge-{{$order['status'] == '1' ? 'default' : ($order['status'] == '2' ? 'success' : 'danger') }} followup" title="تعقیب هدایت" style="" id="original-{{$order['id']}}-{{$order['recipient']->name_dr}}" data-toggle="modal" href="#responsive">
- {{$order['recipient']->name_dr}} (اصلی)
- <i class="{{$order['status']==2 ? 'fa fa-check': ''}}"></i>
- </a>
- <span style="">{{$order['follow_ups']->count()}}</span>
- </li>
- @endif
- @if($original_recipients && !(isset($request['sector']) ? $request['sector'] : false || $request['status']))
- @php
- if($order['status'] == '0') {
- $title = 'اجراء نشده';
- $color_class = 'badge-danger';
- $not_done++;
- }
- else if($order['status'] == '1') {
- $title = 'در حال اجراء';
- $color_class = 'badge-default';
- $in_progress++;
- }
- else if($order['status'] == '2') {
- $title = 'اجراء شده';
- $color_class = 'badge-success';
- $completed++;
- }
- @endphp
- <li style="border-bottom: 1px dashed #ddd;padding-bottom:5px;margin-bottom:5px;">
- <a class="{{$order['status']==2 ? 'isDisabled': ''}} badge badge-{{$order['status'] == '1' ? 'default' : ($order['status'] == '2' ? 'success' : 'danger') }} followup" title="تعقیب هدایت" style="" id="original-{{$order['id']}}-{{$order['recipient']['name_dr']}}" data-toggle="modal" href="#responsive">
- {{$order['recipient']['name_dr']}} (اصلی)
- <i class="{{$order['status']==2 ? 'fa fa-check': ''}}"></i>
- </a>
- <span style="">{{count($order['follow_ups'])}}</span>
- </li>
- @endif
- @if($original_status && !($request['recipient'] || $request['sector']))
- @php
- if($order['status'] == '0') {
- $title = 'اجراء نشده';
- $color_class = 'badge-danger';
- $not_done++;
- }
- else if($order['status'] == '1') {
- $title = 'در حال اجراء';
- $color_class = 'badge-default';
- $in_progress++;
- }
- else if($order['status'] == '2') {
- $title = 'اجراء شده';
- $color_class = 'badge-success';
- $completed++;
- }
- @endphp
- <li style="border-bottom: 1px dashed #ddd;padding-bottom:5px;margin-bottom:5px;">
- <a class="{{$order['status']==2 ? 'isDisabled': ''}} badge badge-{{$order['status'] == '1' ? 'default' : ($order['status'] == '2' ? 'success' : 'danger') }} followup" title="تعقیب هدایت" style="" id="original-{{$order['id']}}-{{$order['recipient']->name_dr}}" data-toggle="modal" href="#responsive">
- {{$order['recipient']->name_dr}} (اصلی)
- <i class="{{$order['status']==2 ? 'fa fa-check': ''}}"></i>
- </a>
- <span style="">{{$order['follow_ups']->count()}}</span>
- </li>
- @endif
- @endif
- @foreach (App\OrderCopy::where('order_id', $order['id'])->recipientsInSector(isset($request['sector']) ? $request['sector'] : '')->recipient($request['recipient'])->status($request['status'])->get() as $item)
- <li style="border-bottom: 1px dashed #ddd;padding-bottom:5px;margin-bottom:5px;">
- <a class="{{$item->status==2 ? 'isDisabled': ''}} badge badge-{{$item->status == '1' ? 'default' : ($item->status == '2' ? 'success' : 'danger') }} followup" title="تعقیب هدایت" style="" id="copy-{{$item->id}}-{{$item->recipient->name_dr}}" data-toggle="modal" href="#responsive">
- {{$item->recipient->name_dr}}
- <i class="{{$item->status==2 ? 'fa fa-check': ''}}"></i>
- </a>
- <span style="">{{$item->follow_ups->count()}}</span>
- </li>
- @php
- if($item->status == '0') {
- $title = 'اجراء نشده';
- $color_class = 'badge-danger';
- $copy_not_done++;
- }
- else if($item->status == '1') {
- $title = 'در حال اجراء';
- $color_class = 'badge-default';
- $copy_in_progress++;
- }
- else if($item->status == '2') {
- $title = 'اجراء شده';
- $color_class = 'badge-success';
- $copy_completed++;
- }
- @endphp
- @endforeach
- </ul>
- </td>
- <td>
- {{$order['sector']['name_dr']}}
- </td>
- <td>{{$order['type'] == '0' ? 'کتبی' : 'شفاهی'}}</td>
- <td style="text-align: center;">
- <a class="fancybox-button" href="{{route('show_order', $order['id'])}}">
- <i style="font-size: 1.1em;" class="icon-eye font-green-jungle"></i>
- </a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <div class="row">
- <div class="col-md-3">
- <table class="table">
- <tbody>
- <tr>
- <th colspan="4" style="text-align: center;font-size:1.3em">میزان فیصدی اجراآت</th>
- </tr>
- <tr>
- <th style="font-size:1.3em;">اجراشده</th>
- <td>{{ (int)$completed + (int)$copy_completed}}</td>
- </tr>
- <tr>
- <th style="font-size:1.3em;">در حال اجراء</th>
- <td>{{ (int)$in_progress + (int)$copy_in_progress}}</td>
- </tr>
- <tr>
- <th style="font-size:1.3em;">نا اجراء</th>
- <td>{{ (int)$not_done + (int)$copy_not_done}}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement