Change Permission & WIP Dashboard Client Portal
This commit is contained in:
0
app/Console/Kernel.php
Executable file → Normal file
0
app/Console/Kernel.php
Executable file → Normal file
0
app/Exceptions/Handler.php
Executable file → Normal file
0
app/Exceptions/Handler.php
Executable file → Normal file
0
app/Exceptions/ImportRowException.php
Executable file → Normal file
0
app/Exceptions/ImportRowException.php
Executable file → Normal file
0
app/Helpers/Helper.php
Executable file → Normal file
0
app/Helpers/Helper.php
Executable file → Normal file
0
app/Http/Controllers/Api/AuthController.php
Executable file → Normal file
0
app/Http/Controllers/Api/AuthController.php
Executable file → Normal file
0
app/Http/Controllers/Controller.php
Executable file → Normal file
0
app/Http/Controllers/Controller.php
Executable file → Normal file
0
app/Http/Kernel.php
Executable file → Normal file
0
app/Http/Kernel.php
Executable file → Normal file
0
app/Http/Middleware/Authenticate.php
Executable file → Normal file
0
app/Http/Middleware/Authenticate.php
Executable file → Normal file
0
app/Http/Middleware/EncryptCookies.php
Executable file → Normal file
0
app/Http/Middleware/EncryptCookies.php
Executable file → Normal file
0
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Executable file → Normal file
0
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Executable file → Normal file
0
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file → Normal file
0
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file → Normal file
0
app/Http/Middleware/TrimStrings.php
Executable file → Normal file
0
app/Http/Middleware/TrimStrings.php
Executable file → Normal file
0
app/Http/Middleware/TrustHosts.php
Executable file → Normal file
0
app/Http/Middleware/TrustHosts.php
Executable file → Normal file
0
app/Http/Middleware/TrustProxies.php
Executable file → Normal file
0
app/Http/Middleware/TrustProxies.php
Executable file → Normal file
0
app/Http/Middleware/VerifyCsrfToken.php
Executable file → Normal file
0
app/Http/Middleware/VerifyCsrfToken.php
Executable file → Normal file
0
app/Imports/PlansImport.php
Executable file → Normal file
0
app/Imports/PlansImport.php
Executable file → Normal file
0
app/Jobs/ProcessImport.php
Executable file → Normal file
0
app/Jobs/ProcessImport.php
Executable file → Normal file
0
app/Models/Address.php
Executable file → Normal file
0
app/Models/Address.php
Executable file → Normal file
0
app/Models/Benefit.php
Executable file → Normal file
0
app/Models/Benefit.php
Executable file → Normal file
0
app/Models/Brand.php
Executable file → Normal file
0
app/Models/Brand.php
Executable file → Normal file
0
app/Models/Category.php
Executable file → Normal file
0
app/Models/Category.php
Executable file → Normal file
0
app/Models/City.php
Executable file → Normal file
0
app/Models/City.php
Executable file → Normal file
14
app/Models/Corporate.php
Executable file → Normal file
14
app/Models/Corporate.php
Executable file → Normal file
@@ -30,7 +30,7 @@ class Corporate extends Model
|
||||
protected $appends = [
|
||||
'avatar_url',
|
||||
];
|
||||
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
@@ -73,8 +73,6 @@ class Corporate extends Model
|
||||
public function currentPolicy()
|
||||
{
|
||||
return $this->hasOne(CorporatePolicy::class)
|
||||
// ->where('start', '<=', now())
|
||||
// ->where('end', '>=', now())
|
||||
->where('active', true)
|
||||
->latestOfMany();
|
||||
}
|
||||
@@ -106,7 +104,10 @@ class Corporate extends Model
|
||||
]);
|
||||
}
|
||||
|
||||
// public function
|
||||
public function claims()
|
||||
{
|
||||
return $this->hasManyThrough(Claim::class, CorporateEmployee::class, 'corporate_id', 'member_id', 'id', 'member_id');
|
||||
}
|
||||
|
||||
public function importLogs()
|
||||
{
|
||||
@@ -123,11 +124,6 @@ class Corporate extends Model
|
||||
return $this->hasManyThrough(CorporateService::class, Service::class, 'corporate_id', 'service_code', 'id', 'service_code');
|
||||
}
|
||||
|
||||
// public function claims()
|
||||
// {
|
||||
// return $this->hasManyThrough()
|
||||
// }
|
||||
|
||||
public function corporateServices()
|
||||
{
|
||||
return $this->hasMany(CorporateService::class, 'corporate_id');
|
||||
|
||||
0
app/Models/CorporateBenefit.php
Executable file → Normal file
0
app/Models/CorporateBenefit.php
Executable file → Normal file
0
app/Models/CorporateDivision.php
Executable file → Normal file
0
app/Models/CorporateDivision.php
Executable file → Normal file
0
app/Models/CorporateEmployee.php
Executable file → Normal file
0
app/Models/CorporateEmployee.php
Executable file → Normal file
0
app/Models/CorporateFormularium.php
Executable file → Normal file
0
app/Models/CorporateFormularium.php
Executable file → Normal file
0
app/Models/CorporatePlan.php
Executable file → Normal file
0
app/Models/CorporatePlan.php
Executable file → Normal file
7
app/Models/CorporatePolicy.php
Executable file → Normal file
7
app/Models/CorporatePolicy.php
Executable file → Normal file
@@ -28,7 +28,7 @@ class CorporatePolicy extends Model
|
||||
'end',
|
||||
'active',
|
||||
];
|
||||
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
@@ -66,11 +66,6 @@ class CorporatePolicy extends Model
|
||||
$this->attributes['code'] = !empty($value) ? $value : Str::upper(Str::random('6'));
|
||||
}
|
||||
|
||||
// public function setPolicyIdAttribute($value)
|
||||
// {
|
||||
// $this->attributes['policy_id'] = !empty($value) ? $value : Str::upper(Str::random('6'));
|
||||
// }
|
||||
|
||||
public function setStartAttribute($value)
|
||||
{
|
||||
$this->attributes['start'] = !empty($value) ? Carbon::parse($value)->format('Y-m-d') : null;
|
||||
|
||||
0
app/Models/CorporateService.php
Executable file → Normal file
0
app/Models/CorporateService.php
Executable file → Normal file
0
app/Models/CorporateServiceConfig.php
Executable file → Normal file
0
app/Models/CorporateServiceConfig.php
Executable file → Normal file
0
app/Models/CorporateServiceSpeciality.php
Executable file → Normal file
0
app/Models/CorporateServiceSpeciality.php
Executable file → Normal file
0
app/Models/District.php
Executable file → Normal file
0
app/Models/District.php
Executable file → Normal file
0
app/Models/Drug.php
Executable file → Normal file
0
app/Models/Drug.php
Executable file → Normal file
0
app/Models/DrugAtc.php
Executable file → Normal file
0
app/Models/DrugAtc.php
Executable file → Normal file
0
app/Models/DrugCategory.php
Executable file → Normal file
0
app/Models/DrugCategory.php
Executable file → Normal file
0
app/Models/DrugComposition.php
Executable file → Normal file
0
app/Models/DrugComposition.php
Executable file → Normal file
0
app/Models/DrugExternalIdentifier.php
Executable file → Normal file
0
app/Models/DrugExternalIdentifier.php
Executable file → Normal file
0
app/Models/DrugIdentifier.php
Executable file → Normal file
0
app/Models/DrugIdentifier.php
Executable file → Normal file
0
app/Models/DrugSellingUnit.php
Executable file → Normal file
0
app/Models/DrugSellingUnit.php
Executable file → Normal file
0
app/Models/DrugUnit.php
Executable file → Normal file
0
app/Models/DrugUnit.php
Executable file → Normal file
0
app/Models/Exclusion.php
Executable file → Normal file
0
app/Models/Exclusion.php
Executable file → Normal file
0
app/Models/ExclusionRules.php
Executable file → Normal file
0
app/Models/ExclusionRules.php
Executable file → Normal file
0
app/Models/Family.php
Executable file → Normal file
0
app/Models/Family.php
Executable file → Normal file
0
app/Models/File.php
Executable file → Normal file
0
app/Models/File.php
Executable file → Normal file
0
app/Models/Formularium.php
Executable file → Normal file
0
app/Models/Formularium.php
Executable file → Normal file
0
app/Models/FormulariumItem.php
Executable file → Normal file
0
app/Models/FormulariumItem.php
Executable file → Normal file
0
app/Models/Icd.php
Executable file → Normal file
0
app/Models/Icd.php
Executable file → Normal file
0
app/Models/Identifier.php
Executable file → Normal file
0
app/Models/Identifier.php
Executable file → Normal file
0
app/Models/ImportLog.php
Executable file → Normal file
0
app/Models/ImportLog.php
Executable file → Normal file
0
app/Models/Ingredient.php
Executable file → Normal file
0
app/Models/Ingredient.php
Executable file → Normal file
0
app/Models/Member.php
Executable file → Normal file
0
app/Models/Member.php
Executable file → Normal file
0
app/Models/MemberPlan.php
Executable file → Normal file
0
app/Models/MemberPlan.php
Executable file → Normal file
0
app/Models/MemberPolicy.php
Executable file → Normal file
0
app/Models/MemberPolicy.php
Executable file → Normal file
0
app/Models/Meta.php
Executable file → Normal file
0
app/Models/Meta.php
Executable file → Normal file
0
app/Models/Organization.php
Executable file → Normal file
0
app/Models/Organization.php
Executable file → Normal file
0
app/Models/Person.php
Executable file → Normal file
0
app/Models/Person.php
Executable file → Normal file
0
app/Models/Plan.php
Executable file → Normal file
0
app/Models/Plan.php
Executable file → Normal file
0
app/Models/Practice.php
Executable file → Normal file
0
app/Models/Practice.php
Executable file → Normal file
0
app/Models/Practitioner.php
Executable file → Normal file
0
app/Models/Practitioner.php
Executable file → Normal file
0
app/Models/PractitionerRole.php
Executable file → Normal file
0
app/Models/PractitionerRole.php
Executable file → Normal file
0
app/Models/PractitionerRoleAvailability.php
Executable file → Normal file
0
app/Models/PractitionerRoleAvailability.php
Executable file → Normal file
0
app/Models/PractitionerRoleAvailabilityDay.php
Executable file → Normal file
0
app/Models/PractitionerRoleAvailabilityDay.php
Executable file → Normal file
0
app/Models/Price.php
Executable file → Normal file
0
app/Models/Price.php
Executable file → Normal file
0
app/Models/Province.php
Executable file → Normal file
0
app/Models/Province.php
Executable file → Normal file
0
app/Models/Service.php
Executable file → Normal file
0
app/Models/Service.php
Executable file → Normal file
0
app/Models/Speciality.php
Executable file → Normal file
0
app/Models/Speciality.php
Executable file → Normal file
0
app/Models/Unit.php
Executable file → Normal file
0
app/Models/Unit.php
Executable file → Normal file
0
app/Models/User.php
Executable file → Normal file
0
app/Models/User.php
Executable file → Normal file
0
app/Models/Village.php
Executable file → Normal file
0
app/Models/Village.php
Executable file → Normal file
0
app/Providers/AppServiceProvider.php
Executable file → Normal file
0
app/Providers/AppServiceProvider.php
Executable file → Normal file
0
app/Providers/AuthServiceProvider.php
Executable file → Normal file
0
app/Providers/AuthServiceProvider.php
Executable file → Normal file
0
app/Providers/BroadcastServiceProvider.php
Executable file → Normal file
0
app/Providers/BroadcastServiceProvider.php
Executable file → Normal file
0
app/Providers/EventServiceProvider.php
Executable file → Normal file
0
app/Providers/EventServiceProvider.php
Executable file → Normal file
0
app/Providers/RouteServiceProvider.php
Executable file → Normal file
0
app/Providers/RouteServiceProvider.php
Executable file → Normal file
@@ -16,7 +16,6 @@ class CorporateMemberService
|
||||
->joinCorporateEmployees('left')
|
||||
->joinCorporateDivisions('left')
|
||||
->with(['currentPlan', 'person'])
|
||||
->withSum('claims', 'total_claim')
|
||||
->where('corporate_employees.corporate_id', $corporateId)
|
||||
->when($request->input('search'), function (Builder $query, $search) {
|
||||
$query->where(function (Builder $query) use ($search) {
|
||||
@@ -39,6 +38,7 @@ class CorporateMemberService
|
||||
$query->getQuery()->orderBy($orderBy, $request->order);
|
||||
})
|
||||
->select(['members.id', 'members.person_id', 'members.member_id', 'members.name', 'corporate_divisions.name AS division_name', 'members.active'])
|
||||
->selectRaw("(select sum(`claims`.`total_claim`) from `claims` where `members`.`id` = `claims`.`member_id` AND `claims`.`deleted_at` IS NULL) AS `claims_sum_total_claim`")
|
||||
->paginate($limit);
|
||||
}
|
||||
|
||||
|
||||
0
app/Services/ImportService.php
Executable file → Normal file
0
app/Services/ImportService.php
Executable file → Normal file
0
app/Services/LmsApi.php
Executable file → Normal file
0
app/Services/LmsApi.php
Executable file → Normal file
0
app/Traits/Blameable.php
Executable file → Normal file
0
app/Traits/Blameable.php
Executable file → Normal file
Reference in New Issue
Block a user