Add Spesialis & DPPJ
This commit is contained in:
@@ -44,12 +44,12 @@ class MemberController extends Controller
|
|||||||
->select(
|
->select(
|
||||||
'members.id',
|
'members.id',
|
||||||
'members.name',
|
'members.name',
|
||||||
'members.member_id',
|
'members.member_id',
|
||||||
'member_policies.policy_id',
|
'member_policies.policy_id',
|
||||||
'persons.nik',
|
'persons.nik',
|
||||||
'members.email',
|
'members.email',
|
||||||
'members.birth_date',
|
'members.birth_date',
|
||||||
'members.gender',
|
'members.gender',
|
||||||
'members.marital_status',
|
'members.marital_status',
|
||||||
'members.language',
|
'members.language',
|
||||||
'members.race',
|
'members.race',
|
||||||
@@ -119,14 +119,26 @@ class MemberController extends Controller
|
|||||||
|
|
||||||
$res_data['companies'] = $companies;
|
$res_data['companies'] = $companies;
|
||||||
|
|
||||||
|
|
||||||
|
// specialities
|
||||||
|
$specialities = DB::table('specialities')
|
||||||
|
->select(
|
||||||
|
'specialities.id',
|
||||||
|
'specialities.name'
|
||||||
|
)
|
||||||
|
->orderBy('specialities.name','asc')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$res_data['specialities'] = $specialities;
|
||||||
|
|
||||||
|
|
||||||
return ApiResponse::apiResponse("Success", $res_data, trans('Message.success'), 200);
|
return ApiResponse::apiResponse("Success", $res_data, trans('Message.success'), 200);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ApiResponse::apiResponse("Data Not Found", $data, trans('Message.not_found'), 404);
|
return ApiResponse::apiResponse("Data Not Found", $data, trans('Message.not_found'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ class RequestLogController extends Controller
|
|||||||
'address_provider' => !empty($request->address_provider) ? $request->address_provider : null,
|
'address_provider' => !empty($request->address_provider) ? $request->address_provider : null,
|
||||||
'submission_date' => $request->submission_date,
|
'submission_date' => $request->submission_date,
|
||||||
'corporate_id_partner' => !empty($request->corporate_id_partner) ? $request->corporate_id_partner : [],
|
'corporate_id_partner' => !empty($request->corporate_id_partner) ? $request->corporate_id_partner : [],
|
||||||
|
'specialities_id' => $request->specialities_id,
|
||||||
|
'dppj' => $request->dppj
|
||||||
];
|
];
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'member_id' => 'required',
|
'member_id' => 'required',
|
||||||
@@ -119,7 +121,7 @@ class RequestLogController extends Controller
|
|||||||
$requestLogControllerInstance = new PrimeCenterRequestLog();
|
$requestLogControllerInstance = new PrimeCenterRequestLog();
|
||||||
try {
|
try {
|
||||||
$response = $requestLogControllerInstance->createNew($request);
|
$response = $requestLogControllerInstance->createNew($request);
|
||||||
|
|
||||||
if($response->original['statusCode'] == 200)
|
if($response->original['statusCode'] == 200)
|
||||||
{
|
{
|
||||||
//send email
|
//send email
|
||||||
@@ -361,7 +363,7 @@ class RequestLogController extends Controller
|
|||||||
->update([
|
->update([
|
||||||
'status_final_log' => 'requested',
|
'status_final_log' => 'requested',
|
||||||
'final_log' => 1,
|
'final_log' => 1,
|
||||||
'discharge_date' => $request->discharge_date,
|
'discharge_date' => $request->discharge_date,
|
||||||
'created_final_by'=> auth()->user()->id,
|
'created_final_by'=> auth()->user()->id,
|
||||||
'created_final_at'=> date('Y-m-d H:i:s'),
|
'created_final_at'=> date('Y-m-d H:i:s'),
|
||||||
]);
|
]);
|
||||||
@@ -785,7 +787,7 @@ class RequestLogController extends Controller
|
|||||||
$dataDiagnosis = [];
|
$dataDiagnosis = [];
|
||||||
if($dataRequestLog->diagnosis)
|
if($dataRequestLog->diagnosis)
|
||||||
{
|
{
|
||||||
$dataDiagnosiCodes = explode(',', $dataRequestLog->diagnosis);
|
$dataDiagnosiCodes = explode(',', $dataRequestLog->diagnosis);
|
||||||
foreach ($dataDiagnosiCodes as $diagnosisCode)
|
foreach ($dataDiagnosiCodes as $diagnosisCode)
|
||||||
{
|
{
|
||||||
$diagnoisis = DB::table('icd')
|
$diagnoisis = DB::table('icd')
|
||||||
@@ -796,8 +798,8 @@ class RequestLogController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['dataDiagnosis'] = $dataDiagnosis;
|
$data['dataDiagnosis'] = $dataDiagnosis;
|
||||||
|
|
||||||
|
|
||||||
$pdf = new Dompdf();
|
$pdf = new Dompdf();
|
||||||
|
|
||||||
@@ -848,7 +850,7 @@ class RequestLogController extends Controller
|
|||||||
->where('id', '=', $request_logs_id)
|
->where('id', '=', $request_logs_id)
|
||||||
->select('id', 'member_id', 'service_code')
|
->select('id', 'member_id', 'service_code')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
$check_claim_requests = DB::table('claim_requests')
|
$check_claim_requests = DB::table('claim_requests')
|
||||||
->where('claim_requests.request_log_id', '=', $request_logs_id)
|
->where('claim_requests.request_log_id', '=', $request_logs_id)
|
||||||
->first();
|
->first();
|
||||||
@@ -860,12 +862,12 @@ class RequestLogController extends Controller
|
|||||||
$requestLogData = RequestLog::where('id',$request_logs_id)->first();
|
$requestLogData = RequestLog::where('id',$request_logs_id)->first();
|
||||||
$organization = Organization::where(['id' => $requestLogData->organization_id, 'type' => 'hospital'])->first('code');
|
$organization = Organization::where(['id' => $requestLogData->organization_id, 'type' => 'hospital'])->first('code');
|
||||||
$provideCode = $organization ? $organization->code : '';
|
$provideCode = $organization ? $organization->code : '';
|
||||||
|
|
||||||
$newClaimRequest = ClaimRequestService::storeClaimRequest(
|
$newClaimRequest = ClaimRequestService::storeClaimRequest(
|
||||||
row: [],
|
row: [],
|
||||||
code: $code,
|
code: $code,
|
||||||
member: $member,
|
member: $member,
|
||||||
paymentType: 'cashless',
|
paymentType: 'cashless',
|
||||||
serviceCode: $data_req_logs->service_code,
|
serviceCode: $data_req_logs->service_code,
|
||||||
requestLogID: $request_logs_id,
|
requestLogID: $request_logs_id,
|
||||||
organization_code: $provideCode,
|
organization_code: $provideCode,
|
||||||
@@ -877,7 +879,7 @@ class RequestLogController extends Controller
|
|||||||
'type' => 'info',
|
'type' => 'info',
|
||||||
'system_origin' => 'hospital-portal'
|
'system_origin' => 'hospital-portal'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Claim Log
|
// Claim Log
|
||||||
DB::table('claim_logs')
|
DB::table('claim_logs')
|
||||||
->insert([
|
->insert([
|
||||||
|
|||||||
@@ -149,7 +149,9 @@ class RequestLogController extends Controller
|
|||||||
// status: 'approved',
|
// status: 'approved',
|
||||||
status: 'requested', // di nonaktifkan dulu auto approved
|
status: 'requested', // di nonaktifkan dulu auto approved
|
||||||
organization_id: $request->organization_id,
|
organization_id: $request->organization_id,
|
||||||
source: $request->source
|
source: $request->source,
|
||||||
|
specialities_id: $request->specialities_id,
|
||||||
|
dppj: $request->dppj
|
||||||
);
|
);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
@@ -171,7 +173,9 @@ class RequestLogController extends Controller
|
|||||||
submissionDate: $request->submission_date,
|
submissionDate: $request->submission_date,
|
||||||
status: 'requested',
|
status: 'requested',
|
||||||
organization_id: $request->organization_id,
|
organization_id: $request->organization_id,
|
||||||
source: $request->source
|
source: $request->source,
|
||||||
|
specialities_id: $request->specialities_id,
|
||||||
|
dppj: $request->dppj
|
||||||
);
|
);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
@@ -489,11 +493,11 @@ class RequestLogController extends Controller
|
|||||||
if (!empty($request->reason)) {
|
if (!empty($request->reason)) {
|
||||||
$requestLog->reason_final = $request->reason;
|
$requestLog->reason_final = $request->reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($request->type_of_member)){
|
if (!empty($request->type_of_member)){
|
||||||
$requestLog->type_of_member = $request->type_of_member;
|
$requestLog->type_of_member = $request->type_of_member;
|
||||||
}
|
}
|
||||||
|
|
||||||
$requestLog->final_log = 1;
|
$requestLog->final_log = 1;
|
||||||
$requestLog->approved_final_log_by = auth()->user()->id;
|
$requestLog->approved_final_log_by = auth()->user()->id;
|
||||||
$requestLog->approved_final_log_at = Carbon::now();
|
$requestLog->approved_final_log_at = Carbon::now();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use App\Models\Benefit;
|
|||||||
use App\Models\Exclusion;
|
use App\Models\Exclusion;
|
||||||
use App\Models\ClaimRequest;
|
use App\Models\ClaimRequest;
|
||||||
use App\Models\Icd;
|
use App\Models\Icd;
|
||||||
|
use App\Models\Speciality;
|
||||||
use App\Helpers\Helper;
|
use App\Helpers\Helper;
|
||||||
use App\Models\CorporatePolicy;
|
use App\Models\CorporatePolicy;
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
@@ -117,12 +118,20 @@ class RequestLogShowResource extends JsonResource
|
|||||||
}
|
}
|
||||||
$memberUsage = Helper::getUsageMember($corporateId, $requestLog['member']['id'], $benefitData);
|
$memberUsage = Helper::getUsageMember($corporateId, $requestLog['member']['id'], $benefitData);
|
||||||
|
|
||||||
// dd($memberLimitUsage);
|
if($requestLog['specialities_id'])
|
||||||
|
{
|
||||||
|
$spesialis = Speciality::query()
|
||||||
|
->where('id', $requestLog['specialities_id'])
|
||||||
|
->select('name')
|
||||||
|
->first();
|
||||||
|
}
|
||||||
$data = [
|
$data = [
|
||||||
'id' => $requestLog['id'],
|
'id' => $requestLog['id'],
|
||||||
'code' => $requestLog['code'],
|
'code' => $requestLog['code'],
|
||||||
'invoice_no' => $requestLog['invoice_no'],
|
'invoice_no' => $requestLog['invoice_no'],
|
||||||
'billing_no' => $requestLog['billing_no'],
|
'billing_no' => $requestLog['billing_no'],
|
||||||
|
'specialities_id' => $spesialis['name'],
|
||||||
|
'dppj' => $requestLog['dppj'],
|
||||||
'code' => $requestLog['code'],
|
'code' => $requestLog['code'],
|
||||||
'code_claim' => $claimCode,
|
'code_claim' => $claimCode,
|
||||||
'member_id' => $requestLog['member']['member_id'],
|
'member_id' => $requestLog['member']['member_id'],
|
||||||
@@ -161,7 +170,7 @@ class RequestLogShowResource extends JsonResource
|
|||||||
'reason' => $requestLog['reason'],
|
'reason' => $requestLog['reason'],
|
||||||
'diagnosis' => $icd,
|
'diagnosis' => $icd,
|
||||||
'is_reversal' => $isReversal, // untuk penjagaan, jika true tidak bisa di edit/hapus lagi
|
'is_reversal' => $isReversal, // untuk penjagaan, jika true tidak bisa di edit/hapus lagi
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ class RequestLog extends Model
|
|||||||
'approved_final_log_at',
|
'approved_final_log_at',
|
||||||
'created_final_at',
|
'created_final_at',
|
||||||
'created_final_by',
|
'created_final_by',
|
||||||
|
'specialities_id',
|
||||||
|
'dppj',
|
||||||
'type_of_member'
|
'type_of_member'
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -82,7 +84,7 @@ class RequestLog extends Model
|
|||||||
"Keterangan IGL" => "keterangan",
|
"Keterangan IGL" => "keterangan",
|
||||||
"Catatan FGL" => "catatan",
|
"Catatan FGL" => "catatan",
|
||||||
"QC 1" => "status_final_log",
|
"QC 1" => "status_final_log",
|
||||||
"Ingestion Code" => "ingestion_code",
|
"Ingestion Code" => "ingestion_code",
|
||||||
"Ingestion Status" => "ingestion_status",
|
"Ingestion Status" => "ingestion_status",
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -21,14 +21,16 @@ use Str;
|
|||||||
class RequestLogService{
|
class RequestLogService{
|
||||||
|
|
||||||
public static function storeRequestLog(
|
public static function storeRequestLog(
|
||||||
$row = null,
|
$row = null,
|
||||||
$code,
|
$code,
|
||||||
$member,
|
$member,
|
||||||
$paymentType,
|
$paymentType,
|
||||||
$serviceCode,
|
$serviceCode,
|
||||||
$submissionDate,
|
$submissionDate,
|
||||||
$status, $organization_id = null,
|
$status, $organization_id = null,
|
||||||
$source
|
$source,
|
||||||
|
$specialities_id,
|
||||||
|
$dppj
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -55,6 +57,8 @@ class RequestLogService{
|
|||||||
'policy_id' => $member->currentPolicy->id ?? null,
|
'policy_id' => $member->currentPolicy->id ?? null,
|
||||||
'organization_id' => $organization ? $organization->id : 0,
|
'organization_id' => $organization ? $organization->id : 0,
|
||||||
'source' => $source,
|
'source' => $source,
|
||||||
|
'specialities_id' => $specialities_id,
|
||||||
|
'dppj' => $dppj
|
||||||
];
|
];
|
||||||
|
|
||||||
$requestLog = RequestLog::create($requestLogData);
|
$requestLog = RequestLog::create($requestLogData);
|
||||||
@@ -109,7 +113,7 @@ class RequestLogService{
|
|||||||
DB::commit();
|
DB::commit();
|
||||||
return $claimManagement;
|
return $claimManagement;
|
||||||
|
|
||||||
|
|
||||||
} catch (\Exception $error) {
|
} catch (\Exception $error) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
|
|
||||||
@@ -168,4 +172,4 @@ class RequestLogService{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
|
{
|
||||||
|
if(!Schema::hasColumn('request_logs', 'specialities_id')) {
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->bigInteger('specialities_id')->after('created_final_by')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
if(!Schema::hasColumn('request_logs', 'specialities_id')) {
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('specialities_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -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()
|
||||||
|
{
|
||||||
|
if(!Schema::hasColumn('request_logs', 'dppj')) {
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->string('dppj', '255')->after('specialities_id')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
if(!Schema::hasColumn('request_logs', 'dppj')) {
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('dppj');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -250,6 +250,14 @@ export default function Detail() {
|
|||||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Penempatan Kamar</Typography>
|
<Typography variant='subtitle2' sx={style1} gutterBottom>Penempatan Kamar</Typography>
|
||||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.penempatan_kamar ? requestLog?.penempatan_kamar : '-'}</Typography>
|
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.penempatan_kamar ? requestLog?.penempatan_kamar : '-'}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||||
|
<Typography variant='subtitle2' sx={style1} gutterBottom>Spesialis</Typography>
|
||||||
|
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.specialities_id ? requestLog?.specialities_id : '-'}</Typography>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||||
|
<Typography variant='subtitle2' sx={style1} gutterBottom>DPPJ</Typography>
|
||||||
|
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.dppj ? requestLog?.dppj : '-'}</Typography>
|
||||||
|
</Stack>
|
||||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Catatan</Typography>
|
<Typography variant='subtitle2' sx={style1} gutterBottom>Catatan</Typography>
|
||||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.catatan ? requestLog?.catatan : '-'}</Typography>
|
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.catatan ? requestLog?.catatan : '-'}</Typography>
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ export type FinalLogType = {
|
|||||||
provider : string,
|
provider : string,
|
||||||
status : string,
|
status : string,
|
||||||
files_by_type : files_by_type,
|
files_by_type : files_by_type,
|
||||||
|
specialities_id : number,
|
||||||
|
dppj: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default function Detail() {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { themeStretch } = useSettings();
|
const { themeStretch } = useSettings();
|
||||||
const [requestLog, setRequestLog] = useState<DetailRequestLogType>();
|
const [requestLog, setRequestLog] = useState<DetailRequestLogType>();
|
||||||
|
|
||||||
|
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
|
|
||||||
@@ -70,9 +70,9 @@ export default function Detail() {
|
|||||||
const handleCloseDialogSubmit = () => {
|
const handleCloseDialogSubmit = () => {
|
||||||
setOpenDialogSubmit(false);
|
setOpenDialogSubmit(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [approve, setApprove] = useState('')
|
const [approve, setApprove] = useState('')
|
||||||
|
|
||||||
const [openDialogEdit, setOpenDialogEdit] = useState(false);
|
const [openDialogEdit, setOpenDialogEdit] = useState(false);
|
||||||
return (
|
return (
|
||||||
<Page title='Detail'>
|
<Page title='Detail'>
|
||||||
@@ -84,7 +84,7 @@ export default function Detail() {
|
|||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid item xs={12} md={12}>
|
<Grid item xs={12} md={12}>
|
||||||
<Card sx={{padding:2}} >
|
<Card sx={{padding:2}} >
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid item xs={6}>
|
<Grid item xs={6}>
|
||||||
<Typography variant='subtitle1' sx={{ color: '#19BBBB', marginBottom: 4 }} gutterBottom>
|
<Typography variant='subtitle1' sx={{ color: '#19BBBB', marginBottom: 4 }} gutterBottom>
|
||||||
Detail
|
Detail
|
||||||
@@ -106,7 +106,7 @@ export default function Detail() {
|
|||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Provider Name</Typography>
|
<Typography variant='subtitle2' sx={style1} gutterBottom>Provider Name</Typography>
|
||||||
@@ -157,6 +157,14 @@ export default function Detail() {
|
|||||||
<Typography variant='subtitle2' sx={style1} gutterBottom>Penempatan Kamar</Typography>
|
<Typography variant='subtitle2' sx={style1} gutterBottom>Penempatan Kamar</Typography>
|
||||||
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.penempatan_kamar ? requestLog?.penempatan_kamar : '-'}</Typography>
|
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.penempatan_kamar ? requestLog?.penempatan_kamar : '-'}</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||||
|
<Typography variant='subtitle2' sx={style1} gutterBottom>Spesialis</Typography>
|
||||||
|
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.specialities_id ? requestLog?.specialities_id : '-'}</Typography>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction='row' spacing={2} sx={marginBottom1}>
|
||||||
|
<Typography variant='subtitle2' sx={style1} gutterBottom>DPPJ</Typography>
|
||||||
|
<Typography variant='subtitle2' sx={style2} gutterBottom>{requestLog?.dppj ? requestLog?.dppj : '-'}</Typography>
|
||||||
|
</Stack>
|
||||||
</Card>
|
</Card>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} md={12} marginTop={2}>
|
<Grid item xs={12} md={12} marginTop={2}>
|
||||||
@@ -217,13 +225,13 @@ export default function Detail() {
|
|||||||
openDialog={openDialogSubmit}
|
openDialog={openDialogSubmit}
|
||||||
approve={approve}
|
approve={approve}
|
||||||
></DialogConfirmation>
|
></DialogConfirmation>
|
||||||
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid>
|
</Grid>
|
||||||
) : null}
|
) : null}
|
||||||
<Grid item xs={12} md={12}>
|
<Grid item xs={12} md={12}>
|
||||||
<Stack direction="row" padding={4} sx={{ justifyContent: 'space-between' }}>
|
<Stack direction="row" padding={4} sx={{ justifyContent: 'space-between' }}>
|
||||||
<DialogEditInformation
|
<DialogEditInformation
|
||||||
setOpenDialog={setOpenDialogEdit}
|
setOpenDialog={setOpenDialogEdit}
|
||||||
requestLog={requestLog}
|
requestLog={requestLog}
|
||||||
openDialog={openDialogEdit}
|
openDialog={openDialogEdit}
|
||||||
@@ -231,7 +239,7 @@ export default function Detail() {
|
|||||||
</DialogEditInformation>
|
</DialogEditInformation>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Container>
|
</Container>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ export type DetailRequestLogType = {
|
|||||||
benefit : Benefit[],
|
benefit : Benefit[],
|
||||||
reason : string,
|
reason : string,
|
||||||
type_of_member : string,
|
type_of_member : string,
|
||||||
corporate_id : number
|
corporate_id : number,
|
||||||
|
specialities_id : number,
|
||||||
|
dppj: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Benefit = {
|
export type Benefit = {
|
||||||
|
|||||||
@@ -138,7 +138,9 @@
|
|||||||
"txtButtonClose": "Close",
|
"txtButtonClose": "Close",
|
||||||
"txtLabelFailed": "Failed",
|
"txtLabelFailed": "Failed",
|
||||||
"txtAttention": "Attention",
|
"txtAttention": "Attention",
|
||||||
"txtAttentionInfo": "There are pending orders that require approval."
|
"txtAttentionInfo": "There are pending orders that require approval.",
|
||||||
|
"txtDPPJ": "DPPJ",
|
||||||
|
"txtSpecialist": "Specialist"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,5 +138,7 @@
|
|||||||
"txtButtonClose": "Tutup",
|
"txtButtonClose": "Tutup",
|
||||||
"txtLabelFailed": "Gagal Pengiriman",
|
"txtLabelFailed": "Gagal Pengiriman",
|
||||||
"txtAttention": "Perhatian",
|
"txtAttention": "Perhatian",
|
||||||
"txtAttentionInfo": "Terdapat pesanan pending mohon untuk segera di approve."
|
"txtAttentionInfo": "Terdapat pesanan pending mohon untuk segera di approve.",
|
||||||
|
"txtDPPJ": "DPPJ",
|
||||||
|
"txtSpecialist": "Spesialis"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { LoadingButton } from '@mui/lab';
|
import { LoadingButton } from '@mui/lab';
|
||||||
import
|
import
|
||||||
{
|
{
|
||||||
Avatar,
|
Avatar,
|
||||||
FormControl,
|
FormControl,
|
||||||
InputLabel,
|
InputLabel,
|
||||||
Select,
|
Select,
|
||||||
FormHelperText,
|
FormHelperText,
|
||||||
MenuItem
|
MenuItem
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import { Card } from '@mui/material';
|
import { Card } from '@mui/material';
|
||||||
import { Stack, Typography } from '@mui/material';
|
import { Stack, Typography } from '@mui/material';
|
||||||
import axios from '@/utils/axios';
|
import axios from '@/utils/axios';
|
||||||
import { enqueueSnackbar } from 'notistack';
|
import { enqueueSnackbar } from 'notistack';
|
||||||
import { useRef, useState, useContext, useEffect } from 'react';
|
import React, { useRef, useState, useContext, useEffect } from 'react';
|
||||||
import { makeFormData } from '@/utils/jsonToFormData';
|
import { makeFormData } from '@/utils/jsonToFormData';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { LanguageContext } from '@/contexts/LanguageContext';
|
import { LanguageContext } from '@/contexts/LanguageContext';
|
||||||
@@ -28,6 +28,7 @@ interface MemberType {
|
|||||||
services: any;
|
services: any;
|
||||||
providers:any;
|
providers:any;
|
||||||
companies:any;
|
companies:any;
|
||||||
|
specialities:any;
|
||||||
}
|
}
|
||||||
interface FormRequestClaimProps {
|
interface FormRequestClaimProps {
|
||||||
member: MemberType;
|
member: MemberType;
|
||||||
@@ -37,6 +38,8 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
const { localeData }: any = useContext(LanguageContext);
|
const { localeData }: any = useContext(LanguageContext);
|
||||||
const [serviceCode, setServiceCode] = useState<string>('');
|
const [serviceCode, setServiceCode] = useState<string>('');
|
||||||
const [idProvider, setIdProvider] = useState<number>(0);
|
const [idProvider, setIdProvider] = useState<number>(0);
|
||||||
|
const [idSpecialities, setIdSpecialities] = useState<number>(0);
|
||||||
|
const [inputDppj, setInputDppj] = useState<string>('');
|
||||||
//Submission date
|
//Submission date
|
||||||
const [submissionDate, setSubmissionDate] = useState<string>(format(new Date(), "yyyy MMM d HH:mm:ss"));
|
const [submissionDate, setSubmissionDate] = useState<string>(format(new Date(), "yyyy MMM d HH:mm:ss"));
|
||||||
|
|
||||||
@@ -47,7 +50,7 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
setCorporateIdPartner(member?.companies?.map((item: { id: any; name: any; }) => ({ value: item.id, label: item.name })));
|
setCorporateIdPartner(member?.companies?.map((item: { id: any; name: any; }) => ({ value: item.id, label: item.name })));
|
||||||
}, []);
|
}, []);
|
||||||
const [selectedCorporatID, setSelectedCorporateID] = useState<any>([]);
|
const [selectedCorporatID, setSelectedCorporateID] = useState<any>([]);
|
||||||
|
|
||||||
const handleSelectChangePatner = (event:any, selectedOptions:any) => {
|
const handleSelectChangePatner = (event:any, selectedOptions:any) => {
|
||||||
const selectedValues = selectedOptions.map((option: { value: any; }) => option.value);
|
const selectedValues = selectedOptions.map((option: { value: any; }) => option.value);
|
||||||
setSelectedCorporateID(selectedValues);
|
setSelectedCorporateID(selectedValues);
|
||||||
@@ -77,24 +80,26 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
organization_name : name,
|
organization_name : name,
|
||||||
address_provider: alamat,
|
address_provider: alamat,
|
||||||
submission_date: fPostFormat(submissionDate, 'yyyy-MM-dd HH:mm:ss'),
|
submission_date: fPostFormat(submissionDate, 'yyyy-MM-dd HH:mm:ss'),
|
||||||
corporate_id_partner: selectedCorporatID
|
corporate_id_partner: selectedCorporatID,
|
||||||
|
specialities_id: idSpecialities,
|
||||||
|
dppj: inputDppj
|
||||||
};
|
};
|
||||||
axios
|
axios
|
||||||
.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(() => {
|
// setTimeout(() => {
|
||||||
window.location.reload();
|
// window.location.reload();
|
||||||
}, 1500);
|
// }, 1500);
|
||||||
enqueueSnackbar(response.data.meta.message, { variant: 'success' });
|
enqueueSnackbar(response.data.meta.message, { variant: 'success' });
|
||||||
handleSubmitSuccess();
|
handleSubmitSuccess();
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(({ response }) => {
|
.catch(({ response }) => {
|
||||||
if (response && response.data && response.data.meta) {
|
if (response && response.data && response.data.meta) {
|
||||||
enqueueSnackbar(response.data.meta.message, { variant: 'error' });
|
enqueueSnackbar(response.data.meta.message, { variant: 'error' });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
setSubmitLoading(false);
|
setSubmitLoading(false);
|
||||||
@@ -111,6 +116,11 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Specialities {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
const [showAddNewForm, setShowAddNewForm] = useState(false);
|
const [showAddNewForm, setShowAddNewForm] = useState(false);
|
||||||
const [name, setName] = useState('');
|
const [name, setName] = useState('');
|
||||||
const [alamat, setAlamat] = useState('');
|
const [alamat, setAlamat] = useState('');
|
||||||
@@ -191,7 +201,7 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
<FormHelperText style={{ color: 'red' }}></FormHelperText>
|
<FormHelperText style={{ color: 'red' }}></FormHelperText>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack direction="row" spacing={2}>
|
<Stack direction="row" spacing={2}>
|
||||||
<Stack spacing={2} sx={{ width: '100%' }}>
|
<Stack spacing={2} sx={{ width: '100%' }}>
|
||||||
<Typography variant='subtitle1'>{localeData.txtDialogMember1} *</Typography>
|
<Typography variant='subtitle1'>{localeData.txtDialogMember1} *</Typography>
|
||||||
@@ -215,6 +225,45 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
{/* Specialist */}
|
||||||
|
<Stack direction="row" spacing={2}>
|
||||||
|
<Stack spacing={2} sx={{ width: '100%' }}>
|
||||||
|
<Typography variant='subtitle1'>{localeData.txtSpecialist}</Typography>
|
||||||
|
<Autocomplete
|
||||||
|
id='specialities'
|
||||||
|
options={member?.specialities || []}
|
||||||
|
getOptionLabel={(option: Specialities) => option.name || ''}
|
||||||
|
value={member?.specialities.find((item: Specialities) => item.id === idSpecialities) || null}
|
||||||
|
onChange={(event: React.ChangeEvent<{}>, newValue : Specialities | null) => {
|
||||||
|
setIdSpecialities(newValue?.id || 0);
|
||||||
|
}}
|
||||||
|
renderInput={(params) => (
|
||||||
|
<TextField
|
||||||
|
{...params}
|
||||||
|
label={localeData.txtSpecialist}
|
||||||
|
fullWidth
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<FormHelperText style={{ color: 'red' }}></FormHelperText>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
<Stack direction="row" spacing={2}>
|
||||||
|
<Stack spacing={2} sx={{ width: '100%' }}>
|
||||||
|
<Typography variant='subtitle1'>{ localeData.txtDPPJ }</Typography>
|
||||||
|
<TextField
|
||||||
|
id='dppj'
|
||||||
|
variant='outlined'
|
||||||
|
placeholder={ localeData.txtDPPJ }
|
||||||
|
onChange={(event) => {
|
||||||
|
setInputDppj(event.target.value);
|
||||||
|
}}
|
||||||
|
fullWidth
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
<Stack direction="row" spacing={2}>
|
<Stack direction="row" spacing={2}>
|
||||||
<Stack spacing={2} sx={{ width: '100%' }}>
|
<Stack spacing={2} sx={{ width: '100%' }}>
|
||||||
<Typography variant='subtitle1'>{localeData.txtDialogMember5} *</Typography>
|
<Typography variant='subtitle1'>{localeData.txtDialogMember5} *</Typography>
|
||||||
@@ -226,7 +275,7 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
setSubmissionDate( (newValue));
|
setSubmissionDate( (newValue));
|
||||||
}}
|
}}
|
||||||
inputFormat="dd-MM-yyyy HH:mm"
|
inputFormat="dd-MM-yyyy HH:mm"
|
||||||
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
renderInput={(params) => <TextField sx={{width:'45%'}} {...params} required/>}
|
||||||
/>
|
/>
|
||||||
</LocalizationProvider>
|
</LocalizationProvider>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in New Issue
Block a user