@include('new_layouts.header') @php $profile = \App\Models\Utility::get_file('uploads/avatar/'); @endphp

{{ Form::model($tender, ['route' => ['tender.update', $tender->id], 'id' => 'tenderEdit', 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }}
{{--
{{ Form::label('project_id', __('Tender'), ['class' => 'form-label']) }}* @error('project_id')
{{ $message }}
@enderror
--}}
@php $rndColor = Utility::rndRGBColorCode(); @endphp {{ Form::label('type', __('Type'), ['class' => 'form-label']) }}* @error('tender_type')
{{ $message }}
@enderror
{{-- --}} {{-- --}} @php $tr_id = 1; @endphp @forelse ($tenderSubcon as $subcon) @php $main_trade = ($subcon->main_trade != null) ? json_decode($subcon->main_trade) : array(); $sub_division = ($subcon->sub_division != null) ? json_decode($subcon->sub_division) : array(); $incharge_id = ($subcon->incharge_id != null) ? json_decode($subcon->incharge_id) : array(); $file_id = ($subcon->file_id != null) ? json_decode($subcon->file_id) : array(); $file_id_implode = (count($file_id) > 0) ? implode(',',$file_id) : null; $files = \App\Models\TenderFiles::whereIn('id', $file_id)->get(); $subcon_data = json_decode($subcon->subcon_data, true); $subcon_data_array = array(); foreach ($subcon_data as $key => $value) { if(isset($value['subcon_id'])){ $subcon_data_array[] = $value['subcon_id']; } } $subcon_json = (count($subcon_data_array) > 0) ? json_encode($subcon_data_array) : null; @endphp {{-- --}} @php $tr_id++; @endphp @empty {{-- --}} @endforelse
{{ __('#') }}{{ __('Trade') }} {{ __('Sub Division') }}{{ __('Type') }}{{ __('Sub-Contractor') }} {{ __('Incharge') }} {{ __('Upload') }} {{ __('RFQ Message to SC') }} {{ __('Quote Before') }} {{ __('Action') }}
Upload
@foreach ($files as $file)
{{$file->file_name}}   
@endforeach
@if($tr_id == 1) @else @endif
Upload
{{-- @forelse ($tenderSubcon as $subcon) @php $set_multi_count = 1; $main_trade = ($subcon->main_trade != null) ? json_decode($subcon->main_trade) : array(); $sub_division = ($subcon->sub_division != null) ? json_decode($subcon->sub_division) : array(); $check_box_status = $subcon->check_box_status; $file_id = ($subcon->file_id != null) ? json_decode($subcon->file_id) : array(); $file_id_implode = (count($file_id) > 0) ? implode(',',$file_id) : null; $files = \App\Models\TenderFiles::whereIn('id', $file_id)->get(); $incharge_id = ($subcon->incharge_id != null) ? json_decode($subcon->incharge_id) : array(); $subcon_data = json_decode($subcon->subcon_data, true); $subcon_data_array = array(); foreach ($subcon_data as $key => $value) { if(isset($value['subcon_id'])){ $subcon_data_array[] = $value['subcon_id']; } } $subcon_json = (count($subcon_data_array) > 0) ? json_encode($subcon_data_array) : null; @endphp @empty @endforelse --}}
@php $tr_id = 1; @endphp @forelse ($tenderSubcon as $subcon) @php $set_multi_count = 1; $main_trade = ($subcon->main_trade != null) ? json_decode($subcon->main_trade) : array(); $sub_division = ($subcon->sub_division != null) ? json_decode($subcon->sub_division) : array(); $check_box_status = ($subcon->check_box_status != null) ? json_decode($subcon->check_box_status) : array(); $file_id = ($subcon->file_id != null) ? json_decode($subcon->file_id) : array(); $file_id_implode = (count($file_id) > 0) ? implode(',',$file_id) : null; $files = \App\Models\TenderFiles::whereIn('id', $file_id)->get(); $category = \App\Models\TenderCategorySave::where('id', $subcon->cat_id)->first(); $incharge_id = ($subcon->incharge_id != null) ? json_decode($subcon->incharge_id) : array(); $subcon_data = json_decode($subcon->subcon_data, true); $subcon_data_array = array(); foreach ($subcon_data as $key => $value) { if(isset($value['subcon_id'])){ $subcon_data_array[] = $value['subcon_id']; } } $to_email_address = ($subcon->to_email_address != null) ? json_decode($subcon->to_email_address, true) : []; // If to_email_address is an array, join the emails with commas for display $email_values = ''; if (is_array($to_email_address) && count($to_email_address) > 0) { $email_values = implode(',', $to_email_address); } $subcon_json = (count($subcon_data_array) > 0) ? json_encode($subcon_data_array) : null; @endphp @php $tr_id++; @endphp @empty @endforelse
{{ __('#') }} {{ __('Subdivision') }} {{ __('Type') }} {{ __('Cc & Bcc') }} {{ __('RFQ Upload') }} {{ __('Email Body Content') }} {{ __('Company Name') }}        {{ __('SC Email:To') }}            {{ __('CC Email') }}            {{ __('Quote Received') }}            {{ __('Maincon & QC Remarks') }} {{ __('Quote Before') }}
{{$category->category_name}}
@php $class = ($subcon->method_type !== null) ? 'disabled' : ''; @endphp
Upload
@foreach ($files as $file)
@if($file->email_sent==1) @endif {{$file->file_name}}   
@endforeach
@foreach ($subcon_data as $set_multi) @php $put_subcon = isset($set_multi['email']) ? $set_multi['email'] : ''; $put_excel_id = isset($set_multi['excel_id']) ? $set_multi['excel_id'] : ''; $excelData_id = ($put_excel_id != null) ? json_decode($put_excel_id) : array(); $put_qc_remarks = isset($set_multi['qc_remarks']) ? $set_multi['qc_remarks'] : ''; // $QcRemarksData = ($put_qc_remarks != null) ? json_decode($put_qc_remarks) : ''; $excelData = DB::table('tender_main_excel_data')->where('id',$excelData_id)->first(); $main_con_remarks = DB::table('rfq_selection_track')->where('tender_id',$tender->id)->where('excel_id',$excelData_id)->first(); $ccMailGet = array(); $companyName = ''; if($excelData){ $company_id = $excelData->company_id; $cc_mail_id = explode(',', $excelData->cc_mail_id); $ccMailGet = DB::table('tender_cc_email')->whereIn('id', $cc_mail_id)->get(); $companyGet = DB::table('tender_company_data')->where('id', $company_id)->first(); $companyName = $companyGet ? $companyGet->company_name : ''; } $put_subcon_file_id = isset($set_multi['subcon_file_id']) ? $set_multi['subcon_file_id'] : null; $subcon_file_id = ($put_subcon_file_id != null) ? json_decode($put_subcon_file_id) : array(); $subcon_file_id_implode = (count($subcon_file_id) > 0) ? implode(',',$subcon_file_id) : null; $subcon_files = \App\Models\TenderFiles::whereIn('id', $subcon_file_id)->get(); @endphp @php $set_multi_count++; @endphp @endforeach
{{ $companyName }} {{-- {{$put_subcon ?? ''}} --}}
@foreach ($ccMailGet as $ccMail) {{ $ccMail->email_id }} @endforeach
Upload
@foreach ($subcon_files as $file)
@if($file->email_sent==1) @endif{{$file->file_name}}   
@endforeach
{{-- --}}
{{-- --}}
{{ Form::close() }}
@include('new_layouts.footer')