@php use App\Components\SearchQueryComponent; use Carbon\Carbon; use App\Enums\ContractStatus; use App\Enums\InsuranceContractBx01; use App\Enums\Service; use App\Models\User; use App\Enums\ContractOwn; use App\Enums\ContractTypeNew; use App\Enums\ContractKbn; use App\Enums\InsuranceContractBx08; use App\Enums\InsuranceContractBx05; use App\Enums\InsuranceContractBx07; @endphp @extends('layouts.user') @section('content')
@if ($currentRole == 'HB300' || $currentRole == 'HB200' || $currentRole == 'HB210') @endif 保険情報一覧

ユーザーID

契約者名

{{ $contractor ? $contractor['login_id'] : '' }}

{{ $contractor ? $contractor['name'] : '' }}

@php $currentUrl = parse_url(url()->full()); $paramCurrent = []; $paramNoKbn = []; $paramCreate = []; $keyParamCreate = array('contractor_login_uuid', 'type', 'own', 'kbn'); if ($currentUrl['query']) { parse_str($currentUrl['query'], $paramCurrent); parse_str($currentUrl['query'], $paramNoKbn); parse_str($currentUrl['query'], $paramCreate); if($request->kbn) { unset($paramNoKbn['kbn']); } foreach ($paramCurrent as $key => $value) { if(!in_array($key, $keyParamCreate) || in_array($key, $keyParamCreate) && !$value) { unset($paramCreate[$key]); } } } @endphp
@can('create', [User::class, Service::INSURANCE_INFORMATION]) @if($currentRole !== 'HB210') @if($request->own == ContractOwn::LEGAL_ENTITY) @if((!isset($request->type) || $request->type == ContractTypeNew::LIFE_INSURANCE)) @elseif(isset($request->type) && $request->type == ContractTypeNew::NON_LIFE_INSURANCE)  新規登録 @endif @elseif($request->own == ContractOwn::INDIVIDUAL)  新規登録 @endif @endif @endcan
@if(!(isset($request->type) && $request->type == ContractTypeNew::NON_LIFE_INSURANCE) && (isset($request->own) && $request->own == ContractOwn::LEGAL_ENTITY)) @endif
@if (!$insuranceInformations->isEmpty())
{{ $insuranceInformations->appends(SearchQueryComponent::alterQuery($request))->links('pagination.admin') }}
@endif
切替
@if((isset($request->own) && $request->own == ContractOwn::LEGAL_ENTITY) && (isset($request->kbn) && $request->kbn == ContractKbn::SAME_INSURANCE_NUMBER)) {{-- Show with SAME_INSURANCE --}} @if (!$insuranceInformations->isEmpty()) @endif @foreach ($insuranceInformations as $insuranceInformation) @endforeach
保険No
@if($currentRole != 'HB400') ステータス @endif
件数 保険種類 保険会社
払方
保険金額合計
保険料合計
{{ $insuranceInformation->id }}
@if($currentRole != 'HB400') {{ $insuranceInformation->status ? ContractStatus::getDescription($insuranceInformation->status) : 'なし'}} @endif
{{ $insuranceInformation->numMultiInsurance ? $insuranceInformation->numMultiInsurance : 'なし'}} {{ $insuranceInformation->bx01 ? InsuranceContractBx01::getDescription($insuranceInformation->bx01) : 'なし' }} {{ $insuranceInformation->nameOrg ? $insuranceInformation->nameOrg : 'なし' }}
{{ $insuranceInformation->bx05 ? InsuranceContractBx05::getDescription($insuranceInformation->bx05) : 'なし' }}
@if ($insuranceInformation->total_db03) {{ number_format($insuranceInformation->total_db03 ? $insuranceInformation->total_db03 : 0, 0, '', ',') }} 円 @elseif(!$insuranceInformation->total_db03) なし @endif
@if ($insuranceInformation->total_db00) {{ number_format($insuranceInformation->total_db00 ? $insuranceInformation->total_db00 : 0, 0, '', ',') }} 円 @elseif(!$insuranceInformation->total_db00) なし @endif
@else @if (!$insuranceInformations->isEmpty()) @endif @foreach ($insuranceInformations as $insuranceInformation) @endforeach
保険No
@if($currentRole != 'HB400') ステータス @endif
契約日
@if ($request->type == ContractTypeNew::NON_LIFE_INSURANCE) 対象 @else 被保険者 @endif
証券番号
保険種類
保険会社
払方
保険金額
保険料
保険期間
@if ($request->type != ContractTypeNew::NON_LIFE_INSURANCE) 払込期間 @endif
{{ $insuranceInformation->id }}
@if($currentRole != 'HB400') {{ $insuranceInformation->status ? ContractStatus::getDescription($insuranceInformation->status) : 'なし'}} @endif
{{ $insuranceInformation->date ? Carbon::parse($insuranceInformation->date)->format('Y-m-d') : 'なし' }}
@if ($request->type == ContractTypeNew::NON_LIFE_INSURANCE) {{ $insuranceInformation->target ? $insuranceInformation->target : 'なし' }} @else {{ $insuranceInformation->target_name ? $insuranceInformation->target_name : 'なし' }} @endif
{{ $insuranceInformation->contractCode ? $insuranceInformation->contractCode : 'なし' }}
{{ $insuranceInformation->bx01 ? InsuranceContractBx01::getDescription($insuranceInformation->bx01) : 'なし' }}
{{ $insuranceInformation->nameOrg ? $insuranceInformation->nameOrg : 'なし' }}
{{ $insuranceInformation->bx05 ? InsuranceContractBx05::getDescription($insuranceInformation->bx05) : 'なし' }}
@if ($insuranceInformation->total_db03) {{ number_format($insuranceInformation->total_db03 ? $insuranceInformation->total_db03 : 0, 0, '', ',') }} 円 @elseif(!$insuranceInformation->total_db03) なし @endif
@if ($insuranceInformation->total_db00) {{ number_format($insuranceInformation->total_db00 ? $insuranceInformation->total_db00 : 0, 0, '', ',') }} 円 @elseif(!$insuranceInformation->total_db00) なし @endif
@if ($request->type == ContractTypeNew::NON_LIFE_INSURANCE) @if ($insuranceInformation->duration) {{ $insuranceInformation->duration }} 年 @elseif(!$insuranceInformation->duration) なし @endif @else @if ($insuranceInformation->bx07) {{ ($insuranceInformation->bx07 == 'X0231' || $insuranceInformation->bx07 == 'X0260') ? ($insuranceInformation->it01 . InsuranceContractBx07::getDescription($insuranceInformation->bx07)) : InsuranceContractBx07::getDescription($insuranceInformation->bx07)}} @elseif(!$insuranceInformation->bx07) なし @endif @endif
@if ($request->type != ContractTypeNew::NON_LIFE_INSURANCE) @if ($insuranceInformation->bx08) {{ ($insuranceInformation->bx08 == 'X0231' || $insuranceInformation->bx08 == 'X0260') ? ($insuranceInformation->it02 . InsuranceContractBx08::getDescription($insuranceInformation->bx08)) : InsuranceContractBx08::getDescription($insuranceInformation->bx08)}} @elseif(!$insuranceInformation->bx08) なし @endif @endif
@endif
@if ($insuranceInformations->isEmpty()) @endif @if (!$insuranceInformations->isEmpty())
{{ $insuranceInformations->appends(SearchQueryComponent::alterQuery($request))->links('pagination.admin') }}
@endif
@endsection