Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -98,6 +98,7 @@ class MemberController extends Controller
|
|||||||
|
|
||||||
// Provider
|
// Provider
|
||||||
$providers = DB::table('organizations')
|
$providers = DB::table('organizations')
|
||||||
|
->where('organizations.type', '=', 'hospital')
|
||||||
->select(
|
->select(
|
||||||
'organizations.id',
|
'organizations.id',
|
||||||
'organizations.name'
|
'organizations.name'
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class RequestLogController extends Controller
|
|||||||
'service_code' => $request->service_code,
|
'service_code' => $request->service_code,
|
||||||
'id_provider' => $request->id_provider,
|
'id_provider' => $request->id_provider,
|
||||||
'name_provider' => $request->name_provider,
|
'name_provider' => $request->name_provider,
|
||||||
'adress_provider' => $request->address_provider
|
'address_provider' => $request->address_provider
|
||||||
];
|
];
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'member_id' => 'required',
|
'member_id' => 'required',
|
||||||
@@ -53,17 +53,72 @@ class RequestLogController extends Controller
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//insert data to organization
|
||||||
$requestLogControllerInstance = new PrimeCenterRequestLog();
|
try {
|
||||||
$response = $requestLogControllerInstance->createNew($request);
|
if(!$request->id_provider)
|
||||||
|
{
|
||||||
|
// Memulai transaksi
|
||||||
|
DB::beginTransaction();
|
||||||
|
|
||||||
if($response->original['statusCode'] == 200)
|
// Membuat singkatan dari nama rumah sakit
|
||||||
{
|
$singkatan = "";
|
||||||
return ApiResponse::apiResponse("Success", $data, trans('Message.success'), 200);
|
$words = explode(' ', $request->name_provider);
|
||||||
}
|
|
||||||
else
|
foreach ($words as $word) {
|
||||||
{
|
$singkatan .= strtoupper(substr($word, 0, 1));
|
||||||
return ApiResponse::apiResponse('Server Error', $data, trans('Message.server_error'), 500);
|
}
|
||||||
|
|
||||||
|
// Membuat kode organisasi
|
||||||
|
$kodeOrganisasi = "ORG000" . $singkatan;
|
||||||
|
|
||||||
|
// Insert data ke tabel organizations
|
||||||
|
$organization_id = DB::table('organizations')
|
||||||
|
->insertGetId([
|
||||||
|
'name' => $request->name_provider,
|
||||||
|
'code' => $kodeOrganisasi,
|
||||||
|
'type' => 'hospital',
|
||||||
|
'created_at' => now(),
|
||||||
|
'created_by' => auth()->user()->id
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Insert data ke tabel addresses
|
||||||
|
$address_id = DB::table('addresses')
|
||||||
|
->insertGetId([
|
||||||
|
'text'=> $request->address_provider,
|
||||||
|
'addressable_type' => 'App\Models\Organization',
|
||||||
|
'addressable_id' => $organization_id,
|
||||||
|
'type' => 'hospital',
|
||||||
|
'created_at' => now(),
|
||||||
|
'created_by' => auth()->user()->id
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Update main_address_id di tabel organizations
|
||||||
|
DB::table('organizations')
|
||||||
|
->where('organizations.id', '=', $organization_id)
|
||||||
|
->update(['main_address_id' => $address_id]);
|
||||||
|
|
||||||
|
// Commit transaksi
|
||||||
|
DB::commit();
|
||||||
|
$request->merge(['organization_id' => $organization_id]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$requestLogControllerInstance = new PrimeCenterRequestLog();
|
||||||
|
$response = $requestLogControllerInstance->createNew($request);
|
||||||
|
|
||||||
|
if($response->original['statusCode'] == 200)
|
||||||
|
{
|
||||||
|
return ApiResponse::apiResponse("Success", $data, trans('Message.success'), 200);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ApiResponse::apiResponse('Server Error', $data, trans('Message.server_error'), 500);
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// Rollback transaksi jika terjadi kesalahan
|
||||||
|
DB::rollBack();
|
||||||
|
|
||||||
|
// Handle error, bisa di-log atau dikembalikan sebagai response
|
||||||
|
return ApiResponse::apiResponse('Server Error', $data, $e->getMessage(), 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -308,6 +363,7 @@ class RequestLogController extends Controller
|
|||||||
$dataMember = DB::table('members')
|
$dataMember = DB::table('members')
|
||||||
->where('members.id', '=', $dataRequestLog->member_id)
|
->where('members.id', '=', $dataRequestLog->member_id)
|
||||||
->select(
|
->select(
|
||||||
|
'members.id',
|
||||||
'members.principal_id',
|
'members.principal_id',
|
||||||
'members.name',
|
'members.name',
|
||||||
'members.birth_date',
|
'members.birth_date',
|
||||||
@@ -321,9 +377,9 @@ class RequestLogController extends Controller
|
|||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(Select corporates.name FROM corporates
|
(Select corporates.name FROM corporates
|
||||||
INNER JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
|
LEFT JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
|
||||||
WHERE corporate_employees.member_id = members.id LIMIT 1) AS nama_perusahaan
|
WHERE corporate_employees.member_id = members.id LIMIT 1) AS nama_perusahaan
|
||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(Select services.name FROM services
|
(Select services.name FROM services
|
||||||
WHERE services.code = "'.$dataRequestLog->service_code.'" LIMIT 1) AS jenis_perwatan
|
WHERE services.code = "'.$dataRequestLog->service_code.'" LIMIT 1) AS jenis_perwatan
|
||||||
@@ -336,12 +392,12 @@ class RequestLogController extends Controller
|
|||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(Select plans.code FROM member_plans
|
(Select plans.code FROM member_plans
|
||||||
INNER JOIN plans ON plans.id = member_plans.plan_id
|
LEFT JOIN plans ON plans.id = member_plans.plan_id
|
||||||
WHERE member_plans.member_id = members.id LIMIT 1) AS code_plan
|
WHERE member_plans.member_id = members.id LIMIT 1) AS code_plan
|
||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(Select plans.limit_rules FROM member_plans
|
(Select plans.limit_rules FROM member_plans
|
||||||
INNER JOIN plans ON plans.id = member_plans.plan_id
|
LEFT JOIN plans ON plans.id = member_plans.plan_id
|
||||||
WHERE member_plans.member_id = members.id LIMIT 1) AS limit_rules
|
WHERE member_plans.member_id = members.id LIMIT 1) AS limit_rules
|
||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
@@ -357,7 +413,6 @@ class RequestLogController extends Controller
|
|||||||
$dataNamaKaryawan = DB::table('members')
|
$dataNamaKaryawan = DB::table('members')
|
||||||
->where('members.member_id', '=', $dataMember->principal_id)
|
->where('members.member_id', '=', $dataMember->principal_id)
|
||||||
->select('members.name')
|
->select('members.name')
|
||||||
->limit(1)
|
|
||||||
->first();
|
->first();
|
||||||
$data['namaKaryawan'] = $dataNamaKaryawan->name;
|
$data['namaKaryawan'] = $dataNamaKaryawan->name;
|
||||||
}
|
}
|
||||||
@@ -369,24 +424,26 @@ class RequestLogController extends Controller
|
|||||||
|
|
||||||
$data['request_logs'] = $dataRequestLog;
|
$data['request_logs'] = $dataRequestLog;
|
||||||
|
|
||||||
$dataRumahSakit = DB::table('users')
|
$dataRumahSakit = DB::table('organizations')
|
||||||
->where('users.id', '=', $dataRequestLog->created_by)
|
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
|
||||||
->select(
|
->where('organizations.id', '=', $dataRequestLog->organization_id)
|
||||||
'*',
|
->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||||
DB::raw('
|
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
|
||||||
(Select organizations.name FROM organizations
|
|
||||||
WHERE organizations.id = users.organization_id LIMIT 1) AS nama_rumahsakit
|
|
||||||
'),
|
|
||||||
DB::raw('
|
|
||||||
(Select addresses.text FROM organizations
|
|
||||||
INNER JOIN addresses ON addresses.id = organizations.main_address_id
|
|
||||||
WHERE organizations.id = users.organization_id LIMIT 1) AS alamat_rumahsakit
|
|
||||||
')
|
|
||||||
)
|
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
$data['rumahSakit'] = $dataRumahSakit;
|
$data['rumahSakit'] = $dataRumahSakit;
|
||||||
|
|
||||||
|
$logoPerusahaan = DB::table('files')
|
||||||
|
->leftJoin('corporate_employees', 'corporate_employees.corporate_id', '=', 'files.fileable_id')
|
||||||
|
->leftJoin('corporates', 'corporate_employees.corporate_id', '=', 'corporates.id')
|
||||||
|
->where('corporate_employees.member_id', '=', $dataMember->id)
|
||||||
|
->where('files.fileable_type', '=', 'App\Models\Corporate')
|
||||||
|
->select('files.path', 'corporates.code', 'corporates.name')
|
||||||
|
->orderBy('files.id', 'desc')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$data['logoPerusahaan'] = $logoPerusahaan;
|
||||||
|
|
||||||
$pdf = new Dompdf();
|
$pdf = new Dompdf();
|
||||||
|
|
||||||
$options = new Options();
|
$options = new Options();
|
||||||
@@ -426,6 +483,7 @@ class RequestLogController extends Controller
|
|||||||
$dataMember = DB::table('members')
|
$dataMember = DB::table('members')
|
||||||
->where('members.id', '=', $dataRequestLog->member_id)
|
->where('members.id', '=', $dataRequestLog->member_id)
|
||||||
->select(
|
->select(
|
||||||
|
'members.id',
|
||||||
'members.principal_id',
|
'members.principal_id',
|
||||||
'members.name',
|
'members.name',
|
||||||
'members.birth_date',
|
'members.birth_date',
|
||||||
@@ -439,7 +497,7 @@ class RequestLogController extends Controller
|
|||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(Select corporates.name FROM corporates
|
(Select corporates.name FROM corporates
|
||||||
INNER JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
|
LEFT JOIN corporate_employees ON corporate_employees.corporate_id = corporates.id
|
||||||
WHERE corporate_employees.member_id = members.id LIMIT 1) AS nama_perusahaan
|
WHERE corporate_employees.member_id = members.id LIMIT 1) AS nama_perusahaan
|
||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
@@ -454,12 +512,12 @@ class RequestLogController extends Controller
|
|||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(Select plans.code FROM member_plans
|
(Select plans.code FROM member_plans
|
||||||
INNER JOIN plans ON plans.id = member_plans.plan_id
|
LEFT JOIN plans ON plans.id = member_plans.plan_id
|
||||||
WHERE member_plans.member_id = members.id LIMIT 1) AS code_plan
|
WHERE member_plans.member_id = members.id LIMIT 1) AS code_plan
|
||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(Select plans.limit_rules FROM member_plans
|
(Select plans.limit_rules FROM member_plans
|
||||||
INNER JOIN plans ON plans.id = member_plans.plan_id
|
LEFT JOIN plans ON plans.id = member_plans.plan_id
|
||||||
WHERE member_plans.member_id = members.id LIMIT 1) AS limit_rules
|
WHERE member_plans.member_id = members.id LIMIT 1) AS limit_rules
|
||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
@@ -500,24 +558,27 @@ class RequestLogController extends Controller
|
|||||||
|
|
||||||
$data['dataClaimLog'] = $dataClaimLog;
|
$data['dataClaimLog'] = $dataClaimLog;
|
||||||
|
|
||||||
$dataRumahSakit = DB::table('users')
|
|
||||||
->where('users.id', '=', $dataRequestLog->created_by)
|
$dataRumahSakit = DB::table('organizations')
|
||||||
->select(
|
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
|
||||||
'*',
|
->where('organizations.id', '=', $dataRequestLog->organization_id)
|
||||||
DB::raw('
|
->where('addresses.addressable_type', '=', 'App\Models\Organization')
|
||||||
(Select organizations.name FROM organizations
|
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
|
||||||
WHERE organizations.id = users.organization_id LIMIT 1) AS nama_rumahsakit
|
|
||||||
'),
|
|
||||||
DB::raw('
|
|
||||||
(Select addresses.text FROM organizations
|
|
||||||
INNER JOIN addresses ON addresses.id = organizations.main_address_id
|
|
||||||
WHERE organizations.id = users.organization_id LIMIT 1) AS alamat_rumahsakit
|
|
||||||
')
|
|
||||||
)
|
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
$data['rumahSakit'] = $dataRumahSakit;
|
$data['rumahSakit'] = $dataRumahSakit;
|
||||||
|
|
||||||
|
$logoPerusahaan = DB::table('files')
|
||||||
|
->leftJoin('corporate_employees', 'corporate_employees.corporate_id', '=', 'files.fileable_id')
|
||||||
|
->leftJoin('corporates', 'corporate_employees.corporate_id', '=', 'corporates.id')
|
||||||
|
->where('corporate_employees.member_id', '=', $dataMember->id)
|
||||||
|
->where('files.fileable_type', '=', 'App\Models\Corporate')
|
||||||
|
->select('files.path', 'corporates.code', 'corporates.name')
|
||||||
|
->orderBy('files.id', 'desc')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$data['logoPerusahaan'] = $logoPerusahaan;
|
||||||
|
|
||||||
$pdf = new Dompdf();
|
$pdf = new Dompdf();
|
||||||
|
|
||||||
$options = new Options();
|
$options = new Options();
|
||||||
|
|||||||
@@ -11,19 +11,25 @@ use Illuminate\Support\Facades\Hash;
|
|||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Modules\Internal\Emails\SendVerifyEmail;
|
use Modules\Internal\Emails\SendVerifyEmail;
|
||||||
use Modules\Internal\Events\ForgetPassword;
|
use Modules\Internal\Events\ForgetPassword;
|
||||||
|
use App\Helpers\Helper;
|
||||||
|
use Validator;
|
||||||
|
|
||||||
class AuthController extends Controller
|
class AuthController extends Controller
|
||||||
{
|
{
|
||||||
public function login(Request $request)
|
public function login(Request $request)
|
||||||
{
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'email' => 'required|email',
|
'email' => 'required',
|
||||||
'password' => 'required'
|
'password' => 'required'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user = User::query()
|
$user = User::query()
|
||||||
->where('email', $request->email)
|
->where(function ($query) use ($request) {
|
||||||
->first();
|
$query->where('email', $request->email)
|
||||||
|
->orWhere('username', $request->email);
|
||||||
|
})
|
||||||
|
->first();
|
||||||
|
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
return response(['message' => 'User Tidak Ditemukan'], 404);
|
return response(['message' => 'User Tidak Ditemukan'], 404);
|
||||||
@@ -124,4 +130,36 @@ class AuthController extends Controller
|
|||||||
]);
|
]);
|
||||||
return response()->json($user);
|
return response()->json($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function register(Request $request)
|
||||||
|
{
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'email' => 'required|email|unique:users,email',
|
||||||
|
'username' => 'required|unique:users,username',
|
||||||
|
'password' => [
|
||||||
|
'required',
|
||||||
|
'min:5',
|
||||||
|
// 'regex:/.*[0-9].*/',
|
||||||
|
// 'regex:/.*[a-z].*/',
|
||||||
|
// 'regex:/.*[A-Z].*/',
|
||||||
|
]
|
||||||
|
], [
|
||||||
|
// 'password.regex' => "Password harus minimal 8 karakter, kombinasi huruf besar kecil dan angka"
|
||||||
|
])->validate();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$user = User::create([
|
||||||
|
'email' => $request->email,
|
||||||
|
'username' => $request->username,
|
||||||
|
'password' => Hash::make($request->password),
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json($user);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return response()->json([
|
||||||
|
'message' => 'Terjadi masalah ketika mendaftar'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ class DailyMonitoringController extends Controller
|
|||||||
'lab_date' => $request->lab_date,
|
'lab_date' => $request->lab_date,
|
||||||
'provider' => $request->provider,
|
'provider' => $request->provider,
|
||||||
'examination' => $request->examination,
|
'examination' => $request->examination,
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
@@ -387,7 +388,11 @@ class DailyMonitoringController extends Controller
|
|||||||
// get claim request
|
// get claim request
|
||||||
$request_log = DB::table('request_logs')
|
$request_log = DB::table('request_logs')
|
||||||
->where('code', $request_code)
|
->where('code', $request_code)
|
||||||
->update(['discharge_date' => now()]);
|
->update([
|
||||||
|
'discharge_date' => now(),
|
||||||
|
'updated_by' => auth()->user()->id,
|
||||||
|
'updated_at' => now()
|
||||||
|
]);
|
||||||
if ($request_log) {
|
if ($request_log) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'error' => false,
|
'error' => false,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Routing\Controller;
|
use Illuminate\Routing\Controller;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
|
||||||
class RequestLogBenefitController extends Controller
|
class RequestLogBenefitController extends Controller
|
||||||
@@ -72,6 +73,7 @@ class RequestLogBenefitController extends Controller
|
|||||||
'amount_not_approved' => $value['amount_not_approved'],
|
'amount_not_approved' => $value['amount_not_approved'],
|
||||||
'excess_paid' => $value['excess_paid'],
|
'excess_paid' => $value['excess_paid'],
|
||||||
'keterangan' => $value['keterangan'],
|
'keterangan' => $value['keterangan'],
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
|
|
||||||
];
|
];
|
||||||
// Insert Data
|
// Insert Data
|
||||||
@@ -117,6 +119,8 @@ class RequestLogBenefitController extends Controller
|
|||||||
$requestLogBenefit->amount_not_approved = $request->amount_not_approved;
|
$requestLogBenefit->amount_not_approved = $request->amount_not_approved;
|
||||||
$requestLogBenefit->excess_paid = $request->excess_paid;
|
$requestLogBenefit->excess_paid = $request->excess_paid;
|
||||||
$requestLogBenefit->keterangan = $request->keterangan;
|
$requestLogBenefit->keterangan = $request->keterangan;
|
||||||
|
$requestLogBenefit->updated_by = auth()->user()->id;
|
||||||
|
$requestLogBenefit->updated_at = Carbon::now();
|
||||||
|
|
||||||
$requestLogBenefit->save();
|
$requestLogBenefit->save();
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use Illuminate\Support\Facades\Storage;
|
|||||||
use App\Services\RequestLogService;
|
use App\Services\RequestLogService;
|
||||||
use App\Exceptions\ImportRowException;
|
use App\Exceptions\ImportRowException;
|
||||||
use App\Events\RequestLoged;
|
use App\Events\RequestLoged;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
use Box\Spout\Reader\Common\Creator\ReaderEntityFactory;
|
use Box\Spout\Reader\Common\Creator\ReaderEntityFactory;
|
||||||
@@ -198,6 +199,8 @@ class RequestLogController extends Controller
|
|||||||
{
|
{
|
||||||
$requestLog = RequestLog::findOrFail($id);
|
$requestLog = RequestLog::findOrFail($id);
|
||||||
$requestLog->status = $request->status;
|
$requestLog->status = $request->status;
|
||||||
|
$requestLog->approved_by = auth()->user()->id;
|
||||||
|
$requestLog->approved_at = Carbon::now();
|
||||||
$requestLog->save();
|
$requestLog->save();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@@ -312,6 +315,8 @@ class RequestLogController extends Controller
|
|||||||
// Update Request LOG untuk lanjut ke Final LOG
|
// Update Request LOG untuk lanjut ke Final LOG
|
||||||
$requestLog->final_log = 1;
|
$requestLog->final_log = 1;
|
||||||
$requestLog->status_final_log = $status;
|
$requestLog->status_final_log = $status;
|
||||||
|
$requestLog->approved_final_log_by = auth()->user()->id;
|
||||||
|
$requestLog->approved_final_log_at = Carbon::now();
|
||||||
$requestLog->save();
|
$requestLog->save();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Internal\Http\Controllers\Api;
|
||||||
|
|
||||||
|
use App\Helpers\Helper;
|
||||||
|
use Illuminate\Contracts\Support\Renderable;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Routing\Controller;
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
|
class UserManagemet extends Controller
|
||||||
|
{
|
||||||
|
public function index(Request $request){
|
||||||
|
$user = User::all();
|
||||||
|
return Helper::responseJson(data: $user);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,6 +45,7 @@ use Modules\Internal\Http\Controllers\Api\LaboratoriumResultController;
|
|||||||
use Modules\Internal\Http\Controllers\Api\CorporateManageController;
|
use Modules\Internal\Http\Controllers\Api\CorporateManageController;
|
||||||
use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| API Routes
|
| API Routes
|
||||||
@@ -60,6 +61,7 @@ use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
|||||||
Route::prefix('internal')->group(function () {
|
Route::prefix('internal')->group(function () {
|
||||||
|
|
||||||
Route::post('login', [AuthController::class, 'login'])->name('login');
|
Route::post('login', [AuthController::class, 'login'])->name('login');
|
||||||
|
Route::post('register', [AuthController::class, 'register'])->name('register');
|
||||||
Route::post('forget-password', [AuthController::class, 'forgetPassword'])->name('forget-password');
|
Route::post('forget-password', [AuthController::class, 'forgetPassword'])->name('forget-password');
|
||||||
Route::post('verify-email', [AuthController::class, 'verifyEmail'])->name('verify-email');
|
Route::post('verify-email', [AuthController::class, 'verifyEmail'])->name('verify-email');
|
||||||
|
|
||||||
|
|||||||
@@ -601,7 +601,9 @@ class MemberEnrollmentService
|
|||||||
"telephone_office" => $row['telephone_office'] ?? null,
|
"telephone_office" => $row['telephone_office'] ?? null,
|
||||||
"suspended" => $row['member_suspended'] ?? null,
|
"suspended" => $row['member_suspended'] ?? null,
|
||||||
|
|
||||||
"active" => $row['employment_status'] == 'INACTIVE' ? 0 : 1
|
"active" => $row['employment_status'] == 'INACTIVE' ? 0 : 1,
|
||||||
|
|
||||||
|
"employee_status" => $row['employment_status']
|
||||||
];
|
];
|
||||||
// $this->validateRow($row);
|
// $this->validateRow($row);
|
||||||
if (!isset($corporate->currentPolicy) || $corporate->currentPolicy->code != $row['policy_number']) {
|
if (!isset($corporate->currentPolicy) || $corporate->currentPolicy->code != $row['policy_number']) {
|
||||||
@@ -869,7 +871,7 @@ class MemberEnrollmentService
|
|||||||
break;
|
break;
|
||||||
case "2": // Member Information Update (Without Replacement Card)
|
case "2": // Member Information Update (Without Replacement Card)
|
||||||
|
|
||||||
// $this->validateRow($row);
|
$this->validateRow($row);
|
||||||
$member = Member::query()
|
$member = Member::query()
|
||||||
->where('member_id', $row['member_id'])
|
->where('member_id', $row['member_id'])
|
||||||
->first();
|
->first();
|
||||||
@@ -898,6 +900,13 @@ class MemberEnrollmentService
|
|||||||
);
|
);
|
||||||
|
|
||||||
$member->person_id = $person->id;
|
$member->person_id = $person->id;
|
||||||
|
|
||||||
|
$member->name = $row['name'];
|
||||||
|
$member->employee_status = $row['employment_status'];
|
||||||
|
$member->gender = Helper::genderPerson($row['sex']);
|
||||||
|
$member->relation_with_principal = $row['relationship_with_principal'];
|
||||||
|
$member->marital_status = $row['marital_status'];
|
||||||
|
|
||||||
$member->save();
|
$member->save();
|
||||||
try {
|
try {
|
||||||
$memberPolicy = MemberPolicy::query()
|
$memberPolicy = MemberPolicy::query()
|
||||||
@@ -929,52 +938,50 @@ class MemberEnrollmentService
|
|||||||
// $memberPlan->save();
|
// $memberPlan->save();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Update plan
|
//Update plan
|
||||||
// $plans = explode(",",$row['plan_id']);
|
$plans = explode(",",$row['plan_id']);
|
||||||
// if (count($plans) > 0) {
|
if (count($plans) > 0) {
|
||||||
// foreach($plans as $d){
|
foreach($plans as $d){
|
||||||
// $plan = Plan::query()
|
$plan = Plan::query()
|
||||||
// ->where('code', $d)
|
->where('code', $d)
|
||||||
// ->where('corporate_id', $corporate->id)
|
->where('corporate_id', $corporate->id)
|
||||||
// ->first();
|
->first();
|
||||||
// if (!$plan) {
|
if (!$plan) {
|
||||||
// throw new ImportRowException(__('enrollment.PLAN_NOT_FOUND'), 0, null, $row);
|
throw new ImportRowException(__('enrollment.PLAN_NOT_FOUND'), 0, null, $row);
|
||||||
// }
|
}
|
||||||
// $member->memberPlans()->updateOrCreate([
|
$member->memberPlans()->updateOrCreate([
|
||||||
// 'member_id' => $member->id,
|
'member_id' => $member->id,
|
||||||
// 'plan_id' => $plan->id,
|
'plan_id' => $plan->id,
|
||||||
// ],
|
],
|
||||||
// [
|
[
|
||||||
// 'plan_id' => $plan->id,
|
'plan_id' => $plan->id,
|
||||||
// 'status' => 'active',
|
'status' => 'active',
|
||||||
// 'start' => $this->dateParser($row['member_effective_date']),
|
'start' => $this->dateParser($row['member_effective_date']),
|
||||||
// 'end' => $this->dateParser($row['member_expiry_date']),
|
'end' => $this->dateParser($row['member_expiry_date']),
|
||||||
// ]);
|
]);
|
||||||
// }
|
}
|
||||||
// } else {
|
} else {
|
||||||
// $plan = Plan::query()
|
$plan = Plan::query()
|
||||||
// ->where('code', $row['plan_id'])
|
->where('code', $row['plan_id'])
|
||||||
// ->where('corporate_id', $corporate->id)
|
->where('corporate_id', $corporate->id)
|
||||||
// ->first();
|
->first();
|
||||||
// if (!$plan) {
|
if (!$plan) {
|
||||||
// throw new ImportRowException(__('enrollment.PLAN_NOT_FOUND'), 0, null, $row);
|
throw new ImportRowException(__('enrollment.PLAN_NOT_FOUND'), 0, null, $row);
|
||||||
// }
|
}
|
||||||
// $member->memberPlans()->updateOrCreate([
|
$member->memberPlans()->updateOrCreate([
|
||||||
// 'member_id' => $member->id,
|
'member_id' => $member->id,
|
||||||
// 'plan_id' => $plan->id,
|
'plan_id' => $plan->id,
|
||||||
// ],
|
],
|
||||||
// [
|
[
|
||||||
// 'plan_id' => $plan->id,
|
'plan_id' => $plan->id,
|
||||||
// 'status' => 'active',
|
'status' => 'active',
|
||||||
// 'start' => $this->dateParser($row['member_effective_date']),
|
'start' => $this->dateParser($row['member_effective_date']),
|
||||||
// 'end' => $this->dateParser($row['member_expiry_date']),
|
'end' => $this->dateParser($row['member_expiry_date']),
|
||||||
// ]);
|
]);
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
// end update plan
|
// end update plan
|
||||||
|
|
||||||
// Update jika ada perubahaan di ASO maka akan teriflek ke LMS juga\
|
// Update jika ada perubahaan di ASO maka akan teriflek ke LMS juga
|
||||||
$userInsuranceLms = UserInsurance::query()
|
$userInsuranceLms = UserInsurance::query()
|
||||||
->where('sNoPolis', $row['member_id'])
|
->where('sNoPolis', $row['member_id'])
|
||||||
->first();
|
->first();
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ class Member extends Model
|
|||||||
"endorsement_date",
|
"endorsement_date",
|
||||||
"members_effective_date",
|
"members_effective_date",
|
||||||
"members_expire_date",
|
"members_expire_date",
|
||||||
|
"employee_status",
|
||||||
"activation_date",
|
"activation_date",
|
||||||
"terminated_date",
|
"terminated_date",
|
||||||
"remarks",
|
"remarks",
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ class RequestDailyMonitoring extends Model
|
|||||||
'lab_date',
|
'lab_date',
|
||||||
'provider',
|
'provider',
|
||||||
'examination',
|
'examination',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
'deleted_by',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $appends = ['medical_plan', 'non_medikamentosa_plan', 'document', 'discharge_date'];
|
protected $appends = ['medical_plan', 'non_medikamentosa_plan', 'document', 'discharge_date'];
|
||||||
|
|||||||
@@ -30,7 +30,11 @@ class RequestLog extends Model
|
|||||||
'source',
|
'source',
|
||||||
'claim_id',
|
'claim_id',
|
||||||
'organization_id',
|
'organization_id',
|
||||||
'code'
|
'code',
|
||||||
|
'approved_by',
|
||||||
|
'approved_at',
|
||||||
|
'approved_final_log_by',
|
||||||
|
'approved_final_log_at',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ class RequestLogBenefit extends Model
|
|||||||
'amount_not_approved',
|
'amount_not_approved',
|
||||||
'excess_paid',
|
'excess_paid',
|
||||||
'keterangan',
|
'keterangan',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
'deleted_by',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function benefit(){
|
public function benefit(){
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ class RequestLogMedicine extends Model
|
|||||||
'request_log_id',
|
'request_log_id',
|
||||||
'medicine',
|
'medicine',
|
||||||
'price',
|
'price',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
'deleted_by',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class User extends Authenticatable
|
|||||||
'person_id',
|
'person_id',
|
||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
|
'username',
|
||||||
'password',
|
'password',
|
||||||
'phone',
|
'phone',
|
||||||
'otp',
|
'otp',
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->foreignId('role_id')->after('person_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('role_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('fiture_has_permissions', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('fitur_name');
|
||||||
|
$table->timestamps();
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable()->index();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable()->index();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable()->index();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('fiture_has_permissions');
|
||||||
|
}
|
||||||
|
};
|
||||||
100
database/migrations/2024_01_02_160639_add_recode_action.php
Normal file
100
database/migrations/2024_01_02_160639_add_recode_action.php
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('request_log_benefits', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_daily_monitorings', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medical_plan', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medicines', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('request_log_benefits', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_daily_monitorings', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medical_plan', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medicines', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->string('username')->after('email')->default(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('username');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->integer('approved_by')->nullable()->after('created_by');
|
||||||
|
$table->dateTime('approved_at')->nullable()->after('approved_by');
|
||||||
|
$table->integer('approved_final_log_by')->nullable()->after('approved_at');
|
||||||
|
$table->dateTime('approved_final_log_at')->nullable()->after('approved_final_log_by');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['approved_by', 'invoice_date', 'approved_final_log_by', 'approved_final_log_at']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('members', function (Blueprint $table) {
|
||||||
|
$table->string('employee_status')->after('terminated_date')->default(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('members', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('employee_status');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
import { Corporate, Plan } from "./corporates";
|
import { Corporate, Plan, Policy } from "./corporates";
|
||||||
|
|
||||||
export type Member = {
|
export type Member = {
|
||||||
id: string,
|
id: number,
|
||||||
member_id: string,
|
member_id: string,
|
||||||
record_type: string,
|
record_type: string,
|
||||||
payor_id: string,
|
payor_id: string,
|
||||||
@@ -19,8 +19,15 @@ export type Member = {
|
|||||||
principal_id: string,
|
principal_id: string,
|
||||||
relation_with_principal: string,
|
relation_with_principal: string,
|
||||||
bpjs_class: string,
|
bpjs_class: string,
|
||||||
active: string,
|
active: number,
|
||||||
current_plans: Plan,
|
current_plans: Plan,
|
||||||
current_corporate: Corporate,
|
current_corporate: Corporate,
|
||||||
full_name: string,
|
full_name: string,
|
||||||
|
members_effective_date: string,
|
||||||
|
activation_date: string,
|
||||||
|
current_policy: Policy,
|
||||||
|
nric: string,
|
||||||
|
employee_status: string,
|
||||||
|
email: string,
|
||||||
|
// person: ,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,17 +81,19 @@ type AuthProviderProps = {
|
|||||||
function AuthProvider({ children }: AuthProviderProps) {
|
function AuthProvider({ children }: AuthProviderProps) {
|
||||||
const [state, dispatch] = useReducer(JWTReducer, initialState);
|
const [state, dispatch] = useReducer(JWTReducer, initialState);
|
||||||
let location = useLocation();
|
let location = useLocation();
|
||||||
|
const accessToken = getSession();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const initialize = async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const accessToken = getSession();
|
// const accessToken = getSession();
|
||||||
|
|
||||||
if (accessToken) {
|
if (accessToken) {
|
||||||
setSession(accessToken);
|
setSession(accessToken);
|
||||||
|
|
||||||
const response = await axios.get('/user');
|
const response = await axios.get('/user');
|
||||||
const user = response.data;
|
const user = response.data;
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: Types.Initial,
|
type: Types.Initial,
|
||||||
payload: {
|
payload: {
|
||||||
@@ -117,11 +119,10 @@ function AuthProvider({ children }: AuthProviderProps) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
})();
|
||||||
|
}, [accessToken]);
|
||||||
initialize();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
|
|
||||||
const login = async (email: string, password: string) => axios
|
const login = async (email: string, password: string) => axios
|
||||||
.post('/login', { email, password })
|
.post('/login', { email, password })
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
@@ -30,8 +30,9 @@ const MENU_OPTIONS = [
|
|||||||
export default function AccountPopover() {
|
export default function AccountPopover() {
|
||||||
const [open, setOpen] = useState<HTMLElement | null>(null);
|
const [open, setOpen] = useState<HTMLElement | null>(null);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { logout } = useAuth();
|
const { logout, user } = useAuth();
|
||||||
|
|
||||||
|
console.log(user?.email)
|
||||||
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
|
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
|
||||||
setOpen(event.currentTarget);
|
setOpen(event.currentTarget);
|
||||||
};
|
};
|
||||||
@@ -65,7 +66,7 @@ export default function AccountPopover() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
src="https://linksehat.com/assets/img/users/dummy.jpg"
|
||||||
alt="Rayan Moran"
|
alt="Rayan Moran"
|
||||||
/>
|
/>
|
||||||
</IconButtonAnimate>
|
</IconButtonAnimate>
|
||||||
@@ -86,10 +87,10 @@ export default function AccountPopover() {
|
|||||||
>
|
>
|
||||||
<Box sx={{ my: 1.5, px: 2.5 }}>
|
<Box sx={{ my: 1.5, px: 2.5 }}>
|
||||||
<Typography variant="subtitle2" noWrap>
|
<Typography variant="subtitle2" noWrap>
|
||||||
Rayan Moran
|
{user?.full_name ? user?.full_name : ''}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2" sx={{ color: 'text.secondary' }} noWrap>
|
<Typography variant="body2" sx={{ color: 'text.secondary' }} noWrap>
|
||||||
rayan.moran@gmail.com
|
{user?.email}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|||||||
@@ -92,9 +92,9 @@ export default function DashboardHeader({
|
|||||||
<Box sx={{ flexGrow: 1 }} />
|
<Box sx={{ flexGrow: 1 }} />
|
||||||
|
|
||||||
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>
|
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>
|
||||||
<LanguagePopover />
|
{/* <LanguagePopover />
|
||||||
<NotificationsPopover />
|
<NotificationsPopover />
|
||||||
<ContactsPopover />
|
<ContactsPopover /> */}
|
||||||
<AccountPopover />
|
<AccountPopover />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|||||||
@@ -108,7 +108,10 @@ const navConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'USER MANAGEMENT',
|
title: 'USER MANAGEMENT',
|
||||||
path: '/users',
|
children: [
|
||||||
|
{ title: 'User Access', path: '/master/diagnosis' },
|
||||||
|
{ title: 'User Role', path: '/master/diagnosis' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'LINKING TOOLS',
|
title: 'LINKING TOOLS',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// @mui
|
// @mui
|
||||||
import { styled } from '@mui/material/styles';
|
import { styled } from '@mui/material/styles';
|
||||||
import { Box, Link, Typography, Avatar } from '@mui/material';
|
import { Box, Link, Typography, Avatar } from '@mui/material';
|
||||||
|
import useAuth from '../../../hooks/useAuth';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -22,6 +23,8 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function NavbarAccount({ isCollapse }: Props) {
|
export default function NavbarAccount({ isCollapse }: Props) {
|
||||||
|
|
||||||
|
const { logout, user } = useAuth();
|
||||||
return (
|
return (
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<RootStyle
|
<RootStyle
|
||||||
@@ -32,7 +35,7 @@ export default function NavbarAccount({ isCollapse }: Props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
src="https://linksehat.com/assets/img/users/dummy.jpg"
|
||||||
alt="Rayan Moran"
|
alt="Rayan Moran"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -50,10 +53,10 @@ export default function NavbarAccount({ isCollapse }: Props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle2" noWrap>
|
<Typography variant="subtitle2" noWrap>
|
||||||
Rayan Moran
|
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2" noWrap sx={{ color: 'text.secondary' }}>
|
<Typography variant="body2" noWrap sx={{ color: 'text.secondary' }}>
|
||||||
user
|
Hi {user?.full_name}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</RootStyle>
|
</RootStyle>
|
||||||
|
|||||||
@@ -612,16 +612,22 @@ export default function CorporatePlanList({handleSubmitSuccess}) {
|
|||||||
<Typography variant='body2' sx={{width: '25%'}}>{row.language ? row.language : '-'}</Typography>
|
<Typography variant='body2' sx={{width: '25%'}}>{row.language ? row.language : '-'}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction='row' spacing={1}>
|
<Stack direction='row' spacing={1}>
|
||||||
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Email:</Typography>
|
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Employee Status:</Typography>
|
||||||
<Typography variant='body2' sx={{width: '25%'}}>{row.email ? row.email : '-'}</Typography>
|
<Typography variant='body2' sx={{width: '25%'}}>{row.employee_status ? row.employee_status: '-'}</Typography>
|
||||||
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Race:</Typography>
|
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Race:</Typography>
|
||||||
<Typography variant='body2' sx={{width: '25%'}}>{row.race ? row.race : '-'}</Typography>
|
<Typography variant='body2' sx={{width: '25%'}}>{row.race ? row.race : '-'}</Typography>
|
||||||
|
|
||||||
|
</Stack>
|
||||||
|
<Stack direction='row' spacing={1}>
|
||||||
|
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Email:</Typography>
|
||||||
|
<Typography variant='body2' sx={{width: '25%'}}>{row.email ? row.email : '-'}</Typography>
|
||||||
|
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Relationship:</Typography>
|
||||||
|
<Typography variant='body2' sx={{width: '25%'}}>{row.relation_with_principal ? row.relation_with_principal : '-'}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction='row' spacing={1}>
|
<Stack direction='row' spacing={1}>
|
||||||
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Phone Number:</Typography>
|
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Phone Number:</Typography>
|
||||||
<Typography variant='body2' sx={{width: '25%'}}>{row.person?.phone ? row.person?.phone : '-'}</Typography>
|
<Typography variant='body2' sx={{width: '25%'}}>{row.person?.phone ? row.person?.phone : '-'}</Typography>
|
||||||
<Typography variant='body2' sx={{color: style1.color, width: '25%'}}>Relationship:</Typography>
|
|
||||||
<Typography variant='body2' sx={{width: '25%'}}>{row.relation_with_principal ? row.relation_with_principal : '-'}</Typography>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Typography variant='subtitle1' marginTop={2}>Claim History</Typography>
|
<Typography variant='subtitle1' marginTop={2}>Claim History</Typography>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { fNumber } from "@/utils/formatNumber";
|
|||||||
import palette from "@/theme/palette";
|
import palette from "@/theme/palette";
|
||||||
import DialogBenefit from "../FinalLog/Components/DialogBenefit";
|
import DialogBenefit from "../FinalLog/Components/DialogBenefit";
|
||||||
import DialogEditBenefit from "../FinalLog/Components/DialogEditBenefit";
|
import DialogEditBenefit from "../FinalLog/Components/DialogEditBenefit";
|
||||||
import DialogDelete from "../FinalLog/Components/DialogDelete";
|
import DialogDeleteBenefit from "../FinalLog/Components/DialogDeleteBenefit";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ export default function CardBenefit({requestLog} : CardDetail ) {
|
|||||||
|
|
||||||
</DialogEditBenefit>
|
</DialogEditBenefit>
|
||||||
{/* Dialog Delete */}
|
{/* Dialog Delete */}
|
||||||
<DialogDelete
|
<DialogDeleteBenefit
|
||||||
id={idBenefitData}
|
id={idBenefitData}
|
||||||
openDialog={openDialogDeleteBenefit}
|
openDialog={openDialogDeleteBenefit}
|
||||||
setOpenDialog={setDialogDeleteBenefit}
|
setOpenDialog={setDialogDeleteBenefit}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default function CardFile({requestLog} : CardDetail ) {
|
|||||||
<Card sx={{padding:2}} >
|
<Card sx={{padding:2}} >
|
||||||
<Stack direction="row" alignItems="center" sx={{marginBottom: 4}}>
|
<Stack direction="row" alignItems="center" sx={{marginBottom: 4}}>
|
||||||
<Stack direction="column" spacing={2} sx={{marginBottom: 2}}>
|
<Stack direction="column" spacing={2} sx={{marginBottom: 2}}>
|
||||||
<Typography variant='subtitle1' sx={{color: '#19BBBB'}} gutterBottom>Files History</Typography>
|
<Typography variant='subtitle1' sx={{color: '#19BBBB'}} gutterBottom>Files </Typography>
|
||||||
{requestLog?.files?.map((documentType, index) => (
|
{requestLog?.files?.map((documentType, index) => (
|
||||||
<Stack direction="column" spacing={2} key={index}>
|
<Stack direction="column" spacing={2} key={index}>
|
||||||
<Stack direction="row" spacing={1} sx={{color: '#19BBBB'}}>
|
<Stack direction="row" spacing={1} sx={{color: '#19BBBB'}}>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ type DialogDeleteType = {
|
|||||||
id: number|undefined;
|
id: number|undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function DialogDelete({id, setOpenDialog, openDialog,onSubmit} : DialogDeleteType ) {
|
export default function DialogDeleteBenefit({id, setOpenDialog, openDialog,onSubmit} : DialogDeleteType ) {
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
axios
|
axios
|
||||||
.delete(`customer-service/request/benefit_data/${id}`)
|
.delete(`customer-service/request/benefit_data/${id}`)
|
||||||
@@ -67,54 +67,3 @@ export default function DialogDelete({id, setOpenDialog, openDialog,onSubmit} :
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DialogDeleteMedicine({id, setOpenDialog, openDialog,onSubmit} : DialogDeleteType ) {
|
|
||||||
const handleSubmit = () => {
|
|
||||||
axios
|
|
||||||
.delete(`customer-service/request/medicine-data/${id}`)
|
|
||||||
.then((response) => {
|
|
||||||
enqueueSnackbar('Benefit Data has Deleted', { variant: 'success' });
|
|
||||||
setOpenDialog(false);
|
|
||||||
window.location.reload()
|
|
||||||
})
|
|
||||||
.catch(({ response }) => {
|
|
||||||
enqueueSnackbar(response.data.message ?? 'Something went wrong!', { variant: 'error' });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const style1 = {
|
|
||||||
color: '#919EAB',
|
|
||||||
width: '30%'
|
|
||||||
}
|
|
||||||
const style2 = {
|
|
||||||
width: '70%'
|
|
||||||
}
|
|
||||||
const marginBottom1 = {
|
|
||||||
marginBottom: 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCloseDialog = () => {
|
|
||||||
setOpenDialog(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
const getContent = () => (
|
|
||||||
<Stack spacing={1} marginTop={2}>
|
|
||||||
<Typography variant="subtitle2">Are you sure to delete this detail medicine ?</Typography>
|
|
||||||
<DialogActions>
|
|
||||||
<Button variant="outlined" sx={{color: '#212B36', borderColor: '#919EAB52'}} onClick={handleCloseDialog}>Cancel</Button>
|
|
||||||
<Button color="error" variant="contained" onClick={handleSubmit}>Delete</Button>
|
|
||||||
</DialogActions>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MuiDialog
|
|
||||||
title={{name: "Delete Medicine"}}
|
|
||||||
openDialog={openDialog}
|
|
||||||
setOpenDialog={setOpenDialog}
|
|
||||||
content={getContent()}
|
|
||||||
maxWidth="xs"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -22,7 +22,7 @@ export default function DialogDeleteMedicine({id, setOpenDialog, openDialog,onSu
|
|||||||
axios
|
axios
|
||||||
.delete(`customer-service/request/medicine-data/${id}`)
|
.delete(`customer-service/request/medicine-data/${id}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
enqueueSnackbar('Benefit Data has Deleted', { variant: 'success' });
|
enqueueSnackbar('Medicine Data has Deleted', { variant: 'success' });
|
||||||
setOpenDialog(false);
|
setOpenDialog(false);
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ import CardBenefit from '../Components/CardBenefit';
|
|||||||
import DialogHospitalCare from './Components/DialogHospitalCare';
|
import DialogHospitalCare from './Components/DialogHospitalCare';
|
||||||
import DialogBenefit from './Components/DialogBenefit';
|
import DialogBenefit from './Components/DialogBenefit';
|
||||||
import DialogMedicine from './Components/DialogMedicine';
|
import DialogMedicine from './Components/DialogMedicine';
|
||||||
import DialogDelete from './Components/DialogDelete';
|
import DialogDeleteBenfit from './Components/DialogDeleteBenefit';
|
||||||
import DialogEditBenefit from './Components/DialogEditBenefit';
|
import DialogEditBenefit from './Components/DialogEditBenefit';
|
||||||
import { DialogDeleteMedicine } from './Components/DialogDelete';
|
import DialogDeleteMedicine from './Components/DialogDeleteMedicine'
|
||||||
|
|
||||||
import MoreMenu from '@/components/MoreMenu';
|
import MoreMenu from '@/components/MoreMenu';
|
||||||
import { MenuItem } from '@mui/material';
|
import { MenuItem } from '@mui/material';
|
||||||
@@ -102,6 +102,9 @@ export default function Detail() {
|
|||||||
// Handel Delete Detail Benefit
|
// Handel Delete Detail Benefit
|
||||||
const [idBenefitData, setIdBenefitData] = useState<number>();
|
const [idBenefitData, setIdBenefitData] = useState<number>();
|
||||||
const [openDialogDeleteBenefit, setDialogDeleteBenefit] = useState(false)
|
const [openDialogDeleteBenefit, setDialogDeleteBenefit] = useState(false)
|
||||||
|
|
||||||
|
const [idMedicineData, setIdMedicineData] = useState<number>();
|
||||||
|
const [openDialogDeleteMedicine, setDialogDeleteMedicine] = useState(false)
|
||||||
|
|
||||||
const [approve, setApprove] = useState('')
|
const [approve, setApprove] = useState('')
|
||||||
|
|
||||||
@@ -327,7 +330,7 @@ export default function Detail() {
|
|||||||
|
|
||||||
</DialogEditBenefit>
|
</DialogEditBenefit>
|
||||||
{/* Dialog Delete */}
|
{/* Dialog Delete */}
|
||||||
<DialogDelete
|
<DialogDeleteBenfit
|
||||||
id={idBenefitData}
|
id={idBenefitData}
|
||||||
openDialog={openDialogDeleteBenefit}
|
openDialog={openDialogDeleteBenefit}
|
||||||
setOpenDialog={setDialogDeleteBenefit}
|
setOpenDialog={setDialogDeleteBenefit}
|
||||||
@@ -357,8 +360,8 @@ export default function Detail() {
|
|||||||
<Typography variant='subtitle1'>{item.medicine}</Typography>
|
<Typography variant='subtitle1'>{item.medicine}</Typography>
|
||||||
<Typography variant="subtitle1">Rp. {fNumber(item.price)}
|
<Typography variant="subtitle1">Rp. {fNumber(item.price)}
|
||||||
<IconButton size='large' color='error' onClick={() => {
|
<IconButton size='large' color='error' onClick={() => {
|
||||||
setIdBenefitData(item.id)
|
setIdMedicineData(item.id)
|
||||||
setDialogDeleteBenefit(true)
|
setDialogDeleteMedicine(true)
|
||||||
}}>
|
}}>
|
||||||
<Delete color='error'/>
|
<Delete color='error'/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@@ -371,10 +374,10 @@ export default function Detail() {
|
|||||||
openDialog={openDialogMedicine}
|
openDialog={openDialogMedicine}
|
||||||
setOpenDialog={setDialogMedicine}
|
setOpenDialog={setDialogMedicine}
|
||||||
/>
|
/>
|
||||||
<DialogDeleteMedicine
|
<DialogDeleteMedicine
|
||||||
id={idBenefitData}
|
id={idMedicineData}
|
||||||
openDialog={openDialogDeleteBenefit}
|
openDialog={openDialogDeleteMedicine}
|
||||||
setOpenDialog={setDialogDeleteBenefit}
|
setOpenDialog={setDialogDeleteMedicine}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -34,19 +34,19 @@ export default function LoginForm() {
|
|||||||
const [showPassword, setShowPassword] = useState(false);
|
const [showPassword, setShowPassword] = useState(false);
|
||||||
|
|
||||||
const LoginSchema = Yup.object().shape({
|
const LoginSchema = Yup.object().shape({
|
||||||
email: Yup.string().email('Email must be a valid email address').required('Email is required'),
|
email: Yup.string().required('Email is required'),
|
||||||
password: Yup.string().required('Password is required'),
|
password: Yup.string().required('Password is required'),
|
||||||
});
|
});
|
||||||
|
|
||||||
const defaultValues = {
|
const defaultValues = {
|
||||||
email: 'admin@linksehat.dev',
|
email: '',
|
||||||
password: 'password',
|
password: '',
|
||||||
remember: true,
|
remember: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const methods = useForm<FormValuesProps>({
|
const methods = useForm<FormValuesProps>({
|
||||||
resolver: yupResolver(LoginSchema),
|
resolver: yupResolver(LoginSchema),
|
||||||
defaultValues,
|
// defaultValues,
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -75,10 +75,10 @@ export default function LoginForm() {
|
|||||||
return (
|
return (
|
||||||
<FormProvider methods={methods} onSubmit={handleSubmit(onSubmit)}>
|
<FormProvider methods={methods} onSubmit={handleSubmit(onSubmit)}>
|
||||||
<Stack spacing={3}>
|
<Stack spacing={3}>
|
||||||
<Alert severity="info">Email : admin@linksehat.dev & Password : password</Alert>
|
<Alert severity="info">Masukan Email atau Username dan Password</Alert>
|
||||||
{!!errors.afterSubmit && <Alert severity="error">{errors.afterSubmit.message}</Alert>}
|
{!!errors.afterSubmit && <Alert severity="error">{errors.afterSubmit.message}</Alert>}
|
||||||
|
|
||||||
<RHFTextField name="email" label="Email address" />
|
<RHFTextField name="email" label="Email Or Username" />
|
||||||
|
|
||||||
<RHFTextField
|
<RHFTextField
|
||||||
name="password"
|
name="password"
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ const MENU_OPTIONS = [
|
|||||||
label: 'Home',
|
label: 'Home',
|
||||||
linkTo: '/',
|
linkTo: '/',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: 'Profile',
|
// label: 'Profile',
|
||||||
linkTo: '/profile',
|
// linkTo: '/profile',
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: 'Settings',
|
// label: 'Settings',
|
||||||
// linkTo: '/',
|
// linkTo: '/',
|
||||||
@@ -65,8 +65,8 @@ export default function AccountPopover() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
src=""
|
||||||
alt="Rayan Moran"
|
alt="Hospital Portal"
|
||||||
/>
|
/>
|
||||||
</IconButtonAnimate>
|
</IconButtonAnimate>
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export default function DashboardHeader({
|
|||||||
</IconButtonAnimate>
|
</IconButtonAnimate>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Searchbar />
|
{/* <Searchbar /> */}
|
||||||
<Box sx={{ flexGrow: 1 }} />
|
<Box sx={{ flexGrow: 1 }} />
|
||||||
|
|
||||||
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>
|
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ import { DocIllustration } from '@/assets';
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
export default function NavbarDocs() {
|
export default function NavbarDocs() {
|
||||||
|
const handleClick = () => {
|
||||||
|
window.location.href = 'https://wa.me/6285890008500';
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack
|
<Stack
|
||||||
@@ -20,12 +23,12 @@ export default function NavbarDocs() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
|
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
|
||||||
Need help?
|
Need help?
|
||||||
<br /> Please check our docs
|
<br /> Please contact Us at
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button variant="contained">Documentation</Button>
|
<Button variant="contained" onClick={handleClick}>WhatsApp</Button>
|
||||||
<Typography variant='body2'>Hak Cipta © 2023 - 2024 Link Sehat</Typography>
|
<Typography variant='body2'>Hak Cipta © 2023 - 2024 LinkSehat</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ export default function LoginForm() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const defaultValues = {
|
const defaultValues = {
|
||||||
email: 'hospitaladmin@gmail.com',
|
email: '',
|
||||||
password: 'password',
|
password: '',
|
||||||
remember: true,
|
remember: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,12 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
.post('/request-log', formData)
|
.post('/request-log', formData)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response && response.data && response.data.meta) {
|
if (response && response.data && response.data.meta) {
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.reload();
|
||||||
|
}, 1500);
|
||||||
enqueueSnackbar(response.data.meta.message, { variant: 'success' });
|
enqueueSnackbar(response.data.meta.message, { variant: 'success' });
|
||||||
handleSubmitSuccess();
|
handleSubmitSuccess();
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(({ response }) => {
|
.catch(({ response }) => {
|
||||||
@@ -176,7 +180,7 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
<Card sx={{ p: 1, background: '#f4f6f8'}}>
|
<Card sx={{ p: 1, background: '#f4f6f8'}}>
|
||||||
<Stack direction="row">
|
<Stack direction="row">
|
||||||
<Avatar
|
<Avatar
|
||||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
src=""
|
||||||
alt={member?.members.name ?? ''}
|
alt={member?.members.name ?? ''}
|
||||||
sx={{ marginTop: 1, width: 48, height: 48 }}
|
sx={{ marginTop: 1, width: 48, height: 48 }}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 8.1 KiB |
@@ -1,20 +1,18 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
|
||||||
{{-- <link rel="stylesheet" href="{{ asset('css/app.css') }}"> --}}
|
{{-- <link rel="stylesheet" href="{{ asset('css/app.css') }}"> --}}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* @font-face {
|
/* @font-face {
|
||||||
font-family: Public Sans;
|
font-family: Public Sans;
|
||||||
src: url('{{ asset('fonts/PublicSans-Medium.ttf') }}');
|
src: url('{{asset('fonts/PublicSans-Medium.ttf')}}');
|
||||||
src: url('{{ asset('fonts/PublicSans-Medium.ttf') }}') format('truetype');
|
src: url('{{asset('fonts/PublicSans-Medium.ttf')}}') format('truetype');
|
||||||
} */
|
} */
|
||||||
|
|
||||||
html,
|
html, body {
|
||||||
body {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -24,122 +22,108 @@
|
|||||||
font-family: 'Public Sans';
|
font-family: 'Public Sans';
|
||||||
color: #404040;
|
color: #404040;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin: 0;
|
margin: 0; /* Reset default margin */
|
||||||
/* Reset default margin */
|
padding: 0; /* Reset default padding */
|
||||||
padding: 0;
|
background-image: url("{{public_path('images/ecard-background.png')}}");
|
||||||
/* Reset default padding */
|
|
||||||
background-image: url("{{ public_path('images/ecard-background.png') }}");
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover; /* Adjust as needed */
|
||||||
/* Adjust as needed */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-sm {
|
.text-sm {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #FFFFFF
|
color: #FFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-md {
|
.text-md {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #159C9C
|
color: #159C9C
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-lg {
|
.text-lg {
|
||||||
font-size: 20px;
|
font-size: 22px;
|
||||||
color: #117D7D;
|
color: #117D7D;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-gray {
|
.text-gray {
|
||||||
color: #919EAB;
|
color: #919EAB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
margin: 10% 0 0 0;
|
margin: 10% 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-container {
|
.image-container {
|
||||||
margin-left: 72%;
|
margin-left: 75%; /* Adjust the margin as needed */
|
||||||
/* Adjust the margin as needed */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
background-color: #117D7D;
|
background-color: #117D7D;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
padding: 8px;
|
padding: 8px; /* Sesuaikan dengan kebutuhan Anda */
|
||||||
/* Sesuaikan dengan kebutuhan Anda */
|
font-size: 18px;
|
||||||
font-size: 15px;
|
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
display: inline-flex;
|
display: inline-flex; /* Untuk memastikan ikon dan teks berada dalam satu baris */
|
||||||
/* Untuk memastikan ikon dan teks berada dalam satu baris */
|
align-items: center; /* Untuk memastikan ikon dan teks berada dalam satu baris */
|
||||||
align-items: center;
|
|
||||||
/* Untuk memastikan ikon dan teks berada dalam satu baris */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label svg {
|
.label svg {
|
||||||
margin-right: 4px;
|
margin-right: 4px; /* Jarak antara ikon dan teks */
|
||||||
/* Jarak antara ikon dan teks */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-sm {
|
.text-sm {
|
||||||
font-size: 12px;
|
font-size: 18px; /* Sesuaikan dengan kebutuhan Anda */
|
||||||
/* Sesuaikan dengan kebutuhan Anda */
|
|
||||||
}
|
|
||||||
.text-container {
|
|
||||||
margin-left: 2%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<br><br>
|
<br><br><br><br>
|
||||||
<div>
|
@if($member->currentCorporate->files && count($member->currentCorporate->files) > 0)
|
||||||
<img src="{{ public_path('images/logo-petrolab.jpg') }}" height="80px">
|
<div>
|
||||||
</div>
|
{{ asset($member->currentCorporate->files[0]->path)}}
|
||||||
<div class="content">
|
|
||||||
<div class="text-container">
|
|
||||||
<span class="text-md"> Member Name</span>
|
|
||||||
<p class="text-lg"><b>{{ $member->fullName }}</b></p>
|
|
||||||
|
|
||||||
<span class="text-md"> Member ID </span>
|
|
||||||
<p class="text-lg"><b>{{ $member->member_id }}</b></p>
|
|
||||||
|
|
||||||
<span class="text-md"> Policy Holder </span>
|
|
||||||
<p class="text-lg"><b>{{ $member->currentCorporate->name }}</b></p>
|
|
||||||
|
|
||||||
<span class="text-md"> Policy Number </span>
|
|
||||||
<p class="text-lg"><b>{{ $member->currentPolicy->code }}</b></p>
|
|
||||||
|
|
||||||
<span class="text-md"> Date of Birth </span>
|
|
||||||
<p class="text-lg"><b>{{ $member->birthDateeCard }}</b></p>
|
|
||||||
|
|
||||||
<span class="text-md"> Gender </span>
|
|
||||||
<p class="text-lg"><b>{{ $member->gender }}</b></p>
|
|
||||||
|
|
||||||
<span class="text-md"> Start Date </span>
|
|
||||||
<p class="text-lg"><b>{{ $member->startDate }}</b></p>
|
|
||||||
|
|
||||||
<div class="image-container">
|
|
||||||
<img src="{{ public_path('images/logo-default.png') }}" height="30px">
|
<img src="{{ public_path('images/logo-default.png') }}" height="30px">
|
||||||
</div>
|
</div>
|
||||||
<span class="label">
|
@endif
|
||||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path
|
|
||||||
d="M6.00082 0.166992C9.22257 0.166992 11.8342 2.77858 11.8342 6.00033C11.8342 9.22208 9.22257 11.8337 6.00082 11.8337C4.96994 11.8353 3.9572 11.5625 3.06666 11.0432L0.169822 11.8337L0.958489 8.93566C0.438793 8.04484 0.165766 7.03166 0.167489 6.00033C0.167489 2.77858 2.77907 0.166992 6.00082 0.166992ZM4.01282 3.25866L3.89615 3.26333C3.82063 3.26793 3.74681 3.28777 3.67916 3.32166C3.61588 3.35749 3.55811 3.40229 3.50766 3.45466C3.43766 3.52058 3.39799 3.57774 3.35541 3.63316C3.13964 3.91369 3.02347 4.25809 3.02524 4.61199C3.02641 4.89783 3.10107 5.17608 3.21774 5.43624C3.45632 5.96241 3.84891 6.51949 4.36691 7.03574C4.49174 7.15999 4.61424 7.28483 4.74607 7.40091C5.38972 7.9676 6.15672 8.37627 6.98607 8.59441L7.31741 8.64516C7.42532 8.65099 7.53324 8.64283 7.64174 8.63758C7.81163 8.62881 7.97751 8.5828 8.12766 8.50283C8.20405 8.46348 8.2786 8.42065 8.35107 8.37449C8.35107 8.37449 8.37615 8.35816 8.42399 8.32199C8.50274 8.26366 8.55116 8.22224 8.61649 8.15399C8.66491 8.10383 8.7069 8.04491 8.73899 7.97783C8.78449 7.88274 8.82999 7.70132 8.84865 7.55024C8.86265 7.43474 8.85857 7.37174 8.85682 7.33266C8.85449 7.27024 8.80257 7.20549 8.74599 7.17808L8.40649 7.02583C8.40649 7.02583 7.89899 6.80474 7.58865 6.66358C7.55618 6.6494 7.52138 6.64129 7.48599 6.63966C7.44608 6.63556 7.40575 6.64005 7.36772 6.65283C7.32969 6.66561 7.29483 6.68638 7.26549 6.71374C7.26257 6.71257 7.22349 6.74583 6.80174 7.25683C6.77753 7.28935 6.74419 7.31394 6.70596 7.32744C6.66773 7.34095 6.62634 7.34276 6.58707 7.33266C6.54907 7.32247 6.51184 7.3096 6.47565 7.29416C6.40332 7.26383 6.37824 7.25216 6.32865 7.23116C5.99386 7.08506 5.68389 6.88766 5.4099 6.64608C5.3364 6.58191 5.26816 6.51191 5.19815 6.44424C4.96866 6.22446 4.76866 5.97583 4.60315 5.70458L4.56874 5.64916C4.54402 5.61192 4.52403 5.57175 4.50924 5.52958C4.48707 5.44383 4.54482 5.37499 4.54482 5.37499C4.54482 5.37499 4.68657 5.21983 4.75249 5.13583C4.81666 5.05416 4.8709 4.97483 4.9059 4.91824C4.97474 4.80741 4.99632 4.69366 4.96016 4.60558C4.79682 4.20658 4.62766 3.80933 4.45382 3.41499C4.4194 3.33683 4.31732 3.28083 4.22457 3.26974C4.19307 3.26624 4.16157 3.26274 4.13007 3.26041C4.05173 3.25652 3.97323 3.2573 3.89499 3.26274L4.01224 3.25808L4.01282 3.25866Z"
|
|
||||||
fill="white" />
|
|
||||||
</svg>
|
|
||||||
<span class="text-sm">
|
|
||||||
08114123962
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<span class="text-md" style="margin-left:30%"><b> Valid until: {{ $member->endDate }}</b></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
<div class="content">
|
||||||
|
<div class="text-container" style="margin-left:2%">
|
||||||
|
<span class="text-md"> Member Name</span>
|
||||||
|
<p class="text-lg"><b>{{ $member->fullName }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Member ID </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->member_id }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Policy Holder </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->currentCorporate->name }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Policy Number </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->currentPolicy->code }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Date of Birth </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->birthDateeCard }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Gender </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->gender }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Start Date </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->startDate }}</b></p>
|
||||||
|
|
||||||
|
<div class="image-container" style="margin-left:70%">
|
||||||
|
<img src="{{ public_path('images/logo-default.png')}}" height="30px">
|
||||||
|
</div>
|
||||||
|
<span class="label">
|
||||||
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M6.00082 0.166992C9.22257 0.166992 11.8342 2.77858 11.8342 6.00033C11.8342 9.22208 9.22257 11.8337 6.00082 11.8337C4.96994 11.8353 3.9572 11.5625 3.06666 11.0432L0.169822 11.8337L0.958489 8.93566C0.438793 8.04484 0.165766 7.03166 0.167489 6.00033C0.167489 2.77858 2.77907 0.166992 6.00082 0.166992ZM4.01282 3.25866L3.89615 3.26333C3.82063 3.26793 3.74681 3.28777 3.67916 3.32166C3.61588 3.35749 3.55811 3.40229 3.50766 3.45466C3.43766 3.52058 3.39799 3.57774 3.35541 3.63316C3.13964 3.91369 3.02347 4.25809 3.02524 4.61199C3.02641 4.89783 3.10107 5.17608 3.21774 5.43624C3.45632 5.96241 3.84891 6.51949 4.36691 7.03574C4.49174 7.15999 4.61424 7.28483 4.74607 7.40091C5.38972 7.9676 6.15672 8.37627 6.98607 8.59441L7.31741 8.64516C7.42532 8.65099 7.53324 8.64283 7.64174 8.63758C7.81163 8.62881 7.97751 8.5828 8.12766 8.50283C8.20405 8.46348 8.2786 8.42065 8.35107 8.37449C8.35107 8.37449 8.37615 8.35816 8.42399 8.32199C8.50274 8.26366 8.55116 8.22224 8.61649 8.15399C8.66491 8.10383 8.7069 8.04491 8.73899 7.97783C8.78449 7.88274 8.82999 7.70132 8.84865 7.55024C8.86265 7.43474 8.85857 7.37174 8.85682 7.33266C8.85449 7.27024 8.80257 7.20549 8.74599 7.17808L8.40649 7.02583C8.40649 7.02583 7.89899 6.80474 7.58865 6.66358C7.55618 6.6494 7.52138 6.64129 7.48599 6.63966C7.44608 6.63556 7.40575 6.64005 7.36772 6.65283C7.32969 6.66561 7.29483 6.68638 7.26549 6.71374C7.26257 6.71257 7.22349 6.74583 6.80174 7.25683C6.77753 7.28935 6.74419 7.31394 6.70596 7.32744C6.66773 7.34095 6.62634 7.34276 6.58707 7.33266C6.54907 7.32247 6.51184 7.3096 6.47565 7.29416C6.40332 7.26383 6.37824 7.25216 6.32865 7.23116C5.99386 7.08506 5.68389 6.88766 5.4099 6.64608C5.3364 6.58191 5.26816 6.51191 5.19815 6.44424C4.96866 6.22446 4.76866 5.97583 4.60315 5.70458L4.56874 5.64916C4.54402 5.61192 4.52403 5.57175 4.50924 5.52958C4.48707 5.44383 4.54482 5.37499 4.54482 5.37499C4.54482 5.37499 4.68657 5.21983 4.75249 5.13583C4.81666 5.05416 4.8709 4.97483 4.9059 4.91824C4.97474 4.80741 4.99632 4.69366 4.96016 4.60558C4.79682 4.20658 4.62766 3.80933 4.45382 3.41499C4.4194 3.33683 4.31732 3.28083 4.22457 3.26974C4.19307 3.26624 4.16157 3.26274 4.13007 3.26041C4.05173 3.25652 3.97323 3.2573 3.89499 3.26274L4.01224 3.25808L4.01282 3.25866Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
<span class="text-sm">
|
||||||
|
08114123962
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span class="text-md" style="margin-left:34%"><b> Valid until: {{ $member->endDate }}</b></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -24,11 +24,9 @@
|
|||||||
font-family: 'Public Sans';
|
font-family: 'Public Sans';
|
||||||
color: #404040;
|
color: #404040;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin: 0;
|
margin: 0; /* Reset default margin */
|
||||||
/* Reset default margin */
|
padding: 0; /* Reset default padding */
|
||||||
padding: 0;
|
background-image: url("{{public_path('images/background-vale.png')}}");
|
||||||
/* Reset default padding */
|
|
||||||
background-image: url("{{ public_path('images/background-vale.png') }}");
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
/* Adjust as needed */
|
/* Adjust as needed */
|
||||||
@@ -90,11 +88,11 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<br><br><br><br>
|
<br><br><br><br>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="text-container">
|
<div class="text-container">
|
||||||
<span class="text-md"> Member Name </span>
|
<span class="text-md"> Member Name</span>
|
||||||
<p class="text-lg"><b>{{ $member->fullName }}</b></p>
|
<p class="text-lg"><b>{{ $member->fullName }}</b></p>
|
||||||
|
|
||||||
<span class="text-md"> Member ID </span>
|
<span class="text-md"> Member ID </span>
|
||||||
<p class="text-lg"><b>{{ $member->member_id }}</b></p>
|
<p class="text-lg"><b>{{ $member->member_id }}</b></p>
|
||||||
|
|||||||
@@ -178,12 +178,12 @@
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.logo_vale-<?php echo now()->timestamp; ?> {
|
.logo_company-<?php echo now()->timestamp; ?> {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -35.12px;
|
top: -35.12px;
|
||||||
left: -35.91px;
|
left: -35.91px;
|
||||||
width: 10%;
|
width: 10%;
|
||||||
max-width: 400px; /* batasan lebar maksimum gambar */
|
max-width: 40px; /* batasan lebar maksimum gambar */
|
||||||
margin-top: 1px; /* jarak antara segitiga dan gambar */
|
margin-top: 1px; /* jarak antara segitiga dan gambar */
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,12 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="triangle2"></div>
|
<div class="triangle2"></div>
|
||||||
<div class="triangle1"></div>
|
<div class="triangle1"></div>
|
||||||
<img class="logo_vale-<?php echo now()->timestamp; ?>" src="data:image/png;base64,{{ base64_encode(file_get_contents(public_path('images/vale_logo.png'))) }}">
|
@php
|
||||||
|
if(!empty($logoPerusahaan->path)) {
|
||||||
|
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(storage_path('app/public/' . $logoPerusahaan->path)));
|
||||||
|
echo '<img class="logo_company-' . now()->timestamp . '" src="' . $imgSrc . '">';
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
<div class="content-<?php echo now()->timestamp; ?>">
|
<div class="content-<?php echo now()->timestamp; ?>">
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> top-right-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> top-right-<?php echo now()->timestamp; ?>">
|
||||||
The Future Of Healthcare At Your Fingertips
|
The Future Of Healthcare At Your Fingertips
|
||||||
@@ -219,7 +224,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Kepada</td>
|
<td>Kepada</td>
|
||||||
<td>:</td>
|
<td>:</td>
|
||||||
<td>{{ $rumahSakit->nama_rumahsakit }}</td>
|
<td>{{ !empty($rumahSakit->nama_rumahsakit) ? $rumahSakit->nama_rumahsakit : '' }}</td>
|
||||||
<td>Plan Polis</td>
|
<td>Plan Polis</td>
|
||||||
<td>:</td>
|
<td>:</td>
|
||||||
<td>{{ $dataMember->code_plan }}</td>
|
<td>{{ $dataMember->code_plan }}</td>
|
||||||
@@ -302,7 +307,7 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td>Alamat Provider</td>
|
<td>Alamat Provider</td>
|
||||||
<td>:</td>
|
<td>:</td>
|
||||||
<td>{{ $rumahSakit->alamat_rumahsakit }}</td>
|
<td>{{ !empty($rumahSakit->alamat_rumahsakit) ? $rumahSakit->alamat_rumahsakit : '' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>No. Rekam Medis</td>
|
<td>No. Rekam Medis</td>
|
||||||
@@ -374,9 +379,33 @@
|
|||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
|
||||||
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
@php
|
||||||
<b>PT. Vale Indonesia Tbk. Makassar Representative Office</b><br>
|
if (!empty($logoPerusahaan->code) === 'VALEIND') {
|
||||||
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
|
||||||
|
|
||||||
|
@php
|
||||||
|
} else if(!empty($logoPerusahaan->code) === 'PETROLAB') {
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
Jalan Pisangan Lama 3 Nomor 28 Jatinegara, RT.9/RW.3, <br>Pisangan Tim., Kec. Pulo Gadung, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta 13230
|
||||||
|
|
||||||
|
@php
|
||||||
|
} else {
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
|
||||||
|
|
||||||
|
@php
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
|
||||||
<b>PT Link Medis Sehat</b><br>
|
<b>PT Link Medis Sehat</b><br>
|
||||||
|
|||||||
@@ -244,10 +244,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-1-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-1-<?php echo now()->timestamp; ?> ">
|
||||||
Hormat Kami,<br>
|
Hormat Kami,<br>
|
||||||
PT. Vale Indonesia Tbk
|
{{ $dataMember->nama_perusahaan }}
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
|
||||||
<u> Dr. Hery Hermas, M.Kes</u><br>
|
(.......................................)<br>
|
||||||
Offsite Medical Treatment
|
Offsite Medical Treatment
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-1-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-1-<?php echo now()->timestamp; ?> ">
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
Petugas Alarm Center
|
Petugas Alarm Center
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
|
||||||
<u>(Nama Petugas)</u><br>
|
(.......................................)<br>
|
||||||
Customer Service Team
|
Customer Service Team
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left1-ttd-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left1-ttd-<?php echo now()->timestamp; ?> ">
|
||||||
@@ -265,9 +265,33 @@
|
|||||||
{{ $dataMember->name }}
|
{{ $dataMember->name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
|
||||||
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
@php
|
||||||
<b>PT. Vale Indonesia Tbk. Makassar Representative Office</b><br>
|
if (!empty($logoPerusahaan->code) === 'VALEIND') {
|
||||||
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
|
||||||
|
|
||||||
|
@php
|
||||||
|
} else if(!empty($logoPerusahaan->code) === 'PETROLAB') {
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
Jalan Pisangan Lama 3 Nomor 28 Jatinegara, RT.9/RW.3, <br>Pisangan Tim., Kec. Pulo Gadung, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta 13230
|
||||||
|
|
||||||
|
@php
|
||||||
|
} else {
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
|
||||||
|
|
||||||
|
@php
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
|
||||||
<b>PT Link Medis Sehat</b><br>
|
<b>PT Link Medis Sehat</b><br>
|
||||||
|
|||||||
@@ -183,12 +183,12 @@
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.logo_vale-<?php echo now()->timestamp; ?> {
|
.logo_company-<?php echo now()->timestamp; ?> {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -35.12px;
|
top: -35.12px;
|
||||||
left: -35.91px;
|
left: -35.91px;
|
||||||
width: 10%;
|
width: 10%;
|
||||||
max-width: 400px; /* batasan lebar maksimum gambar */
|
max-width: 40px; /* batasan lebar maksimum gambar */
|
||||||
margin-top: 1px; /* jarak antara segitiga dan gambar */
|
margin-top: 1px; /* jarak antara segitiga dan gambar */
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
@@ -198,7 +198,12 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="triangle2"></div>
|
<div class="triangle2"></div>
|
||||||
<div class="triangle1"></div>
|
<div class="triangle1"></div>
|
||||||
<img class="logo_vale-<?php echo now()->timestamp; ?>" src="data:image/png;base64,{{ base64_encode(file_get_contents(public_path('images/vale_logo.png'))) }}">
|
@php
|
||||||
|
if(!empty($logoPerusahaan->path)) {
|
||||||
|
$imgSrc = 'data:image/png;base64,' . base64_encode(file_get_contents(storage_path('app/public/' . $logoPerusahaan->path)));
|
||||||
|
echo '<img class="logo_company-' . now()->timestamp . '" src="' . $imgSrc . '">';
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
<div class="content-<?php echo now()->timestamp; ?>">
|
<div class="content-<?php echo now()->timestamp; ?>">
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> top-right-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> top-right-<?php echo now()->timestamp; ?>">
|
||||||
The Future Of Healthcare At Your Fingertips
|
The Future Of Healthcare At Your Fingertips
|
||||||
@@ -226,7 +231,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Kepada</td>
|
<td>Kepada</td>
|
||||||
<td>:</td>
|
<td>:</td>
|
||||||
<td>{{ $rumahSakit->nama_rumahsakit }}</td>
|
<td>{{ !empty($rumahSakit->nama_rumahsakit) ? $rumahSakit->nama_rumahsakit : '' }}</td>
|
||||||
<td>Plan Polis</td>
|
<td>Plan Polis</td>
|
||||||
<td>:</td>
|
<td>:</td>
|
||||||
<td>{{ $dataMember->code_plan }}</td>
|
<td>{{ $dataMember->code_plan }}</td>
|
||||||
@@ -309,7 +314,7 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td>Alamat Provider</td>
|
<td>Alamat Provider</td>
|
||||||
<td>:</td>
|
<td>:</td>
|
||||||
<td>{{ $rumahSakit->alamat_rumahsakit }}</td>
|
<td>{{ !empty($rumahSakit->alamat_rumahsakit) ? $rumahSakit->alamat_rumahsakit : '' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>No. Rekam Medis</td>
|
<td>No. Rekam Medis</td>
|
||||||
@@ -374,10 +379,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-1-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-1-<?php echo now()->timestamp; ?> ">
|
||||||
Hormat Kami,<br>
|
Hormat Kami,<br>
|
||||||
PT. Vale Indonesia Tbk
|
{{ $dataMember->nama_perusahaan }}
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-<?php echo now()->timestamp; ?> ">
|
||||||
<u> Dr. Hery Hermas, M.Kes</u><br>
|
(.......................................)<br>
|
||||||
Offsite Medical Treatment
|
Offsite Medical Treatment
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-1-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-1-<?php echo now()->timestamp; ?> ">
|
||||||
@@ -385,16 +390,40 @@
|
|||||||
Petugas Alarm Center
|
Petugas Alarm Center
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
|
||||||
<u>(Nama Petugas)</u><br>
|
(.......................................)<br>
|
||||||
Customer Service Team
|
Customer Service Team
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right1-ttd-<?php echo now()->timestamp; ?> ">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right1-ttd-<?php echo now()->timestamp; ?> ">
|
||||||
{{ $dataMember->name }}
|
{{ $dataMember->name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
|
||||||
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
@php
|
||||||
<b>PT. Vale Indonesia Tbk. Makassar Representative Office</b><br>
|
if (!empty($logoPerusahaan->code) === 'VALEIND') {
|
||||||
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
|
||||||
|
|
||||||
|
@php
|
||||||
|
} else if(!empty($logoPerusahaan->code) === 'PETROLAB') {
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : ''}}</b><br>
|
||||||
|
Jalan Pisangan Lama 3 Nomor 28 Jatinegara, RT.9/RW.3, <br>Pisangan Tim., Kec. Pulo Gadung, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta 13230
|
||||||
|
|
||||||
|
@php
|
||||||
|
} else {
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
|
||||||
|
<b>{{ !empty($logoPerusahaan->name) ? $logoPerusahaan->name : '' }}</b><br>
|
||||||
|
|
||||||
|
|
||||||
|
@php
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
</div>
|
</div>
|
||||||
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
|
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
|
||||||
<b>PT Link Medis Sehat</b><br>
|
<b>PT Link Medis Sehat</b><br>
|
||||||
|
|||||||
Reference in New Issue
Block a user