{{-- @if (auth()->user()->company->group->logo == 'default.png')--}} {{-- --}} {{-- --}} {{-- {{ config('app.name') }}--}} {{-- --}} {{-- @else--}} {{-- {{ auth()->user()->company->group->name }}--}} {{-- @endif--}} @if(file_exists('uploads/group/'. auth()->user()->company->group->logo)) @else {{ auth()->user()->company->group->name }} @endif
    {{--Leave Application Notification Start--}} @php $approveCount = 0; if (hasPermission("l.applications.approve", $slugs)) { $approveCount = \App\Models\Leave\LeaveApplication::where('recommended_by', '!=' ,"") ->where('approved_by',null) ->where('cancel',0) ->count(); } $usersDesig = optional(auth()->user()->employee)->designation_id; $usersCompany = optional(auth()->user()->employee)->company_id; $leaveApplicantDesig = \App\Models\Leave\ApprovalAuthor\ApplicantDesignation::with('recommender_companies','recommender_companies.recommender_designations') ->whereHas('recommender_companies',function ($q) use($usersCompany,$usersDesig){ $q->whereHas('recommender_designations',function ($sQ) use($usersDesig){ $sQ->where('recommender_designation_id', $usersDesig); })->where('company_id',$usersCompany); })->pluck('applicant_designation_id'); $leaveApplicantCompany = \App\Models\Leave\ApprovalAuthor\ApplicantDesignation::with('recommender_companies','recommender_companies.recommender_designations') ->whereHas('recommender_companies',function ($q) use($usersCompany,$usersDesig){ $q->whereHas('recommender_designations',function ($sQ) use($usersDesig){ $sQ->where('recommender_designation_id', $usersDesig); })->where('company_id',$usersCompany); })->pluck('company_id'); $leave_applications = \App\Models\Leave\LeaveApplication::with('company','employee','employee.company','leave_type') ->whereHas('employee',function ($q) use ($leaveApplicantCompany,$leaveApplicantDesig){ $q->whereIn('company_id',$leaveApplicantCompany)->whereIn('designation_id',$leaveApplicantDesig); }) ->where('recommended_by','=',null) ->where('cancel',0) ->orderByDesc('employee_id')->count(); @endphp {{-- Short Leave--}} @php $usersDesig = optional(auth()->user()->employee)->designation_id; $usersCompany = optional(auth()->user()->employee)->company_id; $applicantDesig = \App\Models\Leave\ShortLeaveAuthor\SLeaveAppDesig::with('s_leave_companies', 's_leave_companies.s_leave_recom_desigs') ->whereHas('s_leave_companies',function ($q) use($usersCompany,$usersDesig){ $q->whereHas('s_leave_recom_desigs',function ($sQ) use($usersDesig){ $sQ->where('recommender_designation_id', $usersDesig); })->where('company_id',$usersCompany); })->pluck('applicant_designation_id'); $applicantCompany = \App\Models\Leave\ShortLeaveAuthor\SLeaveAppDesig::with('s_leave_companies', 's_leave_companies.s_leave_recom_desigs') ->whereHas('s_leave_companies',function ($q) use($usersCompany,$usersDesig){ $q->whereHas('s_leave_recom_desigs',function ($sQ) use($usersDesig){ $sQ->where('recommender_designation_id', $usersDesig); })->where('company_id',$usersCompany); })->pluck('company_id'); $short_leave_applications = 0; if (hasPermission("short.leave.applications.recommend", $slugs)){ $short_leave_applications = \App\Models\Leave\ShortLeaveApplication::with('employee','employee.company', 'employee.department','employee.designation','employee.shortLeaveCount') ->whereHas('employee',function ($q) use ($applicantCompany,$applicantDesig){ $q->whereIn('company_id',$applicantCompany)->whereIn('designation_id',$applicantDesig); }) ->where('adjust',0) ->where('seen_by', null) ->count(); } @endphp {{-- General Store--}} @php $purchaseApprove = 0; if (hasPermission("purchases.approve", $slugs)){ $purchaseApprove = \App\Models\Gs\Purchase::where('is_approved', 0)->count(); } @endphp @php $requsitionApprove = 0; if (hasPermission("create.requisitions.approve", $slugs)){ $requsitionApprove = \App\Models\Gs\GoodsRequisition::where('is_approved', 0)->count(); } @endphp @php $totalCount = $leave_applications + $approveCount + $short_leave_applications + $purchaseApprove + $requsitionApprove; @endphp
  • @if ($totalCount > 0) {{ $totalCount }} @endif
    • {{ $totalCount }} Total Notifications
      • @if (hasPermission("l.applications.recommend", $slugs)) @if ($leave_applications > 0)
      • Leave Recommend {{ $leave_applications }}
      • @endif @endif @if (hasPermission("l.applications.approve", $slugs)) @if ($approveCount > 0)
      • Leave Approve {{ $approveCount }}
      • @endif @endif @if (hasPermission("short.leave.applications.recommend", $slugs)) @if ($short_leave_applications > 0)
      • Short Leave Application {{ $short_leave_applications }}
      • @endif @endif @if (hasPermission("purchases.approve", $slugs)) @if ($purchaseApprove > 0)
      • GS Purchase {{ $purchaseApprove }}
      • @endif @endif @if (hasPermission("create.requisitions.approve", $slugs)) @if ($requsitionApprove > 0)
      • GS Requisition {{ $requsitionApprove }}
      • @endif @endif
  • {{--Leave Application Notification End--}}
  • @if (auth()->user()->employee) @if (auth()->user()->employee->image != 'default.png') @else @endif @else @endif Welcome, {{ auth()->user()->name }}
    • Change Password
    • Logout
      @csrf