diff --git a/app/Http/Controllers/InsuranceSubscriptionController.php b/app/Http/Controllers/InsuranceSubscriptionController.php index 93668d6..2ee134d 100644 --- a/app/Http/Controllers/InsuranceSubscriptionController.php +++ b/app/Http/Controllers/InsuranceSubscriptionController.php @@ -3,13 +3,14 @@ namespace App\Http\Controllers; use App\Events\InsuranceEvent; -use App\InsurancePaymentReason; +use App\InsuranceAction; use App\InsuranceState; use App\InsuranceSubscriptionAffiliation; use App\InsuranceSubscriptionState; use App\Models\AgentPlus; use App\Models\CountriesCurrency; use App\Models\Identification; +use App\Models\NhHavingRight; use App\Models\NhInsurance; use App\Models\NhInsurancesHavingRight; use App\Models\NhInsurancesPayment; @@ -121,7 +122,7 @@ class InsuranceSubscriptionController extends Controller $bonus = $monthPrice->min_amount; foreach ($beneficiaries as $b) { - $bonus += $this->calculateBeneficiaryBonusAmount(new NhInsurancesHavingRight($b), $networkConfig->yearsPricesGrid, $monthPrice); + $bonus += $this->calculateBeneficiaryBonusAmount(new NhHavingRight($b), $networkConfig->yearsPricesGrid, $monthPrice); } return $this->successResponse([ @@ -291,7 +292,7 @@ class InsuranceSubscriptionController extends Controller return $this->errorResponse(trans('errors.nano_health_not_activated')); $currentSubscription = NhInsurancesSubscription::where('network_id', $request->input('network_id'))->where('user_id', $request->input('user_id')) - ->whereNotIn('state', [InsuranceSubscriptionState::REJECTED, InsuranceSubscriptionState::AWAITING_FURTHER_INFORMATION])->first(); + ->whereNotIn('state', [InsuranceSubscriptionState::REJECTED])->first(); if (isset($currentSubscription)) { return $this->errorResponse(trans('errors.cannot_subscribe_again', ['state' => mb_strtolower(trans('states.' . $currentSubscription->state), 'UTF-8')])); @@ -319,6 +320,9 @@ class InsuranceSubscriptionController extends Controller $subscription->insurance_subscription_id = $this->generateSubscriptionID(); $subscription->number_of_months = $monthPrice->number_of_months; $subscription->bonus_amount = $monthPrice->min_amount; + $subscription->insurance_action = InsuranceAction::ACTIVATION; + $subscription->save(); + $beneficiariesBonus = $this->storeBeneficiariesAndGetBonus($subscription, $request, $networkConfig, $monthPrice, $datetime); $subscription->total_bonus_amount = ($subscription->bonus_amount + $beneficiariesBonus); @@ -329,7 +333,6 @@ class InsuranceSubscriptionController extends Controller 'action' => 'ADD', 'insurance_subscription_id' => $subscription->insurance_subscription_id, 'insurance_subscription_state' => $subscription->state, - 'insurance_subscription' => json_encode($subscription), 'created_at' => $datetime, 'updated_at' => $datetime, ]); @@ -419,7 +422,7 @@ class InsuranceSubscriptionController extends Controller 'insurance_subscription_state' => $subscription->state, 'agent_id' => $request->input('agent_id'), 'nh_validating_agent_id' => $request->input('nh_validating_agent_id'), - 'insurance_subscription' => json_encode($subscription), + 'created_at' => $datetime, 'updated_at' => $datetime, ]); @@ -477,7 +480,7 @@ class InsuranceSubscriptionController extends Controller 'insurance_subscription_state' => $subscription->state, 'agent_id' => $request->input('agent_id'), 'nh_validating_agent_id' => $request->input('nh_validating_agent_id'), - 'insurance_subscription' => json_encode($subscription), + 'created_at' => $datetime, 'updated_at' => $datetime, ]); @@ -540,14 +543,11 @@ class InsuranceSubscriptionController extends Controller ]); $subscription = NhInsurancesSubscription::findOrFail($id); - if ($subscription->state != InsuranceSubscriptionState::ACCEPTED || isset($subscription->payment)) { + if ($subscription->state != InsuranceSubscriptionState::ACCEPTED) { return $this->errorResponse(trans('errors.subscription_cannot_be_paid')); } - $currency = $this->getNetworkCurrency($subscription->network_id); - - $insurance = NhInsurance::where('insurance_subscription_id', $subscription->insurance_subscription_id)->first(); - if (isset($insurance) && $insurance->state == InsuranceState::PAID) { + if (isset($subscription->payment)) { return $this->errorResponse(trans('errors.subscription_be_already_paid')); } @@ -556,10 +556,9 @@ class InsuranceSubscriptionController extends Controller return $this->errorResponse(trans('messages.incorrect_user_password')); } + $currency = $this->getNetworkCurrency($subscription->network_id); + $amountToPaid = $subscription->total_bonus_amount; - if (isset($insurance) && $insurance->state == InsuranceState::ADDITION_OF_BENEFICIARY) { - $amountToPaid = $insurance->remaining_amount; - } if ($user->wallet->balance < $amountToPaid) { $amount = $amountToPaid - $user->wallet->balance; @@ -581,23 +580,48 @@ class InsuranceSubscriptionController extends Controller $user->wallet->save(); $user->save(); - if (isset($insurance) && $insurance->state == InsuranceState::ADDITION_OF_BENEFICIARY) { - $insurance->state = InsuranceState::PAID; - $insurance->remaining_amount = 0; - $insurance->save(); - $reason = InsurancePaymentReason::ADDITION_OF_BENEFICIARY; - - } else { + if ($subscription->insurance_action == InsuranceAction::ACTIVATION) { $insuredId = $this->generateInsuredID(); $insurance = NhInsurance::create([ - 'insurance_subscription_id' => $subscription->insurance_subscription_id, + 'network_id' => $subscription->network_id, + 'user_id' => $subscription->user_id, 'insured_id' => $insuredId, + 'number_of_months' => $subscription->number_of_months, + 'total_bonus_amount' => $subscription->total_bonus_amount, + 'number_of_beneficiaries' => $subscription->number_of_beneficiaries, + 'bonus_amount' => $subscription->bonus_amount, 'created_at' => $datetime, 'updated_at' => $datetime, 'state' => InsuranceState::PAID, 'start_at' => $datetime, 'end_at' => DateTime::createFromFormat('Y-m-d H:i:s', $datetime)->modify('+' . $subscription->number_of_months . 'months') ]); - $reason = InsurancePaymentReason::ACTIVATION; + foreach ($subscription->beneficiaries as $b) { + NhInsurancesHavingRight::create([ + 'insurance_id' => $insurance->id, + 'having_right_id' => $b->id + ]); + } + } else { + $insurance = NhInsurance::where('network_id', $subscription->network_id)->where('user_id', $subscription->user_id) + ->where('state', InsuranceState::PAID)->first(); + if (!isset($insurance)) { + DB::rollBack(); + return $this->errorResponse(trans('errors.not_insured'), 500); + } + + if ($subscription->insurance_action == InsuranceAction::ADDITION_OF_BENEFICIARY) { + $insurance->total_bonus_amount += $amountToPaid; + $insurance->number_of_beneficiaries += $subscription->number_of_beneficiaries; + $insurance->updated_at = $datetime; + $insurance->save(); + + foreach ($subscription->beneficiaries as $b) { + NhInsurancesHavingRight::create([ + 'insurance_id' => $insurance->id, + 'having_right_id' => $b->id + ]); + } + } } @@ -605,8 +629,7 @@ class InsuranceSubscriptionController extends Controller 'insurance_subscription_id' => $subscription->insurance_subscription_id, 'insured_id' => $insurance->insured_id, 'amount' => $amountToPaid, - 'reason' => $reason, - 'insurance_details' => json_encode($insurance), + 'reason' => $subscription->insurance_action, 'created_at' => $datetime, 'updated_at' => $datetime, ]); @@ -705,6 +728,7 @@ class InsuranceSubscriptionController extends Controller $subscriptions = $query->get(); foreach ($subscriptions as $subscription) { $subscription->state = trans('states.' . $subscription->state); + $subscription->insurance_action = trans('states.' . $subscription->insurance_action); $subscription->bonus_amount = $this->toMoneyWithCurrencyCode($subscription->bonus_amount, $currency_code); $subscription->total_bonus_amount = $this->toMoneyWithCurrencyCode($subscription->total_bonus_amount, $currency_code); foreach ($subscription->beneficiaries as $b) { diff --git a/app/InsurancePaymentReason.php b/app/InsuranceAction.php similarity index 85% rename from app/InsurancePaymentReason.php rename to app/InsuranceAction.php index 197b10d..4520b0d 100644 --- a/app/InsurancePaymentReason.php +++ b/app/InsuranceAction.php @@ -2,7 +2,7 @@ namespace App; -abstract class InsurancePaymentReason +abstract class InsuranceAction { const ACTIVATION = 'ACTIVATION'; const RENEWAL = 'RENEWAL'; diff --git a/app/InsuranceState.php b/app/InsuranceState.php index f18e7f9..a912d37 100644 --- a/app/InsuranceState.php +++ b/app/InsuranceState.php @@ -7,6 +7,4 @@ abstract class InsuranceState const PAID = 'PAID'; const UNDER_STOPPING = 'UNDER_STOPPING'; const STOPPED = 'STOPPED'; - const ADDITION_OF_BENEFICIARY = 'ADDITION_OF_BENEFICIARY'; - const DELETION_OF_BENEFICIARY = 'DELETION_OF_BENEFICIARY'; } diff --git a/app/Models/NhHavingRight.php b/app/Models/NhHavingRight.php new file mode 100644 index 0000000..67e6bc7 --- /dev/null +++ b/app/Models/NhHavingRight.php @@ -0,0 +1,65 @@ +attributes['affiliation']); + } +} diff --git a/app/Models/NhInsurance.php b/app/Models/NhInsurance.php index fccf441..c7d1dbe 100644 --- a/app/Models/NhInsurance.php +++ b/app/Models/NhInsurance.php @@ -13,12 +13,16 @@ use Illuminate\Database\Eloquent\Model; * Class NhInsurance * * @property int $id - * @property string $insurance_subscription_id + * @property int $network_id + * @property int $user_id * @property string $insured_id + * @property int $number_of_months + * @property float $bonus_amount + * @property int $number_of_beneficiaries + * @property float $total_bonus_amount * @property Carbon|null $start_at * @property Carbon|null $end_at * @property string $state - * @property float $remaining_amount * @property Carbon $created_at * @property Carbon $updated_at * @@ -34,16 +38,40 @@ class NhInsurance extends Model ]; protected $fillable = [ - 'insurance_subscription_id', + 'network_id', + 'user_id', 'insured_id', + 'number_of_months', + 'total_bonus_amount', + 'number_of_beneficiaries', + 'bonus_amount', 'start_at', 'end_at', 'state', - 'remaining_amount' ]; - public function subscription() + public function network() { - return $this->belongsTo(NhInsurancesSubscription::class, 'insurance_subscription_id', 'insurance_subscription_id'); + return $this->belongsTo(Network::class, 'network_id'); + } + + public function user() + { + return $this->belongsTo(User::class, 'user_id'); + } + + public function beneficiaries() + { + return $this->hasManyThrough(NhHavingRight::class, NhInsurancesHavingRight::class, 'insurance_id', 'id'); + } + + public function nhNetworkConfig() + { + return $this->belongsTo(NhNetworksConfig::class, 'network_id', 'network_id'); + } + + public function payment() + { + return $this->belongsTo(NhInsurancesPayment::class, 'id', 'insurance_id'); } } diff --git a/app/Models/NhInsurancesHavingRight.php b/app/Models/NhInsurancesHavingRight.php index c8220e8..d32fbc1 100644 --- a/app/Models/NhInsurancesHavingRight.php +++ b/app/Models/NhInsurancesHavingRight.php @@ -8,38 +8,27 @@ namespace App\Models; use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\Pivot; use Illuminate\Database\Eloquent\SoftDeletes; /** * Class NhInsurancesHavingRight * * @property int $id - * @property string $insurance_subscription_id - * @property string $lastname - * @property string|null $firstname - * @property string $gender - * @property Carbon $birthdate - * @property string $affiliation - * @property float $bonus_amount - * @property string|null $birthdate_proof - * @property string|null $birthdate_proof_doc - * @property string|null $justice_doc - * @property string|null $marriage_certificate_doc - * @property string|null $id_document_type - * @property string|null $id_document_front - * @property string|null $id_document_back - * @property string|null $deleted_at + * @property int $insurance_subscription_id + * @property int $insurance_id + * @property int $having_right_id + * @property Carbon $deleted_at * @property Carbon $created_at * @property Carbon $updated_at * * @package App\Models */ -class NhInsurancesHavingRight extends Model +class NhInsurancesHavingRight extends Pivot { use SoftDeletes; protected $table = 'nh_insurances_having_rights'; - protected $appends = ['affiliation_tr']; protected $dates = [ 'birthdate' @@ -47,23 +36,7 @@ class NhInsurancesHavingRight extends Model protected $fillable = [ 'insurance_subscription_id', - 'lastname', - 'firstname', - 'gender', - 'birthdate', - 'affiliation', - 'bonus_amount', - 'birthdate_proof', - 'birthdate_proof_doc', - 'justice_doc', - 'marriage_certificate_doc', - 'id_document_type', - 'id_document_front', - 'id_document_back' + 'insurance_id', + 'having_right_id', ]; - - public function getAffiliationTrAttribute() - { - return trans('states.' . $this->attributes['affiliation']); - } } diff --git a/app/Models/NhInsurancesPayment.php b/app/Models/NhInsurancesPayment.php index ea0fc8f..da53ee7 100644 --- a/app/Models/NhInsurancesPayment.php +++ b/app/Models/NhInsurancesPayment.php @@ -17,7 +17,6 @@ use Illuminate\Database\Eloquent\Model; * @property string $insured_id * @property float $amount * @property string $reason - * @property string $insurance_details * @property Carbon $created_at * @property Carbon $updated_at * @@ -35,7 +34,6 @@ class NhInsurancesPayment extends Model 'insurance_subscription_id', 'insured_id', 'amount', - 'reason', - 'insurance_details' + 'reason' ]; } diff --git a/app/Models/NhInsurancesSubscription.php b/app/Models/NhInsurancesSubscription.php index 4642ab5..6b664e8 100644 --- a/app/Models/NhInsurancesSubscription.php +++ b/app/Models/NhInsurancesSubscription.php @@ -21,6 +21,7 @@ use Illuminate\Database\Eloquent\Model; * @property int $number_of_beneficiaries * @property float $total_bonus_amount * @property string $state + * @property string $insurance_action * @property Carbon $created_at * @property Carbon $updated_at * @@ -38,7 +39,8 @@ class NhInsurancesSubscription extends Model 'total_bonus_amount', 'number_of_beneficiaries', 'bonus_amount', - 'state' + 'state', + 'insurance_action' ]; public function network() @@ -53,7 +55,7 @@ class NhInsurancesSubscription extends Model public function beneficiaries() { - return $this->hasMany(NhInsurancesHavingRight::class, 'insurance_subscription_id', 'insurance_subscription_id'); + return $this->hasManyThrough(NhHavingRight::class, NhInsurancesHavingRight::class, 'insurance_subscription_id', 'id'); } public function nhNetworkConfig() diff --git a/app/Models/NhInsurancesSubscriptionsHistory.php b/app/Models/NhInsurancesSubscriptionsHistory.php index 425543b..db19778 100644 --- a/app/Models/NhInsurancesSubscriptionsHistory.php +++ b/app/Models/NhInsurancesSubscriptionsHistory.php @@ -18,7 +18,6 @@ use Illuminate\Database\Eloquent\Model; * @property int|null $agent_id * @property int|null $nh_validating_agent_id * @property string $insurance_subscription_state - * @property string $insurance_subscription * @property Carbon $created_at * @property Carbon $updated_at * @@ -38,7 +37,6 @@ class NhInsurancesSubscriptionsHistory extends Model 'insurance_subscription_id', 'agent_id', 'nh_validating_agent_id', - 'insurance_subscription_state', - 'insurance_subscription' + 'insurance_subscription_state' ]; } diff --git a/app/Traits/Helper.php b/app/Traits/Helper.php index 7f6d85d..7ec2656 100644 --- a/app/Traits/Helper.php +++ b/app/Traits/Helper.php @@ -8,6 +8,7 @@ use App\InsuranceSubscriptionAffiliation; use App\InsuranceSubscriptionState; use App\Models\CountriesCurrency; use App\Models\Country; +use App\Models\NhHavingRight; use App\Models\NhInsurance; use App\Models\NhInsurancesHavingRight; use App\Models\NhInsurancesSubscription; @@ -96,8 +97,8 @@ trait Helper } // Caculer le montant de la prime d'un ayant droit ou beneficiaire - public function calculateBeneficiaryBonusAmount(NhInsurancesHavingRight $beneficiary, Collection $yearsPricesGrid, - NhMonthsPricesGrid $monthPrice) + public function calculateBeneficiaryBonusAmount(NhHavingRight $beneficiary, Collection $yearsPricesGrid, + NhMonthsPricesGrid $monthPrice) { $bonus = 0; if ($beneficiary->affiliation == 'CHILD') { @@ -124,8 +125,7 @@ trait Helper $beneficiariesBonus = 0; foreach ($request->input('beneficiaries') as $b) { - $beneficiary = new NhInsurancesHavingRight($b); - $beneficiary->insurance_subscription_id = $subscription->insurance_subscription_id; + $beneficiary = new NhHavingRight($b); $beneficiary->bonus_amount = $this->calculateBeneficiaryBonusAmount($beneficiary, $networkConfig->yearsPricesGrid, $monthPrice); $beneficiariesBonus += $beneficiary->bonus_amount; if ($beneficiary->affiliation == InsuranceSubscriptionAffiliation::CHILD) { @@ -140,6 +140,10 @@ trait Helper } $beneficiary->created_at = $beneficiary->updated_at = $datetime; $beneficiary->save(); + NhInsurancesHavingRight::create([ + 'insurance_subscription_id' => $subscription->id, + 'having_right_id' => $beneficiary->id, + ]); } return $beneficiariesBonus; } diff --git a/database/migrations/2021_11_10_140920_rename_nh_insurances_having_rights_table.php b/database/migrations/2021_11_10_140920_rename_nh_insurances_having_rights_table.php new file mode 100644 index 0000000..784f8df --- /dev/null +++ b/database/migrations/2021_11_10_140920_rename_nh_insurances_having_rights_table.php @@ -0,0 +1,33 @@ +dropColumn('insurance_subscription_id'); + $table->dropColumn('deleted_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::rename('nh_having_rights', 'nh_insurances_having_rights'); + } +} diff --git a/database/migrations/2021_11_10_142433_create_nh_insurances_having_rights_table.php b/database/migrations/2021_11_10_142433_create_nh_insurances_having_rights_table.php new file mode 100644 index 0000000..7ec1f36 --- /dev/null +++ b/database/migrations/2021_11_10_142433_create_nh_insurances_having_rights_table.php @@ -0,0 +1,35 @@ +id(); + $table->integer('insurance_id')->nullable(); + $table->integer('insurance_subscription_id')->nullable(); + $table->integer('having_right_id'); + $table->softDeletes(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('nh_insurances_having_rights'); + } +} diff --git a/database/migrations/2021_11_10_144305_add_insurance_action_in_nh_insurances_subscriptions_table.php b/database/migrations/2021_11_10_144305_add_insurance_action_in_nh_insurances_subscriptions_table.php new file mode 100644 index 0000000..34cb659 --- /dev/null +++ b/database/migrations/2021_11_10_144305_add_insurance_action_in_nh_insurances_subscriptions_table.php @@ -0,0 +1,33 @@ +enum('insurance_action', ['ACTIVATION', 'ADDITION_OF_BENEFICIARY', 'DELETION_OF_BENEFICIARY'])->default('ACTIVATION') + ->comment("Action que l'utilisateur souhaite effectuer sur son assurance")->after('state'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nh_insurances_subscriptions', function (Blueprint $table) { + $table->dropColumn('insurance_action'); + }); + } +} diff --git a/database/migrations/2021_11_10_155041_update_nh_infos_insurances_subscriptions_view.php b/database/migrations/2021_11_10_155041_update_nh_infos_insurances_subscriptions_view.php new file mode 100644 index 0000000..7fb081f --- /dev/null +++ b/database/migrations/2021_11_10_155041_update_nh_infos_insurances_subscriptions_view.php @@ -0,0 +1,30 @@ +dropColumn('insurance_subscription_id', 'remaining_amount'); + $table->integer('network_id')->after('id'); + $table->integer('user_id')->after('network_id'); + $table->integer('number_of_months')->comment("Durée de couverture en mois")->after('insured_id'); + $table->decimal('bonus_amount', 10, 2)->comment("Montant de la prime pour la durée de couverture choisi")->after('number_of_months'); + $table->integer('number_of_beneficiaries')->after('bonus_amount'); + $table->decimal('total_bonus_amount', 12, 2)->default(0)->comment("Montant total de la prime (assuré + ayants droit)")->after('number_of_beneficiaries'); + DB::statement("ALTER TABLE nh_insurances MODIFY state + ENUM('PAID', 'UNDER_STOPPING', 'STOPPED') DEFAULT 'PAID' NOT NULL;"); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nh_insurances', function (Blueprint $table) { + $table->dropColumn(['network_id', 'user_id', 'number_of_months', 'bonus_amount', 'number_of_beneficiaries', 'total_bonus_amount']); + $table->string('insurance_subscription_id')->after('id'); + $table->decimal('remaining_amount'); + }); + } +} diff --git a/database/migrations/2021_11_10_165957_remove_uneccessary_stuff_in_nh_insurances_payments_table.php b/database/migrations/2021_11_10_165957_remove_uneccessary_stuff_in_nh_insurances_payments_table.php new file mode 100644 index 0000000..e216a61 --- /dev/null +++ b/database/migrations/2021_11_10_165957_remove_uneccessary_stuff_in_nh_insurances_payments_table.php @@ -0,0 +1,42 @@ +string('insurance_subscription_id')->nullable()->change(); + $table->string('reason')->default(null)->nullable()->change(); + $table->dropColumn('insurance_details'); + }); + + Schema::table('nh_insurances_subscriptions_history', function (Blueprint $table) { + $table->dropColumn('insurance_subscription'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nh_insurances_payments', function (Blueprint $table) { + $table->text('insurance_details'); + }); + + Schema::table('nh_insurances_subscriptions_history', function (Blueprint $table) { + $table->text('insurance_subscription'); + }); + } +} diff --git a/database/migrations/2021_11_11_205552_update_nh_infos_insurances_view.php b/database/migrations/2021_11_11_205552_update_nh_infos_insurances_view.php new file mode 100644 index 0000000..d7f6da8 --- /dev/null +++ b/database/migrations/2021_11_11_205552_update_nh_infos_insurances_view.php @@ -0,0 +1,30 @@ + "You can no longer subscribe to this insurance. You already have a request :state", "subscription_cannot_be_updated" => "This subscription request cannot be modified", "subscription_cannot_be_paid" => "This subscription request cannot be paid", - 'subscription_be_already_paid' => "This subscription has already been paid. You can just renew it", + 'subscription_be_already_paid' => "This subscription has already been paid", "subscription_cannot_be_submitted" => "Your previous application is being validated. You cannot submit another one at this time", + "not_insured" => "You are not insured", ]; diff --git a/resources/lang/en/states.php b/resources/lang/en/states.php index 6025a05..9451317 100755 --- a/resources/lang/en/states.php +++ b/resources/lang/en/states.php @@ -13,5 +13,6 @@ return [ "AWAITING_FURTHER_INFORMATION" => "AWAITING FURTHER INFORMATION", "ENDED" => 'ENDED', "ADDITION_OF_BENEFICIARY" => "ADDITION OF BENEFICIARY", - "DELETION_OF_BENEFICIARY" => "DELETION OF BENEFICIARY" + "DELETION_OF_BENEFICIARY" => "DELETION OF BENEFICIARY", + "ACTIVATION" => "INSURANCE ACTIVATION" ]; diff --git a/resources/lang/fr/errors.php b/resources/lang/fr/errors.php index 279de7a..aebd9fb 100755 --- a/resources/lang/fr/errors.php +++ b/resources/lang/fr/errors.php @@ -29,6 +29,7 @@ return [ 'cannot_subscribe_again' => "Vous ne pouvez plus souscrire à cette assurance. Vous avez déjà une demande :state", "subscription_cannot_be_updated" => "Cette demande de souscription ne peut etre modifiée", "subscription_cannot_be_paid" => "Cette demande de souscription ne peut etre payée", - 'subscription_be_already_paid' => "Cette souscription a déjà été payée. Vous pouvez juste la renouveler", + 'subscription_be_already_paid' => "Cette souscription a déjà été payée", "subscription_cannot_be_submitted" => "Votre demande précedente est en cours de validation. Vous ne pouvez pas en soumettre une autre pour l'instant", + "not_insured" => "Vous n'êtes pas assuré", ]; diff --git a/resources/lang/fr/states.php b/resources/lang/fr/states.php index b303a8b..a68b6d7 100755 --- a/resources/lang/fr/states.php +++ b/resources/lang/fr/states.php @@ -13,5 +13,6 @@ return [ "AWAITING_FURTHER_INFORMATION" => "EN ATTENTE D'INFORMATIONS COMPLÉMENTAIRES", "ENDED" => 'TERMINÉE', "ADDITION_OF_BENEFICIARY" => "AJOUT D'AYANT DROIT", - "DELETION_OF_BENEFICIARY" => "SUPPRESSION D'AYANT DROIT" + "DELETION_OF_BENEFICIARY" => "SUPPRESSION D'AYANT DROIT", + "ACTIVATION" => "ACTIVATION DE L'ASSURANCE" ];