@can('show course train') @livewire('course-train-component' , ['course' => $course , 'course_id' => $course->id , 'component_name' => 'course-show']) @endcan
@if($course->course_customers->first()) @can('show course_customer_attendances')
@livewire('add-button-component',['link_route' => "/training/instructors/courses/".$course->id."/attendance/show" , 'value' => __('messages.show_attendance')])
@endcan @endif @if (session()->has('error'))
{{ session('error') }}
@endif @can("delete courses")
{{__('messages.Delete')}} {{__('messages.Course')}} {{__("messages.Are you sure you want to delete")}} {{__('messages.Course')}} {{__("messages.?")}} {{ __('Nevermind') }} {{ __('Remove') }} @endcan

{{__('messages.Full details of Course.')}}

@can('Assign Special Item') @livewire('assign-special-item-component') @endcan
@if ($course->model_id)

Especially for {{$course->model->name}}

@endif
{{__('messages.Roster number')}}
RS-{{ $course->id}}
{{__('messages.Start Date')}}
{{ $course->start_date}}
{{__('messages.register_till_date')}}
{{ $course->register_till_date}} @can('edit register_till_date')
{{__("messages.edit_register_till_date")}} RS-{{$course->id}} {{$course->id}} mt-0 ml-2
@endcan
{{__('messages.End Date')}}
{{ $course->end_date}}
{{__('messages.form')}}
{{ date_format(date_create($course->from),'g:i a')}}
{{__('messages.to')}}
{{ date_format(date_create($course->to),'g:i a')}}
{{__('messages.Sessions Count')}}
{{ $course->sessions_count}}
{{--
{{__('messages.gender')}}
{{$course->gender}}
--}}
{{__('messages.Capacity')}}
{{$course->capacity}}
{{__('messages.waiting_capacity')}}
{{$course->waiting_capacity}} @can('edit waiting_capacity') {{ __('messages.Edit') }} {{ __('messages.Course') }} {{ $course->id}} update
{{$course->id}} mt-0 ml-2
@endcan
@can('show instructor cost')
{{__('messages.Initial Cost Per Hour')}}
{{$course->initial_cost_per_hour}} @can('edit course instructor cost') {{ __('messages.Edit') }} {{ __('messages.Course') }} {{ $course->id}} update
{{$course->id}} mt-0 ml-2
@endcan
@endcan @can('show operation cose')
{{__('messages.Total Cost Per Hour')}}
{{ $course->total_cost_per_hour}}
@endcan
{{__('messages.Activate')}}
@if( $course->active == 1 ) @else @endif
{{__('messages.Course Type')}}
@if ($course->course_type_id >=2 && $course->course_type_id<=5) {{ $course->course_type->name}} @else {{ $course->course_type->name}} @endif @can('edit course_type')
edit_course_type_id {{-- .lazy --}} @foreach(\App\Models\CourseType::all() as $type) @endforeach
{{__("messages.Course Type")}} RS-{{$course->id}} {{$course->id}} mt-0 ml-2
@endcan
{{__('messages.Course Status')}}
{{($course->course_status)?$course->course_status->name:""}}
{{--
{{trans_choice('messages.period',1)}}
{{($course->schedule_period_id)? $course->schedule_period->period->name : ""}}
--}}
{{__('messages.Instructor')}}
{{($course->instructor)? $course->instructor->name : ""}} @can('edit course_instructor')
.lazy instructor_id @foreach($instructors as $selected_instructor) @endforeach
{{__("messages.Instructor")}} {{($course->instructor)? $course->instructor->name : ""}} {{$course->id}} mt-1 ml-2
@endcan
{{__('messages.Category')}}
{{$course->course_level->product->category->name}} {{($course->course_level->product->category->category_id)? " - " .$course->course_level->product->category->main_category->name:""}}
{{__('messages.Hours')}}
{{($course->course_level)? $course->course_level->hours :""}}
{{__('messages.Class Room')}}
{{($course->class_room_id)?$course->class_room->name:"-"}}
@if ($course->course_type_id >=3 && $course->course_type_id <=5)
{{__('messages.Online Account')}}
{{($course->online_account_id)?$course->online_account->name:"-"}}
@endif
{{trans_choice('messages.branch',1)}}
{{($course->class_room_id)?$course->class_room->branch->name:"-"}}
{{__('messages.comment')}}
{{$course->comment}} @can('edit course_comment') {{ __('messages.Edit') }} {{ __('messages.Course') }} {{ $course->id}} update
comment 3
{{$course->id}} mt-0 ml-2
@endcan
{{__('messages.meeting_link')}}
@if ($course->meeting_link) {{__('messages.Link To Meeting')}} @endif @can('edit meeting_link')
{{__("messages.meeting_link")}} RS-{{$course->id}} {{$course->id}} mt-1 ml-2
@endcan

{{__('messages.Days Work')}}

{{__('messages.Saturdays')}}
@if( $course->sat == 1 ) @else @endif
{{__('messages.Sundays')}}
@if( $course->sun == 1 ) @else @endif
{{__('messages.Mondays')}}
@if( $course->mon == 1 ) @else @endif
{{__('messages.Tuesdays')}}
@if( $course->tue == 1 ) @else @endif
{{__('messages.Wednesdays')}}
@if( $course->wed == 1 ) @else @endif
{{__('messages.Thursdays')}}
@if( $course->thu == 1 ) @else @endif
{{__('messages.Fridays')}}
@if( $course->fri == 1 ) @else @endif
{{__('messages.Created At')}}
{{ $course->created_at}}
{{__('messages.Updated By')}}
{{($course->last_updated_by_user)?$course->last_updated_by_user->name:"-"}}
{{__('messages.Updated At')}}
{{ $course->updated_at}}
@can('show course_status_histories')

{{__('messages.Status History')}}

# {{__('messages.from')}} {{__('messages.to')}} {{__('messages.By')}} {{__('messages.comment')}} {{__('messages.Created At')}} @forelse ($course->course_status_histories as $key =>$course_status_history) #{{++$key}} {{__('messages.from')}} {{($course_status_history->course_status_from)?$course_status_history->course_status_from->name:""}} {{__('messages.to')}} {{($course_status_history->course_status_to)?$course_status_history->course_status_to->name:""}} {{__('messages.By')}}{{($course_status_history->last_updated_by_user)?$course_status_history->last_updated_by_user->name:''}} {{__('messages.comment')}}{{$course_status_history->comment}} {{__('messages.Created At')}}{{($course_status_history->created_at)?$course_status_history->created_at:""}} @empty {{__('messages.Empty Result')}} @endforelse @endcan

{{__('messages.Customers Registered in this course')}}

@can('show course_customers') {{-- --}} {{-- --}} @forelse ($course->course_customers as $key=> $course_customer) @php $bgc= ""; if ($course_customer->confirmation == 'Confirmed') $bgc="bg-green-200"; elseif ($course_customer->confirmation == 'Not Yet') $bgc="bg-gray-200"; elseif ($course_customer->confirmation == 'Rejected') $bgc="bg-blue-100"; elseif ($course_customer->confirmation == 'Not Sure') $bgc="bg-blue-200"; @endphp {{-- --}} @empty @endforelse @endcan @can('send email to customers') mt-0 {{__('messages.send email to selected customers')}} send_email
message 2
@endcan
{{-- auth()->user()->can('register owner customers only') && ! auth()->user()->hasRole('super-admin') --}} @canany(['register owner customers only' ,'register any customer' ]) @if( $course->active && strtotime($course->register_till_date ) >= strtotime('today') && ($course->available_capacity >=1) && ($course->model_id == null || ($course->model_type =="App\Models\User" && $course->model_id == auth()->user()->id) || ($course->model_type =="App\Models\Team" && $course->model->users()->where("users.id" ,auth()->user()->id)->first())) ) @can('add course_customers') @if($course->course_status_id <6)
@livewire('add-button-component', ['value' => __('messages.add customer to course')]) {{__('messages.add customer to course')}} addCustomersToCourse md:max-w-6xl
{{__('messages.Customers waiting this course.')}}
# {{-- {{__('messages.Code')}} --}} {{__('messages.mobile')}} {{__('messages.Name')}} {{__('messages.last_follow_up_by')}} {{__('messages.type')}} {{__('messages.details')}} {{-- {{$checkAll}} --}} @forelse ($order_details as $key =>$order_detail) #{{$order_details->firstItem() + $key}} {{-- {{__('messages.Code')}}{{$order_detail->customer->code}} --}} {{__('messages.mobile')}} {{$order_detail->customer->mobile}} {{__('messages.Name')}} {{$order_detail->customer->name}} @if ($order_detail->get_coroprate()) {{$order_detail->get_coroprate()->name}} @endif @if($order_detail->customer->age_category && $course->course_level->product->age_category) @if($order_detail->customer->age_category != $course->course_level->product->age_category) (Check Customer Age) @endif @endif {{__('messages.last_follow_up_by')}} @if ($order_detail->get_coroprate()) {{ ($order_detail->get_coroprate()->last_follow_up_by)?$order_detail->get_coroprate()->last_follow_up_by_user->name :""}} @else {{ ($order_detail->customer->last_follow_up_by)?$order_detail->customer->last_follow_up_by_user->name :""}} @endif {{__('messages.type')}} {{$order_detail->type}} {{__('messages.details')}} @switch($order_detail->item_type) @case("App\Models\Product") {{$order_detail->item->name}} @break @case("App\Models\ProductOffer") {{$order_detail->item->offer->name}} @break @case("App\Models\PackageProduct") {{$order_detail->item->package->name}} @break @case("App\Models\ClubMembershipProduct") {{$order_detail->item->club_membership->name}} @break @case("App\Models\InstallmentPackageProduct" ) {{$order_detail->item->installment_package->name}} @break @default @endswitch ({{$order_detail->price_with_tax}}) @if ($order_detail->opend_to_date) {{__('messages.to')}} : {{$order_detail->opend_to_date}} @endif {{-- - {{$order_detail->price_with_tax}} --}} @empty Empty Result @endforelse {{$order_details->links('vendor.pagination.simple-tailwind')}}
@endif @endcan @endif @endcanany @can('calculate attendance percentage') @if ($course->course_status_id == "6" ||$course->course_status_id == "7" ) {{__('messages.calculate attendance percentage')}} RS-{{$course->id}} mt-1 calculate_attendance() {{__('messages.calculate attendance percentage')}} @endif @endcan @can('register customers in closed courses') @if($course->course_status_id >=6)
@livewire('add-button-component', ['value' => __('messages.add customer to course')]) {{__('messages.add customer to course')}} addCustomersToCourse md:max-w-6xl
{{__('messages.Customers waiting this course.')}}
# {{-- {{__('messages.Code')}} --}} {{__('messages.mobile')}} {{__('messages.Name')}} {{__('messages.last_follow_up_by')}} {{__('messages.type')}} {{__('messages.details')}} {{-- {{$checkAll}} --}} @forelse ($order_details as $key =>$order_detail) #{{$order_details->firstItem() + $key}} {{-- {{__('messages.Code')}}{{$order_detail->customer->code}} --}} {{__('messages.mobile')}}{{$order_detail->customer->mobile}} {{__('messages.Name')}} {{$order_detail->customer->name}} @if ($order_detail->get_coroprate()) {{$order_detail->get_coroprate()->name}} @endif @if($order_detail->customer->age_category && $course->course_level->product->age_category) @if($order_detail->customer->age_category != $course->course_level->product->age_category) (Check Customer Age) @endif @endif {{__('messages.last_follow_up_by')}} @if ($order_detail->get_coroprate()) {{ ($order_detail->get_coroprate()->last_follow_up_by)?$order_detail->get_coroprate()->last_follow_up_by_user->name :""}} @else {{ ($order_detail->customer->last_follow_up_by)?$order_detail->customer->last_follow_up_by_user->name :""}} @endif {{__('messages.type')}} {{$order_detail->type}} {{__('messages.details')}} @switch($order_detail->item_type) @case("App\Models\Product") {{$order_detail->item->name}} @break @case("App\Models\ProductOffer") {{$order_detail->item->offer->name}} @break @case("App\Models\PackageProduct") {{$order_detail->item->package->name}} @break @case("App\Models\ClubMembershipProduct") {{$order_detail->item->club_membership->name}} @break @case("App\Models\InstallmentPackageProduct" ) {{$order_detail->item->installment_package->name}} @break @default @endswitch ({{$order_detail->price_with_tax}}) @if ($order_detail->opend_to_date) {{__('messages.to')}} : {{$order_detail->opend_to_date}} @endif {{-- - {{$order_detail->price_with_tax}} --}} @empty Empty Result @endforelse {{$order_details->links('vendor.pagination.simple-tailwind')}}
@endif @endcan
@can('show course_customers') # {{-- {{__('messages.Code')}} --}} {{__('messages.Name')}} {{__('messages.Contact')}} {{__('messages.last_follow_up_by')}} {{__('messages.type')}} {{__('messages.details')}} {{__('messages.delivery')}} {{__('messages.registered_by')}} {{__('messages.registered_at')}} {{__('messages.registeration_type')}} {{__('messages.Confirmation status')}} {{__('messages.confirmed_by')}} {{__('messages.confirmed_at')}} {{-- {{__('messages.Updated By')}} --}} @forelse ($course->course_customers as $key =>$course_customer) @php $bgc= ""; if ($course_customer->confirmation == 'Confirmed') $bgc="bg-green-200"; elseif ($course_customer->confirmation == 'Not Yet') $bgc="bg-gray-200"; elseif ($course_customer->confirmation == 'Rejected') $bgc="bg-blue-100"; elseif ($course_customer->confirmation == 'Not Sure') $bgc="bg-blue-200"; @endphp #{{$loop->iteration}} {{-- {{__('messages.Code')}}{{$course_customer->customer->code}} --}} {{__('messages.Name')}} {{$course_customer->customer->name}} @if ($course_customer->order_detail->order->payment_status!="completed") P @endif {{-- Has Payment --}} @if ($course_customer->get_coroprate()) - {{$course_customer->get_coroprate()->name}} @endif {{__('messages.Contact')}}

{{$course_customer->customer->mobile}}

@if ($course_customer->customer->phone && $course_customer->customer->mobile != $course_customer->customer->phone)

{{$course_customer->customer->phone}}

@endif

{{$course_customer->customer->email}}

{{__('messages.last_follow_up_by')}} @if ($course_customer->get_coroprate()) {{ ($course_customer->get_coroprate()->last_follow_up_by)?$course_customer->get_coroprate()->last_follow_up_by_user->name :""}} @else {{ ($course_customer->order_detail->customer->last_follow_up_by)?$course_customer->order_detail->customer->last_follow_up_by_user->name :""}} @endif {{__('messages.type')}} @php $ttt =$course_customer->order_detail->type; @endphp @if ($ttt == "online" || $ttt == "repeat online") {{$ttt}} @elseif ($ttt == "offline" || $ttt == "repeat offline" ) {{$ttt}} @else not assigned @endif {{-- "offline" ,"online","repeat offline" ,"repeat online" --}} {{__('messages.details')}} @switch($course_customer->order_detail->item_type) @case("App\Models\Product") {{$course_customer->order_detail->item->name}} @break @case("App\Models\ProductOffer") {{$course_customer->order_detail->item->offer->name}} @break @case("App\Models\PackageProduct") {{$course_customer->order_detail->item->package->name}} @break @case("App\Models\ClubMembershipProduct") {{$course_customer->order_detail->item->club_membership->name}} @break @case("App\Models\InstallmentPackageProduct" ) {{$course_customer->order_detail->item->installment_package->name}} @break @default @endswitch @if ($course_customer->order_detail->opend_to_date) {{__('messages.to')}} : {{$course_customer->order_detail->opend_to_date}} @endif {{-- - {{$order_detail->price_with_tax}} --}} {{__('messages.delivery')}}{{$course_customer->order_detail->price_with_tax}} {{__('messages.registered_by')}}{{($course_customer? ($course_customer->registered_by)?$course_customer->registered_by_user->name : "-" :"-")}} {{__('messages.registered_at')}}{{($course_customer? $course_customer->registered_at : "-" )}} {{__('messages.registeration_type')}} {{-- 'registered', 'waiting', 'repeat' --}} @if ($course_customer) @if ($course_customer->registeration_type =="registered") Registered @elseif ($course_customer->registeration_type =="waiting") Waiting @elseif ($course_customer->registeration_type =="repeat") Repeat @endif @endif {{__('messages.Confirmation status')}} {{-- "Not Yet" ,"Confirmed","Not Sure" ,"Rejected" --}} @if ($course_customer) @if ($course_customer->confirmation =="Not Yet") {{$course_customer->confirmation}} @elseif ($course_customer->confirmation =="Confirmed") {{$course_customer->confirmation}} @elseif ($course_customer->confirmation =="Not Sure") {{$course_customer->confirmation}} @elseif ($course_customer->confirmation =="Rejected") {{$course_customer->confirmation}} @else {{$course_customer->confirmation}} @endif @endif {{__('messages.confirmed_by')}}{{($course_customer? ($course_customer->confirmed_by)?$course_customer->confirmed_by_user->name : "-" :"-")}} {{__('messages.confirmed_at')}}{{($course_customer? $course_customer->confirmed_at : "-" )}}
@can('edit course_customers') @if($course->course_status_id != 6 && $course->course_status_id != 7) mt-0 {{__('messages.Course Customer Status of Confirmation')}} updateCourseCustomer editCourseCustomer({{$course_customer->id}})
edit_confirmation @if ($course_customer->confirmation =="Not Yet") @endif
course_customer_comment 2
@else @can('register customers in closed courses') mt-0 {{__('messages.Course Customer Status of Confirmation')}} updateCourseCustomer editCourseCustomer({{$course_customer->id}})
edit_confirmation @if ($course_customer->confirmation =="Not Yet") @endif
course_customer_comment 2
@endcan @endif @endcan @if ($course_customer->status =='waiting' && $course_customer->confirmation =="Not Yet") @if($course->course_status_id != 6 && $course->course_status_id != 7 ) @if (auth()->id() == $course_customer->customer->last_follow_up_by && auth()->user()->can('remove my own customers from courses')) {{$course_customer->id}} mt-0 {{$course_customer->customer->name}} {{__('messages.from this Course')}} @else @canany(['delete course_customers' ,'delete waiting course_customers Not Yet']) {{$course_customer->id}} mt-0 {{$course_customer->customer->name}} {{__('messages.from this Course')}} @endcanany @endif @endif @elseif ($course_customer->status =='waiting') @canany(['delete course_customers' ,'delete waiting course_customers']) @if($course->course_status_id != 6 && $course->course_status_id != 7 ) {{$course_customer->id}} mt-0 {{$course_customer->customer->name}} {{__('messages.from this Course')}} @endif @endcanany @else @can('delete course_customers') @if($course->course_status_id != 6 && $course->course_status_id != 7) {{$course_customer->id}} mt-0 {{$course_customer->customer->name}} {{__('messages.from this Course')}} @endif @endcan @endif
@empty {{__('messages.Empty Result')}} @endforelse
@endcan
@can('show courses delivery')

{{-- total_cost_per_hour (instructor cost + operation cost) --}} Course Cost={{ $course->course_level->hours * ($course->total_cost_per_hour + $course->initial_cost_per_hour)}}

Potential Delivery From Course ={{$course->potential_delivery}} from ({{$course->potential_count}}) Customers

Delivered From Course ={{$course->delivery}} from ({{$course->confirmed_count}}) Customers

@endcan
@livewire('add-comment-component', ['account' => $course ,'account_type'=>'App\Models\Course','current_page' => 'course'],key("add_comment_". $course->id)) @livewire('comment-show-all-component', ['account' => $course ],key("show_comment_". $course->id)) @can("show course_histories")

{{__('messages.Course History')}}

# {{__('messages.Course Level')}} {{__('messages.Instructor')}} {{__('messages.Class Room')}} {{__('messages.Start Date')}} {{__('messages.End Date')}} {{__('messages.register_till_date')}} {{__('messages.Updated By')}} @forelse ($course->course_histories()->orderBy('id', 'DESC')->get() as $key =>$course_history) #{{$loop->iteration}} {{__('messages.Course Level')}} {{($course_history->course_level)? $course_history->course_level->product->name :""}} {{__('messages.Instructor')}} {{($course_history->instructor_id)? $course_history->instructor->name : ""}} {{__('messages.Class Room')}} {{($course_history->class_room_id)?$course_history->class_room->name ."-" .$course_history->class_room->branch->name :"-"}} {{__('messages.Start Date')}} {{ $course_history->start_date}} {{__('messages.End Date')}} {{ $course_history->end_date}} {{__('messages.register_till_date')}} {{ $course_history->register_till_date}} {{__('messages.Updated By')}} {{($course_history->last_updated_by_user)?$course_history->last_updated_by_user->name:"-"}} {{__('messages.Course History')}}

max-w-5xl
{{__('messages.Start Date')}}
{{ $course_history->start_date}}
{{__('messages.End Date')}}
{{ $course_history->end_date}}
{{__('messages.register_till_date')}}
{{ $course_history->register_till_date}}
{{__('messages.form')}}
{{ date_format(date_create($course_history->from),'g:i a')}}
{{__('messages.to')}}
{{ date_format(date_create($course_history->to),'g:i a')}}
{{__('messages.Sessions Count')}}
{{ $course_history->sessions_count}}
{{__('messages.Capacity')}}
{{$course_history->capacity}}
{{__('messages.waiting_capacity')}}
{{$course_history->waiting_capacity}}
{{__('messages.Initial Cost Per Hour')}}
{{$course_history->initial_cost_per_hour}}
{{__('messages.Total Cost Per Hour')}}
{{ $course_history->total_cost_per_hour}}
{{__('messages.Activate')}}
@if( $course_history->active == 1 ) @else @endif
{{__('messages.Course Type')}}
{{($course_history->course_type)? $course_history->course_type->name:""}}
{{__('messages.Course Status')}}
{{$course_history->course_status->name}}
{{__('messages.Instructor')}}
{{($course_history->instructor_id)? $course_history->instructor->name : ""}}
{{__('messages.Class Room')}}
{{($course_history->class_room)?$course_history->class_room->name . "-" .$course_history->class_room->branch->name:"-"}}
{{__('messages.online_account')}}
{{($course_history->online_account_id)?$course_history->online_account->name . "-" .$course_history->online_account->branch->name:"-"}}
{{__('messages.Updated By')}}
{{($course_history->last_updated_by)?$course_history->last_updated_by_user->name:"-"}}
{{__('messages.comment')}}
{{$course_history->comment}}
{{__('messages.Created At')}}
{{ $course_history->created_at}}
{{__('messages.Updated At')}}
{{ $course_history->updated_at}}

{{__('messages.Days Work')}}

{{__('messages.Saturdays')}}
@if( $course_history->sat == 1 ) @else @endif
{{__('messages.Sundays')}}
@if( $course_history->sun == 1 ) @else @endif
{{__('messages.Mondays')}}
@if( $course_history->mon == 1 ) @else @endif
{{__('messages.Tuesdays')}}
@if( $course_history->tue == 1 ) @else @endif
{{__('messages.Wednesdays')}}
@if( $course_history->wed == 1 ) @else @endif
{{__('messages.Thursdays')}}
@if( $course_history->thu == 1 ) @else @endif
{{__('messages.Fridays')}}
@if( $course_history->fri == 1 ) @else @endif
@empty {{__('messages.Empty Result')}} @endforelse
@endcan