mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-07 01:54:16 +01:00
user consent about payment schedule
This commit is contained in:
parent
2ab7f3bdb9
commit
a321771040
@ -670,10 +670,13 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
|||||||
cartItems () {
|
cartItems () {
|
||||||
return mkRequestParams(reservation, $scope.coupon.applied);
|
return mkRequestParams(reservation, $scope.coupon.applied);
|
||||||
},
|
},
|
||||||
|
schedule () {
|
||||||
|
return $scope.schedule.payment_schedule;
|
||||||
|
},
|
||||||
stripeKey: ['Setting', function (Setting) { return Setting.get({ name: 'stripe_public_key' }).$promise; }]
|
stripeKey: ['Setting', function (Setting) { return Setting.get({ name: 'stripe_public_key' }).$promise; }]
|
||||||
},
|
},
|
||||||
controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'cgv', 'Auth', 'Reservation', 'wallet', 'helpers', '$filter', 'coupon', 'cartItems', 'stripeKey',
|
controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'cgv', 'Auth', 'Reservation', 'wallet', 'helpers', '$filter', 'coupon', 'cartItems', 'stripeKey', 'schedule',
|
||||||
function ($scope, $uibModalInstance, $state, reservation, price, cgv, Auth, Reservation, wallet, helpers, $filter, coupon, cartItems, stripeKey) {
|
function ($scope, $uibModalInstance, $state, reservation, price, cgv, Auth, Reservation, wallet, helpers, $filter, coupon, cartItems, stripeKey, schedule) {
|
||||||
// user wallet amount
|
// user wallet amount
|
||||||
$scope.walletAmount = wallet.amount;
|
$scope.walletAmount = wallet.amount;
|
||||||
|
|
||||||
@ -695,6 +698,9 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
|||||||
// stripe publishable key
|
// stripe publishable key
|
||||||
$scope.stripeKey = stripeKey.setting.value;
|
$scope.stripeKey = stripeKey.setting.value;
|
||||||
|
|
||||||
|
// Shows the schedule info in the modal
|
||||||
|
$scope.schedule = schedule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to handle the post-payment and reservation
|
* Callback to handle the post-payment and reservation
|
||||||
*/
|
*/
|
||||||
@ -729,7 +735,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
|||||||
return $scope.selectedPlan;
|
return $scope.selectedPlan;
|
||||||
},
|
},
|
||||||
schedule () {
|
schedule () {
|
||||||
return $scope.schedule.requested_schedule;
|
return $scope.schedule;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'Auth', 'Reservation', 'Subscription', 'wallet', 'helpers', '$filter', 'coupon', 'selectedPlan', 'schedule',
|
controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'Auth', 'Reservation', 'Subscription', 'wallet', 'helpers', '$filter', 'coupon', 'selectedPlan', 'schedule',
|
||||||
@ -752,8 +758,8 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
|||||||
// Used in wallet info template to interpolate some translations
|
// Used in wallet info template to interpolate some translations
|
||||||
$scope.numberFilter = $filter('number');
|
$scope.numberFilter = $filter('number');
|
||||||
|
|
||||||
// TODO, show the schedule info in the modal
|
// Shows the schedule info in the modal
|
||||||
$scope.schedule = schedule;
|
$scope.schedule = schedule.payment_schedule;
|
||||||
|
|
||||||
// Button label
|
// Button label
|
||||||
if ($scope.amount > 0) {
|
if ($scope.amount > 0) {
|
||||||
@ -778,7 +784,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
|||||||
subscription: {
|
subscription: {
|
||||||
plan_id: selectedPlan.id,
|
plan_id: selectedPlan.id,
|
||||||
user_id: reservation.user_id,
|
user_id: reservation.user_id,
|
||||||
payment_schedule: schedule
|
payment_schedule: schedule.requested_schedule
|
||||||
}
|
}
|
||||||
}, function (subscription) {
|
}, function (subscription) {
|
||||||
$uibModalInstance.close(subscription);
|
$uibModalInstance.close(subscription);
|
||||||
@ -820,6 +826,8 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
|||||||
$scope.coupon.applied = null;
|
$scope.coupon.applied = null;
|
||||||
$scope.slot = null;
|
$scope.slot = null;
|
||||||
$scope.selectedPlan = null;
|
$scope.selectedPlan = null;
|
||||||
|
$scope.schedule.requested_schedule = false;
|
||||||
|
$scope.schedule.payment_schedule = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
<p translate>{{ 'app.shared.valid_reservation_modal.here_is_the_subscription_summary' }}</p>
|
<p translate>{{ 'app.shared.valid_reservation_modal.here_is_the_subscription_summary' }}</p>
|
||||||
<p>{{ plan | humanReadablePlanName }}</p>
|
<p>{{ plan | humanReadablePlanName }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div ng-if="schedule">
|
||||||
|
<p translate translate-values="{DEADLINES: schedule.items.length}">{{ 'app.shared.valid_reservation_modal.payment_schedule' }}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-info" ng-click="ok()" ng-disabled="attempting" ng-bind-html="validButtonName"></button>
|
<button class="btn btn-info" ng-click="ok()" ng-disabled="attempting" ng-bind-html="validButtonName"></button>
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
<input type="hidden" name="acceptCondition" ng-model="acceptCondition" value="true">
|
<input type="hidden" name="acceptCondition" ng-model="acceptCondition" value="true">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div ng-if="schedule">
|
||||||
|
<p translate translate-values="{DEADLINES: schedule.items.length}">{{ 'app.shared.stripe.payment_schedule' }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-footer no-padder">
|
<div class="panel-footer no-padder">
|
||||||
|
@ -246,7 +246,9 @@ en:
|
|||||||
his_group: "{GENDER, select, male{His} female{Her} other{Its}} group"
|
his_group: "{GENDER, select, male{His} female{Her} other{Its}} group"
|
||||||
he_wants_to_change_group: "{ROLE, select, member{I want} other{The user wants}} to change group"
|
he_wants_to_change_group: "{ROLE, select, member{I want} other{The user wants}} to change group"
|
||||||
change_my_group: "Change {ROLE, select, member{my} other{{GENDER, select, male{his} female{her} other{its}}}} group"
|
change_my_group: "Change {ROLE, select, member{my} other{{GENDER, select, male{his} female{her} other{its}}}} group"
|
||||||
|
summary: "Summary"
|
||||||
your_subscription_has_expired_on_the_DATE: "Your subscription has expired on the {DATE}"
|
your_subscription_has_expired_on_the_DATE: "Your subscription has expired on the {DATE}"
|
||||||
|
subscription_price: "Subscription price"
|
||||||
you_ve_just_payed_the_subscription_html: "You've just paid the <strong>subscription</strong>:"
|
you_ve_just_payed_the_subscription_html: "You've just paid the <strong>subscription</strong>:"
|
||||||
thank_you_your_subscription_is_successful: "Thank you. Your subscription is successful!"
|
thank_you_your_subscription_is_successful: "Thank you. Your subscription is successful!"
|
||||||
your_invoice_will_be_available_soon_from_your_dashboard: "Your invoice will be available soon from your dashboard"
|
your_invoice_will_be_available_soon_from_your_dashboard: "Your invoice will be available soon from your dashboard"
|
||||||
|
@ -246,7 +246,9 @@ fr:
|
|||||||
his_group: "Son groupe"
|
his_group: "Son groupe"
|
||||||
he_wants_to_change_group: "{ROLE, select, member{Je veux} other{L'utilisateur veut}} changer de groupe"
|
he_wants_to_change_group: "{ROLE, select, member{Je veux} other{L'utilisateur veut}} changer de groupe"
|
||||||
change_my_group: "Changer {ROLE, select, member{mon} other{{GENDER, select, other{son}}}} groupe"
|
change_my_group: "Changer {ROLE, select, member{mon} other{{GENDER, select, other{son}}}} groupe"
|
||||||
|
summary: "Résumé"
|
||||||
your_subscription_has_expired_on_the_DATE: "Votre abonnement a expiré au {DATE}"
|
your_subscription_has_expired_on_the_DATE: "Votre abonnement a expiré au {DATE}"
|
||||||
|
subscription_price: "Coût de l'abonnement"
|
||||||
you_ve_just_payed_the_subscription_html: "Vous venez de régler <strong>l'abonnement</strong> :"
|
you_ve_just_payed_the_subscription_html: "Vous venez de régler <strong>l'abonnement</strong> :"
|
||||||
thank_you_your_subscription_is_successful: "Merci. Votre abonnement a bien été pris en compte !"
|
thank_you_your_subscription_is_successful: "Merci. Votre abonnement a bien été pris en compte !"
|
||||||
your_invoice_will_be_available_soon_from_your_dashboard: "Votre facture sera bientôt disponible depuis votre tableau de bord"
|
your_invoice_will_be_available_soon_from_your_dashboard: "Votre facture sera bientôt disponible depuis votre tableau de bord"
|
||||||
|
@ -121,6 +121,7 @@ en:
|
|||||||
_the_general_terms_and_conditions: "the general terms and conditions."
|
_the_general_terms_and_conditions: "the general terms and conditions."
|
||||||
credit_amount_for_pay_reservation: "{amount} {currency} remains to be paid to confirm your reservation"
|
credit_amount_for_pay_reservation: "{amount} {currency} remains to be paid to confirm your reservation"
|
||||||
client_credit_amount_for_pay_reservation: "{amount} {currency} remains to be paid to confirm reservation of client"
|
client_credit_amount_for_pay_reservation: "{amount} {currency} remains to be paid to confirm reservation of client"
|
||||||
|
payment_schedule: "You're about to subscribe to a payment schedule of {DEADLINES} months. By paying this bill, you agree to pay all payment deadlines."
|
||||||
confirm_payment_of_: "Pay: {AMOUNT}"
|
confirm_payment_of_: "Pay: {AMOUNT}"
|
||||||
#dialog of on site payment for reservations
|
#dialog of on site payment for reservations
|
||||||
valid_reservation_modal:
|
valid_reservation_modal:
|
||||||
@ -128,6 +129,7 @@ en:
|
|||||||
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Here is the summary of the slots to book for the current user:"
|
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Here is the summary of the slots to book for the current user:"
|
||||||
subscription_confirmation: "Subscription confirmation"
|
subscription_confirmation: "Subscription confirmation"
|
||||||
here_is_the_subscription_summary: "Here is the subscription summary:"
|
here_is_the_subscription_summary: "Here is the subscription summary:"
|
||||||
|
payment_schedule: "This subscription is payed with a payment schedule of {DEADLINES} months. By validating, you confirm to collect the first monthly payment."
|
||||||
#event edition form
|
#event edition form
|
||||||
event:
|
event:
|
||||||
title: "Title"
|
title: "Title"
|
||||||
|
@ -121,6 +121,7 @@ fr:
|
|||||||
_the_general_terms_and_conditions: "les conditions générales de vente."
|
_the_general_terms_and_conditions: "les conditions générales de vente."
|
||||||
credit_amount_for_pay_reservation: "Il vous reste {amount} {currency} à payer pour valider votre réservation"
|
credit_amount_for_pay_reservation: "Il vous reste {amount} {currency} à payer pour valider votre réservation"
|
||||||
client_credit_amount_for_pay_reservation: "Il reste {amount} {currency} à payer pour valider la réservation"
|
client_credit_amount_for_pay_reservation: "Il reste {amount} {currency} à payer pour valider la réservation"
|
||||||
|
payment_schedule: "Vous êtes sur le point de souscrire à un échéancier de paiement de {DEADLINES} mois. En payant cette facture, vous vous engagez à payer l'ensemble des échéances."
|
||||||
confirm_payment_of_: "Payer : {AMOUNT}"
|
confirm_payment_of_: "Payer : {AMOUNT}"
|
||||||
#dialog of on site payment for reservations
|
#dialog of on site payment for reservations
|
||||||
valid_reservation_modal:
|
valid_reservation_modal:
|
||||||
@ -128,6 +129,7 @@ fr:
|
|||||||
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Voici le récapitulatif des créneaux à réserver pour l'utilisateur courant :"
|
here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Voici le récapitulatif des créneaux à réserver pour l'utilisateur courant :"
|
||||||
subscription_confirmation: "Validation de l'abonnement"
|
subscription_confirmation: "Validation de l'abonnement"
|
||||||
here_is_the_subscription_summary: "Voici le récapitulatif de l'abonnement :"
|
here_is_the_subscription_summary: "Voici le récapitulatif de l'abonnement :"
|
||||||
|
payment_schedule: "Cet abonnement est souscrit par un échéancier de paiement sur {DEADLINES} mois. En validant, vous confirmez encaisser la première mensualité."
|
||||||
#event edition form
|
#event edition form
|
||||||
event:
|
event:
|
||||||
title: "Titre"
|
title: "Titre"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user