Browse Source

Fix work area restriction

pull/3/head
Wahyu Ramadhan 1 year ago
parent
commit
199d34fdd4
  1. 11
      app/Http/Controllers/PresenceController.php

11
app/Http/Controllers/PresenceController.php

@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use App\Models\HumanResource;
use Log;
use Illuminate\Http\Request;
use App\Models\Presence;
@ -24,7 +25,10 @@ class PresenceController extends Controller
if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){
$statusBoundary = true;
}
$statusRestriction = HumanResource::select('status_boundary')->where('id', $request->user_id)->first();
if ($statusRestriction->status_boundary) {
$statusBoundary = true;
}
// not assign
if(!$checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){
$data=array(
@ -134,7 +138,10 @@ class PresenceController extends Controller
if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){
$statusBoundary = true;
}
$statusRestriction = HumanResource::select('status_boundary')->where('id', $request->user_id)->first();
if ($statusRestriction->status_boundary) {
$statusBoundary = true;
}
// not assign
if(!$checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){
$data=array(

Loading…
Cancel
Save