@extends('layouts.masterNew', ['vueView' => 'opportunities-index']) @section('content')
@include('Opportunities.filterForm')
@if($isAllowedToSeePrivateColumns) Change View @endif {{ $opportunity->total() }} Results - {{ $opportunity->appends(request()->input())->links() }}
@if($isAllowedToSeePrivateColumns) @endif @if($isAllowedToSeePrivateColumns) @endif @if($isAllowedToSeePrivateColumns) @endif @foreach($opportunity as $opportunityItem) {{-- Add. Compensation: --}} @if($isAllowedToSeePrivateColumns) @endif @if($isAllowedToSeePrivateColumns) {{-- We want the phone and email icons to be in their own "column" so that's what we're doing here: --}} @endif @if($isAllowedToSeePrivateColumns) @endif @if($isAllowedToSeePrivateColumns)
Brand/Co Type Project Name Date (if applicable) Budget Add. Compensation DescriptionBuyer Contact {{-- Email --}} {{-- Phone --}}Entered by Status
Notes
Edit
  {{-- only show brands if the current user is allowed to see private columns OR [the user is not allowed to see private columns and the "display brands outside dept" is set to true] --}} @if($isAllowedToSeePrivateColumns == true || ($isAllowedToSeePrivateColumns == false && $opportunityItem->display_brands_outside_department == true)) @foreach($opportunityItem->brands as $brand) {{ $brand->name }}@if (!$loop->last), @endif @endforeach @else [hidden] @endif {{ $opportunityItem->type->name }} {{ $opportunityItem->name }} @if($opportunityItem->date_start) {{ $opportunityItem->date_start }} @endif @if($opportunityItem->date_start && $opportunityItem->date_end) to
@endif @if($opportunityItem->date_end) {{ $opportunityItem->date_end }} @endif
@if($opportunityItem->budget_min) ${{ number_format($opportunityItem->budget_min) }} @endif @if($opportunityItem->budget_min && $opportunityItem->budget_max) to @endif @if($opportunityItem->budget_max) ${{ number_format($opportunityItem->budget_max) }} @endif{{ $opportunityItem->budget_notes }} @if($opportunityItem->description) {{ str_limit($opportunityItem->description, 250) }} @endif @if($opportunityItem->userHasPermission($currentUser)) @foreach($opportunityItem->companyContacts as $companyContact) @if($companyContact->company)
{{ $companyContact->company->name }}
@endif @endforeach @endif
@if($opportunityItem->userHasPermission($currentUser)) @foreach($opportunityItem->companyContacts as $companyContact) @if($companyContact->contact) {{ $companyContact->contact->name }} @if (!$loop->last)
@endif @endif @endforeach @endif
@if($opportunityItem->userHasPermission($currentUser)) @foreach($opportunityItem->companyContacts as $companyContact) @if($companyContact->contact) @if($companyContact->contact->phone) @else
@endif @endif @endforeach @endif
@if($opportunityItem->userHasPermission($currentUser)) @foreach($opportunityItem->companyContacts as $companyContact) @if($companyContact->contact) @if($companyContact->contact->email1) @else
@endif @endif @endforeach @endif
@foreach($opportunityItem->users as $user) {{ $user->first_name }} {{ $user->last_name }}@if (!$loop->last), @endif @endforeach {{ $opportunityItem->status->name }} @if($opportunityItem->userHasPermission($currentUser)) @if($opportunityItem->department_notes)
@endif @endif
@if($opportunityItem->userHasPermission($currentUser)) {{-- --}}