Update Member Enrollment
This commit is contained in:
@@ -30,12 +30,11 @@ class CorporateController extends Controller
|
||||
return $query->where('name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('code', 'LIKE', '%'.$search.'%');
|
||||
})
|
||||
->with('currentPolicy')
|
||||
->with('currentPolicy', 'subCorporates')
|
||||
->withCount([
|
||||
'employees',
|
||||
'corporatePlans',
|
||||
'corporateBenefits',
|
||||
'subCorporates'
|
||||
])
|
||||
->where('type', 'corporate')
|
||||
->paginate(10);
|
||||
@@ -52,7 +51,7 @@ class CorporateController extends Controller
|
||||
$corporateGroups = Corporate::whereNull('parent_id')->get()->map(function($corporate) {
|
||||
return [
|
||||
'value' => $corporate->id,
|
||||
'label' => $corporate->name,
|
||||
'label' => $corporate->name.' ('.$corporate->code.')',
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ class MemberController extends Controller
|
||||
$rowResponse = $this->memberEnrollmentService->handleImportRow($corporate, $new_member_data);
|
||||
|
||||
// Write Success Result to File
|
||||
$singleRow = WriterEntityFactory::createRow($this->memberEnrollmentService->makeResultRowWithResultFormat($new_member_data));
|
||||
$singleRow = WriterEntityFactory::createRow($this->memberEnrollmentService->makeResultRowWithResultFormat($rowResponse));
|
||||
$writer->addRow($singleRow);
|
||||
$imported_member_data++;
|
||||
} catch (ImportRowException $e) {
|
||||
|
||||
@@ -34,6 +34,7 @@ class PlanController extends Controller
|
||||
// $corporatePlan->where('corporate_id', $corporate_id);
|
||||
// })
|
||||
// ->with('corporatePlan')
|
||||
->orderBy('corporate_plan_id', 'ASC')
|
||||
->paginate()
|
||||
->appends($request->all());
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Modules\Internal\Services;
|
||||
use App\Exceptions\ImportRowException;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Corporate;
|
||||
use App\Models\CorporateEmployee;
|
||||
use App\Models\CorporateDivision;
|
||||
use App\Models\CorporatePlan;
|
||||
use App\Models\Member;
|
||||
@@ -89,7 +90,7 @@ class MemberEnrollmentService
|
||||
"StartNoClaim" => "start_no_claim",
|
||||
"EndNoClaim" => "end_no_claim",
|
||||
"Option Mode" => "option_mode",
|
||||
"Policy Inforce" => "policy_inforce",
|
||||
"Policy Inforce" => "policy_in_force",
|
||||
"Renewal activation date" => "renewal_activation_date",
|
||||
"Renewal Activation Date" => "renewal_activation_date",
|
||||
"Ingestion Code" => "ingestion_code", // TODO I think this should not be here because if user uploading result then ingestion code and status will be filled
|
||||
@@ -156,6 +157,7 @@ class MemberEnrollmentService
|
||||
"internal_use_4" => "Internal Use",
|
||||
"member_since" => "Member Since",
|
||||
"internal_use_5" => "Internal Use",
|
||||
"policy_inforce" => "Policy Inforce",
|
||||
"policy_in_force" => "Policy In Force",
|
||||
"member_suspended" => "Member Suspended",
|
||||
"activation_date" => "Activation Date",
|
||||
@@ -163,7 +165,6 @@ class MemberEnrollmentService
|
||||
"start_no_claim" => "StartNoClaim",
|
||||
"end_no_claim" => "EndNoClaim",
|
||||
"option_mode" => "Option Mode",
|
||||
"policy_inforce" => "Policy Inforce",
|
||||
"renewal_activation_date" => "Renewal Activation Date",
|
||||
"ingestion_code" => "Ingestion Code",
|
||||
"ingestion_status" => "Ingestion Status",
|
||||
@@ -228,14 +229,13 @@ class MemberEnrollmentService
|
||||
"Internal Use",
|
||||
"Member Since",
|
||||
"Internal Use",
|
||||
"Policy In Force",
|
||||
"Policy Inforce",
|
||||
"Member Suspended",
|
||||
"Activation Date",
|
||||
"Internal Use",
|
||||
"StartNoClaim",
|
||||
"EndNoClaim",
|
||||
"Option Mode",
|
||||
"Policy Inforce",
|
||||
"Renewal Activation Date",
|
||||
"Ingestion Code",
|
||||
"Ingestion Status",
|
||||
@@ -276,7 +276,7 @@ class MemberEnrollmentService
|
||||
}
|
||||
}
|
||||
|
||||
// TOOD RECORD BCA ONLY
|
||||
// TODO RECORD BCA ONLY
|
||||
if ($row['record_type'] == 'D' && !empty($row['branch_code'])) {
|
||||
throw new ImportRowException(__('enrollment.BRANCH_CODE_NOT_REQUIRED'), 0, null, $row);
|
||||
}
|
||||
@@ -402,6 +402,7 @@ class MemberEnrollmentService
|
||||
// })
|
||||
->first();
|
||||
|
||||
// Validate If Exist Member
|
||||
if ($member) {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_UNIQUE', [
|
||||
'member_id' => $row['member_id'],
|
||||
@@ -530,12 +531,14 @@ class MemberEnrollmentService
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
|
||||
if (Carbon::parse(strtotime($row['member_effective_date'])) > Carbon::parse(strtotime($row['member_expiry_date']))) {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_EXPIRY_DATE_INVALID'), 0, null, $row);
|
||||
}
|
||||
|
||||
if (Carbon::parse($memberPolicy->end) > Carbon::parse(strtotime($row['member_expiry_date'])
|
||||
|| $memberPolicy->end > Carbon::parse(strtotime($row['member_expiry_date'])))) {
|
||||
if (Carbon::parse($memberPolicy->end) > Carbon::parse(strtotime($row['member_expiry_date']))
|
||||
|| $memberPolicy->end > Carbon::parse(strtotime($row['member_expiry_date']))
|
||||
) {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_RENEWAL_STILL_ACTIVE'), 0, null, $row);
|
||||
}
|
||||
|
||||
@@ -575,8 +578,9 @@ class MemberEnrollmentService
|
||||
throw new ImportRowException(__('enrollment.MEMBER_EXPIRY_DATE_INVALID'), 0, null, $row);
|
||||
}
|
||||
|
||||
if (Carbon::parse($memberPolicy->end) > Carbon::parse(strtotime($row['member_expiry_date'])
|
||||
|| $memberPolicy->end > Carbon::parse(strtotime($row['member_expiry_date'])))) {
|
||||
if (Carbon::parse($memberPolicy->end) > Carbon::parse(strtotime($row['member_expiry_date']))
|
||||
|| $memberPolicy->end > Carbon::parse(strtotime($row['member_expiry_date']))
|
||||
) {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_RENEWAL_STILL_ACTIVE'), 0, null, $row);
|
||||
}
|
||||
|
||||
@@ -593,61 +597,153 @@ class MemberEnrollmentService
|
||||
|
||||
break;
|
||||
case "7": // Requesting to Change the Unique Data of the Member
|
||||
|
||||
// if (empty($row["option_mode"])) {
|
||||
// throw new ImportRowException(__('enrollment.OPTION_MODE_INVALID_FORMAT', [
|
||||
// 'member_id' => $row['member_id'],
|
||||
// 'policy_id' => $row['policy_number']
|
||||
// ]), 0, null, $row);
|
||||
// }
|
||||
|
||||
// // Read Option Mode
|
||||
// $option_mode = explode('!', $row['option_mode']);
|
||||
// $corp_code = $option_mode[1] ?? null;
|
||||
// $policy_number = $option_mode[2] ?? null;
|
||||
// $member_id = $option_mode[3] ?? null;
|
||||
// // Validate
|
||||
// if ( !in_array($option_mode[0], ['P', 'D']) || empty($corp_code) || empty($policy_number) || empty($member_id) ) {
|
||||
// throw new ImportRowException(__('enrollment.OPTION_MODE_INVALID_FORMAT', [
|
||||
// 'member_id' => $row['member_id'],
|
||||
// 'policy_id' => $row['policy_number']
|
||||
// ]), 0, null, $row);
|
||||
// }
|
||||
$record_type = explode('>', $row['record_type']);
|
||||
$record_type_old = $record_type[0] ?? null;
|
||||
$record_type_new = $record_type[1] ?? null;
|
||||
$corp_code = explode('>', $row['corporate_id']);
|
||||
$corp_code_old = $corp_code[0] ?? null;
|
||||
$corp_code_new = $corp_code[1] ?? null;
|
||||
$policy_number = explode('>', $row['policy_number']);
|
||||
$policy_number_old = $policy_number[0] ?? null;
|
||||
$policy_number_new = $policy_number[1] ?? null;
|
||||
$member_id = explode('>', $row['member_id']);
|
||||
$member_id_old = $member_id[0] ?? null;
|
||||
$member_id_new = $member_id[1] ?? null;
|
||||
|
||||
|
||||
$memberPolicy = MemberPolicy::query()
|
||||
->where('policy_id', $row['policy_number'])
|
||||
->where('member_id', $row['member_id'])
|
||||
->where('policy_id', $policy_number_old)
|
||||
->where('member_id', $member_id_old)
|
||||
->with('member')
|
||||
->first();
|
||||
|
||||
if (!$memberPolicy) {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_NOT_EXISTS', [
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number']
|
||||
'member_id' => $member_id_old,
|
||||
'policy_id' => $policy_number_old
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
if ($memberPolicy->status != 'active') {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_INACTIVE', [
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number']
|
||||
'member_id' => $member_id_old,
|
||||
'policy_id' => $policy_number_old
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
// TODO OPTION MODE FORMAT VALIDATION
|
||||
if (empty($row["option_mode"])) {
|
||||
throw new ImportRowException(__('enrollment.OPTION_MODE_INVALID_FORMAT', [
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number']
|
||||
]), 0, null, $row);
|
||||
if ($record_type_new == 'P') {
|
||||
if (!empty($row['principal_id'])) {
|
||||
throw new ImportRowException(__('enrollment.PRINCIPAL_ID_NOT_REQUIRED'), 0, null, $row);
|
||||
}
|
||||
|
||||
if (empty($row['corporate_id'])) {
|
||||
throw new ImportRowException(__('enrollment.CORPORATE_ID_REQUIRED'), 0, null, $row);
|
||||
}
|
||||
}
|
||||
|
||||
if ($record_type_new == 'D') {
|
||||
if (empty($row['principal_id'])) {
|
||||
throw new ImportRowException(__('enrollment.PRINCIPAL_ID_REQUIRED'), 0, null, $row);
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
$row['record_type'] == 'P' &&
|
||||
$memberPolicy->member->corporate->code == $row["corporate_id"] &&
|
||||
$memberPolicy->policy_id == $row['policy_number'] &&
|
||||
$memberPolicy->member_id == $row['member_id'] &&
|
||||
$memberPolicy->member->record_type == $row['record_type']
|
||||
) {
|
||||
throw new ImportRowException(__('enrollment.UNIQUE_CHANGE_PRINCIPAL_INVALID', [
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number']
|
||||
]), 0, null, $row);
|
||||
// if (
|
||||
// $record_type_new == 'P' &&
|
||||
// $memberPolicy->member->corporate->code == $row["corporate_id"] &&
|
||||
// $memberPolicy->policy_id == $row['policy_number'] &&
|
||||
// $memberPolicy->member_id == $row['member_id'] &&
|
||||
// $memberPolicy->member->record_type == $row['record_type']
|
||||
// ) {
|
||||
// throw new ImportRowException(__('enrollment.UNIQUE_CHANGE_PRINCIPAL_INVALID', [
|
||||
// 'member_id' => $row['member_id'],
|
||||
// 'policy_id' => $row['policy_number']
|
||||
// ]), 0, null, $row);
|
||||
// }
|
||||
|
||||
// if (
|
||||
// $record_type_new == 'D' &&
|
||||
// $memberPolicy->member->corporate->code == $row["corporate_id"] &&
|
||||
// $memberPolicy->policy_id == $row['policy_number'] &&
|
||||
// $memberPolicy->member->record_type == $row['record_type'] &&
|
||||
// $memberPolicy->member->payor_id == $row['payor_id']
|
||||
// ) {
|
||||
// throw new ImportRowException(__('enrollment.UNIQUE_CHANGE_DEPENDANT_INVALID', [
|
||||
// 'member_id' => $row['member_id'],
|
||||
// 'policy_id' => $row['policy_number']
|
||||
// ]), 0, null, $row);
|
||||
// }
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
if ( !empty($record_type_new) ) {
|
||||
$member = $memberPolicy->member;
|
||||
$member->record_type = $record_type_new;
|
||||
$member->principal_id = $row['principal_id'];
|
||||
|
||||
$member->save();
|
||||
}
|
||||
|
||||
if ( !empty($corp_code_new) ) {
|
||||
$oldCorporate = Corporate::where('code', $corp_code_old)->first();
|
||||
$newCorporate = Corporate::where('code', $corp_code_new)->first();
|
||||
|
||||
if (!$newCorporate) {
|
||||
throw new ImportRowException(__('enrollment.CORPORATE_NOT_FOUND'), 0, null, $row);
|
||||
}
|
||||
$corporateEmployee = CorporateEmployee::where('corporate_id', $oldCorporate->id)
|
||||
->where('member_id', $memberPolicy->member->id)
|
||||
->first();
|
||||
$newCorporateEmployee = CorporateEmployee::updateOrCreate([
|
||||
'corporate_id' => $oldCorporate->id,
|
||||
'member_id' => $memberPolicy->member->id
|
||||
],
|
||||
[
|
||||
'corporate_id' => $newCorporate->id,
|
||||
'member_id' => $memberPolicy->member->id
|
||||
]);
|
||||
}
|
||||
|
||||
if ( !empty($policy_number_new) ) {
|
||||
$memberPolicy->policy_id = $policy_number_new;
|
||||
$memberPolicy->save();
|
||||
}
|
||||
|
||||
if ( !empty($member_id_new) ) {
|
||||
$memberPolicy->member_id = $member_id_new;
|
||||
$memberPolicy->save();
|
||||
|
||||
$member = $memberPolicy->member;
|
||||
$member->member_id = $member_id_new;
|
||||
$member->save();
|
||||
}
|
||||
|
||||
DB::commit();
|
||||
} catch (\Exception $e) {
|
||||
DB::rollback();
|
||||
throw new ImportRowException($e->getMessage(), $e->getCode(), $e, $row);
|
||||
}
|
||||
|
||||
if (
|
||||
$row['record_type'] == 'D' &&
|
||||
$memberPolicy->member->corporate->code == $row["corporate_id"] &&
|
||||
$memberPolicy->policy_id == $row['policy_number'] &&
|
||||
$memberPolicy->member->record_type == $row['record_type'] &&
|
||||
$memberPolicy->member->payor_id == $row['payor_id']
|
||||
) {
|
||||
throw new ImportRowException(__('enrollment.UNIQUE_CHANGE_DEPENDANT_INVALID', [
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number']
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
throw new ImportRowException(__('MODE 7 NOT HANDLED PROPERLY'), 0, null, $row);
|
||||
break;
|
||||
case "9": // Member Reactivation and Personal information update (Without replacement Card)
|
||||
$memberPolicy = MemberPolicy::query()
|
||||
@@ -678,12 +774,38 @@ class MemberEnrollmentService
|
||||
$memberPolicy->save();
|
||||
break;
|
||||
case "13": // Advance Renewal with OLD Card No. (NO PRINT)
|
||||
// ASDASDASD
|
||||
throw new ImportRowException(__('MODE 13 NOT HANDLED PROPERLY'), 0, null, $row);
|
||||
$memberPolicy = MemberPolicy::query()
|
||||
->where('policy_id', $row['policy_number'])
|
||||
->where('member_id', $row['member_id'])
|
||||
->first();
|
||||
|
||||
if (!$memberPolicy) {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_NOT_EXISTS', [
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number']
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
if ($memberPolicy->status != 'active') {
|
||||
throw new ImportRowException(__('enrollment.MEMBER_INACTIVE', [
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number']
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
$newMemberPolicy = new MemberPolicy();
|
||||
$newMemberPolicy->fill([
|
||||
'member_id' => $row['member_id'],
|
||||
'policy_id' => $row['policy_number'],
|
||||
'start' => Carbon::parse(strtotime($row['member_effective_date'])),
|
||||
'end' => Carbon::parse(strtotime($row['member_expiry_date'])),
|
||||
'status' => 'active'
|
||||
]);
|
||||
$newMemberPolicy->save();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// THESE MODES BELOW ARE DISABLED
|
||||
case "4": // Member Update Start and End Date
|
||||
@@ -789,10 +911,10 @@ class MemberEnrollmentService
|
||||
}
|
||||
|
||||
// Should be success then returning new member data with extra ingestion code & status
|
||||
$member_data['ingestion_code'] = "200";
|
||||
$member_data['ingestion_status'] = "SUCCESS";
|
||||
$row['ingestion_code'] = "200";
|
||||
$row['ingestion_status'] = "SUCCESS";
|
||||
|
||||
return $member_data;
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,6 +61,16 @@ class Member extends Model
|
||||
return $this->hasMany(CorporateEmployee::class, 'member_id');
|
||||
}
|
||||
|
||||
public function memberPlans()
|
||||
{
|
||||
return $this->hasMany(MemberPlan::class, 'member_id');
|
||||
}
|
||||
|
||||
public function plans()
|
||||
{
|
||||
return $this->hasManyThrough(MemberPlan::class, Plan::class, 'member_id', 'plan_id', 'id', 'plan_id');
|
||||
}
|
||||
|
||||
public function policies()
|
||||
{
|
||||
return $this->hasMany(MemberPolicy::class, 'member_id', 'member_id');
|
||||
|
||||
0
frontend/client-portal/.env.development
Executable file → Normal file
0
frontend/client-portal/.env.development
Executable file → Normal file
0
frontend/client-portal/public/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
frontend/client-portal/public/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
frontend/client-portal/public/fonts/CircularStd-Book.otf
Executable file → Normal file
0
frontend/client-portal/public/fonts/CircularStd-Book.otf
Executable file → Normal file
0
frontend/client-portal/public/fonts/CircularStd-Medium.otf
Executable file → Normal file
0
frontend/client-portal/public/fonts/CircularStd-Medium.otf
Executable file → Normal file
0
frontend/dashboard/.env.development
Executable file → Normal file
0
frontend/dashboard/.env.development
Executable file → Normal file
0
frontend/dashboard/public/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
frontend/dashboard/public/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
frontend/dashboard/public/fonts/CircularStd-Book.otf
Executable file → Normal file
0
frontend/dashboard/public/fonts/CircularStd-Book.otf
Executable file → Normal file
0
frontend/dashboard/public/fonts/CircularStd-Medium.otf
Executable file → Normal file
0
frontend/dashboard/public/fonts/CircularStd-Medium.otf
Executable file → Normal file
@@ -13,6 +13,7 @@ import { useParams, useSearchParams } from 'react-router-dom';
|
||||
import axios from '../../../utils/axios';
|
||||
import { LaravelPaginatedData } from '../../../@types/paginated-data';
|
||||
import BasePagination from '../../../components/BasePagination';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
|
||||
export default function PlanList() {
|
||||
const { themeStretch } = useSettings();
|
||||
@@ -97,10 +98,10 @@ export default function PlanList() {
|
||||
// alert('Succesfully read '+ response.data.total_successed_row + ' with ' + response.data.total_failed_row + ' failed rows');
|
||||
})
|
||||
.catch(response => {
|
||||
alert('Looks like something went wrong. Please check your data and try again. ' + response.message)
|
||||
enqueueSnackbar('Looks like something went wrong. Please check your data and try again. ' + response.message, { variant: 'error' })
|
||||
})
|
||||
} else {
|
||||
alert('No File Selected')
|
||||
enqueueSnackbar('No File Selected', { variant: 'warning' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import axios from '../../../utils/axios';
|
||||
import { LaravelPaginatedData } from '../../../@types/paginated-data';
|
||||
import { Icd } from '../../../@types/diagnosis';
|
||||
import BasePagination from '../../../components/BasePagination';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
|
||||
export default function List() {
|
||||
const { themeStretch } = useSettings();
|
||||
@@ -97,10 +98,10 @@ export default function List() {
|
||||
// alert('Succesfully read '+ response.data.total_successed_row + ' with ' + response.data.total_failed_row + ' failed rows');
|
||||
})
|
||||
.catch(response => {
|
||||
alert('Looks like something went wrong. Please check your data and try again. ' + response.message)
|
||||
enqueueSnackbar('Looks like something went wrong. Please check your data and try again. ' + response.message, { variant: 'error' })
|
||||
})
|
||||
} else {
|
||||
alert('No File Selected')
|
||||
enqueueSnackbar('No File Selected', { variant: 'warning' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ export default function CorporateForm({ isEdit, currentCorporate }: Props) {
|
||||
setCorporateGroups(res.data.corporate_groups)
|
||||
})
|
||||
.catch((err) => {
|
||||
enqueueSnackbar("Opps, failed to get Corporate Group List", "error")
|
||||
enqueueSnackbar("Opps, failed to get Corporate Group List", { variant: 'error' })
|
||||
})
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
@@ -282,7 +282,9 @@ export default function CorporateForm({ isEdit, currentCorporate }: Props) {
|
||||
{/* // TODO Use Autocomplete */}
|
||||
{( values.type == 'subcorporate' && <RHFSelect name="parent_id" label="Parent Corporate Group" placeholder="Parent Corporate Group">
|
||||
<option value="" />
|
||||
{corporate_groups.map((option, index) => (
|
||||
{corporate_groups
|
||||
.filter((option) => option.value != values.id)
|
||||
.map((option, index) => (
|
||||
<option key={index} value={option.value}>
|
||||
{option.label}
|
||||
</option>
|
||||
|
||||
@@ -365,6 +365,22 @@ export default function Corporates() {
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
|
||||
<Typography sx={{ fontWeight: '600', mb: 1, mt: 2 }}>Sub Corporate</Typography>
|
||||
<Grid container>
|
||||
<Grid item xs={12}>
|
||||
<Grid container>
|
||||
<Grid item xs={6}>
|
||||
Sub Corporates ({row.sub_corporates.length})
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
: {row.sub_corporates?.map((corp) => corp.name).join(', ')}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Box>
|
||||
</Collapse>
|
||||
</TableCell>
|
||||
|
||||
@@ -15,6 +15,7 @@ import { Plan } from '../../../@types/corporates';
|
||||
import { LaravelPaginatedData } from '../../../@types/paginated-data';
|
||||
import { Member } from '../../../@types/member';
|
||||
import BasePagination from '../../../components/BasePagination';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
|
||||
export default function CorporatePlanList() {
|
||||
const { themeStretch } = useSettings();
|
||||
@@ -140,10 +141,10 @@ export default function CorporatePlanList() {
|
||||
setImportResult(response.data)
|
||||
})
|
||||
.catch(response => {
|
||||
alert('Looks like something went wrong. Please check your data and try again. ' + response.message)
|
||||
enqueueSnackbar('Looks like something went wrong. Please check your data and try again. ' + response.message, { variant: 'error' })
|
||||
})
|
||||
} else {
|
||||
alert('No File Selected')
|
||||
enqueueSnackbar('No File Selected', { variant: 'warning' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import axios from '../../../utils/axios';
|
||||
import { Plan } from '../../../@types/corporates';
|
||||
import { LaravelPaginatedData } from '../../../@types/paginated-data';
|
||||
import BasePagination from '../../../components/BasePagination';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
|
||||
export default function CorporatePlanList() {
|
||||
const { themeStretch } = useSettings();
|
||||
@@ -98,10 +99,10 @@ export default function CorporatePlanList() {
|
||||
// alert('Succesfully read '+ response.data.total_successed_row + ' with ' + response.data.total_failed_row + ' failed rows');
|
||||
})
|
||||
.catch(response => {
|
||||
alert('Looks like something went wrong. Please check your data and try again. ' + response.message)
|
||||
enqueueSnackbar('Looks like something went wrong. Please check your data and try again. ' + response.message, { variant: 'error' })
|
||||
})
|
||||
} else {
|
||||
alert('No File Selected')
|
||||
enqueueSnackbar('No File Selected', { variant: 'warning' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import axios from '../../../utils/axios';
|
||||
import { LaravelPaginatedData } from '../../../@types/paginated-data';
|
||||
import { Icd } from '../../../@types/diagnosis';
|
||||
import BasePagination from '../../../components/BasePagination';
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
|
||||
export default function List() {
|
||||
const { themeStretch } = useSettings();
|
||||
@@ -97,10 +98,10 @@ export default function List() {
|
||||
// alert('Succesfully read '+ response.data.total_successed_row + ' with ' + response.data.total_failed_row + ' failed rows');
|
||||
})
|
||||
.catch(response => {
|
||||
alert('Looks like something went wrong. Please check your data and try again. ' + response.message)
|
||||
enqueueSnackbar('Looks like something went wrong. Please check your data and try again. ' + response.message, { variant: 'error' })
|
||||
})
|
||||
} else {
|
||||
alert('No File Selected')
|
||||
enqueueSnackbar('No File Selected', { variant: 'warning' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,10 +97,10 @@ export default function List() {
|
||||
// alert('Succesfully read '+ response.data.total_successed_row + ' with ' + response.data.total_failed_row + ' failed rows');
|
||||
})
|
||||
.catch(response => {
|
||||
alert('Looks like something went wrong. Please check your data and try again. ' + response.message)
|
||||
enqueueSnackbar('Looks like something went wrong. Please check your data and try again. ' + response.message, { variant: 'error' })
|
||||
})
|
||||
} else {
|
||||
alert('No File Selected')
|
||||
enqueueSnackbar('No File Selected', { variant: 'warning' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,10 +98,10 @@ export default function List() {
|
||||
// alert('Succesfully read '+ response.data.total_successed_row + ' with ' + response.data.total_failed_row + ' failed rows');
|
||||
})
|
||||
.catch(response => {
|
||||
alert('Looks like something went wrong. Please check your data and try again. ' + response.message)
|
||||
enqueueSnackbar('Looks like something went wrong. Please check your data and try again. ' + response.message, { variant: 'error' })
|
||||
})
|
||||
} else {
|
||||
alert('No File Selected')
|
||||
enqueueSnackbar('No File Selected', { variant: 'warning' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ export default function VerifyCodeForm() {
|
||||
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||
console.log('code:', Object.values(data).join(''));
|
||||
|
||||
enqueueSnackbar('Verify success!');
|
||||
enqueueSnackbar('Verify success!', { variant: 'success' });
|
||||
|
||||
navigate('/dashboard', { replace: true });
|
||||
} catch (error) {
|
||||
|
||||
0
public/client-portal/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
public/client-portal/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
public/client-portal/fonts/CircularStd-Book.otf
Executable file → Normal file
0
public/client-portal/fonts/CircularStd-Book.otf
Executable file → Normal file
0
public/client-portal/fonts/CircularStd-Medium.otf
Executable file → Normal file
0
public/client-portal/fonts/CircularStd-Medium.otf
Executable file → Normal file
0
public/dashboard/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
public/dashboard/fonts/CircularStd-Bold.otf
Executable file → Normal file
0
public/dashboard/fonts/CircularStd-Book.otf
Executable file → Normal file
0
public/dashboard/fonts/CircularStd-Book.otf
Executable file → Normal file
0
public/dashboard/fonts/CircularStd-Medium.otf
Executable file → Normal file
0
public/dashboard/fonts/CircularStd-Medium.otf
Executable file → Normal file
Reference in New Issue
Block a user