Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SMEWebify committed Jul 11, 2024
1 parent a138fb2 commit eeb3741
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/Livewire/TaskStatu.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ public function mount($TaskId)
$this->Task = Task::with('OrderLines.order')->find($this->search);
$this->userSelect = User::select('id', 'name')->get();
// $this->end_date = $this->Task->end_date;
if($this->Task->component_id){
$this->StockLocationsProducts = StockLocationProducts::where('products_id', $this->Task->component_id)->get();
if($this->Task){
if($this->Task->component_id){
$this->StockLocationsProducts = StockLocationProducts::where('products_id', $this->Task->component_id)->get();
}
}
// Organiser les données pour la timeline
$this->timelineData = [];
Expand Down Expand Up @@ -201,10 +203,12 @@ public function render()
}
}

if($this->Task->component_id){
$this->StockLocationsProducts = StockLocationProducts::where('products_id', $this->Task->component_id)->get();
if($this->Task){
if($this->Task->component_id){
$this->StockLocationsProducts = StockLocationProducts::where('products_id', $this->Task->component_id)->get();
}
}

return view('livewire.task-statu', [
'Task' => $this->Task,
'taskActivities' => $this->taskActivities,
Expand Down

0 comments on commit eeb3741

Please sign in to comment.