mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-03-21 12:29:03 +01:00
show subscription summary in cart payment modal
This commit is contained in:
parent
b0afa02f1d
commit
2fc9fd4028
@ -724,11 +724,14 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
||||
},
|
||||
coupon () {
|
||||
return $scope.coupon.applied;
|
||||
},
|
||||
selectedPlan () {
|
||||
return $scope.selectedPlan;
|
||||
}
|
||||
},
|
||||
controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'Auth', 'Reservation', 'wallet', 'helpers', '$filter', 'coupon',
|
||||
function ($scope, $uibModalInstance, $state, reservation, price, Auth, Reservation, wallet, helpers, $filter, coupon) {
|
||||
// user wallet amount
|
||||
controller: ['$scope', '$uibModalInstance', '$state', 'reservation', 'price', 'Auth', 'Reservation', 'wallet', 'helpers', '$filter', 'coupon', 'selectedPlan',
|
||||
function ($scope, $uibModalInstance, $state, reservation, price, Auth, Reservation, wallet, helpers, $filter, coupon, selectedPlan) {
|
||||
// user wallet amount
|
||||
$scope.walletAmount = wallet.amount;
|
||||
|
||||
// Global price (total of all items)
|
||||
@ -740,6 +743,9 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs',
|
||||
// Reservation
|
||||
$scope.reservation = reservation;
|
||||
|
||||
// Subscription
|
||||
$scope.plan = selectedPlan;
|
||||
|
||||
// Used in wallet info template to interpolate some translations
|
||||
$scope.numberFilter = $filter('number');
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
<div class="modal-header">
|
||||
<img ng-src="{{logoBlack.custom_asset_file_attributes.attachment_url}}" alt="{{logo.custom_asset_file_attributes.attachment}}" class="modal-logo"/>
|
||||
<h1 translate>{{ 'app.public.plans.subscription_confirmation' }}</h1>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
|
||||
<ng-include src="'/shared/_wallet_amount_info.html'"></ng-include>
|
||||
|
||||
<p>{{ 'app.public.plans.here_is_the_NAME_subscription_summary' | translate:{NAME:member.name} }}</p>
|
||||
<p>{{ plan | humanReadablePlanName }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-info" ng-click="ok()" ng-disabled="attempting" ng-bind-html="validButtonName"></button>
|
||||
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'app.shared.buttons.cancel' }}</button>
|
||||
</div>
|
@ -1,18 +1,24 @@
|
||||
<div class="modal-header">
|
||||
<img ng-src="{{logoBlack.custom_asset_file_attributes.attachment_url}}" alt="{{logo.custom_asset_file_attributes.attachment}}" class="modal-logo"/>
|
||||
<h1 translate>{{ 'app.shared.valid_reservation_modal.booking_confirmation' }}</h1>
|
||||
<h1 translate ng-show="reservation.slots_attributes.length > 0">{{ 'app.shared.valid_reservation_modal.booking_confirmation' }}</h1>
|
||||
<h1 translate ng-show="reservation.slots_attributes.length === 0 && reservation.plan_id">{{ 'app.shared.valid_reservation_modal.subscription_confirmation' }}</h1>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
|
||||
<ng-include src="'/shared/_wallet_amount_info.html'"></ng-include>
|
||||
|
||||
<p translate>{{ 'app.shared.valid_reservation_modal.here_is_the_summary_of_the_slots_to_book_for_the_current_user' }}</p>
|
||||
<ul ng-repeat="slot in reservation.slots_attributes">
|
||||
<li><strong>{{slot.start_at | amDateFormat: 'LL'}} : {{slot.start_at | amDateFormat:'LT'}} - {{slot.end_at | amDateFormat:'LT'}}</strong></li>
|
||||
</ul>
|
||||
<div ng-if="reservation.slots_attributes.length > 0">
|
||||
<p translate>{{ 'app.shared.valid_reservation_modal.here_is_the_summary_of_the_slots_to_book_for_the_current_user' }}</p>
|
||||
<ul ng-repeat="slot in reservation.slots_attributes">
|
||||
<li><strong>{{slot.start_at | amDateFormat: 'LL'}} : {{slot.start_at | amDateFormat:'LT'}} - {{slot.end_at | amDateFormat:'LT'}}</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-if="reservation.plan_id">
|
||||
<p translate>{{ 'app.shared.valid_reservation_modal.here_is_the_subscription_summary' }}</p>
|
||||
<p>{{ plan | humanReadablePlanName }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-info" ng-click="ok()" ng-disabled="attempting" ng-bind-html="validButtonName"></button>
|
||||
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'app.shared.buttons.cancel' }}</button>
|
||||
</div>
|
||||
<!-- TODO, add plan: see app/frontend/templates/plans/payment_modal.html then delete it -->
|
||||
|
@ -254,8 +254,6 @@ en:
|
||||
the_user_s_group_was_successfully_changed: "The user's group was successfully changed."
|
||||
an_error_prevented_your_group_from_being_changed: "An error prevented your group from being changed."
|
||||
an_error_prevented_to_change_the_user_s_group: "An error prevented to change the user's group."
|
||||
subscription_confirmation: "Subscription confirmation"
|
||||
here_is_the_NAME_subscription_summary: "Here is the {NAME}'s subscription summary:"
|
||||
#Fablab's events list
|
||||
events_list:
|
||||
the_fablab_s_events: "The Fablab's events"
|
||||
|
@ -254,8 +254,6 @@ fr:
|
||||
the_user_s_group_was_successfully_changed: "Le groupe de l'utilisateur a bien été changé."
|
||||
an_error_prevented_your_group_from_being_changed: "Une erreur a empêché votre changement de groupe."
|
||||
an_error_prevented_to_change_the_user_s_group: "Une erreur a empêché le changement de groupe de l'utilisateur."
|
||||
subscription_confirmation: "Validation de l'abonnement"
|
||||
here_is_the_NAME_subscription_summary: "Voici le récapitulatif de l'abonnement de {NAME} :"
|
||||
#Fablab's events list
|
||||
events_list:
|
||||
the_fablab_s_events: "Les événements du Fab Lab"
|
||||
|
@ -126,6 +126,8 @@ en:
|
||||
valid_reservation_modal:
|
||||
booking_confirmation: "Booking confirmation"
|
||||
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"
|
||||
here_is_the_subscription_summary: "Here is the subscription summary:"
|
||||
#event edition form
|
||||
event:
|
||||
title: "Title"
|
||||
@ -212,7 +214,7 @@ en:
|
||||
number_of_tickets: "Number of tickets"
|
||||
public_page: "Show in training lists"
|
||||
disable_training: "Disable the training"
|
||||
#partial form to edit/create an user (admin view)
|
||||
#partial form to edit/create a user (admin view)
|
||||
user_admin:
|
||||
user: "User"
|
||||
incomplete_profile: "Incomplete profile"
|
||||
@ -265,12 +267,12 @@ en:
|
||||
do_you_want_to_change_NAME_s_booking_slot_initially_planned_at: "Do you want to change {NAME}'s booking slot, initially planned at:"
|
||||
cancel_this_reservation: "Cancel this reservation"
|
||||
i_want_to_change_date: "I want to change date"
|
||||
#modal introducing that a training is requested before booking a machine
|
||||
#modal telling users that they need to pass a training before booking a machine
|
||||
request_training_modal:
|
||||
to_book_the_MACHINE_you_must_have_completed_the_TRAINING: "To book the \"{MACHINE}\" you must have completed the {TRAINING}."
|
||||
register_for_the_training: "Enroll in the training"
|
||||
i_dont_want_to_register_now: "I don't want to enroll now"
|
||||
#modal introducing that a user must wait for his training being validated before booking a machine
|
||||
#modal telling users that they must wait for their training validation before booking a machine
|
||||
training_reservation_modal:
|
||||
machine_reservation: "Machine reservation"
|
||||
you_must_wait_for_your_training_is_being_validated_by_the_fablab_team_to_book_this_machine: "You must wait for your training is being validated by the FabLab team to book this machine."
|
||||
@ -326,7 +328,7 @@ en:
|
||||
debit_reservation_machine: "Pay for a machine reservation"
|
||||
debit_reservation_event: "Pay for an event reservation"
|
||||
warning_uneditable_credit: "Warning: once validated, the credited amount won't be editable anymore."
|
||||
#promotional coupon (creation/edition form)
|
||||
#coupon (promotional) (creation/edition form)
|
||||
coupon:
|
||||
name: "Name"
|
||||
name_is_required: "Name is required."
|
||||
@ -383,7 +385,7 @@ en:
|
||||
summary: "Summary"
|
||||
select_one_or_more_slots_in_the_calendar: "Select one {SINGLE, select, true{slot} other{or more slots}} in the calendar"
|
||||
you_ve_just_selected_the_slot: "You've just selected the slot:"
|
||||
datetime_to_time: "{START_DATETIME} to {END_TIME}" #eg: Thursday, September 4 1986 8:30 PM to 10:00 PM
|
||||
datetime_to_time: "{START_DATETIME} to {END_TIME}" #eg: Thursday, September 4, 1986 8:30 PM to 10:00 PM
|
||||
cost_of_TYPE: "Cost of the {TYPE, select, Machine{machine slot} Training{training} Space{space slot} other{element}}"
|
||||
offer_this_slot: "Offer this slot"
|
||||
confirm_this_slot: "Confirm this slot"
|
||||
@ -411,7 +413,7 @@ en:
|
||||
tags_of_the_destination_slot: "Tags of the destination slot:"
|
||||
confirm_my_modification: "Confirm my modification"
|
||||
your_booking_slot_was_successfully_moved_from_: "Your booking slot was successfully moved from"
|
||||
to_date: "to" #eg. from 01/01 to 01/05
|
||||
to_date: "to" #eg. from 01 to 05 january.
|
||||
please_select_a_member_first: "Please select a member first"
|
||||
unable_to_select_plan_if_slots_in_the_past: "Unable to select a plan if any of the selected slots is in the past"
|
||||
unable_to_change_the_reservation: "Unable to change the reservation"
|
||||
|
@ -126,6 +126,8 @@ fr:
|
||||
valid_reservation_modal:
|
||||
booking_confirmation: "Validation réservation"
|
||||
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"
|
||||
here_is_the_subscription_summary: "Voici le récapitulatif de l'abonnement :"
|
||||
#event edition form
|
||||
event:
|
||||
title: "Titre"
|
||||
@ -212,7 +214,7 @@ fr:
|
||||
number_of_tickets: "Nombre de places"
|
||||
public_page: "Afficher dans la liste de formation"
|
||||
disable_training: "Désactiver la formation"
|
||||
#partial form to edit/create an user (admin view)
|
||||
#partial form to edit/create a user (admin view)
|
||||
user_admin:
|
||||
user: "Utilisateur"
|
||||
incomplete_profile: "Profil incomplet"
|
||||
@ -265,12 +267,12 @@ fr:
|
||||
do_you_want_to_change_NAME_s_booking_slot_initially_planned_at: "Souhaitez-vous changer le créneau de réservation de {NAME}, initialement prévu au :"
|
||||
cancel_this_reservation: "Annuler cette réservation"
|
||||
i_want_to_change_date: "Je veux changer de date"
|
||||
#modal introducing that a training is requested before booking a machine
|
||||
#modal telling users that they need to pass a training before booking a machine
|
||||
request_training_modal:
|
||||
to_book_the_MACHINE_you_must_have_completed_the_TRAINING: "Pour réserver la machine \"{MACHINE}\" vous devez avoir suivi la {TRAINING}."
|
||||
register_for_the_training: "S'inscrire à la formation"
|
||||
i_dont_want_to_register_now: "Je ne souhaite pas m'inscrire pour l'instant"
|
||||
#modal introducing that a user must wait for his training being validated before booking a machine
|
||||
#modal telling users that they must wait for their training validation before booking a machine
|
||||
training_reservation_modal:
|
||||
machine_reservation: "Réservation machine"
|
||||
you_must_wait_for_your_training_is_being_validated_by_the_fablab_team_to_book_this_machine: "Il faut attendre que votre formation soit validée par l'équipe du Fab Lab pour réserver cette machine."
|
||||
@ -326,7 +328,7 @@ fr:
|
||||
debit_reservation_machine: "Payer une réservation de machine"
|
||||
debit_reservation_event: "Payer une réservation d'événement"
|
||||
warning_uneditable_credit: "Attention : une fois validé, le montant crédité ne sera plus modifiable."
|
||||
#promotional coupon (creation/edition form)
|
||||
#coupon (promotional) (creation/edition form)
|
||||
coupon:
|
||||
name: "Nom"
|
||||
name_is_required: "Le nom est requis."
|
||||
@ -383,7 +385,7 @@ fr:
|
||||
summary: "Résumé"
|
||||
select_one_or_more_slots_in_the_calendar: "Sélectionnez un {SINGLE, select, true{créneau} other{ou plusieurs créneaux}} dans le calendrier"
|
||||
you_ve_just_selected_the_slot: "Vous venez de sélectionner le créneau :"
|
||||
datetime_to_time: "{START_DATETIME} à {END_TIME}" #eg: Thursday, September 4 1986 8:30 PM to 10:00 PM
|
||||
datetime_to_time: "{START_DATETIME} à {END_TIME}" #eg: Thursday, September 4, 1986 8:30 PM to 10:00 PM
|
||||
cost_of_TYPE: "Coût {TYPE, select, Machine{du créneau machine} Training{de la formation} Space{du créneau espace} other{de l'élément}}"
|
||||
offer_this_slot: "Offrir ce créneau"
|
||||
confirm_this_slot: "Valider ce créneau"
|
||||
@ -411,7 +413,7 @@ fr:
|
||||
tags_of_the_destination_slot: "Étiquettes du créneau de destination :"
|
||||
confirm_my_modification: "Valider ma modification"
|
||||
your_booking_slot_was_successfully_moved_from_: "Votre créneau de réservation a bien été déplacé du"
|
||||
to_date: "au" #eg. from 01/01 to 01/05
|
||||
to_date: "au" #eg. from 01 to 05 january.
|
||||
please_select_a_member_first: "Veuillez tout d'abord sélectionner un membre"
|
||||
unable_to_select_plan_if_slots_in_the_past: "Impossible de sélectionner un abonnement si l'un des créneaux sélectionné est dans le passé"
|
||||
unable_to_change_the_reservation: "Impossible de modifier la réservation"
|
||||
|
Loading…
x
Reference in New Issue
Block a user