Browse Source

Merge pull request 'Dev-Farhan' (#32) from Dev-Farhan into staging

Reviewed-on: ibnu/generic-ospro-backend#32
pull/1/head
farhantock 10 months ago
parent
commit
08ad35fac1
  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. 4
      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\Role;
use App\Models\Company;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Password;
use Illuminate\Validation\ValidationException;
@ -58,6 +59,10 @@ class AuthController extends Controller
$dataRole = Role::find($user->role_id);
$dataHierarchy = $this->getDataHierarchy($user->divisi_id, $user->id);
$configApp = Company::where('id', $user->company_id)->first();
if ($configApp)
$user->configApp = $configApp;
if ($dataRole)
$user->role = $dataRole;

2
app/Models/Absent.php

@ -12,6 +12,6 @@ class Absent extends Model
const UPDATED_AT = 'updated_at';
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';
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_by',
'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';
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'
];
}

4
app/Models/Presence.php

@ -15,7 +15,7 @@ class Presence extends Model
protected $fillable = [
'user_id', 'clock_in', 'clock_out', 'date_presence',
'clock_in_lat', 'clock_in_lng', 'clock_out_lat', 'clock_out_lng',
'clock_in_loc', 'clock_out_loc','clock_in_boundary', 'clock_out_boundary',
'created_at', 'created_by', 'updated_at', 'updated_by'
'clock_in_loc', 'clock_out_loc', 'clock_in_boundary', 'clock_out_boundary',
'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_by',
'updated_at',
'updated_by'
'updated_by',
'company_id'
];
}

Loading…
Cancel
Save