소스 검색

Merge branch 'master' of https://revinr.site/mostafij-revinr/student-admission

Israat Zarin 1 년 전
부모
커밋
8672cdbea8
1개의 변경된 파일26개의 추가작업 그리고 1개의 파일을 삭제
  1. 26 1
      resources/views/supervisor/student_proposal_details.blade.php

+ 26 - 1
resources/views/supervisor/student_proposal_details.blade.php

@@ -246,8 +246,33 @@
                                     </div>
                                     <div class="single_glance_row mt-1" style="display: flex; width: 100%;">
                                         <span class="title" style="font-size:11px; font-weight: 600;">Work Experience:</span>
+
+                                        @php    
+                                            $work_history_first =$proposal_details->work_experience_date()->whereNotNull('start_date')->oldest()->first();
+
+                                            $work_history_last =$proposal_details->work_experience_date()->latest()->first();
+                                            if($work_history_first && $work_history_last && $work_history_last->end_date){
+
+                                            $diff_in_days =diff_in_days($work_history_first->start_date,$work_history_last->end_date);
+
+                                            }elseif($work_history_first){
+                                            $diff_in_days =diff_in_days($work_history_first->start_date, now());
+                                            }else{
+                                            $diff_in_days =0;
+                                            }
+
+                                            $years = ($diff_in_days / 365) ;
+                                            $years = floor($years);
+                                            $month = ($diff_in_days % 365) / 30.5;
+                                            $month = floor($month);
+                                            $days = ($diff_in_days % 365) % 30.5;
+                                            
+                                        @endphp
                                         @if($proposal_details->student_details->is_work_experience ==1)
-                                            <span class="label_badge_radius" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">yes</span>
+                                            <span class="label_badge_radius" style="background: #e7f3ea !important; color: #0ba52e; margin-left: 3px; position: absolute !important; right: 23px;">{{$years}} years</span>
+                                            <span style="font-size: 12px; color: #868e96;"> 
+                                                ({{ dDate($work_history_first->start_date) }} - {{dDate($work_history_last->end_date, 'd M Y', 'Continue')}})
+                                            </span>
                                         @else
                                             <span class="label_badge_radius" style="background: #f1ac93 !important; color: #f80707; margin-left: 3px; position: absolute !important; right: 23px;">no</span>
                                         @endif