Bổ sung check nếu là WFH thì check in cho user
This commit is contained in:
		
							parent
							
								
									688c521986
								
							
						
					
					
						commit
						4744ac3e23
					
				| 
						 | 
					@ -290,6 +290,7 @@ class TicketController extends Controller
 | 
				
			||||||
        // Update updated_by and admin_note in tickets table
 | 
					        // Update updated_by and admin_note in tickets table
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Send notification email to users
 | 
					        // Send notification email to users
 | 
				
			||||||
 | 
					        $user = Admin::find($ticket->user_id);
 | 
				
			||||||
        if ($action == "confirm") {
 | 
					        if ($action == "confirm") {
 | 
				
			||||||
            foreach ($results as $result) {
 | 
					            foreach ($results as $result) {
 | 
				
			||||||
                list($year, $month, $day) = explode('-', $result['date']);
 | 
					                list($year, $month, $day) = explode('-', $result['date']);
 | 
				
			||||||
| 
						 | 
					@ -305,7 +306,6 @@ class TicketController extends Controller
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if ($ticket->type == "WFH") {
 | 
					                if ($ticket->type == "WFH") {
 | 
				
			||||||
                    $type =  $result['period'];
 | 
					                    $type =  $result['period'];
 | 
				
			||||||
                    $user = Admin::find($ticket->user_id);
 | 
					 | 
				
			||||||
                    $date = Carbon::create($year, $month, $day)->setTimezone(env('TIME_ZONE'));
 | 
					                    $date = Carbon::create($year, $month, $day)->setTimezone(env('TIME_ZONE'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    //Default: ALL
 | 
					                    //Default: ALL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue