Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -24,8 +24,8 @@ class RequestLogController extends Controller
|
|||||||
$data = [
|
$data = [
|
||||||
'member_id' => $request->member_id,
|
'member_id' => $request->member_id,
|
||||||
'service_code' => $request->service_code,
|
'service_code' => $request->service_code,
|
||||||
'id_provider' => $request->id_provider,
|
'organization_id' => $request->organization_id,
|
||||||
'name_provider' => $request->name_provider,
|
'organization_name' => $request->organization_name,
|
||||||
'address_provider' => $request->address_provider
|
'address_provider' => $request->address_provider
|
||||||
];
|
];
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
@@ -35,14 +35,14 @@ class RequestLogController extends Controller
|
|||||||
'member_id.required' => trans('Validation.required',['attribute' => 'Member ID']),
|
'member_id.required' => trans('Validation.required',['attribute' => 'Member ID']),
|
||||||
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
||||||
]);
|
]);
|
||||||
if($request->id_provider)
|
if($request->organization_id)
|
||||||
{
|
{
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'id_provider' => 'required',
|
'organization_id' => 'required',
|
||||||
'member_id' => 'required',
|
'member_id' => 'required',
|
||||||
'service_code' => 'required'
|
'service_code' => 'required'
|
||||||
], [
|
], [
|
||||||
'id_provider.required' => trans('Validation.required',['attribute' => 'Provider ID']),
|
'organization_id.required' => trans('Validation.required',['attribute' => 'Provider ID']),
|
||||||
'member_id.required' => trans('Validation.required',['attribute' => 'Member ID']),
|
'member_id.required' => trans('Validation.required',['attribute' => 'Member ID']),
|
||||||
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
||||||
]);
|
]);
|
||||||
@@ -55,14 +55,14 @@ class RequestLogController extends Controller
|
|||||||
{
|
{
|
||||||
//insert data to organization
|
//insert data to organization
|
||||||
try {
|
try {
|
||||||
if(!$request->id_provider)
|
if(!$request->organization_id)
|
||||||
{
|
{
|
||||||
// Memulai transaksi
|
// Memulai transaksi
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
// Membuat singkatan dari nama rumah sakit
|
// Membuat singkatan dari nama rumah sakit
|
||||||
$singkatan = "";
|
$singkatan = "";
|
||||||
$words = explode(' ', $request->name_provider);
|
$words = explode(' ', $request->organization_name);
|
||||||
|
|
||||||
foreach ($words as $word) {
|
foreach ($words as $word) {
|
||||||
$singkatan .= strtoupper(substr($word, 0, 1));
|
$singkatan .= strtoupper(substr($word, 0, 1));
|
||||||
@@ -74,7 +74,7 @@ class RequestLogController extends Controller
|
|||||||
// Insert data ke tabel organizations
|
// Insert data ke tabel organizations
|
||||||
$organization_id = DB::table('organizations')
|
$organization_id = DB::table('organizations')
|
||||||
->insertGetId([
|
->insertGetId([
|
||||||
'name' => $request->name_provider,
|
'name' => $request->organization_name,
|
||||||
'code' => $kodeOrganisasi,
|
'code' => $kodeOrganisasi,
|
||||||
'type' => 'hospital',
|
'type' => 'hospital',
|
||||||
'created_at' => now(),
|
'created_at' => now(),
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
const formData = {
|
const formData = {
|
||||||
member_id: member.members.id,
|
member_id: member.members.id,
|
||||||
service_code: serviceCode,
|
service_code: serviceCode,
|
||||||
id_provider: idProvider,
|
organization_id: idProvider,
|
||||||
name_provider : name,
|
organization_name : name,
|
||||||
address_provider: alamat
|
address_provider: alamat
|
||||||
};
|
};
|
||||||
axios
|
axios
|
||||||
|
|||||||
Reference in New Issue
Block a user