Merge remote-tracking branch 'origin/staging'

This commit is contained in:
Linksehat Staging Server
2023-06-13 11:39:11 +07:00
1984 changed files with 7613 additions and 2056 deletions

0
.DS_Store vendored Normal file → Executable file
View File

0
.editorconfig Normal file → Executable file
View File

View File

@@ -1,59 +0,0 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
OLDLMS_DB_CONNECTION=mysql
OLDLMS_DB_HOST=127.0.0.1
OLDLMS_DB_PORT=3306
OLDLMS_DB_DATABASE=linksehat
OLDLMS_DB_USERNAME=mysql
OLDLMS_DB_PASSWORD=password
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

0
.gitattributes vendored Normal file → Executable file
View File

0
.gitignore vendored Normal file → Executable file
View File

0
.styleci.yml Normal file → Executable file
View File

0
Modules/Client/Config/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Config/config.php Normal file → Executable file
View File

0
Modules/Client/Console/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Database/Migrations/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Database/Seeders/.gitkeep Normal file → Executable file
View File

View File

0
Modules/Client/Database/factories/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Entities/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Http/Controllers/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Http/Controllers/Api/AuthController.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

@@ -33,6 +33,9 @@ class CorporateMemberController extends Controller
case 'alarm-center':
$members = $this->corporateMemberService->getAllMemberAlarmCenter($corporate_id, $request);
return response()->json(Helper::paginateResources(DashboardMemberAlarmResources::collection($members)));
case 'service-monitoring':
$members = $this->corporateMemberService->getAllEncounter($corporate_id, $request);
return response()->json(Helper::paginateResources(DashboardMemberAlarmResources::collection($members)));
default:
$members = $this->corporateMemberService->getAllMemberDashboards($corporate_id, $request);
return response()->json(Helper::paginateResources(DashboardMemberResources::collection($members)));

View File

View File

@@ -0,0 +1,32 @@
<?php
namespace Modules\Client\Http\Controllers\Api;
use App\Models\Person;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
class DataController extends Controller
{
public function show($id)
{
try {
$data = Person::findOrFail($id);
return response()->json($data);
} catch (\Exception $e) {
return response()->json(['error' => 'Member not found'], 404);
}
}
public function update(Request $request, $id)
{
try {
$data = Person::findOrFail($id);
$data->update($request->all());
return response()->json(['message' => 'Data updated successfully']);
} catch (\Exception $e) {
return response()->json(['error' => 'Failed to update data'], 500);
}
}
}

35
Modules/Client/Http/Controllers/Api/TopUpController.php Normal file → Executable file
View File

@@ -3,6 +3,7 @@
namespace Modules\Client\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Models\CorporatePolicy;
use Illuminate\Contracts\Support\Renderable;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
@@ -33,9 +34,22 @@ class TopUpController extends Controller
* @param Request $request
* @return Renderable
*/
public function store(Request $request)
public function store(Request $request, $corporate_id)
{
//
$data = $request->validate([
'topup' => 'required|numeric',
]);
$corporatePolicy = CorporatePolicy::query()->where('corporate_id',$corporate_id)->firstOrFail();
if (!$corporatePolicy) {
return response() -> json (['message' => 'Corporate policy not found'],404);
}
$corporatePolicy -> total_premi += $data ['topup'];
$corporatePolicy -> save();
return response () -> json (['message' => 'Amount added to total_premi successfully'], 200);
}
/**
@@ -48,6 +62,23 @@ class TopUpController extends Controller
return view('client::show');
}
public function get($corporate_id)
{
$data = CorporatePolicy::query()
->where('corporate_id', $corporate_id)
->with(['currentPolicy', 'employees'])
->withCount(['employees', 'claims' => function ($query) {
$query->where('claims.status', 'paid');
}])
->first();
if (!$data) {
return response()->json(['message' => 'Corporate policy not found'], 404);
}
return Helper::responseJson(TopUpLimitResources::make($data));
}
/**
* Update the specified resource in storage.
* @param Request $request

0
Modules/Client/Http/Controllers/Api/UserController.php Normal file → Executable file
View File

0
Modules/Client/Http/Controllers/ClientController.php Normal file → Executable file
View File

0
Modules/Client/Http/Middleware/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Http/Requests/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Providers/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Providers/ClientServiceProvider.php Normal file → Executable file
View File

0
Modules/Client/Providers/RouteServiceProvider.php Normal file → Executable file
View File

0
Modules/Client/Resources/assets/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Resources/assets/js/app.js Normal file → Executable file
View File

0
Modules/Client/Resources/assets/sass/app.scss Normal file → Executable file
View File

0
Modules/Client/Resources/lang/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Resources/views/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Resources/views/index.blade.php Normal file → Executable file
View File

View File

0
Modules/Client/Routes/.gitkeep Normal file → Executable file
View File

12
Modules/Client/Routes/api.php Normal file → Executable file
View File

@@ -8,6 +8,9 @@ use Modules\Client\Http\Controllers\Api\CorporatePolicyController;
use Modules\Client\Http\Controllers\Api\UserController;
use Modules\Client\Http\Controllers\Api\ClaimController;
use Modules\Client\Http\Controllers\Api\TopUpController;
use Modules\Internal\Http\Controllers\ClaimEncounterController;
use App\Models\Encounter;
use Modules\Internal\Transformers\EncounterResource;
/*
|--------------------------------------------------------------------------
@@ -38,11 +41,16 @@ Route::prefix('client')->group(function () {
Route::get('members', [CorporateMemberController::class, 'index']);
Route::get('claims/status', [ClaimController::class, 'status']);
Route::get('claims', [ClaimController::class, 'index']);
Route::get('claims/{claim_id}/encounters', [ClaimEncounterController::class, 'getEncounterData']);
Route::get('topup', [TopUpController::class, 'index']);
// Route::get('topup', [TopUpController::class, 'get']);
Route::post('topup', [TopUpController::class, 'store']);
});
Route::get('claims/{id}', [ClaimController::class, 'show']);
});
});

0
Modules/Client/Routes/web.php Normal file → Executable file
View File

0
Modules/Client/Tests/Feature/.gitkeep Normal file → Executable file
View File

0
Modules/Client/Tests/Unit/.gitkeep Normal file → Executable file
View File

View File

0
Modules/Client/Transformers/ClaimShowResource.php Normal file → Executable file
View File

View File

View File

@@ -15,6 +15,7 @@ class MemberAlarmCenterResources extends JsonResource
{
return [
'id' => $this->id,
'personId' => $this->person_id,
'memberId' => $this->member_id,
'fullName' => $this->full_name,
'service' => $this->service_code,

View File

View File

0
Modules/Client/composer.json Normal file → Executable file
View File

0
Modules/Client/module.json Normal file → Executable file
View File

0
Modules/Client/package.json Normal file → Executable file
View File

0
Modules/Client/webpack.mix.js Normal file → Executable file
View File

0
Modules/HospitalPortal/Config/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Config/config.php Normal file → Executable file
View File

0
Modules/HospitalPortal/Console/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Database/Migrations/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Database/Seeders/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Database/factories/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Entities/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Http/Controllers/.gitkeep Normal file → Executable file
View File

View File

View File

View File

View File

View File

0
Modules/HospitalPortal/Http/Middleware/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Http/Requests/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Providers/.gitkeep Normal file → Executable file
View File

View File

View File

0
Modules/HospitalPortal/Resources/assets/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Resources/assets/js/app.js Normal file → Executable file
View File

0
Modules/HospitalPortal/Resources/assets/sass/app.scss Normal file → Executable file
View File

0
Modules/HospitalPortal/Resources/lang/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Resources/views/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Resources/views/index.blade.php Normal file → Executable file
View File

View File

0
Modules/HospitalPortal/Routes/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Routes/api.php Normal file → Executable file
View File

0
Modules/HospitalPortal/Routes/web.php Normal file → Executable file
View File

0
Modules/HospitalPortal/Tests/Feature/.gitkeep Normal file → Executable file
View File

0
Modules/HospitalPortal/Tests/Unit/.gitkeep Normal file → Executable file
View File

View File

View File

0
Modules/HospitalPortal/composer.json Normal file → Executable file
View File

0
Modules/HospitalPortal/module.json Normal file → Executable file
View File

0
Modules/HospitalPortal/package.json Normal file → Executable file
View File

0
Modules/HospitalPortal/webpack.mix.js Normal file → Executable file
View File

0
Modules/Internal/Config/.gitkeep Normal file → Executable file
View File

0
Modules/Internal/Config/config.php Normal file → Executable file
View File

0
Modules/Internal/Console/.gitkeep Normal file → Executable file
View File

0
Modules/Internal/Database/Migrations/.gitkeep Normal file → Executable file
View File

0
Modules/Internal/Database/Seeders/.gitkeep Normal file → Executable file
View File

View File

0
Modules/Internal/Database/factories/.gitkeep Normal file → Executable file
View File

0
Modules/Internal/Emails/SendVerifyEmail.php Normal file → Executable file
View File

0
Modules/Internal/Entities/.gitkeep Normal file → Executable file
View File

0
Modules/Internal/Events/ForgetPassword.php Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More