@php $viewLeadAgentPermission = user()->permission('view_lead_agents'); $viewLeadCategoryPermission = user()->permission('view_lead_category'); $viewLeadSourcesPermission = user()->permission('view_lead_sources'); $addLeadAgentPermission = user()->permission('add_lead_agent'); $addLeadSourcesPermission = user()->permission('add_lead_sources'); $addLeadCategoryPermission = user()->permission('add_lead_category'); $addProductPermission = user()->permission('add_product'); $changeDealStagesPermission = user()->permission('change_deal_stages'); @endphp

@lang('modules.deal.dealDetails')

{{--
@foreach ($leadContacts as $leadContact) @endforeach
--}}
@foreach ($leadPipelines as $pipeline) @endforeach
@foreach ($stages as $stage) @endforeach
@if ($viewLeadCategoryPermission != 'none')
@if ($addLeadCategoryPermission == 'all' || $addLeadCategoryPermission == 'added') @endif
@endif @if ($canAssignDeal) {{-- Admins & managers may reassign the agent (loaded per category via ajax) --}} @if ($viewLeadAgentPermission != 'none')
@if ($addLeadAgentPermission == 'all' || $addLeadAgentPermission == 'added') @endif
@endif @else {{-- Regular employees cannot reassign; show the current agent read-only --}}
@endif
{{!is_null($deal->currency_id) ? $deal->currency->currency_code : company()->currency->currency_code}} ({{ !is_null($deal->currency_id) ? $deal->currency->currency_symbol : company()->currency->currency_symbol }})
@if(in_array('products', user_modules()) || in_array('purchase', user_modules()))
{{-- @if ($addProductPermission == 'all' || $addProductPermission == 'added') @lang('app.add') @endif --}}
@endif
@if ($canAssignDeal) @php($watcherIds = $employees->pluck('id')->toArray()) {{-- Keep the current watcher selectable even if not in the scoped list --}} @if ($dealWatcherUser && !in_array($deal->deal_watcher, $watcherIds)) @endif @foreach ($employees as $item) @endforeach @else {{-- Regular employees cannot reassign; show the current watcher read-only --}} @endif
@lang('app.save') @lang('app.cancel')