Update Revisi Hospital Portal

This commit is contained in:
ivan-sim
2024-01-05 16:54:54 +07:00
parent 7d729f295b
commit f9075b2bd2
11 changed files with 169 additions and 72 deletions

View File

@@ -98,6 +98,7 @@ class MemberController extends Controller
// Provider
$providers = DB::table('organizations')
->where('organizations.type', '=', 'hospital')
->select(
'organizations.id',
'organizations.name'

View File

@@ -64,7 +64,7 @@ class RequestLogController extends Controller
$organization_id = DB::table('organizations')
->insertGetId([
'name' => $request->name_provider,
'code' => $request->name_provider,
'type' => 'hospital',
'created_at' => now(),
'created_by' => auth()->user()->id
]);
@@ -74,7 +74,8 @@ class RequestLogController extends Controller
->insertGetId([
'text'=> $request->address_provider,
'addressable_type' => 'App\Models\Organization',
'addressable_id' => $organization_id,
'addressable_id' => $organization_id,
'type' => 'hospital',
'created_at' => now(),
'created_by' => auth()->user()->id
]);
@@ -350,6 +351,7 @@ class RequestLogController extends Controller
$dataMember = DB::table('members')
->where('members.id', '=', $dataRequestLog->member_id)
->select(
'members.id',
'members.principal_id',
'members.name',
'members.birth_date',
@@ -363,9 +365,9 @@ class RequestLogController extends Controller
'),
DB::raw('
(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
'),
'),
DB::raw('
(Select services.name FROM services
WHERE services.code = "'.$dataRequestLog->service_code.'" LIMIT 1) AS jenis_perwatan
@@ -378,12 +380,12 @@ class RequestLogController extends Controller
'),
DB::raw('
(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
'),
DB::raw('
(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
'),
DB::raw('
@@ -399,7 +401,6 @@ class RequestLogController extends Controller
$dataNamaKaryawan = DB::table('members')
->where('members.member_id', '=', $dataMember->principal_id)
->select('members.name')
->limit(1)
->first();
$data['namaKaryawan'] = $dataNamaKaryawan->name;
}
@@ -411,24 +412,26 @@ class RequestLogController extends Controller
$data['request_logs'] = $dataRequestLog;
$dataRumahSakit = DB::table('users')
->where('users.id', '=', $dataRequestLog->created_by)
->select(
'*',
DB::raw('
(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
')
)
$dataRumahSakit = DB::table('organizations')
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
->where('organizations.id', '=', $dataRequestLog->organization_id)
->where('addresses.addressable_type', '=', 'App\Models\Organization')
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
->first();
$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();
$options = new Options();
@@ -468,6 +471,7 @@ class RequestLogController extends Controller
$dataMember = DB::table('members')
->where('members.id', '=', $dataRequestLog->member_id)
->select(
'members.id',
'members.principal_id',
'members.name',
'members.birth_date',
@@ -481,7 +485,7 @@ class RequestLogController extends Controller
'),
DB::raw('
(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
'),
DB::raw('
@@ -496,12 +500,12 @@ class RequestLogController extends Controller
'),
DB::raw('
(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
'),
DB::raw('
(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
'),
DB::raw('
@@ -542,24 +546,27 @@ class RequestLogController extends Controller
$data['dataClaimLog'] = $dataClaimLog;
$dataRumahSakit = DB::table('users')
->where('users.id', '=', $dataRequestLog->created_by)
->select(
'*',
DB::raw('
(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
')
)
$dataRumahSakit = DB::table('organizations')
->leftJoin('addresses', 'addresses.addressable_id', '=', 'organizations.id')
->where('organizations.id', '=', $dataRequestLog->organization_id)
->where('addresses.addressable_type', '=', 'App\Models\Organization')
->select('organizations.name AS nama_rumahsakit', 'addresses.text AS alamat_rumahsakit')
->first();
$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();
$options = new Options();

View File

@@ -15,10 +15,10 @@ const MENU_OPTIONS = [
label: 'Home',
linkTo: '/',
},
{
label: 'Profile',
linkTo: '/profile',
},
// {
// label: 'Profile',
// linkTo: '/profile',
// },
// {
// label: 'Settings',
// linkTo: '/',
@@ -65,8 +65,8 @@ export default function AccountPopover() {
}}
>
<Avatar
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
alt="Rayan Moran"
src=""
alt="Hospital Portal"
/>
</IconButtonAnimate>

View File

@@ -88,7 +88,7 @@ export default function DashboardHeader({
</IconButtonAnimate>
)}
<Searchbar />
{/* <Searchbar /> */}
<Box sx={{ flexGrow: 1 }} />
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>

View File

@@ -6,6 +6,9 @@ import { DocIllustration } from '@/assets';
// ----------------------------------------------------------------------
export default function NavbarDocs() {
const handleClick = () => {
window.location.href = 'https://wa.me/6285890008500';
};
return (
<>
<Stack
@@ -20,12 +23,12 @@ export default function NavbarDocs() {
</Typography>
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
Need help?
<br /> Please check our docs
<br /> Please contact Us at
</Typography>
</div>
<Button variant="contained">Documentation</Button>
<Typography variant='body2'>Hak Cipta © 2023 - 2024 Link Sehat</Typography>
<Button variant="contained" onClick={handleClick}>WhatsApp</Button>
<Typography variant='body2'>Hak Cipta © 2023 - 2024 LinkSehat</Typography>
</Stack>
</>
);

View File

@@ -41,8 +41,8 @@ export default function LoginForm() {
});
const defaultValues = {
email: 'hospitaladmin@gmail.com',
password: 'password',
email: '',
password: '',
remember: true,
};

View File

@@ -58,8 +58,12 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
.post('/request-log', formData)
.then((response) => {
if (response && response.data && response.data.meta) {
setTimeout(() => {
window.location.reload();
}, 1500);
enqueueSnackbar(response.data.meta.message, { variant: 'success' });
handleSubmitSuccess();
}
})
.catch(({ response }) => {
@@ -176,7 +180,7 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
<Card sx={{ p: 1, background: '#f4f6f8'}}>
<Stack direction="row">
<Avatar
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
src=""
alt={member?.members.name ?? ''}
sx={{ marginTop: 1, width: 48, height: 48 }}
/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -178,12 +178,12 @@
right: 10px;
text-align: left;
}
.logo_vale-<?php echo now()->timestamp; ?> {
.logo_company-<?php echo now()->timestamp; ?> {
position: absolute;
top: -35.12px;
left: -35.91px;
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-bottom: 5px;
}
@@ -192,7 +192,12 @@
<body>
<div class="triangle2"></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($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="corner-text-<?php echo now()->timestamp; ?> top-right-<?php echo now()->timestamp; ?>">
The Future Of Healthcare At Your Fingertips
@@ -374,9 +379,33 @@
</thead>
</table>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>PT. Vale Indonesia Tbk. Makassar Representative Office</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
if ($logoPerusahaan->code === 'VALEIND') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ $logoPerusahaan->name }}</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
} else if($logoPerusahaan->code === 'PETROLAB') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ $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>{{ $logoPerusahaan->name }}</b><br>
@php
}
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
<b>PT Link Medis Sehat</b><br>

View File

@@ -244,10 +244,10 @@
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-1-<?php echo now()->timestamp; ?> ">
Hormat Kami,<br>
PT. Vale Indonesia Tbk
{{ $dataMember->nama_perusahaan }}
</div>
<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
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-1-<?php echo now()->timestamp; ?> ">
@@ -255,7 +255,7 @@
Petugas Alarm Center
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
<u>(Nama Petugas)</u><br>
(.......................................)<br>
Customer Service Team
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left1-ttd-<?php echo now()->timestamp; ?> ">
@@ -265,9 +265,33 @@
{{ $dataMember->name }}
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>PT. Vale Indonesia Tbk. Makassar Representative Office</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
if ($logoPerusahaan->code === 'VALEIND') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ $logoPerusahaan->name }}</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
} else if($logoPerusahaan->code === 'PETROLAB') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ $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>{{ $logoPerusahaan->name }}</b><br>
@php
}
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
<b>PT Link Medis Sehat</b><br>

View File

@@ -178,12 +178,12 @@
right: 10px;
text-align: left;
}
.logo_vale-<?php echo now()->timestamp; ?> {
.logo_company-<?php echo now()->timestamp; ?> {
position: absolute;
top: -35.12px;
left: -35.91px;
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-bottom: 5px;
}
@@ -192,7 +192,12 @@
<body>
<div class="triangle2"></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($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="corner-text-<?php echo now()->timestamp; ?> top-right-<?php echo now()->timestamp; ?>">
The Future Of Healthcare At Your Fingertips
@@ -367,10 +372,10 @@
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-ttd-1-<?php echo now()->timestamp; ?> ">
Hormat Kami,<br>
PT. Vale Indonesia Tbk
{{ $dataMember->nama_perusahaan }}
</div>
<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
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-1-<?php echo now()->timestamp; ?> ">
@@ -378,16 +383,40 @@
Petugas Alarm Center
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-ttd-<?php echo now()->timestamp; ?> ">
<u>(Nama Petugas)</u><br>
(.......................................)<br>
Customer Service Team
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right1-ttd-<?php echo now()->timestamp; ?> ">
{{ $dataMember->name }}
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-left-<?php echo now()->timestamp; ?>">
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>PT. Vale Indonesia Tbk. Makassar Representative Office</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
if ($logoPerusahaan->code === 'VALEIND') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ $logoPerusahaan->name }}</b><br>
Lt. 1, Jalan Somba Opu 281, Ujung Pandang, Losari, <br> Kec. Makassar, Kota Makassar, Sulawesi Selatan 90113
@php
} else if($logoPerusahaan->code === 'PETROLAB') {
@endphp
<b>Alarm Center Vale MKS (LinkSehat) Office</b><br>
<b>{{ $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>{{ $logoPerusahaan->name }}</b><br>
@php
}
@endphp
</div>
<div class="corner-text-<?php echo now()->timestamp; ?> bottom-right-<?php echo now()->timestamp; ?>">
<b>PT Link Medis Sehat</b><br>