Improve insurance subscription
This commit is contained in:
parent
65e5eb6bf3
commit
183ba64fea
|
@ -301,6 +301,10 @@ class InsuranceSubscriptionController extends Controller
|
||||||
if (!isset($networkConfig) || $networkConfig->configWallet->type != 'ilink_sante')
|
if (!isset($networkConfig) || $networkConfig->configWallet->type != 'ilink_sante')
|
||||||
return $this->errorResponse(trans('errors.nano_health_not_activated'));
|
return $this->errorResponse(trans('errors.nano_health_not_activated'));
|
||||||
|
|
||||||
|
$insurance = NhInsurance::where('network_id', $request->input('network_id'))->where('user_id', $request->input('user_id'))->first();
|
||||||
|
if (isset($insurance)) {
|
||||||
|
return $this->errorResponse(__('errors.already_insured'));
|
||||||
|
}
|
||||||
$this->latestSubscriptionVerification($request->input('network_id'), $request->input('user_id'));
|
$this->latestSubscriptionVerification($request->input('network_id'), $request->input('user_id'));
|
||||||
|
|
||||||
// Verification de l'age du beneficiaire
|
// Verification de l'age du beneficiaire
|
||||||
|
|
|
@ -47,5 +47,6 @@ return [
|
||||||
'act_application_already_pending' => "You already have an application pending for this act",
|
'act_application_already_pending' => "You already have an application pending for this act",
|
||||||
'insurance_not_in_order' => "This insurance is not in order",
|
'insurance_not_in_order' => "This insurance is not in order",
|
||||||
"insurance_expired" => "Your insurance is :state. You cannot perform this operation",
|
"insurance_expired" => "Your insurance is :state. You cannot perform this operation",
|
||||||
'cannot_renew_insurance' => "Your insurance is not stopped, you cannot renew it"
|
'cannot_renew_insurance' => "Your insurance is not stopped, you cannot renew it",
|
||||||
|
'already_insured' => "Vous avez deja souscrit à cette assurance"
|
||||||
];
|
];
|
||||||
|
|
|
@ -47,5 +47,6 @@ return [
|
||||||
'act_application_already_pending' => "Vous avez deja une demande en cours de validation pour cet acte.",
|
'act_application_already_pending' => "Vous avez deja une demande en cours de validation pour cet acte.",
|
||||||
'insurance_not_in_order' => "Cette assurance n'est pas en règle",
|
'insurance_not_in_order' => "Cette assurance n'est pas en règle",
|
||||||
"insurance_expired" => "Votre assurance est :state. Vous ne pouvez pas effectuer cette opération",
|
"insurance_expired" => "Votre assurance est :state. Vous ne pouvez pas effectuer cette opération",
|
||||||
'cannot_renew_insurance' => "Votre assurance n'est pas en arrêt , vous ne pouvez pas la renouveler"
|
'cannot_renew_insurance' => "Votre assurance n'est pas en arrêt , vous ne pouvez pas la renouveler",
|
||||||
|
'already_insured' => "Vous avez deja souscrit à cette assurance"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue