Browse Source

Merge branch 'staging' of https://git.oslog.id/ibnu/generic-ospro-backend into dev-wahyun

pull/1/head
wahyun 11 months ago
parent
commit
ad7f148f37
  1. 5
      app/Http/Controllers/AuthController.php
  2. 2
      app/Models/Absent.php
  3. 2
      app/Models/Broadcast.php
  4. 3
      app/Models/Company.php
  5. 2
      app/Models/PanicButton.php
  6. 2
      app/Models/Presence.php
  7. 3
      app/Models/ReportK3.php

5
app/Http/Controllers/AuthController.php

@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Hash;
use App\Models\User; use App\Models\User;
use App\Models\Role; use App\Models\Role;
use App\Models\Company;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Password; use Illuminate\Support\Facades\Password;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
@ -58,6 +59,10 @@ class AuthController extends Controller
$dataRole = Role::find($user->role_id); $dataRole = Role::find($user->role_id);
$dataHierarchy = $this->getDataHierarchy($user->divisi_id, $user->id); $dataHierarchy = $this->getDataHierarchy($user->divisi_id, $user->id);
$configApp = Company::where('id', $user->company_id)->first();
if ($configApp)
$user->configApp = $configApp;
if ($dataRole) if ($dataRole)
$user->role = $dataRole; $user->role = $dataRole;

2
app/Models/Absent.php

@ -12,6 +12,6 @@ class Absent extends Model
const UPDATED_AT = 'updated_at'; const UPDATED_AT = 'updated_at';
protected $fillable = [ protected $fillable = [
'user_id', 'description', 'created_at', 'created_by', 'updated_at', 'updated_by' 'user_id', 'description', 'created_at', 'created_by', 'updated_at', 'updated_by', 'company_id'
]; ];
} }

2
app/Models/Broadcast.php

@ -12,6 +12,6 @@ class Broadcast extends Model
const UPDATED_AT = 'updated_at'; const UPDATED_AT = 'updated_at';
protected $fillable = [ protected $fillable = [
'title_notif', 'message_notif', 'description', 'send_to_type', 'send_to_id', 'status_send', 'created_at', 'created_by', 'updated_at', 'updated_by' 'title_notif', 'message_notif', 'description', 'send_to_type', 'send_to_id', 'status_send', 'created_at', 'created_by', 'updated_at', 'updated_by', 'company_id'
]; ];
} }

3
app/Models/Company.php

@ -31,6 +31,7 @@ class Company extends Model
'created_at', 'created_at',
'created_by', 'created_by',
'updated_at', 'updated_at',
'updated_by' 'updated_by',
'date_register'
]; ];
} }

2
app/Models/PanicButton.php

@ -12,6 +12,6 @@ class PanicButton extends Model
const UPDATED_AT = 'updated_at'; const UPDATED_AT = 'updated_at';
protected $fillable = [ protected $fillable = [
'user_id', 'lat', 'lon', 'status_response', 'description', 'created_at', 'created_by', 'updated_at', 'updated_by' 'user_id', 'lat', 'lon', 'status_response', 'description', 'created_at', 'created_by', 'updated_at', 'updated_by', 'company_id'
]; ];
} }

2
app/Models/Presence.php

@ -16,6 +16,6 @@ class Presence extends Model
'user_id', 'clock_in', 'clock_out', 'date_presence', 'user_id', 'clock_in', 'clock_out', 'date_presence',
'clock_in_lat', 'clock_in_lng', 'clock_out_lat', 'clock_out_lng', 'clock_in_lat', 'clock_in_lng', 'clock_out_lat', 'clock_out_lng',
'clock_in_loc', 'clock_out_loc', 'clock_in_boundary', 'clock_out_boundary', 'clock_in_loc', 'clock_out_loc', 'clock_in_boundary', 'clock_out_boundary',
'created_at', 'created_by', 'updated_at', 'updated_by' 'created_at', 'created_by', 'updated_at', 'updated_by', 'company_id'
]; ];
} }

3
app/Models/ReportK3.php

@ -20,6 +20,7 @@ class ReportK3 extends Model
'created_at', 'created_at',
'created_by', 'created_by',
'updated_at', 'updated_at',
'updated_by' 'updated_by',
'company_id'
]; ];
} }

Loading…
Cancel
Save